aboutsummaryrefslogtreecommitdiff
path: root/thirdparty
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-04-20 03:09:25 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-04-24 16:14:29 +0200
commit82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8 (patch)
tree965f6eb89b84d65a62b49008fd972c004832ccd1 /thirdparty
parente6e0cbc387c2a77b48e4065c229daa65bf1aa0fa (diff)
downloadwallet-core-82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8.tar.xz
Reorganize module loading.
We now use webpack instead of SystemJS, effectively bundling modules into one file (plus commons chunks) for every entry point. This results in a much smaller extension size (almost half). Furthermore we use yarn/npm even for extension run-time dependencies. This relieves us from manually vendoring and building dependencies. It's also easier to understand for new developers familiar with node.
Diffstat (limited to 'thirdparty')
-rw-r--r--thirdparty/README24
-rw-r--r--thirdparty/URI.js/.editorconfig9
-rw-r--r--thirdparty/URI.js/.gitignore2
-rw-r--r--thirdparty/URI.js/.jshintrc31
-rw-r--r--thirdparty/URI.js/CHANGELOG.md332
-rw-r--r--thirdparty/URI.js/Gruntfile.js22
-rw-r--r--thirdparty/URI.js/LICENSE.txt21
-rw-r--r--thirdparty/URI.js/README.md244
-rw-r--r--thirdparty/URI.js/about-uris.html189
-rw-r--r--thirdparty/URI.js/bower.json16
-rw-r--r--thirdparty/URI.js/build.html71
-rw-r--r--thirdparty/URI.js/build.js78
-rw-r--r--thirdparty/URI.js/contributing.md19
-rw-r--r--thirdparty/URI.js/docs.html1399
-rw-r--r--thirdparty/URI.js/index.html173
-rw-r--r--thirdparty/URI.js/jquery-1.10.2.min.js6
-rw-r--r--thirdparty/URI.js/jquery-1.7.2.min.js4
-rw-r--r--thirdparty/URI.js/jquery-1.8.2.min.js2
-rw-r--r--thirdparty/URI.js/jquery-1.9.1.min.js5
-rw-r--r--thirdparty/URI.js/jquery-uri-plugin.html203
-rw-r--r--thirdparty/URI.js/package.json78
-rw-r--r--thirdparty/URI.js/prettify/lang-apollo.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-clj.js18
-rw-r--r--thirdparty/URI.js/prettify/lang-css.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-go.js1
-rw-r--r--thirdparty/URI.js/prettify/lang-hs.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-lisp.js3
-rw-r--r--thirdparty/URI.js/prettify/lang-lua.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-ml.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-n.js4
-rw-r--r--thirdparty/URI.js/prettify/lang-proto.js1
-rw-r--r--thirdparty/URI.js/prettify/lang-scala.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-sql.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-tex.js1
-rw-r--r--thirdparty/URI.js/prettify/lang-vb.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-vhdl.js3
-rw-r--r--thirdparty/URI.js/prettify/lang-wiki.js2
-rw-r--r--thirdparty/URI.js/prettify/lang-xq.js3
-rw-r--r--thirdparty/URI.js/prettify/lang-yaml.js2
-rw-r--r--thirdparty/URI.js/prettify/prettify.css1
-rw-r--r--thirdparty/URI.js/prettify/prettify.js28
-rw-r--r--thirdparty/URI.js/prettify/prettify.sunburst.css52
-rw-r--r--thirdparty/URI.js/screen.css181
-rw-r--r--thirdparty/URI.js/screen.js39
-rw-r--r--thirdparty/URI.js/src/IPv6.js185
-rw-r--r--thirdparty/URI.js/src/SecondLevelDomains.js240
-rw-r--r--thirdparty/URI.js/src/URI.fragmentQuery.js104
-rw-r--r--thirdparty/URI.js/src/URI.fragmentURI.js97
-rw-r--r--thirdparty/URI.js/src/URI.js2218
-rw-r--r--thirdparty/URI.js/src/URI.min.js89
-rw-r--r--thirdparty/URI.js/src/URITemplate.js513
-rw-r--r--thirdparty/URI.js/src/jquery.URI.js234
-rw-r--r--thirdparty/URI.js/src/jquery.URI.min.js7
-rw-r--r--thirdparty/URI.js/src/punycode.js533
-rw-r--r--thirdparty/URI.js/test/index.html26
-rw-r--r--thirdparty/URI.js/test/pre_libs.js7
-rw-r--r--thirdparty/URI.js/test/qunit/qunit-composite.css13
-rw-r--r--thirdparty/URI.js/test/qunit/qunit-composite.js167
-rw-r--r--thirdparty/URI.js/test/qunit/qunit.css244
-rw-r--r--thirdparty/URI.js/test/qunit/qunit.js2212
-rw-r--r--thirdparty/URI.js/test/test.URI.html26
-rw-r--r--thirdparty/URI.js/test/test.fragmentQuery.html31
-rw-r--r--thirdparty/URI.js/test/test.fragmentURI.html31
-rw-r--r--thirdparty/URI.js/test/test.jQuery-1.10.html31
-rw-r--r--thirdparty/URI.js/test/test.jQuery-1.7.html31
-rw-r--r--thirdparty/URI.js/test/test.jQuery-1.8.html31
-rw-r--r--thirdparty/URI.js/test/test.jQuery-1.9.html31
-rw-r--r--thirdparty/URI.js/test/test.js1837
-rw-r--r--thirdparty/URI.js/test/test_fragmentQuery.js59
-rw-r--r--thirdparty/URI.js/test/test_fragmentURI.js61
-rw-r--r--thirdparty/URI.js/test/test_jim.js146
-rw-r--r--thirdparty/URI.js/test/test_jquery.js141
-rw-r--r--thirdparty/URI.js/test/test_template.js411
-rw-r--r--thirdparty/URI.js/test/urls.js1892
-rw-r--r--thirdparty/URI.js/uri-template.html234
-rw-r--r--thirdparty/URI.js/utils/SLDs.php37
-rw-r--r--thirdparty/URI.js/utils/sld.js101
-rw-r--r--thirdparty/jed/.gitignore1
-rw-r--r--thirdparty/jed/.travis.yml4
-rw-r--r--thirdparty/jed/LICENSE19
-rw-r--r--thirdparty/jed/Makefile13
-rw-r--r--thirdparty/jed/README.md63
-rw-r--r--thirdparty/jed/jed.js1033
-rw-r--r--thirdparty/jed/package.json27
-rw-r--r--thirdparty/jed/plurals.jison72
-rw-r--r--thirdparty/jed/test/common.js2
-rw-r--r--thirdparty/jed/test/index.html24
-rw-r--r--thirdparty/jed/test/jquery.min.js4
-rw-r--r--thirdparty/jed/test/tests.js746
-rw-r--r--thirdparty/systemjs/.agignore1
-rw-r--r--thirdparty/systemjs/.gitignore3
-rw-r--r--thirdparty/systemjs/.travis.yml14
-rw-r--r--thirdparty/systemjs/LICENSE10
-rwxr-xr-xthirdparty/systemjs/Makefile186
-rw-r--r--thirdparty/systemjs/README.md149
-rw-r--r--thirdparty/systemjs/bench/cjs-sample/cjs.js949
-rw-r--r--thirdparty/systemjs/bench/config-example/config.js1474
-rw-r--r--thirdparty/systemjs/bench/config-example/normalize-data.js69
-rw-r--r--thirdparty/systemjs/bench/config-example/pkg-configs.js972
-rw-r--r--thirdparty/systemjs/bench/get-cjs-deps.js63
-rw-r--r--thirdparty/systemjs/bench/normalize-perf.js67
-rw-r--r--thirdparty/systemjs/bower.json17
-rw-r--r--thirdparty/systemjs/dist/system-csp-production.js6
-rw-r--r--thirdparty/systemjs/dist/system-csp-production.js.map1
-rw-r--r--thirdparty/systemjs/dist/system-csp-production.src.js4536
-rw-r--r--thirdparty/systemjs/dist/system-polyfills.js5
-rw-r--r--thirdparty/systemjs/dist/system-polyfills.js.map1
-rw-r--r--thirdparty/systemjs/dist/system-polyfills.src.js1277
-rw-r--r--thirdparty/systemjs/dist/system-register-only.js5
-rw-r--r--thirdparty/systemjs/dist/system-register-only.js.map1
-rw-r--r--thirdparty/systemjs/dist/system-register-only.src.js2198
-rw-r--r--thirdparty/systemjs/dist/system.js6
-rw-r--r--thirdparty/systemjs/dist/system.js.map1
-rw-r--r--thirdparty/systemjs/dist/system.src.js5153
-rw-r--r--thirdparty/systemjs/docs/config-api.md292
-rw-r--r--thirdparty/systemjs/docs/creating-plugins.md84
-rw-r--r--thirdparty/systemjs/docs/es6-modules-overview.md108
-rw-r--r--thirdparty/systemjs/docs/module-formats.md228
-rw-r--r--thirdparty/systemjs/docs/overview.md166
-rw-r--r--thirdparty/systemjs/docs/production-workflows.md83
-rw-r--r--thirdparty/systemjs/docs/system-api.md141
-rw-r--r--thirdparty/systemjs/index.js48
-rw-r--r--thirdparty/systemjs/lib/alias.js38
-rw-r--r--thirdparty/systemjs/lib/amd-helpers.js245
-rw-r--r--thirdparty/systemjs/lib/amd.js42
-rw-r--r--thirdparty/systemjs/lib/bundles.js73
-rw-r--r--thirdparty/systemjs/lib/cjs-helpers.js43
-rw-r--r--thirdparty/systemjs/lib/cjs.js138
-rw-r--r--thirdparty/systemjs/lib/conditionals.js161
-rw-r--r--thirdparty/systemjs/lib/core.js504
-rw-r--r--thirdparty/systemjs/lib/createSystem.js3
-rw-r--r--thirdparty/systemjs/lib/depCache.js44
-rw-r--r--thirdparty/systemjs/lib/esm.js161
-rw-r--r--thirdparty/systemjs/lib/global-eval.js142
-rw-r--r--thirdparty/systemjs/lib/global-helpers.js147
-rw-r--r--thirdparty/systemjs/lib/global.js70
-rw-r--r--thirdparty/systemjs/lib/legacy-transpiler.js86
-rw-r--r--thirdparty/systemjs/lib/loader-wrapper-end.js6
-rw-r--r--thirdparty/systemjs/lib/loader-wrapper-start.js913
-rw-r--r--thirdparty/systemjs/lib/meta.js155
-rw-r--r--thirdparty/systemjs/lib/package.js596
-rw-r--r--thirdparty/systemjs/lib/paths.js42
-rw-r--r--thirdparty/systemjs/lib/perf.js227
-rw-r--r--thirdparty/systemjs/lib/plugins.js263
-rw-r--r--thirdparty/systemjs/lib/polyfills-bootstrap.js2
-rw-r--r--thirdparty/systemjs/lib/proto.js268
-rw-r--r--thirdparty/systemjs/lib/register.js633
-rw-r--r--thirdparty/systemjs/lib/scriptLoader.js196
-rw-r--r--thirdparty/systemjs/lib/scriptOnly.js17
-rw-r--r--thirdparty/systemjs/lib/system-fetch.js125
-rw-r--r--thirdparty/systemjs/lib/system-only-resolve.js24
-rw-r--r--thirdparty/systemjs/lib/url-polyfill.js64
-rw-r--r--thirdparty/systemjs/lib/wrapper-end.js47
-rw-r--r--thirdparty/systemjs/lib/wrapper-start.js2
-rw-r--r--thirdparty/systemjs/package.json34
-rw-r--r--thirdparty/systemjs/test/test-babel-runtime.html44
-rw-r--r--thirdparty/systemjs/test/test-babel.html29
-rw-r--r--thirdparty/systemjs/test/test-babel.js3
-rw-r--r--thirdparty/systemjs/test/test-csp-inline.html61
-rw-r--r--thirdparty/systemjs/test/test-csp.html280
-rw-r--r--thirdparty/systemjs/test/test-jsextensions.html112
-rw-r--r--thirdparty/systemjs/test/test-register-only.html45
-rw-r--r--thirdparty/systemjs/test/test-tracer.html71
-rw-r--r--thirdparty/systemjs/test/test-traceur.html34
-rw-r--r--thirdparty/systemjs/test/test-traceur.js3
-rw-r--r--thirdparty/systemjs/test/test-typescript.html31
-rw-r--r--thirdparty/systemjs/test/test-typescript.js4
-rw-r--r--thirdparty/systemjs/test/test.js1462
-rw-r--r--thirdparty/systemjs/test/tests/#.js1
-rw-r--r--thirdparty/systemjs/test/tests/advanced-plugin.js20
-rw-r--r--thirdparty/systemjs/test/tests/all-circular1.js9
-rw-r--r--thirdparty/systemjs/test/tests/all-circular2.js3
-rw-r--r--thirdparty/systemjs/test/tests/all-circular3.js10
-rw-r--r--thirdparty/systemjs/test/tests/all-circular4.js5
-rw-r--r--thirdparty/systemjs/test/tests/all-layers1.js3
-rw-r--r--thirdparty/systemjs/test/tests/all-layers2.js20
-rw-r--r--thirdparty/systemjs/test/tests/all-layers3.js17
-rw-r--r--thirdparty/systemjs/test/tests/all-layers4.js1
-rw-r--r--thirdparty/systemjs/test/tests/amd-bundle.js6
-rw-r--r--thirdparty/systemjs/test/tests/amd-circular1.js7
-rw-r--r--thirdparty/systemjs/test/tests/amd-circular2.js6
-rw-r--r--thirdparty/systemjs/test/tests/amd-cjs-module.js4
-rw-r--r--thirdparty/systemjs/test/tests/amd-contextual.js6
-rw-r--r--thirdparty/systemjs/test/tests/amd-dep-A.js1
-rw-r--r--thirdparty/systemjs/test/tests/amd-dep-B.js1
-rw-r--r--thirdparty/systemjs/test/tests/amd-dep.js3
-rw-r--r--thirdparty/systemjs/test/tests/amd-dynamic-require.js19
-rw-r--r--thirdparty/systemjs/test/tests/amd-dynamic.js3
-rw-r--r--thirdparty/systemjs/test/tests/amd-extra-deps.js7
-rw-r--r--thirdparty/systemjs/test/tests/amd-format.js18
-rw-r--r--thirdparty/systemjs/test/tests/amd-module-2.js6
-rw-r--r--thirdparty/systemjs/test/tests/amd-module-3.js13
-rw-r--r--thirdparty/systemjs/test/tests/amd-module-bom.js4
-rw-r--r--thirdparty/systemjs/test/tests/amd-module.js6
-rw-r--r--thirdparty/systemjs/test/tests/amd-require.js3
-rw-r--r--thirdparty/systemjs/test/tests/amd-simplified-cjs-aliased-require1.js7
-rw-r--r--thirdparty/systemjs/test/tests/amd-simplified-cjs-aliased-require2.js8
-rw-r--r--thirdparty/systemjs/test/tests/anon-named.js10
-rw-r--r--thirdparty/systemjs/test/tests/async.js5
-rw-r--r--thirdparty/systemjs/test/tests/bootstrap@3.1.1/test.coffee1
-rw-r--r--thirdparty/systemjs/test/tests/branch-boolean.js1
-rw-r--r--thirdparty/systemjs/test/tests/branch-ie.js1
-rw-r--r--thirdparty/systemjs/test/tests/bundle.js7
-rw-r--r--thirdparty/systemjs/test/tests/cjs-circular1.js4
-rw-r--r--thirdparty/systemjs/test/tests/cjs-circular2.js4
-rw-r--r--thirdparty/systemjs/test/tests/cjs-exports-bom.js1
-rw-r--r--thirdparty/systemjs/test/tests/cjs-exports-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/cjs-exports.js6
-rw-r--r--thirdparty/systemjs/test/tests/cjs-format.js4
-rw-r--r--thirdparty/systemjs/test/tests/cjs-globals.js3
-rw-r--r--thirdparty/systemjs/test/tests/cjs-loading-plugin.js1
-rw-r--r--thirdparty/systemjs/test/tests/cjs-module-bom.js1
-rw-r--r--thirdparty/systemjs/test/tests/cjs-named-export.js5
-rw-r--r--thirdparty/systemjs/test/tests/cjs-process.js3
-rw-r--r--thirdparty/systemjs/test/tests/cjs-resolve.js1
-rw-r--r--thirdparty/systemjs/test/tests/cjs-this.js2
-rw-r--r--thirdparty/systemjs/test/tests/common-js-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/common-js-module.js2
-rw-r--r--thirdparty/systemjs/test/tests/commonjs-d.js1
-rw-r--r--thirdparty/systemjs/test/tests/commonjs-d2.js1
-rw-r--r--thirdparty/systemjs/test/tests/commonjs-globals.js1
-rw-r--r--thirdparty/systemjs/test/tests/commonjs-requires.js40
-rw-r--r--thirdparty/systemjs/test/tests/commonjs-variation.js5
-rw-r--r--thirdparty/systemjs/test/tests/commonjs-variation2.js8
-rw-r--r--thirdparty/systemjs/test/tests/compiled.coffee1
-rw-r--r--thirdparty/systemjs/test/tests/compiler-plugin.js4
-rw-r--r--thirdparty/systemjs/test/tests/compiler-test.coffee1
-rw-r--r--thirdparty/systemjs/test/tests/connected-tree/a.js9
-rw-r--r--thirdparty/systemjs/test/tests/connected-tree/b.js6
-rw-r--r--thirdparty/systemjs/test/tests/connected-tree/c.js3
-rw-r--r--thirdparty/systemjs/test/tests/contextual-map-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/contextual-test/contextual-map.js1
-rw-r--r--thirdparty/systemjs/test/tests/cs-loader.js3
-rw-r--r--thirdparty/systemjs/test/tests/cs/dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/cs/main.js1
-rw-r--r--thirdparty/systemjs/test/tests/csp/integrity.js5
-rw-r--r--thirdparty/systemjs/test/tests/csp/nonce.js3
-rw-r--r--thirdparty/systemjs/test/tests/csp/nonce2.js3
-rw-r--r--thirdparty/systemjs/test/tests/css.css3
-rw-r--r--thirdparty/systemjs/test/tests/css.js3
-rw-r--r--thirdparty/systemjs/test/tests/deep/deep-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/deep/deep.js1
-rw-r--r--thirdparty/systemjs/test/tests/default1-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/default1.js3
-rw-r--r--thirdparty/systemjs/test/tests/default2.js1
-rw-r--r--thirdparty/systemjs/test/tests/default3.js1
-rw-r--r--thirdparty/systemjs/test/tests/dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/duplicateDeps/m1.js23
-rw-r--r--thirdparty/systemjs/test/tests/duplicateDeps/m2.js13
-rw-r--r--thirdparty/systemjs/test/tests/eaa-amd.js3
-rw-r--r--thirdparty/systemjs/test/tests/eaa-es6.js1
-rw-r--r--thirdparty/systemjs/test/tests/empty-es6.js3
-rw-r--r--thirdparty/systemjs/test/tests/ep/some-repo/main.js1
-rw-r--r--thirdparty/systemjs/test/tests/error-loader.js1
-rw-r--r--thirdparty/systemjs/test/tests/error-loader2.js1
-rw-r--r--thirdparty/systemjs/test/tests/error.js1
-rw-r--r--thirdparty/systemjs/test/tests/es-module-flag.js3
-rw-r--r--thirdparty/systemjs/test/tests/es-named-import-cjs-cjs.js3
-rw-r--r--thirdparty/systemjs/test/tests/es-named-import-cjs.js2
-rw-r--r--thirdparty/systemjs/test/tests/es6-and-amd.js2
-rw-r--r--thirdparty/systemjs/test/tests/es6-circular1.js10
-rw-r--r--thirdparty/systemjs/test/tests/es6-circular2.js3
-rw-r--r--thirdparty/systemjs/test/tests/es6-cjs-named-export.js1
-rw-r--r--thirdparty/systemjs/test/tests/es6-detection1.js1
-rw-r--r--thirdparty/systemjs/test/tests/es6-format.js6
-rw-r--r--thirdparty/systemjs/test/tests/es6-import-star-amd.js3
-rw-r--r--thirdparty/systemjs/test/tests/es6-loading-amd-dep.js3
-rw-r--r--thirdparty/systemjs/test/tests/es6-loading-amd.js9
-rw-r--r--thirdparty/systemjs/test/tests/es6-plugin.js3
-rw-r--r--thirdparty/systemjs/test/tests/esm-dep.js5
-rw-r--r--thirdparty/systemjs/test/tests/esm-with-deps.js1
-rw-r--r--thirdparty/systemjs/test/tests/export-star.js2
-rw-r--r--thirdparty/systemjs/test/tests/foo.js10
-rw-r--r--thirdparty/systemjs/test/tests/global-dep.js5
-rw-r--r--thirdparty/systemjs/test/tests/global-encapsulation.js3
-rw-r--r--thirdparty/systemjs/test/tests/global-exports-array.js5
-rw-r--r--thirdparty/systemjs/test/tests/global-inaccessible-props.js8
-rw-r--r--thirdparty/systemjs/test/tests/global-inline-dep.js7
-rw-r--r--thirdparty/systemjs/test/tests/global-inline-export.js9
-rw-r--r--thirdparty/systemjs/test/tests/global-multi-diff.js3
-rw-r--r--thirdparty/systemjs/test/tests/global-multi.js6
-rw-r--r--thirdparty/systemjs/test/tests/global-shim-amd.js6
-rw-r--r--thirdparty/systemjs/test/tests/global-shim-config-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/global-shim-config-exports.js1
-rw-r--r--thirdparty/systemjs/test/tests/global-shim-config.js3
-rw-r--r--thirdparty/systemjs/test/tests/global-single-compiled.js9
-rw-r--r--thirdparty/systemjs/test/tests/global-single.js1
-rw-r--r--thirdparty/systemjs/test/tests/global-with-export.js5
-rw-r--r--thirdparty/systemjs/test/tests/global.js6
-rw-r--r--thirdparty/systemjs/test/tests/group-test.js34
-rw-r--r--thirdparty/systemjs/test/tests/hbs.hbs1
-rw-r--r--thirdparty/systemjs/test/tests/inline-depends-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/inline-depends.js1
-rw-r--r--thirdparty/systemjs/test/tests/jquery-named.js3
-rw-r--r--thirdparty/systemjs/test/tests/jquery.js2
-rw-r--r--thirdparty/systemjs/test/tests/legacy-plugin.js5
-rw-r--r--thirdparty/systemjs/test/tests/loader-scoping.js1
-rw-r--r--thirdparty/systemjs/test/tests/main-bundle.js3
-rw-r--r--thirdparty/systemjs/test/tests/main-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/main.js1
-rw-r--r--thirdparty/systemjs/test/tests/map-test-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/map-test.js1
-rw-r--r--thirdparty/systemjs/test/tests/map-test/sub.js1
-rw-r--r--thirdparty/systemjs/test/tests/map-version.js1
-rw-r--r--thirdparty/systemjs/test/tests/meta-deps.js21
-rw-r--r--thirdparty/systemjs/test/tests/meta-override.js2
-rw-r--r--thirdparty/systemjs/test/tests/mixed-bundle.js68
-rw-r--r--thirdparty/systemjs/test/tests/modA.js7
-rw-r--r--thirdparty/systemjs/test/tests/modC.js5
-rw-r--r--thirdparty/systemjs/test/tests/module-name.js8
-rw-r--r--thirdparty/systemjs/test/tests/module.js3
-rw-r--r--thirdparty/systemjs/test/tests/multiple-anonymous.js14
-rw-r--r--thirdparty/systemjs/test/tests/mypackage/index.js1
-rw-r--r--thirdparty/systemjs/test/tests/mypackage/lib/bar.js2
-rw-r--r--thirdparty/systemjs/test/tests/mypackage/src/foo.js3
-rw-r--r--thirdparty/systemjs/test/tests/nameddefine.js14
-rw-r--r--thirdparty/systemjs/test/tests/no-default-ext/file.ext1
-rw-r--r--thirdparty/systemjs/test/tests/normalize-hook-test.js1
-rw-r--r--thirdparty/systemjs/test/tests/out.js19
-rw-r--r--thirdparty/systemjs/test/tests/package-local-alias/index-cjs.js6
-rw-r--r--thirdparty/systemjs/test/tests/package-local-alias/index-default-cjs.js10
-rw-r--r--thirdparty/systemjs/test/tests/package-local-alias/index-default-esm.js10
-rw-r--r--thirdparty/systemjs/test/tests/package-local-alias/index-esm.js5
-rw-r--r--thirdparty/systemjs/test/tests/package-local-alias/local/index-cjs.js1
-rw-r--r--thirdparty/systemjs/test/tests/package-local-alias/local/index-default-cjs.js1
-rw-r--r--thirdparty/systemjs/test/tests/package-local-alias/local/index-default-esm.js2
-rw-r--r--thirdparty/systemjs/test/tests/package-local-alias/local/index-esm.js1
-rw-r--r--thirdparty/systemjs/test/tests/path/deep.js1
-rw-r--r--thirdparty/systemjs/test/tests/plugin-dep.js8
-rw-r--r--thirdparty/systemjs/test/tests/plugin@1.2.3/plugin.js3
-rw-r--r--thirdparty/systemjs/test/tests/reflection.js1
-rw-r--r--thirdparty/systemjs/test/tests/register-circular1.js24
-rw-r--r--thirdparty/systemjs/test/tests/register-circular2.js14
-rw-r--r--thirdparty/systemjs/test/tests/register-default-extension.js8
-rw-r--r--thirdparty/systemjs/test/tests/register-regex-2.js15
-rw-r--r--thirdparty/systemjs/test/tests/register-regex.js18
-rw-r--r--thirdparty/systemjs/test/tests/registerdynamic-main.js11
-rw-r--r--thirdparty/systemjs/test/tests/registerdynamic-notbundled.js5
-rw-r--r--thirdparty/systemjs/test/tests/reldynamic.js5
-rw-r--r--thirdparty/systemjs/test/tests/reldynamicdep.js1
-rw-r--r--thirdparty/systemjs/test/tests/shared-dep-bundles/a.js33
-rw-r--r--thirdparty/systemjs/test/tests/shared-dep-bundles/b.js33
-rw-r--r--thirdparty/systemjs/test/tests/shim-map-test-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/shim-package/shim-map-test.js1
-rw-r--r--thirdparty/systemjs/test/tests/some-json.json3
-rw-r--r--thirdparty/systemjs/test/tests/some-text.txt1
-rw-r--r--thirdparty/systemjs/test/tests/star-dep.js1
-rw-r--r--thirdparty/systemjs/test/tests/subcontextual-map/submodule.js3
-rw-r--r--thirdparty/systemjs/test/tests/subcontextual-mapdep.js1
-rw-r--r--thirdparty/systemjs/test/tests/test.css1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/depcache-test.js1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/dir/index.js2
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/dir/self-load.js2
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/dir2/index.json3
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/env-module-browser.js1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/env-module.js1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/index.js1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/interpolate.js1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/json.js4
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/json.json3
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/polate.js1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/self-load.js2
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/self.js1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/system.json28
-rw-r--r--thirdparty/systemjs/test/tests/testpkg/test.ts1
-rw-r--r--thirdparty/systemjs/test/tests/testpkg2.json6
-rw-r--r--thirdparty/systemjs/test/tests/testpkg2/asdf.asdf.js3
-rw-r--r--thirdparty/systemjs/test/tests/typescript.ts1
-rw-r--r--thirdparty/systemjs/test/tests/umd-dep.js3
-rw-r--r--thirdparty/systemjs/test/tests/umd.js10
-rw-r--r--thirdparty/systemjs/test/tests/versioned@2.0.3.js1
-rw-r--r--thirdparty/systemjs/test/tests/wildcard-test/2.js1
-rw-r--r--thirdparty/systemjs/test/tests/wildcard-test/2/sub.js1
-rw-r--r--thirdparty/systemjs/test/tests/wildcard-test/first.js1
-rw-r--r--thirdparty/systemjs/test/tests/with-global-deps.js1
-rw-r--r--thirdparty/systemjs/test/tests/with-runtime-babel.js16
-rw-r--r--thirdparty/systemjs/test/tests/with-runtime-traceur.js14
-rw-r--r--thirdparty/systemjs/test/tests/worker-babel.js14
-rw-r--r--thirdparty/systemjs/test/tests/worker-traceur.js12
-rw-r--r--thirdparty/systemjs/test/tests/worker-typescript.js16
-rw-r--r--thirdparty/systemjs/test/tests/wrapper.js1
-rw-r--r--thirdparty/systemjs/test/tests/zero@0.js1
382 files changed, 0 insertions, 44509 deletions
diff --git a/thirdparty/README b/thirdparty/README
deleted file mode 100644
index a095a34b8..000000000
--- a/thirdparty/README
+++ /dev/null
@@ -1,24 +0,0 @@
-We maintain copies of third-party repositories in this directory.
-Preferably each subdirectory should be maintained via 'git subtree'.
-The rest of the project references third party components either via
-symlinks, or via the build system.
-
-The following third party modules are used:
-
-Directory: jed
-Copyright: jQuery Foundation and other contributors, https://jquery.org/
-License: See jed/LICENSE
-Description: gettext .po parser for JavaScript
-Repository: https://github.com/SlexAxton/Jed/blob/master/LICENSE
-
-Directory: URI.js
-Copyright: Rodney Rehm
-License: The MIT License
-Description: URL parsing and manipulation library for JavaScript
-Repository: https://github.com/medialize/URI.js
-
-Directory: systemjs
-Copyright: Guy Bedford
-License: MIT License
-Description: Universal module loader for JavaScript
-Repository: https://github.com/systemjs/systemjs
diff --git a/thirdparty/URI.js/.editorconfig b/thirdparty/URI.js/.editorconfig
deleted file mode 100644
index 778c1485c..000000000
--- a/thirdparty/URI.js/.editorconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-root = true
-
-[**]
-charset = utf-8
-end_of_line = lf
-indent_size = 2
-indent_style = space
-insert_final_newline = true
-trim_trailing_whitespace = true
diff --git a/thirdparty/URI.js/.gitignore b/thirdparty/URI.js/.gitignore
deleted file mode 100644
index 9daa8247d..000000000
--- a/thirdparty/URI.js/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.DS_Store
-node_modules
diff --git a/thirdparty/URI.js/.jshintrc b/thirdparty/URI.js/.jshintrc
deleted file mode 100644
index 8327de8cb..000000000
--- a/thirdparty/URI.js/.jshintrc
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "node": true,
- "browser": false,
- "esnext": false,
- "bitwise": false,
- "camelcase": true,
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "indent": 2,
- "latedef": true,
- "newcap": true,
- "noarg": true,
- "quotmark": "single",
- "regexp": true,
- "undef": true,
- "unused": true,
- "strict": true,
- "trailing": true,
- "smarttabs": true,
- "expr": true,
- "globals": {
- "describe": false,
- "it": false,
- "before": false,
- "beforeEach": false,
- "after": false,
- "afterEach": false,
- "define": false
- }
-} \ No newline at end of file
diff --git a/thirdparty/URI.js/CHANGELOG.md b/thirdparty/URI.js/CHANGELOG.md
deleted file mode 100644
index 49cd3cc96..000000000
--- a/thirdparty/URI.js/CHANGELOG.md
+++ /dev/null
@@ -1,332 +0,0 @@
-# URI.js - Changelog #
-
-The release notes tracked in this document are also made available on the [releases page](https://github.com/medialize/URI.js/releases)
-
-### 1.18.2 (September 25th 2016) ###
-
-* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to allow callback to return `undefined` or `string` - [Issue #303](https://github.com/medialize/URI.js/issues/303)
-* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to properly resolve relative paths for fragment-only URLs
-
-### 1.18.1 (May 29th 2016) ###
-
-* fixing UMD wrapper of `jquery.URI.js` - [Issue #295](https://github.com/medialize/URI.js/issues/295)
-
-### 1.18.0 (April 30th 2016) ###
-
-* adding [`URI.joinPaths()`](http://medialize.github.io/URI.js/docs.html#static-joinPaths) to compose paths from directory tokens - [Issue #285](https://github.com/medialize/URI.js/issues/285)
-* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to allow `.` in variable names - [PR #287](https://github.com/medialize/URI.js/pull/287)
-* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to reject invalid literals - [PR #289](https://github.com/medialize/URI.js/pull/289)
-* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to reject prefix modifier on composite values - [PR #290](https://github.com/medialize/URI.js/pull/290)
-* fixing [`URI.buildUserinfo()`](http://medialize.github.io/URI.js/docs.html#static-buildUserinfo) to properly serialize password-only values - [PR #293](https://github.com/medialize/URI.js/pull/293)
-
-### 1.17.1 (February 25th 2016) ###
-
-* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly handle percent-encoded dot segments and leading dots in basename - [Issue #264](https://github.com/medialize/URI.js/issues/264), by [JordanMilne](https://github.com/JordanMilne)
-* fixing [`.hasQuery()`](http://medialize.github.io/URI.js/docs.html#search-has) to accept `RegExp` for name argument - [Issue #274](https://github.com/medialize/URI.js/issues/274), [Issue #277](https://github.com/medialize/URI.js/issues/277) by [mbrodala](https://github.com/mbrodala)
-
-### 1.17.0 (November 13th 2015) ###
-
-* fixing [`URI.removeQuery()`](http://medialize.github.io/URI.js/docs.html#search-remove) to cast values to string before matching - [Issue #250](https://github.com/medialize/URI.js/pull/250), [Issue #252](https://github.com/medialize/URI.js/pull/252), by [ryanelian](https://github.com/ryanelian) and [Siltaar](https://github.com/Siltaar)
-* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to allow appending an empty element - [Issue #236](https://github.com/medialize/URI.js/issues/236), [Issue #253](https://github.com/medialize/URI.js/pull/253), by [orlando](https://github.com/orlando)
-* adding [`.origin()`](http://medialize.github.io/URI.js/docs.html#accessors-origin) to get protocol and authority, counter-part to `.resource()` - [Issue #210](https://github.com/medialize/URI.js/issues/210), [Issue #263](https://github.com/medialize/URI.js/pull/263), by [justinmchase](https://github.com/justinmchase)
-
-### 1.16.1 (September 19th 2015) ###
-
-Package Management Cleanup - no changes to source code!
-
-* renaming package to "urijs", was "URIjs" (because npm decided to go lower-case at some point and maintaining capitals in your package name poses all sorts of stupid issues)
-* removing [jam](http://jamjs.org/), [spm](http://spmjs.org/), `component.json` and `URI.jquery.json` as nobody cared that URI.js was stuck on 1.14 for a year
-
-### 1.16.0 (July 24th 2015) ###
-
-* **SECURITY** fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) to rewrite `\` to `/` as Node and Browsers do - [Issue #233](https://github.com/medialize/URI.js/pull/233)
-* fixing [`.host()`](http://medialize.github.io/URI.js/docs.html#accessors-host) and [`.authority()`](http://medialize.github.io/URI.js/docs.html#accessors-authority) to raise an error if they contain a path segment (extending [Issue #233](https://github.com/medialize/URI.js/pull/233))
-
-### 1.15.2 (July 2nd 2015) ###
-
-* fixing [`URI.parseQuery()`](http://medialize.github.io/URI.js/docs.html#static-parseQuery) to accept `?foo&foo=bar` - [Issue #220](https://github.com/medialize/URI.js/issues/220)
-* fixing [`.segmentCoded()`](http://medialize.github.io/URI.js/docs.html#accessors-segmentCoded) to encode (instead of decode) array input - [Issue #223](https://github.com/medialize/URI.js/issues/223)
-* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly resolve `/foo/..` to `/` - [Issue #224](https://github.com/medialize/URI.js/issues/224)
-* fixing [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) to resolve `/foo/` and `/foo/bar` to `./` instead of empty string - [Issue #226](https://github.com/medialize/URI.js/issues/226)
-* fixing `bower.json`'s `"main": "src/URI.js"` - [Issue #227](https://github.com/medialize/URI.js/issues/227)
-
-### 1.15.1 (April 5th 2015) ###
-
-* fixing `URI()` to match behavior of `new URI()` (caused by [#196](https://github.com/medialize/URI.js/issues/196)) - [Issue #205](https://github.com/medialize/URI.js/issues/205)
-* fixing [`URI.removeQuery()`](http://medialize.github.io/URI.js/docs.html#search-remove) to accept RegExp for name and value arguments - ([Issue #204](https://github.com/medialize/URI.js/issues/204), [peterwillis](https://github.com/peterwillis))
-
-### 1.15.0 (April 1st 2015 - no joke, promise!) ###
-
-* fixing `URI(undefined)` to throw TypeError - ([Issue #189](https://github.com/medialize/URI.js/issues/189), [Issue #196](https://github.com/medialize/URI.js/issues/196), [eakron](https://github.com/eakron)) - *tiny backward-compatibility-break*
-* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) - ([Issue #200](https://github.com/medialize/URI.js/issues/200), [giltayar](https://github.com/giltayar))
-* fixing [`.pathname()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname) to properly en/decode URN paths - ([Issue #201](https://github.com/medialize/URI.js/pull/201), [mlefoster](https://github.com/mlefoster))
-* fixing URI normalization to properly handle URN paths based on [RFC 2141](https://www.ietf.org/rfc/rfc2141.txt) syntax - ([Issue #201](https://github.com/medialize/URI.js/pull/201), [mlefoster](https://github.com/mlefoster))
- * fixing [`.normalize()`](http://medialize.github.io/URI.js/docs.html#normalize) and [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly normalize URN paths
- * adding `URI.encodeUrnPathSegment()`
- * adding `URI.decodeUrnPathSegment()`
- * adding `URI.decodeUrnPath()`
- * adding `URI.recodeUrnPath()`
-
-### 1.14.2 (February 25th 2015) ###
-
-* fixing inclusion of LICENSE in packages - ([Issue #174](https://github.com/medialize/URI.js/issues/174))
-* fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) to not interpret colon in path as IPv6 hostname - ([Issue #190](https://github.com/medialize/URI.js/issues/190))
-* adding meta data for [SPM](http://www.spmjs.io/) package manager - ([Issue #176](https://github.com/medialize/URI.js/issues/176))
-* adding license meta to `bower.json`
-
-### 1.14.1 (October 1st 2014) ###
-
-* fixing handling of String instances (not string primitives) - ([Issue #146](https://github.com/medialize/URI.js/issues/146))
-* fixing Firefox [`.watch()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch) interfering with `.parseQuery()` - ([Issue #169](https://github.com/medialize/URI.js/issues/169))
-* fixing [`addQuery()`](http://medialize.github.io/URI.js/docs.html#search-add) to not throw error on null value - ([Issue #171](https://github.com/medialize/URI.js/issues/171))
-
-### 1.14.0 (September 8th 2014) ###
-
-* adding Hungarian second level domains - ([Issue #159](https://github.com/medialize/URI.js/issues/159))
-* adding `<audio src="…">` and `<video src="…">` to supported DOM attributes - ([Issue #160](https://github.com/medialize/URI.js/issues/160)), ([Issue #161](https://github.com/medialize/URI.js/issues/161))
-* fixing `file://hostname/path` parsing - ([Issue #158](https://github.com/medialize/URI.js/issues/158))
-* fixing `.decodePathSegment()` to not throw malformed URI error - ([Issue #163](https://github.com/medialize/URI.js/issues/163))
-
-### 1.13.2 (May 29th 2014) ###
-
-* changes to package management manifests only
-
-### 1.13.1 (April 16th 2014) ###
-
-* fixing IPv6 normalization (bad variable name) - ([Issue #145](https://github.com/medialize/URI.js/issues/145))
-* adding grunt and jshint
-* changing code style to 2 spaces indentation, single quote strings
-* applying `'use strict';` everywhere
-* fixing jshint warnings
-
-### 1.13.0 (April 15th 2014) ###
-
-* fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) and [`URI.buildHost()`](http://medialize.github.io/URI.js/docs.html#static-buildHost) to properly parse and build the IPv6 examples given in [RFC2732 Format for Literal IPv6 Addresses in URL's](http://tools.ietf.org/html/rfc2732#section-2) - ([Issue #144](https://github.com/medialize/URI.js/issues/144))
-* adding performance improvements to SecondLevelDomain - ([PR #122](https://github.com/medialize/URI.js/pull/122), [gorhill](https://github.com/gorhill))
-
-### 1.12.1 (March 8th 2014) ###
-
-* fixing [`.encodeQuery()`](http://medialize.github.io/URI.js/docs.html#static-encodeQuery) and [`.decodeQuery()`](http://medialize.github.io/URI.js/docs.html#static-decodeQuery) to respect [`URI.escapeQuerySpace`](http://medialize.github.io/URI.js/docs.html#setting-escapeQuerySpace) - ([Issue #137](https://github.com/medialize/URI.js/issues/137))
-* fixing fragment plugins to return URI for simpler loading - ([Issue #139](https://github.com/medialize/URI.js/issues/139))
-
-### 1.12.0 (January 23rd 2014) ###
-
-* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to comply with [RFC3986 Reference Resolution Examples](http://tools.ietf.org/html/rfc3986#section-5.4) - ([Issue #113](https://github.com/medialize/URI.js/issues/113))
-* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to maintain leading parent references (`../`) for relative paths, while removing them for absolute paths - ([Issue #133](https://github.com/medialize/URI.js/issues/133))
-* fixing `URI.protocol_expression` to properly accept `.` in compliance with [RFC 3986 - Scheme](http://tools.ietf.org/html/rfc3986#section-3.1) - ([Issue #132](https://github.com/medialize/URI.js/issues/132))
-* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to not use backtracking prone regular expression `URI.find_uri_expression` anymore - ([Issue #131](https://github.com/medialize/URI.js/issues/131))
-* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to accept options `ignore` and `ignoreHtml` to allow better control over which detected URLs get handled - ([Issue #117](https://github.com/medialize/URI.js/issues/117))
-* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to accept option `start` to specify the RegExp used for finding the beginning of an URL (defaults to `/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi`) - ([Issue #115](https://github.com/medialize/URI.js/issues/115))
-
-### 1.11.2 (August 14th 2013) ###
-
-* fixing regression for Node.js introduced by `fixing unsafe eval by using UMD's root` - ([Issue #107](https://github.com/medialize/URI.js/issues/107))
-* fixing parser to accept malformed userinfo (non-encoded email address) - ([Issue #108](https://github.com/medialize/URI.js/issues/108))
-
-### 1.11.1 (August 13th 2013) ###
-
-* fixing inconsistent [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) results caused by inconsistent URI component handling - ([Issue #103](https://github.com/medialize/URI.js/issues/103))
-* fixing unsafe eval by using UMD's root - ([Issue #105](https://github.com/medialize/URI.js/issues/105))
-* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to allow appending an empty element - ([Issue #106](https://github.com/medialize/URI.js/issues/106))
-* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to collapse empty elements in array notation
-
-### 1.11.0 (August 6th 2013) ###
-
-* adding [`.segmentCoded()`](http://medialize.github.io/URI.js/docs.html#accessors-segmentCoded) to provide en/decoding interface to `.segment()` - ([Issue #79](https://github.com/medialize/URI.js/issues/79))
-* optimize [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) results - ([Issue #78](https://github.com/medialize/URI.js/issues/78), [Issue #95](https://github.com/medialize/URI.js/issues/95))
-* removing obsolete code fragments from `URI.parse()` and `relativeTo()` - ([Issue #100](https://github.com/medialize/URI.js/issues/100))
-* adding setting [`URI.escapeQuerySpace`](http://medialize.github.io/URI.js/docs.html#setting-escapeQuerySpace) to control if query string should escape spaces using `+` or `%20` - ([Issue #74](https://github.com/medialize/URI.js/issues/74))
-* updating [Punycode.js](https://github.com/bestiejs/punycode.js/) to version 1.2.3
-* fixing internal `strictEncodeURIComponent()` to work in Firefox 3.6 - ([Issue #91](https://github.com/medialize/URI.js/issues/91))
-* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly resolve `/.` and `/.//` to `/` - ([Issue #97](https://github.com/medialize/URI.js/issues/97))
-* fixing [`.path()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname) to return empty string if there is no path - ([Issue #82](https://github.com/medialize/URI.js/issues/82))
-* fixing crashing of `URI.decodeQuery()` on malformed input - now returns original undecoded data - ([Issue #87](https://github.com/medialize/URI.js/issues/87), [Issue #92](https://github.com/medialize/URI.js/issues/92))
-* fixing build tool - ([Issue #83](https://github.com/medialize/URI.js/issues/83))
-* fixing for-loop to make closure compiler happy - ([Issue #93](https://github.com/medialize/URI.js/issues/93))
-* adding [`URI.noConflict()`](http://medialize.github.io/URI.js/docs.html#static-noConflict) - ([Issue #84](https://github.com/medialize/URI.js/issue/84))
-* fixing whitespace in code - ([Issue #84](https://github.com/medialize/URI.js/issue/84))
-* fixing [`.readable()`](http://medialize.github.io/URI.js/docs.html#readable) to decode the hash value as well - ([Issue #90](https://github.com/medialize/URI.js/issue/90))
-* prevent `jquery.URI.js` from temporarily using `window.location` as the `href` of an empty attribute of a DOM element - ([Issue #94](https://github.com/medialize/URI.js/issues/94))
-* fixing internal `getType()` for IE8 with undefined value - ([Issue #96](https://github.com/medialize/URI.js/issues/96))
-* adding DOM elements to [URI constructor](http://medialize.github.io/URI.js/docs.html#constructor) - ([Issue #77](https://github.com/medialize/URI.js/issues/77)):
- * [`<a href="...">`](http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#the-a-element)
- * [`<blockquote cite="...">`](http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-blockquote-element)
- * [`<link href="...">`](http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#the-link-element)
- * [`<base href="...">`](http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#the-base-element)
- * [`<script src="...">`](http://www.w3.org/html/wg/drafts/html/master/scripting-1.html#script)
- * [`<form action="...">`](http://www.w3.org/html/wg/drafts/html/master/forms.html#the-form-element)
- * [`<input type="image" src="...">`](http://www.w3.org/html/wg/drafts/html/master/forms.html#the-input-element)
- * [`<img src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-img-element)
- * [`<area href="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-area-element)
- * [`<iframe src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-iframe-element)
- * [`<embed src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-embed-element)
- * [`<source src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-source-element)
- * [`<track src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-track-element)
-* optimize `jquery.URI.js` to use new DOM element infrastructure
-
-### 1.10.2 (April 15th 2013) ###
-
-* fixing [`relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) - ([Issue #75](https://github.com/medialize/URI.js/issues/75))
-* fixing [`normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to not prepend `./` to relative paths - ([Issue #76](https://github.com/medialize/URI.js/issues/76))
-
-### 1.10.1 (April 2nd 2013) ###
-
-* adding [`absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to properly resolve relative scheme - ([Issue #71](https://github.com/medialize/URI.js/issues/73))
-
-### 1.10.0 (March 16th 2013) ###
-
-* adding [`hasQuery()`](http://medialize.github.io/URI.js/docs.html#search-has) - ([Issue #71](https://github.com/medialize/URI.js/issues/71))
-* fixing URI property detection to return 'src' if none was detected (`jquery.URI.js`) - ([Issue #69](https://github.com/medialize/URI.js/issues/69))
-
-### 1.9.1 (February 12th 2013) ###
-
-* fixing IE9 compatibility with location import: `URI(location)`
-* fixing string character access for IE7 - ([Issue #67](https://github.com/medialize/URI.js/issues/67)), ([Issue #68](https://github.com/medialize/URI.js/issues/68))
-
-### 1.9.0 (February 11th 2013) ###
-
-* adding [`.setQuery()`](http://medialize.github.io/URI.js/docs.html#search-set) - ([Issue #64](https://github.com/medialize/URI.js/issues/64))
-* adding callback argument to [`.query()`](http://medialize.github.io/URI.js/docs.html#accessors-search)
-* adding jQuery 1.9.1 to the test suite
-
-### 1.8.3 (January 9th 2013) ###
-
-* fixing [UglifyJS2](https://github.com/mishoo/UglifyJS2) compression - ([Issue #60](https://github.com/medialize/URI.js/issues/60), [fidian](https://github.com/fidian))
-
-### 1.8.2 (December 27th 2012) ###
-
-* adding `.fragmentPrefix()` to configure prefix of fragmentURI and fragmentQuery extensions - ([Issue #55](https://github.com/medialize/URI.js/issues/55))
-* adding docs for [`.toString()`, `.valueOf()`](http://medialize.github.io/URI.js/docs.html#toString) and [`.href()`](http://medialize.github.io/URI.js/docs.html#href) - ([Issue #56](https://github.com/medialize/URI.js/issues/56))
-* fixing [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) for descendants - ([Issue #57](https://github.com/medialize/URI.js/issues/57))
-
-### 1.8.1 (November 15th 2012) ###
-
-* fixing build() to properly omit empty query and fragment ([Issue #53](https://github.com/medialize/URI.js/issues/53))
-
-### 1.8.0 (November 13th 2012) ###
-
-* adding [`.resource()`](http://medialize.github.io/URI.js/docs.html#accessors-resource) as compound of [path, query, fragment]
-* adding jQuery 1.8.x compatibility for jQuery.URI.js (remaining backwards compatibility!)
-* adding default ports for gopher, ws, wss
-* adding [`.duplicateQueryParameters()`](http://medialize.github.io/URI.js/docs.html#setting-duplicateQueryParameters) to control if `key=value` duplicates have to be preserved or reduced ([Issue #51](https://github.com/medialize/URI.js/issues/51))
-* updating [Punycode.js](https://github.com/bestiejs/punycode.js/) to version 1.1.1
-* improving AMD/Node using [UMD returnExports](https://github.com/umdjs/umd/blob/master/returnExports.js) - ([Issue #44](https://github.com/medialize/URI.js/issues/44), [Issue #47](https://github.com/medialize/URI.js/issues/47))
-* fixing `.addQuery("empty")` to properly add `?empty` - ([Issue #46](https://github.com/medialize/URI.js/issues/46))
-* fixing parsing of badly formatted userinfo `http://username:pass:word@hostname`
-* fixing parsing of Windows-Drive-Letter paths `file://C:/WINDOWS/foo.txt`
-* fixing `URI(location)` to properly parse the URL - ([Issue #52](https://github.com/medialize/URI.js/issues/52))
-* fixing type error for fragment abuse demos - ([Issue #50](https://github.com/medialize/URI.js/issues/50))
-* adding documentation for various [encode/decode functions](http://medialize.github.io/URI.js/docs.html#encoding-decoding)
-* adding some pointers on possible problems with URLs to [About URIs](http://medialize.github.io/URI.js/about-uris.html)
-* adding tests for fragment abuse and splitting tests into separate scopes
-* adding meta-data for [Jam](http://jamjs.org/) and [Bower](http://twitter.github.com/bower/)
-
-Note: QUnit seems to be having some difficulties on IE8. While the jQuery-plugin tests fail, the plugin itself works. We're still trying to figure out what's making QUnit "lose its config state".
-
-### 1.7.4 (October 21st 2012) ###
-
-* fixing parsing of `/wiki/Help:IPA` - ([Issue #49](https://github.com/medialize/URI.js/issues/49))
-
-### 1.7.3 (October 11th 2012) ###
-
-* fixing `strictEncodeURIComponent()` to properly encode `*` to `%2A`
-* fixing IE9's incorrect report of `img.href` being available - ([Issue #48](https://github.com/medialize/URI.js/issues/48))
-
-### 1.7.2 (August 28th 2012) ###
-
-* fixing SLD detection in [`.tld()`](http://medialize.github.io/URI.js/docs.html#accessors-tld) - `foot.se` would detect `t.se` - ([Issue #42](https://github.com/medialize/URI.js/issues/42))
-* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to comply with [RFC 3986 Section 5.2.2](http://tools.ietf.org/html/rfc3986#section-5.2.2) - ([Issue #41](https://github.com/medialize/URI.js/issues/41))
-* fixing `location` not being available in non-browser environments like node.js ([Issue #45](https://github.com/medialize/URI.js/issues/45) [grimen](https://github.com/grimen))
-
-### 1.7.1 (August 14th 2012) ###
-
-* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment)'s append operation - ([Issue #39](https://github.com/medialize/URI.js/issues/39))
-
-### 1.7.0 (August 11th 2012) ###
-
-* fixing URI() constructor passing of `base` - ([Issue #33](https://github.com/medialize/URI.js/issues/33) [LarryBattle](https://github.com/LarryBattle))
-* adding [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) accessor - ([Issue #34](https://github.com/medialize/URI.js/issues/34))
-* upgrading `URI.encode()` to strict URI encoding according to RFC3986
-* adding `URI.encodeReserved()` to exclude reserved characters (according to RFC3986) from being encoded
-* adding [URI Template (RFC 6570)](http://tools.ietf.org/html/rfc6570) support with [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html)
-
-### 1.6.3 (June 24th 2012) ###
-
-* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to join two relative paths properly - ([Issue #29](https://github.com/medialize/URI.js/issues/29))
-* adding [`.clone()`](http://medialize.github.io/URI.js/docs.html#clone) to copy an URI instance
-
-### 1.6.2 (June 23rd 2012) ###
-
-* [`.directory()`](http://medialize.github.io/URI.js/docs.html#accessors-directory) now returns empty string if there is no directory
-* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to join two relative paths properly - ([Issue #29](https://github.com/medialize/URI.js/issues/29))
-
-### 1.6.1 (May 19th 2012) ###
-
-* fixing TypeError on [`.domain()`](http://medialize.github.io/URI.js/docs.html#accessors-domain) with dot-less hostnames - ([Issue #27](https://github.com/medialize/URI.js/issues/27))
-
-### 1.6.0 (March 19th 2012) ###
-
-* adding [URN](http://tools.ietf.org/html/rfc3986#section-3) (`javascript:`, `mailto:`, ...) support
-* adding [`.scheme()`](http://medialize.github.io/URI.js/docs.html#accessors-protocol) as alias of [`.protocol()`](http://medialize.github.io/URI.js/docs.html#accessors-protocol)
-* adding [`.userinfo()`](http://medialize.github.io/URI.js/docs.html#accessors-userinfo) to comply with terminology of [RFC 3986](http://tools.ietf.org/html/rfc3986#section-3.2.1)
-* adding [jQuery Plugin](http://medialize.github.io/URI.js/jquery-uri-plugin.html) `src/jquery.URI.js`
-* fixing relative scheme URLs - ([Issue #19](https://github.com/medialize/URI.js/issues/19) [byroot](https://github.com/byroot))
-
-### 1.5.0 (February 19th 2012) ###
-
-* adding Second Level Domain (SLD) Support - ([Issue #17](https://github.com/medialize/URI.js/issues/17))
-
-### 1.4.3 (January 28th 2012) ###
-
-* fixing global scope leakage - ([Issue #15](https://github.com/medialize/URI.js/issues/15) [mark-rushakoff](https://github.com/mark-rushakoff))
-
-### 1.4.2 (January 25th 2012) ###
-
-* improving CommonJS compatibility - ([Issue #14](https://github.com/medialize/URI.js/issues/14) [FGRibreau](https://github.com/FGRibreau))
-
-### 1.4.1 (January 21st 2012) ###
-
-* adding CommonJS compatibility - ([Issue #11](https://github.com/medialize/URI.js/issues/11), [Evangenieur](https://github.com/Evangenieur))
-
-### 1.4.0 (January 12th 2012) ###
-
-* adding [`URI.iso8859()`](http://medialize.github.io/URI.js/docs.html#static-iso8859) and [`URI.unicode()`](http://medialize.github.io/URI.js/docs.html#static-unicode) to switch base charsets - ([Issue #10](https://github.com/medialize/URI.js/issues/10), [mortenn](https://github.com/))
-* adding [`.iso8859()`](http://medialize.github.io/URI.js/docs.html#iso8859) and [`.unicode()`](http://medialize.github.io/URI.js/docs.html#unicode) to convert an URI's escape encoding
-
-### 1.3.1 (January 3rd 2011) ###
-
-* updating Punycode.js to version 0.3.0
-* adding edge-case tests ("jim")
-* fixing edge-cases in .protocol(), .port(), .subdomain(), .domain(), .tld(), .filename()
-* fixing parsing of hostname in [`.hostname()`](http://medialize.github.io/URI.js/docs.html#accessors-hostname)
-
-### 1.3.0 (December 30th 2011) ###
-
-* adding [`.subdomain()`](http://medialize.github.io/URI.js/docs.html#accessors-subdomain) convenience accessor
-* improving internal deferred build handling
-* fixing thrown Error for `URI("http://example.org").query(true)` - ([Issue #6](https://github.com/medialize/URI.js/issues/6))
-* adding examples for extending URI.js for [fragment abuse](http://medialize.github.io/URI.js/docs.html#fragment-abuse), see src/URI.fragmentQuery.js and src/URI.fragmentURI.js - ([Issue #2](https://github.com/medialize/URI.js/issues/2))
-
-### 1.2.0 (December 29th 2011) ###
-
-* adding [`.equals()`](http://medialize.github.io/URI.js/docs.html#equals) for URL comparison
-* fixing encoding/decoding for [`.pathname()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname), [`.directory()`](http://medialize.github.io/URI.js/docs.html#accessors-directory), [`.filename()`](http://medialize.github.io/URI.js/docs.html#accessors-filename) and [`.suffix()`](http://medialize.github.io/URI.js/docs.html#accessors-suffix) according to [RFC 3986 3.3](http://tools.ietf.org/html/rfc3986#section-3.3)
-* fixing escape spaces in query strings with `+` according to [application/x-www-form-urlencoded](http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type)
-* fixing to allow [`URI.buildQuery()`](http://medialize.github.io/URI.js/docs.html#static-buildQuery) to build duplicate key=value combinations
-* fixing [`URI(string, string)`](http://medialize.github.io/URI.js/docs.html#constructor) constructor to conform with the [specification](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor)
-* adding [`.readable()`](http://medialize.github.io/URI.js/docs.html#readable) for humanly readable representation of encoded URIs
-* fixing bug where @ in pathname would be parsed as part of the authority
-
-### 1.1.0 (December 28th 2011) ###
-
-* adding [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString)
-* adding [`.normalizeProtocol()`](http://medialize.github.io/URI.js/docs.html#normalize-protocol) to lowercase protocols
-* fixing [`.normalizeHostname()`](http://medialize.github.io/URI.js/docs.html#normalize-host) to lowercase hostnames
-* fixing String.substr() to be replaced by String.substring() - ([Issue #1](https://github.com/medialize/URI.js/issues/1))
-* fixing parsing "?foo" to `{foo: null}` [Algorithm for collecting URL parameters](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters)
-* fixing building `{foo: null, bar: ""}` to "?foo&bar=" [Algorithm for serializing URL parameters](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization)
-* fixing RegExp escaping
-
-### 1.0.0 (December 27th 2011) ###
-
-* Initial URI.js
diff --git a/thirdparty/URI.js/Gruntfile.js b/thirdparty/URI.js/Gruntfile.js
deleted file mode 100644
index e896c6552..000000000
--- a/thirdparty/URI.js/Gruntfile.js
+++ /dev/null
@@ -1,22 +0,0 @@
-module.exports = function(grunt) {
- 'use strict';
-
- var jshintOptions = grunt.file.readJSON('.jshintrc');
- jshintOptions.reporter = require('jshint-stylish');
-
- grunt.initConfig({
- jshint: {
- options: jshintOptions,
- target: [
- 'Gruntfile.js',
- 'src/*.js',
- 'test/*.js',
- '!src/*.min.js',
- '!src/punycode.js'
- ]
- }
- });
-
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.registerTask('lint', 'jshint');
-};
diff --git a/thirdparty/URI.js/LICENSE.txt b/thirdparty/URI.js/LICENSE.txt
deleted file mode 100644
index c13824f47..000000000
--- a/thirdparty/URI.js/LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2011 Rodney Rehm
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/thirdparty/URI.js/README.md b/thirdparty/URI.js/README.md
deleted file mode 100644
index 106d3b725..000000000
--- a/thirdparty/URI.js/README.md
+++ /dev/null
@@ -1,244 +0,0 @@
-# URI.js #
-
-* [About](http://medialize.github.io/URI.js/)
-* [Understanding URIs](http://medialize.github.io/URI.js/about-uris.html)
-* [Documentation](http://medialize.github.io/URI.js/docs.html)
-* [jQuery URI Plugin](http://medialize.github.io/URI.js/jquery-uri-plugin.html)
-* [Author](http://rodneyrehm.de/en/)
-* [Changelog](./CHANGELOG.md)
-
----
-
-> **NOTE:** The npm package name changed to `urijs`
-
----
-
-I always want to shoot myself in the head when looking at code like the following:
-
-```javascript
-var url = "http://example.org/foo?bar=baz";
-var separator = url.indexOf('?') > -1 ? '&' : '?';
-
-url += separator + encodeURIComponent("foo") + "=" + encodeURIComponent("bar");
-```
-
-Things are looking up with [URL](https://developer.mozilla.org/en/docs/Web/API/URL) and the [URL spec](http://url.spec.whatwg.org/) but until we can safely rely on that API, have a look at URI.js for a clean and simple API for mutating URIs:
-
-```javascript
-var url = new URI("http://example.org/foo?bar=baz");
-url.addQuery("foo", "bar");
-```
-
-URI.js is here to help with that.
-
-
-## API Example ##
-
-```javascript
-// mutating URLs
-URI("http://example.org/foo.html?hello=world")
- .username("rodneyrehm")
- // -> http://rodneyrehm@example.org/foo.html?hello=world
- .username("")
- // -> http://example.org/foo.html?hello=world
- .directory("bar")
- // -> http://example.org/bar/foo.html?hello=world
- .suffix("xml")
- // -> http://example.org/bar/foo.xml?hello=world
- .query("")
- // -> http://example.org/bar/foo.xml
- .tld("com")
- // -> http://example.com/bar/foo.xml
- .query({ foo: "bar", hello: ["world", "mars"] });
- // -> http://example.com/bar/foo.xml?foo=bar&hello=world&hello=mars
-
-// cleaning things up
-URI("?&foo=bar&&foo=bar&foo=baz&")
- .normalizeQuery();
- // -> ?foo=bar&foo=baz
-
-// working with relative paths
-URI("/foo/bar/baz.html")
- .relativeTo("/foo/bar/world.html");
- // -> ./baz.html
-
-URI("/foo/bar/baz.html")
- .relativeTo("/foo/bar/sub/world.html")
- // -> ../baz.html
- .absoluteTo("/foo/bar/sub/world.html");
- // -> /foo/bar/baz.html
-
-// URI Templates
-URI.expand("/foo/{dir}/{file}", {
- dir: "bar",
- file: "world.html"
-});
-// -> /foo/bar/world.html
-```
-
-See the [About Page](http://medialize.github.io/URI.js/) and [API Docs](http://medialize.github.io/URI.js/docs.html) for more stuff.
-
-## Using URI.js ##
-
-URI.js (without plugins) has a gzipped weight of about 7KB - if you include all extensions you end up at about 13KB. So unless you *need* second level domain support and use URI templates, we suggest you don't include them in your build. If you don't need a full featured URI mangler, it may be worth looking into the much smaller parser-only alternatives [listed below](#alternatives).
-
-URI.js is available through [npm](https://www.npmjs.com/package/urijs), [bower](http://bower.io/search/?q=urijs), [bowercdn](http://bowercdn.net/package/urijs), [cdnjs](https://cdnjs.com/libraries/URI.js) and manually from the [build page](http://medialize.github.io/URI.js/build.html):
-
-```bash
-# using bower
-bower install uri.js
-
-# using npm
-npm install urijs
-```
-
-### Browser ###
-
-I guess you'll manage to use the [build tool](http://medialize.github.io/URI.js/build.html) or follow the [instructions below](#minify) to combine and minify the various files into URI.min.js - and I'm fairly certain you know how to `<script src=".../URI.min.js"></script>` that sucker, too.
-
-### Node.js and NPM ###
-
-Install with `npm install urijs` or add `"urijs"` to the dependencies in your `package.json`.
-
-```javascript
-// load URI.js
-var URI = require('urijs');
-// load an optional module (e.g. URITemplate)
-var URITemplate = require('urijs/src/URITemplate');
-
-URI("/foo/bar/baz.html")
- .relativeTo("/foo/bar/sub/world.html")
- // -> ../baz.html
-```
-
-### RequireJS ###
-
-Clone the URI.js repository or use a package manager to get URI.js into your project.
-
-```javascript
-require.config({
- paths: {
- urijs: 'where-you-put-uri.js/src'
- }
-});
-
-require(['urijs/URI'], function(URI) {
- console.log("URI.js and dependencies: ", URI("//amazon.co.uk").is('sld') ? 'loaded' : 'failed');
-});
-require(['urijs/URITemplate'], function(URITemplate) {
- console.log("URITemplate.js and dependencies: ", URITemplate._cache ? 'loaded' : 'failed');
-});
-```
-
-## Minify ##
-
-See the [build tool](http://medialize.github.io/URI.js/build.html) or use [Google Closure Compiler](http://closure-compiler.appspot.com/home):
-
-```
-// ==ClosureCompiler==
-// @compilation_level SIMPLE_OPTIMIZATIONS
-// @output_file_name URI.min.js
-// @code_url http://medialize.github.io/URI.js/src/IPv6.js
-// @code_url http://medialize.github.io/URI.js/src/punycode.js
-// @code_url http://medialize.github.io/URI.js/src/SecondLevelDomains.js
-// @code_url http://medialize.github.io/URI.js/src/URI.js
-// @code_url http://medialize.github.io/URI.js/src/URITemplate.js
-// ==/ClosureCompiler==
-```
-
-
-## Resources ##
-
-Documents specifying how URLs work:
-
-* [URL - Living Standard](http://url.spec.whatwg.org/)
-* [RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax](http://tools.ietf.org/html/rfc3986)
-* [RFC 3987 - Internationalized Resource Identifiers (IRI)](http://tools.ietf.org/html/rfc3987)
-* [RFC 2732 - Format for Literal IPv6 Addresses in URL's](http://tools.ietf.org/html/rfc2732)
-* [RFC 2368 - The `mailto:` URL Scheme](https://www.ietf.org/rfc/rfc2368.txt)
-* [RFC 2141 - URN Syntax](https://www.ietf.org/rfc/rfc2141.txt)
-* [IANA URN Namespace Registry](http://www.iana.org/assignments/urn-namespaces/urn-namespaces.xhtml)
-* [Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)](http://tools.ietf.org/html/rfc3492)
-* [application/x-www-form-urlencoded](http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type) (Query String Parameters) and [application/x-www-form-urlencoded encoding algorithm](http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#application/x-www-form-urlencoded-encoding-algorithm)
-* [What every web developer must know about URL encoding](http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding)
-
-Informal stuff
-
-* [Parsing URLs for Fun and Profit](http://tools.ietf.org/html/draft-abarth-url-01)
-* [Naming URL components](http://tantek.com/2011/238/b1/many-ways-slice-url-name-pieces)
-
-How other environments do things
-
-* [Java URI Class](http://docs.oracle.com/javase/7/docs/api/java/net/URI.html)
-* [Java Inet6Address Class](http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Inet6Address.html)
-* [Node.js URL API](http://nodejs.org/docs/latest/api/url.html)
-
-[Discussion on Hacker News](https://news.ycombinator.com/item?id=3398837)
-
-### Forks / Code-borrow ###
-
-* [node-dom-urls](https://github.com/passy/node-dom-urls) passy's partial implementation of the W3C URL Spec Draft for Node
-* [urlutils](https://github.com/cofounders/urlutils) cofounders' `window.URL` constructor for Node
-
-### Alternatives ###
-
-If you don't like URI.js, you may like one of the following libraries. (If yours is not listed, drop me a line…)
-
-#### Polyfill ####
-
-* [DOM-URL-Polyfill](https://github.com/arv/DOM-URL-Polyfill/) arv's polyfill of the [DOM URL spec](https://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#interface-urlutils) for browsers
-* [inexorabletash](https://github.com/inexorabletash/polyfill/#whatwg-url-api) inexorabletash's [WHATWG URL API](http://url.spec.whatwg.org/)
-
-#### URL Manipulation ####
-
-* [The simple <a> URL Mutation "Hack"](http://jsfiddle.net/rodneyrehm/KkGUJ/) ([jsPerf comparison](http://jsperf.com/idl-attributes-vs-uri-js))
-* [URL.js](https://github.com/ericf/urljs)
-* [furl (Python)](https://github.com/gruns/furl)
-* [mediawiki Uri](https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki/mediawiki.Uri.js?view=markup) (needs mw and jQuery)
-* [jurlp](https://github.com/tombonner/jurlp)
-* [jsUri](https://github.com/derek-watson/jsUri)
-
-#### URL Parsers ####
-
-* [The simple <a> URL Mutation "Hack"](http://jsfiddle.net/rodneyrehm/KkGUJ/) ([jsPerf comparison](http://jsperf.com/idl-attributes-vs-uri-js))
-* [URI Parser](http://blog.stevenlevithan.com/archives/parseuri)
-* [jQuery-URL-Parser](https://github.com/allmarkedup/jQuery-URL-Parser)
-* [Google Closure Uri](https://google.github.io/closure-library/api/class_goog_Uri.html)
-* [URI.js by Gary Court](https://github.com/garycourt/uri-js)
-
-#### URI Template ####
-
-* [uri-template](https://github.com/rezigned/uri-template.js) (supporting extraction as well) by Rezigne
-* [uri-templates](https://github.com/geraintluff/uri-templates) (supporting extraction as well) by Geraint Luff
-* [uri-templates](https://github.com/marc-portier/uri-templates) by Marc Portier
-* [uri-templates](https://github.com/geraintluff/uri-templates) by Geraint Luff (including reverse operation)
-* [URI Template JS](https://github.com/fxa/uritemplate-js) by Franz Antesberger
-* [Temple](https://github.com/brettstimmerman/temple) by Brett Stimmerman
-* ([jsperf comparison](http://jsperf.com/uri-templates/2))
-
-#### Various ####
-
-* [TLD.js](https://github.com/oncletom/tld.js) - second level domain names
-* [Public Suffix](http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1) - second level domain names
-* [uri-collection](https://github.com/scivey/uri-collection) - underscore based utility for working with many URIs
-
-## Authors ##
-
-* [Rodney Rehm](https://github.com/rodneyrehm)
-* [Various Contributors](https://github.com/medialize/URI.js/graphs/contributors)
-
-
-## Contains Code From ##
-
-* [punycode.js](http://mths.be/punycode) - Mathias Bynens
-* [IPv6.js](http://intermapper.com/support/tools/IPV6-Validator.aspx) - Rich Brown - (rewrite of the original)
-
-
-## License ##
-
-URI.js is published under the [MIT license](http://www.opensource.org/licenses/mit-license). Until version 1.13.2 URI.js was also published under the [GPL v3](http://opensource.org/licenses/GPL-3.0) license - but as this dual-licensing causes more questions than helps anyone, it was dropped with version 1.14.0.
-
-
-## Changelog ##
-
-moved to [Changelog](./CHANGELOG.md)
diff --git a/thirdparty/URI.js/about-uris.html b/thirdparty/URI.js/about-uris.html
deleted file mode 100644
index d22912db0..000000000
--- a/thirdparty/URI.js/about-uris.html
+++ /dev/null
@@ -1,189 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>URI.js - About URIs</title>
- <meta name="description" content="URI.js is a Javascript library for working with URLs." />
-
- <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
- <script src="prettify/prettify.js" type="text/javascript"></script>
- <script src="screen.js" type="text/javascript"></script>
- <link href="screen.css" rel="stylesheet" type="text/css" />
- <link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
- <script src="src/URI.min.js" type="text/javascript"></script>
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-8922143-3']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
-</head>
-<body>
- <a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
-
- <div id="container">
- <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
-
- <ul class="menu">
- <li><a href="/URI.js/">Intro</a></li>
- <li class="active"><a href="about-uris.html">Understanding URIs</a></li>
- <li><a href="docs.html">API-Documentation</a></li>
- <li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
- <li><a href="uri-template.html">URI Template</a></li>
- <li><a href="build.html">Build</a></li>
- <li><a href="http://rodneyrehm.de/en/">Author</a></li>
- </ul>
-
- <h2>Understanding URIs</h2>
-
- <p>
- Uniform Resource Identifiers (URI) can be one of two things, a Uniform Resource Locator (URL) or a Uniform Resource Name (URN).
- You likely deal with URLs most of the time. See RFC 3986 for a proper definition of the terms <a href="http://tools.ietf.org/html/rfc3986#section-1.1.3">URI, URL and URN</a>
- </p>
-
- <p>
- URNs <em>name</em> a resource.
- They are (supposed to) designate a globally unique, permanent identifier for that resource.
- For example, the URN <code>urn:isbn:0201896834</code> uniquely identifies Volume 1 of Donald Knuth's <em>The Art of Computer Porgramming</em>.
- Even if that book goes out of print, that URN will continue to identify that particular book in that particular printing.
- While the term &quot;URN&quot; <em>technically</em> refers to a specific URI scheme laid out by <a href="http://tools.ietf.org/html/rfc2141">RFC 2141</a>,
- the previously-mentioned RFC 3986 indicates that in common usage &quot;URN&quot; refers to any kind of URI that identifies a resource.
- </p>
-
- <p>
- URLs <em>locate</em> a resource.
- They designate a protocol to use when looking up the resource and provide an &quot;address&quot; for finding the resource within that scheme.
- For example, the URL <code><a href="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</a></code> tells the consumer (most likely a web browser)
- to use the HTTP protocol to access whatever site is found at the <code>/html/rfc3986</code> path of <code>tools.ietf.org</code>.
- URLs are not permanent; it is possible that in the future that the IETF will move to a different domain or even that some other organization will acquire the rights to <code>tools.ietf.org</code>.
- It is also possible that multiple URLs may locate the same resource;
- for example, an admin at the IETF might be able to access the document found at the example URL via the <code>ftp://</code> protocol.
- </p>
-
- <h2>URLs and URNs in URI.js</h2>
-
- <p>
- The distinction between URLs and URNs is one of <strong>semantics</strong>.
- In principle, it is impossible to tell, on a purely syntactical level, whether a given URI is a URN or a URL without knowing more about its scheme.
- Practically speaking, however, URIs that look like HTTP URLs (scheme is followed by a colon and two slashes, URI has an authority component, and paths are delimited by slashes) tend to be URLs,
- and URIs that look like RFC 2141 URNs (scheme is followed by a colon, no authority component, and paths are delimited by colons) tend to be URNs (in the broad sense of &quot;URIs that name&quot;).
- </p>
-
- <p>
- So, for the purposes of URI.js, the distinction between URLs and URNs is treated as one of <strong>syntax</strong>.
- The main functional differences between the two are that (1) URNs will not have an authority element and
- (2) when breaking the path of the URI into segments, the colon will be used as the delimiter rather than the slash.
- The most surprising result of this is that <code>mailto:</code> URLs will be considered by URI.js to be URNs rather than URLs.
- That said, the functional differences will not adversely impact the handling of those URLs.
- </p>
-
- <h2 id="components">Components of an URI</h2>
- <p><a href="http://tools.ietf.org/html/rfc3986#section-3">RFC 3986 Section 3</a> visualizes the structure of <abbr title="Uniform Resource Indicator">URI</abbr>s as follows:</p>
- <pre class="ascii-art">
-URL: foo://example.com:8042/over/there?name=ferret#nose
-<span class="line"> \_/ \______________/\_________/ \_________/ \__/
- | | | | |
-</span><span class="label"> scheme authority path query fragment
-</span><span class="line"> | _____________________|__
- / \ / \
-</span>URN: urn:example:animal:ferret:nose</pre>
-
- <h3 id="components-url">Components of an <abbr title="Uniform Resource Locator">URL</abbr> in URI.js</h3>
-
- <pre class="ascii-art">
- <a href="docs.html#accessors-origin">origin</a>
-<span class="line"> __________|__________
- / \
-</span> <a href="docs.html#accessors-authority">authority</a>
-<span class="line"> | __________|_________
- | / \
-</span> <a href="docs.html#accessors-userinfo">userinfo</a> <a href="docs.html#accessors-host">host</a> <a href="docs.html#accessors-resource">resource</a>
-<span class="line"> | __|___ ___|___ __________|___________
- | / \ / \ / \
-</span> <a href="docs.html#accessors-username">username</a> <a href="docs.html#accessors-password">password</a> <a href="docs.html#accessors-hostname">hostname</a> <a href="docs.html#accessors-port">port</a> <a href="docs.html#accessors-pathname">path</a> &amp; <a href="docs.html#accessors-segment">segment</a> <a href="docs.html#accessors-search">query</a> <a href="docs.html#accessors-hash">fragment</a>
-<span class="line"> | __|___ __|__ ______|______ | __________|_________ ____|____ |
- | / \ / \ / \ / \ / \ / \ / \
-</span> foo://username:password@www.example.com:123/hello/world/there.html?name=ferret#foo
-<span class="line"> \_/ \ / \ \ / \__________/ \ \__/
- | | \ | | \ |
-</span> <a href="docs.html#accessors-protocol">scheme</a> <a href="docs.html#accessors-subdomain">subdomain</a> <span class="line">\</span> <a href="docs.html#accessors-tld">tld</a> <a href="docs.html#accessors-directory">directory</a> <span class="line">\</span> <a href="docs.html#accessors-suffix">suffix</a>
-<span class="line"> \____/ \___/
- | |
-</span> <a href="docs.html#accessors-domain">domain</a> <a href="docs.html#accessors-filename">filename</a>
-
-</pre>
-
- <p>
- In Javascript the <em>query</em> is often referred to as the <em>search</em>.
- URI.js provides both accessors with the subtle difference of <a href="docs.html#accessors-search">.search()</a> beginning with the <code>?</code>-character
- and <a href="docs.html#accessors-search">.query()</a> not.
- </p>
- <p>
- In Javascript the <em>fragment</em> is often referred to as the <em>hash</em>.
- URI.js provides both accessors with the subtle difference of <a href="docs.html#accessors-hash">.hash()</a> beginning with the <code>#</code>-character
- and <a href="docs.html#accessors-hash">.fragment()</a> not.
- </p>
-
- <h3 id="components-urn">Components of an <abbr title="Uniform Resource Name">URN</abbr> in URI.js</h3>
-
- <pre class="ascii-art">
- urn:example:animal:ferret:nose?name=ferret#foo
-<span class="line"> \ / \________________________/ \_________/ \ /
- | | | |
-</span> <a href="docs.html#accessors-protocol">scheme</a> <a href="docs.html#accessors-pathname">path</a> &amp; <a href="docs.html#accessors-segment">segment</a> <a href="docs.html#accessors-search">query</a> <a href="docs.html#accessors-hash">fragment</a>
- </pre>
-
- <p>While <a href="http://tools.ietf.org/html/rfc2141">RFC 2141</a> does not define URNs having a query or fragment component, URI.js enables these accessors for convenience.</p>
-
- <h2 id="problems">URLs - Man Made Problems</h2>
-
- <p>URLs (URIs, whatever) aren't easy. There are a couple of issues that make this simple text representation of a resource a real pain</p>
- <ul>
- <li>Look simple but have tricky encoding issues</li>
- <li>Domains aren't part of the specification</li>
- <li>Query String Format isn't part of the specification</li>
- <li>Environments (PHP, JS, Ruby, …) handle Query Strings quite differently</li>
- </ul>
-
- <h3 id="problems-encoding">Parsing (seemingly) invalid URLs</h3>
- <p>Because URLs look very simple, most people haven't read the formal specification. As a result, most people get URLs wrong on many different levels. The one thing most everybody screws up is proper encoding/escaping.</p>
- <p><code>http://username:pass:word@example.org/</code> is such a case. Often times homebrew URL handling misses escaping the less frequently used parts such as the userinfo.</p>
- <p><code>http://example.org/@foo</code> that "@" doesn't have to be escaped according to RFC3986. Homebrew URL handlers often just treat everything between "://" and "@" as the userinfo.</p>
- <p><code>some/path/:foo</code> is a valid relative path (as URIs don't have to contain scheme and authority). Since homebrew URL handlers usually just look for the first occurence of ":" to delimit the scheme, they'll screw this up as well.</p>
- <p><code>+</code> is the proper escape-sequence for a space-character within the query string component, while every other component prefers <code>%20</code>. This is due to the fact that the actual format used within the query string component is not defined in RFC 3986, but in the HTML spec.</p>
- <p>There is encoding and strict encoding - and Javascript won't get them right: <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent#Description">encodeURIComponent()</a></p>
-
- <h3 id="problems-tld">Top Level Domains</h3>
- <p>The hostname component can be one of may things. An IPv4 or IPv6 address, an IDN or Punycode domain name, or a regular domain name. While the format (and meaning) of IPv4 and IPv6 addresses is defined in RFC 3986, the meaning of domain names is not.</p>
- <p>DNS is the base of translating domain names to IP addresses. DNS itself only specifies syntax, not semantics. The missing semantics is what's driving us crazy here.</p>
- <p>ICANN provides a <a href="http://www.iana.org/domains/root/db/">list of registered Top Level Domains</a> (TLD). There are country code TLDs (ccTLDs, assigned to each country, like ".uk" for United Kindom) and generic TLDs (gTLDs, like ".xxx" for you know what). Also note that a TLD may be non-ASCII <code>.香港</code> (IDN version of HK, Hong Kong).</p>
- <p>IDN TLDs such as <code>.香港</code> and the fact that any possible new TLD could pop up next month has lead to a lot of URL/Domain verification tools to fail.</p>
-
- <h3 id="problems-sld">Second Level Domains</h3>
- <p>To make Things worse, people thought it to be a good idea to introduce Second Level Domains (SLD, ".co.uk" - the commercial namespace of United Kingdom). These SLDs are not up to ICANN to define, they're handled individually by each NIC (Network Information Center, the orgianisation responsible for a specific TLD).</p>
- <p>Since there is no central oversight, things got really messy in this particular space. Germany doesn't do SDLs, Australia does. Australia has different SLDs than the United Kingdom (".csiro.au" but no ".csiro.uk"). The individual NICs are not required to publish their arbitrarily chosen SLDs in a defined syntax anywhere.</p>
- <p>You can scour each NIC's website to find some hints at their SLDs. You can look them up on Wikipedia and hope they're right. Or you can use <a href="http://publicsuffix.org/">PublicSuffix</a>.</p>
- <p>Speaking of PublicSuffix, it's time mentioning that browser vendors actually keep a list of known Second Level Domains. They need to know those for security issues. Remember cookies? They can be read and set on a domain level. What do you think would happen if "co.uk" was treated as the domain? <code>amazon.co.uk</code> would be able to read the cookies of <code>google.co.uk</code>. PublicSuffix also contains custom SLDs, such as <code>.dyndns.org</code>. While this makes perfect sense for browser security, it's not what we need for basic URL handling.</p>
- <p>TL;DR: It's a mess.</p>
-
- <h3 id="problems-querystring">The Query String</h3>
- <p>PHP (<a href="http://php.net/manual/en/function.parse-str.php">parse_str()</a>) will automatically parse the query string and populate the superglobal <code>$_GET</code> for you. <code>?foo=1&amp;foo=2</code> becomes <code>$_GET = array('foo' => 2);</code>, while <code>?foo[]=1&amp;foo[]=2</code> becomes <code>$_GET = array('foo' => array("1", "2"));</code>.</p>
- <p>Ruby's <code>CGI.parse()</code> turns <code>?a=1&amp;a=2</code> into <code>{"a" : ["1", "2"]}</code>, while Ruby on Rails chose the PHP-way.</p>
- <p>Python's <a href="http://docs.python.org/2/library/urlparse.html#urlparse.parse_qs">parse_qs()</a> doesn't care for <code>[]</code> either.
- <p>Most other languages don't follow the <code>[]</code>-style array-notation and deal with this mess differently.</p>
- <p>TL;DR: You need to know the target-environment, to know how complex query string data has to be encoded</p>
-
- <h3 id="problems-fragment">The Fragment</h3>
- <p>Given the URL <code>http://example.org/index.html#foobar</code>, browsers only request <code>http://example.org/index.html</code>, the fragment <code>#foobar</code> is a client-side thing.</p>
-
- </div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/bower.json b/thirdparty/URI.js/bower.json
deleted file mode 100644
index b3a554d6b..000000000
--- a/thirdparty/URI.js/bower.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "urijs",
- "version": "1.18.2",
- "main": "src/URI.js",
- "ignore": [
- ".*",
- "*.css",
- "/*.js",
- "/*.html",
- "/*.json",
- "utils",
- "test",
- "prettify"
- ],
- "license": "MIT"
-}
diff --git a/thirdparty/URI.js/build.html b/thirdparty/URI.js/build.html
deleted file mode 100644
index e36b47a65..000000000
--- a/thirdparty/URI.js/build.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>URI.js - Custom Build</title>
- <meta name="description" content="URI.js is a Javascript library for working with URLs." />
-
- <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
- <script src="screen.js" type="text/javascript"></script>
- <script src="build.js" type="text/javascript"></script>
- <link href="screen.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-
- <a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
-
- <div id="container">
- <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
-
- <ul class="menu">
- <li><a href="/URI.js/">Intro</a></li>
- <li><a href="about-uris.html">Understanding URIs</a></li>
- <li><a href="docs.html">API-Documentation</a></li>
- <li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
- <li><a href="uri-template.html">URI Template</a></li>
- <li class="active"><a href="build.html">Build</a></li>
- <li><a href="http://rodneyrehm.de/en/">Author</a></li>
- </ul>
-
- <h2>Building URI.js</h2>
- <p>
- <strong>Warning:</strong> The output of this "build tool" is not compatible
- with module loaders (like RequireJS), because it only concatenates and minifies files.
- Only use this if you plan on loading the file by way of <code>&lt;script&gt;</code> element.
- </p>
- <p>Choose the Modules you want to include in your custom build of URI.js:</p>
- <form id="builder">
- <ul>
- <li><label><input type="checkbox" value="IPv6.js" checked> IPv6.js - Support for IPv6 Addresses</label></li>
- <li><label><input type="checkbox" value="punycode.js" checked> punycode.js - Support for IDN Addresses</label></li>
- <li><label><input type="checkbox" value="SecondLevelDomains.js" checked> SecondLevelDomains.js - Support for resolving SLDs</label></li>
- <li><label><input type="checkbox" value="URI.js" checked readonly disabled> URI.js - Base URI.js</label></li>
- <li><label><input type="checkbox" value="URITemplate.js" checked> URITemplate.js - Support for <a href="uri-template.html">URI Templates</a></label></li>
- <li><label><input type="checkbox" value="jquery.URI.js" checked> jquery.URI.js - <a href="jquery-uri-plugin.html">jQuery Plugin</a></label></li>
- </ul>
- <p>Optional "Fragment Abuse" plugins:</p>
- <ul>
- <li><label><input type="radio" name="fragments" value="" checked> No Fragment abuse</label></li>
- <li><label><input type="radio" name="fragments" value="URI.fragmentQuery.js"> URI.fragmentQuery.js - support for <a href="docs.html#fragment-abuse-query">Query String Fragments</a></label></li>
- <li><label><input type="radio" name="fragments" value="URI.fragmentURI.js"> URI.fragmentURI.js - support for <a href="docs.html#fragment-abuse-uri">URI Fragments</a></label></li>
- </ul>
- <input type="submit" value="Build!">
- <progress id="prog" value="0" max="3" style="display:none"></progress>
- <div style="display:none;">
- <h2>Custom Built URI.js</h2>
- <p class="download"> your custom built <code>URI.js</code> or copy the following code:</p>
- <textarea id="output" cols="50" rows="5" style="width: 100%; height: 200px;"></textarea>
- </div>
-
- <hr>
-
- <p>
- This "build tool" does nothing but downloading the selected files, concatenating them and pushing them through <a href="http://closure-compiler.appspot.com/home">Closure Compiler</a>.
- Since Closure Compiler is running on a different domain, this trick will only work on modern browsers.
- I'm sorry for the ~2% of you IE users. You'll have to do this <a href="https://github.com/medialize/URI.js#minify">manually</a>.
- </p>
- </form>
- </div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/build.js b/thirdparty/URI.js/build.js
deleted file mode 100644
index 21d0bb531..000000000
--- a/thirdparty/URI.js/build.js
+++ /dev/null
@@ -1,78 +0,0 @@
-(function($, undefined){
- window.URL = window.webkitURL || window.URL;
- window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
-
-function build(files) {
- var $out = $('#output'),
- $progress = $('#prog'),
- sources = [],
- connections = [],
- source;
-
- $out.parent().hide();
- $progress.show().prop('value', 1).text('Loading Files');
-
- for (var i = 0, length = files.length; i < length; i++) {
- sources.push("");
- (function(i, file){
- connections.push($.get("src/" + file, function(data) {
- sources[i] = data;
- }, "text"));
- })(i, files[i]);
- }
-
- $.when.apply($, connections).done(function() {
- $progress.prop('value', 2).text('Compiling Scripts');
- $.post('https://closure-compiler.appspot.com/compile', {
- js_code: sources.join("\n\n"),
- compilation_level: "SIMPLE_OPTIMIZATIONS",
- output_format: "text",
- output_info: "compiled_code"
- }, function(data) {
- var code = "/*! URI.js v1.18.2 http://medialize.github.io/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data;
- $progress.hide();
- $out.val(code).parent().show();
- $out.prev().find('a').remove();
- $out.prev().prepend(download(code));
- }).error(function() {
- alert("Your browser is incapable of cross-domain communication.\nPlease see instructions for manual build below.");
- });
- });
-};
-
-function download(code) {
- var blob = new Blob([code], {type: 'text\/javascript'});
-
- var a = document.createElement('a');
- a.download = 'URI.js';
- a.href = window.URL.createObjectURL(blob);
- a.textContent = 'Download';
- a.dataset.downloadurl = ['text/javascript', a.download, a.href].join(':');
-
- return a;
-};
-
-$(function(){
- $('#builder').on('submit', function(e) {
- var $this = $(this),
- $files = $this.find('input:checked'),
- files = [];
-
- e.preventDefault();
- e.stopImmediatePropagation();
-
- if (!$files.length) {
- alert("please choose at least one file!");
- return;
- }
-
- $files.each(function() {
- var val = $(this).val();
- val.length && files.push(val);
- });
-
- build(files);
- });
-});
-
-})(jQuery);
diff --git a/thirdparty/URI.js/contributing.md b/thirdparty/URI.js/contributing.md
deleted file mode 100644
index dc66b342a..000000000
--- a/thirdparty/URI.js/contributing.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Contributing to URI.js #
-
-URI.js Project License: MIT License
-
-* You will only Submit Contributions where You have authored 100% of the content.
-* You will only Submit Contributions to which You have the necessary rights. This means that if You are employed You have received the necessary permissions from Your employer to make the Contributions.
-* Whatever content You Contribute will be provided under the project License.
-
----
-
-Thanks for your help!
-
-Pull Requests go into the branch **master**. The *gh-pages* branch is a presentation of the *master* branch at the last given release.
-
-Whenever you change code, make sure you run the test suite before sending a pull request. Please add tests for any features you add to the code base. We're using [QUnit](http://qunitjs.com/) for testing.
-
-We're looking forward to splitting URI.js in several files, each dealing with a specific domain, to make the 1800 lines of code more bearable to work with. This will lead to using [Grunt](http://gruntjs.com/) to build a distributable version (and the removal of `build.html`). We're not sure when we'll get to this. If you want to pitch in, just holler!
-
-
diff --git a/thirdparty/URI.js/docs.html b/thirdparty/URI.js/docs.html
deleted file mode 100644
index 31d58ed5d..000000000
--- a/thirdparty/URI.js/docs.html
+++ /dev/null
@@ -1,1399 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>URI.js - API Documentation</title>
- <meta name="description" content="URI.js is a Javascript library for working with URLs." />
-
- <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
- <script src="prettify/prettify.js" type="text/javascript"></script>
- <script src="screen.js" type="text/javascript"></script>
- <link href="screen.css" rel="stylesheet" type="text/css" />
- <link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
- <script src="src/URI.min.js" type="text/javascript"></script>
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-8922143-3']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
-</head>
-<body>
- <a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
- <div id="container">
- <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
-
- <ul class="menu">
- <li><a href="/URI.js/">Intro</a></li>
- <li><a href="/URI.js/about-uris.html">Understanding URIs</a></li>
- <li class="active"><a href="docs.html">API-Documentation</a></li>
- <li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
- <li><a href="uri-template.html">URI Template</a></li>
- <li><a href="build.html">Build</a></li>
- <li><a href="http://rodneyrehm.de/en/">Author</a></li>
- </ul>
-
- <ul class="toc">
- <li>
- <a href="#constructor">Constructing an URI</a>
- <ul>
- <li><a href="#clone">cloning an URI instance</a></li>
- <li><a href="#href">href()</a></li>
- <li><a href="#toString">toString(), valueOf()</a></li>
- </ul>
- </li>
- <li>
- Working with URI parts
- <ul>
- <li><a href="#accessors-protocol">protocol(), scheme()</a></li>
- <li><a href="#accessors-username">username()</a></li>
- <li><a href="#accessors-password">password()</a></li>
- <li><a href="#accessors-hostname">hostname()</a></li>
- <li><a href="#accessors-port">port()</a></li>
- <li><a href="#accessors-host">host()</a></li>
- <li><a href="#accessors-userinfo">userinfo()</a></li>
- <li><a href="#accessors-authority">authority()</a></li>
- <li><a href="#accessors-origin">origin()</a></li>
- <li><a href="#accessors-subdomain">subdomain()</a></li>
- <li><a href="#accessors-domain">domain()</a></li>
- <li><a href="#accessors-tld">tld()</a></li>
-
- <li><a href="#accessors-pathname">pathname(), path()</a></li>
- <li><a href="#accessors-directory">directory()</a></li>
- <li><a href="#accessors-filename">filename()</a></li>
- <li><a href="#accessors-suffix">suffix()</a></li>
- <li><a href="#accessors-segment">segment()</a></li>
- <li><a href="#accessors-segmentCoded">segmentCoded()</a></li>
-
- <li><a href="#accessors-search">search(), query()</a></li>
- <li><a href="#accessors-hash">hash(), fragment()</a></li>
- <li><a href="#accessors-resource">resource()</a></li>
- <li><a href="#is">determine URL types</a></li>
- </ul>
- </li>
- <li>
- Working with the query string
- <ul>
- <li><a href="#accessors-search">search(), query()</a></li>
- <li><a href="#search-set">setSearch(), setQuery()</a></li>
- <li><a href="#search-add">addSearch(), addQuery()</a></li>
- <li><a href="#search-remove">removeSearch(), removeQuery()</a></li>
- <li><a href="#search-has">hasSearch(), hasQuery()</a></li>
- </ul>
- </li>
- <li>
- <a href="#fragment-abuse">Working with the Fragment (Hash)</a>
- <ul>
- <li><a href="#fragment-abuse-query">Data in Fragments (Hash)</a></li>
- <li><a href="#fragment-abuse-uri">URLs in Fragments (Hash)</a></li>
- </ul>
- </li>
- <li>
- Normalizing URLs
- <ul>
- <li><a href="#normalize">normalize()</a></li>
- <li><a href="#normalize-protocol">normalizeProtocol()</a></li>
- <li><a href="#normalize-host">normalizeHostname()</a></li>
- <li><a href="#normalize-port">normalizePort()</a></li>
- <li><a href="#normalize-path">normalizePathname(), normalizePath()</a></li>
- <li><a href="#normalize-search">normalizeSearch(), normalizeQuery()</a></li>
- <li><a href="#normalize-hash">normalizeHash(), normalizeFragment()</a></li>
- </ul>
- </li>
- <li>
- Charsets / Encodings
- <ul>
- <li><a href="#iso8859">iso8859()</a></li>
- <li><a href="#unicode">unicode()</a></li>
- </ul>
- </li>
- <li><a href="#readable">readable()</a></li>
- <li>
- Relative and Absolute URLs
- <ul>
- <li><a href="#relativeto">relativeTo()</a></li>
- <li><a href="#absoluteto">absoluteTo()</a></li>
- <li><a href="#static-joinPaths">URI.URI.joinPaths()</a></li>
- </ul>
- </li>
- <li>
- Comparing URLs
- <ul>
- <li><a href="#equals">equals()</a></li>
- </ul>
- </li>
- <li>
- Parsing URLs
- <ul>
- <li><a href="#static-parse">URI.parse()</a></li>
- <li><a href="#static-parseAuthority">URI.parseAuthority()</a></li>
- <li><a href="#static-parseUserinfo">URI.parseUserinfo()</a></li>
- <li><a href="#static-parseHost">URI.parseHost()</a></li>
- <li><a href="#static-parseQuery">URI.parseQuery()</a></li>
- </ul>
- </li>
- <li>
- Serializing URLs
- <ul>
- <li><a href="#static-build">URI.build()</a></li>
- <li><a href="#static-buildAuthority">URI.buildAuthority()</a></li>
- <li><a href="#static-buildUserinfo">URI.buildUserinfo()</a></li>
- <li><a href="#static-buildHost">URI.buildHost()</a></li>
- <li><a href="#static-buildQuery">URI.buildQuery()</a></li>
- </ul>
- </li>
- <li>
- Encoding and Decoding URLs
- <ul>
- <li><a href="#static-encode">URI.encode()</a></li>
- <li><a href="#static-decode">URI.decode()</a></li>
-
- <li><a href="#static-encodeReserved">URI.encodeReserved()</a></li>
-
- <li><a href="#static-encodeQuery">URI.encodeQuery()</a></li>
- <li><a href="#static-decodeQuery">URI.decodeQuery()</a></li>
- </ul>
- </li>
- <li>
- Static Helper Functions
- <ul>
- <li><a href="#static-noConflict">URI.noConflict()</a></li>
-
- <li><a href="#static-addQuery">URI.addQuery()</a></li>
- <li><a href="#static-removeQuery">URI.removeQuery()</a></li>
- <li><a href="#static-commonPath">URI.commonPath()</a></li>
-
- <li><a href="#static-joinPaths">URI.joinPath()</a></li>
-
- <li><a href="#static-withinString">URI.withinString()</a></li>
-
- <li><a href="#static-iso8859">URI.iso8859()</a></li>
- <li><a href="#static-unicode">URI.unicode()</a></li>
-
- <li><a href="#static-expand">URI.expand()</a></li>
- </ul>
- </li>
- </ul>
-
- <h2 id="api-methods">URI.js API</h2>
-
- <h3 id="constructor">URI Constructor</h3>
- <pre class="prettyprint lang-js">var uri = new URI(); // same as new URI(location.href)
-// string
-var uri = new URI("http://example.org");
-
-// URI object for cloning
-var uri = new URI(new URI("http://example.org"));
-
-// URI parts object
-var uri = new URI({
- protocol: "http",
- hostname: "example.org"
-});
-
-// without new keyword
-var uri = URI("http://example.org");
-
-// resolving right in the constructor
-var uri = URI("../foobar.html", "http://example.org/hello/world.html");
-// which is exactly the same as
-URI("../foobar.html").absoluteTo("http://example.org/hello/world.html");
-// but specified in <a href="http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor">URL constructor</a></pre>
-
- <p>The following parts can be specified in an object:</p>
- <pre class="prettyprint lang-js">var uri = new URI({
- protocol: "http", // no trailing :
- username: "user",
- password: "pass",
- hostname: "example.org",
- port: "80", // string, please
- // "path", not "pathname", sorry
- path: "/foo/bar.html",
- // "query", not "search", sorry
- query: "foo=bar&amp;bar=baz", // no leading ?
- // "fragment", not "hash", sorry
- fragment: "frag" // no leading #
-});</pre>
-
- <p>using only components of URIs:</p>
- <pre class="prettyprint lang-js">// Look ma! I'm only working the pathname
-var uri = new URI("some/directory/file.html");
-
-// Look ma! I'm only working the query string
-var uri = new URI("?foo=bar");
-
-// Look ma! I'm only working the fragment / hash
-var uri = new URI("#call-me-hash");
-
-// and any combination of the above…</pre>
-
- <p>using DOM elements:</p>
- <pre class="prettyprint lang-js">var element = document.createElement('a');
-element.href = 'http://example.org';
-var uri = new URI(element);
-// uri.domain() === 'example.org';</pre>
-<pre class="prettyprint lang-html">The following DOM elements can be parsed:
-
-&lt;a href=&quot;...&quot;&gt;
-&lt;blockquote cite=&quot;...&quot;&gt;
-&lt;link href=&quot;...&quot;&gt;
-&lt;base href=&quot;...&quot;&gt;
-&lt;script src=&quot;...&quot;&gt;
-&lt;form action=&quot;...&quot;&gt;
-&lt;input type=&quot;image&quot; src=&quot;...&quot;&gt;
-&lt;img src=&quot;...&quot;&gt;
-&lt;area href=&quot;...&quot;&gt;
-&lt;iframe src=&quot;...&quot;&gt;
-&lt;embed src=&quot;...&quot;&gt;
-&lt;source src=&quot;...&quot;&gt;
-&lt;track src=&quot;...&quot;&gt;
-
-
-any other element yields URI("")
-</pre>
-
- <h3 id="clone">cloning URIs</h3>
- <p>Get a copy of the current URI instance</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org");
-var uri2 = uri.clone();
-
-uri2.tld("com");
-uri == "http://example.org/";
-uri2 == "http://example.com/";</pre>
-
- <h3 id="href">href()</h3>
- <p>get and set the entire URI</p>
- <pre class="prettyprint lang-js">var uri = URI("http://example.com");
-uri.href() === "http://example.com/";
-
-uri.href("ftp://google.org");
-uri.toString() === "ftp://google.org/"</pre>
-
- <h3 id="toString">toString(), valueOf()</h3>
- <p>serialize the URI to string. <code>valueOf()</code> is an alias to <code>toString()</code>, as string is the base primitive.</p>
- <pre class="prettyprint lang-js">var uri = URI("http://example.com");
-var s = uri.toString();
-typeof s === "string";
-s === "http://example.com/";</pre>
-
-
- <h3 id="accessors-protocol">protocol(), scheme()</h3>
- <p>.scheme() is an alias of .protocol()</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get protocol
-uri.protocol(); // returns string "http"
-// set protocol
-uri.protocol("ftp"); // returns the URI instance for chaining
-
-// relative scheme
-uri.protocol("");
-uri.toString() === "//example.org/foo/hello.html";</pre>
- <p class="note">Throws a <code>TypeError</code> on illegal input, that is anything but <code>[a-z0-9.+-]</code> and <code>[empty string]</code> and <code>null</code></p>
-
- <h3 id="accessors-username">username()</h3>
- <pre class="prettyprint lang-js">var uri = new URI("http://user:pass@example.org/foo/hello.html");
-// get username
-uri.username(); // returns string "user"
-// set username
-uri.username("user"); // returns the URI instance for chaining</pre>
-
- <h3 id="accessors-password">password()</h3>
- <pre class="prettyprint lang-js">var uri = new URI("http://user:pass@example.org/foo/hello.html");
-// get password
-uri.password(); // returns string "pass"
-// set password
-uri.password("user"); // returns the URI instance for chaining</pre>
-
- <h3 id="accessors-hostname">hostname()</h3>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get hostname
-uri.hostname(); // returns string
-// set hostname
-uri.hostname("example.org"); // returns the URI instance for chaining</pre>
- <p class="note"><a href="#accessors-hostname">.hostname()</a> returns the actual hostname, whereas <a href="#accessors-host">.host()</a> returns the hostname including the port</p>
-
- <h3 id="accessors-port">port()</h3>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org:8080/foo/hello.html");
-// get port
-uri.port(); // returns string "8080"
-// set port
-uri.port("80"); // returns the URI instance for chaining</pre>
- <p class="note">although the port may be considered an integer, within URI it is a string.</p>
- <p class="note">Throws a <code>TypeError</code> on illegal input</p>
-
- <h3 id="accessors-host">host()</h3>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org:80/foo/hello.html");
-// get host
-uri.host(); // returns string "example.org:80"
-// set host
-uri.host("example.org:80"); // returns the URI instance for chaining</pre>
- <p class="note"><a href="#accessors-hostname">.hostname()</a> returns the actual hostname, whereas <a href="#accessors-host">.host()</a> returns the hostname including the port</p>
- <p class="note">Throws a <code>TypeError</code> if <code>path</code> is part of the input</p>
-
- <h3 id="accessors-userinfo">userinfo()</h3>
- <p>Userinfo is comprised of username and password</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://user:pass@example.org:88/foo/hello.html");
-// get userinfo
-uri.userinfo(); // returns string "user:pass"
-// set userinfo
-uri.userinfo("user:pass"); // returns the URI instance for chaining</pre>
-
- <h3 id="accessors-authority">authority()</h3>
- <p>Authority is comprised of username, password, hostname and port</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://user:pass@example.org:88/foo/hello.html");
-// get authority
-uri.authority(); // returns string "user:pass@example.org:88"
-// set authority
-uri.authority("user:pass@example.org:80"); // returns the URI instance for chaining</pre>
- <p class="note">.authority() will reset any of username, password and port if they're not specified.</p>
- <p class="note">Throws a <code>TypeError</code> if <code>path</code> is part of the input</p>
-
- <h3 id="accessors-origin">origin()</h3>
- <p>Origin is comprised of the scheme and authority.</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.com/foo.html?q=hello");
-// get origin
-uri.origin(); // returns string "http://example.com"
-// set origin
-uri.origin('https://other.org'); // returns URI instance for chaining
-
-// the URI will now have the string representation of:
-// "https://other.org/foo.html?q=hello"</pre>
- <p class="note">.origin() will reset the entire authority, including username, password and port if not specified in the new origin.</p>
- <p class="note">.origin() will be empty if there is no authority.</p>
- <p class="note">.origin() will be the same as .authority() (e.g. "example.org") if there is no scheme available.</p>
-
- <h3 id="accessors-domain">domain()</h3>
- <p>.domain() is a convenience method that returns <code>example.org</code> from the hostname <code>www.example.org</code>.</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get domain
-uri.domain(); // returns string "example.org"
-// set domain
-uri.domain("otherdomain.com"); // returns the URI instance for chaining
-
-// Second Level Domain (SLD) Support (as of URI.js 1.5.0)
-uri = new URI("http://example.co.uk/foo/hello.html");
-uri.domain(); // return string "example.co.uk"
-uri.domain(true); // return string "co.uk"</pre>
- <p class="note"><code>.domain()</code> will throw an error if you pass it an empty string.</p>
- <p class="note">Throws a <code>TypeError</code> on illegal input</p>
-
- <h3 id="accessors-subdomain">subdomain()</h3>
- <p>.subdomain() is a convenience method that returns <code>www</code> from the hostname <code>www.example.org</code>.</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://www.example.org/foo/hello.html");
-// get subdomain
-uri.subdomain(); // returns string "www"
-// set subdomain
-uri.subdomain("other.subdomain"); // returns the URI instance for chaining</pre>
- <p class="note">Throws a <code>TypeError</code> on illegal input</p>
-
- <h3 id="accessors-tld">tld()</h3>
- <p>.tld() is a convenience method that returns <code>org</code> from the hostname <code>www.example.org</code>.</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get tld
-uri.tld(); // returns string "org"
-// set tld
-uri.tld("com"); // returns the URI instance for chaining
-
-// Second Level Domain (SLD) Support (as of URI.js 1.5.0)
-uri = new URI("http://example.co.uk/foo/hello.html");
-uri.tld(); // return string "co.uk"
-uri.tld(true); // return string "uk"</pre>
- <p class="note">Throws an <code>Error</code> if you pass it an empty string or use it on an IP-host.</p>
-
- <h3 id="accessors-pathname">pathname(), path()</h3>
- <p>.path() is an alias of .pathname()</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get pathname
-uri.pathname(); // returns string "/foo/hello.html"
-// set pathname
-uri.pathname("/foo/hello.html"); // returns the URI instance for chaining
-
-// will encode for you
-uri.pathname("/hello world/");
-uri.pathname() === "/hello%20world/";
-// will decode for you
-uri.pathname(true) === "/hello world/";
-
-// will return empty string for empty paths, but:
-URI("").path() === "";
-URI("/").path() === "/";
-URI("http://example.org").path() === "/";
-</pre>
-
- <h3 id="accessors-directory">directory()</h3>
- <p>.directory() is an convenience method for mutating the directory part of a path</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get directory
-uri.directory(); // returns string "/foo" (no trailing slash)
-// set directory
-uri.directory("/bar"); // returns the URI instance for chaining
-// uri == "http://example.org/bar/hello.html"
-
-// will encode for you
-uri.directory("/hello world/");
-uri.directory() === "/hello%20world";
-// will decode for you
-uri.directory(true) === "/hello world";
-
-uri.href("http://example.com/foo").directory()
-// -&t; "/"
-uri.href("/foo").directory()
-// -&t; "/"
-uri.href("foo").directory()
-// -&t; ""</pre>
-
- <h3 id="accessors-filename">filename()</h3>
- <p>.filename() is an convenience method for mutating the filename part of a path</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get filename
-uri.filename(); // returns string "hello.html" (no leading slash)
-// set filename
-uri.filename("world.xml"); // returns the URI instance for chaining
-// uri == "http://example.org/foo/world.xml"
-
-// will encode for you
-uri.filename("hello world.html");
-uri.filename() === "hello%20world.html";
-// will decode for you
-uri.filename(true) === "hello world.html";</pre>
- <p class="note">If you pass <code>../file.html</code>, the directory will be changed accordingly</p>
-
- <h3 id="accessors-suffix">suffix()</h3>
- <p>.suffix() is an convenience method for mutating the filename part of a path</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get suffix
-uri.suffix(); // returns string "html" (no leading dot)
-// set suffix
-uri.suffix("xml"); // returns the URI instance for chaining
-// uri == "http://example.org/bar/world.xml"
-
-// will encode for you
-uri.suffix("würgh");
-uri.suffix() === "w%C3%BCrgh";
-// will decode for you
-uri.suffix(true) === "würgh";</pre>
-
- <h3 id="accessors-segment">segment()</h3>
- <p>.segment() allows convenient access to directory levels / URN segments within the path. See <a href="#accessors-segmentCoded">.segmentCoded()</a> for an interface that transparently encodes and decodes path segments.</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html");
-// get segments
-uri.segment(); // returns array ["foo", "hello.html"]
-// set segments
-uri.segment(["foo", "bar", "foobar.html"]); // -> http://example.org/foo/bar/foobar.html
-
-// get specific level
-uri.segment(0); // returns "foo"
-uri.segment(1); // returns "bar"
-uri.segment(-1); // returns "foobar.html"
-// set specific level
-uri.segment(0, "bar"); // -> http://example.org/bar/bar/foobar.html
-// remove specific level
-uri.segment(0, ""); // -> http://example.org/bar/foobar.html
-
-// append level
-uri.segment("appendthis"); // -> http://example.org/bar/foobar.html/appendthis</pre>
-
- <h3 id="accessors-segmentCoded">segmentCoded()</h3>
- <p>.segmentCoded() works the same way <a href="#accessors-segment">.segment()</a> does, with the difference of transparently encoding and decoding values.</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello%20world.html");
-// get segments
-uri.segmentCoded(); // returns array ["foo", "hello world.html"]
-// set segments
-uri.segmentCoded(["foo", "bar", "foo bar.html"]); // -> http://example.org/foo/bar/foo%20bar.html
-
-// get specific level
-uri.segmentCoded(0); // returns "foo"
-uri.segmentCoded(1); // returns "bar"
-uri.segmentCoded(-1); // returns "foo bar.html"
-// set specific level
-uri.segmentCoded(0, "bar bam"); // -> http://example.org/bar%20bam/bar/foobar.html
-// remove specific level
-uri.segmentCoded(0, ""); // -> http://example.org/bar/foobar.html
-
-// append level
-uri.segmentCoded("append this"); // -> http://example.org/bar/foobar.html/append%20this</pre>
-
-
- <h3 id="accessors-search">search(), query()</h3>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html?foo=bar&amp;bar=baz");
-// get search
-uri.search(); // returns string "?foo=bar&amp;bar=baz" (leading ?)
-// get query
-uri.query(); // returns string "foo=bar&amp;bar=baz" (no leading ?)
-
-// .query() and .search() behave the same for the following:
-
-// set search
-uri.search("?foo=bar&amp;bar=baz"); // returns the URI instance for chaining
-uri.search("foo=bar&amp;bar=baz"); // returns the URI instance for chaining
-// uri == "http://example.org/bar/world.html?foo=bar&amp;bar=baz"
-
-// remove query
-uri.search(""); // returns the URI instance for chaining
-// uri == "http://example.org/bar/world.html"
-
-// get data map:
-uri.search(true); // returns { foo: "bar", hello : ["world", "mars"] }
-
-// set data map:
-uri.search({ foo: "bar", hello : ["world", "mars"] });
-// uri == "http://example.org/bar/world.html?foo=bar&amp;hello=world&amp;hello=mars"
-
-// overwrite data through callback
-uri.search(function(data) {
- return { hello : "world" };
-});
-// uri == "http://example.org/bar/world.html?hello=world"
-
-// augment data through callback
-uri.search(function(data) {
- data.foo = "bar";
-});
-// uri == "http://example.org/bar/world.html?hello=world&amp;foo=bar"
-
-// CAUTION: beware of arrays, the following are not quite the same
-// If you're dealing with PHP, you probably want the latter…
-uri.search("?foo=bar&amp;bar=baz");
-uri.search("?foo=bar[]&amp;bar[]=baz");</pre>
- <p>Note that names and values passed in an object are encoded automatically.
- The object, resulting from parsing the query string, contains decoded values</p>
- <p>Hint: If you're using jQuery, have a look at their <a href="http://api.jquery.com/serialize/">.serialize()</a> function.</p>
-
- <h3 id="accessors-hash">hash(), fragment()</h3>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html#world");
-// get hash
-uri.hash(); // returns string "#world" (leading #)
-// get fragment
-uri.fragment(); // returns string "world" (no leading #)
-
-// remove fragment
-uri.fragment(""); // returns the URI instance for chaining
-// uri == "http://example.org/bar/world.html"
-
-// .hash() and .fragment() behave the same for the following:
-
-// set hash
-uri.hash("#mars"); // returns the URI instance for chaining
-uri.hash("mars"); // returns the URI instance for chaining
-// uri == "http://example.org/bar/world.xml#mars"</pre>
-
- <h3 id="accessors-resource">resource()</h3>
- <p>Resource is comprised of path, query and fragment</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html?query=string#hash");
-// get resource
-uri.resource(); // returns string "/foo/hello.html?query=string#hash"
-// set resource
-uri.resource("/mars.txt?query=foo#other"); // returns the URI instance for chaining</pre>
- <p class="note"><code>.resource()</code> will reset any of path, query and fragment if they're not specified.</p>
-
- <h3 id="is">is()</h3>
- <p>.is() tells what a URL is. It responds with a boolean and can be asked the following questions:</p>
- <dl>
- <dt><code>relative</code></dt><dd><code>true</code> if URL doesn't have a hostname</dd>
- <dt><code>absolute</code></dt><dd><code>true</code> if URL has a hostname</dd>
- <dt><code>urn</code></dt><dd><code>true</code> if URI looks like a URN</dd>
- <dt><code>url</code></dt><dd><code>true</code> if URI is a URL</dd>
- <dt><code>domain</code>, <code>name</code></dt><dd><code>true</code> if hostname is not an IP</dd>
- <dt><code>sld</code></dt><dd><code>true</code> if hostname is a second level domain (i.e. "example.co.uk")</dd>
- <dt><code>idn</code></dt><dd><code>true</code> if hostname contains non-alphanumeric characters and is not an IP</dd>
- <dt><code>punycode</code></dt><dd><code>true</code> if hostname contains <code>xn--</code></dd>
- <dt><code>ip</code></dt><dd><code>true</code> if hostname is IPv4 or IPv6</dd>
- <dt><code>ip4</code>, <code>ipv4</code>, <code>inet4</code></dt><dd><code>true</code> if hostname is IPv4</dd>
- <dt><code>ip6</code>, <code>ipv6</code>, <code>inet6</code></dt><dd><code>true</code> if hostname is IPv6</dd>
- </dl>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/");
-uri.is("relative") === false;
-uri.is("absolute") === true;
-uri.is("urn") === false;
-uri.is("url") === true;
-uri.is("name") === true;
-uri.is("sld") === false;
-uri.is("punycode") === false;
-uri.is("IDN") === false; // case doesn't matter
-uri.is("idn") === false; // case doesn't matter
-uri.is("ip") === false;
-
-var uri = new URI("http://123.123.123.123/");
-uri.is("relative") === false;
-uri.is("absolute") === true;
-uri.is("urn") === false;
-uri.is("url") === true;
-uri.is("name") === false;
-uri.is("sld") === false;
-uri.is("IP") === true;
-uri.is("IPv4") === true;
-uri.is("IPv6") === false;
-
-var uri = new URI("http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/");
-uri.is("IP") === true;
-uri.is("IPv4") === false;
-uri.is("IPv6") === true;
-
-var uri = new URI("/hello/world.html");
-uri.is("relative") === true;
-uri.is("absolute") === false;
-uri.is("urn") === false;
-uri.is("url") === true;
-uri.is("name") === false;
-uri.is("IP") === false;
-
-var uri = new URI("http://example.co.uk/");
-uri.is("name") === true;
-uri.is("sld") === true;
-
-var uri = new URI("mailto:mail@example.org");
-uri.is("relative") === false;
-uri.is("absolute") === false;
-uri.is("urn") === true;
-uri.is("url") === false;
-uri.is("name") === false;
-uri.is("sld") === false;
-uri.is("punycode") === false;
-uri.is("idn") === false;
-uri.is("ip") === false;</pre>
-
-
- <h2 id="querystrings">Working with the query string</h2>
-
- <h3 id="search-set">setSearch(), setQuery()</h3>
- <p>.setQuery() is an alias of .setSearch()</p>
- <pre class="prettyprint lang-js">var uri = new URI("?hello=world");
-uri.setSearch("hello", "mars"); // returns the URI instance for chaining
-// uri == "?hello=mars"
-
-uri.setSearch({ foo: "bar", goodbye : ["world", "mars"] });
-// uri == "?hello=mars&amp;foo=bar&amp;goodbye=world&amp;goodbye=mars"
-
-uri.setSearch("goodbye", "sun");
-// uri == "?hello=mars&amp;foo=bar&amp;goodbye=sun"
-
-// CAUTION: beware of arrays, the following are not quite the same
-// If you're dealing with PHP, you probably want the latter…
-uri.setSearch("foo", ["bar", "baz"]);
-uri.setSearch("foo[]", ["bar", "baz"]);</pre>
- <p>Note that names and values passed in are encoded automatically.</p>
-
- <h3 id="search-add">addSearch(), addQuery()</h3>
- <p>.addQuery() is an alias of .addSearch()</p>
- <pre class="prettyprint lang-js">var uri = new URI("?hello=world");
-uri.addSearch("hello", "mars"); // returns the URI instance for chaining
-// uri == "?hello=world&amp;hello=mars"
-
-uri.addSearch({ foo: "bar", goodbye : ["world", "mars"] });
-// uri == "?hello=world&amp;hello=mars&amp;foo=bar&amp;goodbye=world&amp;goodbye=mars"
-
-uri.addSearch("no-value");
-// uri == "?hello=world&amp;hello=mars&amp;foo=bar&amp;goodbye=world&amp;goodbye=mars&amp;no-value"
-
-// CAUTION: beware of arrays, the following are not quite the same
-// If you're dealing with PHP, you probably want the latter…
-uri.addSearch("foo", ["bar", "baz"]);
-uri.addSearch("foo[]", ["bar", "baz"]);</pre>
- <p>Note that names and values passed in are encoded automatically.</p>
-
- <h3 id="search-remove">removeSearch(), removeQuery()</h3>
- <p>.removeQuery() is an alias of .removeSearch()</p>
- <pre class="prettyprint lang-js">var uri = new URI("?hello=world&amp;hello=mars&amp;foo=bar");
-// remove an attribute
-uri.removeSearch("hello"); // returns the URI instance for chaining
-// uri == "?foo=bar"
-
-// remove an attribute with value filter
-uri.search("?hello=world&amp;hello=mars&amp;foo=bar");
-uri.removeSearch("hello", "world"); // returns the URI instance for chaining
-// uri == "?hello=mars&amp;foo=bar"
-
-// remove multiple values
-uri.search("?hello=world&amp;hello=mars&amp;foo=bar&amp;mine=true");
-uri.removeSearch(["hello", "foo"]);
-// uri == "?mine=true"
-
-// remove multiple values with value filter
-uri.search("?hello=world&amp;hello=mars&amp;foo=bar&amp;mine=true&amp;a=1&amp;a=2&amp;a=3");
-uri.removeSearch({hello: "world", foo: undefined, a: ["1", "3"]});
-// uri == "?hello=mars&amp;mine=true&amp;a=2"
-
-// remove multiple values with RegExp
-uri.search("?hello=world&amp;hello=mars&amp;foo=bar&amp;mine=true&amp;a=1&amp;a=2&amp;a=3");
-uri.removeSearch(/^hello/);
-// uri == "?foo=bar&amp;mine=true&amp;a=1&amp;a=2&amp;a=3"
-
-// filter values with RegExp
-uri.search("?foo=bar&amp;foo=baz&amp;foo=bam&amp;obj=bam&amp;bar=bar&amp;bar=baz&amp;bar=bam");
-uri.removeSearch('foo', /[rz]$/);
-// uri == "?foo=bam&amp;obj=bam&amp;bar=bar&amp;bar=baz&amp;bar=bam"</pre>
-
- <h3 id="search-has">hasSearch(), hasQuery()</h3>
- <p>.hasQuery() is an alias of .hasSearch(). The method checks the existence and value of a given parameter within the query string.</p>
- <pre class="prettyprint lang-js">var uri = URI("?string=bar&amp;list=one&amp;list=two&amp;number=123&amp;null&amp;empty=");
-
-// check if parameter exists (regardless of value)
-uri.hasQuery("string") === true;
-uri.hasQuery("nono") === false;
-
-// check if parameter has a truthy / falsy value
-uri.hasQuery("string", true) === true;
-uri.hasQuery("string", false) === false;
-uri.hasQuery("empty", true) === false;
-uri.hasQuery("empty", false) === true;
-
-// check if parameter has a given value
-uri.hasQuery("string", "bar") === true;
-uri.hasQuery("number", 123) === true;
-
-// check if value is contained in parameter list
-uri.hasQuery("list", "two", true) === true;
-uri.hasQuery("list", ["two"], true) === true;
-uri.hasQuery("list", "three", true) === false;
-uri.hasQuery("list", ["two", "three"], true) === false;
-uri.hasQuery("list", /ne$/, true) === true;
-
-// check if parameter matches an expression
-uri.hasQuery("string", /ar$/) === true;
-
-// check if parameter name matches an expression
-uri.hasQuery(/^str/) === true;
-// check if parameter name matches an expression and value exists
-uri.hasQuery(/^li/, "two") === true;
-
-// check by comparison function
-uri.hasQuery("string", function(value, name, data) {
- // value === "bar";
- // name === "string";
- // data === uri.query(true);
- return true;
-}) === true;</pre>
-
- <h2 id="fragment-abuse">Working with the Fragment (Hash)</h2>
-
- <p>
- There are virtually no limits to what you might do with fragments (hash).
- Every system has their own bag of tricks.
- As a result URI.js cannot offer any of the following tools right out of the box.
- The most common <em>abuse of fragments</em> are storing URLs or query string like data.
- </p>
-
- <p>
- Usually a prefix is used to identify data with special meaning. This prefix can be pretty much what you want.
- For URIs it's usually <code>!</code> and for query-like data it often is <code>?</code>.
- But they don't have to, which is why you can define a global default: <code>URI.fragmentPrefix = "$";</code>
- </p>
-
- <h3 id="fragment-abuse-query">Query String Fragments</h3>
- <p>The file <a href="https://github.com/medialize/URI.js/blob/gh-pages/src/URI.fragmentQuery.js">src/URI.fragmentQuery.js</a> is a "plugin" that allows you to store data in hashes in the same manner the .query() functions provide.</p>
-
- <pre class="prettyprint lang-js">var uri = new URI("#?hello=world");
-uri.addFragment("hello", "mars"); // returns the URI instance for chaining
-// uri == "#?hello=world&amp;hello=mars"
-
-// to change the fragment prefix on an instance level:
-uri.fragmentPrefix("!");
-
-// to change the fragment prefix on a global level:
-URI.fragmentPrefix = "!";</pre>
-
-
- <h3 id="fragment-abuse-uri">URL Fragments</h3>
- <p>The file <a href="https://github.com/medialize/URI.js/blob/gh-pages/src/URI.fragmentURI.js">src/URI.fragmentURI.js</a> is a "plugin" that allows you to store URLs in hashes.</p>
-
- <pre class="prettyprint lang-js">var uri = URI("http://example.org/#!/foo/bar/baz.html");
-var furi = uri.fragment(true);
-
-// manipulating the fragment URI
-furi.pathname() === "/foo/bar/baz.html";
-furi.pathname("/hello.html");
-
-// has direct effect on the actual URI
-uri.toString() === "http://example.org/#!/hello.html"
-
-// to change the fragment prefix on an instance level:
-uri.fragmentPrefix("?");
-
-// to change the fragment prefix on a global level:
-URI.fragmentPrefix = "?";</pre>
-
- <h2 id="normalizing">Normalizing URLs</h2>
-
- <h3 id="normalize">normalize()</h3>
- <p>executes normalizeProtocol(), normalizeHostname(), normalizePort(), normalizePath(), normalizeSearch(), normalizeHash()</p>
-
- <h3 id="normalize-protocol">normalizeProtocol()</h3>
- <pre class="prettyprint lang-js">var uri = new URI("hTTp://www.example.org/");
-// normalize protocol
-uri.normalizeProtocol(); // returns the URI instance for chaining
-// uri == "http://www.example.org/"</pre>
-
- <h3 id="normalize-host">normalizeHostname()</h3>
- <p>For IDN conversion <a href="https://github.com/bestiejs/punycode.js">punycode.js</a> must be available (bundled in URI.js).
- For IPv6-best-notation conversion IPv6.js must be available (bundled in URI.js). Also lower-cases hostnames.</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://www.exämple.org/");
-// normalize IDN host
-uri.normalizeHostname(); // returns the URI instance for chaining
-// uri == "http://www.xn--exmple-cua.org/"
-
-// normalize IPv6 host
-uri.hostname("fe80:0000:0000:0000:0204:61ff:fe9d:f156");
-uri.normalizeHostname(); // returns the URI instance for chaining
-// uri == "http://fe80::204:61ff:fe9d:f156/"
-
-// normalize hostname to lower case
-uri.hostname("wWw.eXample.Org");
-uri.normalizeHostname(); // returns the URI instance for chaining
-// uri == "http://www.example.org/"</pre>
- <p>There is no .normalizeHost(), as <a href="#accessors-host">.host()</a> is a property comprised of <a href="#accessors-hostname">.hostname()</a> and <a href="#accessors-port">.port()</a></p>
-
- <h3 id="normalize-port">normalizePort()</h3>
- <p>Removes the port, if it's the default for the given protocol (http: 80, https: 443, ftp: 21).</p>
- <p>The list of default ports can be modified at <code>URI.defaultPorts</code></p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org:80/foo.html");
-// normalize port
-uri.normalizePort(); // returns the URI instance for chaining
-// uri == "http://example.org/foo.html"</pre>
-
- <h3 id="normalize-path">normalizePathname(), normalizePath()</h3>
- <p>.normalizePath() is an alias of .normalizePathname(), they resolve relative hierarchies</p>
- <pre class="prettyprint lang-js">var uri = new URI("/hello/foo/woo/.././../world.html");
-// normalize path
-uri.normalizePathname(); // returns the URI instance for chaining
-// uri == "/hello/world.html"</pre>
-
- <h3 id="normalize-search">normalizeSearch(), normalizeQuery()</h3>
- <p>Turns <code>?&amp;foo=bar&amp;&amp;foo=bar&amp;foo=baz&amp;</code> into <code>?foo=bar&amp;foo=baz</code> and removes ? if there is no query string.</p>
- <pre class="prettyprint lang-js">var uri = new URI("?&amp;foo=bar&amp;&amp;foo=bar&amp;foo=baz&amp;");
-// normalize search
-uri.normalizeSearch(); // returns the URI instance for chaining
-// uri == "?foo=bar&amp;foo=baz"</pre>
-
- <h3 id="normalize-hash">normalizeHash(), normalizeFragment()</h3>
- <p>removes # if there is no hash</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo/hello.html#");
-// normalize hash
-uri.normalizeHash(); // returns the URI instance for chaining
-// uri == "http://example.org/bar/world.xml"</pre>
-
-
- <h2 id="charsets">Charsets / Encodings</h2>
-
- <h3 id="iso8859">iso8859()</h3>
- <p>.iso8859() converts unicode-encoded escape sequences to ISO8859-encoded escape sequences. It does this by calling <a href="#normalize">.normalize()</a> internally.</p>
- <pre class="prettyprint lang-js">var uri = new URI("/%C3%A4.html");
-uri.iso8859(); // returns the URI instance for chaining
-// uri == "/%E4.html"</pre>
- <p class="note">You can make URI work with ISO8859 encoding by default by calling <a href="#static-iso8859">URI.iso8859()</a>.
-
- <h3 id="unicode">unicode()</h3>
- <p>.unicode() converts ISO8859-encoded escape sequences to unicode-encoded escape sequences. It does this by calling <a href="#normalize">.normalize()</a> internally.</p>
- <pre class="prettyprint lang-js">var uri = new URI("/%E4.html");
-uri.unicode(); // returns the URI instance for chaining
-// uri == "/%C3%A4.html"</pre>
-
-
- <h2 id="formatting">Formatting URLs</h2>
-
- <h3 id="readable">readable()</h3>
- <p>Formats URLs to be human readable (much like your browser does nowadays).</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://foo:bar@www.xn--exmple-cua.org/"
- + "hello%20world/ä.html?foo%5B%5D=b+är#fragment");
-
-uri.readable() === "http://www.exämple.org/"
- + "hello world/ä.html?foo[]=b är#fragment";</pre>
-
-
- <h2 id="relative-and-absolute">Relative and Absolute URLs</h2>
-
- <h3 id="relativeto">relativeTo()</h3>
- <p>.relativeTo() compares two <em>paths</em> and makes one relative to the other</p>
- <pre class="prettyprint lang-js">var uri = new URI("/relative/path");
-// make path relative
-var relUri = uri.relativeTo("/relative/sub/foo/sub/file"); // returns a new URI instance
-// relUri == "../../../path"
-
-// absolute URLs are passed through unchanged
-URI("http://example.org/world.html")
- .relativeTo("http://google.com/baz");
-// -&gt; "http://example.org/world.html"
-
-// absolute URLs relative to absolute URLs
-// may resolve the protocol
-URI("http://example.org/world.html")
- .clone()
- .authority("")
- .relativeTo("http://google.com/baz");
-// -&gt; "//google.com/world.html"
-
-// equal URLs are relative by empty string
-URI("http://www.example.com:8080/dir/file")
- .relativeTo('http://www.example.com:8080/dir/file');
-// -&gt; ""
-
-// relative on fragment and query string as well
-URI("http://www.example.com:8080/dir/file?foo=bar#abcd")
- .relativeTo('http://www.example.com:8080/dir/file');
-// -&gt; "?foo=bar#abcd"</pre>
- <p>.relativeTo() and .absoluteTo() reverse each other.</p>
-
- <h3 id="absoluteto">absoluteTo()</h3>
- <p>.absoluteTo() makes a <em>relative path</em> absolute based on another path</p>
- <pre class="prettyprint lang-js">var uri = new URI("../../../path");
-// make path absolute
-var relUri = uri.absoluteTo("/relative/sub/foo/sub/file"); // returns a new URI instance
-// relUri == "/relative/path"
-
-// resolves protocols
-var u = new URI('//example.com/path');
-u.absoluteTo('https://example.com');
-// -&gt; "https://example.com/path"
-var u = new URI('//example.com/path');
-u.absoluteTo('https://');
-// -&gt; "https://example.com/path"</pre>
- <p>.relativeTo() and .absoluteTo() reverse each other.</p>
-
-
- <h2 id="comparison">Comparing URLs</h2>
-
- <h3 id="equals">equals()</h3>
- <p>.equals() determines if the given URLs are the same - disregarding default ports, capitalization, dot-pathnames, query-parameter order, etc.</p>
- <pre class="prettyprint lang-js">var a = "http://example.org/foo/bar.html"
- + "?foo=bar&amp;hello=world&amp;hello=mars#fragment";
-var b;
-
-// normalizing URI before comparison:
-b = "http://exAMPle.org:80/foo/../foo/bar.html"
- + "?foo=bar&amp;hello=world&amp;hello=mars#fragment";
-
-a !== b;
-URI(a).equals(b) === true;
-
-
-// comparing query string parameters:
-b = "http://example.org/foo/bar.html"
- + "?hello=mars&amp;foo=bar&amp;hello=world&amp;#fragment";
-
-a !== b;
-URI(a).equals(b) === true;
-
-// shorthand for comparing to window.location.href:
-URI(a).equals();</pre>
-
-
- <h2 id="parsing-urls">Parsing URLs</h2>
-
- <h3 id="static-parse">URI.parse(<em>string</em> url)</h3>
- <p>parses a string into its URI components. returns an object containing the found components</p>
- <pre class="prettyprint lang-js">var result = URI.parse("http://example.org/foo.html");
-result === {
- protocol: "http",
- username: null,
- password: null,
- hostname: "example.org",
- port: null,
- path: "/foo.html",
- query: null,
- fragment: null
-};</pre>
-
- <h3 id="static-parseAuthority">URI.parseAuthority(<em>string</em> url, <em>object</em> parts)</h3>
- <p>parses a string's beginning into its URI components username, password, hostname, port.
- Found components are appended to the <code>parts</code> parameter.
- Remaining string is returned</p>
- <pre class="prettyprint lang-js">var parts = {};
-var result = URI.parseAuthority("user:pass@example.org:8080/foo.html", parts);
-result === "/foo.html";
-parts === {
- username: "user",
- password: "pass",
- hostname: "example.org",
- port: "8080"
-};</pre>
-
- <h3 id="static-parseUserinfo">URI.parseUserinfo(<em>string</em> url, <em>object</em> parts)</h3>
- <p>parses a string's beginning into its URI components username, password.
- Found components are appended to the <code>parts</code> parameter.
- Remaining string is returned</p>
- <pre class="prettyprint lang-js">var parts = {};
-var result = URI.parseUserinfo("user:pass@example.org:8080/foo.html", parts);
-result === "example.org:8080/foo.html";
-parts === {
- username: "user",
- password: "pass"
-};</pre>
-
- <h3 id="static-parseHost">URI.parseHost(<em>string</em> url, <em>object</em> parts)</h3>
- <p>parses a string's beginning into its URI components hostname, port.
- Found components are appended to the <code>parts</code> parameter.
- Remaining string is returned</p>
- <pre class="prettyprint lang-js">var parts = {};
-var result = URI.parseHost("example.org:8080/foo.html", parts);
-result === "/foo.html";
-parts === {
- hostname: "example.org",
- port: "8080"
-};</pre>
-
- <h3 id="static-parseQuery">URI.parseQuery(<em>string</em> querystring)</h3>
- <p>Parses the passed query string into an object. Returns object <code>{propertyName: propertyValue}</code></p>
- <pre class="prettyprint lang-js">var result = URI.parseQuery("?foo=bar&amp;hello=world&amp;hello=mars&amp;bam=&amp;yup");
-result === {
- foo: "bar",
- hello: ["world", "mars"],
- bam: "",
- yup: null
-};</pre>
-
- <h2 id="serializing-urls">Serializing URLs</h2>
-
- <h3 id="static-build">URI.build(<em>object</em> parts)</h3>
- <p>serializes the URI components passed in <code>parts</code> into a URI string</p>
- <pre class="prettyprint lang-js">var parts = {
- protocol: "http",
- username: null,
- password: null,
- hostname: "example.org",
- port: null,
- path: "/foo.html",
- query: null,
- fragment: null
-};
-URI.build(parts) === "http://example.org/foo.html";</pre>
-
- <h3 id="static-buildAuthority">URI.buildAuthority(<em>object</em> parts)</h3>
- <p>serializes the URI components username, password, hostname, port passed in <code>parts</code> into a URI string</p>
- <pre class="prettyprint lang-js">var parts = {
- username: "user",
- password: "pass",
- hostname: "example.org",
- port: "8080"
-};
-URI.buildAuthority(parts) === "user:pass@example.org:8080";</pre>
-
- <h3 id="static-buildUserinfo">URI.buildUserinfo(<em>object</em> parts)</h3>
- <p>serializes the URI components username, password passed in <code>parts</code> into a URI string</p>
- <pre class="prettyprint lang-js">var parts = {
- username: "user",
- password: "pass"
-};
-URI.buildUserinfo(parts) === "user:pass@";</pre>
-
- <h3 id="static-buildHost">URI.buildHost(<em>object</em> parts)</h3>
- <p>serializes the URI components hostname, port passed in <code>parts</code> into a URI string</p>
- <pre class="prettyprint lang-js">var parts = {
- hostname: "example.org",
- port: "8080"
-};
-URI.buildHost(parts) === "example.org:8080";</pre>
-
- <h3 id="static-buildQuery">URI.buildQuery(<em>object</em> data, [<em>boolean</em> duplicateQueryParameters], [<em>boolean</em> escapeQuerySpace])</h3>
- <p>serializes the query string parameters</p>
- <pre class="prettyprint lang-js">var data = {
- foo: "bar",
- hello: ["world", "mars", "mars"],
- bam: "",
- yup: null,
- removed: undefined
-};
-
-// Note: duplicate hello=mars is dropped (default behavior!)
-URI.buildQuery(data) === "foo=bar&amp;hello=world&amp;hello=mars&amp;bam=&amp;yup";
-
-// Note: duplicate hello=mars is preserved
-URI.buildQuery(data, true) === "foo=bar&amp;hello=world&amp;hello=mars&amp;hello=mars&amp;bam=&amp;yup";</pre>
- <p>To preserve duplicate values, use URI.buildQuery() directly:</p>
- <pre class="prettyprint lang-js">var uri = new URI("http://example.org/foo.html?bar=baz");
-var data = uri.query(true);
-
-data.some = "new data";
-uri.query(URI.buildQuery(data, true));
-
-// you can also use the static <a href="#static-addQuery">URI.addQuery()</a> and <a href="#static-removeQuery">URI.removeQuery()</a>
-URI.addQuery(data, "hello", "world");
-uri.query(URI.buildQuery(data, true));</pre>
-
- <p id="setting-duplicateQueryParameters">As of v1.8.0 you can configure query parameter de/duplication:</p>
- <pre class="prettyprint lang-js">// make all new URI instances allow duplicates:
-URI.duplicateQueryParameters = true; // default is false
-
-// make a specific URI instance allow duplicates:
-var withDuplicates = URI("?bar=1&amp;bar=1")
- .duplicateQueryParameters(true)
- .normalizeQuery()
- .toString();
-
-// make a specific URI instance avoid duplicates (default):
-var noDuplicates = URI("?bar=1&amp;bar=1")
- .duplicateQueryParameters(false)
- .normalizeQuery()
- .toString();
-
-withDuplicates === "?bar=1&amp;bar=1";
-noDuplicates === "?bar=1";</pre>
-
- <p id="setting-escapeQuerySpace">As of v1.11.0 you can configure query space en/decoding:</p>
- <pre class="prettyprint lang-js">// prevent all new URI instances from escaping spaces in query strings:
-URI.escapeQuerySpace = false; // default is true
-
-// make a specific URI instance escape spaces in query:
-var withPlus = URI("?bar=hello+world")
- .escapeQuerySpace(true)
- .query(true).bar;
-
-// make a specific URI instance not escape spaces in query
-var withPercent = URI("?bar=hello%20world")
- .escapeQuerySpace(false)
- .query(true).bar;
-
-withPlus === "hello world";
-withPercent === "hello world";</pre>
-
- <h2 id="encoding-decoding">Encoding and Decoding URLs</h2>
-
- <h3 id="static-encode">URI.encode()</h3>
- <p>Encode an URI component with strict compliance to RFC3986</p>
- <pre class="prettyprint lang-js">URI.encode("hä lo#w*rl:d!") === "h%C3%A4%20lo%23w%2Arl%3Ad%21";
-// vs.
-encodeURIComponent("hä lo#w*rl:d!") === "h%C3%A4%20lo%23w*rl%3Ad!";
-// not how * and ! were not encoded</pre>
-
- <h3 id="static-decode">URI.decode()</h3>
- <p>Decode an URI component</p>
- <pre class="prettyprint lang-js">URI.decode("h%C3%A4%20lo%23w%2Arl%3Ad%21") === "hä lo#w*rl:d!";
-// note:
-URI.decode === decodeURIComponent;</pre>
-
- <h3 id="static-encodeReserved">URI.encodeReserved()</h3>
- <p>Encode an URI component whilst preserving <a href="http://tools.ietf.org/html/rfc3986#section-2.2">reserved characters</a></p>
- <pre class="prettyprint lang-js">URI.encodeReserved("ä:/?#[]@!$&amp;'()*+,;=") === "%C3%A4:/?#[]@!$&amp;'()*+,;=";
-// vs.
-URI.encode("ä:/?#[]@!$&amp;'()*+,;=") ===
- "%C3%A4%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D";</pre>
-
- <h3 id="static-encodeQuery">URI.encodeQuery()</h3>
- <p>Encode a query string component. Works like <a href="#static-encode">encode()</a>, except it handles <code>%20</code> as <code>+</code> (space) if <a href="#setting-escapeQuerySpace"><code>URI.escapeQuerySpace = true;</code></a>.</p>
- <pre class="prettyprint lang-js">URI.escapeQuerySpace = true; // default
-URI.encodeQuery(" ") === "+";
-
-URI.escapeQuerySpace = false;
-URI.encodeQuery(" ") === "%20";
-
-// vs.
-URI.encode(" ") === "%20";</pre>
-
- <h3 id="static-decodeQuery">URI.decodeQuery()</h3>
- <p>Decode a query string component. Works like <a href="#static-decode">decode()</a>, except it handles <code>+</code> as <code>%20</code> (space) if <a href="#setting-escapeQuerySpace"><code>URI.escapeQuerySpace = true;</code></a>.</p>
- <pre class="prettyprint lang-js">URI.escapeQuerySpace = true; // default
-URI.decodeQuery("+") === " ";
-
-URI.escapeQuerySpace = false;
-URI.decodeQuery("+") === "+";
-
-// vs.
-URI.decode("+") === "+";</pre>
-
-
- <h2 id="static-functions">Static Helper Functions</h2>
-
- <h3 id="static-noConflict">URI.noConflict()</h3>
- <p>removes URI variables from global scope</p>
- <pre class="prettyprint lang-js">// restores window.URI to its previous state and returns URI
-URI.noConflict();
-// restores the global variable to its previous state and returns the object itself
-URITemplate.noConflict();
-IPv6.noConflict();
-SecondLevelDomains.noConflict();
-
-// restore all objects and return them as a map {URI: ..., IPv6: ..., ....}
-URI.noConflict(true);</pre>
-
- <h3 id="static-addQuery">URI.addQuery()</h3>
- <p>adds data to a map</p>
- <pre class="prettyprint lang-js">var data = {};
-
-URI.addQuery(data, "hello", "mars");
-data === {hello: "mars"};
-
-URI.addQuery(data, "hello", "world");
-data === {hello: ["mars", "world"]};
-
-URI.addQuery(data, {foo: "bar", goodbye : ["world", "mars"]});
-data === {hello: ["mars", "world"], foo: "bar", goodbye : ["world", "mars"]};</pre>
-
- <h3 id="static-removeQuery">URI.removeQuery()</h3>
- <p>removes data from a map</p>
- <pre class="prettyprint lang-js">var data === {hello: ["mars", "world"], foo: "bar", goodbye : ["world", "mars"]};
-
-URI.removeQuery(data, "hello");
-data === {foo: "bar", goodbye : ["world", "mars"]};
-
-// remove an attribute with value filter
-data = {hello: ["world", "mars"], foo: "bar"};
-URI.removeQuery(data, "hello", "world");
-data === {hello: ["mars"], foo: "bar"} // yes, still an array
-
-// remove multiple values
-data = {hello: ["world", "mars"], foo: "bar", mine: "true"}
-URI.removeQuery(["hello", "foo"]);
-data === {mine: "true"};
-
-// remove multiple values with value filter
-data = {hello: ["world", "mars"], foo: "bar", mine: "true", a: ["1", "2", "3"]}
-URI.removeQuery({hello: "world", foo: undefined, a: ["1", "3"]});
-data === {hello: ["mars"], mine: "true", a: ["2"]}</pre>
-
- <h3 id="static-commonPath">URI.commonPath()</h3>
- <p>URI.commonPath() determines the common base directory of two paths.</p>
- <pre class="prettyprint lang-js">URI.commonPath("/foo/bar/baz.html", "/foo/bar/world.html");
-// returns "/foo/bar/"
-
-URI.commonPath("/foo/bar/baz.html", "/foo/bazz/world.html");
-// returns "/foo/"
-
-URI.commonPath("/foo/bar/baz.html", "/other/world.html");
-// returns "/"
-
-URI.commonPath("/foo", "bar");
-// returns ""</pre>
-
- <h3 id="static-joinPaths">URI.joinPath()</h3>
- <p>URI.joinPath() composes a path from directory tokens.</p>
- <pre class="prettyprint lang-js">URI.joinPaths('/a/b', '/c', 'd', '/e');
-// returns URI("/a/b/c/d/e")
-
-URI.joinPaths('a/b', 'http://example.com/c', new URI('d/'), '/e');
-// returns URI("a/b/c/d/e")
-
-URI.joinPaths('/a/');
-// returns URI("/a/")
-
-URI.joinPaths('');
-// returns URI("")
-
-URI.joinPaths('', 'a', '');
-// returns URI("/a/")</pre>
-
- <h3 id="static-withinString">URI.withinString()</h3>
- <p>URI.withinString() identifies URIs within text, e.g. to translate them to &lt;a&gt;-Tags. (Obviously you'd want to put the urls inside the href-Attribute and escape them properly…)</p>
- <p class="note">.withinString() only works on plain text, it will not work with HTML!</p>
- <pre class="prettyprint lang-js">var source = "Hello www.example.com,\n"
- + "http://google.com is a search engine, like http://www.bing.com\n"
- + "http://exämple.org/foo.html?baz=la#bumm is an IDN URL,\n"
- + "http://123.123.123.123/foo.html is IPv4 and "
- + "http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html is IPv6.\n"
- + "links can also be in parens (http://example.org) "
- + "or quotes »http://example.org«.";
-
-var result = URI.withinString(source, function(url) {
- // callback needs to return a string
- // feel free to URI(url).normalize().toString() or something
- return "&lt;a&gt;" + url + "&lt;/a&gt;";
-});
-
-/* result is:
-Hello <strong>&lt;a&gt;www.example.com&lt;/a&gt;</strong>,
-<strong>&lt;a&gt;http://google.com&lt;/a&gt;</strong> is a search engine, like <strong>&lt;a&gt;http://www.bing.com&lt;/a&gt;</strong>
-<strong>&lt;a&gt;http://ex&auml;mple.org/foo.html?baz=la#bumm&lt;/a&gt;</strong> is an IDN URL,
-<strong>&lt;a&gt;http://123.123.123.123/foo.html&lt;/a&gt;</strong> is IPv4 and <strong>&lt;a&gt;http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html&lt;/a&gt;</strong> is IPv6.
-links can also be in parens (<strong>&lt;a&gt;http://example.org&lt;/a&gt;</strong>) or quotes &raquo;<strong>&lt;a&gt;http://example.org&lt;/a&gt;</strong>&laquo;.
-*/
-
-// a proper replacement could look like the following:
-var escapeHtml = function(string) {
- return string
- .replace(/&amp;/g, "&amp;amp;")
- .replace(/&lt;/g, "&amp;lt;")
- .replace(/&gt;/g, "&amp;gt;")
- .replace(/&quot;/g, "&amp;quot;");
-};
-var result = URI.withinString(source, function(url) {
- var uri = new URI(url);
- uri.normalize();
- return "&lt;a href="" + escapeHtml(uri) + ""&gt;"
- + escapeHtml(uri.<a href="#readable">readable</a>()) + "&lt;/a&gt;";
-});
-</pre>
- <p>As of URI.js 1.12.0 withinString accepts the following parameters:</p>
- <pre class="prettyprint lang-js">var source = "Hello www.example.com.";
-var decorate = function(url) {
- return "&lt;code&gt;" + url + "&lt;/code&gt;";
-};
-var result = null;
-
-// access to the original input text from the callback
-URI.withinString(source, function(url, start, end, source) {
- source.slice(start, end) === url;
- return url;
-});
-
-// ignore certain URLs
-source = "Hello www.example.com,\n"
- + "ohgodno://example.org/ is a a protocol we want ignored";
-result = URI.withinString(source, decorate, {
- ignore: /^ohgodno:/i
-});
-
-/* result is:
-Hello <strong>&lt;code&gt;www.example.com&lt;/code&gt;</strong>,
-ohgodno://example.org/ is a a protocol we want ignored
-*/
-
-// ignore URLs in HTML
-source = "Hello www.example.com,\n"
- + '&lt;img src=&quot;http://example.org/image.png&quot; alt=&quot;&quot;&gt; is HTML,\n'
- + "&lt;a href='http://example.org/target.html'&gt; is HTML&lt;/a&gt;,\n"
- + "&lt;a href=http://example.org/target.html&gt; is HTML, too&lt;/a&gt;.";
-result = URI.withinString(source, decorate, {
- ignoreHtml: true
-});
-
-/* result is:
-Hello <strong>&lt;code&gt;www.example.com&lt;/code&gt;</strong>,
-&lt;img src=&quot;http://example.org/image.png&quot; alt=&quot;&quot;&gt; is HTML,
-&lt;a href='http://example.org/target.html'&gt; is HTML&lt;/a&gt;,
-&lt;a href=http://example.org/target.html&gt; is HTML, too&lt;/a&gt;
-*/
-
-// custom URI beginning pattern
-source = "That example.com/ is just a domain";
-result = URI.withinString(source, decorate, {
- // "scheme://" or "www." or "domain.tld/"
- start: /\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.|[a-z]+\.[a-z]{2,4}\/)/gi
-});
-
-/* result is:
-That <strong>&lt;code&gt;example.com/&lt;/code&gt;</strong> is just a domain
-*/</pre>
-
- <h3 id="static-iso8859">URI.iso8859()</h3>
- <p>URI.iso8859() tells URI.js to use the older escape/unescape methods, for backwards compatibility with non-unicode platforms.</p>
- <pre class="prettyprint lang-js">URI.iso8859();
-
-var uri = new URI("http://example.org/foo/æ.html");
-// http://example.org/foo/%E6.html</pre>
-
- <h3 id="static-unicode">URI.unicode()</h3>
- <p>URI.unicode() restores the default unicode-encoded URLs.</p>
- <pre class="prettyprint lang-js">URI.unicode();
-
-var uri = new URI("http://example.org/foo/æ.html");
-// http://example.org/foo/%C3%A6.html</pre>
-
- <h3 id="static-expand">URI.expand()</h3>
- <p>URI.expand() is a convenience wrapper for <a href="uri-template.html"><code>URITemplate</code></a>.
- While <code>URITemplate#expand</code> returns a string, <code>URI.expand()</code> returns an <code>URI</code> instance.</p>
- <pre class="prettyprint lang-js">URI.expand("/foo/{var}/{iable}", {
- "var": "bar",
- "iable": "hello world.html"
-});
-
-// returns URI("/foo/bar/hello%20world.html")</pre>
-
-
- </div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/index.html b/thirdparty/URI.js/index.html
deleted file mode 100644
index 880a24fbd..000000000
--- a/thirdparty/URI.js/index.html
+++ /dev/null
@@ -1,173 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>URI.js - URLs in Javascript</title>
- <meta name="description" content="URI.js is a Javascript library for working with URLs." />
-
- <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
- <script src="prettify/prettify.js" type="text/javascript"></script>
- <script src="screen.js" type="text/javascript"></script>
- <link href="screen.css" rel="stylesheet" type="text/css" />
- <link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
- <script src="src/URI.min.js" type="text/javascript"></script>
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-8922143-3']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
-</head>
-<body>
- <a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
- <div id="github-watch"><a href="https://github.com/medialize/URI.js" class="gitwatch">URI.js Github Repository</a></div>
-
- <div id="container">
- <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
-
- <ul class="menu">
- <li class="active"><a href="/URI.js/">Intro</a></li>
- <li><a href="about-uris.html">Understanding URIs</a></li>
- <li><a href="docs.html">API-Documentation</a></li>
- <li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
- <li><a href="uri-template.html">URI Template</a></li>
- <li><a href="build.html">Build</a></li>
- <li><a href="http://rodneyrehm.de/en/">Author</a></li>
- </ul>
-
- <p>URI.js is a javascript library for working with URLs. It offers a "jQuery-style" API (<a href="http://en.wikipedia.org/wiki/Fluent_interface">Fluent Interface</a>, Method Chaining) to read and write all regular components and a number of convenience methods like
- .<a href="docs.html#accessors-directory">directory</a>() and .<a href="docs.html#accessors-authority">authority</a>().</p>
- <p>URI.js offers simple, yet powerful ways of working with query string, has a number of URI-normalization functions and converts relative/absolute paths.</p>
- <p>While URI.js provides a <a href="jquery-uri-plugin.html">jQuery plugin</a>. URI.js itself does not rely on jQuery. You <em>don't need jQuery</em> to use URI.js</p>
-
- <h2>Examples</h2>
- <p>How do you like manipulating URLs the "jQuery-style"?</p>
- <pre class="prettyprint lang-js">// mutating URLs
-URI("http://example.org/foo.html?hello=world")
- .<a href="docs.html#accessors-username">username</a>("rodneyrehm")
- // -> http://rodneyrehm@example.org/foo.html?hello=world
- .<a href="docs.html#accessors-username">username</a>("")
- // -> http://example.org/foo.html?hello=world
- .<a href="docs.html#accessors-directory">directory</a>("bar")
- // -> http://example.org/bar/foo.html?hello=world
- .<a href="docs.html#accessors-suffix">suffix</a>("xml")
- // -> http://example.org/bar/foo.xml?hello=world
- .<a href="docs.html#accessors-hash">hash</a>("hackernews")
- // -> http://example.org/bar/foo.xml?hello=world#hackernews
- .<a href="docs.html#accessors-fragment">fragment</a>("")
- // -> http://example.org/bar/foo.xml?hello=world
- .<a href="docs.html#accessors-search">search</a>("") // alias of .query()
- // -> http://example.org/bar/foo.xml
- .<a href="docs.html#accessors-tld">tld</a>("com")
- // -> http://example.com/bar/foo.xml
- .<a href="docs.html#accessors-search">search</a>({ foo: "bar", hello: ["world", "mars"] });
- // -> http://example.com/bar/foo.xml?foo=bar&amp;hello=world&amp;hello=mars</pre>
-
- <p>How do you like working query strings?</p>
- <pre class="prettyprint lang-js">URI("?hello=world")
- .<a href="docs.html#search-add">addSearch</a>("hello", "mars")
- // -> ?hello=world&amp;hello=mars
- .<a href="docs.html#search-add">addSearch</a>({ foo: ["bar", "baz"] })
- // -> ?hello=world&amp;hello=mars&amp;foo=bar&amp;foo=baz
- .<a href="docs.html#search-remove">removeSearch</a>("hello", "mars")
- // -> ?hello=world&amp;foo=bar&amp;foo=baz
- .<a href="docs.html#search-remove">removeSearch</a>("foo")
- // -> ?hello=world
- </pre>
-
- <p>How do you like relative paths?</p>
- <pre class="prettyprint lang-js">URI("/relative/path")
- .<a href="docs.html#relativeto">relativeTo</a>("/relative/sub/foo/sub/file")
- // -> ../../../path
- .<a href="docs.html#absolute">absoluteTo</a>("/relative/sub/foo/sub/file");
- // -> /relative/path </pre>
-
- <p>How do you like cleaning things up?</p>
- <pre class="prettyprint lang-js">URI("?&amp;foo=bar&amp;&amp;foo=bar&amp;foo=baz&amp;&quot;)
- .<a href="docs.html#normalize-search">normalizeSearch</a>();
- // -&gt; ?foo=bar&amp;foo=baz
-
-URI("/hello/foo/woo/.././../world.html")
- .<a href="docs.html#normalize-path">normalizePathname</a>();
- // -> /hello/world.html </pre>
-
- <p>How do you like detecting URIs within random text?</p>
- <pre class="prettyprint lang-js">var source = "Hello www.example.com,\n"
- + "http://google.com is a search engine, like http://www.bing.com\n"
- + "http://exämple.org/foo.html?baz=la#bumm is an IDN URL,\n"
- + "http://123.123.123.123/foo.html is IPv4 and "
- + "http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html is IPv6.\n"
- + "links can also be in parens (http://example.org) "
- + "or quotes »http://example.org«.";
-
-var result = <a href="docs.html#static-withinString">URI.withinString</a>(source, function(url) {
- return "&lt;a&gt;" + url + "&lt;/a&gt;";
-});
-
-/* result is:
-Hello <strong>&lt;a&gt;www.example.com&lt;/a&gt;</strong>,
-<strong>&lt;a&gt;http://google.com&lt;/a&gt;</strong> is a search engine, like <strong>&lt;a&gt;http://www.bing.com&lt;/a&gt;</strong>
-<strong>&lt;a&gt;http://ex&auml;mple.org/foo.html?baz=la#bumm&lt;/a&gt;</strong> is an IDN URL,
-<strong>&lt;a&gt;http://123.123.123.123/foo.html&lt;/a&gt;</strong> is IPv4 and <strong>&lt;a&gt;http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html&lt;/a&gt;</strong> is IPv6.
-links can also be in parens (<strong>&lt;a&gt;http://example.org&lt;/a&gt;</strong>) or quotes &raquo;<strong>&lt;a&gt;http://example.org&lt;/a&gt;</strong>&laquo;.
-*/
-</pre>
-
- <p>How do you like comparing URLs?</p>
- <pre class="prettyprint lang-js">var a = "http://example.org/foo/bar.html"
- + "?foo=bar&amp;hello=world&amp;hello=mars#fragment",
- b = "http://exAMPle.org:80/foo/../foo/bar.html"
- + "?hello=mars&amp;foo=bar&amp;hello=world&amp;#fragment";
-
-a !== b;
-URI(a).<a href="docs.html#equals">equals</a>(b) === true;</pre>
-
- <p>How do you like fiddling with the fragment?</p>
- <pre class="prettyprint lang-js">// <strong>storing values in the fragment (hash):</strong>
-var uri = URI("#hello-world");
-uri.fragment({foo: "bar", bar: ["hello", "world"]});
-uri.fragment() === "foo=bar&amp;bar=hello&amp;bar=world";
-// required src/URI.fragmentQuery.js to be loaded
-
-// <strong>storing URLs in the fragment (hash):</strong>
-var uri = URI("http://example.org/#!/foo/bar/baz.html"),
- furi = uri.fragment(true);
-furi.pathname() === "/foo/bar/baz.html";
-furi.pathname("/hello.html");
-uri.toString() === "http://example.org/#!/hello.html"
-// required src/URI.fragmentURI.js to be loaded</pre>
-
- <p>How do you like parsing URNs?</p>
- <pre class="prettyprint lang-js">var uri = URI("urn:uuid:c5542ab6-3d96-403e-8e6b-b8bb52f48d9a?query=string");
-uri.protocol() == "urn";
-uri.path() == "uuid:c5542ab6-3d96-403e-8e6b-b8bb52f48d9a";
-uri.query() == "query=string";</pre>
-
- <p>How do you like URI Templating?</p>
- <pre class="prettyprint lang-js">URI.expand("/foo/{dir}/{file}", {
- dir: "bar",
- file: "world.html"
-});
-// -> /foo/bar/world.html</pre>
-
- <h2 id="authors">Authors</h2>
- <ul>
- <li><a href="http://rodneyrehm.de/en/">Rodney Rehm</a></li>
- </ul>
-
- <h2 id="license">License</h2>
- <p>URI.js is published under the <a href="http://www.opensource.org/licenses/mit-license">MIT license</a>.</p>
-
- </div>
-
- <script type="text/javascript" src="https://raw.github.com/addyosmani/github-watchers-button/master/github-watchers.min.js"></script>
-</body>
-</html> \ No newline at end of file
diff --git a/thirdparty/URI.js/jquery-1.10.2.min.js b/thirdparty/URI.js/jquery-1.10.2.min.js
deleted file mode 100644
index da4170647..000000000
--- a/thirdparty/URI.js/jquery-1.10.2.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
-//@ sourceMappingURL=jquery-1.10.2.min.map
-*/
-(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
-}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
-u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
diff --git a/thirdparty/URI.js/jquery-1.7.2.min.js b/thirdparty/URI.js/jquery-1.7.2.min.js
deleted file mode 100644
index 93adea19f..000000000
--- a/thirdparty/URI.js/jquery-1.7.2.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.7.2 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
-a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
-.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file
diff --git a/thirdparty/URI.js/jquery-1.8.2.min.js b/thirdparty/URI.js/jquery-1.8.2.min.js
deleted file mode 100644
index 63174a0d6..000000000
--- a/thirdparty/URI.js/jquery-1.8.2.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery v1.8.2 jquery.com | jquery.org/license */
-(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cA(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cv;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cA(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cA(a,c,d,e,"*",g)),h}function cB(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cC(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cD(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cL(){try{return new a.XMLHttpRequest}catch(b){}}function cM(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cU(){return setTimeout(function(){cN=b},0),cN=p.now()}function cV(a,b){p.each(b,function(b,c){var d=(cT[b]||[]).concat(cT["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cW(a,b,c){var d,e=0,f=0,g=cS.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cN||cU(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cN||cU(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cX(k,j.opts.specialEasing);for(;e<g;e++){d=cS[e].call(j,a,k,j.opts);if(d)return d}return cV(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cX(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cY(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bZ(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cc(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cP.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cZ(a,b,c,d,e){return new cZ.prototype.init(a,b,c,d,e)}function c$(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b)c=bV[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function da(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o&&!o.call(" ")?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":(a+"").replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete")setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);e==="function"&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&e!=="string"&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")||(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)f.indexOf(" "+b[g]+" ")<0&&(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&p.expr.match.needsContext.test(f),namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=k.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click"))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){h={},j=[];for(d=0;d<q;d++)l=o[d],m=l.selector,h[m]===b&&(h[m]=l.needsContext?p(m,this).index(f)>=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){i=u[d],c.currentTarget=i.elem;for(e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++){l=i.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,g=((p.event.special[l.origType]||{}).handle||l.handler).apply(i.elem,r),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h<i;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),j&&b.push(h);return g}function bl(a,b,c,d,e,f){return d&&!d[o]&&(d=bl(d)),e&&!e[o]&&(e=bl(e,f)),z(function(f,g,h,i){if(f&&e)return;var j,k,l,m=[],n=[],o=g.length,p=f||bo(b||"*",h.nodeType?[h]:h,[],f),q=a&&(f||!b)?bk(p,m,a,h,i):p,r=c?e||(f?a:o||d)?[]:g:q;c&&c(q,r,h,i);if(d){l=bk(r,n),d(l,[],h,i),j=l.length;while(j--)if(k=l[j])r[n[j]]=!(q[n[j]]=k)}if(f){j=a&&r.length;while(j--)if(k=r[j])f[m[j]]=!(g[m[j]]=k)}else r=bk(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):w.apply(g,r)})}function bm(a){var b,c,d,f=a.length,g=e.relative[a[0].type],h=g||e.relative[" "],i=g?1:0,j=bi(function(a){return a===b},h,!0),k=bi(function(a){return y.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i<f;i++)if(c=e.relative[a[i].type])m=[bi(bj(m),c)];else{c=e.filter[a[i].type].apply(null,a[i].matches);if(c[o]){d=++i;for(;d<f;d++)if(e.relative[a[d].type])break;return bl(i>1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i<d&&bm(a.slice(i,d)),d<f&&bm(a=a.slice(d)),d<f&&a.join(""))}m.push(c)}return bj(m)}function bn(a,b){var d=b.length>0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)bc(a,b[e],c,d);return c}function bp(a,b,c,d,f){var g,h,j,k,l,m=bh(a),n=m.length;if(!d&&m.length===1){h=m[0]=m[0].slice(0);if(h.length>2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;b<c;b++)if(this[b]===a)return b;return-1},z=function(a,b){return a[o]=b==null||b,a},A=function(){var a={},b=[];return z(function(c,d){return b.push(c)>e.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d<b;d+=2)a.push(d);return a}),odd:bf(function(a,b,c){for(var d=1;d<b;d+=2)a.push(d);return a}),lt:bf(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},j=s.compareDocumentPosition?function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bg(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bg(e[j],f[j]);return j===c?bg(a,f[j],-1):bg(e[j],b,1)},[0,0].sort(j),m=!k,bc.uniqueSort=function(a){var b,c=1;k=m,a.sort(j);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1);return a},bc.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},i=bc.compile=function(a,b){var c,d=[],e=[],f=D[o][a];if(!f){b||(b=bh(a)),c=b.length;while(c--)f=bm(b[c]),f[o]?d.push(f):e.push(f);f=D(a,bn(e,d))}return f},r.querySelectorAll&&function(){var a,b=bp,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[":focus"],f=[":active",":focus"],h=s.matchesSelector||s.mozMatchesSelector||s.webkitMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;X(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cT[c]=cT[c]||[],cT[c].unshift(b)},prefilter:function(a,b){b?cS.unshift(a):cS.push(a)}}),p.Tween=cZ,cZ.prototype={constructor:cZ,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cZ.propHooks[this.prop];return a&&a.get?a.get(this):cZ.propHooks._default.get(this)},run:function(a){var b,c=cZ.propHooks[this.prop];return this.options.duration?this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cZ.propHooks._default.set(this),this}},cZ.prototype.init.prototype=cZ.prototype,cZ.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cZ.propHooks.scrollTop=cZ.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(c$(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bZ).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cW(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cR.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:c$("show"),slideUp:c$("hide"),slideToggle:c$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cZ.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cO&&(cO=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cO),cO=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c_=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(!l)return;return(d=l.body)===k?p.offset.bodyOffset(k):(c=l.documentElement,p.contains(c,k)?(typeof k.getBoundingClientRect!="undefined"&&(j=k.getBoundingClientRect()),e=da(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window); \ No newline at end of file
diff --git a/thirdparty/URI.js/jquery-1.9.1.min.js b/thirdparty/URI.js/jquery-1.9.1.min.js
deleted file mode 100644
index 006e95310..000000000
--- a/thirdparty/URI.js/jquery-1.9.1.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
-//@ sourceMappingURL=jquery.min.map
-*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
-return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
-}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window); \ No newline at end of file
diff --git a/thirdparty/URI.js/jquery-uri-plugin.html b/thirdparty/URI.js/jquery-uri-plugin.html
deleted file mode 100644
index f7d9bac6d..000000000
--- a/thirdparty/URI.js/jquery-uri-plugin.html
+++ /dev/null
@@ -1,203 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>URI.js - jQuery URI Plugin</title>
- <meta name="description" content="URI.js is a Javascript library for working with URLs." />
-
- <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
- <script src="prettify/prettify.js" type="text/javascript"></script>
- <script src="screen.js" type="text/javascript"></script>
- <link href="screen.css" rel="stylesheet" type="text/css" />
- <link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
- <script src="src/URI.min.js" type="text/javascript"></script>
- <script src="src/jquery.URI.js" type="text/javascript"></script>
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-8922143-3']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
-</head>
-<body>
- <a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
-
- <div id="container">
- <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
-
- <ul class="menu">
- <li><a href="/URI.js/">Intro</a></li>
- <li><a href="about-uris.html">Understanding URIs</a></li>
- <li><a href="docs.html">API-Documentation</a></li>
- <li class="active"><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
- <li><a href="uri-template.html">URI Template</a></li>
- <li><a href="build.html">Build</a></li>
- <li><a href="http://rodneyrehm.de/en/">Author</a></li>
- </ul>
-
- <h2>URI.js jQuery Plugin</h2>
- <p>As of version 1.6.0 URI.js offers a simple jQuery integration. For the plugin to work, you need to regularly load <code>URI.js</code>, as well as <code>jquery.URI.js</code>.</p>
- <p>URI.js does not depend on jQuery unless you want to use the URI.js jQuery Plugin</p>
-
- <h2>Accessing the URI Instance</h2>
- <pre class="prettyprint lang-js">
-var $a = $('&lt;a href=&quot;http://google.com/hello.html&quot;&gt;Demo&lt;/a&gt;');
-var uri = $a.uri();
-
-// URI instance and DOMElement are always in sync
-uri.domain() == 'google.com';
-uri.domain('example.org');
-$a.attr('href') == 'http://example.org/hello.html';
-
-// access to <strong>href</strong>, <strong>src</strong> and <strong>action</strong>
-// transparently update the URI instance
-$a.attr('href', '/other.file');
-uri.href() == '/other.file';
-
-// $.fn.uri() passes values to DOM and URI
-$a.uri('/hello/world.html');
-$a.attr('href') == '/hello/world.html';
-uri.href() == '/hello/world.html';</pre>
-
- <h2>Accessing URI components</h2>
- <pre class="prettyprint lang-js">var $a = $('&lt;a href=&quot;http://www.google.com/hello.html&quot;&gt;Demo&lt;/a&gt;');
-
-// read
-$a.attr('uri:domain') == 'google.com';
-
-// write
-$a.attr('uri:domain', 'example.org');
-$a.attr('href') == 'http://www.example.org/hello.html';</pre>
-
- <p>All URI-component accessors (except <a href="docs.html#accessors-segment">segment</a>) can be used:
- <a href="docs.html#accessors-origin">origin</a>,
- <a href="docs.html#accessors-authority">authority</a>,
- <a href="docs.html#accessors-directory">directory</a>,
- <a href="docs.html#accessors-domain">domain</a>,
- <a href="docs.html#accessors-filename">filename</a>,
- <a href="docs.html#accessors-hash">fragment</a>,
- <a href="docs.html#accessors-hash">hash</a>,
- <a href="docs.html#accessors-host">host</a>,
- <a href="docs.html#accessors-hostname">hostname</a>,
- <a href="docs.html#accessors-href">href</a>,
- <a href="docs.html#accessors-password">password</a>,
- <a href="docs.html#accessors-path">path</a>,
- <a href="docs.html#accessors-pathname">pathname</a>,
- <a href="docs.html#accessors-port">port</a>,
- <a href="docs.html#accessors-protocol">protocol</a>,
- <a href="docs.html#accessors-search">query</a>,
- <a href="docs.html#accessors-protocol">scheme</a>,
- <a href="docs.html#accessors-resource">resource</a>,
- <a href="docs.html#accessors-search">search</a>,
- <a href="docs.html#accessors-subdomain">subdomain</a>,
- <a href="docs.html#accessors-suffix">suffix</a>,
- <a href="docs.html#accessors-tld">tld</a>,
- <a href="docs.html#accessors-username">username</a>.
- </p>
-
- <h2>Selectors</h2>
- <p>You may find yourself wanting to select all links to a certain file-type or a specific domain. <code>:uri()</code> is a pseudo-class filter that will help you with that:</p>
- <pre class="prettyprint lang-html">
-&lt;div class=&quot;first&quot;&gt;
- &lt;a href=&quot;/my.pdf?with=query&quot;&gt;PDF&lt;/a&gt;
- &lt;a href=&quot;http://google.com/&quot;&gt;Google1&lt;/a&gt;
-&lt;/div&gt;
-&lt;div class=&quot;second&quot;&gt;
- &lt;a href=&quot;http://www.google.com/&quot;&gt;Google2&lt;/a&gt;
- &lt;a href=&quot;https://github.com/some/directory/help.html&quot;&gt;Github&lt;/a&gt;
-&lt;/div&gt;
-</pre>
- <pre class="prettyprint lang-js">// finding links to a given file-type
-$('a:uri(suffix = pdf)');
-// -&gt; finds PDF
-
-// selecting links to a directory (or child thereof)
-$('a:uri(directory *= /directory/)');
-// -&gt; finds Github
-
-// selecting links to google.com
-$('a:uri(domain = google.com)');
-// -&gt; finds Google1, Google2
-
-// selecting all relative links
-$('a:uri(is: relative)');
-// -&gt; finds PDF
-
-// selecting links regardless of their representation
-$('a:uri(equals: http://github.com/some/other/../directory/help.html)');
-// -&gt; finds Github
-
-// finding elements containing a link to github
-$('div').has('a:uri(domain = github)')
-// -&gt; finds div.second
-
-// testing if the protocol matches
-$('a').eq(1).is(':uri(protocol = http)');
-// -&gt; is true
-
-// event delegation
-$(document).on('click', 'a:uri(scheme=javscript)', function(e) {
- if (!confirm("do you really want to execute this script?\n\n" + this.href)) {
- e.preventDefault();
- e.stopImmediatePropagation();
- }
-});</pre>
-
- <h3>The :uri() pseudo selector</h3>
- <p><code>:uri()</code> accepts the following three argument patterns:</p>
-
- <ul>
- <li><code>:uri(<em>accessor</em> operator <strong>string</strong>)</code> to compare a single URI-component</li>
- <li><code>:uri(is: <strong>string</strong>)</code> to compare against <a href="docs.html#is">.is()</a></li>
- <li><code>:uri(equals: <strong>string</strong>)</code> to compare URLs using <a href="docs.html#equals">.equals()</a></li>
- </ul>
-
- <p>Note: It is a good idea to prepend the element(s) you're looking for. <code>a:uri(is: relative)</code> is much faster than <code>:uri(is: relative)</code>.</p>
- <p>Note: <code>")"</code> may not be used in your comparison-<code>string</code>, as jQuery (Sizzle, actually) can't handle that properly.</p>
-
- <h3>Comparison Accessors</h3>
- <p>All URI-component accessors (except <a href="docs.html#accessors-segment">segment</a>) can be used:
- <a href="docs.html#accessors-authority">authority</a>,
- <a href="docs.html#accessors-directory">directory</a>,
- <a href="docs.html#accessors-domain">domain</a>,
- <a href="docs.html#accessors-filename">filename</a>,
- <a href="docs.html#accessors-hash">fragment</a>,
- <a href="docs.html#accessors-hash">hash</a>,
- <a href="docs.html#accessors-host">host</a>,
- <a href="docs.html#accessors-hostname">hostname</a>,
- <a href="docs.html#accessors-href">href</a>,
- <a href="docs.html#accessors-password">password</a>,
- <a href="docs.html#accessors-path">path</a>,
- <a href="docs.html#accessors-pathname">pathname</a>,
- <a href="docs.html#accessors-port">port</a>,
- <a href="docs.html#accessors-protocol">protocol</a>,
- <a href="docs.html#accessors-search">query</a>,
- <a href="docs.html#accessors-protocol">scheme</a>,
- <a href="docs.html#accessors-resource">resource</a>,
- <a href="docs.html#accessors-search">search</a>,
- <a href="docs.html#accessors-subdomain">subdomain</a>,
- <a href="docs.html#accessors-suffix">suffix</a>,
- <a href="docs.html#accessors-tld">tld</a>,
- <a href="docs.html#accessors-username">username</a>.
- </p>
-
- <h3>Comparison Operators</h3>
- <p>Comparison operators are derived from CSS attribute match operators:</p>
- <dl>
- <dt>=</dt><dd>Exact match of <code>accessor</code> and <code>string</code></dd>
- <dt>^=</dt><dd><code>accessor</code> begins with <code>string</code> (case-insensitive)</dd>
- <dt>$=</dt><dd><code>accessor</code> ends with <code>string</code> (case-insensitive)</dd>
- <dt>*=</dt><dd><code>accessor</code> contains <code>string</code> (case-insensitive)</dd>
- </dl>
-
- </div>
-</body>
-</html> \ No newline at end of file
diff --git a/thirdparty/URI.js/package.json b/thirdparty/URI.js/package.json
deleted file mode 100644
index 3e4c0c0ed..000000000
--- a/thirdparty/URI.js/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "name": "urijs",
- "version": "1.18.2",
- "title": "URI.js - Mutating URLs",
- "author": {
- "name": "Rodney Rehm",
- "url": "http://rodneyrehm.de"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/medialize/URI.js.git"
- },
- "license": "MIT",
- "description": "URI.js is a Javascript library for working with URLs.",
- "keywords": [
- "uri",
- "url",
- "urn",
- "uri mutation",
- "url mutation",
- "uri manipulation",
- "url manipulation",
- "uri template",
- "url template",
- "unified resource locator",
- "unified resource identifier",
- "query string",
- "RFC 3986",
- "RFC3986",
- "RFC 6570",
- "RFC6570",
- "jquery-plugin",
- "ecosystem:jquery"
- ],
- "categories": [
- "Parsers & Compilers",
- "Utilities"
- ],
- "main": "./src/URI",
- "homepage": "http://medialize.github.io/URI.js/",
- "contributors": [
- "Francois-Guillaume Ribreau <npm@fgribreau.com> (http://fgribreau.com)",
- "Justin Chase <justin.m.chase@gmail.com> (http://justinmchase.com)"
- ],
- "files": [
- "src/URI.js",
- "src/IPv6.js",
- "src/SecondLevelDomains.js",
- "src/punycode.js",
- "src/URITemplate.js",
- "src/jquery.URI.js",
- "src/URI.min.js",
- "src/jquery.URI.min.js",
- "src/URI.fragmentQuery.js",
- "src/URI.fragmentURI.js",
- "LICENSE.txt"
- ],
- "npmName": "urijs",
- "npmFileMap": [
- {
- "basePath": "/src/",
- "files": [
- "*.js"
- ]
- },
- {
- "basePath": "/",
- "files": [
- "LICENSE.txt"
- ]
- }
- ],
- "devDependencies": {
- "jshint-stylish": "~0.1.5",
- "grunt": "~0.4.2",
- "grunt-contrib-jshint": "~0.8.0"
- }
-}
diff --git a/thirdparty/URI.js/prettify/lang-apollo.js b/thirdparty/URI.js/prettify/lang-apollo.js
deleted file mode 100644
index 7098baf41..000000000
--- a/thirdparty/URI.js/prettify/lang-apollo.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
-null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
diff --git a/thirdparty/URI.js/prettify/lang-clj.js b/thirdparty/URI.js/prettify/lang-clj.js
deleted file mode 100644
index 542a2205f..000000000
--- a/thirdparty/URI.js/prettify/lang-clj.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- Copyright (C) 2011 Google Inc.
-
- 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.
-*/
-var a=null;
-PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
-["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
diff --git a/thirdparty/URI.js/prettify/lang-css.js b/thirdparty/URI.js/prettify/lang-css.js
deleted file mode 100644
index 041e1f590..000000000
--- a/thirdparty/URI.js/prettify/lang-css.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
-/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
diff --git a/thirdparty/URI.js/prettify/lang-go.js b/thirdparty/URI.js/prettify/lang-go.js
deleted file mode 100644
index fc18dc079..000000000
--- a/thirdparty/URI.js/prettify/lang-go.js
+++ /dev/null
@@ -1 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
diff --git a/thirdparty/URI.js/prettify/lang-hs.js b/thirdparty/URI.js/prettify/lang-hs.js
deleted file mode 100644
index 9d77b0838..000000000
--- a/thirdparty/URI.js/prettify/lang-hs.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
-null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
diff --git a/thirdparty/URI.js/prettify/lang-lisp.js b/thirdparty/URI.js/prettify/lang-lisp.js
deleted file mode 100644
index 02a30e8d1..000000000
--- a/thirdparty/URI.js/prettify/lang-lisp.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var a=null;
-PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
-["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]);
diff --git a/thirdparty/URI.js/prettify/lang-lua.js b/thirdparty/URI.js/prettify/lang-lua.js
deleted file mode 100644
index e83a3c469..000000000
--- a/thirdparty/URI.js/prettify/lang-lua.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
-["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
diff --git a/thirdparty/URI.js/prettify/lang-ml.js b/thirdparty/URI.js/prettify/lang-ml.js
deleted file mode 100644
index 6df02d728..000000000
--- a/thirdparty/URI.js/prettify/lang-ml.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
-["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
diff --git a/thirdparty/URI.js/prettify/lang-n.js b/thirdparty/URI.js/prettify/lang-n.js
deleted file mode 100644
index 6c2e85b98..000000000
--- a/thirdparty/URI.js/prettify/lang-n.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var a=null;
-PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
-a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
-a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
diff --git a/thirdparty/URI.js/prettify/lang-proto.js b/thirdparty/URI.js/prettify/lang-proto.js
deleted file mode 100644
index f006ad8cf..000000000
--- a/thirdparty/URI.js/prettify/lang-proto.js
+++ /dev/null
@@ -1 +0,0 @@
-PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
diff --git a/thirdparty/URI.js/prettify/lang-scala.js b/thirdparty/URI.js/prettify/lang-scala.js
deleted file mode 100644
index 60d034de4..000000000
--- a/thirdparty/URI.js/prettify/lang-scala.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
-["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
diff --git a/thirdparty/URI.js/prettify/lang-sql.js b/thirdparty/URI.js/prettify/lang-sql.js
deleted file mode 100644
index da705b0b6..000000000
--- a/thirdparty/URI.js/prettify/lang-sql.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|merge|national|nocheck|nonclustered|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|percent|plan|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rule|save|schema|select|session_user|set|setuser|shutdown|some|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|union|unique|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|writetext)(?=[^\w-]|$)/i,
-null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
diff --git a/thirdparty/URI.js/prettify/lang-tex.js b/thirdparty/URI.js/prettify/lang-tex.js
deleted file mode 100644
index ce96fbbd1..000000000
--- a/thirdparty/URI.js/prettify/lang-tex.js
+++ /dev/null
@@ -1 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
diff --git a/thirdparty/URI.js/prettify/lang-vb.js b/thirdparty/URI.js/prettify/lang-vb.js
deleted file mode 100644
index 07506b03c..000000000
--- a/thirdparty/URI.js/prettify/lang-vb.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r Â\xa0

"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"“â€'],["com",/^['\u2018\u2019].*/,null,"'‘’"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
-null],["com",/^rem.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
diff --git a/thirdparty/URI.js/prettify/lang-vhdl.js b/thirdparty/URI.js/prettify/lang-vhdl.js
deleted file mode 100644
index 128b5b6cf..000000000
--- a/thirdparty/URI.js/prettify/lang-vhdl.js
+++ /dev/null
@@ -1,3 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
-null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
-["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
diff --git a/thirdparty/URI.js/prettify/lang-wiki.js b/thirdparty/URI.js/prettify/lang-wiki.js
deleted file mode 100644
index 9b0b44873..000000000
--- a/thirdparty/URI.js/prettify/lang-wiki.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t Â\xa0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
-PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
diff --git a/thirdparty/URI.js/prettify/lang-xq.js b/thirdparty/URI.js/prettify/lang-xq.js
deleted file mode 100644
index e323ae323..000000000
--- a/thirdparty/URI.js/prettify/lang-xq.js
+++ /dev/null
@@ -1,3 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["var pln",/^\$[\w-]+/,null,"$"]],[["pln",/^[\s=][<>][\s=]/],["lit",/^@[\w-]+/],["tag",/^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["com",/^\(:[\S\s]*?:\)/],["pln",/^[(),/;[\]{}]$/],["str",/^(?:"(?:[^"\\{]|\\[\S\s])*(?:"|$)|'(?:[^'\\{]|\\[\S\s])*(?:'|$))/,null,"\"'"],["kwd",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/],
-["typ",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/,null],["fun pln",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/],
-["pln",/^[\w:-]+/],["pln",/^[\t\n\r \xa0]+/]]),["xq","xquery"]);
diff --git a/thirdparty/URI.js/prettify/lang-yaml.js b/thirdparty/URI.js/prettify/lang-yaml.js
deleted file mode 100644
index c38729b6c..000000000
--- a/thirdparty/URI.js/prettify/lang-yaml.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var a=null;
-PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
diff --git a/thirdparty/URI.js/prettify/prettify.css b/thirdparty/URI.js/prettify/prettify.css
deleted file mode 100644
index d44b3a228..000000000
--- a/thirdparty/URI.js/prettify/prettify.css
+++ /dev/null
@@ -1 +0,0 @@
-.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file
diff --git a/thirdparty/URI.js/prettify/prettify.js b/thirdparty/URI.js/prettify/prettify.js
deleted file mode 100644
index eef5ad7e6..000000000
--- a/thirdparty/URI.js/prettify/prettify.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
-(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
-[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
-f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
-(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
-{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
-t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
-"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
-l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
-q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
-q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
-"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
-a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
-for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
-m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
-a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
-j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
-"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
-H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
-J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
-I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
-["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
-/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
-["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
-hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
-!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
-250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
-PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
diff --git a/thirdparty/URI.js/prettify/prettify.sunburst.css b/thirdparty/URI.js/prettify/prettify.sunburst.css
deleted file mode 100644
index 79f71175a..000000000
--- a/thirdparty/URI.js/prettify/prettify.sunburst.css
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Pretty printing styles. Used with prettify.js. */
-/* Vim sunburst theme by David Leibovic */
-
-pre .str, code .str { color: #65B042; } /* string - green */
-pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */
-pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */
-pre .typ, code .typ { color: #89bdff; } /* type - light blue */
-pre .lit, code .lit { color: #3387CC; } /* literal - blue */
-pre .pun, code .pun { color: #fff; } /* punctuation - white */
-pre .pln, code .pln { color: #fff; } /* plaintext - white */
-pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */
-pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */
-pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */
-pre .dec, code .dec { color: #3387CC; } /* decimal - blue */
-
-pre.prettyprint, code.prettyprint {
- background-color: #000;
-
- -webkit-border-radius: 8px;
- -khtml-border-radius: 8px;
- -moz-border-radius: 8px;
- -ms-border-radius: 8px;
- -o-border-radius: 8px;
- border-radius: 8px;
-}
-
-pre.prettyprint {
- width: 95%;
- margin: 1em auto;
- padding: 1em;
- white-space: pre-wrap;
-}
-
-
-/* Specify class=linenums on a pre to get line numbering */
-ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */
-li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
-/* Alternate shading for lines */
-li.L1,li.L3,li.L5,li.L7,li.L9 { }
-
-@media print {
- pre .str, code .str { color: #060; }
- pre .kwd, code .kwd { color: #006; font-weight: bold; }
- pre .com, code .com { color: #600; font-style: italic; }
- pre .typ, code .typ { color: #404; font-weight: bold; }
- pre .lit, code .lit { color: #044; }
- pre .pun, code .pun { color: #440; }
- pre .pln, code .pln { color: #000; }
- pre .tag, code .tag { color: #006; font-weight: bold; }
- pre .atn, code .atn { color: #404; }
- pre .atv, code .atv { color: #060; }
-} \ No newline at end of file
diff --git a/thirdparty/URI.js/screen.css b/thirdparty/URI.js/screen.css
deleted file mode 100644
index afd0899d6..000000000
--- a/thirdparty/URI.js/screen.css
+++ /dev/null
@@ -1,181 +0,0 @@
-@charset "utf-8";
-
-body {
- margin: 0;
- background-color: #D0D0D0;
- font-family: "Helvetica,Arial,FreeSans";
- color: #000000;
-}
-
-img { border:0; }
-
-#container {
- margin: 0 auto;
- width: 700px;
- padding: 20px;
- background-color: #FFFFFF;
- border-left: 1px solid #999999;
- border-right: 1px solid #999999;
-}
-
-h1 {
- font-size: 3.8em;
- color: #2c879b;
- margin-bottom: 3px;
-}
-
-h1 > .small {
- font-size: 0.4em;
-}
-
-h1 a {
- text-decoration: none
-}
-
-h2 {
- font-size: 1.5em;
- color: #2c879b;
- border-bottom: 1px dotted #2c879b;
-}
-
-h3 {
- text-align: center;
- color: #2c879b;
-}
-
-a {
- color: #2c879b;
-}
-
-.description {
- font-size: 1.2em;
- margin-bottom: 30px;
- margin-top: 30px;
- font-style: italic;
-}
-
-/*
-pre {
- background: #000;
- color: #fff;
- padding: 15px;
-}
-*/
-
-hr {
- border: 0;
- width: 80%;
- border-bottom: 1px solid #aaa;
-}
-
-ul.plain-list {
- list-style-type:none;
- margin:0;
- padding:0;
-}
-
-ul.plain-list > li {
- list-style-type:none;
- margin:0;
- padding:0;
-}
-
-#download {
- float: right;
-}
-
-#github-forkme {
- position: absolute;
- top: 0;
- right: 0;
-}
-
-#github-watch {
- position: fixed;
- bottom: 10px;
- right: 10px;
-}
-
-#container .footer { text-align:center; padding-top:30px; font-style: italic; }
-
-.menu { font-size: 0; }
-.menu > li {
- list-style-type: none;
- display: inline-block;
- font-size: 15px;
-}
-.menu > li + li {
- margin-left: 5px;
-}
-.menu > li > a {
- color: white;
- font-weight: bold;
- background-color: #666;
- text-decoration: none;
- display: block;
- padding: 2px 4px 2px 4px;
-}
-
-.menu > li.active > a {
- background-color: #2C879B;
-}
-
-.menu > li > a:hover {
- background-color: #111;
-}
-
-#demo-list > li.current {
- font-style: italic;
-}
-#demo-list > li.current:after {
- content: "« currently viewing";
- color: #AAA;
- display: inline-block;
- margin-left: 20px;
-}
-
-/* hide whitespace between inline-block elements */
-.inline-spaces { font-size: 0; }
-.inline-spaces > * { font-size: 11px; }
-
-/* demo trigger boxes */
-.box {
- color: #EEE;
- background: #666;
- font-weight: bold;
- padding: 20px;
- text-align: center;
- font-size: 20px;
- margin: 5px 0;
-}
-.box:hover {
- background: #777;
-}
-.box > * {
- display:block;
-}
-.menu-injected { background-color: #C87958; }
-.box.context-menu-disabled { background-color: red; }
-
-.ascii-art .line {
- color: #999;
-}
-
-.ascii-art .label {
- color: #2C879B;
- font-weight: bold;
-}
-
-.note {
- background-color: #EEE;
- padding: 10px;
- margin: -10px;
-}
-.note::before {
- content: "NOTE: ";
- font-weight: bold;
-}
-pre + .note,
-.note + .note {
- margin-top: 10px;
-} \ No newline at end of file
diff --git a/thirdparty/URI.js/screen.js b/thirdparty/URI.js/screen.js
deleted file mode 100644
index 187044de9..000000000
--- a/thirdparty/URI.js/screen.js
+++ /dev/null
@@ -1,39 +0,0 @@
-(function($, undefined){
-
- $(function() {
- if (!window.prettyPrint) {
- return;
- }
-
- $('.showcase').each(function(){
-
- var $this = $(that || this),
- text, nodeName, lang, that;
-
- if ($this.data('showcaseImport')) {
- $this = $($this.data('showcaseImport'));
- that = $this.get(0);
- }
-
- nodeName = (that || this).nodeName.toLowerCase();
- lang = nodeName == 'script'
- ? 'js'
- : (nodeName == 'style' ? 'css' : 'html');
-
- if (lang == 'html') {
- text = $('<div></div>').append($this.clone()).html();
- } else {
- text = $this.text();
- }
-
- $('<pre class="prettyprint lang-'+ lang +'"></pre>')
- .text(text)
- .insertBefore(this);
-
- that && $(this).remove();
- });
-
- prettyPrint();
- });
-
-})(jQuery); \ No newline at end of file
diff --git a/thirdparty/URI.js/src/IPv6.js b/thirdparty/URI.js/src/IPv6.js
deleted file mode 100644
index 2b96598e1..000000000
--- a/thirdparty/URI.js/src/IPv6.js
+++ /dev/null
@@ -1,185 +0,0 @@
-/*!
- * URI.js - Mutating URLs
- * IPv6 Support
- *
- * Version: 1.18.2
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- * MIT License http://www.opensource.org/licenses/mit-license
- *
- */
-
-(function (root, factory) {
- 'use strict';
- // https://github.com/umdjs/umd/blob/master/returnExports.js
- if (typeof exports === 'object') {
- // Node
- module.exports = factory();
- } else if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(factory);
- } else {
- // Browser globals (root is window)
- root.IPv6 = factory(root);
- }
-}(this, function (root) {
- 'use strict';
-
- /*
- var _in = "fe80:0000:0000:0000:0204:61ff:fe9d:f156";
- var _out = IPv6.best(_in);
- var _expected = "fe80::204:61ff:fe9d:f156";
-
- console.log(_in, _out, _expected, _out === _expected);
- */
-
- // save current IPv6 variable, if any
- var _IPv6 = root && root.IPv6;
-
- function bestPresentation(address) {
- // based on:
- // Javascript to test an IPv6 address for proper format, and to
- // present the "best text representation" according to IETF Draft RFC at
- // http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04
- // 8 Feb 2010 Rich Brown, Dartware, LLC
- // Please feel free to use this code as long as you provide a link to
- // http://www.intermapper.com
- // http://intermapper.com/support/tools/IPV6-Validator.aspx
- // http://download.dartware.com/thirdparty/ipv6validator.js
-
- var _address = address.toLowerCase();
- var segments = _address.split(':');
- var length = segments.length;
- var total = 8;
-
- // trim colons (:: or ::a:b:c… or …a:b:c::)
- if (segments[0] === '' && segments[1] === '' && segments[2] === '') {
- // must have been ::
- // remove first two items
- segments.shift();
- segments.shift();
- } else if (segments[0] === '' && segments[1] === '') {
- // must have been ::xxxx
- // remove the first item
- segments.shift();
- } else if (segments[length - 1] === '' && segments[length - 2] === '') {
- // must have been xxxx::
- segments.pop();
- }
-
- length = segments.length;
-
- // adjust total segments for IPv4 trailer
- if (segments[length - 1].indexOf('.') !== -1) {
- // found a "." which means IPv4
- total = 7;
- }
-
- // fill empty segments them with "0000"
- var pos;
- for (pos = 0; pos < length; pos++) {
- if (segments[pos] === '') {
- break;
- }
- }
-
- if (pos < total) {
- segments.splice(pos, 1, '0000');
- while (segments.length < total) {
- segments.splice(pos, 0, '0000');
- }
- }
-
- // strip leading zeros
- var _segments;
- for (var i = 0; i < total; i++) {
- _segments = segments[i].split('');
- for (var j = 0; j < 3 ; j++) {
- if (_segments[0] === '0' && _segments.length > 1) {
- _segments.splice(0,1);
- } else {
- break;
- }
- }
-
- segments[i] = _segments.join('');
- }
-
- // find longest sequence of zeroes and coalesce them into one segment
- var best = -1;
- var _best = 0;
- var _current = 0;
- var current = -1;
- var inzeroes = false;
- // i; already declared
-
- for (i = 0; i < total; i++) {
- if (inzeroes) {
- if (segments[i] === '0') {
- _current += 1;
- } else {
- inzeroes = false;
- if (_current > _best) {
- best = current;
- _best = _current;
- }
- }
- } else {
- if (segments[i] === '0') {
- inzeroes = true;
- current = i;
- _current = 1;
- }
- }
- }
-
- if (_current > _best) {
- best = current;
- _best = _current;
- }
-
- if (_best > 1) {
- segments.splice(best, _best, '');
- }
-
- length = segments.length;
-
- // assemble remaining segments
- var result = '';
- if (segments[0] === '') {
- result = ':';
- }
-
- for (i = 0; i < length; i++) {
- result += segments[i];
- if (i === length - 1) {
- break;
- }
-
- result += ':';
- }
-
- if (segments[length - 1] === '') {
- result += ':';
- }
-
- return result;
- }
-
- function noConflict() {
- /*jshint validthis: true */
- if (root.IPv6 === this) {
- root.IPv6 = _IPv6;
- }
-
- return this;
- }
-
- return {
- best: bestPresentation,
- noConflict: noConflict
- };
-}));
diff --git a/thirdparty/URI.js/src/SecondLevelDomains.js b/thirdparty/URI.js/src/SecondLevelDomains.js
deleted file mode 100644
index 098b74cb4..000000000
--- a/thirdparty/URI.js/src/SecondLevelDomains.js
+++ /dev/null
@@ -1,240 +0,0 @@
-/*!
- * URI.js - Mutating URLs
- * Second Level Domain (SLD) Support
- *
- * Version: 1.18.2
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- * MIT License http://www.opensource.org/licenses/mit-license
- *
- */
-
-(function (root, factory) {
- 'use strict';
- // https://github.com/umdjs/umd/blob/master/returnExports.js
- if (typeof exports === 'object') {
- // Node
- module.exports = factory();
- } else if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(factory);
- } else {
- // Browser globals (root is window)
- root.SecondLevelDomains = factory(root);
- }
-}(this, function (root) {
- 'use strict';
-
- // save current SecondLevelDomains variable, if any
- var _SecondLevelDomains = root && root.SecondLevelDomains;
-
- var SLD = {
- // list of known Second Level Domains
- // converted list of SLDs from https://github.com/gavingmiller/second-level-domains
- // ----
- // publicsuffix.org is more current and actually used by a couple of browsers internally.
- // downside is it also contains domains like "dyndns.org" - which is fine for the security
- // issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js
- // ----
- list: {
- 'ac':' com gov mil net org ',
- 'ae':' ac co gov mil name net org pro sch ',
- 'af':' com edu gov net org ',
- 'al':' com edu gov mil net org ',
- 'ao':' co ed gv it og pb ',
- 'ar':' com edu gob gov int mil net org tur ',
- 'at':' ac co gv or ',
- 'au':' asn com csiro edu gov id net org ',
- 'ba':' co com edu gov mil net org rs unbi unmo unsa untz unze ',
- 'bb':' biz co com edu gov info net org store tv ',
- 'bh':' biz cc com edu gov info net org ',
- 'bn':' com edu gov net org ',
- 'bo':' com edu gob gov int mil net org tv ',
- 'br':' adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ',
- 'bs':' com edu gov net org ',
- 'bz':' du et om ov rg ',
- 'ca':' ab bc mb nb nf nl ns nt nu on pe qc sk yk ',
- 'ck':' biz co edu gen gov info net org ',
- 'cn':' ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ',
- 'co':' com edu gov mil net nom org ',
- 'cr':' ac c co ed fi go or sa ',
- 'cy':' ac biz com ekloges gov ltd name net org parliament press pro tm ',
- 'do':' art com edu gob gov mil net org sld web ',
- 'dz':' art asso com edu gov net org pol ',
- 'ec':' com edu fin gov info med mil net org pro ',
- 'eg':' com edu eun gov mil name net org sci ',
- 'er':' com edu gov ind mil net org rochest w ',
- 'es':' com edu gob nom org ',
- 'et':' biz com edu gov info name net org ',
- 'fj':' ac biz com info mil name net org pro ',
- 'fk':' ac co gov net nom org ',
- 'fr':' asso com f gouv nom prd presse tm ',
- 'gg':' co net org ',
- 'gh':' com edu gov mil org ',
- 'gn':' ac com gov net org ',
- 'gr':' com edu gov mil net org ',
- 'gt':' com edu gob ind mil net org ',
- 'gu':' com edu gov net org ',
- 'hk':' com edu gov idv net org ',
- 'hu':' 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ',
- 'id':' ac co go mil net or sch web ',
- 'il':' ac co gov idf k12 muni net org ',
- 'in':' ac co edu ernet firm gen gov i ind mil net nic org res ',
- 'iq':' com edu gov i mil net org ',
- 'ir':' ac co dnssec gov i id net org sch ',
- 'it':' edu gov ',
- 'je':' co net org ',
- 'jo':' com edu gov mil name net org sch ',
- 'jp':' ac ad co ed go gr lg ne or ',
- 'ke':' ac co go info me mobi ne or sc ',
- 'kh':' com edu gov mil net org per ',
- 'ki':' biz com de edu gov info mob net org tel ',
- 'km':' asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ',
- 'kn':' edu gov net org ',
- 'kr':' ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ',
- 'kw':' com edu gov net org ',
- 'ky':' com edu gov net org ',
- 'kz':' com edu gov mil net org ',
- 'lb':' com edu gov net org ',
- 'lk':' assn com edu gov grp hotel int ltd net ngo org sch soc web ',
- 'lr':' com edu gov net org ',
- 'lv':' asn com conf edu gov id mil net org ',
- 'ly':' com edu gov id med net org plc sch ',
- 'ma':' ac co gov m net org press ',
- 'mc':' asso tm ',
- 'me':' ac co edu gov its net org priv ',
- 'mg':' com edu gov mil nom org prd tm ',
- 'mk':' com edu gov inf name net org pro ',
- 'ml':' com edu gov net org presse ',
- 'mn':' edu gov org ',
- 'mo':' com edu gov net org ',
- 'mt':' com edu gov net org ',
- 'mv':' aero biz com coop edu gov info int mil museum name net org pro ',
- 'mw':' ac co com coop edu gov int museum net org ',
- 'mx':' com edu gob net org ',
- 'my':' com edu gov mil name net org sch ',
- 'nf':' arts com firm info net other per rec store web ',
- 'ng':' biz com edu gov mil mobi name net org sch ',
- 'ni':' ac co com edu gob mil net nom org ',
- 'np':' com edu gov mil net org ',
- 'nr':' biz com edu gov info net org ',
- 'om':' ac biz co com edu gov med mil museum net org pro sch ',
- 'pe':' com edu gob mil net nom org sld ',
- 'ph':' com edu gov i mil net ngo org ',
- 'pk':' biz com edu fam gob gok gon gop gos gov net org web ',
- 'pl':' art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ',
- 'pr':' ac biz com edu est gov info isla name net org pro prof ',
- 'ps':' com edu gov net org plo sec ',
- 'pw':' belau co ed go ne or ',
- 'ro':' arts com firm info nom nt org rec store tm www ',
- 'rs':' ac co edu gov in org ',
- 'sb':' com edu gov net org ',
- 'sc':' com edu gov net org ',
- 'sh':' co com edu gov net nom org ',
- 'sl':' com edu gov net org ',
- 'st':' co com consulado edu embaixada gov mil net org principe saotome store ',
- 'sv':' com edu gob org red ',
- 'sz':' ac co org ',
- 'tr':' av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ',
- 'tt':' aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ',
- 'tw':' club com ebiz edu game gov idv mil net org ',
- 'mu':' ac co com gov net or org ',
- 'mz':' ac co edu gov org ',
- 'na':' co com ',
- 'nz':' ac co cri geek gen govt health iwi maori mil net org parliament school ',
- 'pa':' abo ac com edu gob ing med net nom org sld ',
- 'pt':' com edu gov int net nome org publ ',
- 'py':' com edu gov mil net org ',
- 'qa':' com edu gov mil net org ',
- 're':' asso com nom ',
- 'ru':' ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ',
- 'rw':' ac co com edu gouv gov int mil net ',
- 'sa':' com edu gov med net org pub sch ',
- 'sd':' com edu gov info med net org tv ',
- 'se':' a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ',
- 'sg':' com edu gov idn net org per ',
- 'sn':' art com edu gouv org perso univ ',
- 'sy':' com edu gov mil net news org ',
- 'th':' ac co go in mi net or ',
- 'tj':' ac biz co com edu go gov info int mil name net nic org test web ',
- 'tn':' agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ',
- 'tz':' ac co go ne or ',
- 'ua':' biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ',
- 'ug':' ac co go ne or org sc ',
- 'uk':' ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ',
- 'us':' dni fed isa kids nsn ',
- 'uy':' com edu gub mil net org ',
- 've':' co com edu gob info mil net org web ',
- 'vi':' co com k12 net org ',
- 'vn':' ac biz com edu gov health info int name net org pro ',
- 'ye':' co com gov ltd me net org plc ',
- 'yu':' ac co edu gov org ',
- 'za':' ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ',
- 'zm':' ac co com edu gov net org sch '
- },
- // gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost
- // in both performance and memory footprint. No initialization required.
- // http://jsperf.com/uri-js-sld-regex-vs-binary-search/4
- // Following methods use lastIndexOf() rather than array.split() in order
- // to avoid any memory allocations.
- has: function(domain) {
- var tldOffset = domain.lastIndexOf('.');
- if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
- return false;
- }
- var sldOffset = domain.lastIndexOf('.', tldOffset-1);
- if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
- return false;
- }
- var sldList = SLD.list[domain.slice(tldOffset+1)];
- if (!sldList) {
- return false;
- }
- return sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') >= 0;
- },
- is: function(domain) {
- var tldOffset = domain.lastIndexOf('.');
- if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
- return false;
- }
- var sldOffset = domain.lastIndexOf('.', tldOffset-1);
- if (sldOffset >= 0) {
- return false;
- }
- var sldList = SLD.list[domain.slice(tldOffset+1)];
- if (!sldList) {
- return false;
- }
- return sldList.indexOf(' ' + domain.slice(0, tldOffset) + ' ') >= 0;
- },
- get: function(domain) {
- var tldOffset = domain.lastIndexOf('.');
- if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
- return null;
- }
- var sldOffset = domain.lastIndexOf('.', tldOffset-1);
- if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
- return null;
- }
- var sldList = SLD.list[domain.slice(tldOffset+1)];
- if (!sldList) {
- return null;
- }
- if (sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') < 0) {
- return null;
- }
- return domain.slice(sldOffset+1);
- },
- noConflict: function(){
- if (root.SecondLevelDomains === this) {
- root.SecondLevelDomains = _SecondLevelDomains;
- }
- return this;
- }
- };
-
- return SLD;
-}));
diff --git a/thirdparty/URI.js/src/URI.fragmentQuery.js b/thirdparty/URI.js/src/URI.fragmentQuery.js
deleted file mode 100644
index 75e2583f3..000000000
--- a/thirdparty/URI.js/src/URI.fragmentQuery.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Extending URI.js for fragment abuse
- */
-
-// --------------------------------------------------------------------------------
-// EXAMPLE: storing application/x-www-form-urlencoded data in the fragment
-// possibly helpful for Google's hashbangs
-// see http://code.google.com/web/ajaxcrawling/
-// --------------------------------------------------------------------------------
-
-// Note: make sure this is the last file loaded!
-
-// USAGE:
-// var uri = URI("http://example.org/#?foo=bar");
-// uri.fragment(true) === {foo: "bar"};
-// uri.fragment({bar: "foo"});
-// uri.toString() === "http://example.org/#?bar=foo";
-// uri.addFragment("name", "value");
-// uri.toString() === "http://example.org/#?bar=foo&name=value";
-// uri.removeFragment("name");
-// uri.toString() === "http://example.org/#?bar=foo";
-
-(function (root, factory) {
- 'use strict';
- // https://github.com/umdjs/umd/blob/master/returnExports.js
- if (typeof exports === 'object') {
- // Node
- module.exports = factory(require('./URI'));
- } else if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['./URI'], factory);
- } else {
- // Browser globals (root is window)
- factory(root.URI);
- }
-}(this, function (URI) {
- 'use strict';
-
- var p = URI.prototype;
- // old fragment handler we need to wrap
- var f = p.fragment;
-
- // make fragmentPrefix configurable
- URI.fragmentPrefix = '?';
- var _parts = URI._parts;
- URI._parts = function() {
- var parts = _parts();
- parts.fragmentPrefix = URI.fragmentPrefix;
- return parts;
- };
- p.fragmentPrefix = function(v) {
- this._parts.fragmentPrefix = v;
- return this;
- };
-
- // add fragment(true) and fragment({key: value}) signatures
- p.fragment = function(v, build) {
- var prefix = this._parts.fragmentPrefix;
- var fragment = this._parts.fragment || '';
-
- if (v === true) {
- if (fragment.substring(0, prefix.length) !== prefix) {
- return {};
- }
-
- return URI.parseQuery(fragment.substring(prefix.length));
- } else if (v !== undefined && typeof v !== 'string') {
- this._parts.fragment = prefix + URI.buildQuery(v);
- this.build(!build);
- return this;
- } else {
- return f.call(this, v, build);
- }
- };
- p.addFragment = function(name, value, build) {
- var prefix = this._parts.fragmentPrefix;
- var data = URI.parseQuery((this._parts.fragment || '').substring(prefix.length));
- URI.addQuery(data, name, value);
- this._parts.fragment = prefix + URI.buildQuery(data);
- if (typeof name !== 'string') {
- build = value;
- }
-
- this.build(!build);
- return this;
- };
- p.removeFragment = function(name, value, build) {
- var prefix = this._parts.fragmentPrefix;
- var data = URI.parseQuery((this._parts.fragment || '').substring(prefix.length));
- URI.removeQuery(data, name, value);
- this._parts.fragment = prefix + URI.buildQuery(data);
- if (typeof name !== 'string') {
- build = value;
- }
-
- this.build(!build);
- return this;
- };
- p.addHash = p.addFragment;
- p.removeHash = p.removeFragment;
-
- // extending existing object rather than defining something new
- return URI;
-})); \ No newline at end of file
diff --git a/thirdparty/URI.js/src/URI.fragmentURI.js b/thirdparty/URI.js/src/URI.fragmentURI.js
deleted file mode 100644
index 7fb85fe3b..000000000
--- a/thirdparty/URI.js/src/URI.fragmentURI.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Extending URI.js for fragment abuse
- */
-
-// --------------------------------------------------------------------------------
-// EXAMPLE: storing a relative URL in the fragment ("FragmentURI")
-// possibly helpful when working with backbone.js or sammy.js
-// inspired by https://github.com/medialize/URI.js/pull/2
-// --------------------------------------------------------------------------------
-
-// Note: make sure this is the last file loaded!
-
-// USAGE:
-// var uri = URI("http://example.org/#!/foo/bar/baz.html");
-// var furi = uri.fragment(true);
-// furi.pathname() === '/foo/bar/baz.html';
-// furi.pathname('/hello.html');
-// uri.toString() === "http://example.org/#!/hello.html"
-
-(function (root, factory) {
- 'use strict';
- // https://github.com/umdjs/umd/blob/master/returnExports.js
- if (typeof exports === 'object') {
- // Node
- module.exports = factory(require('./URI'));
- } else if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['./URI'], factory);
- } else {
- // Browser globals (root is window)
- factory(root.URI);
- }
-}(this, function (URI) {
- 'use strict';
-
- var p = URI.prototype;
- // old handlers we need to wrap
- var f = p.fragment;
- var b = p.build;
-
- // make fragmentPrefix configurable
- URI.fragmentPrefix = '!';
- var _parts = URI._parts;
- URI._parts = function() {
- var parts = _parts();
- parts.fragmentPrefix = URI.fragmentPrefix;
- return parts;
- };
- p.fragmentPrefix = function(v) {
- this._parts.fragmentPrefix = v;
- return this;
- };
-
- // add fragment(true) and fragment(URI) signatures
- p.fragment = function(v, build) {
- var prefix = this._parts.fragmentPrefix;
- var fragment = this._parts.fragment || '';
- var furi;
-
- if (v === true) {
- if (fragment.substring(0, prefix.length) !== prefix) {
- furi = URI('');
- } else {
- furi = new URI(fragment.substring(prefix.length));
- }
-
- this._fragmentURI = furi;
- furi._parentURI = this;
- return furi;
- } else if (v !== undefined && typeof v !== 'string') {
- this._fragmentURI = v;
- v._parentURI = v;
- this._parts.fragment = prefix + v.toString();
- this.build(!build);
- return this;
- } else if (typeof v === 'string') {
- this._fragmentURI = undefined;
- }
-
- return f.call(this, v, build);
- };
-
- // make .build() of the actual URI aware of the FragmentURI
- p.build = function(deferBuild) {
- var t = b.call(this, deferBuild);
-
- if (deferBuild !== false && this._parentURI) {
- // update the parent
- this._parentURI.fragment(this);
- }
-
- return t;
- };
-
- // extending existing object rather than defining something new
- return URI;
-})); \ No newline at end of file
diff --git a/thirdparty/URI.js/src/URI.js b/thirdparty/URI.js/src/URI.js
deleted file mode 100644
index e279c4858..000000000
--- a/thirdparty/URI.js/src/URI.js
+++ /dev/null
@@ -1,2218 +0,0 @@
-/*!
- * URI.js - Mutating URLs
- *
- * Version: 1.18.2
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- * MIT License http://www.opensource.org/licenses/mit-license
- *
- */
-(function (root, factory) {
- 'use strict';
- // https://github.com/umdjs/umd/blob/master/returnExports.js
- if (typeof exports === 'object') {
- // Node
- module.exports = factory(require('./punycode'), require('./IPv6'), require('./SecondLevelDomains'));
- } else if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['./punycode', './IPv6', './SecondLevelDomains'], factory);
- } else {
- // Browser globals (root is window)
- root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains, root);
- }
-}(this, function (punycode, IPv6, SLD, root) {
- 'use strict';
- /*global location, escape, unescape */
- // FIXME: v2.0.0 renamce non-camelCase properties to uppercase
- /*jshint camelcase: false */
-
- // save current URI variable, if any
- var _URI = root && root.URI;
-
- function URI(url, base) {
- var _urlSupplied = arguments.length >= 1;
- var _baseSupplied = arguments.length >= 2;
-
- // Allow instantiation without the 'new' keyword
- if (!(this instanceof URI)) {
- if (_urlSupplied) {
- if (_baseSupplied) {
- return new URI(url, base);
- }
-
- return new URI(url);
- }
-
- return new URI();
- }
-
- if (url === undefined) {
- if (_urlSupplied) {
- throw new TypeError('undefined is not a valid argument for URI');
- }
-
- if (typeof location !== 'undefined') {
- url = location.href + '';
- } else {
- url = '';
- }
- }
-
- this.href(url);
-
- // resolve to base according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor
- if (base !== undefined) {
- return this.absoluteTo(base);
- }
-
- return this;
- }
-
- URI.version = '1.18.2';
-
- var p = URI.prototype;
- var hasOwn = Object.prototype.hasOwnProperty;
-
- function escapeRegEx(string) {
- // https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963
- return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
- }
-
- function getType(value) {
- // IE8 doesn't return [Object Undefined] but [Object Object] for undefined value
- if (value === undefined) {
- return 'Undefined';
- }
-
- return String(Object.prototype.toString.call(value)).slice(8, -1);
- }
-
- function isArray(obj) {
- return getType(obj) === 'Array';
- }
-
- function filterArrayValues(data, value) {
- var lookup = {};
- var i, length;
-
- if (getType(value) === 'RegExp') {
- lookup = null;
- } else if (isArray(value)) {
- for (i = 0, length = value.length; i < length; i++) {
- lookup[value[i]] = true;
- }
- } else {
- lookup[value] = true;
- }
-
- for (i = 0, length = data.length; i < length; i++) {
- /*jshint laxbreak: true */
- var _match = lookup && lookup[data[i]] !== undefined
- || !lookup && value.test(data[i]);
- /*jshint laxbreak: false */
- if (_match) {
- data.splice(i, 1);
- length--;
- i--;
- }
- }
-
- return data;
- }
-
- function arrayContains(list, value) {
- var i, length;
-
- // value may be string, number, array, regexp
- if (isArray(value)) {
- // Note: this can be optimized to O(n) (instead of current O(m * n))
- for (i = 0, length = value.length; i < length; i++) {
- if (!arrayContains(list, value[i])) {
- return false;
- }
- }
-
- return true;
- }
-
- var _type = getType(value);
- for (i = 0, length = list.length; i < length; i++) {
- if (_type === 'RegExp') {
- if (typeof list[i] === 'string' && list[i].match(value)) {
- return true;
- }
- } else if (list[i] === value) {
- return true;
- }
- }
-
- return false;
- }
-
- function arraysEqual(one, two) {
- if (!isArray(one) || !isArray(two)) {
- return false;
- }
-
- // arrays can't be equal if they have different amount of content
- if (one.length !== two.length) {
- return false;
- }
-
- one.sort();
- two.sort();
-
- for (var i = 0, l = one.length; i < l; i++) {
- if (one[i] !== two[i]) {
- return false;
- }
- }
-
- return true;
- }
-
- function trimSlashes(text) {
- var trim_expression = /^\/+|\/+$/g;
- return text.replace(trim_expression, '');
- }
-
- URI._parts = function() {
- return {
- protocol: null,
- username: null,
- password: null,
- hostname: null,
- urn: null,
- port: null,
- path: null,
- query: null,
- fragment: null,
- // state
- duplicateQueryParameters: URI.duplicateQueryParameters,
- escapeQuerySpace: URI.escapeQuerySpace
- };
- };
- // state: allow duplicate query parameters (a=1&a=1)
- URI.duplicateQueryParameters = false;
- // state: replaces + with %20 (space in query strings)
- URI.escapeQuerySpace = true;
- // static properties
- URI.protocol_expression = /^[a-z][a-z0-9.+-]*$/i;
- URI.idn_expression = /[^a-z0-9\.-]/i;
- URI.punycode_expression = /(xn--)/i;
- // well, 333.444.555.666 matches, but it sure ain't no IPv4 - do we care?
- URI.ip4_expression = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
- // credits to Rich Brown
- // source: http://forums.intermapper.com/viewtopic.php?p=1096#1096
- // specification: http://www.ietf.org/rfc/rfc4291.txt
- URI.ip6_expression = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
- // expression used is "gruber revised" (@gruber v2) determined to be the
- // best solution in a regex-golf we did a couple of ages ago at
- // * http://mathiasbynens.be/demo/url-regex
- // * http://rodneyrehm.de/t/url-regex.html
- URI.find_uri_expression = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/ig;
- URI.findUri = {
- // valid "scheme://" or "www."
- start: /\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,
- // everything up to the next whitespace
- end: /[\s\r\n]|$/,
- // trim trailing punctuation captured by end RegExp
- trim: /[`!()\[\]{};:'".,<>?«»“â€â€žâ€˜â€™]+$/
- };
- // http://www.iana.org/assignments/uri-schemes.html
- // http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports
- URI.defaultPorts = {
- http: '80',
- https: '443',
- ftp: '21',
- gopher: '70',
- ws: '80',
- wss: '443'
- };
- // allowed hostname characters according to RFC 3986
- // ALPHA DIGIT "-" "." "_" "~" "!" "$" "&" "'" "(" ")" "*" "+" "," ";" "=" %encoded
- // I've never seen a (non-IDN) hostname other than: ALPHA DIGIT . -
- URI.invalid_hostname_characters = /[^a-zA-Z0-9\.-]/;
- // map DOM Elements to their URI attribute
- URI.domAttributes = {
- 'a': 'href',
- 'blockquote': 'cite',
- 'link': 'href',
- 'base': 'href',
- 'script': 'src',
- 'form': 'action',
- 'img': 'src',
- 'area': 'href',
- 'iframe': 'src',
- 'embed': 'src',
- 'source': 'src',
- 'track': 'src',
- 'input': 'src', // but only if type="image"
- 'audio': 'src',
- 'video': 'src'
- };
- URI.getDomAttribute = function(node) {
- if (!node || !node.nodeName) {
- return undefined;
- }
-
- var nodeName = node.nodeName.toLowerCase();
- // <input> should only expose src for type="image"
- if (nodeName === 'input' && node.type !== 'image') {
- return undefined;
- }
-
- return URI.domAttributes[nodeName];
- };
-
- function escapeForDumbFirefox36(value) {
- // https://github.com/medialize/URI.js/issues/91
- return escape(value);
- }
-
- // encoding / decoding according to RFC3986
- function strictEncodeURIComponent(string) {
- // see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent
- return encodeURIComponent(string)
- .replace(/[!'()*]/g, escapeForDumbFirefox36)
- .replace(/\*/g, '%2A');
- }
- URI.encode = strictEncodeURIComponent;
- URI.decode = decodeURIComponent;
- URI.iso8859 = function() {
- URI.encode = escape;
- URI.decode = unescape;
- };
- URI.unicode = function() {
- URI.encode = strictEncodeURIComponent;
- URI.decode = decodeURIComponent;
- };
- URI.characters = {
- pathname: {
- encode: {
- // RFC3986 2.1: For consistency, URI producers and normalizers should
- // use uppercase hexadecimal digits for all percent-encodings.
- expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig,
- map: {
- // -._~!'()*
- '%24': '$',
- '%26': '&',
- '%2B': '+',
- '%2C': ',',
- '%3B': ';',
- '%3D': '=',
- '%3A': ':',
- '%40': '@'
- }
- },
- decode: {
- expression: /[\/\?#]/g,
- map: {
- '/': '%2F',
- '?': '%3F',
- '#': '%23'
- }
- }
- },
- reserved: {
- encode: {
- // RFC3986 2.1: For consistency, URI producers and normalizers should
- // use uppercase hexadecimal digits for all percent-encodings.
- expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,
- map: {
- // gen-delims
- '%3A': ':',
- '%2F': '/',
- '%3F': '?',
- '%23': '#',
- '%5B': '[',
- '%5D': ']',
- '%40': '@',
- // sub-delims
- '%21': '!',
- '%24': '$',
- '%26': '&',
- '%27': '\'',
- '%28': '(',
- '%29': ')',
- '%2A': '*',
- '%2B': '+',
- '%2C': ',',
- '%3B': ';',
- '%3D': '='
- }
- }
- },
- urnpath: {
- // The characters under `encode` are the characters called out by RFC 2141 as being acceptable
- // for usage in a URN. RFC2141 also calls out "-", ".", and "_" as acceptable characters, but
- // these aren't encoded by encodeURIComponent, so we don't have to call them out here. Also
- // note that the colon character is not featured in the encoding map; this is because URI.js
- // gives the colons in URNs semantic meaning as the delimiters of path segements, and so it
- // should not appear unencoded in a segment itself.
- // See also the note above about RFC3986 and capitalalized hex digits.
- encode: {
- expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,
- map: {
- '%21': '!',
- '%24': '$',
- '%27': '\'',
- '%28': '(',
- '%29': ')',
- '%2A': '*',
- '%2B': '+',
- '%2C': ',',
- '%3B': ';',
- '%3D': '=',
- '%40': '@'
- }
- },
- // These characters are the characters called out by RFC2141 as "reserved" characters that
- // should never appear in a URN, plus the colon character (see note above).
- decode: {
- expression: /[\/\?#:]/g,
- map: {
- '/': '%2F',
- '?': '%3F',
- '#': '%23',
- ':': '%3A'
- }
- }
- }
- };
- URI.encodeQuery = function(string, escapeQuerySpace) {
- var escaped = URI.encode(string + '');
- if (escapeQuerySpace === undefined) {
- escapeQuerySpace = URI.escapeQuerySpace;
- }
-
- return escapeQuerySpace ? escaped.replace(/%20/g, '+') : escaped;
- };
- URI.decodeQuery = function(string, escapeQuerySpace) {
- string += '';
- if (escapeQuerySpace === undefined) {
- escapeQuerySpace = URI.escapeQuerySpace;
- }
-
- try {
- return URI.decode(escapeQuerySpace ? string.replace(/\+/g, '%20') : string);
- } catch(e) {
- // we're not going to mess with weird encodings,
- // give up and return the undecoded original string
- // see https://github.com/medialize/URI.js/issues/87
- // see https://github.com/medialize/URI.js/issues/92
- return string;
- }
- };
- // generate encode/decode path functions
- var _parts = {'encode':'encode', 'decode':'decode'};
- var _part;
- var generateAccessor = function(_group, _part) {
- return function(string) {
- try {
- return URI[_part](string + '').replace(URI.characters[_group][_part].expression, function(c) {
- return URI.characters[_group][_part].map[c];
- });
- } catch (e) {
- // we're not going to mess with weird encodings,
- // give up and return the undecoded original string
- // see https://github.com/medialize/URI.js/issues/87
- // see https://github.com/medialize/URI.js/issues/92
- return string;
- }
- };
- };
-
- for (_part in _parts) {
- URI[_part + 'PathSegment'] = generateAccessor('pathname', _parts[_part]);
- URI[_part + 'UrnPathSegment'] = generateAccessor('urnpath', _parts[_part]);
- }
-
- var generateSegmentedPathFunction = function(_sep, _codingFuncName, _innerCodingFuncName) {
- return function(string) {
- // Why pass in names of functions, rather than the function objects themselves? The
- // definitions of some functions (but in particular, URI.decode) will occasionally change due
- // to URI.js having ISO8859 and Unicode modes. Passing in the name and getting it will ensure
- // that the functions we use here are "fresh".
- var actualCodingFunc;
- if (!_innerCodingFuncName) {
- actualCodingFunc = URI[_codingFuncName];
- } else {
- actualCodingFunc = function(string) {
- return URI[_codingFuncName](URI[_innerCodingFuncName](string));
- };
- }
-
- var segments = (string + '').split(_sep);
-
- for (var i = 0, length = segments.length; i < length; i++) {
- segments[i] = actualCodingFunc(segments[i]);
- }
-
- return segments.join(_sep);
- };
- };
-
- // This takes place outside the above loop because we don't want, e.g., encodeUrnPath functions.
- URI.decodePath = generateSegmentedPathFunction('/', 'decodePathSegment');
- URI.decodeUrnPath = generateSegmentedPathFunction(':', 'decodeUrnPathSegment');
- URI.recodePath = generateSegmentedPathFunction('/', 'encodePathSegment', 'decode');
- URI.recodeUrnPath = generateSegmentedPathFunction(':', 'encodeUrnPathSegment', 'decode');
-
- URI.encodeReserved = generateAccessor('reserved', 'encode');
-
- URI.parse = function(string, parts) {
- var pos;
- if (!parts) {
- parts = {};
- }
- // [protocol"://"[username[":"password]"@"]hostname[":"port]"/"?][path]["?"querystring]["#"fragment]
-
- // extract fragment
- pos = string.indexOf('#');
- if (pos > -1) {
- // escaping?
- parts.fragment = string.substring(pos + 1) || null;
- string = string.substring(0, pos);
- }
-
- // extract query
- pos = string.indexOf('?');
- if (pos > -1) {
- // escaping?
- parts.query = string.substring(pos + 1) || null;
- string = string.substring(0, pos);
- }
-
- // extract protocol
- if (string.substring(0, 2) === '//') {
- // relative-scheme
- parts.protocol = null;
- string = string.substring(2);
- // extract "user:pass@host:port"
- string = URI.parseAuthority(string, parts);
- } else {
- pos = string.indexOf(':');
- if (pos > -1) {
- parts.protocol = string.substring(0, pos) || null;
- if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) {
- // : may be within the path
- parts.protocol = undefined;
- } else if (string.substring(pos + 1, pos + 3) === '//') {
- string = string.substring(pos + 3);
-
- // extract "user:pass@host:port"
- string = URI.parseAuthority(string, parts);
- } else {
- string = string.substring(pos + 1);
- parts.urn = true;
- }
- }
- }
-
- // what's left must be the path
- parts.path = string;
-
- // and we're done
- return parts;
- };
- URI.parseHost = function(string, parts) {
- // Copy chrome, IE, opera backslash-handling behavior.
- // Back slashes before the query string get converted to forward slashes
- // See: https://github.com/joyent/node/blob/386fd24f49b0e9d1a8a076592a404168faeecc34/lib/url.js#L115-L124
- // See: https://code.google.com/p/chromium/issues/detail?id=25916
- // https://github.com/medialize/URI.js/pull/233
- string = string.replace(/\\/g, '/');
-
- // extract host:port
- var pos = string.indexOf('/');
- var bracketPos;
- var t;
-
- if (pos === -1) {
- pos = string.length;
- }
-
- if (string.charAt(0) === '[') {
- // IPv6 host - http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04#section-6
- // I claim most client software breaks on IPv6 anyways. To simplify things, URI only accepts
- // IPv6+port in the format [2001:db8::1]:80 (for the time being)
- bracketPos = string.indexOf(']');
- parts.hostname = string.substring(1, bracketPos) || null;
- parts.port = string.substring(bracketPos + 2, pos) || null;
- if (parts.port === '/') {
- parts.port = null;
- }
- } else {
- var firstColon = string.indexOf(':');
- var firstSlash = string.indexOf('/');
- var nextColon = string.indexOf(':', firstColon + 1);
- if (nextColon !== -1 && (firstSlash === -1 || nextColon < firstSlash)) {
- // IPv6 host contains multiple colons - but no port
- // this notation is actually not allowed by RFC 3986, but we're a liberal parser
- parts.hostname = string.substring(0, pos) || null;
- parts.port = null;
- } else {
- t = string.substring(0, pos).split(':');
- parts.hostname = t[0] || null;
- parts.port = t[1] || null;
- }
- }
-
- if (parts.hostname && string.substring(pos).charAt(0) !== '/') {
- pos++;
- string = '/' + string;
- }
-
- return string.substring(pos) || '/';
- };
- URI.parseAuthority = function(string, parts) {
- string = URI.parseUserinfo(string, parts);
- return URI.parseHost(string, parts);
- };
- URI.parseUserinfo = function(string, parts) {
- // extract username:password
- var firstSlash = string.indexOf('/');
- var pos = string.lastIndexOf('@', firstSlash > -1 ? firstSlash : string.length - 1);
- var t;
-
- // authority@ must come before /path
- if (pos > -1 && (firstSlash === -1 || pos < firstSlash)) {
- t = string.substring(0, pos).split(':');
- parts.username = t[0] ? URI.decode(t[0]) : null;
- t.shift();
- parts.password = t[0] ? URI.decode(t.join(':')) : null;
- string = string.substring(pos + 1);
- } else {
- parts.username = null;
- parts.password = null;
- }
-
- return string;
- };
- URI.parseQuery = function(string, escapeQuerySpace) {
- if (!string) {
- return {};
- }
-
- // throw out the funky business - "?"[name"="value"&"]+
- string = string.replace(/&+/g, '&').replace(/^\?*&*|&+$/g, '');
-
- if (!string) {
- return {};
- }
-
- var items = {};
- var splits = string.split('&');
- var length = splits.length;
- var v, name, value;
-
- for (var i = 0; i < length; i++) {
- v = splits[i].split('=');
- name = URI.decodeQuery(v.shift(), escapeQuerySpace);
- // no "=" is null according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters
- value = v.length ? URI.decodeQuery(v.join('='), escapeQuerySpace) : null;
-
- if (hasOwn.call(items, name)) {
- if (typeof items[name] === 'string' || items[name] === null) {
- items[name] = [items[name]];
- }
-
- items[name].push(value);
- } else {
- items[name] = value;
- }
- }
-
- return items;
- };
-
- URI.build = function(parts) {
- var t = '';
-
- if (parts.protocol) {
- t += parts.protocol + ':';
- }
-
- if (!parts.urn && (t || parts.hostname)) {
- t += '//';
- }
-
- t += (URI.buildAuthority(parts) || '');
-
- if (typeof parts.path === 'string') {
- if (parts.path.charAt(0) !== '/' && typeof parts.hostname === 'string') {
- t += '/';
- }
-
- t += parts.path;
- }
-
- if (typeof parts.query === 'string' && parts.query) {
- t += '?' + parts.query;
- }
-
- if (typeof parts.fragment === 'string' && parts.fragment) {
- t += '#' + parts.fragment;
- }
- return t;
- };
- URI.buildHost = function(parts) {
- var t = '';
-
- if (!parts.hostname) {
- return '';
- } else if (URI.ip6_expression.test(parts.hostname)) {
- t += '[' + parts.hostname + ']';
- } else {
- t += parts.hostname;
- }
-
- if (parts.port) {
- t += ':' + parts.port;
- }
-
- return t;
- };
- URI.buildAuthority = function(parts) {
- return URI.buildUserinfo(parts) + URI.buildHost(parts);
- };
- URI.buildUserinfo = function(parts) {
- var t = '';
-
- if (parts.username) {
- t += URI.encode(parts.username);
- }
-
- if (parts.password) {
- t += ':' + URI.encode(parts.password);
- }
-
- if (t) {
- t += '@';
- }
-
- return t;
- };
- URI.buildQuery = function(data, duplicateQueryParameters, escapeQuerySpace) {
- // according to http://tools.ietf.org/html/rfc3986 or http://labs.apache.org/webarch/uri/rfc/rfc3986.html
- // being »-._~!$&'()*+,;=:@/?« %HEX and alnum are allowed
- // the RFC explicitly states ?/foo being a valid use case, no mention of parameter syntax!
- // URI.js treats the query string as being application/x-www-form-urlencoded
- // see http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type
-
- var t = '';
- var unique, key, i, length;
- for (key in data) {
- if (hasOwn.call(data, key) && key) {
- if (isArray(data[key])) {
- unique = {};
- for (i = 0, length = data[key].length; i < length; i++) {
- if (data[key][i] !== undefined && unique[data[key][i] + ''] === undefined) {
- t += '&' + URI.buildQueryParameter(key, data[key][i], escapeQuerySpace);
- if (duplicateQueryParameters !== true) {
- unique[data[key][i] + ''] = true;
- }
- }
- }
- } else if (data[key] !== undefined) {
- t += '&' + URI.buildQueryParameter(key, data[key], escapeQuerySpace);
- }
- }
- }
-
- return t.substring(1);
- };
- URI.buildQueryParameter = function(name, value, escapeQuerySpace) {
- // http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type -- application/x-www-form-urlencoded
- // don't append "=" for null values, according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization
- return URI.encodeQuery(name, escapeQuerySpace) + (value !== null ? '=' + URI.encodeQuery(value, escapeQuerySpace) : '');
- };
-
- URI.addQuery = function(data, name, value) {
- if (typeof name === 'object') {
- for (var key in name) {
- if (hasOwn.call(name, key)) {
- URI.addQuery(data, key, name[key]);
- }
- }
- } else if (typeof name === 'string') {
- if (data[name] === undefined) {
- data[name] = value;
- return;
- } else if (typeof data[name] === 'string') {
- data[name] = [data[name]];
- }
-
- if (!isArray(value)) {
- value = [value];
- }
-
- data[name] = (data[name] || []).concat(value);
- } else {
- throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');
- }
- };
- URI.removeQuery = function(data, name, value) {
- var i, length, key;
-
- if (isArray(name)) {
- for (i = 0, length = name.length; i < length; i++) {
- data[name[i]] = undefined;
- }
- } else if (getType(name) === 'RegExp') {
- for (key in data) {
- if (name.test(key)) {
- data[key] = undefined;
- }
- }
- } else if (typeof name === 'object') {
- for (key in name) {
- if (hasOwn.call(name, key)) {
- URI.removeQuery(data, key, name[key]);
- }
- }
- } else if (typeof name === 'string') {
- if (value !== undefined) {
- if (getType(value) === 'RegExp') {
- if (!isArray(data[name]) && value.test(data[name])) {
- data[name] = undefined;
- } else {
- data[name] = filterArrayValues(data[name], value);
- }
- } else if (data[name] === String(value) && (!isArray(value) || value.length === 1)) {
- data[name] = undefined;
- } else if (isArray(data[name])) {
- data[name] = filterArrayValues(data[name], value);
- }
- } else {
- data[name] = undefined;
- }
- } else {
- throw new TypeError('URI.removeQuery() accepts an object, string, RegExp as the first parameter');
- }
- };
- URI.hasQuery = function(data, name, value, withinArray) {
- switch (getType(name)) {
- case 'String':
- // Nothing to do here
- break;
-
- case 'RegExp':
- for (var key in data) {
- if (hasOwn.call(data, key)) {
- if (name.test(key) && (value === undefined || URI.hasQuery(data, key, value))) {
- return true;
- }
- }
- }
-
- return false;
-
- case 'Object':
- for (var _key in name) {
- if (hasOwn.call(name, _key)) {
- if (!URI.hasQuery(data, _key, name[_key])) {
- return false;
- }
- }
- }
-
- return true;
-
- default:
- throw new TypeError('URI.hasQuery() accepts a string, regular expression or object as the name parameter');
- }
-
- switch (getType(value)) {
- case 'Undefined':
- // true if exists (but may be empty)
- return name in data; // data[name] !== undefined;
-
- case 'Boolean':
- // true if exists and non-empty
- var _booly = Boolean(isArray(data[name]) ? data[name].length : data[name]);
- return value === _booly;
-
- case 'Function':
- // allow complex comparison
- return !!value(data[name], name, data);
-
- case 'Array':
- if (!isArray(data[name])) {
- return false;
- }
-
- var op = withinArray ? arrayContains : arraysEqual;
- return op(data[name], value);
-
- case 'RegExp':
- if (!isArray(data[name])) {
- return Boolean(data[name] && data[name].match(value));
- }
-
- if (!withinArray) {
- return false;
- }
-
- return arrayContains(data[name], value);
-
- case 'Number':
- value = String(value);
- /* falls through */
- case 'String':
- if (!isArray(data[name])) {
- return data[name] === value;
- }
-
- if (!withinArray) {
- return false;
- }
-
- return arrayContains(data[name], value);
-
- default:
- throw new TypeError('URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter');
- }
- };
-
-
- URI.joinPaths = function() {
- var input = [];
- var segments = [];
- var nonEmptySegments = 0;
-
- for (var i = 0; i < arguments.length; i++) {
- var url = new URI(arguments[i]);
- input.push(url);
- var _segments = url.segment();
- for (var s = 0; s < _segments.length; s++) {
- if (typeof _segments[s] === 'string') {
- segments.push(_segments[s]);
- }
-
- if (_segments[s]) {
- nonEmptySegments++;
- }
- }
- }
-
- if (!segments.length || !nonEmptySegments) {
- return new URI('');
- }
-
- var uri = new URI('').segment(segments);
-
- if (input[0].path() === '' || input[0].path().slice(0, 1) === '/') {
- uri.path('/' + uri.path());
- }
-
- return uri.normalize();
- };
-
- URI.commonPath = function(one, two) {
- var length = Math.min(one.length, two.length);
- var pos;
-
- // find first non-matching character
- for (pos = 0; pos < length; pos++) {
- if (one.charAt(pos) !== two.charAt(pos)) {
- pos--;
- break;
- }
- }
-
- if (pos < 1) {
- return one.charAt(0) === two.charAt(0) && one.charAt(0) === '/' ? '/' : '';
- }
-
- // revert to last /
- if (one.charAt(pos) !== '/' || two.charAt(pos) !== '/') {
- pos = one.substring(0, pos).lastIndexOf('/');
- }
-
- return one.substring(0, pos + 1);
- };
-
- URI.withinString = function(string, callback, options) {
- options || (options = {});
- var _start = options.start || URI.findUri.start;
- var _end = options.end || URI.findUri.end;
- var _trim = options.trim || URI.findUri.trim;
- var _attributeOpen = /[a-z0-9-]=["']?$/i;
-
- _start.lastIndex = 0;
- while (true) {
- var match = _start.exec(string);
- if (!match) {
- break;
- }
-
- var start = match.index;
- if (options.ignoreHtml) {
- // attribut(e=["']?$)
- var attributeOpen = string.slice(Math.max(start - 3, 0), start);
- if (attributeOpen && _attributeOpen.test(attributeOpen)) {
- continue;
- }
- }
-
- var end = start + string.slice(start).search(_end);
- var slice = string.slice(start, end).replace(_trim, '');
- if (options.ignore && options.ignore.test(slice)) {
- continue;
- }
-
- end = start + slice.length;
- var result = callback(slice, start, end, string);
- if (result === undefined) {
- _start.lastIndex = end;
- continue;
- }
-
- result = String(result);
- string = string.slice(0, start) + result + string.slice(end);
- _start.lastIndex = start + result.length;
- }
-
- _start.lastIndex = 0;
- return string;
- };
-
- URI.ensureValidHostname = function(v) {
- // Theoretically URIs allow percent-encoding in Hostnames (according to RFC 3986)
- // they are not part of DNS and therefore ignored by URI.js
-
- if (v.match(URI.invalid_hostname_characters)) {
- // test punycode
- if (!punycode) {
- throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-] and Punycode.js is not available');
- }
-
- if (punycode.toASCII(v).match(URI.invalid_hostname_characters)) {
- throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
- }
- }
- };
-
- // noConflict
- URI.noConflict = function(removeAll) {
- if (removeAll) {
- var unconflicted = {
- URI: this.noConflict()
- };
-
- if (root.URITemplate && typeof root.URITemplate.noConflict === 'function') {
- unconflicted.URITemplate = root.URITemplate.noConflict();
- }
-
- if (root.IPv6 && typeof root.IPv6.noConflict === 'function') {
- unconflicted.IPv6 = root.IPv6.noConflict();
- }
-
- if (root.SecondLevelDomains && typeof root.SecondLevelDomains.noConflict === 'function') {
- unconflicted.SecondLevelDomains = root.SecondLevelDomains.noConflict();
- }
-
- return unconflicted;
- } else if (root.URI === this) {
- root.URI = _URI;
- }
-
- return this;
- };
-
- p.build = function(deferBuild) {
- if (deferBuild === true) {
- this._deferred_build = true;
- } else if (deferBuild === undefined || this._deferred_build) {
- this._string = URI.build(this._parts);
- this._deferred_build = false;
- }
-
- return this;
- };
-
- p.clone = function() {
- return new URI(this);
- };
-
- p.valueOf = p.toString = function() {
- return this.build(false)._string;
- };
-
-
- function generateSimpleAccessor(_part){
- return function(v, build) {
- if (v === undefined) {
- return this._parts[_part] || '';
- } else {
- this._parts[_part] = v || null;
- this.build(!build);
- return this;
- }
- };
- }
-
- function generatePrefixAccessor(_part, _key){
- return function(v, build) {
- if (v === undefined) {
- return this._parts[_part] || '';
- } else {
- if (v !== null) {
- v = v + '';
- if (v.charAt(0) === _key) {
- v = v.substring(1);
- }
- }
-
- this._parts[_part] = v;
- this.build(!build);
- return this;
- }
- };
- }
-
- p.protocol = generateSimpleAccessor('protocol');
- p.username = generateSimpleAccessor('username');
- p.password = generateSimpleAccessor('password');
- p.hostname = generateSimpleAccessor('hostname');
- p.port = generateSimpleAccessor('port');
- p.query = generatePrefixAccessor('query', '?');
- p.fragment = generatePrefixAccessor('fragment', '#');
-
- p.search = function(v, build) {
- var t = this.query(v, build);
- return typeof t === 'string' && t.length ? ('?' + t) : t;
- };
- p.hash = function(v, build) {
- var t = this.fragment(v, build);
- return typeof t === 'string' && t.length ? ('#' + t) : t;
- };
-
- p.pathname = function(v, build) {
- if (v === undefined || v === true) {
- var res = this._parts.path || (this._parts.hostname ? '/' : '');
- return v ? (this._parts.urn ? URI.decodeUrnPath : URI.decodePath)(res) : res;
- } else {
- if (this._parts.urn) {
- this._parts.path = v ? URI.recodeUrnPath(v) : '';
- } else {
- this._parts.path = v ? URI.recodePath(v) : '/';
- }
- this.build(!build);
- return this;
- }
- };
- p.path = p.pathname;
- p.href = function(href, build) {
- var key;
-
- if (href === undefined) {
- return this.toString();
- }
-
- this._string = '';
- this._parts = URI._parts();
-
- var _URI = href instanceof URI;
- var _object = typeof href === 'object' && (href.hostname || href.path || href.pathname);
- if (href.nodeName) {
- var attribute = URI.getDomAttribute(href);
- href = href[attribute] || '';
- _object = false;
- }
-
- // window.location is reported to be an object, but it's not the sort
- // of object we're looking for:
- // * location.protocol ends with a colon
- // * location.query != object.search
- // * location.hash != object.fragment
- // simply serializing the unknown object should do the trick
- // (for location, not for everything...)
- if (!_URI && _object && href.pathname !== undefined) {
- href = href.toString();
- }
-
- if (typeof href === 'string' || href instanceof String) {
- this._parts = URI.parse(String(href), this._parts);
- } else if (_URI || _object) {
- var src = _URI ? href._parts : href;
- for (key in src) {
- if (hasOwn.call(this._parts, key)) {
- this._parts[key] = src[key];
- }
- }
- } else {
- throw new TypeError('invalid input');
- }
-
- this.build(!build);
- return this;
- };
-
- // identification accessors
- p.is = function(what) {
- var ip = false;
- var ip4 = false;
- var ip6 = false;
- var name = false;
- var sld = false;
- var idn = false;
- var punycode = false;
- var relative = !this._parts.urn;
-
- if (this._parts.hostname) {
- relative = false;
- ip4 = URI.ip4_expression.test(this._parts.hostname);
- ip6 = URI.ip6_expression.test(this._parts.hostname);
- ip = ip4 || ip6;
- name = !ip;
- sld = name && SLD && SLD.has(this._parts.hostname);
- idn = name && URI.idn_expression.test(this._parts.hostname);
- punycode = name && URI.punycode_expression.test(this._parts.hostname);
- }
-
- switch (what.toLowerCase()) {
- case 'relative':
- return relative;
-
- case 'absolute':
- return !relative;
-
- // hostname identification
- case 'domain':
- case 'name':
- return name;
-
- case 'sld':
- return sld;
-
- case 'ip':
- return ip;
-
- case 'ip4':
- case 'ipv4':
- case 'inet4':
- return ip4;
-
- case 'ip6':
- case 'ipv6':
- case 'inet6':
- return ip6;
-
- case 'idn':
- return idn;
-
- case 'url':
- return !this._parts.urn;
-
- case 'urn':
- return !!this._parts.urn;
-
- case 'punycode':
- return punycode;
- }
-
- return null;
- };
-
- // component specific input validation
- var _protocol = p.protocol;
- var _port = p.port;
- var _hostname = p.hostname;
-
- p.protocol = function(v, build) {
- if (v !== undefined) {
- if (v) {
- // accept trailing ://
- v = v.replace(/:(\/\/)?$/, '');
-
- if (!v.match(URI.protocol_expression)) {
- throw new TypeError('Protocol "' + v + '" contains characters other than [A-Z0-9.+-] or doesn\'t start with [A-Z]');
- }
- }
- }
- return _protocol.call(this, v, build);
- };
- p.scheme = p.protocol;
- p.port = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v !== undefined) {
- if (v === 0) {
- v = null;
- }
-
- if (v) {
- v += '';
- if (v.charAt(0) === ':') {
- v = v.substring(1);
- }
-
- if (v.match(/[^0-9]/)) {
- throw new TypeError('Port "' + v + '" contains characters other than [0-9]');
- }
- }
- }
- return _port.call(this, v, build);
- };
- p.hostname = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v !== undefined) {
- var x = {};
- var res = URI.parseHost(v, x);
- if (res !== '/') {
- throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
- }
-
- v = x.hostname;
- }
- return _hostname.call(this, v, build);
- };
-
- // compound accessors
- p.origin = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v === undefined) {
- var protocol = this.protocol();
- var authority = this.authority();
- if (!authority) {
- return '';
- }
-
- return (protocol ? protocol + '://' : '') + this.authority();
- } else {
- var origin = URI(v);
- this
- .protocol(origin.protocol())
- .authority(origin.authority())
- .build(!build);
- return this;
- }
- };
- p.host = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v === undefined) {
- return this._parts.hostname ? URI.buildHost(this._parts) : '';
- } else {
- var res = URI.parseHost(v, this._parts);
- if (res !== '/') {
- throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
- }
-
- this.build(!build);
- return this;
- }
- };
- p.authority = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v === undefined) {
- return this._parts.hostname ? URI.buildAuthority(this._parts) : '';
- } else {
- var res = URI.parseAuthority(v, this._parts);
- if (res !== '/') {
- throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
- }
-
- this.build(!build);
- return this;
- }
- };
- p.userinfo = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v === undefined) {
- var t = URI.buildUserinfo(this._parts);
- return t ? t.substring(0, t.length -1) : t;
- } else {
- if (v[v.length-1] !== '@') {
- v += '@';
- }
-
- URI.parseUserinfo(v, this._parts);
- this.build(!build);
- return this;
- }
- };
- p.resource = function(v, build) {
- var parts;
-
- if (v === undefined) {
- return this.path() + this.search() + this.hash();
- }
-
- parts = URI.parse(v);
- this._parts.path = parts.path;
- this._parts.query = parts.query;
- this._parts.fragment = parts.fragment;
- this.build(!build);
- return this;
- };
-
- // fraction accessors
- p.subdomain = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- // convenience, return "www" from "www.example.org"
- if (v === undefined) {
- if (!this._parts.hostname || this.is('IP')) {
- return '';
- }
-
- // grab domain and add another segment
- var end = this._parts.hostname.length - this.domain().length - 1;
- return this._parts.hostname.substring(0, end) || '';
- } else {
- var e = this._parts.hostname.length - this.domain().length;
- var sub = this._parts.hostname.substring(0, e);
- var replace = new RegExp('^' + escapeRegEx(sub));
-
- if (v && v.charAt(v.length - 1) !== '.') {
- v += '.';
- }
-
- if (v) {
- URI.ensureValidHostname(v);
- }
-
- this._parts.hostname = this._parts.hostname.replace(replace, v);
- this.build(!build);
- return this;
- }
- };
- p.domain = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (typeof v === 'boolean') {
- build = v;
- v = undefined;
- }
-
- // convenience, return "example.org" from "www.example.org"
- if (v === undefined) {
- if (!this._parts.hostname || this.is('IP')) {
- return '';
- }
-
- // if hostname consists of 1 or 2 segments, it must be the domain
- var t = this._parts.hostname.match(/\./g);
- if (t && t.length < 2) {
- return this._parts.hostname;
- }
-
- // grab tld and add another segment
- var end = this._parts.hostname.length - this.tld(build).length - 1;
- end = this._parts.hostname.lastIndexOf('.', end -1) + 1;
- return this._parts.hostname.substring(end) || '';
- } else {
- if (!v) {
- throw new TypeError('cannot set domain empty');
- }
-
- URI.ensureValidHostname(v);
-
- if (!this._parts.hostname || this.is('IP')) {
- this._parts.hostname = v;
- } else {
- var replace = new RegExp(escapeRegEx(this.domain()) + '$');
- this._parts.hostname = this._parts.hostname.replace(replace, v);
- }
-
- this.build(!build);
- return this;
- }
- };
- p.tld = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (typeof v === 'boolean') {
- build = v;
- v = undefined;
- }
-
- // return "org" from "www.example.org"
- if (v === undefined) {
- if (!this._parts.hostname || this.is('IP')) {
- return '';
- }
-
- var pos = this._parts.hostname.lastIndexOf('.');
- var tld = this._parts.hostname.substring(pos + 1);
-
- if (build !== true && SLD && SLD.list[tld.toLowerCase()]) {
- return SLD.get(this._parts.hostname) || tld;
- }
-
- return tld;
- } else {
- var replace;
-
- if (!v) {
- throw new TypeError('cannot set TLD empty');
- } else if (v.match(/[^a-zA-Z0-9-]/)) {
- if (SLD && SLD.is(v)) {
- replace = new RegExp(escapeRegEx(this.tld()) + '$');
- this._parts.hostname = this._parts.hostname.replace(replace, v);
- } else {
- throw new TypeError('TLD "' + v + '" contains characters other than [A-Z0-9]');
- }
- } else if (!this._parts.hostname || this.is('IP')) {
- throw new ReferenceError('cannot set TLD on non-domain host');
- } else {
- replace = new RegExp(escapeRegEx(this.tld()) + '$');
- this._parts.hostname = this._parts.hostname.replace(replace, v);
- }
-
- this.build(!build);
- return this;
- }
- };
- p.directory = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v === undefined || v === true) {
- if (!this._parts.path && !this._parts.hostname) {
- return '';
- }
-
- if (this._parts.path === '/') {
- return '/';
- }
-
- var end = this._parts.path.length - this.filename().length - 1;
- var res = this._parts.path.substring(0, end) || (this._parts.hostname ? '/' : '');
-
- return v ? URI.decodePath(res) : res;
-
- } else {
- var e = this._parts.path.length - this.filename().length;
- var directory = this._parts.path.substring(0, e);
- var replace = new RegExp('^' + escapeRegEx(directory));
-
- // fully qualifier directories begin with a slash
- if (!this.is('relative')) {
- if (!v) {
- v = '/';
- }
-
- if (v.charAt(0) !== '/') {
- v = '/' + v;
- }
- }
-
- // directories always end with a slash
- if (v && v.charAt(v.length - 1) !== '/') {
- v += '/';
- }
-
- v = URI.recodePath(v);
- this._parts.path = this._parts.path.replace(replace, v);
- this.build(!build);
- return this;
- }
- };
- p.filename = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v === undefined || v === true) {
- if (!this._parts.path || this._parts.path === '/') {
- return '';
- }
-
- var pos = this._parts.path.lastIndexOf('/');
- var res = this._parts.path.substring(pos+1);
-
- return v ? URI.decodePathSegment(res) : res;
- } else {
- var mutatedDirectory = false;
-
- if (v.charAt(0) === '/') {
- v = v.substring(1);
- }
-
- if (v.match(/\.?\//)) {
- mutatedDirectory = true;
- }
-
- var replace = new RegExp(escapeRegEx(this.filename()) + '$');
- v = URI.recodePath(v);
- this._parts.path = this._parts.path.replace(replace, v);
-
- if (mutatedDirectory) {
- this.normalizePath(build);
- } else {
- this.build(!build);
- }
-
- return this;
- }
- };
- p.suffix = function(v, build) {
- if (this._parts.urn) {
- return v === undefined ? '' : this;
- }
-
- if (v === undefined || v === true) {
- if (!this._parts.path || this._parts.path === '/') {
- return '';
- }
-
- var filename = this.filename();
- var pos = filename.lastIndexOf('.');
- var s, res;
-
- if (pos === -1) {
- return '';
- }
-
- // suffix may only contain alnum characters (yup, I made this up.)
- s = filename.substring(pos+1);
- res = (/^[a-z0-9%]+$/i).test(s) ? s : '';
- return v ? URI.decodePathSegment(res) : res;
- } else {
- if (v.charAt(0) === '.') {
- v = v.substring(1);
- }
-
- var suffix = this.suffix();
- var replace;
-
- if (!suffix) {
- if (!v) {
- return this;
- }
-
- this._parts.path += '.' + URI.recodePath(v);
- } else if (!v) {
- replace = new RegExp(escapeRegEx('.' + suffix) + '$');
- } else {
- replace = new RegExp(escapeRegEx(suffix) + '$');
- }
-
- if (replace) {
- v = URI.recodePath(v);
- this._parts.path = this._parts.path.replace(replace, v);
- }
-
- this.build(!build);
- return this;
- }
- };
- p.segment = function(segment, v, build) {
- var separator = this._parts.urn ? ':' : '/';
- var path = this.path();
- var absolute = path.substring(0, 1) === '/';
- var segments = path.split(separator);
-
- if (segment !== undefined && typeof segment !== 'number') {
- build = v;
- v = segment;
- segment = undefined;
- }
-
- if (segment !== undefined && typeof segment !== 'number') {
- throw new Error('Bad segment "' + segment + '", must be 0-based integer');
- }
-
- if (absolute) {
- segments.shift();
- }
-
- if (segment < 0) {
- // allow negative indexes to address from the end
- segment = Math.max(segments.length + segment, 0);
- }
-
- if (v === undefined) {
- /*jshint laxbreak: true */
- return segment === undefined
- ? segments
- : segments[segment];
- /*jshint laxbreak: false */
- } else if (segment === null || segments[segment] === undefined) {
- if (isArray(v)) {
- segments = [];
- // collapse empty elements within array
- for (var i=0, l=v.length; i < l; i++) {
- if (!v[i].length && (!segments.length || !segments[segments.length -1].length)) {
- continue;
- }
-
- if (segments.length && !segments[segments.length -1].length) {
- segments.pop();
- }
-
- segments.push(trimSlashes(v[i]));
- }
- } else if (v || typeof v === 'string') {
- v = trimSlashes(v);
- if (segments[segments.length -1] === '') {
- // empty trailing elements have to be overwritten
- // to prevent results such as /foo//bar
- segments[segments.length -1] = v;
- } else {
- segments.push(v);
- }
- }
- } else {
- if (v) {
- segments[segment] = trimSlashes(v);
- } else {
- segments.splice(segment, 1);
- }
- }
-
- if (absolute) {
- segments.unshift('');
- }
-
- return this.path(segments.join(separator), build);
- };
- p.segmentCoded = function(segment, v, build) {
- var segments, i, l;
-
- if (typeof segment !== 'number') {
- build = v;
- v = segment;
- segment = undefined;
- }
-
- if (v === undefined) {
- segments = this.segment(segment, v, build);
- if (!isArray(segments)) {
- segments = segments !== undefined ? URI.decode(segments) : undefined;
- } else {
- for (i = 0, l = segments.length; i < l; i++) {
- segments[i] = URI.decode(segments[i]);
- }
- }
-
- return segments;
- }
-
- if (!isArray(v)) {
- v = (typeof v === 'string' || v instanceof String) ? URI.encode(v) : v;
- } else {
- for (i = 0, l = v.length; i < l; i++) {
- v[i] = URI.encode(v[i]);
- }
- }
-
- return this.segment(segment, v, build);
- };
-
- // mutating query string
- var q = p.query;
- p.query = function(v, build) {
- if (v === true) {
- return URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
- } else if (typeof v === 'function') {
- var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
- var result = v.call(this, data);
- this._parts.query = URI.buildQuery(result || data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
- this.build(!build);
- return this;
- } else if (v !== undefined && typeof v !== 'string') {
- this._parts.query = URI.buildQuery(v, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
- this.build(!build);
- return this;
- } else {
- return q.call(this, v, build);
- }
- };
- p.setQuery = function(name, value, build) {
- var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
-
- if (typeof name === 'string' || name instanceof String) {
- data[name] = value !== undefined ? value : null;
- } else if (typeof name === 'object') {
- for (var key in name) {
- if (hasOwn.call(name, key)) {
- data[key] = name[key];
- }
- }
- } else {
- throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');
- }
-
- this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
- if (typeof name !== 'string') {
- build = value;
- }
-
- this.build(!build);
- return this;
- };
- p.addQuery = function(name, value, build) {
- var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
- URI.addQuery(data, name, value === undefined ? null : value);
- this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
- if (typeof name !== 'string') {
- build = value;
- }
-
- this.build(!build);
- return this;
- };
- p.removeQuery = function(name, value, build) {
- var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
- URI.removeQuery(data, name, value);
- this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
- if (typeof name !== 'string') {
- build = value;
- }
-
- this.build(!build);
- return this;
- };
- p.hasQuery = function(name, value, withinArray) {
- var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
- return URI.hasQuery(data, name, value, withinArray);
- };
- p.setSearch = p.setQuery;
- p.addSearch = p.addQuery;
- p.removeSearch = p.removeQuery;
- p.hasSearch = p.hasQuery;
-
- // sanitizing URLs
- p.normalize = function() {
- if (this._parts.urn) {
- return this
- .normalizeProtocol(false)
- .normalizePath(false)
- .normalizeQuery(false)
- .normalizeFragment(false)
- .build();
- }
-
- return this
- .normalizeProtocol(false)
- .normalizeHostname(false)
- .normalizePort(false)
- .normalizePath(false)
- .normalizeQuery(false)
- .normalizeFragment(false)
- .build();
- };
- p.normalizeProtocol = function(build) {
- if (typeof this._parts.protocol === 'string') {
- this._parts.protocol = this._parts.protocol.toLowerCase();
- this.build(!build);
- }
-
- return this;
- };
- p.normalizeHostname = function(build) {
- if (this._parts.hostname) {
- if (this.is('IDN') && punycode) {
- this._parts.hostname = punycode.toASCII(this._parts.hostname);
- } else if (this.is('IPv6') && IPv6) {
- this._parts.hostname = IPv6.best(this._parts.hostname);
- }
-
- this._parts.hostname = this._parts.hostname.toLowerCase();
- this.build(!build);
- }
-
- return this;
- };
- p.normalizePort = function(build) {
- // remove port of it's the protocol's default
- if (typeof this._parts.protocol === 'string' && this._parts.port === URI.defaultPorts[this._parts.protocol]) {
- this._parts.port = null;
- this.build(!build);
- }
-
- return this;
- };
- p.normalizePath = function(build) {
- var _path = this._parts.path;
- if (!_path) {
- return this;
- }
-
- if (this._parts.urn) {
- this._parts.path = URI.recodeUrnPath(this._parts.path);
- this.build(!build);
- return this;
- }
-
- if (this._parts.path === '/') {
- return this;
- }
-
- _path = URI.recodePath(_path);
-
- var _was_relative;
- var _leadingParents = '';
- var _parent, _pos;
-
- // handle relative paths
- if (_path.charAt(0) !== '/') {
- _was_relative = true;
- _path = '/' + _path;
- }
-
- // handle relative files (as opposed to directories)
- if (_path.slice(-3) === '/..' || _path.slice(-2) === '/.') {
- _path += '/';
- }
-
- // resolve simples
- _path = _path
- .replace(/(\/(\.\/)+)|(\/\.$)/g, '/')
- .replace(/\/{2,}/g, '/');
-
- // remember leading parents
- if (_was_relative) {
- _leadingParents = _path.substring(1).match(/^(\.\.\/)+/) || '';
- if (_leadingParents) {
- _leadingParents = _leadingParents[0];
- }
- }
-
- // resolve parents
- while (true) {
- _parent = _path.search(/\/\.\.(\/|$)/);
- if (_parent === -1) {
- // no more ../ to resolve
- break;
- } else if (_parent === 0) {
- // top level cannot be relative, skip it
- _path = _path.substring(3);
- continue;
- }
-
- _pos = _path.substring(0, _parent).lastIndexOf('/');
- if (_pos === -1) {
- _pos = _parent;
- }
- _path = _path.substring(0, _pos) + _path.substring(_parent + 3);
- }
-
- // revert to relative
- if (_was_relative && this.is('relative')) {
- _path = _leadingParents + _path.substring(1);
- }
-
- this._parts.path = _path;
- this.build(!build);
- return this;
- };
- p.normalizePathname = p.normalizePath;
- p.normalizeQuery = function(build) {
- if (typeof this._parts.query === 'string') {
- if (!this._parts.query.length) {
- this._parts.query = null;
- } else {
- this.query(URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace));
- }
-
- this.build(!build);
- }
-
- return this;
- };
- p.normalizeFragment = function(build) {
- if (!this._parts.fragment) {
- this._parts.fragment = null;
- this.build(!build);
- }
-
- return this;
- };
- p.normalizeSearch = p.normalizeQuery;
- p.normalizeHash = p.normalizeFragment;
-
- p.iso8859 = function() {
- // expect unicode input, iso8859 output
- var e = URI.encode;
- var d = URI.decode;
-
- URI.encode = escape;
- URI.decode = decodeURIComponent;
- try {
- this.normalize();
- } finally {
- URI.encode = e;
- URI.decode = d;
- }
- return this;
- };
-
- p.unicode = function() {
- // expect iso8859 input, unicode output
- var e = URI.encode;
- var d = URI.decode;
-
- URI.encode = strictEncodeURIComponent;
- URI.decode = unescape;
- try {
- this.normalize();
- } finally {
- URI.encode = e;
- URI.decode = d;
- }
- return this;
- };
-
- p.readable = function() {
- var uri = this.clone();
- // removing username, password, because they shouldn't be displayed according to RFC 3986
- uri.username('').password('').normalize();
- var t = '';
- if (uri._parts.protocol) {
- t += uri._parts.protocol + '://';
- }
-
- if (uri._parts.hostname) {
- if (uri.is('punycode') && punycode) {
- t += punycode.toUnicode(uri._parts.hostname);
- if (uri._parts.port) {
- t += ':' + uri._parts.port;
- }
- } else {
- t += uri.host();
- }
- }
-
- if (uri._parts.hostname && uri._parts.path && uri._parts.path.charAt(0) !== '/') {
- t += '/';
- }
-
- t += uri.path(true);
- if (uri._parts.query) {
- var q = '';
- for (var i = 0, qp = uri._parts.query.split('&'), l = qp.length; i < l; i++) {
- var kv = (qp[i] || '').split('=');
- q += '&' + URI.decodeQuery(kv[0], this._parts.escapeQuerySpace)
- .replace(/&/g, '%26');
-
- if (kv[1] !== undefined) {
- q += '=' + URI.decodeQuery(kv[1], this._parts.escapeQuerySpace)
- .replace(/&/g, '%26');
- }
- }
- t += '?' + q.substring(1);
- }
-
- t += URI.decodeQuery(uri.hash(), true);
- return t;
- };
-
- // resolving relative and absolute URLs
- p.absoluteTo = function(base) {
- var resolved = this.clone();
- var properties = ['protocol', 'username', 'password', 'hostname', 'port'];
- var basedir, i, p;
-
- if (this._parts.urn) {
- throw new Error('URNs do not have any generally defined hierarchical components');
- }
-
- if (!(base instanceof URI)) {
- base = new URI(base);
- }
-
- if (!resolved._parts.protocol) {
- resolved._parts.protocol = base._parts.protocol;
- }
-
- if (this._parts.hostname) {
- return resolved;
- }
-
- for (i = 0; (p = properties[i]); i++) {
- resolved._parts[p] = base._parts[p];
- }
-
- if (!resolved._parts.path) {
- resolved._parts.path = base._parts.path;
- if (!resolved._parts.query) {
- resolved._parts.query = base._parts.query;
- }
- } else {
- if (resolved._parts.path.substring(-2) === '..') {
- resolved._parts.path += '/';
- }
-
- if (resolved.path().charAt(0) !== '/') {
- basedir = base.directory();
- basedir = basedir ? basedir : base.path().indexOf('/') === 0 ? '/' : '';
- resolved._parts.path = (basedir ? (basedir + '/') : '') + resolved._parts.path;
- resolved.normalizePath();
- }
- }
-
- resolved.build();
- return resolved;
- };
- p.relativeTo = function(base) {
- var relative = this.clone().normalize();
- var relativeParts, baseParts, common, relativePath, basePath;
-
- if (relative._parts.urn) {
- throw new Error('URNs do not have any generally defined hierarchical components');
- }
-
- base = new URI(base).normalize();
- relativeParts = relative._parts;
- baseParts = base._parts;
- relativePath = relative.path();
- basePath = base.path();
-
- if (relativePath.charAt(0) !== '/') {
- throw new Error('URI is already relative');
- }
-
- if (basePath.charAt(0) !== '/') {
- throw new Error('Cannot calculate a URI relative to another relative URI');
- }
-
- if (relativeParts.protocol === baseParts.protocol) {
- relativeParts.protocol = null;
- }
-
- if (relativeParts.username !== baseParts.username || relativeParts.password !== baseParts.password) {
- return relative.build();
- }
-
- if (relativeParts.protocol !== null || relativeParts.username !== null || relativeParts.password !== null) {
- return relative.build();
- }
-
- if (relativeParts.hostname === baseParts.hostname && relativeParts.port === baseParts.port) {
- relativeParts.hostname = null;
- relativeParts.port = null;
- } else {
- return relative.build();
- }
-
- if (relativePath === basePath) {
- relativeParts.path = '';
- return relative.build();
- }
-
- // determine common sub path
- common = URI.commonPath(relativePath, basePath);
-
- // If the paths have nothing in common, return a relative URL with the absolute path.
- if (!common) {
- return relative.build();
- }
-
- var parents = baseParts.path
- .substring(common.length)
- .replace(/[^\/]*$/, '')
- .replace(/.*?\//g, '../');
-
- relativeParts.path = (parents + relativeParts.path.substring(common.length)) || './';
-
- return relative.build();
- };
-
- // comparing URIs
- p.equals = function(uri) {
- var one = this.clone();
- var two = new URI(uri);
- var one_map = {};
- var two_map = {};
- var checked = {};
- var one_query, two_query, key;
-
- one.normalize();
- two.normalize();
-
- // exact match
- if (one.toString() === two.toString()) {
- return true;
- }
-
- // extract query string
- one_query = one.query();
- two_query = two.query();
- one.query('');
- two.query('');
-
- // definitely not equal if not even non-query parts match
- if (one.toString() !== two.toString()) {
- return false;
- }
-
- // query parameters have the same length, even if they're permuted
- if (one_query.length !== two_query.length) {
- return false;
- }
-
- one_map = URI.parseQuery(one_query, this._parts.escapeQuerySpace);
- two_map = URI.parseQuery(two_query, this._parts.escapeQuerySpace);
-
- for (key in one_map) {
- if (hasOwn.call(one_map, key)) {
- if (!isArray(one_map[key])) {
- if (one_map[key] !== two_map[key]) {
- return false;
- }
- } else if (!arraysEqual(one_map[key], two_map[key])) {
- return false;
- }
-
- checked[key] = true;
- }
- }
-
- for (key in two_map) {
- if (hasOwn.call(two_map, key)) {
- if (!checked[key]) {
- // two contains a parameter not present in one
- return false;
- }
- }
- }
-
- return true;
- };
-
- // state
- p.duplicateQueryParameters = function(v) {
- this._parts.duplicateQueryParameters = !!v;
- return this;
- };
-
- p.escapeQuerySpace = function(v) {
- this._parts.escapeQuerySpace = !!v;
- return this;
- };
-
- return URI;
-}));
diff --git a/thirdparty/URI.js/src/URI.min.js b/thirdparty/URI.js/src/URI.min.js
deleted file mode 100644
index 765a20f11..000000000
--- a/thirdparty/URI.js/src/URI.min.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/*! URI.js v1.18.2 http://medialize.github.io/URI.js/ */
-/* build contains: IPv6.js, punycode.js, SecondLevelDomains.js, URI.js, URITemplate.js */
-(function(f,h){"object"===typeof exports?module.exports=h():"function"===typeof define&&define.amd?define(h):f.IPv6=h(f)})(this,function(f){var h=f&&f.IPv6;return{best:function(g){g=g.toLowerCase().split(":");var n=g.length,b=8;""===g[0]&&""===g[1]&&""===g[2]?(g.shift(),g.shift()):""===g[0]&&""===g[1]?g.shift():""===g[n-1]&&""===g[n-2]&&g.pop();n=g.length;-1!==g[n-1].indexOf(".")&&(b=7);var k;for(k=0;k<n&&""!==g[k];k++);if(k<b)for(g.splice(k,1,"0000");g.length<b;)g.splice(k,0,"0000");for(k=0;k<b;k++){for(var n=
-g[k].split(""),f=0;3>f;f++)if("0"===n[0]&&1<n.length)n.splice(0,1);else break;g[k]=n.join("")}var n=-1,h=f=0,l=-1,q=!1;for(k=0;k<b;k++)q?"0"===g[k]?h+=1:(q=!1,h>f&&(n=l,f=h)):"0"===g[k]&&(q=!0,l=k,h=1);h>f&&(n=l,f=h);1<f&&g.splice(n,f,"");n=g.length;b="";""===g[0]&&(b=":");for(k=0;k<n;k++){b+=g[k];if(k===n-1)break;b+=":"}""===g[n-1]&&(b+=":");return b},noConflict:function(){f.IPv6===this&&(f.IPv6=h);return this}}});
-(function(f){function h(b){throw new RangeError(e[b]);}function g(b,e){for(var g=b.length,l=[];g--;)l[g]=e(b[g]);return l}function n(b,e){var l=b.split("@"),f="";1<l.length&&(f=l[0]+"@",b=l[1]);b=b.replace(x,".");l=b.split(".");l=g(l,e).join(".");return f+l}function b(b){for(var e=[],l=0,g=b.length,f,a;l<g;)f=b.charCodeAt(l++),55296<=f&&56319>=f&&l<g?(a=b.charCodeAt(l++),56320==(a&64512)?e.push(((f&1023)<<10)+(a&1023)+65536):(e.push(f),l--)):e.push(f);return e}function k(b){return g(b,function(b){var e=
-"";65535<b&&(b-=65536,e+=u(b>>>10&1023|55296),b=56320|b&1023);return e+=u(b)}).join("")}function A(b,e){return b+22+75*(26>b)-((0!=e)<<5)}function y(b,e,l){var g=0;b=l?p(b/700):b>>1;for(b+=p(b/e);455<b;g+=36)b=p(b/35);return p(g+36*b/(b+38))}function l(b){var e=[],l=b.length,g,f=0,a=128,c=72,d,m,w,z,n;d=b.lastIndexOf("-");0>d&&(d=0);for(m=0;m<d;++m)128<=b.charCodeAt(m)&&h("not-basic"),e.push(b.charCodeAt(m));for(d=0<d?d+1:0;d<l;){m=f;g=1;for(w=36;;w+=36){d>=l&&h("invalid-input");z=b.charCodeAt(d++);
-z=10>z-48?z-22:26>z-65?z-65:26>z-97?z-97:36;(36<=z||z>p((2147483647-f)/g))&&h("overflow");f+=z*g;n=w<=c?1:w>=c+26?26:w-c;if(z<n)break;z=36-n;g>p(2147483647/z)&&h("overflow");g*=z}g=e.length+1;c=y(f-m,g,0==m);p(f/g)>2147483647-a&&h("overflow");a+=p(f/g);f%=g;e.splice(f++,0,a)}return k(e)}function q(e){var l,g,f,n,a,c,d,m,w,z=[],q,k,B;e=b(e);q=e.length;l=128;g=0;a=72;for(c=0;c<q;++c)w=e[c],128>w&&z.push(u(w));for((f=n=z.length)&&z.push("-");f<q;){d=2147483647;for(c=0;c<q;++c)w=e[c],w>=l&&w<d&&(d=w);
-k=f+1;d-l>p((2147483647-g)/k)&&h("overflow");g+=(d-l)*k;l=d;for(c=0;c<q;++c)if(w=e[c],w<l&&2147483647<++g&&h("overflow"),w==l){m=g;for(d=36;;d+=36){w=d<=a?1:d>=a+26?26:d-a;if(m<w)break;B=m-w;m=36-w;z.push(u(A(w+B%m,0)));m=p(B/m)}z.push(u(A(m,0)));a=y(g,k,f==n);g=0;++f}++g;++l}return z.join("")}var B="object"==typeof exports&&exports&&!exports.nodeType&&exports,E="object"==typeof module&&module&&!module.nodeType&&module,D="object"==typeof global&&global;if(D.global===D||D.window===D||D.self===D)f=
-D;var r,v=/^xn--/,t=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,e={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,u=String.fromCharCode,C;r={version:"1.3.2",ucs2:{decode:b,encode:k},decode:l,encode:q,toASCII:function(b){return n(b,function(b){return t.test(b)?"xn--"+q(b):b})},toUnicode:function(b){return n(b,function(b){return v.test(b)?l(b.slice(4).toLowerCase()):b})}};if("function"==
-typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return r});else if(B&&E)if(module.exports==B)E.exports=r;else for(C in r)r.hasOwnProperty(C)&&(B[C]=r[C]);else f.punycode=r})(this);
-(function(f,h){"object"===typeof exports?module.exports=h():"function"===typeof define&&define.amd?define(h):f.SecondLevelDomains=h(f)})(this,function(f){var h=f&&f.SecondLevelDomains,g={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",
-bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",
-ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",
-es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",
-id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",
-kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",
-mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",
-ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",
-ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",
-tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",
-rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",
-tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",
-us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return!1;
-var k=f.lastIndexOf(".",b-1);if(0>=k||k>=b-1)return!1;var h=g.list[f.slice(b+1)];return h?0<=h.indexOf(" "+f.slice(k+1,b)+" "):!1},is:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1||0<=f.lastIndexOf(".",b-1))return!1;var k=g.list[f.slice(b+1)];return k?0<=k.indexOf(" "+f.slice(0,b)+" "):!1},get:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return null;var k=f.lastIndexOf(".",b-1);if(0>=k||k>=b-1)return null;var h=g.list[f.slice(b+1)];return!h||0>h.indexOf(" "+f.slice(k+
-1,b)+" ")?null:f.slice(k+1)},noConflict:function(){f.SecondLevelDomains===this&&(f.SecondLevelDomains=h);return this}};return g});
-(function(f,h){"object"===typeof exports?module.exports=h(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],h):f.URI=h(f.punycode,f.IPv6,f.SecondLevelDomains,f)})(this,function(f,h,g,n){function b(a,c){var d=1<=arguments.length,m=2<=arguments.length;if(!(this instanceof b))return d?m?new b(a,c):new b(a):new b;if(void 0===a){if(d)throw new TypeError("undefined is not a valid argument for URI");
-a="undefined"!==typeof location?location.href+"":""}this.href(a);return void 0!==c?this.absoluteTo(c):this}function k(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function A(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function y(a){return"Array"===A(a)}function l(a,c){var d={},b,w;if("RegExp"===A(c))d=null;else if(y(c))for(b=0,w=c.length;b<w;b++)d[c[b]]=!0;else d[c]=!0;b=0;for(w=a.length;b<w;b++)if(d&&void 0!==d[a[b]]||!d&&c.test(a[b]))a.splice(b,
-1),w--,b--;return a}function q(a,c){var d,b;if(y(c)){d=0;for(b=c.length;d<b;d++)if(!q(a,c[d]))return!1;return!0}var w=A(c);d=0;for(b=a.length;d<b;d++)if("RegExp"===w){if("string"===typeof a[d]&&a[d].match(c))return!0}else if(a[d]===c)return!0;return!1}function B(a,c){if(!y(a)||!y(c)||a.length!==c.length)return!1;a.sort();c.sort();for(var d=0,b=a.length;d<b;d++)if(a[d]!==c[d])return!1;return!0}function E(a){return a.replace(/^\/+|\/+$/g,"")}function D(a){return escape(a)}function r(a){return encodeURIComponent(a).replace(/[!'()*]/g,
-D).replace(/\*/g,"%2A")}function v(a){return function(c,d){if(void 0===c)return this._parts[a]||"";this._parts[a]=c||null;this.build(!d);return this}}function t(a,c){return function(d,b){if(void 0===d)return this._parts[a]||"";null!==d&&(d+="",d.charAt(0)===c&&(d=d.substring(1)));this._parts[a]=d;this.build(!b);return this}}var x=n&&n.URI;b.version="1.18.2";var e=b.prototype,p=Object.prototype.hasOwnProperty;b._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,
-port:null,path:null,query:null,fragment:null,duplicateQueryParameters:b.duplicateQueryParameters,escapeQuerySpace:b.escapeQuerySpace}};b.duplicateQueryParameters=!1;b.escapeQuerySpace=!0;b.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;b.idn_expression=/[^a-z0-9\.-]/i;b.punycode_expression=/(xn--)/i;b.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;b.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
-b.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;b.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/};b.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};b.invalid_hostname_characters=
-/[^a-zA-Z0-9\.-]/;b.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};b.getDomAttribute=function(a){if(a&&a.nodeName){var c=a.nodeName.toLowerCase();return"input"===c&&"image"!==a.type?void 0:b.domAttributes[c]}};b.encode=r;b.decode=decodeURIComponent;b.iso8859=function(){b.encode=escape;b.decode=unescape};b.unicode=function(){b.encode=r;b.decode=
-decodeURIComponent};b.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",",
-"%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};b.encodeQuery=function(a,c){var d=b.encode(a+"");void 0===c&&(c=b.escapeQuerySpace);return c?d.replace(/%20/g,"+"):d};b.decodeQuery=function(a,c){a+="";void 0===c&&(c=b.escapeQuerySpace);try{return b.decode(c?a.replace(/\+/g,
-"%20"):a)}catch(d){return a}};var u={encode:"encode",decode:"decode"},C,F=function(a,c){return function(d){try{return b[c](d+"").replace(b.characters[a][c].expression,function(d){return b.characters[a][c].map[d]})}catch(m){return d}}};for(C in u)b[C+"PathSegment"]=F("pathname",u[C]),b[C+"UrnPathSegment"]=F("urnpath",u[C]);u=function(a,c,d){return function(m){var w;w=d?function(a){return b[c](b[d](a))}:b[c];m=(m+"").split(a);for(var e=0,f=m.length;e<f;e++)m[e]=w(m[e]);return m.join(a)}};b.decodePath=
-u("/","decodePathSegment");b.decodeUrnPath=u(":","decodeUrnPathSegment");b.recodePath=u("/","encodePathSegment","decode");b.recodeUrnPath=u(":","encodeUrnPathSegment","decode");b.encodeReserved=F("reserved","encode");b.parse=function(a,c){var d;c||(c={});d=a.indexOf("#");-1<d&&(c.fragment=a.substring(d+1)||null,a=a.substring(0,d));d=a.indexOf("?");-1<d&&(c.query=a.substring(d+1)||null,a=a.substring(0,d));"//"===a.substring(0,2)?(c.protocol=null,a=a.substring(2),a=b.parseAuthority(a,c)):(d=a.indexOf(":"),
--1<d&&(c.protocol=a.substring(0,d)||null,c.protocol&&!c.protocol.match(b.protocol_expression)?c.protocol=void 0:"//"===a.substring(d+1,d+3)?(a=a.substring(d+3),a=b.parseAuthority(a,c)):(a=a.substring(d+1),c.urn=!0)));c.path=a;return c};b.parseHost=function(a,c){a=a.replace(/\\/g,"/");var d=a.indexOf("/"),b;-1===d&&(d=a.length);if("["===a.charAt(0))b=a.indexOf("]"),c.hostname=a.substring(1,b)||null,c.port=a.substring(b+2,d)||null,"/"===c.port&&(c.port=null);else{var e=a.indexOf(":");b=a.indexOf("/");
-e=a.indexOf(":",e+1);-1!==e&&(-1===b||e<b)?(c.hostname=a.substring(0,d)||null,c.port=null):(b=a.substring(0,d).split(":"),c.hostname=b[0]||null,c.port=b[1]||null)}c.hostname&&"/"!==a.substring(d).charAt(0)&&(d++,a="/"+a);return a.substring(d)||"/"};b.parseAuthority=function(a,c){a=b.parseUserinfo(a,c);return b.parseHost(a,c)};b.parseUserinfo=function(a,c){var d=a.indexOf("/"),m=a.lastIndexOf("@",-1<d?d:a.length-1);-1<m&&(-1===d||m<d)?(d=a.substring(0,m).split(":"),c.username=d[0]?b.decode(d[0]):null,
-d.shift(),c.password=d[0]?b.decode(d.join(":")):null,a=a.substring(m+1)):(c.username=null,c.password=null);return a};b.parseQuery=function(a,c){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var d={},m=a.split("&"),e=m.length,f,l,g=0;g<e;g++)if(f=m[g].split("="),l=b.decodeQuery(f.shift(),c),f=f.length?b.decodeQuery(f.join("="),c):null,p.call(d,l)){if("string"===typeof d[l]||null===d[l])d[l]=[d[l]];d[l].push(f)}else d[l]=f;return d};b.build=function(a){var c="";
-a.protocol&&(c+=a.protocol+":");a.urn||!c&&!a.hostname||(c+="//");c+=b.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&"string"===typeof a.hostname&&(c+="/"),c+=a.path);"string"===typeof a.query&&a.query&&(c+="?"+a.query);"string"===typeof a.fragment&&a.fragment&&(c+="#"+a.fragment);return c};b.buildHost=function(a){var c="";if(a.hostname)c=b.ip6_expression.test(a.hostname)?c+("["+a.hostname+"]"):c+a.hostname;else return"";a.port&&(c+=":"+a.port);return c};b.buildAuthority=
-function(a){return b.buildUserinfo(a)+b.buildHost(a)};b.buildUserinfo=function(a){var c="";a.username&&(c+=b.encode(a.username));a.password&&(c+=":"+b.encode(a.password));c&&(c+="@");return c};b.buildQuery=function(a,c,d){var m="",e,f,l,g;for(f in a)if(p.call(a,f)&&f)if(y(a[f]))for(e={},l=0,g=a[f].length;l<g;l++)void 0!==a[f][l]&&void 0===e[a[f][l]+""]&&(m+="&"+b.buildQueryParameter(f,a[f][l],d),!0!==c&&(e[a[f][l]+""]=!0));else void 0!==a[f]&&(m+="&"+b.buildQueryParameter(f,a[f],d));return m.substring(1)};
-b.buildQueryParameter=function(a,c,d){return b.encodeQuery(a,d)+(null!==c?"="+b.encodeQuery(c,d):"")};b.addQuery=function(a,c,d){if("object"===typeof c)for(var m in c)p.call(c,m)&&b.addQuery(a,m,c[m]);else if("string"===typeof c)void 0===a[c]?a[c]=d:("string"===typeof a[c]&&(a[c]=[a[c]]),y(d)||(d=[d]),a[c]=(a[c]||[]).concat(d));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};b.removeQuery=function(a,c,d){var m;if(y(c))for(d=0,m=c.length;d<m;d++)a[c[d]]=
-void 0;else if("RegExp"===A(c))for(m in a)c.test(m)&&(a[m]=void 0);else if("object"===typeof c)for(m in c)p.call(c,m)&&b.removeQuery(a,m,c[m]);else if("string"===typeof c)void 0!==d?"RegExp"===A(d)?!y(a[c])&&d.test(a[c])?a[c]=void 0:a[c]=l(a[c],d):a[c]!==String(d)||y(d)&&1!==d.length?y(a[c])&&(a[c]=l(a[c],d)):a[c]=void 0:a[c]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");};b.hasQuery=function(a,c,d,m){switch(A(c)){case "String":break;
-case "RegExp":for(var e in a)if(p.call(a,e)&&c.test(e)&&(void 0===d||b.hasQuery(a,e,d)))return!0;return!1;case "Object":for(var f in c)if(p.call(c,f)&&!b.hasQuery(a,f,c[f]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(A(d)){case "Undefined":return c in a;case "Boolean":return a=!(y(a[c])?!a[c].length:!a[c]),d===a;case "Function":return!!d(a[c],c,a);case "Array":return y(a[c])?(m?q:B)(a[c],d):!1;case "RegExp":return y(a[c])?
-m?q(a[c],d):!1:!(!a[c]||!a[c].match(d));case "Number":d=String(d);case "String":return y(a[c])?m?q(a[c],d):!1:a[c]===d;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}};b.joinPaths=function(){for(var a=[],c=[],d=0,m=0;m<arguments.length;m++){var e=new b(arguments[m]);a.push(e);for(var e=e.segment(),f=0;f<e.length;f++)"string"===typeof e[f]&&c.push(e[f]),e[f]&&d++}if(!c.length||!d)return new b("");c=(new b("")).segment(c);
-""!==a[0].path()&&"/"!==a[0].path().slice(0,1)||c.path("/"+c.path());return c.normalize()};b.commonPath=function(a,c){var d=Math.min(a.length,c.length),b;for(b=0;b<d;b++)if(a.charAt(b)!==c.charAt(b)){b--;break}if(1>b)return a.charAt(0)===c.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(b)||"/"!==c.charAt(b))b=a.substring(0,b).lastIndexOf("/");return a.substring(0,b+1)};b.withinString=function(a,c,d){d||(d={});var e=d.start||b.findUri.start,f=d.end||b.findUri.end,l=d.trim||b.findUri.trim,g=
-/[a-z0-9-]=["']?$/i;for(e.lastIndex=0;;){var q=e.exec(a);if(!q)break;q=q.index;if(d.ignoreHtml){var k=a.slice(Math.max(q-3,0),q);if(k&&g.test(k))continue}var k=q+a.slice(q).search(f),h=a.slice(q,k).replace(l,"");d.ignore&&d.ignore.test(h)||(k=q+h.length,h=c(h,q,k,a),void 0===h?e.lastIndex=k:(h=String(h),a=a.slice(0,q)+h+a.slice(k),e.lastIndex=q+h.length))}e.lastIndex=0;return a};b.ensureValidHostname=function(a){if(a.match(b.invalid_hostname_characters)){if(!f)throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');
-if(f.toASCII(a).match(b.invalid_hostname_characters))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');}};b.noConflict=function(a){if(a)return a={URI:this.noConflict()},n.URITemplate&&"function"===typeof n.URITemplate.noConflict&&(a.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"===typeof n.IPv6.noConflict&&(a.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"===typeof n.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=n.SecondLevelDomains.noConflict()),
-a;n.URI===this&&(n.URI=x);return this};e.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=b.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new b(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=v("protocol");e.username=v("username");e.password=v("password");e.hostname=v("hostname");e.port=v("port");e.query=t("query","?");e.fragment=t("fragment","#");e.search=function(a,c){var d=
-this.query(a,c);return"string"===typeof d&&d.length?"?"+d:d};e.hash=function(a,c){var d=this.fragment(a,c);return"string"===typeof d&&d.length?"#"+d:d};e.pathname=function(a,c){if(void 0===a||!0===a){var d=this._parts.path||(this._parts.hostname?"/":"");return a?(this._parts.urn?b.decodeUrnPath:b.decodePath)(d):d}this._parts.path=this._parts.urn?a?b.recodeUrnPath(a):"":a?b.recodePath(a):"/";this.build(!c);return this};e.path=e.pathname;e.href=function(a,c){var d;if(void 0===a)return this.toString();
-this._string="";this._parts=b._parts();var e=a instanceof b,f="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(f=b.getDomAttribute(a),a=a[f]||"",f=!1);!e&&f&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=b.parse(String(a),this._parts);else if(e||f)for(d in e=e?a._parts:a,e)p.call(this._parts,d)&&(this._parts[d]=e[d]);else throw new TypeError("invalid input");this.build(!c);return this};e.is=function(a){var c=!1,d=!1,e=!1,f=!1,l=!1,
-q=!1,k=!1,h=!this._parts.urn;this._parts.hostname&&(h=!1,d=b.ip4_expression.test(this._parts.hostname),e=b.ip6_expression.test(this._parts.hostname),c=d||e,l=(f=!c)&&g&&g.has(this._parts.hostname),q=f&&b.idn_expression.test(this._parts.hostname),k=f&&b.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return h;case "absolute":return!h;case "domain":case "name":return f;case "sld":return l;case "ip":return c;case "ip4":case "ipv4":case "inet4":return d;case "ip6":case "ipv6":case "inet6":return e;
-case "idn":return q;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn;case "punycode":return k}return null};var G=e.protocol,H=e.port,I=e.hostname;e.protocol=function(a,c){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(b.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return G.call(this,a,c)};e.scheme=e.protocol;e.port=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==
-a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError('Port "'+a+'" contains characters other than [0-9]');return H.call(this,a,c)};e.hostname=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var d={};if("/"!==b.parseHost(a,d))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');a=d.hostname}return I.call(this,a,c)};e.origin=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===
-a){var d=this.protocol();return this.authority()?(d?d+"://":"")+this.authority():""}d=b(a);this.protocol(d.protocol()).authority(d.authority()).build(!c);return this};e.host=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildHost(this._parts):"";if("/"!==b.parseHost(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!c);return this};e.authority=function(a,c){if(this._parts.urn)return void 0===
-a?"":this;if(void 0===a)return this._parts.hostname?b.buildAuthority(this._parts):"";if("/"!==b.parseAuthority(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!c);return this};e.userinfo=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var d=b.buildUserinfo(this._parts);return d?d.substring(0,d.length-1):d}"@"!==a[a.length-1]&&(a+="@");b.parseUserinfo(a,this._parts);this.build(!c);return this};e.resource=function(a,
-c){var d;if(void 0===a)return this.path()+this.search()+this.hash();d=b.parse(a);this._parts.path=d.path;this._parts.query=d.query;this._parts.fragment=d.fragment;this.build(!c);return this};e.subdomain=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,d)||""}d=this._parts.hostname.length-this.domain().length;d=this._parts.hostname.substring(0,
-d);d=new RegExp("^"+k(d));a&&"."!==a.charAt(a.length-1)&&(a+=".");a&&b.ensureValidHostname(a);this._parts.hostname=this._parts.hostname.replace(d,a);this.build(!c);return this};e.domain=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.match(/\./g);if(d&&2>d.length)return this._parts.hostname;d=this._parts.hostname.length-this.tld(c).length-1;d=this._parts.hostname.lastIndexOf(".",
-d-1)+1;return this._parts.hostname.substring(d)||""}if(!a)throw new TypeError("cannot set domain empty");b.ensureValidHostname(a);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(d=new RegExp(k(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a));this.build(!c);return this};e.tld=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.lastIndexOf("."),
-d=this._parts.hostname.substring(d+1);return!0!==c&&g&&g.list[d.toLowerCase()]?g.get(this._parts.hostname)||d:d}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(g&&g.is(a))d=new RegExp(k(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");d=new RegExp(k(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(d,
-a)}else throw new TypeError("cannot set TLD empty");this.build(!c);return this};e.directory=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var d=this._parts.path.length-this.filename().length-1,d=this._parts.path.substring(0,d)||(this._parts.hostname?"/":"");return a?b.decodePath(d):d}d=this._parts.path.length-this.filename().length;d=this._parts.path.substring(0,d);d=new RegExp("^"+
-k(d));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=b.recodePath(a);this._parts.path=this._parts.path.replace(d,a);this.build(!c);return this};e.filename=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this._parts.path.lastIndexOf("/"),d=this._parts.path.substring(d+1);return a?b.decodePathSegment(d):d}d=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&
-(d=!0);var e=new RegExp(k(this.filename())+"$");a=b.recodePath(a);this._parts.path=this._parts.path.replace(e,a);d?this.normalizePath(c):this.build(!c);return this};e.suffix=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this.filename(),e=d.lastIndexOf(".");if(-1===e)return"";d=d.substring(e+1);d=/^[a-z0-9%]+$/i.test(d)?d:"";return a?b.decodePathSegment(d):d}"."===a.charAt(0)&&(a=a.substring(1));if(d=this.suffix())e=
-a?new RegExp(k(d)+"$"):new RegExp(k("."+d)+"$");else{if(!a)return this;this._parts.path+="."+b.recodePath(a)}e&&(a=b.recodePath(a),this._parts.path=this._parts.path.replace(e,a));this.build(!c);return this};e.segment=function(a,c,d){var b=this._parts.urn?":":"/",e=this.path(),f="/"===e.substring(0,1),e=e.split(b);void 0!==a&&"number"!==typeof a&&(d=c,c=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');f&&e.shift();0>a&&(a=Math.max(e.length+
-a,0));if(void 0===c)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(y(c)){e=[];a=0;for(var l=c.length;a<l;a++)if(c[a].length||e.length&&e[e.length-1].length)e.length&&!e[e.length-1].length&&e.pop(),e.push(E(c[a]))}else{if(c||"string"===typeof c)c=E(c),""===e[e.length-1]?e[e.length-1]=c:e.push(c)}else c?e[a]=E(c):e.splice(a,1);f&&e.unshift("");return this.path(e.join(b),d)};e.segmentCoded=function(a,c,d){var e,f;"number"!==typeof a&&(d=c,c=a,a=void 0);if(void 0===c){a=this.segment(a,c,d);if(y(a))for(e=
-0,f=a.length;e<f;e++)a[e]=b.decode(a[e]);else a=void 0!==a?b.decode(a):void 0;return a}if(y(c))for(e=0,f=c.length;e<f;e++)c[e]=b.encode(c[e]);else c="string"===typeof c||c instanceof String?b.encode(c):c;return this.segment(a,c,d)};var J=e.query;e.query=function(a,c){if(!0===a)return b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof a){var d=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,d);this._parts.query=b.buildQuery(e||d,this._parts.duplicateQueryParameters,
-this._parts.escapeQuerySpace);this.build(!c);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=b.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!c),this):J.call(this,a,c)};e.setQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==c?c:null;else if("object"===typeof a)for(var f in a)p.call(a,f)&&(e[f]=a[f]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");
-this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.addQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.addQuery(e,a,void 0===c?null:c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.removeQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,
-this._parts.escapeQuerySpace);b.removeQuery(e,a,c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.hasQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return b.hasQuery(e,a,c,d)};e.setSearch=e.setQuery;e.addSearch=e.addQuery;e.removeSearch=e.removeQuery;e.hasSearch=e.hasQuery;e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():
-this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};e.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};e.normalizeHostname=function(a){this._parts.hostname&&(this.is("IDN")&&f?this._parts.hostname=f.toASCII(this._parts.hostname):this.is("IPv6")&&h&&(this._parts.hostname=h.best(this._parts.hostname)),this._parts.hostname=
-this._parts.hostname.toLowerCase(),this.build(!a));return this};e.normalizePort=function(a){"string"===typeof this._parts.protocol&&this._parts.port===b.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};e.normalizePath=function(a){var c=this._parts.path;if(!c)return this;if(this._parts.urn)return this._parts.path=b.recodeUrnPath(this._parts.path),this.build(!a),this;if("/"===this._parts.path)return this;var c=b.recodePath(c),d,e="",f,l;"/"!==c.charAt(0)&&(d=!0,
-c="/"+c);if("/.."===c.slice(-3)||"/."===c.slice(-2))c+="/";c=c.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");d&&(e=c.substring(1).match(/^(\.\.\/)+/)||"")&&(e=e[0]);for(;;){f=c.search(/\/\.\.(\/|$)/);if(-1===f)break;else if(0===f){c=c.substring(3);continue}l=c.substring(0,f).lastIndexOf("/");-1===l&&(l=f);c=c.substring(0,l)+c.substring(f+3)}d&&this.is("relative")&&(c=e+c.substring(1));this._parts.path=c;this.build(!a);return this};e.normalizePathname=e.normalizePath;e.normalizeQuery=
-function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(b.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};e.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};e.normalizeSearch=e.normalizeQuery;e.normalizeHash=e.normalizeFragment;e.iso8859=function(){var a=b.encode,c=b.decode;b.encode=escape;b.decode=decodeURIComponent;try{this.normalize()}finally{b.encode=
-a,b.decode=c}return this};e.unicode=function(){var a=b.encode,c=b.decode;b.encode=r;b.decode=unescape;try{this.normalize()}finally{b.encode=a,b.decode=c}return this};e.readable=function(){var a=this.clone();a.username("").password("").normalize();var c="";a._parts.protocol&&(c+=a._parts.protocol+"://");a._parts.hostname&&(a.is("punycode")&&f?(c+=f.toUnicode(a._parts.hostname),a._parts.port&&(c+=":"+a._parts.port)):c+=a.host());a._parts.hostname&&a._parts.path&&"/"!==a._parts.path.charAt(0)&&(c+="/");
-c+=a.path(!0);if(a._parts.query){for(var d="",e=0,l=a._parts.query.split("&"),g=l.length;e<g;e++){var q=(l[e]||"").split("="),d=d+("&"+b.decodeQuery(q[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==q[1]&&(d+="="+b.decodeQuery(q[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}c+="?"+d.substring(1)}return c+=b.decodeQuery(a.hash(),!0)};e.absoluteTo=function(a){var c=this.clone(),d=["protocol","username","password","hostname","port"],e,f;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");
-a instanceof b||(a=new b(a));c._parts.protocol||(c._parts.protocol=a._parts.protocol);if(this._parts.hostname)return c;for(e=0;f=d[e];e++)c._parts[f]=a._parts[f];c._parts.path?(".."===c._parts.path.substring(-2)&&(c._parts.path+="/"),"/"!==c.path().charAt(0)&&(d=(d=a.directory())?d:0===a.path().indexOf("/")?"/":"",c._parts.path=(d?d+"/":"")+c._parts.path,c.normalizePath())):(c._parts.path=a._parts.path,c._parts.query||(c._parts.query=a._parts.query));c.build();return c};e.relativeTo=function(a){var c=
-this.clone().normalize(),d,e,f;if(c._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new b(a)).normalize();d=c._parts;e=a._parts;f=c.path();a=a.path();if("/"!==f.charAt(0))throw Error("URI is already relative");if("/"!==a.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");d.protocol===e.protocol&&(d.protocol=null);if(d.username===e.username&&d.password===e.password&&null===d.protocol&&null===d.username&&null===d.password&&d.hostname===
-e.hostname&&d.port===e.port)d.hostname=null,d.port=null;else return c.build();if(f===a)return d.path="",c.build();f=b.commonPath(f,a);if(!f)return c.build();e=e.path.substring(f.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");d.path=e+d.path.substring(f.length)||"./";return c.build()};e.equals=function(a){var c=this.clone(),d=new b(a),e;a={};var f,l;c.normalize();d.normalize();if(c.toString()===d.toString())return!0;f=c.query();e=d.query();c.query("");d.query("");if(c.toString()!==d.toString()||
-f.length!==e.length)return!1;c=b.parseQuery(f,this._parts.escapeQuerySpace);e=b.parseQuery(e,this._parts.escapeQuerySpace);for(l in c)if(p.call(c,l)){if(!y(c[l])){if(c[l]!==e[l])return!1}else if(!B(c[l],e[l]))return!1;a[l]=!0}for(l in e)if(p.call(e,l)&&!a[l])return!1;return!0};e.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};e.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return b});
-(function(f,h){"object"===typeof exports?module.exports=h(require("./URI")):"function"===typeof define&&define.amd?define(["./URI"],h):f.URITemplate=h(f.URI,f)})(this,function(f,h){function g(b){if(g._cache[b])return g._cache[b];if(!(this instanceof g))return new g(b);this.expression=b;g._cache[b]=this;return this}function n(b){this.data=b;this.cache={}}var b=h&&h.URITemplate,k=Object.prototype.hasOwnProperty,A=g.prototype,y={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},
-"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",
-separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};g._cache={};g.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g;g.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/;g.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/;g.LITERAL_PATTERN=/[<>{}'"`^| \\]/;g.expand=function(b,f){var k=y[b.operator],h=k.named?"Named":"Unnamed",n=b.variables,r=[],v,t,x;for(x=0;t=n[x];x++)if(v=f.get(t.name),v.val.length){if(1<v.type&&t.maxlength)throw Error('Invalid expression: Prefix modifier not applicable to variable "'+
-t.name+'"');r.push(g["expand"+h](v,k,t.explode,t.explode&&k.separator||",",t.maxlength,t.name))}else v.type&&r.push("");return r.length?k.prefix+r.join(k.separator):""};g.expandNamed=function(b,g,k,h,n,r){var v="",t=g.encode;g=g.empty_name_separator;var x=!b[t].length,e=2===b.type?"":f[t](r),p,u,y;u=0;for(y=b.val.length;u<y;u++)n?(p=f[t](b.val[u][1].substring(0,n)),2===b.type&&(e=f[t](b.val[u][0].substring(0,n)))):x?(p=f[t](b.val[u][1]),2===b.type?(e=f[t](b.val[u][0]),b[t].push([e,p])):b[t].push([void 0,
-p])):(p=b[t][u][1],2===b.type&&(e=b[t][u][0])),v&&(v+=h),k?v+=e+(g||p?"=":"")+p:(u||(v+=f[t](r)+(g||p?"=":"")),2===b.type&&(v+=e+","),v+=p);return v};g.expandUnnamed=function(b,g,k,h,n){var r="",v=g.encode;g=g.empty_name_separator;var t=!b[v].length,x,e,p,u;p=0;for(u=b.val.length;p<u;p++)n?e=f[v](b.val[p][1].substring(0,n)):t?(e=f[v](b.val[p][1]),b[v].push([2===b.type?f[v](b.val[p][0]):void 0,e])):e=b[v][p][1],r&&(r+=h),2===b.type&&(x=n?f[v](b.val[p][0].substring(0,n)):b[v][p][0],r+=x,r=k?r+(g||e?
-"=":""):r+","),r+=e;return r};g.noConflict=function(){h.URITemplate===g&&(h.URITemplate=b);return g};A.expand=function(b){var f="";this.parts&&this.parts.length||this.parse();b instanceof n||(b=new n(b));for(var k=0,h=this.parts.length;k<h;k++)f+="string"===typeof this.parts[k]?this.parts[k]:g.expand(this.parts[k],b);return f};A.parse=function(){var b=this.expression,f=g.EXPRESSION_PATTERN,k=g.VARIABLE_PATTERN,h=g.VARIABLE_NAME_PATTERN,n=g.LITERAL_PATTERN,r=[],v=0,t,x,e,p=function(b){if(b.match(n))throw Error('Invalid Literal "'+
-b+'"');return b};for(f.lastIndex=0;;){x=f.exec(b);if(null===x){r.push(p(b.substring(v)));break}else r.push(p(b.substring(v,x.index))),v=x.index+x[0].length;if(!y[x[1]])throw Error('Unknown Operator "'+x[1]+'" in "'+x[0]+'"');if(!x[3])throw Error('Unclosed Expression "'+x[0]+'"');t=x[2].split(",");for(var u=0,A=t.length;u<A;u++){e=t[u].match(k);if(null===e)throw Error('Invalid Variable "'+t[u]+'" in "'+x[0]+'"');if(e[1].match(h))throw Error('Invalid Variable Name "'+e[1]+'" in "'+x[0]+'"');t[u]={name:e[1],
-explode:!!e[3],maxlength:e[4]&&parseInt(e[4],10)}}if(!t.length)throw Error('Expression Missing Variable(s) "'+x[0]+'"');r.push({expression:x[0],operator:x[1],variables:t})}r.length||r.push(p(b));this.parts=r;return this};n.prototype.get=function(b){var f=this.data,g={type:0,val:[],encode:[],encodeReserved:[]},h;if(void 0!==this.cache[b])return this.cache[b];this.cache[b]=g;f="[object Function]"===String(Object.prototype.toString.call(f))?f(b):"[object Function]"===String(Object.prototype.toString.call(f[b]))?
-f[b](b):f[b];if(void 0!==f&&null!==f)if("[object Array]"===String(Object.prototype.toString.call(f))){h=0;for(b=f.length;h<b;h++)void 0!==f[h]&&null!==f[h]&&g.val.push([void 0,String(f[h])]);g.val.length&&(g.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(f))){for(h in f)k.call(f,h)&&void 0!==f[h]&&null!==f[h]&&g.val.push([h,String(f[h])]);g.val.length&&(g.type=2)}else g.type=1,g.val.push([void 0,String(f)]);return g};f.expand=function(b,h){var k=(new g(b)).expand(h);return new f(k)};
-return g});
diff --git a/thirdparty/URI.js/src/URITemplate.js b/thirdparty/URI.js/src/URITemplate.js
deleted file mode 100644
index b739eb4fd..000000000
--- a/thirdparty/URI.js/src/URITemplate.js
+++ /dev/null
@@ -1,513 +0,0 @@
-/*!
- * URI.js - Mutating URLs
- * URI Template Support - http://tools.ietf.org/html/rfc6570
- *
- * Version: 1.18.2
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- * MIT License http://www.opensource.org/licenses/mit-license
- *
- */
-(function (root, factory) {
- 'use strict';
- // https://github.com/umdjs/umd/blob/master/returnExports.js
- if (typeof exports === 'object') {
- // Node
- module.exports = factory(require('./URI'));
- } else if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['./URI'], factory);
- } else {
- // Browser globals (root is window)
- root.URITemplate = factory(root.URI, root);
- }
-}(this, function (URI, root) {
- 'use strict';
- // FIXME: v2.0.0 renamce non-camelCase properties to uppercase
- /*jshint camelcase: false */
-
- // save current URITemplate variable, if any
- var _URITemplate = root && root.URITemplate;
-
- var hasOwn = Object.prototype.hasOwnProperty;
- function URITemplate(expression) {
- // serve from cache where possible
- if (URITemplate._cache[expression]) {
- return URITemplate._cache[expression];
- }
-
- // Allow instantiation without the 'new' keyword
- if (!(this instanceof URITemplate)) {
- return new URITemplate(expression);
- }
-
- this.expression = expression;
- URITemplate._cache[expression] = this;
- return this;
- }
-
- function Data(data) {
- this.data = data;
- this.cache = {};
- }
-
- var p = URITemplate.prototype;
- // list of operators and their defined options
- var operators = {
- // Simple string expansion
- '' : {
- prefix: '',
- separator: ',',
- named: false,
- empty_name_separator: false,
- encode : 'encode'
- },
- // Reserved character strings
- '+' : {
- prefix: '',
- separator: ',',
- named: false,
- empty_name_separator: false,
- encode : 'encodeReserved'
- },
- // Fragment identifiers prefixed by '#'
- '#' : {
- prefix: '#',
- separator: ',',
- named: false,
- empty_name_separator: false,
- encode : 'encodeReserved'
- },
- // Name labels or extensions prefixed by '.'
- '.' : {
- prefix: '.',
- separator: '.',
- named: false,
- empty_name_separator: false,
- encode : 'encode'
- },
- // Path segments prefixed by '/'
- '/' : {
- prefix: '/',
- separator: '/',
- named: false,
- empty_name_separator: false,
- encode : 'encode'
- },
- // Path parameter name or name=value pairs prefixed by ';'
- ';' : {
- prefix: ';',
- separator: ';',
- named: true,
- empty_name_separator: false,
- encode : 'encode'
- },
- // Query component beginning with '?' and consisting
- // of name=value pairs separated by '&'; an
- '?' : {
- prefix: '?',
- separator: '&',
- named: true,
- empty_name_separator: true,
- encode : 'encode'
- },
- // Continuation of query-style &name=value pairs
- // within a literal query component.
- '&' : {
- prefix: '&',
- separator: '&',
- named: true,
- empty_name_separator: true,
- encode : 'encode'
- }
-
- // The operator characters equals ("="), comma (","), exclamation ("!"),
- // at sign ("@"), and pipe ("|") are reserved for future extensions.
- };
-
- // storage for already parsed templates
- URITemplate._cache = {};
- // pattern to identify expressions [operator, variable-list] in template
- URITemplate.EXPRESSION_PATTERN = /\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g;
- // pattern to identify variables [name, explode, maxlength] in variable-list
- URITemplate.VARIABLE_PATTERN = /^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/;
- // pattern to verify variable name integrity
- URITemplate.VARIABLE_NAME_PATTERN = /[^a-zA-Z0-9%_.]/;
- // pattern to verify literal integrity
- URITemplate.LITERAL_PATTERN = /[<>{}'"`^| \\]/;
-
- // expand parsed expression (expression, not template!)
- URITemplate.expand = function(expression, data) {
- // container for defined options for the given operator
- var options = operators[expression.operator];
- // expansion type (include keys or not)
- var type = options.named ? 'Named' : 'Unnamed';
- // list of variables within the expression
- var variables = expression.variables;
- // result buffer for evaluating the expression
- var buffer = [];
- var d, variable, i;
-
- for (i = 0; (variable = variables[i]); i++) {
- // fetch simplified data source
- d = data.get(variable.name);
- if (!d.val.length) {
- if (d.type) {
- // empty variables (empty string)
- // still lead to a separator being appended!
- buffer.push('');
- }
- // no data, no action
- continue;
- }
-
- if (d.type > 1 && variable.maxlength) {
- // composite variable cannot specify maxlength
- throw new Error('Invalid expression: Prefix modifier not applicable to variable "' + variable.name + '"');
- }
-
- // expand the given variable
- buffer.push(URITemplate['expand' + type](
- d,
- options,
- variable.explode,
- variable.explode && options.separator || ',',
- variable.maxlength,
- variable.name
- ));
- }
-
- if (buffer.length) {
- return options.prefix + buffer.join(options.separator);
- } else {
- // prefix is not prepended for empty expressions
- return '';
- }
- };
- // expand a named variable
- URITemplate.expandNamed = function(d, options, explode, separator, length, name) {
- // variable result buffer
- var result = '';
- // peformance crap
- var encode = options.encode;
- var empty_name_separator = options.empty_name_separator;
- // flag noting if values are already encoded
- var _encode = !d[encode].length;
- // key for named expansion
- var _name = d.type === 2 ? '': URI[encode](name);
- var _value, i, l;
-
- // for each found value
- for (i = 0, l = d.val.length; i < l; i++) {
- if (length) {
- // maxlength must be determined before encoding can happen
- _value = URI[encode](d.val[i][1].substring(0, length));
- if (d.type === 2) {
- // apply maxlength to keys of objects as well
- _name = URI[encode](d.val[i][0].substring(0, length));
- }
- } else if (_encode) {
- // encode value
- _value = URI[encode](d.val[i][1]);
- if (d.type === 2) {
- // encode name and cache encoded value
- _name = URI[encode](d.val[i][0]);
- d[encode].push([_name, _value]);
- } else {
- // cache encoded value
- d[encode].push([undefined, _value]);
- }
- } else {
- // values are already encoded and can be pulled from cache
- _value = d[encode][i][1];
- if (d.type === 2) {
- _name = d[encode][i][0];
- }
- }
-
- if (result) {
- // unless we're the first value, prepend the separator
- result += separator;
- }
-
- if (!explode) {
- if (!i) {
- // first element, so prepend variable name
- result += URI[encode](name) + (empty_name_separator || _value ? '=' : '');
- }
-
- if (d.type === 2) {
- // without explode-modifier, keys of objects are returned comma-separated
- result += _name + ',';
- }
-
- result += _value;
- } else {
- // only add the = if it is either default (?&) or there actually is a value (;)
- result += _name + (empty_name_separator || _value ? '=' : '') + _value;
- }
- }
-
- return result;
- };
- // expand an unnamed variable
- URITemplate.expandUnnamed = function(d, options, explode, separator, length) {
- // variable result buffer
- var result = '';
- // performance crap
- var encode = options.encode;
- var empty_name_separator = options.empty_name_separator;
- // flag noting if values are already encoded
- var _encode = !d[encode].length;
- var _name, _value, i, l;
-
- // for each found value
- for (i = 0, l = d.val.length; i < l; i++) {
- if (length) {
- // maxlength must be determined before encoding can happen
- _value = URI[encode](d.val[i][1].substring(0, length));
- } else if (_encode) {
- // encode and cache value
- _value = URI[encode](d.val[i][1]);
- d[encode].push([
- d.type === 2 ? URI[encode](d.val[i][0]) : undefined,
- _value
- ]);
- } else {
- // value already encoded, pull from cache
- _value = d[encode][i][1];
- }
-
- if (result) {
- // unless we're the first value, prepend the separator
- result += separator;
- }
-
- if (d.type === 2) {
- if (length) {
- // maxlength also applies to keys of objects
- _name = URI[encode](d.val[i][0].substring(0, length));
- } else {
- // at this point the name must already be encoded
- _name = d[encode][i][0];
- }
-
- result += _name;
- if (explode) {
- // explode-modifier separates name and value by "="
- result += (empty_name_separator || _value ? '=' : '');
- } else {
- // no explode-modifier separates name and value by ","
- result += ',';
- }
- }
-
- result += _value;
- }
-
- return result;
- };
-
- URITemplate.noConflict = function() {
- if (root.URITemplate === URITemplate) {
- root.URITemplate = _URITemplate;
- }
-
- return URITemplate;
- };
-
- // expand template through given data map
- p.expand = function(data) {
- var result = '';
-
- if (!this.parts || !this.parts.length) {
- // lazilyy parse the template
- this.parse();
- }
-
- if (!(data instanceof Data)) {
- // make given data available through the
- // optimized data handling thingie
- data = new Data(data);
- }
-
- for (var i = 0, l = this.parts.length; i < l; i++) {
- /*jshint laxbreak: true */
- result += typeof this.parts[i] === 'string'
- // literal string
- ? this.parts[i]
- // expression
- : URITemplate.expand(this.parts[i], data);
- /*jshint laxbreak: false */
- }
-
- return result;
- };
- // parse template into action tokens
- p.parse = function() {
- // performance crap
- var expression = this.expression;
- var ePattern = URITemplate.EXPRESSION_PATTERN;
- var vPattern = URITemplate.VARIABLE_PATTERN;
- var nPattern = URITemplate.VARIABLE_NAME_PATTERN;
- var lPattern = URITemplate.LITERAL_PATTERN;
- // token result buffer
- var parts = [];
- // position within source template
- var pos = 0;
- var variables, eMatch, vMatch;
-
- var checkLiteral = function(literal) {
- if (literal.match(lPattern)) {
- throw new Error('Invalid Literal "' + literal + '"');
- }
- return literal;
- };
-
- // RegExp is shared accross all templates,
- // which requires a manual reset
- ePattern.lastIndex = 0;
- // I don't like while(foo = bar()) loops,
- // to make things simpler I go while(true) and break when required
- while (true) {
- eMatch = ePattern.exec(expression);
- if (eMatch === null) {
- // push trailing literal
- parts.push(checkLiteral(expression.substring(pos)));
- break;
- } else {
- // push leading literal
- parts.push(checkLiteral(expression.substring(pos, eMatch.index)));
- pos = eMatch.index + eMatch[0].length;
- }
-
- if (!operators[eMatch[1]]) {
- throw new Error('Unknown Operator "' + eMatch[1] + '" in "' + eMatch[0] + '"');
- } else if (!eMatch[3]) {
- throw new Error('Unclosed Expression "' + eMatch[0] + '"');
- }
-
- // parse variable-list
- variables = eMatch[2].split(',');
- for (var i = 0, l = variables.length; i < l; i++) {
- vMatch = variables[i].match(vPattern);
- if (vMatch === null) {
- throw new Error('Invalid Variable "' + variables[i] + '" in "' + eMatch[0] + '"');
- } else if (vMatch[1].match(nPattern)) {
- throw new Error('Invalid Variable Name "' + vMatch[1] + '" in "' + eMatch[0] + '"');
- }
-
- variables[i] = {
- name: vMatch[1],
- explode: !!vMatch[3],
- maxlength: vMatch[4] && parseInt(vMatch[4], 10)
- };
- }
-
- if (!variables.length) {
- throw new Error('Expression Missing Variable(s) "' + eMatch[0] + '"');
- }
-
- parts.push({
- expression: eMatch[0],
- operator: eMatch[1],
- variables: variables
- });
- }
-
- if (!parts.length) {
- // template doesn't contain any expressions
- // so it is a simple literal string
- // this probably should fire a warning or something?
- parts.push(checkLiteral(expression));
- }
-
- this.parts = parts;
- return this;
- };
-
- // simplify data structures
- Data.prototype.get = function(key) {
- // performance crap
- var data = this.data;
- // cache for processed data-point
- var d = {
- // type of data 0: undefined/null, 1: string, 2: object, 3: array
- type: 0,
- // original values (except undefined/null)
- val: [],
- // cache for encoded values (only for non-maxlength expansion)
- encode: [],
- encodeReserved: []
- };
- var i, l, value;
-
- if (this.cache[key] !== undefined) {
- // we've already processed this key
- return this.cache[key];
- }
-
- this.cache[key] = d;
-
- if (String(Object.prototype.toString.call(data)) === '[object Function]') {
- // data itself is a callback (global callback)
- value = data(key);
- } else if (String(Object.prototype.toString.call(data[key])) === '[object Function]') {
- // data is a map of callbacks (local callback)
- value = data[key](key);
- } else {
- // data is a map of data
- value = data[key];
- }
-
- // generalize input into [ [name1, value1], [name2, value2], … ]
- // so expansion has to deal with a single data structure only
- if (value === undefined || value === null) {
- // undefined and null values are to be ignored completely
- return d;
- } else if (String(Object.prototype.toString.call(value)) === '[object Array]') {
- for (i = 0, l = value.length; i < l; i++) {
- if (value[i] !== undefined && value[i] !== null) {
- // arrays don't have names
- d.val.push([undefined, String(value[i])]);
- }
- }
-
- if (d.val.length) {
- // only treat non-empty arrays as arrays
- d.type = 3; // array
- }
- } else if (String(Object.prototype.toString.call(value)) === '[object Object]') {
- for (i in value) {
- if (hasOwn.call(value, i) && value[i] !== undefined && value[i] !== null) {
- // objects have keys, remember them for named expansion
- d.val.push([i, String(value[i])]);
- }
- }
-
- if (d.val.length) {
- // only treat non-empty objects as objects
- d.type = 2; // object
- }
- } else {
- d.type = 1; // primitive string (could've been string, number, boolean and objects with a toString())
- // arrays don't have names
- d.val.push([undefined, String(value)]);
- }
-
- return d;
- };
-
- // hook into URI for fluid access
- URI.expand = function(expression, data) {
- var template = new URITemplate(expression);
- var expansion = template.expand(data);
-
- return new URI(expansion);
- };
-
- return URITemplate;
-}));
diff --git a/thirdparty/URI.js/src/jquery.URI.js b/thirdparty/URI.js/src/jquery.URI.js
deleted file mode 100644
index b16150090..000000000
--- a/thirdparty/URI.js/src/jquery.URI.js
+++ /dev/null
@@ -1,234 +0,0 @@
-/*!
- * URI.js - Mutating URLs
- * jQuery Plugin
- *
- * Version: 1.18.2
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/jquery-uri-plugin.html
- *
- * Licensed under
- * MIT License http://www.opensource.org/licenses/mit-license
- *
- */
-(function (root, factory) {
- 'use strict';
- // https://github.com/umdjs/umd/blob/master/returnExports.js
- if (typeof exports === 'object') {
- // Node
- module.exports = factory(require('jquery'), require('./URI'));
- } else if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['jquery', './URI'], factory);
- } else {
- // Browser globals (root is window)
- factory(root.jQuery, root.URI);
- }
-}(this, function ($, URI) {
- 'use strict';
- // FIXME: v2.0.0 renamce non-camelCase properties to uppercase
- /*jshint camelcase: false */
-
- var comparable = {};
- var compare = {
- // equals
- '=': function(value, target) {
- return value === target;
- },
- // ~= translates to value.match((?:^|\s)target(?:\s|$)) which is useless for URIs
- // |= translates to value.match((?:\b)target(?:-|\s|$)) which is useless for URIs
- // begins with
- '^=': function(value, target) {
- return !!(value + '').match(new RegExp('^' + escapeRegEx(target), 'i'));
- },
- // ends with
- '$=': function(value, target) {
- return !!(value + '').match(new RegExp(escapeRegEx(target) + '$', 'i'));
- },
- // contains
- '*=': function(value, target, property) {
- if (property === 'directory') {
- // add trailing slash so /dir/ will match the deep-end as well
- value += '/';
- }
-
- return !!(value + '').match(new RegExp(escapeRegEx(target), 'i'));
- },
- 'equals:': function(uri, target) {
- return uri.equals(target);
- },
- 'is:': function(uri, target) {
- return uri.is(target);
- }
- };
-
- function escapeRegEx(string) {
- // https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963
- return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
- }
-
- function getUriProperty(elem) {
- var nodeName = elem.nodeName.toLowerCase();
- var property = URI.domAttributes[nodeName];
- if (nodeName === 'input' && elem.type !== 'image') {
- // compensate ambiguous <input> that is not an image
- return undefined;
- }
-
- // NOTE: as we use a static mapping from element to attribute,
- // the HTML5 attribute issue should not come up again
- // https://github.com/medialize/URI.js/issues/69
- return property;
- }
-
- function generateAccessor(property) {
- return {
- get: function(elem) {
- return $(elem).uri()[property]();
- },
- set: function(elem, value) {
- $(elem).uri()[property](value);
- return value;
- }
- };
- }
-
- // populate lookup table and register $.attr('uri:accessor') handlers
- $.each('origin authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username'.split(' '), function(k, v) {
- comparable[v] = true;
- $.attrHooks['uri:' + v] = generateAccessor(v);
- });
-
- // pipe $.attr('src') and $.attr('href') through URI.js
- var _attrHooks = {
- get: function(elem) {
- return $(elem).uri();
- },
- set: function(elem, value) {
- return $(elem).uri().href(value).toString();
- }
- };
- $.each(['src', 'href', 'action', 'uri', 'cite'], function(k, v) {
- $.attrHooks[v] = {
- set: _attrHooks.set
- };
- });
- $.attrHooks.uri.get = _attrHooks.get;
-
- // general URI accessor
- $.fn.uri = function(uri) {
- var $this = this.first();
- var elem = $this.get(0);
- var property = getUriProperty(elem);
-
- if (!property) {
- throw new Error('Element "' + elem.nodeName + '" does not have either property: href, src, action, cite');
- }
-
- if (uri !== undefined) {
- var old = $this.data('uri');
- if (old) {
- return old.href(uri);
- }
-
- if (!(uri instanceof URI)) {
- uri = URI(uri || '');
- }
- } else {
- uri = $this.data('uri');
- if (uri) {
- return uri;
- } else {
- uri = URI($this.attr(property) || '');
- }
- }
-
- uri._dom_element = elem;
- uri._dom_attribute = property;
- uri.normalize();
- $this.data('uri', uri);
- return uri;
- };
-
- // overwrite URI.build() to update associated DOM element if necessary
- URI.prototype.build = function(deferBuild) {
- if (this._dom_element) {
- // cannot defer building when hooked into a DOM element
- this._string = URI.build(this._parts);
- this._deferred_build = false;
- this._dom_element.setAttribute(this._dom_attribute, this._string);
- this._dom_element[this._dom_attribute] = this._string;
- } else if (deferBuild === true) {
- this._deferred_build = true;
- } else if (deferBuild === undefined || this._deferred_build) {
- this._string = URI.build(this._parts);
- this._deferred_build = false;
- }
-
- return this;
- };
-
- // add :uri() pseudo class selector to sizzle
- var uriSizzle;
- var pseudoArgs = /^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;
- function uriPseudo (elem, text) {
- var match, property, uri;
-
- // skip anything without src|href|action and bad :uri() syntax
- if (!getUriProperty(elem) || !text) {
- return false;
- }
-
- match = text.match(pseudoArgs);
-
- if (!match || (!match[5] && match[2] !== ':' && !compare[match[2]])) {
- // abort because the given selector cannot be executed
- // filers seem to fail silently
- return false;
- }
-
- uri = $(elem).uri();
-
- if (match[5]) {
- return uri.is(match[5]);
- } else if (match[2] === ':') {
- property = match[1].toLowerCase() + ':';
- if (!compare[property]) {
- // filers seem to fail silently
- return false;
- }
-
- return compare[property](uri, match[4]);
- } else {
- property = match[1].toLowerCase();
- if (!comparable[property]) {
- // filers seem to fail silently
- return false;
- }
-
- return compare[match[2]](uri[property](), match[4], property);
- }
-
- return false;
- }
-
- if ($.expr.createPseudo) {
- // jQuery >= 1.8
- uriSizzle = $.expr.createPseudo(function (text) {
- return function (elem) {
- return uriPseudo(elem, text);
- };
- });
- } else {
- // jQuery < 1.8
- uriSizzle = function (elem, i, match) {
- return uriPseudo(elem, match[3]);
- };
- }
-
- $.expr[':'].uri = uriSizzle;
-
- // extending existing object rather than defining something new,
- // return jQuery anyway
- return $;
-}));
diff --git a/thirdparty/URI.js/src/jquery.URI.min.js b/thirdparty/URI.js/src/jquery.URI.min.js
deleted file mode 100644
index 39fe87abb..000000000
--- a/thirdparty/URI.js/src/jquery.URI.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*! URI.js v1.18.2 http://medialize.github.io/URI.js/ */
-/* build contains: jquery.URI.js */
-(function(d,e){"object"===typeof exports?module.exports=e(require("jquery"),require("./URI")):"function"===typeof define&&define.amd?define(["jquery","./URI"],e):e(d.jQuery,d.URI)})(this,function(d,e){function h(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function k(a){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:e.domAttributes[b]}function p(a){return{get:function(b){return d(b).uri()[a]()},set:function(b,c){d(b).uri()[a](c);return c}}}function l(a,b){var c,
-e,f;if(!k(a)||!b)return!1;c=b.match(q);if(!c||!c[5]&&":"!==c[2]&&!g[c[2]])return!1;f=d(a).uri();if(c[5])return f.is(c[5]);if(":"===c[2])return e=c[1].toLowerCase()+":",g[e]?g[e](f,c[4]):!1;e=c[1].toLowerCase();return m[e]?g[c[2]](f[e](),c[4],e):!1}var m={},g={"=":function(a,b){return a===b},"^=":function(a,b){return!!(a+"").match(new RegExp("^"+h(b),"i"))},"$=":function(a,b){return!!(a+"").match(new RegExp(h(b)+"$","i"))},"*=":function(a,b,c){"directory"===c&&(a+="/");return!!(a+"").match(new RegExp(h(b),
-"i"))},"equals:":function(a,b){return a.equals(b)},"is:":function(a,b){return a.is(b)}};d.each("origin authority directory domain filename fragment hash host hostname href password path pathname port protocol query resource scheme search subdomain suffix tld username".split(" "),function(a,b){m[b]=!0;d.attrHooks["uri:"+b]=p(b)});var r=function(a,b){return d(a).uri().href(b).toString()};d.each(["src","href","action","uri","cite"],function(a,b){d.attrHooks[b]={set:r}});d.attrHooks.uri.get=function(a){return d(a).uri()};
-d.fn.uri=function(a){var b=this.first(),c=b.get(0),d=k(c);if(!d)throw Error('Element "'+c.nodeName+'" does not have either property: href, src, action, cite');if(void 0!==a){var f=b.data("uri");if(f)return f.href(a);a instanceof e||(a=e(a||""))}else{if(a=b.data("uri"))return a;a=e(b.attr(d)||"")}a._dom_element=c;a._dom_attribute=d;a.normalize();b.data("uri",a);return a};e.prototype.build=function(a){if(this._dom_element)this._string=e.build(this._parts),this._deferred_build=!1,this._dom_element.setAttribute(this._dom_attribute,
-this._string),this._dom_element[this._dom_attribute]=this._string;else if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=e.build(this._parts),this._deferred_build=!1;return this};var n,q=/^([a-zA-Z]+)\s*([\^\$*]?=|:)\s*(['"]?)(.+)\3|^\s*([a-zA-Z0-9]+)\s*$/;n=d.expr.createPseudo?d.expr.createPseudo(function(a){return function(b){return l(b,a)}}):function(a,b,c){return l(a,c[3])};d.expr[":"].uri=n;return d}); \ No newline at end of file
diff --git a/thirdparty/URI.js/src/punycode.js b/thirdparty/URI.js/src/punycode.js
deleted file mode 100644
index 0b4f5da35..000000000
--- a/thirdparty/URI.js/src/punycode.js
+++ /dev/null
@@ -1,533 +0,0 @@
-/*! https://mths.be/punycode v1.4.0 by @mathias */
-;(function(root) {
-
- /** Detect free variables */
- var freeExports = typeof exports == 'object' && exports &&
- !exports.nodeType && exports;
- var freeModule = typeof module == 'object' && module &&
- !module.nodeType && module;
- var freeGlobal = typeof global == 'object' && global;
- if (
- freeGlobal.global === freeGlobal ||
- freeGlobal.window === freeGlobal ||
- freeGlobal.self === freeGlobal
- ) {
- root = freeGlobal;
- }
-
- /**
- * The `punycode` object.
- * @name punycode
- * @type Object
- */
- var punycode,
-
- /** Highest positive signed 32-bit float value */
- maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
-
- /** Bootstring parameters */
- base = 36,
- tMin = 1,
- tMax = 26,
- skew = 38,
- damp = 700,
- initialBias = 72,
- initialN = 128, // 0x80
- delimiter = '-', // '\x2D'
-
- /** Regular expressions */
- regexPunycode = /^xn--/,
- regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
- regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
-
- /** Error messages */
- errors = {
- 'overflow': 'Overflow: input needs wider integers to process',
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
- 'invalid-input': 'Invalid input'
- },
-
- /** Convenience shortcuts */
- baseMinusTMin = base - tMin,
- floor = Math.floor,
- stringFromCharCode = String.fromCharCode,
-
- /** Temporary variable */
- key;
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * A generic error utility function.
- * @private
- * @param {String} type The error type.
- * @returns {Error} Throws a `RangeError` with the applicable error message.
- */
- function error(type) {
- throw new RangeError(errors[type]);
- }
-
- /**
- * A generic `Array#map` utility function.
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} callback The function that gets called for every array
- * item.
- * @returns {Array} A new array of values returned by the callback function.
- */
- function map(array, fn) {
- var length = array.length;
- var result = [];
- while (length--) {
- result[length] = fn(array[length]);
- }
- return result;
- }
-
- /**
- * A simple `Array#map`-like wrapper to work with domain name strings or email
- * addresses.
- * @private
- * @param {String} domain The domain name or email address.
- * @param {Function} callback The function that gets called for every
- * character.
- * @returns {Array} A new string of characters returned by the callback
- * function.
- */
- function mapDomain(string, fn) {
- var parts = string.split('@');
- var result = '';
- if (parts.length > 1) {
- // In email addresses, only the domain name should be punycoded. Leave
- // the local part (i.e. everything up to `@`) intact.
- result = parts[0] + '@';
- string = parts[1];
- }
- // Avoid `split(regex)` for IE8 compatibility. See #17.
- string = string.replace(regexSeparators, '\x2E');
- var labels = string.split('.');
- var encoded = map(labels, fn).join('.');
- return result + encoded;
- }
-
- /**
- * Creates an array containing the numeric code points of each Unicode
- * character in the string. While JavaScript uses UCS-2 internally,
- * this function will convert a pair of surrogate halves (each of which
- * UCS-2 exposes as separate characters) into a single code point,
- * matching UTF-16.
- * @see `punycode.ucs2.encode`
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
- * @memberOf punycode.ucs2
- * @name decode
- * @param {String} string The Unicode input string (UCS-2).
- * @returns {Array} The new array of code points.
- */
- function ucs2decode(string) {
- var output = [],
- counter = 0,
- length = string.length,
- value,
- extra;
- while (counter < length) {
- value = string.charCodeAt(counter++);
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
- // high surrogate, and there is a next character
- extra = string.charCodeAt(counter++);
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
- } else {
- // unmatched surrogate; only append this code unit, in case the next
- // code unit is the high surrogate of a surrogate pair
- output.push(value);
- counter--;
- }
- } else {
- output.push(value);
- }
- }
- return output;
- }
-
- /**
- * Creates a string based on an array of numeric code points.
- * @see `punycode.ucs2.decode`
- * @memberOf punycode.ucs2
- * @name encode
- * @param {Array} codePoints The array of numeric code points.
- * @returns {String} The new Unicode string (UCS-2).
- */
- function ucs2encode(array) {
- return map(array, function(value) {
- var output = '';
- if (value > 0xFFFF) {
- value -= 0x10000;
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
- value = 0xDC00 | value & 0x3FF;
- }
- output += stringFromCharCode(value);
- return output;
- }).join('');
- }
-
- /**
- * Converts a basic code point into a digit/integer.
- * @see `digitToBasic()`
- * @private
- * @param {Number} codePoint The basic numeric code point value.
- * @returns {Number} The numeric value of a basic code point (for use in
- * representing integers) in the range `0` to `base - 1`, or `base` if
- * the code point does not represent a value.
- */
- function basicToDigit(codePoint) {
- if (codePoint - 48 < 10) {
- return codePoint - 22;
- }
- if (codePoint - 65 < 26) {
- return codePoint - 65;
- }
- if (codePoint - 97 < 26) {
- return codePoint - 97;
- }
- return base;
- }
-
- /**
- * Converts a digit/integer into a basic code point.
- * @see `basicToDigit()`
- * @private
- * @param {Number} digit The numeric value of a basic code point.
- * @returns {Number} The basic code point whose value (when used for
- * representing integers) is `digit`, which needs to be in the range
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
- * used; else, the lowercase form is used. The behavior is undefined
- * if `flag` is non-zero and `digit` has no uppercase form.
- */
- function digitToBasic(digit, flag) {
- // 0..25 map to ASCII a..z or A..Z
- // 26..35 map to ASCII 0..9
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
- }
-
- /**
- * Bias adaptation function as per section 3.4 of RFC 3492.
- * https://tools.ietf.org/html/rfc3492#section-3.4
- * @private
- */
- function adapt(delta, numPoints, firstTime) {
- var k = 0;
- delta = firstTime ? floor(delta / damp) : delta >> 1;
- delta += floor(delta / numPoints);
- for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
- delta = floor(delta / baseMinusTMin);
- }
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
- }
-
- /**
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
- * symbols.
- * @memberOf punycode
- * @param {String} input The Punycode string of ASCII-only symbols.
- * @returns {String} The resulting string of Unicode symbols.
- */
- function decode(input) {
- // Don't use UCS-2
- var output = [],
- inputLength = input.length,
- out,
- i = 0,
- n = initialN,
- bias = initialBias,
- basic,
- j,
- index,
- oldi,
- w,
- k,
- digit,
- t,
- /** Cached calculation results */
- baseMinusT;
-
- // Handle the basic code points: let `basic` be the number of input code
- // points before the last delimiter, or `0` if there is none, then copy
- // the first basic code points to the output.
-
- basic = input.lastIndexOf(delimiter);
- if (basic < 0) {
- basic = 0;
- }
-
- for (j = 0; j < basic; ++j) {
- // if it's not a basic code point
- if (input.charCodeAt(j) >= 0x80) {
- error('not-basic');
- }
- output.push(input.charCodeAt(j));
- }
-
- // Main decoding loop: start just after the last delimiter if any basic code
- // points were copied; start at the beginning otherwise.
-
- for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
-
- // `index` is the index of the next character to be consumed.
- // Decode a generalized variable-length integer into `delta`,
- // which gets added to `i`. The overflow checking is easier
- // if we increase `i` as we go, then subtract off its starting
- // value at the end to obtain `delta`.
- for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
-
- if (index >= inputLength) {
- error('invalid-input');
- }
-
- digit = basicToDigit(input.charCodeAt(index++));
-
- if (digit >= base || digit > floor((maxInt - i) / w)) {
- error('overflow');
- }
-
- i += digit * w;
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
-
- if (digit < t) {
- break;
- }
-
- baseMinusT = base - t;
- if (w > floor(maxInt / baseMinusT)) {
- error('overflow');
- }
-
- w *= baseMinusT;
-
- }
-
- out = output.length + 1;
- bias = adapt(i - oldi, out, oldi == 0);
-
- // `i` was supposed to wrap around from `out` to `0`,
- // incrementing `n` each time, so we'll fix that now:
- if (floor(i / out) > maxInt - n) {
- error('overflow');
- }
-
- n += floor(i / out);
- i %= out;
-
- // Insert `n` at position `i` of the output
- output.splice(i++, 0, n);
-
- }
-
- return ucs2encode(output);
- }
-
- /**
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
- * Punycode string of ASCII-only symbols.
- * @memberOf punycode
- * @param {String} input The string of Unicode symbols.
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
- */
- function encode(input) {
- var n,
- delta,
- handledCPCount,
- basicLength,
- bias,
- j,
- m,
- q,
- k,
- t,
- currentValue,
- output = [],
- /** `inputLength` will hold the number of code points in `input`. */
- inputLength,
- /** Cached calculation results */
- handledCPCountPlusOne,
- baseMinusT,
- qMinusT;
-
- // Convert the input in UCS-2 to Unicode
- input = ucs2decode(input);
-
- // Cache the length
- inputLength = input.length;
-
- // Initialize the state
- n = initialN;
- delta = 0;
- bias = initialBias;
-
- // Handle the basic code points
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue < 0x80) {
- output.push(stringFromCharCode(currentValue));
- }
- }
-
- handledCPCount = basicLength = output.length;
-
- // `handledCPCount` is the number of code points that have been handled;
- // `basicLength` is the number of basic code points.
-
- // Finish the basic string - if it is not empty - with a delimiter
- if (basicLength) {
- output.push(delimiter);
- }
-
- // Main encoding loop:
- while (handledCPCount < inputLength) {
-
- // All non-basic code points < n have been handled already. Find the next
- // larger one:
- for (m = maxInt, j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue >= n && currentValue < m) {
- m = currentValue;
- }
- }
-
- // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
- // but guard against overflow
- handledCPCountPlusOne = handledCPCount + 1;
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
- error('overflow');
- }
-
- delta += (m - n) * handledCPCountPlusOne;
- n = m;
-
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
-
- if (currentValue < n && ++delta > maxInt) {
- error('overflow');
- }
-
- if (currentValue == n) {
- // Represent delta as a generalized variable-length integer
- for (q = delta, k = base; /* no condition */; k += base) {
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
- if (q < t) {
- break;
- }
- qMinusT = q - t;
- baseMinusT = base - t;
- output.push(
- stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
- );
- q = floor(qMinusT / baseMinusT);
- }
-
- output.push(stringFromCharCode(digitToBasic(q, 0)));
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
- delta = 0;
- ++handledCPCount;
- }
- }
-
- ++delta;
- ++n;
-
- }
- return output.join('');
- }
-
- /**
- * Converts a Punycode string representing a domain name or an email address
- * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
- * it doesn't matter if you call it on a string that has already been
- * converted to Unicode.
- * @memberOf punycode
- * @param {String} input The Punycoded domain name or email address to
- * convert to Unicode.
- * @returns {String} The Unicode representation of the given Punycode
- * string.
- */
- function toUnicode(input) {
- return mapDomain(input, function(string) {
- return regexPunycode.test(string)
- ? decode(string.slice(4).toLowerCase())
- : string;
- });
- }
-
- /**
- * Converts a Unicode string representing a domain name or an email address to
- * Punycode. Only the non-ASCII parts of the domain name will be converted,
- * i.e. it doesn't matter if you call it with a domain that's already in
- * ASCII.
- * @memberOf punycode
- * @param {String} input The domain name or email address to convert, as a
- * Unicode string.
- * @returns {String} The Punycode representation of the given domain name or
- * email address.
- */
- function toASCII(input) {
- return mapDomain(input, function(string) {
- return regexNonASCII.test(string)
- ? 'xn--' + encode(string)
- : string;
- });
- }
-
- /*--------------------------------------------------------------------------*/
-
- /** Define the public API */
- punycode = {
- /**
- * A string representing the current Punycode.js version number.
- * @memberOf punycode
- * @type String
- */
- 'version': '1.3.2',
- /**
- * An object of methods to convert from JavaScript's internal character
- * representation (UCS-2) to Unicode code points, and back.
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
- * @memberOf punycode
- * @type Object
- */
- 'ucs2': {
- 'decode': ucs2decode,
- 'encode': ucs2encode
- },
- 'decode': decode,
- 'encode': encode,
- 'toASCII': toASCII,
- 'toUnicode': toUnicode
- };
-
- /** Expose `punycode` */
- // Some AMD build optimizers, like r.js, check for specific condition patterns
- // like the following:
- if (
- typeof define == 'function' &&
- typeof define.amd == 'object' &&
- define.amd
- ) {
- define('punycode', function() {
- return punycode;
- });
- } else if (freeExports && freeModule) {
- if (module.exports == freeExports) {
- // in Node.js, io.js, or RingoJS v0.8.0+
- freeModule.exports = punycode;
- } else {
- // in Narwhal or RingoJS v0.7.0-
- for (key in punycode) {
- punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
- }
- }
- } else {
- // in Rhino or a web browser
- root.punycode = punycode;
- }
-
-}(this));
diff --git a/thirdparty/URI.js/test/index.html b/thirdparty/URI.js/test/index.html
deleted file mode 100644
index 4efc3393f..000000000
--- a/thirdparty/URI.js/test/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8" />
- <title>URI Test Suite</title>
- <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
- <link rel="stylesheet" href="qunit/qunit-composite.css" type="text/css" media="screen">
- <script type="text/javascript" src="qunit/qunit.js"></script>
- <script type="text/javascript" src="qunit/qunit-composite.js"></script>
- <script>
- QUnit.testSuites([
- "test.URI.html",
- "test.jQuery-1.10.html",
- "test.jQuery-1.9.html",
- "test.jQuery-1.8.html",
- "test.jQuery-1.7.html",
- "test.fragmentQuery.html",
- "test.fragmentURI.html"
- ]);
- </script>
-</head>
-<body>
- <div id="qunit"></div>
- <div id="qunit-fixture"></div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/test/pre_libs.js b/thirdparty/URI.js/test/pre_libs.js
deleted file mode 100644
index c12a06e76..000000000
--- a/thirdparty/URI.js/test/pre_libs.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*global window */
-// FIXME: v2.0.0 renamce non-camelCase properties to uppercase
-/*jshint camelcase: false */
-window.URI = window.URI_pre_lib = 'original URI, before loading URI.js library';
-window.URITemplate = window.URITemplate_pre_lib = 'original URITemplate, before loading URI.js library';
-window.IPv6 = window.IPv6_pre_lib = 'original IPv6, before loading URI.js library';
-window.SecondLevelDomains = window.SecondLevelDomains_pre_lib = 'original SecondLevelDomains, before loading URI.js library';
diff --git a/thirdparty/URI.js/test/qunit/qunit-composite.css b/thirdparty/URI.js/test/qunit/qunit-composite.css
deleted file mode 100644
index 54e791b13..000000000
--- a/thirdparty/URI.js/test/qunit/qunit-composite.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.qunit-composite-suite {
- position: fixed;
- bottom: 0;
- left: 0;
-
- margin: 0;
- padding: 0;
- border-width: 1px 0 0;
- height: 45%;
- width: 100%;
-
- background: #fff;
-}
diff --git a/thirdparty/URI.js/test/qunit/qunit-composite.js b/thirdparty/URI.js/test/qunit/qunit-composite.js
deleted file mode 100644
index b713f55c8..000000000
--- a/thirdparty/URI.js/test/qunit/qunit-composite.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * JUnit reporter for QUnit v1.0.1
- *
- * https://github.com/jquery/qunit-composite
- *
- * Copyright 2013 jQuery Foundation and other contributors
- * Released under the MIT license.
- * https://jquery.org/license/
- */
-(function( QUnit ) {
-var iframe, hasBound, addClass,
- modules = 1,
- executingComposite = false;
-
-// TODO: Kill this fallback method once QUnit 1.12 is released
-addClass = typeof QUnit.addClass === "function" ?
- QUnit.addClass :
- (function() {
- var hasClass = typeof QUnit.hasClass === "function" ?
- QUnit.hasClass :
- function hasClass( elem, name ) {
- return ( " " + elem.className + " " ).indexOf( " " + name + " " ) > -1;
- };
- return function addClass( elem, name ) {
- if ( !hasClass( elem, name ) ) {
- elem.className += ( elem.className ? " " : "" ) + name;
- }
- };
- })();
-
-function runSuite( suite ) {
- var path;
-
- if ( QUnit.is( "object", suite ) ) {
- path = suite.path;
- suite = suite.name;
- } else {
- path = suite;
- }
-
- QUnit.asyncTest( suite, function() {
- iframe.setAttribute( "src", path );
- // QUnit.start is called from the child iframe's QUnit.done hook.
- });
-}
-
-function initIframe() {
- var iframeWin,
- body = document.body;
-
- function onIframeLoad() {
- var moduleName, testName,
- count = 0;
-
- if ( !iframe.src ) {
- return;
- }
-
- iframeWin.QUnit.moduleStart(function( data ) {
- // Capture module name for messages
- moduleName = data.name;
- });
-
- iframeWin.QUnit.testStart(function( data ) {
- // Capture test name for messages
- testName = data.name;
- });
- iframeWin.QUnit.testDone(function() {
- testName = undefined;
- });
-
- iframeWin.QUnit.log(function( data ) {
- if (testName === undefined) {
- return;
- }
- // Pass all test details through to the main page
- var message = ( moduleName ? moduleName + ": " : "" ) + testName + ": " + ( data.message || ( data.result ? "okay" : "failed" ) );
- expect( ++count );
- QUnit.push( data.result, data.actual, data.expected, message );
- });
-
- // Continue the outer test when the iframe's test is done
- iframeWin.QUnit.done( QUnit.start );
- }
-
- iframe = document.createElement( "iframe" );
- iframe.className = "qunit-composite-suite";
- body.appendChild( iframe );
-
- QUnit.addEvent( iframe, "load", onIframeLoad );
-
- iframeWin = iframe.contentWindow;
-}
-
-/**
- * @param {string} [name] Module name to group these test suites.
- * @param {Array} suites List of suites where each suite
- * may either be a string (path to the html test page),
- * or an object with a path and name property.
- */
-QUnit.testSuites = function( name, suites ) {
- var i, suitesLen;
-
- if ( arguments.length === 1 ) {
- suites = name;
- name = "Composition #" + modules++;
- }
- suitesLen = suites.length;
-
- if ( !hasBound ) {
- hasBound = true;
- QUnit.begin( initIframe );
-
- // TODO: Would be better to use something like QUnit.once( 'moduleDone' )
- // after the last test suite.
- QUnit.moduleDone( function () {
- executingComposite = false;
- } );
-
- QUnit.done(function() {
- iframe.style.display = "none";
- });
- }
-
- QUnit.module( name, {
- setup: function () {
- executingComposite = true;
- }
- });
-
- for ( i = 0; i < suitesLen; i++ ) {
- runSuite( suites[ i ] );
- }
-};
-
-QUnit.testDone(function() {
- if ( !executingComposite ) {
- return;
- }
-
- var i, len,
- current = QUnit.id( this.config.current.id ),
- children = current.children,
- src = iframe.src;
-
- QUnit.addEvent( current, "dblclick", function( e ) {
- var target = e && e.target ? e.target : window.event.srcElement;
- if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
- target = target.parentNode;
- }
- if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
- window.location = src;
- }
- });
-
- // Undo QUnit's auto-expansion for bad tests
- for ( i = 0, len = children.length; i < len; i++ ) {
- if ( children[ i ].nodeName.toLowerCase() === "ol" ) {
- addClass( children[ i ], "qunit-collapsed" );
- }
- }
-
- // Update Rerun link to point to the standalone test suite page
- current.getElementsByTagName( "a" )[ 0 ].href = src;
-});
-
-})( QUnit );
diff --git a/thirdparty/URI.js/test/qunit/qunit.css b/thirdparty/URI.js/test/qunit/qunit.css
deleted file mode 100644
index 7ba3f9a30..000000000
--- a/thirdparty/URI.js/test/qunit/qunit.css
+++ /dev/null
@@ -1,244 +0,0 @@
-/**
- * QUnit v1.12.0 - A JavaScript Unit Testing Framework
- *
- * http://qunitjs.com
- *
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- */
-
-/** Font Family and Sizes */
-
-#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
- font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
-}
-
-#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
-#qunit-tests { font-size: smaller; }
-
-
-/** Resets */
-
-#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
- margin: 0;
- padding: 0;
-}
-
-
-/** Header */
-
-#qunit-header {
- padding: 0.5em 0 0.5em 1em;
-
- color: #8699a4;
- background-color: #0d3349;
-
- font-size: 1.5em;
- line-height: 1em;
- font-weight: normal;
-
- border-radius: 5px 5px 0 0;
- -moz-border-radius: 5px 5px 0 0;
- -webkit-border-top-right-radius: 5px;
- -webkit-border-top-left-radius: 5px;
-}
-
-#qunit-header a {
- text-decoration: none;
- color: #c2ccd1;
-}
-
-#qunit-header a:hover,
-#qunit-header a:focus {
- color: #fff;
-}
-
-#qunit-testrunner-toolbar label {
- display: inline-block;
- padding: 0 .5em 0 .1em;
-}
-
-#qunit-banner {
- height: 5px;
-}
-
-#qunit-testrunner-toolbar {
- padding: 0.5em 0 0.5em 2em;
- color: #5E740B;
- background-color: #eee;
- overflow: hidden;
-}
-
-#qunit-userAgent {
- padding: 0.5em 0 0.5em 2.5em;
- background-color: #2b81af;
- color: #fff;
- text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
-}
-
-#qunit-modulefilter-container {
- float: right;
-}
-
-/** Tests: Pass/Fail */
-
-#qunit-tests {
- list-style-position: inside;
-}
-
-#qunit-tests li {
- padding: 0.4em 0.5em 0.4em 2.5em;
- border-bottom: 1px solid #fff;
- list-style-position: inside;
-}
-
-#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
- display: none;
-}
-
-#qunit-tests li strong {
- cursor: pointer;
-}
-
-#qunit-tests li a {
- padding: 0.5em;
- color: #c2ccd1;
- text-decoration: none;
-}
-#qunit-tests li a:hover,
-#qunit-tests li a:focus {
- color: #000;
-}
-
-#qunit-tests li .runtime {
- float: right;
- font-size: smaller;
-}
-
-.qunit-assert-list {
- margin-top: 0.5em;
- padding: 0.5em;
-
- background-color: #fff;
-
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-.qunit-collapsed {
- display: none;
-}
-
-#qunit-tests table {
- border-collapse: collapse;
- margin-top: .2em;
-}
-
-#qunit-tests th {
- text-align: right;
- vertical-align: top;
- padding: 0 .5em 0 0;
-}
-
-#qunit-tests td {
- vertical-align: top;
-}
-
-#qunit-tests pre {
- margin: 0;
- white-space: pre-wrap;
- word-wrap: break-word;
-}
-
-#qunit-tests del {
- background-color: #e0f2be;
- color: #374e0c;
- text-decoration: none;
-}
-
-#qunit-tests ins {
- background-color: #ffcaca;
- color: #500;
- text-decoration: none;
-}
-
-/*** Test Counts */
-
-#qunit-tests b.counts { color: black; }
-#qunit-tests b.passed { color: #5E740B; }
-#qunit-tests b.failed { color: #710909; }
-
-#qunit-tests li li {
- padding: 5px;
- background-color: #fff;
- border-bottom: none;
- list-style-position: inside;
-}
-
-/*** Passing Styles */
-
-#qunit-tests li li.pass {
- color: #3c510c;
- background-color: #fff;
- border-left: 10px solid #C6E746;
-}
-
-#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
-#qunit-tests .pass .test-name { color: #366097; }
-
-#qunit-tests .pass .test-actual,
-#qunit-tests .pass .test-expected { color: #999999; }
-
-#qunit-banner.qunit-pass { background-color: #C6E746; }
-
-/*** Failing Styles */
-
-#qunit-tests li li.fail {
- color: #710909;
- background-color: #fff;
- border-left: 10px solid #EE5757;
- white-space: pre;
-}
-
-#qunit-tests > li:last-child {
- border-radius: 0 0 5px 5px;
- -moz-border-radius: 0 0 5px 5px;
- -webkit-border-bottom-right-radius: 5px;
- -webkit-border-bottom-left-radius: 5px;
-}
-
-#qunit-tests .fail { color: #000000; background-color: #EE5757; }
-#qunit-tests .fail .test-name,
-#qunit-tests .fail .module-name { color: #000000; }
-
-#qunit-tests .fail .test-actual { color: #EE5757; }
-#qunit-tests .fail .test-expected { color: green; }
-
-#qunit-banner.qunit-fail { background-color: #EE5757; }
-
-
-/** Result */
-
-#qunit-testresult {
- padding: 0.5em 0.5em 0.5em 2.5em;
-
- color: #2b81af;
- background-color: #D2E0E6;
-
- border-bottom: 1px solid white;
-}
-#qunit-testresult .module-name {
- font-weight: bold;
-}
-
-/** Fixture */
-
-#qunit-fixture {
- position: absolute;
- top: -10000px;
- left: -10000px;
- width: 1000px;
- height: 1000px;
-}
diff --git a/thirdparty/URI.js/test/qunit/qunit.js b/thirdparty/URI.js/test/qunit/qunit.js
deleted file mode 100644
index 84c73907d..000000000
--- a/thirdparty/URI.js/test/qunit/qunit.js
+++ /dev/null
@@ -1,2212 +0,0 @@
-/**
- * QUnit v1.12.0 - A JavaScript Unit Testing Framework
- *
- * http://qunitjs.com
- *
- * Copyright 2013 jQuery Foundation and other contributors
- * Released under the MIT license.
- * https://jquery.org/license/
- */
-
-(function( window ) {
-
-var QUnit,
- assert,
- config,
- onErrorFnPrev,
- testId = 0,
- fileName = (sourceFromStacktrace( 0 ) || "" ).replace(/(:\d+)+\)?/, "").replace(/.+\//, ""),
- toString = Object.prototype.toString,
- hasOwn = Object.prototype.hasOwnProperty,
- // Keep a local reference to Date (GH-283)
- Date = window.Date,
- setTimeout = window.setTimeout,
- defined = {
- setTimeout: typeof window.setTimeout !== "undefined",
- sessionStorage: (function() {
- var x = "qunit-test-string";
- try {
- sessionStorage.setItem( x, x );
- sessionStorage.removeItem( x );
- return true;
- } catch( e ) {
- return false;
- }
- }())
- },
- /**
- * Provides a normalized error string, correcting an issue
- * with IE 7 (and prior) where Error.prototype.toString is
- * not properly implemented
- *
- * Based on http://es5.github.com/#x15.11.4.4
- *
- * @param {String|Error} error
- * @return {String} error message
- */
- errorString = function( error ) {
- var name, message,
- errorString = error.toString();
- if ( errorString.substring( 0, 7 ) === "[object" ) {
- name = error.name ? error.name.toString() : "Error";
- message = error.message ? error.message.toString() : "";
- if ( name && message ) {
- return name + ": " + message;
- } else if ( name ) {
- return name;
- } else if ( message ) {
- return message;
- } else {
- return "Error";
- }
- } else {
- return errorString;
- }
- },
- /**
- * Makes a clone of an object using only Array or Object as base,
- * and copies over the own enumerable properties.
- *
- * @param {Object} obj
- * @return {Object} New object with only the own properties (recursively).
- */
- objectValues = function( obj ) {
- // Grunt 0.3.x uses an older version of jshint that still has jshint/jshint#392.
- /*jshint newcap: false */
- var key, val,
- vals = QUnit.is( "array", obj ) ? [] : {};
- for ( key in obj ) {
- if ( hasOwn.call( obj, key ) ) {
- val = obj[key];
- vals[key] = val === Object(val) ? objectValues(val) : val;
- }
- }
- return vals;
- };
-
-function Test( settings ) {
- extend( this, settings );
- this.assertions = [];
- this.testNumber = ++Test.count;
-}
-
-Test.count = 0;
-
-Test.prototype = {
- init: function() {
- var a, b, li,
- tests = id( "qunit-tests" );
-
- if ( tests ) {
- b = document.createElement( "strong" );
- b.innerHTML = this.nameHtml;
-
- // `a` initialized at top of scope
- a = document.createElement( "a" );
- a.innerHTML = "Rerun";
- a.href = QUnit.url({ testNumber: this.testNumber });
-
- li = document.createElement( "li" );
- li.appendChild( b );
- li.appendChild( a );
- li.className = "running";
- li.id = this.id = "qunit-test-output" + testId++;
-
- tests.appendChild( li );
- }
- },
- setup: function() {
- if (
- // Emit moduleStart when we're switching from one module to another
- this.module !== config.previousModule ||
- // They could be equal (both undefined) but if the previousModule property doesn't
- // yet exist it means this is the first test in a suite that isn't wrapped in a
- // module, in which case we'll just emit a moduleStart event for 'undefined'.
- // Without this, reporters can get testStart before moduleStart which is a problem.
- !hasOwn.call( config, "previousModule" )
- ) {
- if ( hasOwn.call( config, "previousModule" ) ) {
- runLoggingCallbacks( "moduleDone", QUnit, {
- name: config.previousModule,
- failed: config.moduleStats.bad,
- passed: config.moduleStats.all - config.moduleStats.bad,
- total: config.moduleStats.all
- });
- }
- config.previousModule = this.module;
- config.moduleStats = { all: 0, bad: 0 };
- runLoggingCallbacks( "moduleStart", QUnit, {
- name: this.module
- });
- }
-
- config.current = this;
-
- this.testEnvironment = extend({
- setup: function() {},
- teardown: function() {}
- }, this.moduleTestEnvironment );
-
- this.started = +new Date();
- runLoggingCallbacks( "testStart", QUnit, {
- name: this.testName,
- module: this.module
- });
-
- /*jshint camelcase:false */
-
-
- /**
- * Expose the current test environment.
- *
- * @deprecated since 1.12.0: Use QUnit.config.current.testEnvironment instead.
- */
- QUnit.current_testEnvironment = this.testEnvironment;
-
- /*jshint camelcase:true */
-
- if ( !config.pollution ) {
- saveGlobal();
- }
- if ( config.notrycatch ) {
- this.testEnvironment.setup.call( this.testEnvironment, QUnit.assert );
- return;
- }
- try {
- this.testEnvironment.setup.call( this.testEnvironment, QUnit.assert );
- } catch( e ) {
- QUnit.pushFailure( "Setup failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 1 ) );
- }
- },
- run: function() {
- config.current = this;
-
- var running = id( "qunit-testresult" );
-
- if ( running ) {
- running.innerHTML = "Running: <br/>" + this.nameHtml;
- }
-
- if ( this.async ) {
- QUnit.stop();
- }
-
- this.callbackStarted = +new Date();
-
- if ( config.notrycatch ) {
- this.callback.call( this.testEnvironment, QUnit.assert );
- this.callbackRuntime = +new Date() - this.callbackStarted;
- return;
- }
-
- try {
- this.callback.call( this.testEnvironment, QUnit.assert );
- this.callbackRuntime = +new Date() - this.callbackStarted;
- } catch( e ) {
- this.callbackRuntime = +new Date() - this.callbackStarted;
-
- QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
- // else next test will carry the responsibility
- saveGlobal();
-
- // Restart the tests if they're blocking
- if ( config.blocking ) {
- QUnit.start();
- }
- }
- },
- teardown: function() {
- config.current = this;
- if ( config.notrycatch ) {
- if ( typeof this.callbackRuntime === "undefined" ) {
- this.callbackRuntime = +new Date() - this.callbackStarted;
- }
- this.testEnvironment.teardown.call( this.testEnvironment, QUnit.assert );
- return;
- } else {
- try {
- this.testEnvironment.teardown.call( this.testEnvironment, QUnit.assert );
- } catch( e ) {
- QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + ( e.message || e ), extractStacktrace( e, 1 ) );
- }
- }
- checkPollution();
- },
- finish: function() {
- config.current = this;
- if ( config.requireExpects && this.expected === null ) {
- QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
- } else if ( this.expected !== null && this.expected !== this.assertions.length ) {
- QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack );
- } else if ( this.expected === null && !this.assertions.length ) {
- QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack );
- }
-
- var i, assertion, a, b, time, li, ol,
- test = this,
- good = 0,
- bad = 0,
- tests = id( "qunit-tests" );
-
- this.runtime = +new Date() - this.started;
- config.stats.all += this.assertions.length;
- config.moduleStats.all += this.assertions.length;
-
- if ( tests ) {
- ol = document.createElement( "ol" );
- ol.className = "qunit-assert-list";
-
- for ( i = 0; i < this.assertions.length; i++ ) {
- assertion = this.assertions[i];
-
- li = document.createElement( "li" );
- li.className = assertion.result ? "pass" : "fail";
- li.innerHTML = assertion.message || ( assertion.result ? "okay" : "failed" );
- ol.appendChild( li );
-
- if ( assertion.result ) {
- good++;
- } else {
- bad++;
- config.stats.bad++;
- config.moduleStats.bad++;
- }
- }
-
- // store result when possible
- if ( QUnit.config.reorder && defined.sessionStorage ) {
- if ( bad ) {
- sessionStorage.setItem( "qunit-test-" + this.module + "-" + this.testName, bad );
- } else {
- sessionStorage.removeItem( "qunit-test-" + this.module + "-" + this.testName );
- }
- }
-
- if ( bad === 0 ) {
- addClass( ol, "qunit-collapsed" );
- }
-
- // `b` initialized at top of scope
- b = document.createElement( "strong" );
- b.innerHTML = this.nameHtml + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
-
- addEvent(b, "click", function() {
- var next = b.parentNode.lastChild,
- collapsed = hasClass( next, "qunit-collapsed" );
- ( collapsed ? removeClass : addClass )( next, "qunit-collapsed" );
- });
-
- addEvent(b, "dblclick", function( e ) {
- var target = e && e.target ? e.target : window.event.srcElement;
- if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
- target = target.parentNode;
- }
- if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
- window.location = QUnit.url({ testNumber: test.testNumber });
- }
- });
-
- // `time` initialized at top of scope
- time = document.createElement( "span" );
- time.className = "runtime";
- time.innerHTML = this.runtime + " ms";
-
- // `li` initialized at top of scope
- li = id( this.id );
- li.className = bad ? "fail" : "pass";
- li.removeChild( li.firstChild );
- a = li.firstChild;
- li.appendChild( b );
- li.appendChild( a );
- li.appendChild( time );
- li.appendChild( ol );
-
- } else {
- for ( i = 0; i < this.assertions.length; i++ ) {
- if ( !this.assertions[i].result ) {
- bad++;
- config.stats.bad++;
- config.moduleStats.bad++;
- }
- }
- }
-
- runLoggingCallbacks( "testDone", QUnit, {
- name: this.testName,
- module: this.module,
- failed: bad,
- passed: this.assertions.length - bad,
- total: this.assertions.length,
- duration: this.runtime
- });
-
- QUnit.reset();
-
- config.current = undefined;
- },
-
- queue: function() {
- var bad,
- test = this;
-
- synchronize(function() {
- test.init();
- });
- function run() {
- // each of these can by async
- synchronize(function() {
- test.setup();
- });
- synchronize(function() {
- test.run();
- });
- synchronize(function() {
- test.teardown();
- });
- synchronize(function() {
- test.finish();
- });
- }
-
- // `bad` initialized at top of scope
- // defer when previous test run passed, if storage is available
- bad = QUnit.config.reorder && defined.sessionStorage &&
- +sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName );
-
- if ( bad ) {
- run();
- } else {
- synchronize( run, true );
- }
- }
-};
-
-// Root QUnit object.
-// `QUnit` initialized at top of scope
-QUnit = {
-
- // call on start of module test to prepend name to all tests
- module: function( name, testEnvironment ) {
- config.currentModule = name;
- config.currentModuleTestEnvironment = testEnvironment;
- config.modules[name] = true;
- },
-
- asyncTest: function( testName, expected, callback ) {
- if ( arguments.length === 2 ) {
- callback = expected;
- expected = null;
- }
-
- QUnit.test( testName, expected, callback, true );
- },
-
- test: function( testName, expected, callback, async ) {
- var test,
- nameHtml = "<span class='test-name'>" + escapeText( testName ) + "</span>";
-
- if ( arguments.length === 2 ) {
- callback = expected;
- expected = null;
- }
-
- if ( config.currentModule ) {
- nameHtml = "<span class='module-name'>" + escapeText( config.currentModule ) + "</span>: " + nameHtml;
- }
-
- test = new Test({
- nameHtml: nameHtml,
- testName: testName,
- expected: expected,
- async: async,
- callback: callback,
- module: config.currentModule,
- moduleTestEnvironment: config.currentModuleTestEnvironment,
- stack: sourceFromStacktrace( 2 )
- });
-
- if ( !validTest( test ) ) {
- return;
- }
-
- test.queue();
- },
-
- // Specify the number of expected assertions to guarantee that failed test (no assertions are run at all) don't slip through.
- expect: function( asserts ) {
- if (arguments.length === 1) {
- config.current.expected = asserts;
- } else {
- return config.current.expected;
- }
- },
-
- start: function( count ) {
- // QUnit hasn't been initialized yet.
- // Note: RequireJS (et al) may delay onLoad
- if ( config.semaphore === undefined ) {
- QUnit.begin(function() {
- // This is triggered at the top of QUnit.load, push start() to the event loop, to allow QUnit.load to finish first
- setTimeout(function() {
- QUnit.start( count );
- });
- });
- return;
- }
-
- config.semaphore -= count || 1;
- // don't start until equal number of stop-calls
- if ( config.semaphore > 0 ) {
- return;
- }
- // ignore if start is called more often then stop
- if ( config.semaphore < 0 ) {
- config.semaphore = 0;
- QUnit.pushFailure( "Called start() while already started (QUnit.config.semaphore was 0 already)", null, sourceFromStacktrace(2) );
- return;
- }
- // A slight delay, to avoid any current callbacks
- if ( defined.setTimeout ) {
- setTimeout(function() {
- if ( config.semaphore > 0 ) {
- return;
- }
- if ( config.timeout ) {
- clearTimeout( config.timeout );
- }
-
- config.blocking = false;
- process( true );
- }, 13);
- } else {
- config.blocking = false;
- process( true );
- }
- },
-
- stop: function( count ) {
- config.semaphore += count || 1;
- config.blocking = true;
-
- if ( config.testTimeout && defined.setTimeout ) {
- clearTimeout( config.timeout );
- config.timeout = setTimeout(function() {
- QUnit.ok( false, "Test timed out" );
- config.semaphore = 1;
- QUnit.start();
- }, config.testTimeout );
- }
- }
-};
-
-// `assert` initialized at top of scope
-// Assert helpers
-// All of these must either call QUnit.push() or manually do:
-// - runLoggingCallbacks( "log", .. );
-// - config.current.assertions.push({ .. });
-// We attach it to the QUnit object *after* we expose the public API,
-// otherwise `assert` will become a global variable in browsers (#341).
-assert = {
- /**
- * Asserts rough true-ish result.
- * @name ok
- * @function
- * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
- */
- ok: function( result, msg ) {
- if ( !config.current ) {
- throw new Error( "ok() assertion outside test context, was " + sourceFromStacktrace(2) );
- }
- result = !!result;
- msg = msg || (result ? "okay" : "failed" );
-
- var source,
- details = {
- module: config.current.module,
- name: config.current.testName,
- result: result,
- message: msg
- };
-
- msg = "<span class='test-message'>" + escapeText( msg ) + "</span>";
-
- if ( !result ) {
- source = sourceFromStacktrace( 2 );
- if ( source ) {
- details.source = source;
- msg += "<table><tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr></table>";
- }
- }
- runLoggingCallbacks( "log", QUnit, details );
- config.current.assertions.push({
- result: result,
- message: msg
- });
- },
-
- /**
- * Assert that the first two arguments are equal, with an optional message.
- * Prints out both actual and expected values.
- * @name equal
- * @function
- * @example equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" );
- */
- equal: function( actual, expected, message ) {
- /*jshint eqeqeq:false */
- QUnit.push( expected == actual, actual, expected, message );
- },
-
- /**
- * @name notEqual
- * @function
- */
- notEqual: function( actual, expected, message ) {
- /*jshint eqeqeq:false */
- QUnit.push( expected != actual, actual, expected, message );
- },
-
- /**
- * @name propEqual
- * @function
- */
- propEqual: function( actual, expected, message ) {
- actual = objectValues(actual);
- expected = objectValues(expected);
- QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
- },
-
- /**
- * @name notPropEqual
- * @function
- */
- notPropEqual: function( actual, expected, message ) {
- actual = objectValues(actual);
- expected = objectValues(expected);
- QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
- },
-
- /**
- * @name deepEqual
- * @function
- */
- deepEqual: function( actual, expected, message ) {
- QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
- },
-
- /**
- * @name notDeepEqual
- * @function
- */
- notDeepEqual: function( actual, expected, message ) {
- QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
- },
-
- /**
- * @name strictEqual
- * @function
- */
- strictEqual: function( actual, expected, message ) {
- QUnit.push( expected === actual, actual, expected, message );
- },
-
- /**
- * @name notStrictEqual
- * @function
- */
- notStrictEqual: function( actual, expected, message ) {
- QUnit.push( expected !== actual, actual, expected, message );
- },
-
- "throws": function( block, expected, message ) {
- var actual,
- expectedOutput = expected,
- ok = false;
-
- // 'expected' is optional
- if ( typeof expected === "string" ) {
- message = expected;
- expected = null;
- }
-
- config.current.ignoreGlobalErrors = true;
- try {
- block.call( config.current.testEnvironment );
- } catch (e) {
- actual = e;
- }
- config.current.ignoreGlobalErrors = false;
-
- if ( actual ) {
- // we don't want to validate thrown error
- if ( !expected ) {
- ok = true;
- expectedOutput = null;
- // expected is a regexp
- } else if ( QUnit.objectType( expected ) === "regexp" ) {
- ok = expected.test( errorString( actual ) );
- // expected is a constructor
- } else if ( actual instanceof expected ) {
- ok = true;
- // expected is a validation function which returns true is validation passed
- } else if ( expected.call( {}, actual ) === true ) {
- expectedOutput = null;
- ok = true;
- }
-
- QUnit.push( ok, actual, expectedOutput, message );
- } else {
- QUnit.pushFailure( message, null, "No exception was thrown." );
- }
- }
-};
-
-/**
- * @deprecated since 1.8.0
- * Kept assertion helpers in root for backwards compatibility.
- */
-extend( QUnit, assert );
-
-/**
- * @deprecated since 1.9.0
- * Kept root "raises()" for backwards compatibility.
- * (Note that we don't introduce assert.raises).
- */
-QUnit.raises = assert[ "throws" ];
-
-/**
- * @deprecated since 1.0.0, replaced with error pushes since 1.3.0
- * Kept to avoid TypeErrors for undefined methods.
- */
-QUnit.equals = function() {
- QUnit.push( false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead" );
-};
-QUnit.same = function() {
- QUnit.push( false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead" );
-};
-
-// We want access to the constructor's prototype
-(function() {
- function F() {}
- F.prototype = QUnit;
- QUnit = new F();
- // Make F QUnit's constructor so that we can add to the prototype later
- QUnit.constructor = F;
-}());
-
-/**
- * Config object: Maintain internal state
- * Later exposed as QUnit.config
- * `config` initialized at top of scope
- */
-config = {
- // The queue of tests to run
- queue: [],
-
- // block until document ready
- blocking: true,
-
- // when enabled, show only failing tests
- // gets persisted through sessionStorage and can be changed in UI via checkbox
- hidepassed: false,
-
- // by default, run previously failed tests first
- // very useful in combination with "Hide passed tests" checked
- reorder: true,
-
- // by default, modify document.title when suite is done
- altertitle: true,
-
- // when enabled, all tests must call expect()
- requireExpects: false,
-
- // add checkboxes that are persisted in the query-string
- // when enabled, the id is set to `true` as a `QUnit.config` property
- urlConfig: [
- {
- id: "noglobals",
- label: "Check for Globals",
- tooltip: "Enabling this will test if any test introduces new properties on the `window` object. Stored as query-strings."
- },
- {
- id: "notrycatch",
- label: "No try-catch",
- tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings."
- }
- ],
-
- // Set of all modules.
- modules: {},
-
- // logging callback queues
- begin: [],
- done: [],
- log: [],
- testStart: [],
- testDone: [],
- moduleStart: [],
- moduleDone: []
-};
-
-// Export global variables, unless an 'exports' object exists,
-// in that case we assume we're in CommonJS (dealt with on the bottom of the script)
-if ( typeof exports === "undefined" ) {
- extend( window, QUnit.constructor.prototype );
-
- // Expose QUnit object
- window.QUnit = QUnit;
-}
-
-// Initialize more QUnit.config and QUnit.urlParams
-(function() {
- var i,
- location = window.location || { search: "", protocol: "file:" },
- params = location.search.slice( 1 ).split( "&" ),
- length = params.length,
- urlParams = {},
- current;
-
- if ( params[ 0 ] ) {
- for ( i = 0; i < length; i++ ) {
- current = params[ i ].split( "=" );
- current[ 0 ] = decodeURIComponent( current[ 0 ] );
- // allow just a key to turn on a flag, e.g., test.html?noglobals
- current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
- urlParams[ current[ 0 ] ] = current[ 1 ];
- }
- }
-
- QUnit.urlParams = urlParams;
-
- // String search anywhere in moduleName+testName
- config.filter = urlParams.filter;
-
- // Exact match of the module name
- config.module = urlParams.module;
-
- config.testNumber = parseInt( urlParams.testNumber, 10 ) || null;
-
- // Figure out if we're running the tests from a server or not
- QUnit.isLocal = location.protocol === "file:";
-}());
-
-// Extend QUnit object,
-// these after set here because they should not be exposed as global functions
-extend( QUnit, {
- assert: assert,
-
- config: config,
-
- // Initialize the configuration options
- init: function() {
- extend( config, {
- stats: { all: 0, bad: 0 },
- moduleStats: { all: 0, bad: 0 },
- started: +new Date(),
- updateRate: 1000,
- blocking: false,
- autostart: true,
- autorun: false,
- filter: "",
- queue: [],
- semaphore: 1
- });
-
- var tests, banner, result,
- qunit = id( "qunit" );
-
- if ( qunit ) {
- qunit.innerHTML =
- "<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
- "<h2 id='qunit-banner'></h2>" +
- "<div id='qunit-testrunner-toolbar'></div>" +
- "<h2 id='qunit-userAgent'></h2>" +
- "<ol id='qunit-tests'></ol>";
- }
-
- tests = id( "qunit-tests" );
- banner = id( "qunit-banner" );
- result = id( "qunit-testresult" );
-
- if ( tests ) {
- tests.innerHTML = "";
- }
-
- if ( banner ) {
- banner.className = "";
- }
-
- if ( result ) {
- result.parentNode.removeChild( result );
- }
-
- if ( tests ) {
- result = document.createElement( "p" );
- result.id = "qunit-testresult";
- result.className = "result";
- tests.parentNode.insertBefore( result, tests );
- result.innerHTML = "Running...<br/>&nbsp;";
- }
- },
-
- // Resets the test setup. Useful for tests that modify the DOM.
- /*
- DEPRECATED: Use multiple tests instead of resetting inside a test.
- Use testStart or testDone for custom cleanup.
- This method will throw an error in 2.0, and will be removed in 2.1
- */
- reset: function() {
- var fixture = id( "qunit-fixture" );
- if ( fixture ) {
- fixture.innerHTML = config.fixture;
- }
- },
-
- // Trigger an event on an element.
- // @example triggerEvent( document.body, "click" );
- triggerEvent: function( elem, type, event ) {
- if ( document.createEvent ) {
- event = document.createEvent( "MouseEvents" );
- event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
- 0, 0, 0, 0, 0, false, false, false, false, 0, null);
-
- elem.dispatchEvent( event );
- } else if ( elem.fireEvent ) {
- elem.fireEvent( "on" + type );
- }
- },
-
- // Safe object type checking
- is: function( type, obj ) {
- return QUnit.objectType( obj ) === type;
- },
-
- objectType: function( obj ) {
- if ( typeof obj === "undefined" ) {
- return "undefined";
- // consider: typeof null === object
- }
- if ( obj === null ) {
- return "null";
- }
-
- var match = toString.call( obj ).match(/^\[object\s(.*)\]$/),
- type = match && match[1] || "";
-
- switch ( type ) {
- case "Number":
- if ( isNaN(obj) ) {
- return "nan";
- }
- return "number";
- case "String":
- case "Boolean":
- case "Array":
- case "Date":
- case "RegExp":
- case "Function":
- return type.toLowerCase();
- }
- if ( typeof obj === "object" ) {
- return "object";
- }
- return undefined;
- },
-
- push: function( result, actual, expected, message ) {
- if ( !config.current ) {
- throw new Error( "assertion outside test context, was " + sourceFromStacktrace() );
- }
-
- var output, source,
- details = {
- module: config.current.module,
- name: config.current.testName,
- result: result,
- message: message,
- actual: actual,
- expected: expected
- };
-
- message = escapeText( message ) || ( result ? "okay" : "failed" );
- message = "<span class='test-message'>" + message + "</span>";
- output = message;
-
- if ( !result ) {
- expected = escapeText( QUnit.jsDump.parse(expected) );
- actual = escapeText( QUnit.jsDump.parse(actual) );
- output += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + expected + "</pre></td></tr>";
-
- if ( actual !== expected ) {
- output += "<tr class='test-actual'><th>Result: </th><td><pre>" + actual + "</pre></td></tr>";
- output += "<tr class='test-diff'><th>Diff: </th><td><pre>" + QUnit.diff( expected, actual ) + "</pre></td></tr>";
- }
-
- source = sourceFromStacktrace();
-
- if ( source ) {
- details.source = source;
- output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr>";
- }
-
- output += "</table>";
- }
-
- runLoggingCallbacks( "log", QUnit, details );
-
- config.current.assertions.push({
- result: !!result,
- message: output
- });
- },
-
- pushFailure: function( message, source, actual ) {
- if ( !config.current ) {
- throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace(2) );
- }
-
- var output,
- details = {
- module: config.current.module,
- name: config.current.testName,
- result: false,
- message: message
- };
-
- message = escapeText( message ) || "error";
- message = "<span class='test-message'>" + message + "</span>";
- output = message;
-
- output += "<table>";
-
- if ( actual ) {
- output += "<tr class='test-actual'><th>Result: </th><td><pre>" + escapeText( actual ) + "</pre></td></tr>";
- }
-
- if ( source ) {
- details.source = source;
- output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeText( source ) + "</pre></td></tr>";
- }
-
- output += "</table>";
-
- runLoggingCallbacks( "log", QUnit, details );
-
- config.current.assertions.push({
- result: false,
- message: output
- });
- },
-
- url: function( params ) {
- params = extend( extend( {}, QUnit.urlParams ), params );
- var key,
- querystring = "?";
-
- for ( key in params ) {
- if ( hasOwn.call( params, key ) ) {
- querystring += encodeURIComponent( key ) + "=" +
- encodeURIComponent( params[ key ] ) + "&";
- }
- }
- return window.location.protocol + "//" + window.location.host +
- window.location.pathname + querystring.slice( 0, -1 );
- },
-
- extend: extend,
- id: id,
- addEvent: addEvent,
- addClass: addClass,
- hasClass: hasClass,
- removeClass: removeClass
- // load, equiv, jsDump, diff: Attached later
-});
-
-/**
- * @deprecated: Created for backwards compatibility with test runner that set the hook function
- * into QUnit.{hook}, instead of invoking it and passing the hook function.
- * QUnit.constructor is set to the empty F() above so that we can add to it's prototype here.
- * Doing this allows us to tell if the following methods have been overwritten on the actual
- * QUnit object.
- */
-extend( QUnit.constructor.prototype, {
-
- // Logging callbacks; all receive a single argument with the listed properties
- // run test/logs.html for any related changes
- begin: registerLoggingCallback( "begin" ),
-
- // done: { failed, passed, total, runtime }
- done: registerLoggingCallback( "done" ),
-
- // log: { result, actual, expected, message }
- log: registerLoggingCallback( "log" ),
-
- // testStart: { name }
- testStart: registerLoggingCallback( "testStart" ),
-
- // testDone: { name, failed, passed, total, duration }
- testDone: registerLoggingCallback( "testDone" ),
-
- // moduleStart: { name }
- moduleStart: registerLoggingCallback( "moduleStart" ),
-
- // moduleDone: { name, failed, passed, total }
- moduleDone: registerLoggingCallback( "moduleDone" )
-});
-
-if ( typeof document === "undefined" || document.readyState === "complete" ) {
- config.autorun = true;
-}
-
-QUnit.load = function() {
- runLoggingCallbacks( "begin", QUnit, {} );
-
- // Initialize the config, saving the execution queue
- var banner, filter, i, label, len, main, ol, toolbar, userAgent, val,
- urlConfigCheckboxesContainer, urlConfigCheckboxes, moduleFilter,
- numModules = 0,
- moduleNames = [],
- moduleFilterHtml = "",
- urlConfigHtml = "",
- oldconfig = extend( {}, config );
-
- QUnit.init();
- extend(config, oldconfig);
-
- config.blocking = false;
-
- len = config.urlConfig.length;
-
- for ( i = 0; i < len; i++ ) {
- val = config.urlConfig[i];
- if ( typeof val === "string" ) {
- val = {
- id: val,
- label: val,
- tooltip: "[no tooltip available]"
- };
- }
- config[ val.id ] = QUnit.urlParams[ val.id ];
- urlConfigHtml += "<input id='qunit-urlconfig-" + escapeText( val.id ) +
- "' name='" + escapeText( val.id ) +
- "' type='checkbox'" + ( config[ val.id ] ? " checked='checked'" : "" ) +
- " title='" + escapeText( val.tooltip ) +
- "'><label for='qunit-urlconfig-" + escapeText( val.id ) +
- "' title='" + escapeText( val.tooltip ) + "'>" + val.label + "</label>";
- }
- for ( i in config.modules ) {
- if ( config.modules.hasOwnProperty( i ) ) {
- moduleNames.push(i);
- }
- }
- numModules = moduleNames.length;
- moduleNames.sort( function( a, b ) {
- return a.localeCompare( b );
- });
- moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label><select id='qunit-modulefilter' name='modulefilter'><option value='' " +
- ( config.module === undefined ? "selected='selected'" : "" ) +
- ">< All Modules ></option>";
-
-
- for ( i = 0; i < numModules; i++) {
- moduleFilterHtml += "<option value='" + escapeText( encodeURIComponent(moduleNames[i]) ) + "' " +
- ( config.module === moduleNames[i] ? "selected='selected'" : "" ) +
- ">" + escapeText(moduleNames[i]) + "</option>";
- }
- moduleFilterHtml += "</select>";
-
- // `userAgent` initialized at top of scope
- userAgent = id( "qunit-userAgent" );
- if ( userAgent ) {
- userAgent.innerHTML = navigator.userAgent;
- }
-
- // `banner` initialized at top of scope
- banner = id( "qunit-header" );
- if ( banner ) {
- banner.innerHTML = "<a href='" + QUnit.url({ filter: undefined, module: undefined, testNumber: undefined }) + "'>" + banner.innerHTML + "</a> ";
- }
-
- // `toolbar` initialized at top of scope
- toolbar = id( "qunit-testrunner-toolbar" );
- if ( toolbar ) {
- // `filter` initialized at top of scope
- filter = document.createElement( "input" );
- filter.type = "checkbox";
- filter.id = "qunit-filter-pass";
-
- addEvent( filter, "click", function() {
- var tmp,
- ol = document.getElementById( "qunit-tests" );
-
- if ( filter.checked ) {
- ol.className = ol.className + " hidepass";
- } else {
- tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " ";
- ol.className = tmp.replace( / hidepass /, " " );
- }
- if ( defined.sessionStorage ) {
- if (filter.checked) {
- sessionStorage.setItem( "qunit-filter-passed-tests", "true" );
- } else {
- sessionStorage.removeItem( "qunit-filter-passed-tests" );
- }
- }
- });
-
- if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem( "qunit-filter-passed-tests" ) ) {
- filter.checked = true;
- // `ol` initialized at top of scope
- ol = document.getElementById( "qunit-tests" );
- ol.className = ol.className + " hidepass";
- }
- toolbar.appendChild( filter );
-
- // `label` initialized at top of scope
- label = document.createElement( "label" );
- label.setAttribute( "for", "qunit-filter-pass" );
- label.setAttribute( "title", "Only show tests and assertions that fail. Stored in sessionStorage." );
- label.innerHTML = "Hide passed tests";
- toolbar.appendChild( label );
-
- urlConfigCheckboxesContainer = document.createElement("span");
- urlConfigCheckboxesContainer.innerHTML = urlConfigHtml;
- urlConfigCheckboxes = urlConfigCheckboxesContainer.getElementsByTagName("input");
- // For oldIE support:
- // * Add handlers to the individual elements instead of the container
- // * Use "click" instead of "change"
- // * Fallback from event.target to event.srcElement
- addEvents( urlConfigCheckboxes, "click", function( event ) {
- var params = {},
- target = event.target || event.srcElement;
- params[ target.name ] = target.checked ? true : undefined;
- window.location = QUnit.url( params );
- });
- toolbar.appendChild( urlConfigCheckboxesContainer );
-
- if (numModules > 1) {
- moduleFilter = document.createElement( "span" );
- moduleFilter.setAttribute( "id", "qunit-modulefilter-container" );
- moduleFilter.innerHTML = moduleFilterHtml;
- addEvent( moduleFilter.lastChild, "change", function() {
- var selectBox = moduleFilter.getElementsByTagName("select")[0],
- selectedModule = decodeURIComponent(selectBox.options[selectBox.selectedIndex].value);
-
- window.location = QUnit.url({
- module: ( selectedModule === "" ) ? undefined : selectedModule,
- // Remove any existing filters
- filter: undefined,
- testNumber: undefined
- });
- });
- toolbar.appendChild(moduleFilter);
- }
- }
-
- // `main` initialized at top of scope
- main = id( "qunit-fixture" );
- if ( main ) {
- config.fixture = main.innerHTML;
- }
-
- if ( config.autostart ) {
- QUnit.start();
- }
-};
-
-addEvent( window, "load", QUnit.load );
-
-// `onErrorFnPrev` initialized at top of scope
-// Preserve other handlers
-onErrorFnPrev = window.onerror;
-
-// Cover uncaught exceptions
-// Returning true will suppress the default browser handler,
-// returning false will let it run.
-window.onerror = function ( error, filePath, linerNr ) {
- var ret = false;
- if ( onErrorFnPrev ) {
- ret = onErrorFnPrev( error, filePath, linerNr );
- }
-
- // Treat return value as window.onerror itself does,
- // Only do our handling if not suppressed.
- if ( ret !== true ) {
- if ( QUnit.config.current ) {
- if ( QUnit.config.current.ignoreGlobalErrors ) {
- return true;
- }
- QUnit.pushFailure( error, filePath + ":" + linerNr );
- } else {
- QUnit.test( "global failure", extend( function() {
- QUnit.pushFailure( error, filePath + ":" + linerNr );
- }, { validTest: validTest } ) );
- }
- return false;
- }
-
- return ret;
-};
-
-function done() {
- config.autorun = true;
-
- // Log the last module results
- if ( config.currentModule ) {
- runLoggingCallbacks( "moduleDone", QUnit, {
- name: config.currentModule,
- failed: config.moduleStats.bad,
- passed: config.moduleStats.all - config.moduleStats.bad,
- total: config.moduleStats.all
- });
- }
- delete config.previousModule;
-
- var i, key,
- banner = id( "qunit-banner" ),
- tests = id( "qunit-tests" ),
- runtime = +new Date() - config.started,
- passed = config.stats.all - config.stats.bad,
- html = [
- "Tests completed in ",
- runtime,
- " milliseconds.<br/>",
- "<span class='passed'>",
- passed,
- "</span> assertions of <span class='total'>",
- config.stats.all,
- "</span> passed, <span class='failed'>",
- config.stats.bad,
- "</span> failed."
- ].join( "" );
-
- if ( banner ) {
- banner.className = ( config.stats.bad ? "qunit-fail" : "qunit-pass" );
- }
-
- if ( tests ) {
- id( "qunit-testresult" ).innerHTML = html;
- }
-
- if ( config.altertitle && typeof document !== "undefined" && document.title ) {
- // show ✖ for good, ✔ for bad suite result in title
- // use escape sequences in case file gets loaded with non-utf-8-charset
- document.title = [
- ( config.stats.bad ? "\u2716" : "\u2714" ),
- document.title.replace( /^[\u2714\u2716] /i, "" )
- ].join( " " );
- }
-
- // clear own sessionStorage items if all tests passed
- if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) {
- // `key` & `i` initialized at top of scope
- for ( i = 0; i < sessionStorage.length; i++ ) {
- key = sessionStorage.key( i++ );
- if ( key.indexOf( "qunit-test-" ) === 0 ) {
- sessionStorage.removeItem( key );
- }
- }
- }
-
- // scroll back to top to show results
- if ( window.scrollTo ) {
- window.scrollTo(0, 0);
- }
-
- runLoggingCallbacks( "done", QUnit, {
- failed: config.stats.bad,
- passed: passed,
- total: config.stats.all,
- runtime: runtime
- });
-}
-
-/** @return Boolean: true if this test should be ran */
-function validTest( test ) {
- var include,
- filter = config.filter && config.filter.toLowerCase(),
- module = config.module && config.module.toLowerCase(),
- fullName = (test.module + ": " + test.testName).toLowerCase();
-
- // Internally-generated tests are always valid
- if ( test.callback && test.callback.validTest === validTest ) {
- delete test.callback.validTest;
- return true;
- }
-
- if ( config.testNumber ) {
- return test.testNumber === config.testNumber;
- }
-
- if ( module && ( !test.module || test.module.toLowerCase() !== module ) ) {
- return false;
- }
-
- if ( !filter ) {
- return true;
- }
-
- include = filter.charAt( 0 ) !== "!";
- if ( !include ) {
- filter = filter.slice( 1 );
- }
-
- // If the filter matches, we need to honour include
- if ( fullName.indexOf( filter ) !== -1 ) {
- return include;
- }
-
- // Otherwise, do the opposite
- return !include;
-}
-
-// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions)
-// Later Safari and IE10 are supposed to support error.stack as well
-// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
-function extractStacktrace( e, offset ) {
- offset = offset === undefined ? 3 : offset;
-
- var stack, include, i;
-
- if ( e.stacktrace ) {
- // Opera
- return e.stacktrace.split( "\n" )[ offset + 3 ];
- } else if ( e.stack ) {
- // Firefox, Chrome
- stack = e.stack.split( "\n" );
- if (/^error$/i.test( stack[0] ) ) {
- stack.shift();
- }
- if ( fileName ) {
- include = [];
- for ( i = offset; i < stack.length; i++ ) {
- if ( stack[ i ].indexOf( fileName ) !== -1 ) {
- break;
- }
- include.push( stack[ i ] );
- }
- if ( include.length ) {
- return include.join( "\n" );
- }
- }
- return stack[ offset ];
- } else if ( e.sourceURL ) {
- // Safari, PhantomJS
- // hopefully one day Safari provides actual stacktraces
- // exclude useless self-reference for generated Error objects
- if ( /qunit.js$/.test( e.sourceURL ) ) {
- return;
- }
- // for actual exceptions, this is useful
- return e.sourceURL + ":" + e.line;
- }
-}
-function sourceFromStacktrace( offset ) {
- try {
- throw new Error();
- } catch ( e ) {
- return extractStacktrace( e, offset );
- }
-}
-
-/**
- * Escape text for attribute or text content.
- */
-function escapeText( s ) {
- if ( !s ) {
- return "";
- }
- s = s + "";
- // Both single quotes and double quotes (for attributes)
- return s.replace( /['"<>&]/g, function( s ) {
- switch( s ) {
- case "'":
- return "&#039;";
- case "\"":
- return "&quot;";
- case "<":
- return "&lt;";
- case ">":
- return "&gt;";
- case "&":
- return "&amp;";
- }
- });
-}
-
-function synchronize( callback, last ) {
- config.queue.push( callback );
-
- if ( config.autorun && !config.blocking ) {
- process( last );
- }
-}
-
-function process( last ) {
- function next() {
- process( last );
- }
- var start = new Date().getTime();
- config.depth = config.depth ? config.depth + 1 : 1;
-
- while ( config.queue.length && !config.blocking ) {
- if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {
- config.queue.shift()();
- } else {
- setTimeout( next, 13 );
- break;
- }
- }
- config.depth--;
- if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
- done();
- }
-}
-
-function saveGlobal() {
- config.pollution = [];
-
- if ( config.noglobals ) {
- for ( var key in window ) {
- if ( hasOwn.call( window, key ) ) {
- // in Opera sometimes DOM element ids show up here, ignore them
- if ( /^qunit-test-output/.test( key ) ) {
- continue;
- }
- config.pollution.push( key );
- }
- }
- }
-}
-
-function checkPollution() {
- var newGlobals,
- deletedGlobals,
- old = config.pollution;
-
- saveGlobal();
-
- newGlobals = diff( config.pollution, old );
- if ( newGlobals.length > 0 ) {
- QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") );
- }
-
- deletedGlobals = diff( old, config.pollution );
- if ( deletedGlobals.length > 0 ) {
- QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") );
- }
-}
-
-// returns a new Array with the elements that are in a but not in b
-function diff( a, b ) {
- var i, j,
- result = a.slice();
-
- for ( i = 0; i < result.length; i++ ) {
- for ( j = 0; j < b.length; j++ ) {
- if ( result[i] === b[j] ) {
- result.splice( i, 1 );
- i--;
- break;
- }
- }
- }
- return result;
-}
-
-function extend( a, b ) {
- for ( var prop in b ) {
- if ( hasOwn.call( b, prop ) ) {
- // Avoid "Member not found" error in IE8 caused by messing with window.constructor
- if ( !( prop === "constructor" && a === window ) ) {
- if ( b[ prop ] === undefined ) {
- delete a[ prop ];
- } else {
- a[ prop ] = b[ prop ];
- }
- }
- }
- }
-
- return a;
-}
-
-/**
- * @param {HTMLElement} elem
- * @param {string} type
- * @param {Function} fn
- */
-function addEvent( elem, type, fn ) {
- // Standards-based browsers
- if ( elem.addEventListener ) {
- elem.addEventListener( type, fn, false );
- // IE
- } else {
- elem.attachEvent( "on" + type, fn );
- }
-}
-
-/**
- * @param {Array|NodeList} elems
- * @param {string} type
- * @param {Function} fn
- */
-function addEvents( elems, type, fn ) {
- var i = elems.length;
- while ( i-- ) {
- addEvent( elems[i], type, fn );
- }
-}
-
-function hasClass( elem, name ) {
- return (" " + elem.className + " ").indexOf(" " + name + " ") > -1;
-}
-
-function addClass( elem, name ) {
- if ( !hasClass( elem, name ) ) {
- elem.className += (elem.className ? " " : "") + name;
- }
-}
-
-function removeClass( elem, name ) {
- var set = " " + elem.className + " ";
- // Class name may appear multiple times
- while ( set.indexOf(" " + name + " ") > -1 ) {
- set = set.replace(" " + name + " " , " ");
- }
- // If possible, trim it for prettiness, but not necessarily
- elem.className = typeof set.trim === "function" ? set.trim() : set.replace(/^\s+|\s+$/g, "");
-}
-
-function id( name ) {
- return !!( typeof document !== "undefined" && document && document.getElementById ) &&
- document.getElementById( name );
-}
-
-function registerLoggingCallback( key ) {
- return function( callback ) {
- config[key].push( callback );
- };
-}
-
-// Supports deprecated method of completely overwriting logging callbacks
-function runLoggingCallbacks( key, scope, args ) {
- var i, callbacks;
- if ( QUnit.hasOwnProperty( key ) ) {
- QUnit[ key ].call(scope, args );
- } else {
- callbacks = config[ key ];
- for ( i = 0; i < callbacks.length; i++ ) {
- callbacks[ i ].call( scope, args );
- }
- }
-}
-
-// Test for equality any JavaScript type.
-// Author: Philippe Rathé <prathe@gmail.com>
-QUnit.equiv = (function() {
-
- // Call the o related callback with the given arguments.
- function bindCallbacks( o, callbacks, args ) {
- var prop = QUnit.objectType( o );
- if ( prop ) {
- if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
- return callbacks[ prop ].apply( callbacks, args );
- } else {
- return callbacks[ prop ]; // or undefined
- }
- }
- }
-
- // the real equiv function
- var innerEquiv,
- // stack to decide between skip/abort functions
- callers = [],
- // stack to avoiding loops from circular referencing
- parents = [],
- parentsB = [],
-
- getProto = Object.getPrototypeOf || function ( obj ) {
- /*jshint camelcase:false */
- return obj.__proto__;
- },
- callbacks = (function () {
-
- // for string, boolean, number and null
- function useStrictEquality( b, a ) {
- /*jshint eqeqeq:false */
- if ( b instanceof a.constructor || a instanceof b.constructor ) {
- // to catch short annotation VS 'new' annotation of a
- // declaration
- // e.g. var i = 1;
- // var j = new Number(1);
- return a == b;
- } else {
- return a === b;
- }
- }
-
- return {
- "string": useStrictEquality,
- "boolean": useStrictEquality,
- "number": useStrictEquality,
- "null": useStrictEquality,
- "undefined": useStrictEquality,
-
- "nan": function( b ) {
- return isNaN( b );
- },
-
- "date": function( b, a ) {
- return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf();
- },
-
- "regexp": function( b, a ) {
- return QUnit.objectType( b ) === "regexp" &&
- // the regex itself
- a.source === b.source &&
- // and its modifiers
- a.global === b.global &&
- // (gmi) ...
- a.ignoreCase === b.ignoreCase &&
- a.multiline === b.multiline &&
- a.sticky === b.sticky;
- },
-
- // - skip when the property is a method of an instance (OOP)
- // - abort otherwise,
- // initial === would have catch identical references anyway
- "function": function() {
- var caller = callers[callers.length - 1];
- return caller !== Object && typeof caller !== "undefined";
- },
-
- "array": function( b, a ) {
- var i, j, len, loop, aCircular, bCircular;
-
- // b could be an object literal here
- if ( QUnit.objectType( b ) !== "array" ) {
- return false;
- }
-
- len = a.length;
- if ( len !== b.length ) {
- // safe and faster
- return false;
- }
-
- // track reference to avoid circular references
- parents.push( a );
- parentsB.push( b );
- for ( i = 0; i < len; i++ ) {
- loop = false;
- for ( j = 0; j < parents.length; j++ ) {
- aCircular = parents[j] === a[i];
- bCircular = parentsB[j] === b[i];
- if ( aCircular || bCircular ) {
- if ( a[i] === b[i] || aCircular && bCircular ) {
- loop = true;
- } else {
- parents.pop();
- parentsB.pop();
- return false;
- }
- }
- }
- if ( !loop && !innerEquiv(a[i], b[i]) ) {
- parents.pop();
- parentsB.pop();
- return false;
- }
- }
- parents.pop();
- parentsB.pop();
- return true;
- },
-
- "object": function( b, a ) {
- /*jshint forin:false */
- var i, j, loop, aCircular, bCircular,
- // Default to true
- eq = true,
- aProperties = [],
- bProperties = [];
-
- // comparing constructors is more strict than using
- // instanceof
- if ( a.constructor !== b.constructor ) {
- // Allow objects with no prototype to be equivalent to
- // objects with Object as their constructor.
- if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) ||
- ( getProto(b) === null && getProto(a) === Object.prototype ) ) ) {
- return false;
- }
- }
-
- // stack constructor before traversing properties
- callers.push( a.constructor );
-
- // track reference to avoid circular references
- parents.push( a );
- parentsB.push( b );
-
- // be strict: don't ensure hasOwnProperty and go deep
- for ( i in a ) {
- loop = false;
- for ( j = 0; j < parents.length; j++ ) {
- aCircular = parents[j] === a[i];
- bCircular = parentsB[j] === b[i];
- if ( aCircular || bCircular ) {
- if ( a[i] === b[i] || aCircular && bCircular ) {
- loop = true;
- } else {
- eq = false;
- break;
- }
- }
- }
- aProperties.push(i);
- if ( !loop && !innerEquiv(a[i], b[i]) ) {
- eq = false;
- break;
- }
- }
-
- parents.pop();
- parentsB.pop();
- callers.pop(); // unstack, we are done
-
- for ( i in b ) {
- bProperties.push( i ); // collect b's properties
- }
-
- // Ensures identical properties name
- return eq && innerEquiv( aProperties.sort(), bProperties.sort() );
- }
- };
- }());
-
- innerEquiv = function() { // can take multiple arguments
- var args = [].slice.apply( arguments );
- if ( args.length < 2 ) {
- return true; // end transition
- }
-
- return (function( a, b ) {
- if ( a === b ) {
- return true; // catch the most you can
- } else if ( a === null || b === null || typeof a === "undefined" ||
- typeof b === "undefined" ||
- QUnit.objectType(a) !== QUnit.objectType(b) ) {
- return false; // don't lose time with error prone cases
- } else {
- return bindCallbacks(a, callbacks, [ b, a ]);
- }
-
- // apply transition with (1..n) arguments
- }( args[0], args[1] ) && innerEquiv.apply( this, args.splice(1, args.length - 1 )) );
- };
-
- return innerEquiv;
-}());
-
-/**
- * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |
- * http://flesler.blogspot.com Licensed under BSD
- * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008
- *
- * @projectDescription Advanced and extensible data dumping for Javascript.
- * @version 1.0.0
- * @author Ariel Flesler
- * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
- */
-QUnit.jsDump = (function() {
- function quote( str ) {
- return "\"" + str.toString().replace( /"/g, "\\\"" ) + "\"";
- }
- function literal( o ) {
- return o + "";
- }
- function join( pre, arr, post ) {
- var s = jsDump.separator(),
- base = jsDump.indent(),
- inner = jsDump.indent(1);
- if ( arr.join ) {
- arr = arr.join( "," + s + inner );
- }
- if ( !arr ) {
- return pre + post;
- }
- return [ pre, inner + arr, base + post ].join(s);
- }
- function array( arr, stack ) {
- var i = arr.length, ret = new Array(i);
- this.up();
- while ( i-- ) {
- ret[i] = this.parse( arr[i] , undefined , stack);
- }
- this.down();
- return join( "[", ret, "]" );
- }
-
- var reName = /^function (\w+)/,
- jsDump = {
- // type is used mostly internally, you can fix a (custom)type in advance
- parse: function( obj, type, stack ) {
- stack = stack || [ ];
- var inStack, res,
- parser = this.parsers[ type || this.typeOf(obj) ];
-
- type = typeof parser;
- inStack = inArray( obj, stack );
-
- if ( inStack !== -1 ) {
- return "recursion(" + (inStack - stack.length) + ")";
- }
- if ( type === "function" ) {
- stack.push( obj );
- res = parser.call( this, obj, stack );
- stack.pop();
- return res;
- }
- return ( type === "string" ) ? parser : this.parsers.error;
- },
- typeOf: function( obj ) {
- var type;
- if ( obj === null ) {
- type = "null";
- } else if ( typeof obj === "undefined" ) {
- type = "undefined";
- } else if ( QUnit.is( "regexp", obj) ) {
- type = "regexp";
- } else if ( QUnit.is( "date", obj) ) {
- type = "date";
- } else if ( QUnit.is( "function", obj) ) {
- type = "function";
- } else if ( typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined" ) {
- type = "window";
- } else if ( obj.nodeType === 9 ) {
- type = "document";
- } else if ( obj.nodeType ) {
- type = "node";
- } else if (
- // native arrays
- toString.call( obj ) === "[object Array]" ||
- // NodeList objects
- ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) )
- ) {
- type = "array";
- } else if ( obj.constructor === Error.prototype.constructor ) {
- type = "error";
- } else {
- type = typeof obj;
- }
- return type;
- },
- separator: function() {
- return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? "&nbsp;" : " ";
- },
- // extra can be a number, shortcut for increasing-calling-decreasing
- indent: function( extra ) {
- if ( !this.multiline ) {
- return "";
- }
- var chr = this.indentChar;
- if ( this.HTML ) {
- chr = chr.replace( /\t/g, " " ).replace( / /g, "&nbsp;" );
- }
- return new Array( this.depth + ( extra || 0 ) ).join(chr);
- },
- up: function( a ) {
- this.depth += a || 1;
- },
- down: function( a ) {
- this.depth -= a || 1;
- },
- setParser: function( name, parser ) {
- this.parsers[name] = parser;
- },
- // The next 3 are exposed so you can use them
- quote: quote,
- literal: literal,
- join: join,
- //
- depth: 1,
- // This is the list of parsers, to modify them, use jsDump.setParser
- parsers: {
- window: "[Window]",
- document: "[Document]",
- error: function(error) {
- return "Error(\"" + error.message + "\")";
- },
- unknown: "[Unknown]",
- "null": "null",
- "undefined": "undefined",
- "function": function( fn ) {
- var ret = "function",
- // functions never have name in IE
- name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];
-
- if ( name ) {
- ret += " " + name;
- }
- ret += "( ";
-
- ret = [ ret, QUnit.jsDump.parse( fn, "functionArgs" ), "){" ].join( "" );
- return join( ret, QUnit.jsDump.parse(fn,"functionCode" ), "}" );
- },
- array: array,
- nodelist: array,
- "arguments": array,
- object: function( map, stack ) {
- /*jshint forin:false */
- var ret = [ ], keys, key, val, i;
- QUnit.jsDump.up();
- keys = [];
- for ( key in map ) {
- keys.push( key );
- }
- keys.sort();
- for ( i = 0; i < keys.length; i++ ) {
- key = keys[ i ];
- val = map[ key ];
- ret.push( QUnit.jsDump.parse( key, "key" ) + ": " + QUnit.jsDump.parse( val, undefined, stack ) );
- }
- QUnit.jsDump.down();
- return join( "{", ret, "}" );
- },
- node: function( node ) {
- var len, i, val,
- open = QUnit.jsDump.HTML ? "&lt;" : "<",
- close = QUnit.jsDump.HTML ? "&gt;" : ">",
- tag = node.nodeName.toLowerCase(),
- ret = open + tag,
- attrs = node.attributes;
-
- if ( attrs ) {
- for ( i = 0, len = attrs.length; i < len; i++ ) {
- val = attrs[i].nodeValue;
- // IE6 includes all attributes in .attributes, even ones not explicitly set.
- // Those have values like undefined, null, 0, false, "" or "inherit".
- if ( val && val !== "inherit" ) {
- ret += " " + attrs[i].nodeName + "=" + QUnit.jsDump.parse( val, "attribute" );
- }
- }
- }
- ret += close;
-
- // Show content of TextNode or CDATASection
- if ( node.nodeType === 3 || node.nodeType === 4 ) {
- ret += node.nodeValue;
- }
-
- return ret + open + "/" + tag + close;
- },
- // function calls it internally, it's the arguments part of the function
- functionArgs: function( fn ) {
- var args,
- l = fn.length;
-
- if ( !l ) {
- return "";
- }
-
- args = new Array(l);
- while ( l-- ) {
- // 97 is 'a'
- args[l] = String.fromCharCode(97+l);
- }
- return " " + args.join( ", " ) + " ";
- },
- // object calls it internally, the key part of an item in a map
- key: quote,
- // function calls it internally, it's the content of the function
- functionCode: "[code]",
- // node calls it internally, it's an html attribute value
- attribute: quote,
- string: quote,
- date: quote,
- regexp: literal,
- number: literal,
- "boolean": literal
- },
- // if true, entities are escaped ( <, >, \t, space and \n )
- HTML: false,
- // indentation unit
- indentChar: " ",
- // if true, items in a collection, are separated by a \n, else just a space.
- multiline: true
- };
-
- return jsDump;
-}());
-
-// from jquery.js
-function inArray( elem, array ) {
- if ( array.indexOf ) {
- return array.indexOf( elem );
- }
-
- for ( var i = 0, length = array.length; i < length; i++ ) {
- if ( array[ i ] === elem ) {
- return i;
- }
- }
-
- return -1;
-}
-
-/*
- * Javascript Diff Algorithm
- * By John Resig (http://ejohn.org/)
- * Modified by Chu Alan "sprite"
- *
- * Released under the MIT license.
- *
- * More Info:
- * http://ejohn.org/projects/javascript-diff-algorithm/
- *
- * Usage: QUnit.diff(expected, actual)
- *
- * QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
- */
-QUnit.diff = (function() {
- /*jshint eqeqeq:false, eqnull:true */
- function diff( o, n ) {
- var i,
- ns = {},
- os = {};
-
- for ( i = 0; i < n.length; i++ ) {
- if ( !hasOwn.call( ns, n[i] ) ) {
- ns[ n[i] ] = {
- rows: [],
- o: null
- };
- }
- ns[ n[i] ].rows.push( i );
- }
-
- for ( i = 0; i < o.length; i++ ) {
- if ( !hasOwn.call( os, o[i] ) ) {
- os[ o[i] ] = {
- rows: [],
- n: null
- };
- }
- os[ o[i] ].rows.push( i );
- }
-
- for ( i in ns ) {
- if ( hasOwn.call( ns, i ) ) {
- if ( ns[i].rows.length === 1 && hasOwn.call( os, i ) && os[i].rows.length === 1 ) {
- n[ ns[i].rows[0] ] = {
- text: n[ ns[i].rows[0] ],
- row: os[i].rows[0]
- };
- o[ os[i].rows[0] ] = {
- text: o[ os[i].rows[0] ],
- row: ns[i].rows[0]
- };
- }
- }
- }
-
- for ( i = 0; i < n.length - 1; i++ ) {
- if ( n[i].text != null && n[ i + 1 ].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null &&
- n[ i + 1 ] == o[ n[i].row + 1 ] ) {
-
- n[ i + 1 ] = {
- text: n[ i + 1 ],
- row: n[i].row + 1
- };
- o[ n[i].row + 1 ] = {
- text: o[ n[i].row + 1 ],
- row: i + 1
- };
- }
- }
-
- for ( i = n.length - 1; i > 0; i-- ) {
- if ( n[i].text != null && n[ i - 1 ].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null &&
- n[ i - 1 ] == o[ n[i].row - 1 ]) {
-
- n[ i - 1 ] = {
- text: n[ i - 1 ],
- row: n[i].row - 1
- };
- o[ n[i].row - 1 ] = {
- text: o[ n[i].row - 1 ],
- row: i - 1
- };
- }
- }
-
- return {
- o: o,
- n: n
- };
- }
-
- return function( o, n ) {
- o = o.replace( /\s+$/, "" );
- n = n.replace( /\s+$/, "" );
-
- var i, pre,
- str = "",
- out = diff( o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/) ),
- oSpace = o.match(/\s+/g),
- nSpace = n.match(/\s+/g);
-
- if ( oSpace == null ) {
- oSpace = [ " " ];
- }
- else {
- oSpace.push( " " );
- }
-
- if ( nSpace == null ) {
- nSpace = [ " " ];
- }
- else {
- nSpace.push( " " );
- }
-
- if ( out.n.length === 0 ) {
- for ( i = 0; i < out.o.length; i++ ) {
- str += "<del>" + out.o[i] + oSpace[i] + "</del>";
- }
- }
- else {
- if ( out.n[0].text == null ) {
- for ( n = 0; n < out.o.length && out.o[n].text == null; n++ ) {
- str += "<del>" + out.o[n] + oSpace[n] + "</del>";
- }
- }
-
- for ( i = 0; i < out.n.length; i++ ) {
- if (out.n[i].text == null) {
- str += "<ins>" + out.n[i] + nSpace[i] + "</ins>";
- }
- else {
- // `pre` initialized at top of scope
- pre = "";
-
- for ( n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) {
- pre += "<del>" + out.o[n] + oSpace[n] + "</del>";
- }
- str += " " + out.n[i].text + nSpace[i] + pre;
- }
- }
- }
-
- return str;
- };
-}());
-
-// for CommonJS environments, export everything
-if ( typeof exports !== "undefined" ) {
- extend( exports, QUnit.constructor.prototype );
-}
-
-// get at whatever the global object is, like window in browsers
-}( (function() {return this;}.call()) ));
diff --git a/thirdparty/URI.js/test/test.URI.html b/thirdparty/URI.js/test/test.URI.html
deleted file mode 100644
index 94f63c1c5..000000000
--- a/thirdparty/URI.js/test/test.URI.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8" />
- <title>URI.js - URI Test Suite</title>
- <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="pre_libs.js"></script>
- <script type="text/javascript" src="../src/punycode.js"></script>
- <script type="text/javascript" src="../src/IPv6.js"></script>
- <script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
- <script type="text/javascript" src="../src/URI.js"></script>
- <script type="text/javascript" src="../src/URITemplate.js"></script>
- <script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../src/jquery.URI.js"></script>
- <script type="text/javascript" src="qunit/qunit.js"></script>
-
- <script type="text/javascript" src="urls.js"></script>
- <script type="text/javascript" src="test.js"></script>
- <script type="text/javascript" src="test_jim.js"></script>
- <script type="text/javascript" src="test_template.js"></script>
-</head>
-<body>
- <div id="qunit"></div>
- <div id="qunit-fixture"></div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/test/test.fragmentQuery.html b/thirdparty/URI.js/test/test.fragmentQuery.html
deleted file mode 100644
index ec01640d8..000000000
--- a/thirdparty/URI.js/test/test.fragmentQuery.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8" />
- <title>fragmentQuery - URI Test Suite</title>
- <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="pre_libs.js"></script>
- <script type="text/javascript" src="../src/punycode.js"></script>
- <script type="text/javascript" src="../src/IPv6.js"></script>
- <script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
- <script type="text/javascript" src="../src/URI.js"></script>
- <script type="text/javascript" src="../src/URITemplate.js"></script>
- <script type="text/javascript" src="../src/URI.fragmentQuery.js"></script>
- <script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
- <script type="text/javascript" src="qunit/qunit.js"></script>
-
- <!--
- as the plugins alter core URI functionality,
- it is necessary to re-test URI itself was well
- -->
- <script type="text/javascript" src="urls.js"></script>
- <script type="text/javascript" src="test.js"></script>
- <script type="text/javascript" src="test_jim.js"></script>
- <script type="text/javascript" src="test_template.js"></script>
- <script type="text/javascript" src="test_fragmentQuery.js"></script>
-</head>
-<body>
- <div id="qunit"></div>
- <div id="qunit-fixture"></div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/test/test.fragmentURI.html b/thirdparty/URI.js/test/test.fragmentURI.html
deleted file mode 100644
index 50b5b9a79..000000000
--- a/thirdparty/URI.js/test/test.fragmentURI.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8" />
- <title>fragmentURI - URI Test Suite</title>
- <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="pre_libs.js"></script>
- <script type="text/javascript" src="../src/punycode.js"></script>
- <script type="text/javascript" src="../src/IPv6.js"></script>
- <script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
- <script type="text/javascript" src="../src/URI.js"></script>
- <script type="text/javascript" src="../src/URITemplate.js"></script>
- <script type="text/javascript" src="../src/URI.fragmentURI.js"></script>
- <script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
- <script type="text/javascript" src="qunit/qunit.js"></script>
-
- <!--
- as the plugins alter core URI functionality,
- it is necessary to re-test URI itself was well
- -->
- <script type="text/javascript" src="urls.js"></script>
- <script type="text/javascript" src="test.js"></script>
- <script type="text/javascript" src="test_jim.js"></script>
- <script type="text/javascript" src="test_template.js"></script>
- <script type="text/javascript" src="test_fragmentURI.js"></script>
-</head>
-<body>
- <div id="qunit"></div>
- <div id="qunit-fixture"></div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/test/test.jQuery-1.10.html b/thirdparty/URI.js/test/test.jQuery-1.10.html
deleted file mode 100644
index 5b7d50790..000000000
--- a/thirdparty/URI.js/test/test.jQuery-1.10.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8" />
- <title>jQuery Plugin 1.10 - URI Test Suite</title>
- <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="pre_libs.js"></script>
- <script type="text/javascript" src="../src/punycode.js"></script>
- <script type="text/javascript" src="../src/IPv6.js"></script>
- <script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
- <script type="text/javascript" src="../src/URI.js"></script>
- <script type="text/javascript" src="../src/URITemplate.js"></script>
- <script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../src/jquery.URI.js"></script>
- <script type="text/javascript" src="qunit/qunit.js"></script>
-
- <!--
- as the plugins alter core URI functionality,
- it is necessary to re-test URI itself was well
- -->
- <script type="text/javascript" src="urls.js"></script>
- <script type="text/javascript" src="test.js"></script>
- <script type="text/javascript" src="test_jim.js"></script>
- <script type="text/javascript" src="test_template.js"></script>
- <script type="text/javascript" src="test_jquery.js"></script>
-</head>
-<body>
- <div id="qunit"></div>
- <div id="qunit-fixture"></div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/test/test.jQuery-1.7.html b/thirdparty/URI.js/test/test.jQuery-1.7.html
deleted file mode 100644
index a6283cc35..000000000
--- a/thirdparty/URI.js/test/test.jQuery-1.7.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8" />
- <title>jQuery Plugin 1.7 - URI Test Suite</title>
- <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="pre_libs.js"></script>
- <script type="text/javascript" src="../src/punycode.js"></script>
- <script type="text/javascript" src="../src/IPv6.js"></script>
- <script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
- <script type="text/javascript" src="../src/URI.js"></script>
- <script type="text/javascript" src="../src/URITemplate.js"></script>
- <script type="text/javascript" src="../jquery-1.7.2.min.js"></script>
- <script type="text/javascript" src="../src/jquery.URI.js"></script>
- <script type="text/javascript" src="qunit/qunit.js"></script>
-
- <!--
- as the plugins alter core URI functionality,
- it is necessary to re-test URI itself was well
- -->
- <script type="text/javascript" src="urls.js"></script>
- <script type="text/javascript" src="test.js"></script>
- <script type="text/javascript" src="test_jim.js"></script>
- <script type="text/javascript" src="test_template.js"></script>
- <script type="text/javascript" src="test_jquery.js"></script>
-</head>
-<body>
- <div id="qunit"></div>
- <div id="qunit-fixture"></div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/test/test.jQuery-1.8.html b/thirdparty/URI.js/test/test.jQuery-1.8.html
deleted file mode 100644
index e25782b38..000000000
--- a/thirdparty/URI.js/test/test.jQuery-1.8.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8" />
- <title>jQuery Plugin 1.8 - URI Test Suite</title>
- <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="pre_libs.js"></script>
- <script type="text/javascript" src="../src/punycode.js"></script>
- <script type="text/javascript" src="../src/IPv6.js"></script>
- <script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
- <script type="text/javascript" src="../src/URI.js"></script>
- <script type="text/javascript" src="../src/URITemplate.js"></script>
- <script type="text/javascript" src="../jquery-1.8.2.min.js"></script>
- <script type="text/javascript" src="../src/jquery.URI.js"></script>
- <script type="text/javascript" src="qunit/qunit.js"></script>
-
- <!--
- as the plugins alter core URI functionality,
- it is necessary to re-test URI itself was well
- -->
- <script type="text/javascript" src="urls.js"></script>
- <script type="text/javascript" src="test.js"></script>
- <script type="text/javascript" src="test_jim.js"></script>
- <script type="text/javascript" src="test_template.js"></script>
- <script type="text/javascript" src="test_jquery.js"></script>
-</head>
-<body>
- <div id="qunit"></div>
- <div id="qunit-fixture"></div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/test/test.jQuery-1.9.html b/thirdparty/URI.js/test/test.jQuery-1.9.html
deleted file mode 100644
index 32f544f29..000000000
--- a/thirdparty/URI.js/test/test.jQuery-1.9.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="UTF-8" />
- <title>jQuery Plugin 1.9 - URI Test Suite</title>
- <link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="pre_libs.js"></script>
- <script type="text/javascript" src="../src/punycode.js"></script>
- <script type="text/javascript" src="../src/IPv6.js"></script>
- <script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
- <script type="text/javascript" src="../src/URI.js"></script>
- <script type="text/javascript" src="../src/URITemplate.js"></script>
- <script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
- <script type="text/javascript" src="../src/jquery.URI.js"></script>
- <script type="text/javascript" src="qunit/qunit.js"></script>
-
- <!--
- as the plugins alter core URI functionality,
- it is necessary to re-test URI itself was well
- -->
- <script type="text/javascript" src="urls.js"></script>
- <script type="text/javascript" src="test.js"></script>
- <script type="text/javascript" src="test_jim.js"></script>
- <script type="text/javascript" src="test_template.js"></script>
- <script type="text/javascript" src="test_jquery.js"></script>
-</head>
-<body>
- <div id="qunit"></div>
- <div id="qunit-fixture"></div>
-</body>
-</html>
diff --git a/thirdparty/URI.js/test/test.js b/thirdparty/URI.js/test/test.js
deleted file mode 100644
index e1ade0c23..000000000
--- a/thirdparty/URI.js/test/test.js
+++ /dev/null
@@ -1,1837 +0,0 @@
-(function() {
- 'use strict';
- /*global window, document, location, URI, URI_pre_lib, IPv6, IPv6_pre_lib, URITemplate, URITemplate_pre_lib, SecondLevelDomains, SecondLevelDomains_pre_lib, urls, test, ok, equal, strictEqual, deepEqual, raises */
- // FIXME: v2.0.0 renamce non-camelCase properties to uppercase
- /*jshint camelcase: false, loopfunc: true */
-
- test('loaded', function() {
- ok(window.URI);
- });
-
- module('constructing');
- test('URI()', function() {
- var u = URI();
- ok(u instanceof URI, 'instanceof URI');
- equal(u.toString(), window.location && window.location.href || '', 'is location (browser) or empty string (node)');
- });
- test('URI(undefined)', function() {
- raises(function() {
- URI(undefined);
- }, TypeError, 'Failing undefined input');
- });
- test('new URI(string)', function() {
- var u = new URI('http://example.org/');
- ok(u instanceof URI, 'instanceof URI');
- ok(u._parts.hostname !== undefined, 'host undefined');
- });
- test('new URI(object)', function() {
- var u = new URI({protocol: 'http', hostname: 'example.org'});
- ok(u instanceof URI, 'instanceof URI');
- ok(u._parts.hostname !== undefined, 'host undefined');
- });
- test('new URI(Location)', function () {
- var u = new URI(location);
- equal(u.href(), String(location.href), 'location object');
- });
- test('new URI(undefined)', function() {
- var u = new URI();
- ok(u instanceof URI, 'instanceof URI');
- equal(u.toString(), window.location && window.location.href || '', 'is location (browser) or empty string (node)');
- raises(function() {
- new URI(undefined);
- }, TypeError, 'Failing undefined input');
- });
- (function() {
- var element;
-
- function testDomAttribute(element, attribute) {
- test('new URI(Element ' + element.nodeName + ')', function() {
- element[attribute] = 'http://example.org/foobar.html';
-
- var u = new URI(element);
- equal(u.scheme(), 'http', 'scheme');
- equal(u.host(), 'example.org', 'host');
- equal(u.path(), '/foobar.html', 'path');
-
- element[attribute] = 'file:///C:/foo/bar.html';
- u = new URI(element);
- equal(u.href(), element[attribute], 'file');
- });
- }
-
- function testUnsupportedDomAttribute(element, attribute) {
- test('new URI(unsupported Element ' + element.nodeName + ')', function() {
- element[attribute] = 'http://example.org/foobar.html';
-
- var u = new URI(element);
- equal(u.scheme(), '', 'scheme');
- equal(u.host(), '', 'host');
- equal(u.path(), '', 'path');
-
- element[attribute] = 'file:///C:/foo/bar.html';
- u = new URI(element);
- equal(u.href(), '', 'file');
- });
- }
-
- for (var nodeName in URI.domAttributes) {
- if (!Object.prototype.hasOwnProperty.call(URI.domAttributes, nodeName) || nodeName === 'input') {
- continue;
- }
-
- element = document.createElement(nodeName);
- testDomAttribute(element, URI.domAttributes[nodeName]);
- }
-
- element = document.createElement('input');
- element.type = 'image';
- testDomAttribute(element, 'src');
-
- element = document.createElement('input');
- testUnsupportedDomAttribute(element, 'src');
-
- element = document.createElement('div');
- testUnsupportedDomAttribute(element, 'src');
- })();
- test('new URI(URI)', function() {
- var u = new URI(new URI({protocol: 'http', hostname: 'example.org'}));
- ok(u instanceof URI, 'instanceof URI');
- ok(u._parts.hostname !== undefined, 'host undefined');
- });
- test('new URI(new Date())', function() {
- raises(function() {
- new URI(new Date());
- }, TypeError, 'Failing unknown input');
- });
- test('new URI(undefined)', function() {
- raises(function() {
- new URI(undefined);
- }, TypeError, 'Failing undefined input');
- });
- test('new URI()', function() {
- var u = new URI();
- ok(u instanceof URI, 'instanceof URI');
- ok(u._parts.hostname === location.hostname || u._parts.hostname === null && location.hostname === '',
- 'hostname == location.hostname');
- });
- test('function URI(string)', function() {
- var u = new URI('http://example.org/');
- ok(u instanceof URI, 'instanceof URI');
- ok(u._parts.hostname !== undefined, 'host undefined');
- });
- test('new URI(string, string)', function() {
- // see http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor
- var u = new URI('../foobar.html', 'http://example.org/hello/world.html');
- equal(u+'', 'http://example.org/foobar.html', 'resolve on construct');
- });
-
- module('parsing');
- // [].forEach() no IE, lacking interest in polyfilling this...
- for (var i = 0, t; (t = urls[i]); i++) {
- (function(t){
- test('parse ' + t.name, function() {
- var u = new URI(t.url),
- key;
-
- // test URL built from parts
- equal(u + '', t._url || t.url, 'toString');
-
- // test parsed parts
- for (key in t.parts) {
- if (Object.hasOwnProperty.call(t.parts, key)) {
- equal(u._parts[key], t.parts[key], 'part: ' + key);
- }
- }
-
- // test accessors
- for (key in t.accessors) {
- if (Object.hasOwnProperty.call(t.accessors, key)) {
- equal(u[key](), t.accessors[key], 'accessor: ' + key);
- }
- }
-
- // test is()
- for (key in t.is) {
- if (Object.hasOwnProperty.call(t.is, key)) {
- equal(u.is(key), t.is[key], 'is: ' + key);
- }
- }
- });
- })(t);
- }
-
- module('mutating basics');
- test('protocol', function() {
- var u = new URI('http://example.org/foo.html');
- u.protocol('ftp');
- equal(u.protocol(), 'ftp', 'ftp protocol');
- equal(u+'', 'ftp://example.org/foo.html', 'ftp url');
-
- u.protocol('');
- equal(u.protocol(), '', 'relative protocol');
- equal(u+'', '//example.org/foo.html', 'relative-scheme url');
-
- u.protocol('f.t-p+0');
- equal(u.protocol(), 'f.t-p+0', 'character profile');
-
- try {
- u.protocol('f:t');
- ok(false, 'do not accept invalid protocol');
- } catch(e) {}
-
- u.protocol(null);
- equal(u.protocol(), '', 'missing protocol');
- equal(u+'', '//example.org/foo.html', 'missing-scheme url');
- });
- test('username', function() {
- var u = new URI('http://example.org/foo.html');
- u.username('hello');
- equal(u.username(), 'hello', 'changed username hello');
- equal(u.password(), '', 'changed passowrd hello');
- equal(u+'', 'http://hello@example.org/foo.html', 'changed url hello');
-
- u.username('');
- equal(u.username(), '', 'changed username ""');
- equal(u.password(), '', 'changed passowrd ""');
- equal(u+'', 'http://example.org/foo.html', 'changed url ""');
- });
- test('password', function() {
- var u = new URI('http://hello@example.org/foo.html');
- u.password('world');
- equal(u.username(), 'hello', 'changed username world');
- equal(u.password(), 'world', 'changed passowrd world');
- equal(u+'', 'http://hello:world@example.org/foo.html', 'changed url world');
-
- u.password('');
- equal(u.username(), 'hello', 'changed username ""');
- equal(u.password(), '', 'changed passowrd ""');
- equal(u+'', 'http://hello@example.org/foo.html', 'changed url ""');
-
- u.username('').password('hahaha');
- equal(u.username(), '', 'changed username - password without username');
- equal(u.password(), 'hahaha', 'changed password - password without username');
- equal(u+'', 'http://:hahaha@example.org/foo.html', 'changed url - password without username');
- });
- test('hostname', function() {
- var u = new URI('http://example.org/foo.html');
- u.hostname('abc.foobar.lala');
- equal(u.hostname(), 'abc.foobar.lala', 'hostname changed');
- equal(u+'', 'http://abc.foobar.lala/foo.html', 'hostname changed url');
-
- u.hostname('');
- equal(u.hostname(), '', 'hostname removed');
- equal(u+'', 'http:///foo.html', 'hostname removed url');
-
- raises(function() {
- u.hostname('foo\\bar.com');
- }, TypeError, 'Failing backslash detection in hostname');
- });
- test('port', function() {
- var u = new URI('http://example.org/foo.html');
- u.port('80');
- equal(u.port(), '80', 'changing port 80');
- equal(u+'', 'http://example.org:80/foo.html', 'changing url 80');
-
- u.port('');
- equal(u.port(), '', 'changing port ""');
- equal(u+'', 'http://example.org/foo.html', 'changing url ""');
- });
- test('path', function() {
- var u = new URI('http://example.org/foobar.html?query=string');
- u.pathname('/some/path/file.suffix');
- equal(u.pathname(), '/some/path/file.suffix', 'changing pathname "/some/path/file.suffix"');
- equal(u+'', 'http://example.org/some/path/file.suffix?query=string', 'changing url "/some/path/file.suffix"');
-
- u.pathname('');
- equal(u.pathname(), '/', 'changing pathname ""');
- equal(u+'', 'http://example.org/?query=string', 'changing url ""');
-
- u.pathname('/~userhome/@mine;is %2F and/');
- equal(u.pathname(), '/~userhome/@mine;is%20%2F%20and/', 'path encoding');
- equal(u.pathname(true), '/~userhome/@mine;is %2F and/', 'path decoded');
-
- u = new URI('/a/b/c/').relativeTo('/a/b/c/');
- equal(u.pathname(), '', 'empty relative path');
- equal(u.toString(), '', 'empty relative path to string');
-
- u.pathname('/');
- equal(u.pathname(), '/', 'empty absolute path');
- equal(u.toString(), '/', 'empty absolute path to string');
- });
- test('URN paths', function() {
- var u = new URI('urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66?foo=bar');
- u.pathname('uuid:de305d54-75b4-431b-adb2-eb6b9e546013');
- equal(u.pathname(), 'uuid:de305d54-75b4-431b-adb2-eb6b9e546013');
- equal(u + '', 'urn:uuid:de305d54-75b4-431b-adb2-eb6b9e546013?foo=bar');
-
- u.pathname('');
- equal(u.pathname(), '', 'changing pathname ""');
- equal(u+'', 'urn:?foo=bar', 'changing url ""');
-
- u.pathname('music:classical:Béla Bártok%3a Concerto for Orchestra');
- equal(u.pathname(), 'music:classical:B%C3%A9la%20B%C3%A1rtok%3A%20Concerto%20for%20Orchestra', 'path encoding');
- equal(u.pathname(true), 'music:classical:Béla Bártok%3A Concerto for Orchestra', 'path decoded');
- });
- test('query', function() {
- var u = new URI('http://example.org/foo.html');
- u.query('foo=bar=foo');
- equal(u.query(), 'foo=bar=foo', 'query: foo=bar=foo');
- equal(u.search(), '?foo=bar=foo', 'query: foo=bar=foo - search');
-
- u.query('?bar=foo');
- equal(u.query(), 'bar=foo', 'query: ?bar=foo');
- equal(u.search(), '?bar=foo', 'query: ?bar=foo - search');
-
- u.query('');
- equal(u.query(), '', 'query: ""');
- equal(u.search(), '', 'query: "" - search');
- equal(u.toString(), 'http://example.org/foo.html');
-
- u.search('foo=bar=foo');
- equal(u.query(), 'foo=bar=foo', 'search: foo=bar=foo');
- equal(u.search(), '?foo=bar=foo', 'search: foo=bar=foo - query');
-
- u.search('?bar=foo');
- equal(u.query(), 'bar=foo', 'search: ?bar=foo');
- equal(u.search(), '?bar=foo', 'search: ?bar=foo - query');
-
- u.search('');
- equal(u.query(), '', 'search: ""');
- equal(u.search(), '', 'search: "" - query');
-
- u.query('?foo');
- equal(u.query(), 'foo', 'search: ""');
- equal(u.search(), '?foo', 'search: "" - query');
-
- u.search('foo=&foo=bar');
- equal(u.query(), 'foo=&foo=bar', 'search: foo=&foo=bar');
- equal(JSON.stringify(u.query(true)), JSON.stringify({foo: ['', 'bar']}), 'parsed query: {foo:["", "bar"]}');
-
- u.search('foo=bar&foo=');
- equal(u.query(), 'foo=bar&foo=', 'search: foo=bar&foo=');
- equal(JSON.stringify(u.query(true)), JSON.stringify({foo: ['bar', '']}), 'parsed query: {foo:["bar", ""]}');
-
- u.search('foo=bar&foo');
- equal(u.query(), 'foo=bar&foo', 'search: foo=bar&foo');
- equal(JSON.stringify(u.query(true)), JSON.stringify({foo: ['bar', null]}), 'parsed query: {foo:["bar", null]}');
-
- u.search('foo&foo=bar');
- equal(u.query(), 'foo&foo=bar', 'search: foo&foo=bar');
- equal(JSON.stringify(u.query(true)), JSON.stringify({foo: [null, 'bar']}), 'parsed query: {foo:[null, "bar"]}');
-
- // parsing empty query
- var t;
- t = u.query('?').query(true);
- t = u.query('').query(true);
- t = u.href('http://example.org').query(true);
- });
- test('fragment', function() {
- var u = new URI('http://example.org/foo.html');
- u.fragment('foo');
- equal(u.fragment(), 'foo', 'fragment: foo');
- equal(u.hash(), '#foo', 'fragment: foo - hash');
-
- u.fragment('#bar');
- equal(u.fragment(), 'bar', 'fragment: #bar');
- equal(u.hash(), '#bar', 'fragment: #bar - hash');
-
- u.fragment('');
- equal(u.fragment(), '', 'fragment: ""');
- equal(u.hash(), '', 'fragment: "" - hash');
- equal(u.toString(), 'http://example.org/foo.html');
-
- u.hash('foo');
- equal(u.fragment(), 'foo', 'hash: foo');
- equal(u.hash(), '#foo', 'hash: foo - fragment');
-
- u.hash('#bar');
- equal(u.fragment(), 'bar', 'hash: #bar');
- equal(u.hash(), '#bar', 'hash: #bar - fragment');
-
- u.hash('');
- equal(u.fragment(), '', 'hash: ""');
- equal(u.hash(), '', 'hash: "" - fragment');
- });
-
- module('mutating compounds');
- test('host', function() {
- var u = new URI('http://foo.bar/foo.html');
-
- u.host('example.org:80');
- equal(u.hostname(), 'example.org', 'host changed hostname');
- equal(u.port(), '80', 'host changed port');
- equal(u+'', 'http://example.org:80/foo.html', 'host changed url');
-
- u.host('some-domain.com');
- equal(u.hostname(), 'some-domain.com', 'host modified hostname');
- equal(u.port(), '', 'host removed port');
- equal(u+'', 'http://some-domain.com/foo.html', 'host modified url');
-
- raises(function() {
- u.host('foo\\bar.com');
- }, TypeError, 'Failing backslash detection in host');
- });
- test('origin', function () {
- var u = new URI('http://foo.bar/foo.html');
- equal(u.origin(), 'http://foo.bar', 'invalid origin');
-
- u.origin('http://bar.foo/bar.html');
- equal(u.origin(), 'http://bar.foo', 'origin didnt change');
- equal(u+'', 'http://bar.foo/foo.html', 'origin path changed');
- });
- test('authority', function() {
- var u = new URI('http://foo.bar/foo.html');
-
- u.authority('username:password@example.org:80');
- equal(u.username(), 'username', 'authority changed username');
- equal(u.password(), 'password', 'authority changed password');
- equal(u.hostname(), 'example.org', 'authority changed hostname');
- equal(u.port(), '80', 'authority changed port');
- equal(u+'', 'http://username:password@example.org:80/foo.html', 'authority changed url');
-
- u.authority('some-domain.com');
- equal(u.username(), '', 'authority removed username');
- equal(u.password(), '', 'authority removed password');
- equal(u.hostname(), 'some-domain.com', 'authority modified hostname');
- equal(u.port(), '', 'authority removed port');
- equal(u+'', 'http://some-domain.com/foo.html', 'authority modified url');
-
- raises(function() {
- u.authority('username:password@foo\\bar.com:80');
- }, TypeError, 'Failing backslash detection in authority');
- });
- test('userinfo', function() {
- var u = new URI('http://foo.bar/foo.html');
-
- u.userinfo('username:password');
- equal(u.username(), 'username', 'userinfo changed username-only');
- equal(u.password(), 'password', 'userinfo changed password');
- equal(u+'', 'http://username:password@foo.bar/foo.html', 'userinfo changed url');
-
- u.userinfo('walter');
- equal(u.username(), 'walter', 'userinfo removed password');
- equal(u.password(), '', 'userinfo removed password');
- equal(u+'', 'http://walter@foo.bar/foo.html', 'userinfo changed url');
-
- u.userinfo('');
- equal(u.username(), '', 'userinfo removed username');
- equal(u.password(), '', 'userinfo removed password');
- equal(u+'', 'http://foo.bar/foo.html', 'userinfo changed url');
- });
- test('href', function() {
- var u = new URI('http://foo.bar/foo.html');
-
- u.href('ftp://u:p@example.org:123/directory/file.suffix?query=string#fragment');
- equal(u.protocol(), 'ftp', 'href changed protocol');
- equal(u.username(), 'u', 'href changed username');
- equal(u.password(), 'p', 'href changed password');
- equal(u.hostname(), 'example.org', 'href changed hostname');
- equal(u.port(), '123', 'href changed port');
- equal(u.pathname(), '/directory/file.suffix', 'href changed pathname');
- equal(u.search(), '?query=string', 'href changed search');
- equal(u.hash(), '#fragment', 'href changed hash');
- equal(u.href(), 'ftp://u:p@example.org:123/directory/file.suffix?query=string#fragment', 'href removed url');
-
- u.href('../path/index.html');
- equal(u.protocol(), '', 'href removed protocol');
- equal(u.username(), '', 'href removed username');
- equal(u.password(), '', 'href removed password');
- equal(u.hostname(), '', 'href removed hostname');
- equal(u.port(), '', 'href removed port');
- equal(u.pathname(), '../path/index.html', 'href removed pathname');
- equal(u.search(), '', 'href removed search');
- equal(u.hash(), '', 'href removed hash');
- equal(u.href(), '../path/index.html', 'href removed url');
-
- /*jshint -W053 */
- u.href(new String('/narf'));
- /*jshint +W053 */
- equal(u.pathname(), '/narf', 'href from String instance');
- });
- test('resource', function() {
- var u = new URI('http://foo.bar/foo.html?hello#world');
-
- equal(u.resource(), '/foo.html?hello#world', 'get resource');
-
- u.resource('/foo.html?hello#world');
- equal(u.href(), 'http://foo.bar/foo.html?hello#world', 'set resource');
-
- u.resource('/world.html');
- equal(u.href(), 'http://foo.bar/world.html', 'set resource path');
- equal(u.resource(), '/world.html', 'get resource path');
-
- u.resource('?query');
- equal(u.href(), 'http://foo.bar/?query', 'set resource query');
- equal(u.resource(), '/?query', 'get resource query');
-
- u.resource('#fragment');
- equal(u.href(), 'http://foo.bar/#fragment', 'set resource fragment');
- equal(u.resource(), '/#fragment', 'get resource fragment');
-
- u.resource('?hello#world');
- equal(u.href(), 'http://foo.bar/?hello#world', 'set resource query+fragment');
- equal(u.resource(), '/?hello#world', 'get resource query+fragment');
-
- u.resource('/mars.txt?planet=123');
- equal(u.href(), 'http://foo.bar/mars.txt?planet=123', 'set resource path+query');
- equal(u.resource(), '/mars.txt?planet=123', 'get resource path+query');
-
- u.resource('/neptune.txt#foo');
- equal(u.href(), 'http://foo.bar/neptune.txt#foo', 'set resource path+fragment');
- equal(u.resource(), '/neptune.txt#foo', 'get resource path+fragment');
- });
-
- module('mutating fractions');
- test('subdomain', function() {
- var u = new URI('http://www.example.org/foo.html');
- u.subdomain('foo.bar');
- equal(u.hostname(), 'foo.bar.example.org', 'changed subdomain foo.bar');
- equal(u+'', 'http://foo.bar.example.org/foo.html', 'changed url foo.bar');
-
- u.subdomain('');
- equal(u.hostname(), 'example.org', 'changed subdomain ""');
- equal(u+'', 'http://example.org/foo.html', 'changed url ""');
-
- u.subdomain('foo.');
- equal(u.hostname(), 'foo.example.org', 'changed subdomain foo.');
- equal(u+'', 'http://foo.example.org/foo.html', 'changed url foo.');
-
- });
- test('domain', function() {
- var u = new URI('http://www.example.org/foo.html');
- u.domain('foo.bar');
- equal(u.hostname(), 'www.foo.bar', 'changed hostname foo.bar');
- equal(u+'', 'http://www.foo.bar/foo.html', 'changed url foo.bar');
-
- raises(function() {
- u.domain('');
- }, TypeError, 'Failing empty input');
-
- u.hostname('www.example.co.uk');
- equal(u.domain(), 'example.co.uk', 'domain after changed hostname www.example.co.uk');
- equal(u+'', 'http://www.example.co.uk/foo.html', 'url after changed hostname www.example.co.uk');
- equal(u.domain(true), 'co.uk', 'domain after changed hostname www.example.co.uk (TLD of SLD)');
-
- u.domain('example.org');
- equal(u.domain(), 'example.org', 'domain after changed domain example.org');
- equal(u+'', 'http://www.example.org/foo.html', 'url after changed domain example.org');
-
- u.domain('example.co.uk');
- equal(u.domain(), 'example.co.uk', 'domain after changed domain example.co.uk');
- equal(u+'', 'http://www.example.co.uk/foo.html', 'url after changed domain example.co.uk');
-
- u.href('http://test/');
- equal(u.domain(), 'test', 'domain (dot-less)');
- equal(u.subdomain(), '', 'subdomain (dot-less)');
-
- u.subdomain('foo');
- equal(u.href(), 'http://foo.test/', 'subdomain set on (dot-less)');
- });
- test('tld', function() {
- var u = new URI('http://www.example.org/foo.html');
- u.tld('mine');
- equal(u.tld(), 'mine', 'tld changed');
- equal(u+'', 'http://www.example.mine/foo.html', 'changed url mine');
-
- raises(function() {
- u.tld('');
- }, TypeError, 'Failing empty input');
-
- raises(function() {
- u.tld('foo.bar');
- }, TypeError, 'Failing "foo.bar"');
-
- u.tld('co.uk');
- equal(u.tld(), 'co.uk', 'tld changed to sld');
- equal(u+'', 'http://www.example.co.uk/foo.html', 'changed url to sld');
- equal(u.tld(true), 'uk', 'TLD of SLD');
-
- u.tld('org');
- equal(u.tld(), 'org', 'sld changed to tld');
- equal(u+'', 'http://www.example.org/foo.html', 'changed url to tld');
-
- u.hostname('www.examplet.se');
- equal(u.tld(), 'se', 'se tld');
-
- });
- test('sld', function() {
- // Lets just test them all..
- // Calling URI.is(), URI.domain(), URI.subdomain() allows us to indirectly
- // test SLD.has(), SLD.is() and SLD.get()
- var u = new URI('http://www.example.org/foo.html');
- equal(u.is('sld'), false, 'is not sld');
- var list = SecondLevelDomains.list;
- var tlds = Object.keys(list);
- var iTld = tlds.length;
- var tld, slds, sld, iSld;
- while ( iTld-- ) {
- tld = tlds[iTld];
- slds = list[tld].trim().split(/\s+/);
- iSld = slds.length;
- while ( iSld-- ) {
- sld = slds[iSld].trim() + '.' + tld;
- u.hostname('www.example.' + sld);
- equal(u.is('sld'), true, 'is sld');
- equal(u.domain(), 'example.' + sld, 'domain is example.' + sld);
- equal(u.subdomain(), 'www', 'subdomain is www');
- u.hostname('www.example.' + tld);
- equal(u.is('sld'), false, 'is not sld');
- }
- }
- });
- test('directory', function() {
- var u = new URI('http://www.example.org/some/directory/foo.html');
- u.directory('/');
- equal(u.path(), '/foo.html', 'changed path '/'');
- equal(u+'', 'http://www.example.org/foo.html', 'changed url '/'');
-
- u.directory('');
- equal(u.path(), '/foo.html', 'changed path ""');
- equal(u+'', 'http://www.example.org/foo.html', 'changed url ""');
-
- u.directory('/bar');
- equal(u.path(), '/bar/foo.html', 'changed path "/bar"');
- equal(u+'', 'http://www.example.org/bar/foo.html', 'changed url "/bar"');
-
- u.directory('baz');
- equal(u.path(), '/baz/foo.html', 'changed path "baz"');
- equal(u+'', 'http://www.example.org/baz/foo.html', 'changed url "baz"');
-
- // relative paths
- u = new URI('../some/directory/foo.html');
- u.directory('../other/');
- equal(u.path(), '../other/foo.html', 'changed path "../other/"');
- equal(u+'', '../other/foo.html', 'changed url "../other/"');
-
- u.directory('mine');
- equal(u.path(), 'mine/foo.html', 'changed path "mine"');
- equal(u+'', 'mine/foo.html', 'changed url "mine"');
-
- u.directory('/');
- equal(u.path(), '/foo.html', 'changed path "/"');
- equal(u+'', '/foo.html', 'changed url "/"');
-
- u.directory('');
- equal(u.path(), 'foo.html', 'changed path ""');
- equal(u+'', 'foo.html', 'changed url ""');
-
- u.directory('../blubb');
- equal(u.path(), '../blubb/foo.html', 'changed path "../blubb"');
- equal(u+'', '../blubb/foo.html', 'changed url "../blubb"');
-
- // encoding
- u.path('/some/directory/foo.html');
- u.directory('/~userhome/@mine;is %2F and/');
- equal(u.path(), '/~userhome/@mine;is%20%2F%20and/foo.html', 'directory encoding');
- equal(u.directory(true), '/~userhome/@mine;is %2F and', 'directory decoded');
- });
- test('filename', function() {
- var u = new URI('http://www.example.org/some/directory/foo.html');
- u.filename('hello.world');
- equal(u.path(), '/some/directory/hello.world', 'changed path "hello.world"');
- equal(u+'', 'http://www.example.org/some/directory/hello.world', 'changed url "hello.world"');
-
- u.filename('hello');
- equal(u.path(), '/some/directory/hello', 'changed path "hello"');
- equal(u+'', 'http://www.example.org/some/directory/hello', 'changed url "hello"');
-
- u.filename('');
- equal(u.path(), '/some/directory/', 'changed path ""');
- equal(u+'', 'http://www.example.org/some/directory/', 'changed url ""');
-
- u.filename('world');
- equal(u.path(), '/some/directory/world', 'changed path "world"');
- equal(u+'', 'http://www.example.org/some/directory/world', 'changed url "world"');
-
- // encoding
- u.path('/some/directory/foo.html');
- u.filename('hällo wörld.html');
- equal(u.path(), '/some/directory/h%C3%A4llo%20w%C3%B6rld.html', 'filename encoding');
- equal(u.filename(true), 'hällo wörld.html', 'filename decoded');
- });
- test('suffix', function() {
- var u = new URI('http://www.example.org/some/directory/foo.html');
- u.suffix('xml');
- equal(u.path(), '/some/directory/foo.xml', 'changed path "xml"');
- equal(u+'', 'http://www.example.org/some/directory/foo.xml', 'changed url "xml"');
-
- u.suffix('');
- equal(u.path(), '/some/directory/foo', 'changed path ""');
- equal(u+'', 'http://www.example.org/some/directory/foo', 'changed url ""');
-
- u.suffix('html');
- equal(u.path(), '/some/directory/foo.html', 'changed path "html"');
- equal(u+'', 'http://www.example.org/some/directory/foo.html', 'changed url "html"');
-
- // encoding
- u.suffix('cört');
- equal(u.path(), '/some/directory/foo.c%C3%B6rt', 'suffix encoding');
- equal(u.suffix(), 'c%C3%B6rt', 'suffix encoded'); // suffix is expected to be alnum!
- equal(u.suffix(true), 'cört', 'suffix decoded'); // suffix is expected to be alnum!
- });
- test('segment', function() {
- var u = new URI('http://www.example.org/some/directory/foo.html'),
- s = u.segment();
-
- equal(s.join('||'), 'some||directory||foo.html', 'segment get array');
-
- u.segment(['hello', 'world', 'foo.html']);
- equal(u.path(), '/hello/world/foo.html', 'segment set array');
-
- equal(u.segment(0), 'hello', 'segment get 0');
- equal(u.segment(2), 'foo.html', 'segment get 2');
- equal(u.segment(3), undefined, 'segment get 3');
-
- u.segment(0, 'goodbye');
- equal(u.path(), '/goodbye/world/foo.html', 'segment set 0');
- u.segment(2, 'bar.html');
- equal(u.path(), '/goodbye/world/bar.html', 'segment set 2');
- u.segment(3, 'zupp');
- equal(u.path(), '/goodbye/world/bar.html/zupp', 'segment set 3');
- u.segment('zapp');
- equal(u.path(), '/goodbye/world/bar.html/zupp/zapp', 'segment append');
-
- u.segment(3, '');
- equal(u.path(), '/goodbye/world/bar.html/zapp', 'segment del 3 ""');
- u.segment(3, null);
- equal(u.path(), '/goodbye/world/bar.html', 'segment del 3 null');
-
- u = new URI('http://www.example.org/some/directory/foo.html');
- equal(u.segment(-1), 'foo.html', 'segment get -1');
- u.segment(-1, 'world.html');
- equal(u.path(), '/some/directory/world.html', 'segment set -1');
-
- u = new URI('someurn:foo:bar:baz');
- equal(u.segment().join('||'), 'foo||bar||baz', 'segment get array URN');
- u.segment(1, 'mars');
- equal(u.path(), 'foo:mars:baz', 'segment set 1 URN');
- equal(u.toString(), 'someurn:foo:mars:baz', 'segment set 1 URN');
-
- u = new URI('/foo/');
- equal(u.segment().join('||'), 'foo||', 'segment get array trailing empty');
-
- u.segment('test');
- equal(u.path(), '/foo/test', 'segment append trailing empty');
-
- u.segment('');
- equal(u.path(), '/foo/test/', 'segment append empty trailing');
- u.segment('');
- equal(u.path(), '/foo/test/', 'segment append empty trailing unchanged');
-
- u.segment(['', '', 'foo', '', '', 'bar', '', '']);
- equal(u.path(), '/foo/bar/', 'segment collapsing empty parts');
-
- u = new URI('https://google.com');
- u.segment('//font.ttf//');
- equal(u.path(), '/font.ttf', 'segment removes trailing and leading slashes');
-
- u.segment(['/hello', '/world/', '//foo.html']);
- equal(u.path(), '/hello/world/foo.html', 'segment set array trimming slashes');
-
- u.segment(1, '/mars/');
- equal(u.path(), '/hello/mars/foo.html', 'segment set index trimming slashes');
- });
- test('segmentCoded', function() {
- var u = new URI('http://www.example.org/some%20thing/directory/foo.html'),
- s = u.segmentCoded();
-
- equal(s.join('||'), 'some thing||directory||foo.html', 'segmentCoded get array');
-
- u.segmentCoded(['hello/world']);
- equal(u.path(), '/hello%2Fworld', 'escape in array');
-
- u.segmentCoded('hello/world');
- equal(u.path(), '/hello%2Fworld/hello%2Fworld', 'escape appended value');
-
- u.segmentCoded(['hello world', 'mars', 'foo.html']);
- equal(u.path(), '/hello%20world/mars/foo.html', 'segmentCoded set array');
-
- equal(u.segmentCoded(0), 'hello world', 'segmentCoded get 0');
- equal(u.segmentCoded(2), 'foo.html', 'segmentCoded get 2');
- equal(u.segmentCoded(3), undefined, 'segmentCoded get 3');
-
- u.segmentCoded('zapp zerapp');
- equal(u.path(), '/hello%20world/mars/foo.html/zapp%20zerapp', 'segmentCoded append');
-
- u.segmentCoded(2, '');
- equal(u.path(), '/hello%20world/mars/zapp%20zerapp', 'segmentCoded del 3 ""');
- u.segmentCoded(2, null);
- equal(u.path(), '/hello%20world/mars', 'segmentCoded del 3 null');
-
- u.segmentCoded('');
- equal(u.path(), '/hello%20world/mars/', 'segmentCoded append empty trailing');
- u.segmentCoded('');
- equal(u.path(), '/hello%20world/mars/', 'segmentCoded append empty trailing unchanged');
- });
-
- module('mutating query strings');
- test('mutating object', function() {
- var u = new URI('?foo=bar&baz=bam&baz=bau'),
- q = u.query(true);
-
- q.something = ['new', 'and', 'funky'];
- u.query(q);
- equal(u.query(), 'foo=bar&baz=bam&baz=bau&something=new&something=and&something=funky', 'adding array');
-
- q.foo = undefined;
- u.query(q);
- equal(u.query(), 'baz=bam&baz=bau&something=new&something=and&something=funky', 'removing field');
-
- q.baz = undefined;
- u.query(q);
- equal(u.query(), 'something=new&something=and&something=funky', 'removing array');
- });
- test('query callback', function() {
- var u = URI('?foo=bar');
- u.query(function(data) {
- data.foo = 'bam';
- });
- equal(u.query(), 'foo=bam', 'augment argument');
-
- u.query(function() {
- return {
- bla: 'blubb'
- };
- });
- equal(u.query(), 'bla=blubb', 'overwrite returned value');
- });
- test('setQuery', function() {
- var u = URI('?foo=bar');
- u.setQuery('foo', 'bam');
- equal(u.query(), 'foo=bam', 'set name, value');
-
- u.setQuery('array', ['one', 'two']);
- equal(u.query(), 'foo=bam&array=one&array=two', 'set name, array');
-
- u.query('?foo=bar');
- u.setQuery({'obj': 'bam', foo: 'baz'});
- equal(u.query(), 'foo=baz&obj=bam', 'set {name: value}');
-
- u.setQuery({'foo': 'foo', bar: ['1', '2']});
- equal(u.query(), 'foo=foo&obj=bam&bar=1&bar=2', 'set {name: array}');
-
- u.query('?foo=bar');
- u.setQuery({'bam': null, 'baz': ''});
- equal(u.query(), 'foo=bar&bam&baz=', 'set {name: null}');
-
- u.query('?foo=bar');
- u.setQuery('empty');
- equal(u.query(), 'foo=bar&empty', 'set undefined');
-
- u.query('?foo=bar');
- u.setQuery('empty', '');
- equal(u.query(), 'foo=bar&empty=', 'set empty string');
-
- u.query('');
- u.setQuery('some value', 'must be encoded because of = and ? and #');
- equal(u.query(), 'some+value=must+be+encoded+because+of+%3D+and+%3F+and+%23', 'encoding');
- equal(u.query(true)['some value'], 'must be encoded because of = and ? and #', 'decoding');
- });
- test('addQuery', function() {
- var u = URI('?foo=bar');
- u.addQuery('baz', 'bam');
- equal(u.query(), 'foo=bar&baz=bam', 'add name, value');
-
- u.addQuery('array', ['one', 'two']);
- equal(u.query(), 'foo=bar&baz=bam&array=one&array=two', 'add name, array');
-
- u.query('?foo=bar');
- u.addQuery({'obj': 'bam', foo: 'baz'});
- equal(u.query(), 'foo=bar&foo=baz&obj=bam', 'add {name: value}');
-
- u.addQuery({'foo': 'bam', bar: ['1', '2']});
- equal(u.query(), 'foo=bar&foo=baz&foo=bam&obj=bam&bar=1&bar=2', 'add {name: array}');
-
- u.query('?foo=bar');
- u.addQuery({'bam': null, 'baz': ''});
- equal(u.query(), 'foo=bar&bam&baz=', 'add {name: null}');
-
- u.query('?foo=bar');
- u.addQuery('empty');
- equal(u.query(), 'foo=bar&empty', 'add undefined');
-
- u.query('?foo=bar');
- u.addQuery('empty', '');
- equal(u.query(), 'foo=bar&empty=', 'add empty string');
-
- u.query('?foo');
- u.addQuery('foo', 'bar');
- equal(u.query(), 'foo=bar', 'add to null value');
-
- u.query('');
- u.addQuery('some value', 'must be encoded because of = and ? and #');
- equal(u.query(), 'some+value=must+be+encoded+because+of+%3D+and+%3F+and+%23', 'encoding');
- equal(u.query(true)['some value'], 'must be encoded because of = and ? and #', 'decoding');
- });
- test('removeQuery', function() {
- var u = new URI('?foo=bar&foo=baz&foo=bam&obj=bam&bar=1&bar=2&bar=3');
-
- u.removeQuery('foo', 'bar');
- equal(u.query(), 'foo=baz&foo=bam&obj=bam&bar=1&bar=2&bar=3', 'removing name, value');
-
- u.removeQuery('foo');
- equal(u.query(), 'obj=bam&bar=1&bar=2&bar=3', 'removing name');
-
- u.removeQuery('bar', ['1', '3']);
- equal(u.query(), 'obj=bam&bar=2', 'removing name, array');
-
- u.query('?obj=bam&bar=1&bar=2');
- u.removeQuery('bar', ['2']);
- equal(u.query(), 'obj=bam&bar=1', 'removing name, singleton array');
-
- u.removeQuery('bar', ['1']);
- equal(u.query(), 'obj=bam', 'removing the last value via name, singleton array');
-
- u.query('?foo=one&foo=two').removeQuery('foo', ['one', 'two']);
- equal(u.query(), '', 'removing name, array, finishes empty');
-
- u.query('?foo=one,two').removeQuery('foo', ['one', 'two']);
- equal(u.query(), 'foo=one%2Ctwo', 'not removing name, array');
-
- u.query('?foo=one,two').removeQuery('foo', ['one,two']);
- equal(u.query(), '', 'removing name, singleton array with comma in value');
-
- u.query('?foo=bar&foo=baz&foo=bam&obj=bam&bar=1&bar=2&bar=3');
- u.removeQuery(['foo', 'bar']);
- equal(u.query(), 'obj=bam', 'removing array');
-
- u.query('?bar=1&bar=2');
- u.removeQuery({ bar: 1 });
- equal(u.query(), 'bar=2', 'removing non-string value from array');
-
- u.removeQuery({ bar: 2 });
- equal(u.query(), '', 'removing a non-string value');
-
- u.query('?foo=bar&foo=baz&foo=bam&obj=bam&bar=1&bar=2&bar=3');
- u.removeQuery({foo: 'bar', obj: undefined, bar: ['1', '2']});
- equal(u.query(), 'foo=baz&foo=bam&bar=3', 'removing object');
-
- u.query('?foo=bar&foo=baz&foo=bam&obj=bam&bar=1&bar=2&bar=3');
- u.removeQuery(/^bar/);
- equal(u.query(), 'foo=bar&foo=baz&foo=bam&obj=bam', 'removing by RegExp');
-
- u.query('?foo=bar&foo=baz&foo=bam&obj=bam&bar=bar&bar=baz&bar=bam');
- u.removeQuery('foo', /[rz]$/);
- equal(u.query(), 'foo=bam&obj=bam&bar=bar&bar=baz&bar=bam', 'removing by value RegExp');
- });
- test('duplicateQueryParameters', function() {
- var u = new URI('?bar=1&bar=1&bar=1');
-
- u.normalizeQuery();
- equal(u.toString(), '?bar=1', 'parameters de-duplicated');
-
- u = new URI('?bar=1&bar=1&bar=1');
- u.duplicateQueryParameters(true);
- ok(u._parts.duplicateQueryParameters, 'duplicateQueryParameters enabled');
- u.normalizeQuery();
- equal(u.toString(), '?bar=1&bar=1&bar=1', 'parameters NOT de-duplicated');
- ok(u._parts.duplicateQueryParameters, 'duplicateQueryParameters still enabled after normalizeQuery()');
-
- u.duplicateQueryParameters(false);
- u.normalizeQuery();
- equal(u.toString(), '?bar=1', 'parameters de-duplicated again');
- ok(!u._parts.duplicateQueryParameters, 'duplicateQueryParameters still disabled after normalizeQuery()');
-
- URI.duplicateQueryParameters = true;
- u = new URI('?bar=1&bar=1&bar=1');
- u.normalizeQuery();
- equal(u.toString(), '?bar=1&bar=1&bar=1', 'global configuration');
-
- URI.duplicateQueryParameters = false;
-
- // test cloning
- u = new URI('?bar=1&bar=1&bar=1');
- u = u.duplicateQueryParameters(true).clone();
- ok(u._parts.duplicateQueryParameters, 'duplicateQueryParameters still enabled after clone()');
- u.normalizeQuery();
- equal(u.toString(), '?bar=1&bar=1&bar=1', 'parameters NOT de-duplicated');
-
- // test adding
- u = new URI('?bar=1&bar=1&bar=1');
- u.duplicateQueryParameters(true);
- u.addQuery('bar', 1);
- equal(u.toString(), '?bar=1&bar=1&bar=1&bar=1', 'parameters NOT de-duplicated after addQuery()');
- });
- test('escapeQuerySpace', function() {
- var u = new URI('?bar=foo+bar&bam+baz=foo');
- var data = u.query(true);
-
- equal(data.bar, 'foo bar', 'value un-spac-escaped');
- equal(data['bam baz'], 'foo', 'name un-spac-escaped');
-
- u.escapeQuerySpace(false);
- data = u.query(true);
- equal(data.bar, 'foo+bar', 'value not un-spac-escaped');
- equal(data['bam+baz'], 'foo', 'name not un-spac-escaped');
-
- u.escapeQuerySpace(true);
- data = u.query(true);
-
- equal(data.bar, 'foo bar', 'value un-spac-escaped again');
- equal(data['bam baz'], 'foo', 'name un-spac-escaped again');
-
- u.escapeQuerySpace(false);
-
- u.addQuery('alpha bravo', 'charlie delta');
- equal(u.toString(), '?bar=foo%2Bbar&bam%2Bbaz=foo&alpha%20bravo=charlie%20delta', 'serialized un/escaped space');
-
- URI.escapeQuerySpace = false;
- u = new URI('?bar=foo+bar&bam+baz=foo');
- data = u.query(true);
- equal(data.bar, 'foo+bar', 'value not un-spac-escaped by default');
- equal(data['bam+baz'], 'foo', 'name not un-spac-escaped by default');
-
- // reset
- URI.escapeQuerySpace = true;
- });
- test('hasQuery', function() {
- var u = URI('?string=bar&list=one&list=two&number=123&null&empty=&nested[one]=1&nested[two]=2');
-
- // exists
- equal(u.hasQuery('string'), true, 'simple exists check - passing');
- equal(u.hasQuery('nono'), false, 'simple exists check - failing');
-
- // truthy value
- equal(u.hasQuery('string', true), true, 'has truthy value check - passing string');
- equal(u.hasQuery('number', true), true, 'has truthy value check - passing number');
- equal(u.hasQuery('list', true), true, 'has truthy value check - passing list');
- equal(u.hasQuery('empty', true), false, 'has truthy value check - failing empty');
- equal(u.hasQuery('null', true), false, 'has truthy value check - failing null');
-
- // falsy value
- equal(u.hasQuery('string', false), false, 'has falsy value check - failing string');
- equal(u.hasQuery('number', false), false, 'has falsy value check - failing number');
- equal(u.hasQuery('list', false), false, 'has falsy value check - failing list');
- equal(u.hasQuery('empty', false), true, 'has falsy value check - passing empty');
- equal(u.hasQuery('null', false), true, 'has falsy value check - passing null');
-
- // match value
- equal(u.hasQuery('string', 'bar'), true, 'value check - passing string');
- equal(u.hasQuery('number', 123), true, 'value check - passing number');
- equal(u.hasQuery('number', '123'), true, 'value check - passing number as string');
- equal(u.hasQuery('list', 'one'), false, 'value check - failing list');
- equal(u.hasQuery('empty', ''), true, 'value check - passing empty');
- equal(u.hasQuery('null', ''), false, 'value check - failing null');
-
- // matching RegExp
- equal(u.hasQuery('string', /ar$/), true, 'RegExp check - passing string');
- equal(u.hasQuery('number', /2/), true, 'RegExp check - passing number');
- equal(u.hasQuery('string', /nono/), false, 'RegExp check - failing string');
- equal(u.hasQuery('number', /999/), false, 'RegExp check - failing number');
- equal(u.hasQuery(/^nested/), true, 'RegExp name check - passing');
- equal(u.hasQuery(/^nested/, 2), true, 'RegExp name and value - passing number');
- equal(u.hasQuery(/^nested/, '2'), true, 'RegExp name and value - passing number as string');
- equal(u.hasQuery(/^nested/, 'nono'), false, 'RegExp name and value - failing string');
- equal(u.hasQuery(/^nested/, /2/), true, 'RegExp name and value - passing RegExp number');
- equal(u.hasQuery(/^nested/, /3/), false, 'RegExp name and value exists check - failing');
- equal(u.hasQuery(/^lis/, ['one']), false, 'RegExp name andarray check - failing incomplete list');
- equal(u.hasQuery(/^lis/, ['one', 'two']), true, 'RegExp name and array check - passing list');
-
- // matching array
- equal(u.hasQuery('string', ['one']), false, 'array check - failing string');
- equal(u.hasQuery('list', ['one']), false, 'array check - failing incomplete list');
- equal(u.hasQuery('list', ['one', 'two']), true, 'array check - passing list');
- equal(u.hasQuery('list', ['two', 'one']), true, 'array check - passing unsorted list');
-
- // matching part of array
- equal(u.hasQuery('string', ['one'], true), false, 'in array check - failing string');
- equal(u.hasQuery('list', 'one', true), true, 'in array check - passing value');
- equal(u.hasQuery('list', ['one'], true), true, 'in array check - passing incomplete list');
- equal(u.hasQuery('list', ['one', 'two'], true), true, 'in array check - passing list');
- equal(u.hasQuery('list', ['two', 'one'], true), true, 'in array check - passing unsorted list');
- equal(u.hasQuery('list', /ne$/, true), true, 'in array check - passing RegExp');
- equal(u.hasQuery('list', [/ne$/], true), true, 'in array check - passing RegExp list');
-
- // comparison function
- equal(u.hasQuery('string', function(value, name, data) {
- equal(value, 'bar', 'Function check - param value');
- equal(name, 'string', 'Function check - param name');
- equal(typeof data, 'object', 'Function check - param data');
- return true;
- }), true, 'Function check - passing true');
- equal(u.hasQuery('string', function() {
- return false;
- }), false, 'Function check - passing false');
- });
-
- module('normalizing');
- test('normalize', function() {
- var u = new URI('http://www.exämple.org:80/food/woo/.././../baz.html?&foo=bar&&baz=bam&&baz=bau&#');
- u.normalize();
- equal(u+'', 'http://www.xn--exmple-cua.org/baz.html?foo=bar&baz=bam&baz=bau', 'fully normalized URL');
- });
- test('normalizeProtocol', function() {
- var u = new URI('hTTp://example.org/foobar.html');
- u.normalizeProtocol();
- equal(u+'', 'http://example.org/foobar.html', 'lowercase http');
- });
- test('normalizeHost', function() {
- var u;
-
- if (window.punycode) {
- u = new URI('http://exämple.org/foobar.html');
- u.normalizeHostname();
- equal(u+'', 'http://xn--exmple-cua.org/foobar.html', 'converting IDN to punycode');
- }
-
- if (window.IPv6) {
- u = new URI('http://[fe80:0000:0000:0000:0204:61ff:fe9d:f156]/foobar.html');
- u.normalizeHostname();
- equal(u+'', 'http://[fe80::204:61ff:fe9d:f156]/foobar.html', 'best IPv6 representation');
- }
-
- if (window.IPv6) {
- u = new URI('http://[::1]/foobar.html');
- u.normalizeHostname();
- equal(u+'', 'http://[::1]/foobar.html', 'best IPv6 representation');
- }
-
- u = new URI('http://wWw.eXamplE.Org/foobar.html');
- u.normalizeHostname();
- equal(u+'', 'http://www.example.org/foobar.html', 'lower case hostname');
- });
- test('normalizePort', function() {
- var u = new URI('http://example.org:80/foobar.html');
- u.normalizePort();
- equal(u+'', 'http://example.org/foobar.html', 'dropping port 80 for http');
-
- u = new URI('ftp://example.org:80/foobar.html');
- u.normalizePort();
- equal(u+'', 'ftp://example.org:80/foobar.html', 'keeping port 80 for ftp');
-
- });
- test('normalizePath', function() {
- // relative URL
- var u = new URI('/food/bar/baz.html');
-
- u.normalizePath();
- equal(u.path(), '/food/bar/baz.html', 'absolute path without change');
-
- u.path('food/bar/baz.html').normalizePath();
- equal(u.path(), 'food/bar/baz.html', 'relative path without change');
-
- u.path('/food/../bar/baz.html').normalizePath();
- equal(u.path(), '/bar/baz.html', 'single parent');
-
- u.path('/food/woo/../../bar/baz.html').normalizePath();
- equal(u.path(), '/bar/baz.html', 'double parent');
-
- u.path('/food/woo/../bar/../baz.html').normalizePath();
- equal(u.path(), '/food/baz.html', 'split double parent');
-
- u.path('/food/woo/.././../baz.html').normalizePath();
- equal(u.path(), '/baz.html', 'cwd-split double parent');
-
- u.path('food/woo/../bar/baz.html').normalizePath();
- equal(u.path(), 'food/bar/baz.html', 'relative parent');
-
- u.path('./food/woo/../bar/baz.html').normalizePath();
- equal(u.path(), 'food/bar/baz.html', 'dot-relative parent');
-
- // absolute URL
- u = new URI('http://example.org/foo/bar/baz.html');
- u.normalizePath();
- equal(u.path(), '/foo/bar/baz.html', 'URL: absolute path without change');
-
- u.path('foo/bar/baz.html').normalizePath();
- equal(u.path(), '/foo/bar/baz.html', 'URL: relative path without change');
-
- u.path('/foo/../bar/baz.html').normalizePath();
- equal(u.path(), '/bar/baz.html', 'URL: single parent');
-
- u.path('/foo/woo/../../bar/baz.html').normalizePath();
- equal(u.path(), '/bar/baz.html', 'URL: double parent');
-
- u.path('/foo/woo/../bar/../baz.html').normalizePath();
- equal(u.path(), '/foo/baz.html', 'URL: split double parent');
-
- u.path('/foo/woo/.././../baz.html').normalizePath();
- equal(u.path(), '/baz.html', 'URL: cwd-split double parent');
-
- u.path('foo/woo/../bar/baz.html').normalizePath();
- equal(u.path(), '/foo/bar/baz.html', 'URL: relative parent');
-
- u.path('./foo/woo/../bar/baz.html').normalizePath();
- equal(u.path(), '/foo/bar/baz.html', 'URL: dot-relative parent');
-
- u.path('/.//').normalizePath();
- equal(u.path(), '/', 'root /.//');
-
- // encoding
- u._parts.path = '/~userhome/@mine;is %2F and/';
- u.normalize();
- equal(u.pathname(), '/~userhome/@mine;is%20%2F%20and/', 'path encoding');
-
- // relative URL
- u = URI('/.').normalizePath();
- equal(u.path(), '/', 'root /.');
-
- u = URI('/..').normalizePath();
- equal(u.path(), '/', 'root /..');
-
- u = URI('/foo/.').normalizePath();
- equal(u.path(), '/foo/', 'root /foo/.');
-
- u = URI('/foo/..').normalizePath();
- equal(u.path(), '/', 'root /foo/..');
-
- u = URI('/foo/.bar').normalizePath();
- equal(u.path(), '/foo/.bar', 'root /foo/.bar');
-
- u = URI('/foo/..bar').normalizePath();
- equal(u.path(), '/foo/..bar', 'root /foo/..bar');
-
- // Percent Encoding normalization has to happen before dot segment normalization
- u = URI('/foo/%2E%2E').normalizePath();
- equal(u.path(), '/', 'root /foo/%2E%2E');
-
- u = URI('/foo/%2E').normalizePath();
- equal(u.path(), '/foo/', 'root /foo/%2E');
-
- u = URI('/foo/%2E%2E%2Fbar').normalizePath();
- equal(u.path(), '/foo/..%2Fbar', 'root /foo/%2E%2E%2Fbar');
-
- u = URI('../../../../../www/common/js/app/../../../../www_test/common/js/app/views/view-test.html');
- u.normalize();
- equal(u.path(), '../../../../../www_test/common/js/app/views/view-test.html', 'parent relative');
-
- u = URI('/../../../../../www/common/js/app/../../../../www_test/common/js/app/views/view-test.html');
- u.normalize();
- equal(u.path(), '/www_test/common/js/app/views/view-test.html', 'parent absolute');
-
- // URNs
- u = URI('urn:people:authors:poets:Shel Silverstein');
- u.normalize();
- equal(u.path(), 'people:authors:poets:Shel%20Silverstein');
-
- u = URI('urn:people:authors:philosophers:Søren Kierkegaard');
- u.normalize();
- equal(u.path(), 'people:authors:philosophers:S%C3%B8ren%20Kierkegaard');
-
- // URNs path separator preserved
- u = URI('urn:games:cards:Magic%3A the Gathering');
- u.normalize();
- equal(u.path(), 'games:cards:Magic%3A%20the%20Gathering');
- });
- test('normalizeQuery', function() {
- var u = new URI('http://example.org/foobar.html?');
- u.normalizeQuery();
- equal(u+'', 'http://example.org/foobar.html', 'dropping empty query sign');
-
- u.query('?&foo=bar&&baz=bam&').normalizeQuery();
- equal(u.query(), 'foo=bar&baz=bam', 'bad query resolution');
-
- u.query('?&foo=bar&&baz=bam&&baz=bau&').normalizeQuery();
- equal(u.query(), 'foo=bar&baz=bam&baz=bau', 'bad query resolution');
-
- u.query('?&foo=bar&foo=bar').normalizeQuery();
- equal(u.query(), 'foo=bar', 'duplicate key=value resolution');
- });
- test('normalizeFragment', function() {
- var u = new URI('http://example.org/foobar.html#');
- u.normalizeFragment();
- equal(u+'', 'http://example.org/foobar.html', 'dropping empty fragment sign');
- });
- test('readable', function() {
- var u = new URI('http://foo:bar@www.xn--exmple-cua.org/hello%20world/ä.html?foo%5B%5D=b+är#fragment');
- equal(u.readable(), 'http://www.exämple.org/hello world/ä.html?foo[]=b är#fragment', 'readable URL');
- });
-
- module('resolving URLs');
- test('absoluteTo', function() {
- // this being '../bar/baz.html?foo=bar'
- // base being 'http://example.org/foo/other/file.html'
- // return being http://example.org/foo/bar/baz.html?foo=bar'
- var tests = [{
- name: 'relative resolve',
- url: 'relative/path?blubber=1#hash1',
- base: 'http://www.example.org/path/to/file?some=query#hash',
- result: 'http://www.example.org/path/to/relative/path?blubber=1#hash1'
- }, {
- name: 'absolute resolve',
- url: '/absolute/path?blubber=1#hash1',
- base: 'http://www.example.org/path/to/file?some=query#hash',
- result: 'http://www.example.org/absolute/path?blubber=1#hash1'
- }, {
- name: 'relative resolve full URL',
- url: 'relative/path?blubber=1#hash3',
- base: 'http://user:pass@www.example.org:1234/path/to/file?some=query#hash',
- result: 'http://user:pass@www.example.org:1234/path/to/relative/path?blubber=1#hash3'
- }, {
- name: 'absolute resolve full URL',
- url: '/absolute/path?blubber=1#hash3',
- base: 'http://user:pass@www.example.org:1234/path/to/file?some=query#hash',
- result: 'http://user:pass@www.example.org:1234/absolute/path?blubber=1#hash3'
- }, {
- name: 'absolute resolve full URL without scheme',
- url: '//user:pass@www.example.org:1234/path/to/file?some=query#hash',
- base: 'proto://user:pass@www.example.org:1234/path/to/file?some=query#hash',
- result: 'proto://user:pass@www.example.org:1234/path/to/file?some=query#hash'
- }, {
- name: 'path-relative resolve',
- url: './relative/path?blubber=1#hash3',
- base: 'http://user:pass@www.example.org:1234/path/to/file?some=query#hash',
- result: 'http://user:pass@www.example.org:1234/path/to/relative/path?blubber=1#hash3'
- }, {
- name: 'path-relative parent resolve',
- url: '../relative/path?blubber=1#hash3',
- base: 'http://user:pass@www.example.org:1234/path/to/file?some=query#hash',
- result: 'http://user:pass@www.example.org:1234/path/relative/path?blubber=1#hash3'
- }, {
- name: 'path-relative path resolve',
- url: './relative/path?blubber=1#hash3',
- base: '/path/to/file?some=query#hash',
- result: '/path/to/relative/path?blubber=1#hash3'
- }, {
- name: 'path-relative path resolve 2',
- url: 'tofile',
- base: '/path/to/file',
- result: '/path/to/tofile'
- }, {
- name: 'path-relative path-root resolve',
- url: 'tofile',
- base: '/file',
- result: '/tofile'
- }, {
- name: 'path-relative parent path resolve',
- url: '../relative/path?blubber=1#hash3',
- base: '/path/to/file?some=query#hash',
- result: '/path/relative/path?blubber=1#hash3'
- }, {
- name: 'fragment absolute url',
- url: '#hash3',
- base: '/path/to/file?some=query#hash',
- result: '/path/to/file?some=query#hash3'
- }, {
- name: 'fragment relative url',
- url: '#hash3',
- base: 'path/to/file',
- result: 'path/to/file#hash3'
- }, {
- name: 'relative path - urljoin',
- url: 'the_relative_url',
- base: 'rel/path/',
- result: 'rel/path/the_relative_url'
- }, {
- name: 'relative path file - urljoin',
- url: 'the_relative_url',
- base: 'rel/path/something',
- result: 'rel/path/the_relative_url'
- }, {
- name: 'relative parent path file - urljoin',
- url: '../the_relative_url',
- base: 'rel/path/',
- result: 'rel/the_relative_url'
- }, {
- name: 'relative root path file - urljoin',
- url: '/the_relative_url',
- base: 'rel/path/',
- result: '/the_relative_url'
- }, {
- name: 'relative root file - urljoin',
- url: '/the_relative_url',
- base: 'http://example.com/rel/path/',
- result: 'http://example.com/the_relative_url'
- }, {
- name: 'absolute passthru - urljoin',
- url: 'http://github.com//the_relative_url',
- base: 'http://example.com/foo/bar',
- result: 'http://github.com//the_relative_url'
- }, {
- name: 'file paths - urljoin',
- url: 'anotherFile',
- base: 'aFile',
- result: 'anotherFile'
- }
- ];
-
- for (var i = 0, t; (t = tests[i]); i++) {
- var u = new URI(t.url),
- r = u.absoluteTo(t.base);
-
- equal(r + '', t.result, t.name);
- }
- });
- test('absoluteTo - RFC3986 reference resolution', function() {
- // http://tools.ietf.org/html/rfc3986#section-5.4
- var base = 'http://a/b/c/d;p?q';
- var map = {
- // normal
- // 'g:h' : 'g:h', // identified as URN
- 'g' : 'http://a/b/c/g',
- './g' : 'http://a/b/c/g',
- 'g/' : 'http://a/b/c/g/',
- '/g' : 'http://a/g',
- '//g' : 'http://g/', // added trailing /
- '?y' : 'http://a/b/c/d;p?y',
- 'g?y' : 'http://a/b/c/g?y',
- '#s' : 'http://a/b/c/d;p?q#s',
- 'g#s' : 'http://a/b/c/g#s',
- 'g?y#s' : 'http://a/b/c/g?y#s',
- ';x' : 'http://a/b/c/;x',
- 'g;x' : 'http://a/b/c/g;x',
- 'g;x?y#s' : 'http://a/b/c/g;x?y#s',
- '' : 'http://a/b/c/d;p?q',
- '.' : 'http://a/b/c/',
- './' : 'http://a/b/c/',
- '..' : 'http://a/b/',
- '../' : 'http://a/b/',
- '../g' : 'http://a/b/g',
- '../..' : 'http://a/',
- '../../' : 'http://a/',
- '../../g' : 'http://a/g',
- // abnormal
- '../../../g' : 'http://a/g',
- '../../../../g' : 'http://a/g'
- };
-
- for (var key in map) {
- var u = new URI(key),
- r = u.absoluteTo(base);
-
- equal(r + '', map[key], 'resolution "' + key + '"');
- }
- });
- test('relativeTo', function() {
- var tests = [{
- name: 'same parent',
- url: '/relative/path?blubber=1#hash1',
- base: '/relative/file?some=query#hash',
- result: 'path?blubber=1#hash1'
- }, {
- name: 'direct parent',
- url: '/relative/path?blubber=1#hash1',
- base: '/relative/sub/file?some=query#hash',
- result: '../path?blubber=1#hash1'
- }, {
- name: 'second parent',
- url: '/relative/path?blubber=1#hash1',
- base: '/relative/sub/sub/file?some=query#hash',
- result: '../../path?blubber=1#hash1'
- }, {
- name: 'third parent',
- url: '/relative/path?blubber=1#hash1',
- base: '/relative/sub/foo/sub/file?some=query#hash',
- result: '../../../path?blubber=1#hash1'
- }, {
- name: 'parent top level',
- url: '/relative/path?blubber=1#hash1',
- base: '/path/to/file?some=query#hash',
- result: '../../relative/path?blubber=1#hash1'
- }, {
- name: 'descendant',
- url: '/base/path/with/subdir/inner.html',
- base: '/base/path/top.html',
- result: 'with/subdir/inner.html'
- }, {
- name: 'same directory',
- url: '/path/',
- base: '/path/top.html',
- result: './'
- }, {
- name: 'absolute /',
- url: 'http://example.org/foo/bar/bat',
- base: 'http://example.org/',
- result: 'foo/bar/bat'
- }, {
- name: 'absolute /foo',
- url: 'http://example.org/foo/bar/bat',
- base: 'http://example.org/foo',
- result: 'foo/bar/bat'
- }, {
- name: 'absolute /foo/',
- url: 'http://example.org/foo/bar/bat',
- base: 'http://example.org/foo/',
- result: 'bar/bat'
- }, {
- name: 'same scheme',
- url: 'http://example.org/foo/bar/bat',
- base: 'http://example.com/foo/',
- result: '//example.org/foo/bar/bat'
- }, {
- name: 'different scheme',
- url: 'http://example.org/foo/bar',
- base: 'https://example.org/foo/',
- result: 'http://example.org/foo/bar'
- }, {
- name: 'base with no scheme or host',
- url: 'http://example.org/foo/bar',
- base: '/foo/',
- result: 'http://example.org/foo/bar'
- }, {
- name: 'base with no scheme',
- url: 'http://example.org/foo/bar',
- base: '//example.org/foo/bar',
- result: 'http://example.org/foo/bar'
- }, {
- name: 'denormalized base',
- url: '/foo/bar/bat',
- base: '/foo/./bar/',
- result: 'bat'
- }, {
- name: 'denormalized url',
- url: '/foo//bar/bat',
- base: '/foo/bar/',
- result: 'bat'
- }, {
- name: 'credentials',
- url: 'http://user:pass@example.org/foo/bar',
- base: 'http://example.org/foo/',
- result: '//user:pass@example.org/foo/bar'
- }, {
- name: 'base credentials',
- url: 'http://example.org/foo/bar',
- base: 'http://user:pass@example.org/foo/bar',
- result: '//example.org/foo/bar'
- }, {
- name: 'same credentials different host',
- url: 'http://user:pass@example.org/foo/bar',
- base: 'http://user:pass@example.com/foo/bar',
- result: '//user:pass@example.org/foo/bar'
- }, {
- name: 'different port 1',
- url: 'http://example.org/foo/bar',
- base: 'http://example.org:8080/foo/bar',
- result: '//example.org/foo/bar'
- }, {
- name: 'different port 2',
- url: 'http://example.org:8081/foo/bar',
- base: 'http://example.org:8080/foo/bar',
- result: '//example.org:8081/foo/bar'
- }, {
- name: 'different port 3',
- url: 'http://example.org:8081/foo/bar',
- base: 'http://example.org/foo/bar',
- result: '//example.org:8081/foo/bar'
- }, {
- name: 'same path - fragment',
- url: 'http://www.example.com:8080/dir/file#abcd',
- base: 'http://www.example.com:8080/dir/file',
- result: '#abcd'
- }, {
- name: 'same path - query',
- url: 'http://www.example.com:8080/dir/file?abcd=123',
- base: 'http://www.example.com:8080/dir/file',
- result: '?abcd=123'
- }, {
- name: 'same path - query and fragment',
- url: 'http://www.example.com:8080/dir/file?abcd=123#alpha',
- base: 'http://www.example.com:8080/dir/file',
- result: '?abcd=123#alpha'
- }, {
- name: 'already relative',
- url: 'foo/bar',
- base: '/foo/',
- 'throws': true
- }, {
- name: 'relative base',
- url: '/foo/bar',
- base: 'foo/',
- 'throws': true
- }
- ];
-
- for (var i = 0, t; (t = tests[i]); i++) {
- var u = new URI(t.url),
- b = new URI(t.base),
- caught = false;
- var r;
-
- try {
- r = u.relativeTo(b);
- } catch (e) {
- caught = true;
- }
- /*jshint sub:true */
- if (t['throws']) {
- /*jshint sub:false */
- ok(caught, t.name + ' should throw exception');
- } else {
- ok(!caught, t.name + ' should not throw exception');
- equal(r + '', t.result, t.name);
-
- var a = r.absoluteTo(t.base);
- var n = u.clone().normalize();
- equal(a.toString(), n.toString(), t.name + ' reversed');
- }
- }
-
- equal('b/c',
- new URI('http://example.org/a/b/c')
- .scheme('')
- .authority('')
- .relativeTo('/a/')
- .toString(),
- 'bug #103');
-
- equal('b/c',
- new URI('//example.org/a/b/c')
- .authority('')
- .relativeTo('/a/')
- .toString(),
- 'bug #103 (2)');
- });
-
- module('static helpers');
- test('withinString', function() {
- /*jshint laxbreak: true */
- var source = 'Hello www.example.com,\n'
- + 'http://google.com is a search engine, like http://www.bing.com\n'
- + 'http://exämple.org/foo.html?baz=la#bumm is an IDN URL,\n'
- + 'http://123.123.123.123/foo.html is IPv4 and http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html is IPv6.\n'
- + 'links can also be in parens (http://example.org) or quotes »http://example.org«.';
- var expected = 'Hello <a>www.example.com</a>,\n'
- + '<a>http://google.com</a> is a search engine, like <a>http://www.bing.com</a>\n'
- + '<a>http://exämple.org/foo.html?baz=la#bumm</a> is an IDN URL,\n'
- + '<a>http://123.123.123.123/foo.html</a> is IPv4 and <a>http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html</a> is IPv6.\n'
- + 'links can also be in parens (<a>http://example.org</a>) or quotes »<a>http://example.org</a>«.';
- /*jshint laxbreak: false */
- var result = URI.withinString(source, function(url) {
- return '<a>' + url + '</a>';
- });
-
- equal(result, expected, 'in string URI identification');
- });
- test('withinString - ignore', function() {
- var decorate = function(url) {
- return '<a>' + url + '</a>';
- };
- /*jshint laxbreak: true */
- var source = 'Hello www.example.com,\n'
- + 'proto://example.org/foo.html?baz=la#bumm is an URL.\n';
- var expected = 'Hello <a>www.example.com</a>,\n'
- + 'proto://example.org/foo.html?baz=la#bumm is an URL.\n';
- /*jshint laxbreak: false */
- var result = URI.withinString(source, decorate, {ignore: /^proto:/i});
-
- equal(result, expected, 'filtered in string URI identification');
- });
- test('withinString - ignoreHtml', function() {
- var decorate = function(url) {
- return '<a>' + url + '</a>';
- };
- /*jshint laxbreak: true */
- var source = 'Hello www.example.com,\n'
- + '<a href=http://example.org/foo.html?baz=la#bumm is an URL</a>.\n'
- + '<a href="http://example.org/foo.html?baz=la#bumm> is an URL</a>.\n'
- + '<a href=\'http://example.org/foo.html?baz=la#bumm\'> is an URL</a>.\n';
- var expected = 'Hello <a>www.example.com</a>,\n'
- + '<a href=http://example.org/foo.html?baz=la#bumm is an URL</a>.\n'
- + '<a href="http://example.org/foo.html?baz=la#bumm> is an URL</a>.\n'
- + '<a href=\'http://example.org/foo.html?baz=la#bumm\'> is an URL</a>.\n';
- /*jshint laxbreak: false */
- var result = URI.withinString(source, decorate, {ignoreHtml: true});
-
- equal(result, expected, 'filtered in string URI identification');
- });
- test('withinString - capture only', function() {
- /*jshint laxbreak: true */
- var source = 'Hello www.example.com,\n'
- + 'http://google.com is a search engine, like http://www.bing.com\n'
- + 'http://exämple.org/foo.html?baz=la#bumm is an IDN URL,\n'
- + 'http://123.123.123.123/foo.html is IPv4 and http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html is IPv6.\n'
- + 'links can also be in parens (http://example.org) or quotes »http://example.org«.';
- var expected = [
- 'www.example.com',
- 'http://google.com',
- 'http://www.bing.com',
- 'http://exämple.org/foo.html?baz=la#bumm',
- 'http://123.123.123.123/foo.html',
- 'http://fe80:0000:0000:0000:0204:61ff:fe9d:f156/foobar.html',
- 'http://example.org',
- 'http://example.org'
- ];
-
- /*jshint laxbreak: false */
- var links = [];
- var result = URI.withinString(source, function(url) {
- links.push(url);
- });
-
- deepEqual(links, expected, 'urls extracted');
- equal(result, source, 'source not modified');
- });
- test('noConflict', function() {
- var actual_lib = URI; // actual library; after loading, before noConflict()
- var unconflicted = URI.noConflict();
-
- strictEqual( unconflicted, actual_lib, 'noConflict() returns the URI object' );
- strictEqual( URI, URI_pre_lib, 'noConflict() restores the `URI` variable' );
-
- // restore for other tests
- window.URI = actual_lib;
- });
- test('noConflict(removeAll=true)', function() {
- var actual = {
- URI: URI,
- URITemplate: URITemplate,
- IPv6: IPv6,
- SecondLevelDomains: SecondLevelDomains
- };
-
- var unconflicted = URI.noConflict(true);
-
- deepEqual( unconflicted, actual, 'noConflict(true) returns the { URI, URITemplate, IPv6, SecondLevelDomains } object' );
- strictEqual( URI, URI_pre_lib, 'noConflict(true) restores the `URI` variable' );
- strictEqual( URITemplate, URITemplate_pre_lib, 'noConflict(true) restores the `URITemplate` variable' );
- strictEqual( IPv6, IPv6_pre_lib, 'noConflict(true) restores the `IPv6` variable' );
- strictEqual( SecondLevelDomains, SecondLevelDomains_pre_lib, 'noConflict(true) restores the `SecondLevelDomains` variable' );
-
- // restore for other tests
- window.URI = actual.URI;
- window.URITemplate = actual.URITemplate;
- window.IPv6 = actual.IPv6;
- window.SecondLevelDomains = actual.SecondLevelDomains;
- });
- test('joinPaths', function() {
- var result;
-
- result = URI.joinPaths('/a/b', '/c', 'd', '/e').toString();
- equal(result, '/a/b/c/d/e', 'absolute paths');
-
- result = URI.joinPaths('a/b', 'http://example.com/c', new URI('d/'), '/e').toString();
- equal(result, 'a/b/c/d/e', 'relative path');
-
- result = URI.joinPaths('/a/').toString();
- equal(result, '/a/', 'single absolute directory');
-
- result = URI.joinPaths('/a').toString();
- equal(result, '/a', 'single absolute segment');
-
- result = URI.joinPaths('a').toString();
- equal(result, 'a', 'single relative segment');
-
- result = URI.joinPaths('').toString();
- equal(result, '', 'empty string');
-
- result = URI.joinPaths().toString();
- equal(result, '', 'no argument');
-
- result = URI.joinPaths('', 'a', '', '', 'b').toString();
- equal(result, '/a/b', 'leading empty segment');
-
- result = URI.joinPaths('a', '', '', 'b', '', '').toString();
- equal(result, 'a/b/', 'trailing empty segment');
- });
-
- module('comparing URLs');
- test('equals', function() {
- var u = new URI('http://example.org/foo/bar.html?foo=bar&hello=world&hello=mars#fragment'),
- e = [
- 'http://example.org/foo/../foo/bar.html?foo=bar&hello=world&hello=mars#fragment',
- 'http://exAmple.org/foo/bar.html?foo=bar&hello=world&hello=mars#fragment',
- 'http://exAmple.org:80/foo/bar.html?foo=bar&hello=world&hello=mars#fragment',
- 'http://example.org/foo/bar.html?foo=bar&hello=mars&hello=world#fragment',
- 'http://example.org/foo/bar.html?hello=mars&hello=world&foo=bar&#fragment'
- ],
- d = [
- 'http://example.org/foo/../bar.html?foo=bar&hello=world&hello=mars#fragment',
- 'http://example.org/foo/bar.html?foo=bar&hello=world&hello=mars#frAgment',
- 'http://example.org/foo/bar.html?foo=bar&hello=world&hello=mArs#fragment',
- 'http://example.org/foo/bar.hTml?foo=bar&hello=world&hello=mars#fragment',
- 'http://example.org:8080/foo/bar.html?foo=bar&hello=world&hello=mars#fragment',
- 'http://user:pass@example.org/foo/bar.html?foo=bar&hello=world&hello=mars#fragment',
- 'ftp://example.org/foo/bar.html?foo=bar&hello=world&hello=mars#fragment',
- 'http://example.org/foo/bar.html?foo=bar&hello=world&hello=mars&hello=jupiter#fragment'
- ],
- i, c;
-
- for (i = 0; (c = e[i]); i++) {
- equal(u.equals(c), true, 'equality ' + i);
- }
-
- for (i = 0; (c = d[i]); i++) {
- equal(u.equals(c), false, 'different ' + i);
- }
- });
-
- module('Charset');
- test('iso8859', function() {
- var u = new URI('/ä.html');
- u.normalizePath();
- equal(u.path(), '/%C3%A4.html', 'Unicode');
-
- URI.iso8859();
- u = new URI('/ä.html');
- u.normalizePath();
- equal(u.path(), '/%E4.html', 'ISO8859');
- u.path('/ö.html');
- equal(u.path(), '/%F6.html', 'ISO8859');
-
- URI.unicode();
- u = new URI('/ä.html');
- u.normalizePath();
- equal(u.path(), '/%C3%A4.html', 'Unicode again');
-
- u = new URI('/ä.html');
- u.normalizePath();
- equal(u.path(), '/%C3%A4.html', 'convert unicode start');
- u.iso8859();
- equal(u.path(), '/%E4.html', 'convert iso8859');
- u.unicode();
- equal(u.path(), '/%C3%A4.html', 'convert unicode');
- });
- test('bad charset in QueryString', function() {
- var uri = new URI('http://www.google.com.hk/search?q=pennytel%20downloads&sa=%20%CB%D1%20%CB%F7%20&forid=1&prog=aff&ie=GB2312&oe=GB2312&safe=active&source=sdo_sb_html&hl=zh-CN');
- var data = uri.query(true);
-
- equal(data.sa, '%20%CB%D1%20%CB%F7%20', 'undecodable value returned');
- equal(data.forid, '1', 'decodable value returned');
-
- uri.normalizeQuery();
- data = uri.query(true);
- equal(data.sa, '%20%CB%D1%20%CB%F7%20', 'undecodable value returned');
- equal(data.forid, '1', 'decodable value returned');
- });
-
- module('Encoding');
- test('decode malformed URI', function() {
- try {
- decodeURIComponent('%%20');
- ok(false, 'decodeURIComponent() must throw URIError: URI malformed');
- } catch(e) {}
-
- try {
- URI.decode('%%20');
- ok(false, 'URI.decode() must throw URIError: URI malformed');
- } catch(e) {}
-
- equal(URI.decodeQuery('%%20'), '%%20', 'malformed URI component returned');
- equal(URI.decodePathSegment('%%20'), '%%20', 'malformed URI component returned');
- equal(URI.decodeUrnPathSegment('%%20'), '%%20', 'malformed URN component returned');
- });
- test('encodeQuery', function() {
- var escapeQuerySpace = URI.escapeQuerySpace;
-
- URI.escapeQuerySpace = true;
- equal(URI.encodeQuery(' '), '+');
- equal(URI.encode(' '), '%20');
-
- URI.escapeQuerySpace = false;
- equal(URI.encodeQuery(' '), '%20');
- equal(URI.encode(' '), '%20');
-
- URI.escapeQuerySpace = escapeQuerySpace;
- });
- test('decodeQuery', function() {
- var escapeQuerySpace = URI.escapeQuerySpace;
-
- URI.escapeQuerySpace = true;
- equal(URI.decodeQuery('+'), ' ');
- equal(URI.decodeQuery('%20'), ' ');
- equal(URI.decode('%20'), ' ');
- equal(URI.decode('+'), '+');
-
- URI.escapeQuerySpace = false;
- equal(URI.decodeQuery('+'), '+');
- equal(URI.decodeQuery('%20'), ' ');
- equal(URI.decode('%20'), ' ');
- equal(URI.decode('+'), '+');
-
- URI.escapeQuerySpace = escapeQuerySpace;
- });
- test('encodeReserved', function() {
- equal(URI.encodeReserved('ä:/?#[]@!$&\'()*+,;='), '%C3%A4:/?#[]@!$&\'()*+,;=');
- });
-
-})();
diff --git a/thirdparty/URI.js/test/test_fragmentQuery.js b/thirdparty/URI.js/test/test_fragmentQuery.js
deleted file mode 100644
index a98406bfe..000000000
--- a/thirdparty/URI.js/test/test_fragmentQuery.js
+++ /dev/null
@@ -1,59 +0,0 @@
-(function() {
- 'use strict';
- /*global URI, test, equal, deepEqual */
-
- module('URI.fragmentQuery');
- test('storing query-data in fragment', function() {
- var u = URI('http://example.org');
-
- deepEqual(u.fragment(true), {}, 'empty map for missing fragment');
-
- u = URI('http://example.org/#');
- deepEqual(u.fragment(true), {}, 'empty map for empty fragment');
-
- u = URI('http://example.org/#?hello=world');
- deepEqual(u.fragment(true), {hello: 'world'}, 'reading data object');
-
- u.fragment({bar: 'foo'});
- deepEqual(u.fragment(true), {bar: 'foo'}, 'setting data object');
- equal(u.toString(), 'http://example.org/#?bar=foo', 'setting data object serialized');
-
- u.addFragment('name', 'value');
- deepEqual(u.fragment(true), {bar: 'foo', name: 'value'}, 'adding value');
- equal(u.toString(), 'http://example.org/#?bar=foo&name=value', 'adding value serialized');
-
- u.removeFragment('bar');
- deepEqual(u.fragment(true), {name: 'value'}, 'removing value bar');
- equal(u.toString(), 'http://example.org/#?name=value', 'removing value bar serialized');
-
- u.removeFragment('name');
- deepEqual(u.fragment(true), {}, 'removing value name');
- equal(u.toString(), 'http://example.org/#?', 'removing value name serialized');
- });
- test('fragmentPrefix', function() {
- var u;
-
- URI.fragmentPrefix = '!';
- u = URI('http://example.org');
- equal(u._parts.fragmentPrefix, '!', 'init using global property');
-
- u.fragment('#?hello=world');
- equal(u.fragment(), '?hello=world', 'unparsed ?');
- deepEqual(u.fragment(true), {}, 'parsing ? prefix');
-
- u.fragment('#!hello=world');
- equal(u.fragment(), '!hello=world', 'unparsed !');
- deepEqual(u.fragment(true), {hello: 'world'}, 'parsing ! prefix');
-
- u.fragmentPrefix('§');
- equal(u.fragment(), '!hello=world', 'unparsed §');
- deepEqual(u.fragment(true), {}, 'parsing § prefix');
-
- u.fragment('#§hello=world');
- equal(u.fragment(), '§hello=world', 'unparsed §');
- deepEqual(u.fragment(true), {hello: 'world'}, 'parsing § prefix');
-
- URI.fragmentPrefix = '?';
- });
-
-})(); \ No newline at end of file
diff --git a/thirdparty/URI.js/test/test_fragmentURI.js b/thirdparty/URI.js/test/test_fragmentURI.js
deleted file mode 100644
index 87a28b8e5..000000000
--- a/thirdparty/URI.js/test/test_fragmentURI.js
+++ /dev/null
@@ -1,61 +0,0 @@
-(function() {
- 'use strict';
- /*global URI, test, equal, ok */
-
- module('URI.fragmentURI');
- test('storing URLs in fragment', function() {
- var u = URI('http://example.org');
- var f;
-
- // var uri = URI('http://example.org/#!/foo/bar/baz.html');
- // var furi = uri.fragment(true);
- // furi.pathname() === '/foo/bar/baz.html';
- // furi.pathname('/hello.html');
- // uri.toString() === 'http://example.org/#!/hello.html'
-
- ok(u.fragment(true) instanceof URI, 'URI instance for missing fragment');
-
- u = URI('http://example.org/#');
- ok(u.fragment(true) instanceof URI, 'URI instance for empty fragment');
-
- u = URI('http://example.org/#!/foo/bar/baz.html');
- f = u.fragment(true);
- equal(f.pathname(), '/foo/bar/baz.html', 'reading path of FragmentURI');
- equal(f.filename(), 'baz.html', 'reading filename of FragmentURI');
-
- f.filename('foobar.txt');
- equal(f.pathname(), '/foo/bar/foobar.txt', 'modifying filename of FragmentURI');
- equal(u.fragment(), '!/foo/bar/foobar.txt', 'modifying fragment() through FragmentURI on original');
- equal(u.toString(), 'http://example.org/#!/foo/bar/foobar.txt', 'modifying filename of FragmentURI on original');
- });
- test('fragmentPrefix', function() {
- var u;
-
- URI.fragmentPrefix = '?';
- u = URI('http://example.org');
- equal(u._parts.fragmentPrefix, '?', 'init using global property');
-
- u.fragment('#!/foo/bar/baz.html');
- equal(u.fragment(), '!/foo/bar/baz.html', 'unparsed ?');
- ok(u.fragment(true) instanceof URI, 'parsing ? prefix - is URI');
- equal(u.fragment(true).toString(), '', 'parsing ? prefix - result');
-
- u.fragment('#?/foo/bar/baz.html');
- equal(u.fragment(), '?/foo/bar/baz.html', 'unparsed ?');
- ok(u.fragment(true) instanceof URI, 'parsing ? prefix - is URI');
- equal(u.fragment(true).toString(), '/foo/bar/baz.html', 'parsing ? prefix - result');
-
- u.fragmentPrefix('§');
- equal(u.fragment(), '?/foo/bar/baz.html', 'unparsed §');
- ok(u.fragment(true) instanceof URI, 'parsing § prefix - is URI');
- equal(u.fragment(true).toString(), '', 'parsing § prefix - result');
-
- u.fragment('#§/foo/bar/baz.html');
- equal(u.fragment(), '§/foo/bar/baz.html', 'unparsed §');
- ok(u.fragment(true) instanceof URI, 'parsing § prefix - is URI');
- equal(u.fragment(true).toString(), '/foo/bar/baz.html', 'parsing § prefix - result');
-
- URI.fragmentPrefix = '!';
- });
-
-})(); \ No newline at end of file
diff --git a/thirdparty/URI.js/test/test_jim.js b/thirdparty/URI.js/test/test_jim.js
deleted file mode 100644
index 2be6def17..000000000
--- a/thirdparty/URI.js/test/test_jim.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * What would jim do?
- * more tests for border-edge cases
- * Christian Harms.
- *
- * Note: I have no clue who or what jim is supposed to be. It might be something like the German DAU (dumbest possible user)
- */
-(function() {
- 'use strict';
- /*global URI, test, equal, raises */
-
- module('injection');
- test('protocol', function() {
- var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
- raises(function() {
- u.protocol('ftp://example.org');
- }, TypeError, 'Failing invalid characters');
-
- u.protocol('ftp:');
- equal(u.protocol(), 'ftp', 'protocol() has set invalid protocoll!');
- equal(u.hostname(), 'example.com', 'protocol() has changed the hostname');
- });
- test('port', function() {
- var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
- raises(function() {
- u.port('99:example.org');
- }, TypeError, 'Failing invalid characters');
-
- u.port(':99');
- equal(u.hostname(), 'example.com', 'port() has modified hostname');
- equal(u.port(), 99, 'port() has set an invalid port');
-
- u.port(false);
- equal(u.port(), '', 'port() has set an invalid port');
-
- // RFC 3986 says nothing about "16-bit unsigned" http://tools.ietf.org/html/rfc3986#section-3.2.3
- // u.href(new URI("http://example.com/"))
- // u.port(65536);
- // notEqual(u.port(), "65536", "port() has set to an non-valid value (A port number is a 16-bit unsigned integer)");
-
- raises(function() {
- u.port('-99');
- }, TypeError, 'Failing invalid characters');
- });
- test('domain', function() {
- var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
-
- raises(function() {
- u.domain('example.org/dir0/');
- }, TypeError, 'Failing invalid characters');
-
- raises(function() {
- u.domain('example.org:80');
- }, TypeError, 'Failing invalid characters');
-
- raises(function() {
- u.domain('foo@example.org');
- }, TypeError, 'Failing invalid characters');
- });
- test('subdomain', function() {
- var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
-
- raises(function() {
- u.subdomain('example.org/dir0/');
- }, TypeError, 'Failing invalid characters');
-
- raises(function() {
- u.subdomain('example.org:80');
- }, TypeError, 'Failing invalid characters');
-
- raises(function() {
- u.subdomain('foo@example.org');
- }, TypeError, 'Failing invalid characters');
- });
- test('tld', function() {
- var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
-
- raises(function() {
- u.tld('foo/bar.html');
- }, TypeError, 'Failing invalid characters');
- });
- test('path', function() {
- var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
- u.path('/dir3/?query3=value3#fragment');
- equal(u.hostname(), 'example.com', 'path() has modified hostname');
- equal(u.path(), '/dir3/%3Fquery3=value3%23fragment', 'path() has set invalid path');
- equal(u.query(), 'query1=value1&query2=value2', 'path() has modified query');
- equal(u.fragment(), 'hash', 'path() has modified fragment');
- });
- test('filename', function() {
- var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
-
- u.filename('name.html?query');
- equal(u.filename(), 'name.html%3Fquery', 'filename() has set invalid filename');
- equal(u.query(), 'query1=value1&query2=value2', 'filename() has modified query');
-
- // allowed!
- u.filename('../name.html?query');
- equal(u.filename(), 'name.html%3Fquery', 'filename() has set invalid filename');
- equal(u.directory(), '/dir1', 'filename() has not altered directory properly');
- });
- test('addQuery', function() {
- var u = new URI('http://example.com/dir1/dir2/?query1=value1&query2=value2#hash');
- u.addQuery('query3', 'value3#got');
- equal(u.query(), 'query1=value1&query2=value2&query3=value3%23got', 'addQuery() has set invalid query');
- equal(u.fragment(), 'hash', 'addQuery() has modified fragment');
- });
-
- /*
- // RFC 3986 says "…and should limit these names to no more than 255 characters in length."
- // SHOULD is not MUST therefore not the responsibility of URI.js
-
- module("validation");
- test("domain", function() {
- // this bases on the wiki page information: http://en.wikipedia.org/wiki/Domain_Name_System
- var u = new URI("http://example.com/"), domain, i, j;
-
- //generate a 204 character domain
- domain = "com"
- for (i=0; i<20; i++) {
- domain = "0123456789." + domain;
- }
- u.domain(domain);
- equals(u.hostname(), domain, "domain() has not set 204-character-domain");
-
- //expand the domain to a 404 character domain
- for (i=0; i<20; i++) {
- domain = "0123456789." + domain;
- }
- u.domain(domain);
- equals(u.hostname() == domain, true, "set domain() with "+domain.length+" charachters - not valid domainname");
-
- //generate a domain with three 70-char subdomains-parts.
- domain = "com";
- for (j=0; j<3; j++) {
- //start new subdomain
- domain = "." + domain;
- for (i=0; i<70; i++) {
- domain = "a" + domain;
- }
- }
- u.domain(domain);
- equals(u.hostname() == domain, true, "set domain() with 70-character subdomain not valid domainname");
- });
- */
-})(); \ No newline at end of file
diff --git a/thirdparty/URI.js/test/test_jquery.js b/thirdparty/URI.js/test/test_jquery.js
deleted file mode 100644
index b6ab8c1be..000000000
--- a/thirdparty/URI.js/test/test_jquery.js
+++ /dev/null
@@ -1,141 +0,0 @@
-(function() {
- 'use strict';
- /*global document, URI, $, test, equal, ok */
-
- module('jQuery.URI', {
- setup: function() {
- var links = [
- '<a href="http://example.org/">an HTTP link</a>',
- '<a href="https://example.org/">an HTTPS link</a>',
- '<a href="http://example.org/so)me.pdf">some pdf</a>',
- '<a href="http://example.org/hello/world.html">hello world</a>',
- '<a href="ftp://localhost/one/two/three/file.ext">directories</a>',
- '<a href="ftp://localhost/one/two/file.ext">directories</a>',
- '<a href="mailto:mail@example.org?subject=Hello+World">Mail me</a>',
- '<a href="javascript:alert(\'ugly!\');">some javascript</a>',
- '<a href="#anchor">jump to anchor</a>',
- '<img src="/dontexist.jpg" alt="some jpeg">',
- '<img src="/dontexist.svg" alt="some svg">',
- '<form method="post" action="/some/script.php"></form>'
- ];
-
- $('<div id="testestest">' + links.join('') + '</div>')
- .appendTo(document.body);
- $('<div>foo</div>')
- .appendTo(document.body);
-
- var script = document.createElement('script');
- script.type = 'text/javascript';
- script.src = '/nonexistant.js';
- document.getElementById('testestest').appendChild(script);
- },
- teardown: function() {
- var t = $('#testestest');
- t.next().remove();
- t.remove();
- }
- });
- test('.uri()', function() {
- var $links = $('#testestest'),
- $first = $links.children().first(),
- uri = $first.uri(),
- _uri = URI('/hello.world');
-
- ok(uri !== _uri, 'different URI instances');
- var __uri = $first.uri(_uri);
- ok(uri !== _uri, 'different URI instances');
- ok(uri === __uri, 'same URI instances');
- equal($first.attr('href'), _uri.toString(), 'equal URI');
-
- });
- test('filtering with :uri()', function() {
- var $links = $('#testestest');
-
- // find using accessor and "begins with" comparison
- equal($('a:uri(href^=#anc)').length, 1, '$(selector) Anchor Link');
- equal($links.find(':uri(href^=#anc)').length, 1, '.find(selector) Anchor Link');
-
- // find using accessor and "ends with" comparison
- equal($(':uri(href$=.css)').length, 1, ':uri(href$=.css)');
-
- // find using accessor and "contains" comparison
- equal($(':uri(href *= /hello/)').length, 1, ':uri(href *= /hello/)');
-
- // find using accessor and "equals" comparison
- equal($links.find(':uri(protocol=https)').length, 1, ':uri(protocol=https)');
- equal($links.find(':uri(protocol=http)').length, 3, ':uri(protocol=http)');
-
- // directory match with trailing slash
- equal($links.find(':uri(directory *= /two/)').length, 2, ':uri(directory *= /two/)');
-
- // find using URI.is()
- equal($links.find(':uri(relative)').length, 5, ':uri(relative)');
- equal($links.find(':uri(is:relative)').length, 5, ':uri(is:relative)');
- equal($links.find(':uri(is: relative)').length, 5, ':uri(is:relative)');
-
- // find using URI.equal()
- // This syntax breaks Sizzle, probably because it's looking for a nested pseudo ":http"
- //equal($links.find(':uri(equals:http://example.org/hello/foo/../world.html)').length, 1, ':uri(equals:$url$)');
- equal($links.find(':uri(equals:"http://example.org/hello/foo/../world.html")').length, 1, ':uri(equals:$url$)');
- equal($links.find(':uri(equals: "http://example.org/hello/foo/../world.html")').length, 1, ':uri(equals:$url$)');
-
- // find URNs
- equal($links.find(':uri(urn)').length, 2, ':uri(urn)');
-
- // .is()
- equal($links.children('script').is(':uri(suffix=js)'), true, '.is(\':uri(suffix=js)\')');
- equal($links.children('form').is(':uri(suffix=php)'), true, '.is(\':uri(suffix=php)\')');
-
- // .has()
- equal($('div').has(':uri(suffix=js)').length, 1, '.has(\':uri(suffix=js)\')');
- });
- test('.attr("href")', function() {
- var $links = $('#testestest'),
- $first = $links.children().first(),
- first = $first.get(0),
- uri = $first.uri(),
- href = function(elem) {
- return elem.getAttribute('href');
- };
-
- if (!$.support.hrefNormalized) {
- href = function(elem) {
- return elem.getAttribute('href', 2);
- };
- }
-
- ok(uri instanceof URI, 'instanceof URI');
- equal(href(first), uri.toString(), 'URI equals href');
-
- // test feedback to DOM element
- uri.hostname('example.com');
- ok($first.uri() === uri, 'URI persisted');
- equal(href(first), uri.toString(), 'transparent href update');
-
- // test feedback from DOM element
- $first.attr('href', 'http://example.net/');
- ok($first.uri() === uri, 'URI persisted');
- equal(href(first), uri.toString(), 'transparent href update');
- });
- test('.attr("uri:accessor")', function() {
- var $links = $('#testestest'),
- $first = $links.children().first(),
- uri = $first.uri(),
- href = function(elem) {
- return elem.getAttribute('href');
- };
-
- if (!$.support.hrefNormalized) {
- href = function(elem) {
- return elem.getAttribute('href', 2);
- };
- }
-
- equal($first.attr('uri:hostname'), 'example.org', 'reading uri:hostname');
- $first.attr('uri:hostname', 'example.com');
- equal($first.attr('uri:hostname'), 'example.com', 'changed uri:hostname');
- equal($first.is(':uri(hostname=example.com)'), true, ':uri() after changed uri:hostname');
- ok($first.uri() === uri, 'URI persisted');
- });
-
-})(); \ No newline at end of file
diff --git a/thirdparty/URI.js/test/test_template.js b/thirdparty/URI.js/test/test_template.js
deleted file mode 100644
index 16db0179e..000000000
--- a/thirdparty/URI.js/test/test_template.js
+++ /dev/null
@@ -1,411 +0,0 @@
-(function() {
- 'use strict';
- /*global window, URITemplate, URITemplate_pre_lib, test, equal, strictEqual, raises */
- // FIXME: v2.0.0 renamce non-camelCase properties to uppercase
- /*jshint camelcase: false, loopfunc: true, newcap: false */
-
- var levels = {
- // http://tools.ietf.org/html/rfc6570#section-1.2
- 'Level 1' : {
- expressions : {
- 'Simple string expansion' : {
- '{var}' : 'value',
- '{hello}' : 'Hello%20World%21'
- }
- },
- values : {
- 'var' : 'value',
- 'hello' : 'Hello World!'
- }
- },
- 'Level 2' : {
- expressions : {
- 'Reserved string expansion' : {
- '{+var}' : 'value',
- '{+hello}' : 'Hello%20World!',
- '{+path}/here' : '/foo/bar/here',
- 'here?ref={+path}' : 'here?ref=/foo/bar'
- },
- 'Fragment expansion, crosshatch-prefixed' : {
- 'X{#var}' : 'X#value',
- 'X{#hello}' : 'X#Hello%20World!'
- }
- },
- values : {
- 'var' : 'value',
- 'hello' : 'Hello World!',
- 'path' : '/foo/bar'
- }
- },
- 'Level 3' : {
- expressions : {
- 'String expansion with multiple variables' : {
- 'map?{x,y}' : 'map?1024,768',
- '{x,hello,y}' : '1024,Hello%20World%21,768'
- },
- 'Reserved expansion with multiple variables' : {
- '{+x,hello,y}' : '1024,Hello%20World!,768',
- '{+path,x}/here' : '/foo/bar,1024/here'
- },
- 'Fragment expansion with multiple variables' : {
- '{#x,hello,y}' : '#1024,Hello%20World!,768',
- '{#path,x}/here' : '#/foo/bar,1024/here'
- },
- 'Label expansion, dot-prefixed' : {
- 'X{.var}' : 'X.value',
- 'X{.x,y}' : 'X.1024.768'
- },
- 'Path segments, slash-prefixed' : {
- '{/var}' : '/value',
- '{/var,x}/here' : '/value/1024/here'
- },
- 'Path-style parameters, semicolon-prefixed' : {
- '{;x,y}' : ';x=1024;y=768',
- '{;x,y,empty}' : ';x=1024;y=768;empty'
- },
- 'Form-style query, ampersand-separated' : {
- '{?x,y}' : '?x=1024&y=768',
- '{?x,y,empty}' : '?x=1024&y=768&empty='
- },
- 'Form-style query continuation' : {
- '?fixed=yes{&x}' : '?fixed=yes&x=1024',
- '{&x,y,empty}' : '&x=1024&y=768&empty='
- }
- },
- values : {
- 'var' : 'value',
- 'hello' : 'Hello World!',
- 'empty' : '',
- 'path' : '/foo/bar',
- 'x' : '1024',
- 'y' : '768'
- }
- },
- 'Level 4' : {
- expressions : {
- 'String expansion with value modifiers' : {
- '{var:3}' : 'val',
- '{var:30}' : 'value',
- '{list}' : 'red,green,blue',
- '{list*}' : 'red,green,blue',
- '{keys}' : 'semi,%3B,dot,.,comma,%2C',
- '{keys*}' : 'semi=%3B,dot=.,comma=%2C'
- },
- 'Reserved expansion with value modifiers' : {
- '{+path:6}/here' : '/foo/b/here',
- '{+list}' : 'red,green,blue',
- '{+list*}' : 'red,green,blue',
- '{+keys}' : 'semi,;,dot,.,comma,,',
- '{+keys*}' : 'semi=;,dot=.,comma=,'
- },
- 'Fragment expansion with value modifiers' : {
- '{#path:6}/here' : '#/foo/b/here',
- '{#list}' : '#red,green,blue',
- '{#list*}' : '#red,green,blue',
- '{#keys}' : '#semi,;,dot,.,comma,,',
- '{#keys*}' : '#semi=;,dot=.,comma=,'
- },
- 'Label expansion, dot-prefixed' : {
- 'X{.var:3}' : 'X.val',
- 'X{.list}' : 'X.red,green,blue',
- 'X{.list*}' : 'X.red.green.blue',
- 'X{.keys}' : 'X.semi,%3B,dot,.,comma,%2C',
- 'X{.keys*}' : 'X.semi=%3B.dot=..comma=%2C'
- },
- 'Path segments, slash-prefixed' : {
- '{/var:1,var}' : '/v/value',
- '{/list}' : '/red,green,blue',
- '{/list*}' : '/red/green/blue',
- '{/list*,path:4}' : '/red/green/blue/%2Ffoo',
- '{/keys}' : '/semi,%3B,dot,.,comma,%2C',
- '{/keys*}' : '/semi=%3B/dot=./comma=%2C'
- },
- 'Path-style parameters, semicolon-prefixed' : {
- '{;hello:5}' : ';hello=Hello',
- '{;list}' : ';list=red,green,blue',
- '{;list*}' : ';list=red;list=green;list=blue',
- '{;keys}' : ';keys=semi,%3B,dot,.,comma,%2C',
- '{;keys*}' : ';semi=%3B;dot=.;comma=%2C'
- },
-
- 'Form-style query, ampersand-separated' : {
- '{?var:3}' : '?var=val',
- '{?list}' : '?list=red,green,blue',
- '{?list*}' : '?list=red&list=green&list=blue',
- '{?keys}' : '?keys=semi,%3B,dot,.,comma,%2C',
- '{?keys*}' : '?semi=%3B&dot=.&comma=%2C'
- },
- 'Form-style query continuation' : {
- '{&var:3}' : '&var=val',
- '{&list}' : '&list=red,green,blue',
- '{&list*}' : '&list=red&list=green&list=blue',
- '{&keys}' : '&keys=semi,%3B,dot,.,comma,%2C',
- '{&keys*}' : '&semi=%3B&dot=.&comma=%2C'
- }
- },
- values : {
- 'var' : 'value',
- 'hello' : 'Hello World!',
- 'path' : '/foo/bar',
- 'list' : ['red', 'green', 'blue'],
- 'keys' : {
- 'semi' : ';',
- 'dot' : '.',
- 'comma' : ','
- }
- }
- },
- // http://tools.ietf.org/html/rfc6570#section-3
- 'Expression Expansion' : {
- expressions : {
- 'Variable Expansion' : {
- '{count}' : 'one,two,three',
- '{count*}' : 'one,two,three',
- '{/count}' : '/one,two,three',
- '{/count*}' : '/one/two/three',
- '{;count}' : ';count=one,two,three',
- '{;count*}' : ';count=one;count=two;count=three',
- '{?count}' : '?count=one,two,three',
- '{?count*}' : '?count=one&count=two&count=three',
- '{&count*}' : '&count=one&count=two&count=three'
- },
- 'Simple String Expansion' : {
- '{var}' : 'value',
- '{hello}' : 'Hello%20World%21',
- '{half}' : '50%25',
- 'O{empty}X' : 'OX',
- 'O{undef}X' : 'OX',
- '{x,y}' : '1024,768',
- '{x,hello,y}' : '1024,Hello%20World%21,768',
- '?{x,empty}' : '?1024,',
- '?{x,undef}' : '?1024',
- '?{undef,y}' : '?768',
- '{var:3}' : 'val',
- '{var:30}' : 'value',
- '{list}' : 'red,green,blue',
- '{list*}' : 'red,green,blue',
- '{keys}' : 'semi,%3B,dot,.,comma,%2C',
- '{keys*}' : 'semi=%3B,dot=.,comma=%2C'
- },
- 'Reserved Expansion' : {
- '{+var}' : 'value',
- '{+hello}' : 'Hello%20World!',
- '{+half}' : '50%25',
- '{base}index' : 'http%3A%2F%2Fexample.com%2Fhome%2Findex',
- '{+base}index' : 'http://example.com/home/index',
- 'O{+empty}X' : 'OX',
- 'O{+undef}X' : 'OX',
- '{+path}/here' : '/foo/bar/here',
- 'here?ref={+path}' : 'here?ref=/foo/bar',
- 'up{+path}{var}/here' : 'up/foo/barvalue/here',
- '{+x,hello,y}' : '1024,Hello%20World!,768',
- '{+path,x}/here' : '/foo/bar,1024/here',
- '{+path:6}/here' : '/foo/b/here',
- '{+list}' : 'red,green,blue',
- '{+list*}' : 'red,green,blue',
- '{+keys}' : 'semi,;,dot,.,comma,,',
- '{+keys*}' : 'semi=;,dot=.,comma=,'
- },
- 'Fragment Expansion' : {
- '{#var}' : '#value',
- '{#hello}' : '#Hello%20World!',
- '{#half}' : '#50%25',
- 'foo{#empty}' : 'foo#',
- 'foo{#undef}' : 'foo',
- '{#x,hello,y}' : '#1024,Hello%20World!,768',
- '{#path,x}/here' : '#/foo/bar,1024/here',
- '{#path:6}/here' : '#/foo/b/here',
- '{#list}' : '#red,green,blue',
- '{#list*}' : '#red,green,blue',
- '{#keys}' : '#semi,;,dot,.,comma,,',
- '{#keys*}' : '#semi=;,dot=.,comma=,'
- },
- 'Label Expansion with Dot-Prefix' : {
- '{.who}' : '.fred',
- '{.who,who}' : '.fred.fred',
- '{.half,who}' : '.50%25.fred',
- 'www{.dom*}' : 'www.example.com',
- 'X{.var}' : 'X.value',
- 'X{.empty}' : 'X.',
- 'X{.undef}' : 'X',
- 'X{.var:3}' : 'X.val',
- 'X{.list}' : 'X.red,green,blue',
- 'X{.list*}' : 'X.red.green.blue',
- 'X{.keys}' : 'X.semi,%3B,dot,.,comma,%2C',
- 'X{.keys*}' : 'X.semi=%3B.dot=..comma=%2C',
- 'X{.empty_keys}' : 'X',
- 'X{.empty_keys*}' : 'X'
- },
- 'Path Segment Expansion' : {
- '{/who}' : '/fred',
- '{/who,who}' : '/fred/fred',
- '{/half,who}' : '/50%25/fred',
- '{/who,dub}' : '/fred/me%2Ftoo',
- '{/var}' : '/value',
- '{/var,empty}' : '/value/',
- '{/var,undef}' : '/value',
- '{/var,x}/here' : '/value/1024/here',
- '{/var:1,var}' : '/v/value',
- '{/list}' : '/red,green,blue',
- '{/list*}' : '/red/green/blue',
- '{/list*,path:4}' : '/red/green/blue/%2Ffoo',
- '{/keys}' : '/semi,%3B,dot,.,comma,%2C',
- '{/keys*}' : '/semi=%3B/dot=./comma=%2C'
- },
- 'Path-Style Parameter Expansion' : {
- '{;who}' : ';who=fred',
- '{;half}' : ';half=50%25',
- '{;empty}' : ';empty',
- '{;v,empty,who}' : ';v=6;empty;who=fred',
- '{;v,bar,who}' : ';v=6;who=fred',
- '{;x,y}' : ';x=1024;y=768',
- '{;x,y,empty}' : ';x=1024;y=768;empty',
- '{;x,y,undef}' : ';x=1024;y=768',
- '{;hello:5}' : ';hello=Hello',
- '{;list}' : ';list=red,green,blue',
- '{;list*}' : ';list=red;list=green;list=blue',
- '{;keys}' : ';keys=semi,%3B,dot,.,comma,%2C',
- '{;keys*}' : ';semi=%3B;dot=.;comma=%2C'
- },
- 'Form-Style Query Expansion' : {
- '{?who}' : '?who=fred',
- '{?half}' : '?half=50%25',
- '{?x,y}' : '?x=1024&y=768',
- '{?x,y,empty}' : '?x=1024&y=768&empty=',
- '{?x,y,undef}' : '?x=1024&y=768',
- '{?var:3}' : '?var=val',
- '{?list}' : '?list=red,green,blue',
- '{?list*}' : '?list=red&list=green&list=blue',
- '{?keys}' : '?keys=semi,%3B,dot,.,comma,%2C',
- '{?keys*}' : '?semi=%3B&dot=.&comma=%2C'
- },
- 'Form-Style Query Continuation' : {
- '{&who}' : '&who=fred',
- '{&half}' : '&half=50%25',
- '?fixed=yes{&x}' : '?fixed=yes&x=1024',
- '{&x,y,empty}' : '&x=1024&y=768&empty=',
- '{&x,y,undef}' : '&x=1024&y=768',
- '{&var:3}' : '&var=val',
- '{&list}' : '&list=red,green,blue',
- '{&list*}' : '&list=red&list=green&list=blue',
- '{&keys}' : '&keys=semi,%3B,dot,.,comma,%2C',
- '{&keys*}' : '&semi=%3B&dot=.&comma=%2C'
- }
- },
- values : {
- 'count' : ['one', 'two', 'three'],
- 'dom' : ['example', 'com'],
- 'dub' : 'me/too',
- 'hello' : 'Hello World!',
- 'half' : '50%',
- 'var' : 'value',
- 'who' : 'fred',
- 'base' : 'http://example.com/home/',
- 'path' : '/foo/bar',
- 'list' : ['red', 'green', 'blue'],
- 'keys' : {
- 'semi' : ';',
- 'dot' : '.',
- 'comma' : ','
- },
- 'v' : '6',
- 'x' : '1024',
- 'y' : '768',
- 'empty' : '',
- 'empty_keys' : [],
- 'undef' : null
- }
- }
- };
-
- module('URITemplate');
- // [].forEach() no IE, lacking interest in polyfilling this...
- for (var i in levels) {
- (function(level, data){
- test(level, function() {
- var combined_expression = '',
- combined_expansion = '',
- template, expression, expansion;
-
- for (var type in data.expressions) {
- for (expression in data.expressions[type]) {
- combined_expression += '/' + expression;
- combined_expansion += '/' + data.expressions[type][expression];
-
- template = new URITemplate(expression);
- expansion = template.expand(data.values);
- equal(expansion, data.expressions[type][expression], type + ': ' + expression);
- }
- }
-
- template = new URITemplate(combined_expression);
- expansion = template.expand(data.values);
- equal(expansion, combined_expansion, type + ': combined');
- });
- })(i, levels[i]);
- }
- test('Data Callbacks', function() {
- var template = new URITemplate('{var}');
- var global = function(key) {
- var data = {'var': 'hello world.html'};
- return data[key];
- };
- var local = function() {
- return 'hello world.html';
- };
-
- equal(template.expand(global), 'hello%20world.html', 'global callback');
- equal(template.expand({'var': local}), 'hello%20world.html', 'local callback');
- });
-
- test('Parse errors', function() {
- raises(function() {
- URITemplate('AB{var$}IJ').parse();
- }, Error, 'Failing invalid variable name');
-
- raises(function() {
- URITemplate('AB{$var}IJ').parse();
- }, Error, 'Failing invalid operator');
-
- raises(function() {
- URITemplate('AB{var:3IJ').parse();
- }, Error, 'Failing missing closing }');
-
- raises(function() {
- URITemplate('AB{var:3*}IJ').parse();
- }, Error, 'Failing invalid modifier');
- });
-
- test('Expansion errors', function() {
- raises(function() {
- var data = {'composite_var': ['multiple', 'values']};
- URITemplate('{composite_var:3}').expand(data);
- }, Error, 'Failing prefix modifier after composite variable');
- });
-
- test('noConflict mode', function() {
- var actual_lib = URITemplate; // actual library; after loading, before noConflict()
- var unconflicted = URITemplate.noConflict();
-
- strictEqual( unconflicted, actual_lib, 'noConflict() returns the URITemplate object' );
- strictEqual( URITemplate, URITemplate_pre_lib, 'noConflict() restores the `URITemplate` variable' );
-
- // restore for other tests
- window.URITemplate = actual_lib;
- });
-
- test('Periods in varnames', function() {
- var template = new URITemplate('{hello.world.var}');
- var literal = 'replacement';
- var data = {'hello.world.var': literal};
- var expansion = template.expand(data);
- equal(expansion, literal, 'period in varname');
- });
-
- test('Invalid literals', function () {
- raises(function() {
- URITemplate('invalid.char}acter').parse();
- }, Error, 'Failing invalid literal');
- });
-
-})();
diff --git a/thirdparty/URI.js/test/urls.js b/thirdparty/URI.js/test/urls.js
deleted file mode 100644
index b38337ec0..000000000
--- a/thirdparty/URI.js/test/urls.js
+++ /dev/null
@@ -1,1892 +0,0 @@
-/*jshint unused:false, scripturl:true */
-var urls = [{
- name: 'scheme and domain',
- url: 'http://www.example.org',
- _url: 'http://www.example.org/',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'www.example.org',
- port: null,
- path: '/',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/',
- query: '',
- fragment: '',
- resource: '/',
- authority: 'www.example.org',
- origin: 'http://www.example.org',
- userinfo: '',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/',
- filename: '',
- suffix: '',
- hash: '', // location.hash style
- search: '', // location.search style
- host: 'www.example.org',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'second level domain',
- url: 'http://www.example.co.uk',
- _url: 'http://www.example.co.uk/',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'www.example.co.uk',
- port: null,
- path: '/',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/',
- query: '',
- fragment: '',
- resource: '/',
- authority: 'www.example.co.uk',
- origin: 'http://www.example.co.uk',
- userinfo: '',
- subdomain: 'www',
- domain: 'example.co.uk',
- tld: 'co.uk',
- directory: '/',
- filename: '',
- suffix: '',
- hash: '', // location.hash style
- search: '', // location.search style
- host: 'www.example.co.uk',
- hostname: 'www.example.co.uk'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: true,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- },{
- name: 'qualified HTTP',
- url: 'http://www.example.org/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'www.example.org',
- port: null,
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: 'www.example.org',
- origin: 'http://www.example.org',
- userinfo: '',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: 'www.example.org',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'funky suffix',
- url: 'http://www.example.org/some/directory/file.html-is-awesome?query=string#fragment',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'www.example.org',
- port: null,
- path: '/some/directory/file.html-is-awesome',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/some/directory/file.html-is-awesome',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html-is-awesome?query=string#fragment',
- authority: 'www.example.org',
- origin: 'http://www.example.org',
- userinfo: '',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/some/directory',
- filename: 'file.html-is-awesome',
- suffix: '',
- hash: '#fragment',
- search: '?query=string',
- host: 'www.example.org',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'complete URL',
- url: 'scheme://user:pass@www.example.org:123/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'scheme',
- username: 'user',
- password: 'pass',
- hostname: 'www.example.org',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'scheme',
- username: 'user',
- password: 'pass',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: 'user:pass@www.example.org:123',
- origin: 'scheme://user:pass@www.example.org:123',
- userinfo: 'user:pass',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: 'www.example.org:123',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'badly encoded userinfo',
- url: 'scheme://user:pass:word@www.example.org/',
- _url: 'scheme://user:pass%3Aword@www.example.org/',
- parts: {
- protocol: 'scheme',
- username: 'user',
- password: 'pass:word',
- hostname: 'www.example.org',
- port: null,
- path: '/',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'scheme',
- username: 'user',
- password: 'pass:word',
- port: '',
- path: '/',
- query: '',
- fragment: '',
- resource: '/',
- authority: 'user:pass%3Aword@www.example.org',
- origin: 'scheme://user:pass%3Aword@www.example.org',
- userinfo: 'user:pass%3Aword',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/',
- filename: '',
- suffix: '',
- hash: '',
- search: '',
- host: 'www.example.org',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'empty username with non-empty password',
- url: 'scheme://:password@www.example.org/',
- _url: 'scheme://:password@www.example.org/',
- parts: {
- protocol: 'scheme',
- username: null,
- password: 'password',
- hostname: 'www.example.org',
- port: null,
- path: '/',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'scheme',
- username: '',
- password: 'password',
- port: '',
- path: '/',
- query: '',
- fragment: '',
- resource: '/',
- authority: ':password@www.example.org',
- origin: 'scheme://:password@www.example.org',
- userinfo: ':password',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/',
- filename: '',
- suffix: '',
- hash: '',
- search: '',
- host: 'www.example.org',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'malformed email in userinfo',
- url: 'scheme://john@doe.com:pass:word@www.example.org/',
- _url: 'scheme://john%40doe.com:pass%3Aword@www.example.org/',
- parts: {
- protocol: 'scheme',
- username: 'john@doe.com',
- password: 'pass:word',
- hostname: 'www.example.org',
- port: null,
- path: '/',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'scheme',
- username: 'john@doe.com',
- password: 'pass:word',
- port: '',
- path: '/',
- query: '',
- fragment: '',
- resource: '/',
- authority: 'john%40doe.com:pass%3Aword@www.example.org',
- origin: 'scheme://john%40doe.com:pass%3Aword@www.example.org',
- userinfo: 'john%40doe.com:pass%3Aword',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/',
- filename: '',
- suffix: '',
- hash: '',
- search: '',
- host: 'www.example.org',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'host-relative: URL',
- url: '/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: null,
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: '',
- username: '',
- password: '',
- port: '',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: '',
- hostname: ''
- },
- is: {
- urn: false,
- url: true,
- relative: true,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'path-relative: URL',
- url: '../some/directory/file.html?query=string#fragment',
- parts: {
- protocol: null,
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: '../some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: '',
- username: '',
- password: '',
- port: '',
- path: '../some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '../some/directory/file.html?query=string#fragment',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '../some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: '',
- hostname: ''
- },
- is: {
- urn: false,
- url: true,
- relative: true,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'missing scheme',
- url: 'user:pass@www.example.org:123/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'user',
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: 'pass@www.example.org:123/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'user',
- username: '',
- password: '',
- port: '',
- path: 'pass@www.example.org:123/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: 'pass@www.example.org:123/some/directory/file.html?query=string#fragment',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '',
- filename: '',
- suffix: '',
- hash: '#fragment',
- search: '?query=string',
- host: '',
- hostname: ''
- },
- is: {
- urn: true,
- url: false,
- relative: false,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'ignoring scheme',
- url: '://user:pass@example.org:123/some/directory/file.html?query=string#fragment',
- _url: '//user:pass@example.org:123/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: null,
- username: 'user',
- password: 'pass',
- hostname: 'example.org',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: '',
- username: 'user',
- password: 'pass',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: 'user:pass@example.org:123',
- origin: 'user:pass@example.org:123',
- userinfo: 'user:pass',
- subdomain: '',
- domain: 'example.org',
- tld: 'org',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: 'example.org:123',
- hostname: 'example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'scheme-relative URL',
- url: '//www.example.org/',
- parts: {
- protocol: null,
- username: null,
- password: null,
- hostname: 'www.example.org',
- port: null,
- path: '/',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: '',
- username: '',
- password: '',
- port: '',
- path: '/',
- query: '',
- fragment: '',
- resource: '/',
- authority: 'www.example.org',
- origin: 'www.example.org',
- userinfo: '',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/',
- filename: '',
- suffix: '',
- hash: '',
- search: '',
- host: 'www.example.org',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv4',
- url: 'http://user:pass@123.123.123.123:123/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- hostname: '123.123.123.123',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: 'user:pass@123.123.123.123:123',
- origin: 'http://user:pass@123.123.123.123:123',
- userinfo: 'user:pass',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: '123.123.123.123:123',
- hostname: '123.123.123.123'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: true,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6',
- url: 'http://user:pass@fe80:0000:0000:0000:0204:61ff:fe9d:f156/some/directory/file.html?query=string#fragment',
- _url: 'http://user:pass@[fe80:0000:0000:0000:0204:61ff:fe9d:f156]/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- hostname: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156',
- port: null,
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- port: '',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: 'user:pass@[fe80:0000:0000:0000:0204:61ff:fe9d:f156]',
- origin: 'http://user:pass@[fe80:0000:0000:0000:0204:61ff:fe9d:f156]',
- userinfo: 'user:pass',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: '[fe80:0000:0000:0000:0204:61ff:fe9d:f156]',
- hostname: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6 with port',
- url: 'http://user:pass@[fe80:0000:0000:0000:0204:61ff:fe9d:f156]:123/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- hostname: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: 'user:pass@[fe80:0000:0000:0000:0204:61ff:fe9d:f156]:123',
- origin: 'http://user:pass@[fe80:0000:0000:0000:0204:61ff:fe9d:f156]:123',
- userinfo: 'user:pass',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: '[fe80:0000:0000:0000:0204:61ff:fe9d:f156]:123',
- hostname: 'fe80:0000:0000:0000:0204:61ff:fe9d:f156'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6 brackets, port, file.ext',
- url: 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210',
- port: '80',
- path: '/index.html',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '80',
- path: '/index.html',
- query: '',
- fragment: '',
- resource: '/index.html',
- authority: '[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80',
- origin: 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/',
- filename: 'index.html',
- suffix: 'html',
- hash: '',
- search: '',
- host: '[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80',
- hostname: 'FEDC:BA98:7654:3210:FEDC:BA98:7654:3210'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6 brackets, file.ext',
- url: 'http://[1080:0:0:0:8:800:200C:417A]/index.html',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: '1080:0:0:0:8:800:200C:417A',
- port: null,
- path: '/index.html',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/index.html',
- query: '',
- fragment: '',
- resource: '/index.html',
- authority: '[1080:0:0:0:8:800:200C:417A]',
- origin: 'http://[1080:0:0:0:8:800:200C:417A]',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/',
- filename: 'index.html',
- suffix: 'html',
- hash: '',
- search: '',
- host: '[1080:0:0:0:8:800:200C:417A]',
- hostname: '1080:0:0:0:8:800:200C:417A'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6 brackets ::1',
- url: 'http://[3ffe:2a00:100:7031::1]',
- _url: 'http://[3ffe:2a00:100:7031::1]/',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: '3ffe:2a00:100:7031::1',
- port: null,
- path: '/',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/',
- query: '',
- fragment: '',
- resource: '/',
- authority: '[3ffe:2a00:100:7031::1]',
- origin: 'http://[3ffe:2a00:100:7031::1]',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/',
- filename: '',
- suffix: '',
- hash: '',
- search: '',
- host: '[3ffe:2a00:100:7031::1]',
- hostname: '3ffe:2a00:100:7031::1'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6 brackets, file',
- url: 'http://[1080::8:800:200C:417A]/foo',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: '1080::8:800:200C:417A',
- port: null,
- path: '/foo',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/foo',
- query: '',
- fragment: '',
- resource: '/foo',
- authority: '[1080::8:800:200C:417A]',
- origin: 'http://[1080::8:800:200C:417A]',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/',
- filename: 'foo',
- suffix: '',
- hash: '',
- search: '',
- host: '[1080::8:800:200C:417A]',
- hostname: '1080::8:800:200C:417A'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6 IPv4 brackets, path',
- url: 'http://[::192.9.5.5]/ipng',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: '::192.9.5.5',
- port: null,
- path: '/ipng',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/ipng',
- query: '',
- fragment: '',
- resource: '/ipng',
- authority: '[::192.9.5.5]',
- origin: 'http://[::192.9.5.5]',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/',
- filename: 'ipng',
- suffix: '',
- hash: '',
- search: '',
- host: '[::192.9.5.5]',
- hostname: '::192.9.5.5'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6 mask IPv4 brackets, port, file.ext',
- url: 'http://[::FFFF:129.144.52.38]:80/index.html',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: '::FFFF:129.144.52.38',
- port: '80',
- path: '/index.html',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '80',
- path: '/index.html',
- query: '',
- fragment: '',
- resource: '/index.html',
- authority: '[::FFFF:129.144.52.38]:80',
- origin: 'http://[::FFFF:129.144.52.38]:80',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/',
- filename: 'index.html',
- suffix: 'html',
- hash: '',
- search: '',
- host: '[::FFFF:129.144.52.38]:80',
- hostname: '::FFFF:129.144.52.38'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IPv6 brackets',
- url: 'http://[2010:836B:4179::836B:4179]',
- _url: 'http://[2010:836B:4179::836B:4179]/',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: '2010:836B:4179::836B:4179',
- port: null,
- path: '/',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/',
- query: '',
- fragment: '',
- resource: '/',
- authority: '[2010:836B:4179::836B:4179]',
- origin: 'http://[2010:836B:4179::836B:4179]',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/',
- filename: '',
- suffix: '',
- hash: '',
- search: '',
- host: '[2010:836B:4179::836B:4179]',
- hostname: '2010:836B:4179::836B:4179'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: false,
- sld: false,
- ip: true,
- ip4: false,
- ip6: true,
- idn: false,
- punycode: false
- }
- }, {
- name: 'IDN (punycode)',
- url: 'http://user:pass@xn--exmple-cua.org:123/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- hostname: 'xn--exmple-cua.org',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: 'user:pass@xn--exmple-cua.org:123',
- origin: 'http://user:pass@xn--exmple-cua.org:123',
- userinfo: 'user:pass',
- subdomain: '',
- domain: 'xn--exmple-cua.org',
- tld: 'org',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: 'xn--exmple-cua.org:123',
- hostname: 'xn--exmple-cua.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: true
- }
- }, {
- name: 'IDN',
- url: 'http://user:pass@exämple.org:123/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- hostname: 'exämple.org',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'http',
- username: 'user',
- password: 'pass',
- port: '123',
- path: '/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/some/directory/file.html?query=string#fragment',
- authority: 'user:pass@exämple.org:123',
- origin: 'http://user:pass@exämple.org:123',
- userinfo: 'user:pass',
- subdomain: '',
- domain: 'exämple.org',
- tld: 'org',
- directory: '/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: 'exämple.org:123',
- hostname: 'exämple.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: true,
- punycode: false
- }
- }, {
- name: 'file://',
- url: 'file:///foo/bar/baz.html',
- parts: {
- protocol: 'file',
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: '/foo/bar/baz.html',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'file',
- username: '',
- password: '',
- port: '',
- path: '/foo/bar/baz.html',
- query: '',
- fragment: '',
- resource: '/foo/bar/baz.html',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/foo/bar',
- filename: 'baz.html',
- suffix: 'html',
- hash: '',
- search: '',
- host: '',
- hostname: ''
- },
- is: {
- urn: false,
- url: true,
- relative: true,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'file://example.org:123',
- url: 'file://example.org:123/foo/bar/baz.html',
- parts: {
- protocol: 'file',
- username: null,
- password: null,
- hostname: 'example.org',
- port: '123',
- path: '/foo/bar/baz.html',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'file',
- username: '',
- password: '',
- port: '123',
- path: '/foo/bar/baz.html',
- query: '',
- fragment: '',
- resource: '/foo/bar/baz.html',
- authority: 'example.org:123',
- origin: 'file://example.org:123',
- userinfo: '',
- subdomain: '',
- domain: 'example.org',
- tld: 'org',
- directory: '/foo/bar',
- filename: 'baz.html',
- suffix: 'html',
- hash: '',
- search: '',
- host: 'example.org:123',
- hostname: 'example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'file:// Windows-Drive-Letter',
- url: 'file:///C:/WINDOWS/foo.txt',
- parts: {
- protocol: 'file',
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: '/C:/WINDOWS/foo.txt',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'file',
- username: '',
- password: '',
- port: '',
- path: '/C:/WINDOWS/foo.txt',
- query: '',
- fragment: '',
- resource: '/C:/WINDOWS/foo.txt',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/C:/WINDOWS',
- filename: 'foo.txt',
- suffix: 'txt',
- hash: '',
- search: '',
- host: '',
- hostname: ''
- },
- is: {
- urn: false,
- url: true,
- relative: true,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'file://example.org/ Windows-Drive-Letter',
- url: 'file://example.org/C:/WINDOWS/foo.txt',
- parts: {
- protocol: 'file',
- username: null,
- password: null,
- hostname: 'example.org',
- port: null,
- path: '/C:/WINDOWS/foo.txt',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'file',
- username: '',
- password: '',
- port: '',
- path: '/C:/WINDOWS/foo.txt',
- query: '',
- fragment: '',
- resource: '/C:/WINDOWS/foo.txt',
- authority: 'example.org',
- origin: 'file://example.org',
- userinfo: '',
- subdomain: '',
- domain: 'example.org',
- tld: 'org',
- directory: '/C:/WINDOWS',
- filename: 'foo.txt',
- suffix: 'txt',
- hash: '',
- search: '',
- host: 'example.org',
- hostname: 'example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'file://localhost/ Windows-Drive-Letter with pipe',
- url: 'file://localhost/C|/WINDOWS/foo.txt',
- parts: {
- protocol: 'file',
- username: null,
- password: null,
- hostname: 'localhost',
- port: null,
- path: '/C|/WINDOWS/foo.txt',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'file',
- username: '',
- password: '',
- port: '',
- path: '/C|/WINDOWS/foo.txt',
- query: '',
- fragment: '',
- resource: '/C|/WINDOWS/foo.txt',
- authority: 'localhost',
- origin: 'file://localhost',
- userinfo: '',
- subdomain: '',
- domain: 'localhost',
- tld: 'localhost',
- directory: '/C|/WINDOWS',
- filename: 'foo.txt',
- suffix: 'txt',
- hash: '',
- search: '',
- host: 'localhost',
- hostname: 'localhost'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'Path containing @',
- url: 'http://www.example.org/@foobar',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'www.example.org',
- port: null,
- path: '/@foobar',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/@foobar',
- query: '',
- fragment: '',
- resource: '/@foobar',
- authority: 'www.example.org',
- origin: 'http://www.example.org',
- userinfo: '',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/',
- filename: '@foobar',
- suffix: '',
- hash: '', // location.hash style
- search: '', // location.search style
- host: 'www.example.org',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'mailto:',
- url: 'mailto:hello@example.org?subject=hello',
- _url: 'mailto:hello@example.org?subject=hello',
- parts: {
- protocol: 'mailto',
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: 'hello@example.org',
- query: 'subject=hello',
- fragment: null
- },
- accessors: {
- protocol: 'mailto',
- username: '',
- password: '',
- port: '',
- path: 'hello@example.org',
- query: 'subject=hello',
- fragment: '',
- resource: 'hello@example.org?subject=hello',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '',
- filename: '',
- suffix: '',
- hash: '',
- search: '?subject=hello',
- host: '',
- hostname: ''
- },
- is: {
- urn: true,
- url: false,
- relative: false,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'magnet:',
- url: 'magnet:?xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
- _url: 'magnet:?xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
- parts: {
- protocol: 'magnet',
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: '',
- query: 'xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
- fragment: null
- },
- accessors: {
- protocol: 'magnet',
- username: '',
- password: '',
- port: '',
- path: '',
- query: 'xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
- fragment: '',
- resource: '?xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '',
- filename: '',
- suffix: '',
- hash: '',
- search: '?xt=urn:btih:f8c020dac7a083defda1769a1196a13facc38ef6&dn=Linux+64x+server+11.10+Pt+Pt&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80',
- host: '',
- hostname: ''
- },
- is: {
- urn: true,
- url: false,
- relative: false,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'javascript:',
- url: 'javascript:alert("hello world");',
- _url: 'javascript:alert("hello world");',
- parts: {
- protocol: 'javascript',
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: 'alert("hello world");',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'javascript',
- username: '',
- password: '',
- port: '',
- path: 'alert("hello world");',
- query: '',
- fragment: '',
- resource: 'alert("hello world");',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '',
- filename: '',
- suffix: '',
- hash: '',
- search: '',
- host: '',
- hostname: ''
- },
- is: {
- urn: true,
- url: false,
- relative: false,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'colon in path',
- url: 'http://en.wikipedia.org/wiki/Help:IPA',
- _url: 'http://en.wikipedia.org/wiki/Help:IPA',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'en.wikipedia.org',
- port: null,
- path: '/wiki/Help:IPA',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/wiki/Help:IPA',
- query: '',
- fragment: '',
- resource: '/wiki/Help:IPA',
- authority: 'en.wikipedia.org',
- origin: 'http://en.wikipedia.org',
- userinfo: '',
- subdomain: 'en',
- domain: 'wikipedia.org',
- tld: 'org',
- directory: '/wiki',
- filename: 'Help:IPA',
- suffix: '',
- hash: '',
- search: '',
- host: 'en.wikipedia.org',
- hostname: 'en.wikipedia.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'colon in path without protocol',
- url: '/wiki/Help:IPA',
- _url: '/wiki/Help:IPA',
- parts: {
- protocol: null,
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: '/wiki/Help:IPA',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: '',
- username: '',
- password: '',
- port: '',
- path: '/wiki/Help:IPA',
- query: '',
- fragment: '',
- resource: '/wiki/Help:IPA',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/wiki',
- filename: 'Help:IPA',
- suffix: '',
- hash: '',
- search: '',
- host: '',
- hostname: ''
- },
- is: {
- urn: false,
- url: true,
- relative: true,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'colon dash dash in path without protocol',
- url: '/foo/xy://bar',
- _url: '/foo/xy://bar',
- parts: {
- protocol: null,
- username: null,
- password: null,
- hostname: null,
- port: null,
- path: '/foo/xy://bar',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: '',
- username: '',
- password: '',
- port: '',
- path: '/foo/xy://bar',
- query: '',
- fragment: '',
- resource: '/foo/xy://bar',
- authority: '',
- origin: '',
- userinfo: '',
- subdomain: '',
- domain: '',
- tld: '',
- directory: '/foo/xy:/', // sanitized empty directory!
- filename: 'bar',
- suffix: '',
- hash: '',
- search: '',
- host: '',
- hostname: ''
- },
- is: {
- urn: false,
- url: true,
- relative: true,
- name: false,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'colon in path',
- url: 'http://www.example.org:8080/hello:world',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'www.example.org',
- port: '8080',
- path: '/hello:world',
- query: null,
- fragment: null
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '8080',
- path: '/hello:world',
- query: '',
- fragment: '',
- resource: '/hello:world',
- authority: 'www.example.org:8080',
- origin: 'http://www.example.org:8080',
- userinfo: '',
- subdomain: 'www',
- domain: 'example.org',
- tld: 'org',
- directory: '/',
- filename: 'hello:world',
- suffix: '',
- hash: '', // location.hash style
- search: '', // location.search style
- host: 'www.example.org:8080',
- hostname: 'www.example.org'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }, {
- name: 'backslashes',
- url: 'http://i.xss.com\\www.example.org/some/directory/file.html?query=string#fragment',
- _url: 'http://i.xss.com/www.example.org/some/directory/file.html?query=string#fragment',
- parts: {
- protocol: 'http',
- username: null,
- password: null,
- hostname: 'i.xss.com',
- port: null,
- path: '/www.example.org/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment'
- },
- accessors: {
- protocol: 'http',
- username: '',
- password: '',
- port: '',
- path: '/www.example.org/some/directory/file.html',
- query: 'query=string',
- fragment: 'fragment',
- resource: '/www.example.org/some/directory/file.html?query=string#fragment',
- authority: 'i.xss.com',
- origin: 'http://i.xss.com',
- userinfo: '',
- subdomain: 'i',
- domain: 'xss.com',
- tld: 'com',
- directory: '/www.example.org/some/directory',
- filename: 'file.html',
- suffix: 'html',
- hash: '#fragment',
- search: '?query=string',
- host: 'i.xss.com',
- hostname: 'i.xss.com'
- },
- is: {
- urn: false,
- url: true,
- relative: false,
- name: true,
- sld: false,
- ip: false,
- ip4: false,
- ip6: false,
- idn: false,
- punycode: false
- }
- }
-];
-
diff --git a/thirdparty/URI.js/uri-template.html b/thirdparty/URI.js/uri-template.html
deleted file mode 100644
index d49065c9c..000000000
--- a/thirdparty/URI.js/uri-template.html
+++ /dev/null
@@ -1,234 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>URI.js - URI-Template</title>
- <meta name="description" content="URI.js is a Javascript library for working with URLs." />
-
- <script src="jquery-1.9.1.min.js" type="text/javascript"></script>
- <script src="prettify/prettify.js" type="text/javascript"></script>
- <script src="screen.js" type="text/javascript"></script>
- <link href="screen.css" rel="stylesheet" type="text/css" />
- <link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
- <script src="src/URI.min.js" type="text/javascript"></script>
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-8922143-3']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
- <style type="text/css">
- .tpl-operator {
- font-weight: bold;
- color: #669933;
- }
- .tpl-variable {
- font-weight: bold;
- color: #336699;
- }
- .tpl-modifier {
- font-weight: bold;
- color: #663399;
- }
-
- pre {
- padding: 10px;
- background: #EEE;
- }
-
- table {
- width: 100%;
- border: 1px solid #AAA;
- border-collapse: collapse;
- }
- td, th {
- border: 1px solid #AAA;
- text-align: left;
- padding: 3px;
- }
- th {
- background: #EEE;
- }
- </style>
-</head>
-<body>
- <a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
-
- <div id="container">
- <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
-
- <ul class="menu">
- <li><a href="/URI.js/">Intro</a></li>
- <li><a href="about-uris.html">Understanding URIs</a></li>
- <li><a href="docs.html">API-Documentation</a></li>
- <li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
- <li class="active"><a href="uri-template.html">URI Template</a></li>
- <li><a href="build.html">Build</a></li>
- <li><a href="http://rodneyrehm.de/en/">Author</a></li>
- </ul>
-
- <h2>URI Template</h2>
-
- <p>As of version 1.7.0 URI.js includes an implementation of URI Templates, as specified in <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a> (Level 4, March 2012).</p>
-
-
- <h2>Using URI Templates</h2>
-
- <pre class="prettyprint lang-js">
-// creating a new URI Template
-var template = new URITemplate("http://example.org/{file}");
-var result = template.expand({file: "hello world.html"});
-result === "http://example.org/hello%20world.html";
-
-// of course you can call the constructor like a function and chain things:
-result = URITemplate("http://example.org/{file}")
- .expand({file: "hello world.html"});
-result === "http://example.org/hello%20world.html";
-
-// access via URI
-result = URI.expand("http://example.org/{file}", {file: "hello world.html"});
-// result == new URI("http://example.org/hello%20world.html");
-
-// expand() accepts data-callbacks:
-template.expand(function(key) {
- var data = {file: "hello world.html"};
- return data[key];
-});
-
-// expand() accepts key-callbacks:
-template.expand({file : function(key) {
- return "hello world.html";
-}});
-</pre>
-
-
-
- <h2>URI Template Syntax</h2>
-
- <p><em>Expressions</em> are placeholders which are to be substituted by the values their variables reference.</p>
- <ul>
- <li><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/</code></li>
- <li><code>http://example.org/dictionary/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong></code></li>
- <li><code>http://example.org/search<strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></li>
- </ul>
- <p>
- An expression consists of an <span class="tpl-operator">operator</span> and a (comma-separated) list of <em>variable-specifications</em>.
- A variable-specification consists of a <em class="tpl-variable">variable</em> and an optional <em class="tpl-modifier">modifier</em>.
- </p>
-
- <hr>
- <p>Given the template</p>
- <pre><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong><strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></pre>
- <p>and the following data: </p>
- <pre><code>{username: "rodneyrehm", term: "hello world", q: {a: "mars", b: "jupiter"}, lang: "en"}</code></pre>
- <p>the expansion looks as follows:
- <pre><code>"http://example.org/~rodneyrehm/h/hello%20world?a=mars&amp;b=jupiter&amp;lang=en"</code></pre>
- <hr>
-
- <p>List of supported <span class="tpl-operator">operators</span>:</p>
- <table>
- <tr><th>Operator</th><th>Description</th></tr>
- <tr><td><code><em>None</em></code></td><td>Simple String Expansion;</td></tr>
- <tr><td><code>+</code></td><td>Reserved character strings;</td></tr>
- <tr><td><code>#</code></td><td>Fragment identifiers prefixed by "#";</td></tr>
- <tr><td><code>.</code></td><td>Name labels or extensions prefixed by ".";</td></tr>
- <tr><td><code>/</code></td><td>Path segments prefixed by "/";</td></tr>
- <tr><td><code>;</code></td><td>Path parameter name or name=value pairs prefixed by ";";</td></tr>
- <tr><td><code>?</code></td><td>Query component beginning with "?" and consisting of name=value pairs separated by "&amp;"; and,</td></tr>
- <tr><td><code>&amp;</code></td><td>Continuation of query-style &amp;name=value pairs within a literal query component.</td></tr>
- </table>
-
- <p>List of supported <span class="tpl-modifier">modifiers</span>:</p>
- <table>
- <tr><th>Modifier</th><th>Description</th></tr>
- <tr><td><code><em>None</em></code></td><td>No modification, arrays and objects are joined with ","</td></tr>
- <tr><td><code>*</code></td><td>Explode arrays and objects (see tables below)</td></tr>
- <tr><td><code>:3</code></td><td>Substring of the first 3 characters of the variable's value</td></tr>
- </table>
-
- <h3>Strings and Numbers</h3>
- <p>
- Given <code>{"var": "hello[world]"}</code>, the expression <code>{var}</code> expands to <code>hello%5Bworld%5D</code>.
- The following table shows an output matrix for every possible operator/modifier combination produced for <code>string</code> input.
- </p>
- <table>
- <tr><th></th><th colspan="3">Modifier</th></tr>
- <tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
- <tr><td><code><em>None</em></code></td><td><code>hello%5Bworld%5D</code></td><td><code>hello%5Bworld%5D</code></td><td><code>he</code></td></tr>
- <tr><td><code><em>+</em></code></td><td><code>hello[world]</code></td><td><code>hello[world]</code></td><td><code>he</code></td></tr>
- <tr><td><code>#</code></td><td><code>#hello[world]</code></td><td><code>#hello[world]</code></td><td><code>#he</code></td></tr>
- <tr><td><code>.</code></td><td><code>.hello%5Bworld%5D</code></td><td><code>.hello%5Bworld%5D</code></td><td><code>.he</code></td></tr>
- <tr><td><code>/</code></td><td><code>/hello%5Bworld%5D</code></td><td><code>/hello%5Bworld%5D</code></td><td><code>/he</code></td></tr>
- <tr><td><code>;</code></td><td><code>;var=hello%5Bworld%5D</code></td><td><code>;var=hello%5Bworld%5D</code></td><td><code>;var=he</code></td></tr>
- <tr><td><code>?</code></td><td><code>?var=hello%5Bworld%5D</code></td><td><code>?var=hello%5Bworld%5D</code></td><td><code>?var=he</code></td></tr>
- <tr><td><code>&amp;</code></td><td><code>&amp;var=hello%5Bworld%5D</code></td><td><code>&amp;var=hello%5Bworld%5D</code></td><td><code>&amp;var=he</code></td></tr>
- </table>
-
-
- <h3>Arrays</h3>
- <p>
- Given <code>{"var": ["one", "two", "three"]}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
- The following table shows an output matrix for every possible operator/modifier combination produced for <code>array</code> input.
- </p>
- <table>
- <tr><th></th><th colspan="3">Modifier</th></tr>
- <tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
- <tr><td><code><em>None</em></code></td><td><code>one,two,three</code></td><td><code>one,two,three</code></td><td><code>on,tw,th</code></td></tr>
- <tr><td><code><em>+</em></code></td><td><code>one,two,three</code></td><td><code>one,two,three</code></td><td><code>on,tw,th</code></td></tr>
- <tr><td><code>#</code></td><td><code>#one,two,three</code></td><td><code>#one,two,three</code></td><td><code>#on,tw,th</code></td></tr>
- <tr><td><code>.</code></td><td><code>.one,two,three</code></td><td><code>.one.two.three</code></td><td><code>.on,tw,th</code></td></tr>
- <tr><td><code>/</code></td><td><code>/one,two,three</code></td><td><code>/one/two/three</code></td><td><code>/on,tw,th</code></td></tr>
- <tr><td><code>;</code></td><td><code>;var=one,two,three</code></td><td><code>;var=one;var=two;var=three</code></td><td><code>;var=on,tw,th</code></td></tr>
- <tr><td><code>?</code></td><td><code>?var=one,two,three</code></td><td><code>?var=one&amp;var=two&amp;var=three</code></td><td><code>?var=on,tw,th</code></td></tr>
- <tr><td><code>&amp;</code></td><td><code>&amp;var=one,two,three</code></td><td><code>&amp;var=one&amp;var=two&amp;var=three</code></td><td><code>&amp;var=on,tw,th</code></td></tr>
- </table>
-
- <h3>Objects ("plain objects" / "hash maps")</h3>
- <p>
- Given <code>{"var": {"one": "alpha", "two": "bravo"}}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
- The following table shows an output matrix for every possible operator/modifier combination produced for <code>object</code> input.
- </p>
- <table>
- <tr><th></th><th colspan="3">Modifier</th></tr>
- <tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
- <tr><td><code><em>None</em></code></td><td><code>one,alpha,two,bravo</code></td><td><code>one=alpha,two=bravo</code></td><td><code>on,al,tw,br</code></td></tr>
- <tr><td><code><em>+</em></code></td><td><code>one,alpha,two,bravo</code></td><td><code>one=alpha,two=bravo</code></td><td><code>on,al,tw,br</code></td></tr>
- <tr><td><code>#</code></td><td><code>#one,alpha,two,bravo</code></td><td><code>#one=alpha,two=bravo</code></td><td><code>#on,al,tw,br</code></td></tr>
- <tr><td><code>.</code></td><td><code>.one,alpha,two,bravo</code></td><td><code>.one=alpha.two=bravo</code></td><td><code>.on,al,tw,br</code></td></tr>
- <tr><td><code>/</code></td><td><code>/one,alpha,two,bravo</code></td><td><code>/one=alpha/two=bravo</code></td><td><code>/on,al,tw,br</code></td></tr>
- <tr><td><code>;</code></td><td><code>;var=one,alpha,two,bravo</code></td><td><code>;one=alpha;two=bravo</code></td><td><code>;var=on,al,tw,br</code></td></tr>
- <tr><td><code>?</code></td><td><code>?var=one,alpha,two,bravo</code></td><td><code>?one=alpha&amp;two=bravo</code></td><td><code>?var=on,al,tw,br</code></td></tr>
- <tr><td><code>&amp;</code></td><td><code>&amp;var=one,alpha,two,bravo</code></td><td><code>&amp;one=alpha&amp;two=bravo</code></td><td><code>&amp;var=on,al,tw,br</code></td></tr>
- </table>
-
-
-
- <h2>Limitations</h2>
- <p>URI Template is a <em>Proposed Standard</em> and because of that I did not want to deviate from it. That said I'm not at all happy with how the specification turned out. Here are some of my thoughts:</p>
- <ul>
- <li>The <em>explode modifier</em> works the wrong way. <code>{?some_object}</code> should lead to <code>?foo=bar&amp;hello=world</code>, as this is the common expansion</li>
- <li>The <em>prefix modifier</em> (which I would've named <em>truncate modifier</em>) only has an end-offset.
- The specification says it's »used to partition an identifier space hierarchically«. <code>abc</code> may become <code>a/bc</code> or <code>a/ab/abc</code>.
- But there is no way of modifying output to <code>a/b/c</code> or <code>a/b/abc</code>. Whenever I had to partition identifier spaces, I used one of the latter patterns.</li>
- <li>Operators like <code>.</code> automatically prefix the expansion. So <code>{"var": ["filename", "extension"]}</code> and <code>{.var*}</code> results in <code>.filename.extension</code> - obviously not what I wanted.</li>
- <li>Variable names (<em>varname</em>) may only contain <code>ALPHA / DIGIT / "_" / pct-encoded</code> and may not be decoded for resolving the reference. This simply feels weird, especially the "may not be decoded" part.</li>
- <li>Other possible modifiers could include some simple character-munging like <em>UPPERCASE</em>, <em>LOWERCASE</em>, <em>CAPITALCASE</em></li>
- <li><code>{/var,empty,empty}</code> results in <code>/foobar//</code> - clearly not what one intended</li>
- <li><code>{var}</code> and <code>{"var" : {"a": "1", "b": "2"}}</code> results in <code>a,1,b,2</code> - excusemewhat? I would've expected <code>a=1,b=2</code> or <code>a:1,b:2</code> (in a perverse parallel universe).</li>
- <li>Spaces in the <em>query string</em> should be encoded to <code>+</code>, not <code>%20</code> according to <a href="http://www.w3.org/TR/html401/interact/forms.html#form-content-type">application/x-www-form-urlencoded</a></li>
- </ul>
-
-
-
-
- </div>
-</body>
-</html> \ No newline at end of file
diff --git a/thirdparty/URI.js/utils/SLDs.php b/thirdparty/URI.js/utils/SLDs.php
deleted file mode 100644
index 3f451e764..000000000
--- a/thirdparty/URI.js/utils/SLDs.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-$map = array();
-
-// grab list of known SLDs from https://github.com/gavingmiller/second-level-domains
-// using curl since file_get_contents() won't do SSL...
-$url = 'https://raw.github.com/gavingmiller/second-level-domains/master/SLDs.csv';
-$curl = curl_init($url);
-curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
-curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
-curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
-curl_setopt($curl, CURLOPT_MAXREDIRS, 10);
-$source = curl_exec($curl);
-
-
-// $source is a CSV, but a rather simple one I wouldn't go through the hassle of using str_getcsv() for
-$source = preg_split("/\r\n|\r|\n/", $source);
-foreach ($source as $line) {
- $t = explode(',', $line);
- $tld = strtolower(substr($t[0], 1)); // skip the leading dot
- $sld = strtolower(substr($t[1], 1, strrpos($t[1], '.') - 1));
- if (!$tld || !$sld || strpos($sld, '.') !== false) {
- continue;
- }
-
- $map[$tld][] = $sld;
-}
-
-// source seems to be tainted with duplicates (and false SLDs like "govt.uk")
-// for now we don't care about false (or missing) SLDs
-foreach ($map as $tld => &$slds) {
- $slds = array_unique($slds);
- sort($slds);
- $slds = join('|', $slds);
-}
-
-echo json_encode($map); \ No newline at end of file
diff --git a/thirdparty/URI.js/utils/sld.js b/thirdparty/URI.js/utils/sld.js
deleted file mode 100644
index b0c95db06..000000000
--- a/thirdparty/URI.js/utils/sld.js
+++ /dev/null
@@ -1,101 +0,0 @@
-var fs = require('fs');
-var url = require('url');
-var http = require('http');
-var domains = {};
-
-/*
- Problem with PublicSuffix:
- The list not only contains TLDs/SLDs, but also domains like "dyndns.org".
- While this may be useful for Cookie-Origin-Policy, these domains are possibly
- being handled by URI.js, considering URI("//dyndns.org").tld("com").
- The list does not distinguish "official" TLDs from such domains.
- (At least I have problems with treating "cc.ga.us" as a SLD)
-*/
-
-http.get("http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1", function(res) {
- res.on('data', function(data) {
- data.toString().replace(/\r/g, "").split("\n").forEach(function(line) {
- // skip empty lines, comments and TLDs
- if (!line || (line[0] === "/" && line[1] === "/") || line.indexOf('.') === -1) {
- return;
- }
-
- var parts = line.split('.');
- var sld = parts.slice(0, -1).join('.');
- var tld = parts.slice(-1);
-
- if (parts.length < 2) {
- return;
- }
-
- if (!domains[tld]) {
- domains[tld] = [];
- }
-
- domains[tld].push(sld);
- });
- }).on('end', function() {
- //file.end();
- for (var tld in domains) {
- domains[tld].sort();
-
- // ! and * are sorted to the top
- if (domains[tld][0][0] == '!') {
- // we have wildcards and exclusions
- } else if (domains[tld][0][0] == '*') {
- // we have wildcards
- } else {
- // simple list
- }
- }
-
- console.log(JSON.stringify(domains, null, 2));
- //console.log(domains.jp);
- });
-});
-
-/*
-
-
-// https://github.com/oncletom/tld.js
-// generates a 430KB file, which is inacceptible for the web
-
-build a regex pattern from this -- http://publicsuffix.org/list/
-"!exclusion"
-"*" wildcard
-
-uk: [ '!bl',
- '!british-library',
- '!jet',
- '!mod',
- '!national-library-scotland',
- '!nel',
- '!nic',
- '!nls',
- '!parliament',
- '*',
- '*.nhs',
- '*.police',
- '*.sch',
- 'blogspot.co' ]
-
-jp: [ '!city.kawasaki',
- '!city.kitakyushu',
- '!city.kobe',
- '!city.nagoya',
- '!city.sapporo',
- '!city.sendai',
- '!city.yokohama',
- '*.kawasaki',
- '*.kitakyushu',
- '*.kobe',
- '*.nagoya',
- '*.sapporo',
- '*.sendai',
- '*.yokohama',
- 'abashiri.hokkaido',
- 'abeno.osaka',
- 'abiko.chiba',
- … ]
-
-*/
diff --git a/thirdparty/jed/.gitignore b/thirdparty/jed/.gitignore
deleted file mode 100644
index 8d87b1d26..000000000
--- a/thirdparty/jed/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/*
diff --git a/thirdparty/jed/.travis.yml b/thirdparty/jed/.travis.yml
deleted file mode 100644
index 7b5e9514e..000000000
--- a/thirdparty/jed/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - node
- - 4
diff --git a/thirdparty/jed/LICENSE b/thirdparty/jed/LICENSE
deleted file mode 100644
index 284f09cda..000000000
--- a/thirdparty/jed/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright jQuery Foundation and other contributors, https://jquery.org/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/thirdparty/jed/Makefile b/thirdparty/jed/Makefile
deleted file mode 100644
index 6e9858501..000000000
--- a/thirdparty/jed/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-REPORTER = dot
-
-test:
- @./node_modules/.bin/mocha \
- --require test/common \
- --reporter $(REPORTER) \
- --growl \
- test/tests.js
-
-test-browser:
- @./node_modules/.bin/serve .
-
-.PHONY: test
diff --git a/thirdparty/jed/README.md b/thirdparty/jed/README.md
deleted file mode 100644
index c7cb86e3d..000000000
--- a/thirdparty/jed/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-[![Build Status](https://secure.travis-ci.org/SlexAxton/Jed.png)](http://travis-ci.org/SlexAxton/Jed)
-
-# Jed
-
-*Gettext Style i18n for Modern JavaScript Apps*
-
-For more info, please visit the docs site at <http://slexaxton.github.com/Jed>.
-
-## You sure you don't want something more modern?
-
-Jed is feature complete in my opinion. I am happy to fix bugs, but generally am not interested in adding more to the library.
-
-I also maintain [messageformat.js](https://github.com/SlexAxton/messageformat.js). If you don't specifically need a gettext implementation, I might suggest using MessageFormat instead, as it has better support for plurals/gender and has built-in locale data.
-
-
-## Parsing Gettext Files
-
-Jed doesn't include a Gettext file parser, but several third-party parsers exist that can have their output adapted for Jed.
-
-#### Node
-
-Just search the npm repository, there are several PO and MO file parsers available.
-
-#### Browser
-
-[Jed Gettext Parser](https://github.com/WrinklyNinja/jed-gettext-parser) is the only known browser MO file parser, and it also works in Node, and outputs Jed-compatible data directly.
-
-[gettext.js](https://code.google.com/p/gettext-js) and [Pomo.js](https://github.com/cfv1984/pomo) both include browser-compatible PO file parsers.
-
-## Todo
-
-* Build time generation of plural form functions
-* Web interface for building translation sets
-* Code introspection for default values
-
-## License
-
-Jed is a member project of the [jQuery Foundation](https://jquery.org/)
-
-You may use this software under the MIT License.
-
-You may contribute to this software under the jQuery Foundation CLA - <https://contribute.jquery.org/CLA/>
-
-
-## Author
-
-* Alex Sexton - @slexaxton - <https://alexsexton.com/>
-
-
-## Credits
-
-A good chunk of sanity checking was done against the gettext.js tests. That was written by:
-
-* Joshua I. Miller
-
-The sprintf implementation is from:
-
-* Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
-
-
-## The name
-
-The name jed.js is an homage to Jed Schmidt (<https://github.com/jed>) the JavaScript community member who is a japanese translator by day, and a "hobbyist" JavaScript programmer by night. Give your kids three character names and they'll probably get software named after them too.
diff --git a/thirdparty/jed/jed.js b/thirdparty/jed/jed.js
deleted file mode 100644
index bda163bef..000000000
--- a/thirdparty/jed/jed.js
+++ /dev/null
@@ -1,1033 +0,0 @@
-/**
- * @preserve jed.js https://github.com/SlexAxton/Jed
- */
-/*
------------
-A gettext compatible i18n library for modern JavaScript Applications
-
-by Alex Sexton - AlexSexton [at] gmail - @SlexAxton
-
-MIT License
-
-A jQuery Foundation project - requires CLA to contribute -
-https://contribute.jquery.org/CLA/
-
-
-
-Jed offers the entire applicable GNU gettext spec'd set of
-functions, but also offers some nicer wrappers around them.
-The api for gettext was written for a language with no function
-overloading, so Jed allows a little more of that.
-
-Many thanks to Joshua I. Miller - unrtst@cpan.org - who wrote
-gettext.js back in 2008. I was able to vet a lot of my ideas
-against his. I also made sure Jed passed against his tests
-in order to offer easy upgrades -- jsgettext.berlios.de
-*/
-(function (root, undef) {
-
- // Set up some underscore-style functions, if you already have
- // underscore, feel free to delete this section, and use it
- // directly, however, the amount of functions used doesn't
- // warrant having underscore as a full dependency.
- // Underscore 1.3.0 was used to port and is licensed
- // under the MIT License by Jeremy Ashkenas.
- var ArrayProto = Array.prototype,
- ObjProto = Object.prototype,
- slice = ArrayProto.slice,
- hasOwnProp = ObjProto.hasOwnProperty,
- nativeForEach = ArrayProto.forEach,
- breaker = {};
-
- // We're not using the OOP style _ so we don't need the
- // extra level of indirection. This still means that you
- // sub out for real `_` though.
- var _ = {
- forEach : function( obj, iterator, context ) {
- var i, l, key;
- if ( obj === null ) {
- return;
- }
-
- if ( nativeForEach && obj.forEach === nativeForEach ) {
- obj.forEach( iterator, context );
- }
- else if ( obj.length === +obj.length ) {
- for ( i = 0, l = obj.length; i < l; i++ ) {
- if ( i in obj && iterator.call( context, obj[i], i, obj ) === breaker ) {
- return;
- }
- }
- }
- else {
- for ( key in obj) {
- if ( hasOwnProp.call( obj, key ) ) {
- if ( iterator.call (context, obj[key], key, obj ) === breaker ) {
- return;
- }
- }
- }
- }
- },
- extend : function( obj ) {
- this.forEach( slice.call( arguments, 1 ), function ( source ) {
- for ( var prop in source ) {
- obj[prop] = source[prop];
- }
- });
- return obj;
- }
- };
- // END Miniature underscore impl
-
- // Jed is a constructor function
- var Jed = function ( options ) {
- // Some minimal defaults
- this.defaults = {
- "locale_data" : {
- "messages" : {
- "" : {
- "domain" : "messages",
- "lang" : "en",
- "plural_forms" : "nplurals=2; plural=(n != 1);"
- }
- // There are no default keys, though
- }
- },
- // The default domain if one is missing
- "domain" : "messages",
- // enable debug mode to log untranslated strings to the console
- "debug" : false
- };
-
- // Mix in the sent options with the default options
- this.options = _.extend( {}, this.defaults, options );
- this.textdomain( this.options.domain );
-
- if ( options.domain && ! this.options.locale_data[ this.options.domain ] ) {
- throw new Error('Text domain set to non-existent domain: `' + options.domain + '`');
- }
- };
-
- // The gettext spec sets this character as the default
- // delimiter for context lookups.
- // e.g.: context\u0004key
- // If your translation company uses something different,
- // just change this at any time and it will use that instead.
- Jed.context_delimiter = String.fromCharCode( 4 );
-
- function getPluralFormFunc ( plural_form_string ) {
- return Jed.PF.compile( plural_form_string || "nplurals=2; plural=(n != 1);");
- }
-
- function Chain( key, i18n ){
- this._key = key;
- this._i18n = i18n;
- }
-
- // Create a chainable api for adding args prettily
- _.extend( Chain.prototype, {
- onDomain : function ( domain ) {
- this._domain = domain;
- return this;
- },
- withContext : function ( context ) {
- this._context = context;
- return this;
- },
- ifPlural : function ( num, pkey ) {
- this._val = num;
- this._pkey = pkey;
- return this;
- },
- fetch : function ( sArr ) {
- if ( {}.toString.call( sArr ) != '[object Array]' ) {
- sArr = [].slice.call(arguments, 0);
- }
- return ( sArr && sArr.length ? Jed.sprintf : function(x){ return x; } )(
- this._i18n.dcnpgettext(this._domain, this._context, this._key, this._pkey, this._val),
- sArr
- );
- }
- });
-
- // Add functions to the Jed prototype.
- // These will be the functions on the object that's returned
- // from creating a `new Jed()`
- // These seem redundant, but they gzip pretty well.
- _.extend( Jed.prototype, {
- // The sexier api start point
- translate : function ( key ) {
- return new Chain( key, this );
- },
-
- textdomain : function ( domain ) {
- if ( ! domain ) {
- return this._textdomain;
- }
- this._textdomain = domain;
- },
-
- gettext : function ( key ) {
- return this.dcnpgettext.call( this, undef, undef, key );
- },
-
- dgettext : function ( domain, key ) {
- return this.dcnpgettext.call( this, domain, undef, key );
- },
-
- dcgettext : function ( domain , key /*, category */ ) {
- // Ignores the category anyways
- return this.dcnpgettext.call( this, domain, undef, key );
- },
-
- ngettext : function ( skey, pkey, val ) {
- return this.dcnpgettext.call( this, undef, undef, skey, pkey, val );
- },
-
- dngettext : function ( domain, skey, pkey, val ) {
- return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );
- },
-
- dcngettext : function ( domain, skey, pkey, val/*, category */) {
- return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );
- },
-
- pgettext : function ( context, key ) {
- return this.dcnpgettext.call( this, undef, context, key );
- },
-
- dpgettext : function ( domain, context, key ) {
- return this.dcnpgettext.call( this, domain, context, key );
- },
-
- dcpgettext : function ( domain, context, key/*, category */) {
- return this.dcnpgettext.call( this, domain, context, key );
- },
-
- npgettext : function ( context, skey, pkey, val ) {
- return this.dcnpgettext.call( this, undef, context, skey, pkey, val );
- },
-
- dnpgettext : function ( domain, context, skey, pkey, val ) {
- return this.dcnpgettext.call( this, domain, context, skey, pkey, val );
- },
-
- // The most fully qualified gettext function. It has every option.
- // Since it has every option, we can use it from every other method.
- // This is the bread and butter.
- // Technically there should be one more argument in this function for 'Category',
- // but since we never use it, we might as well not waste the bytes to define it.
- dcnpgettext : function ( domain, context, singular_key, plural_key, val ) {
- // Set some defaults
-
- plural_key = plural_key || singular_key;
-
- // Use the global domain default if one
- // isn't explicitly passed in
- domain = domain || this._textdomain;
-
- var fallback;
-
- // Handle special cases
-
- // No options found
- if ( ! this.options ) {
- // There's likely something wrong, but we'll return the correct key for english
- // We do this by instantiating a brand new Jed instance with the default set
- // for everything that could be broken.
- fallback = new Jed();
- return fallback.dcnpgettext.call( fallback, undefined, undefined, singular_key, plural_key, val );
- }
-
- // No translation data provided
- if ( ! this.options.locale_data ) {
- throw new Error('No locale data provided.');
- }
-
- if ( ! this.options.locale_data[ domain ] ) {
- throw new Error('Domain `' + domain + '` was not found.');
- }
-
- if ( ! this.options.locale_data[ domain ][ "" ] ) {
- throw new Error('No locale meta information provided.');
- }
-
- // Make sure we have a truthy key. Otherwise we might start looking
- // into the empty string key, which is the options for the locale
- // data.
- if ( ! singular_key ) {
- throw new Error('No translation key found.');
- }
-
- var key = context ? context + Jed.context_delimiter + singular_key : singular_key,
- locale_data = this.options.locale_data,
- dict = locale_data[ domain ],
- defaultConf = (locale_data.messages || this.defaults.locale_data.messages)[""],
- pluralForms = dict[""].plural_forms || dict[""]["Plural-Forms"] || dict[""]["plural-forms"] || defaultConf.plural_forms || defaultConf["Plural-Forms"] || defaultConf["plural-forms"],
- val_list,
- res;
-
- var val_idx;
- if (val === undefined) {
- // No value passed in; assume singular key lookup.
- val_idx = 0;
-
- } else {
- // Value has been passed in; use plural-forms calculations.
-
- // Handle invalid numbers, but try casting strings for good measure
- if ( typeof val != 'number' ) {
- val = parseInt( val, 10 );
-
- if ( isNaN( val ) ) {
- throw new Error('The number that was passed in is not a number.');
- }
- }
-
- val_idx = getPluralFormFunc(pluralForms)(val);
- }
-
- // Throw an error if a domain isn't found
- if ( ! dict ) {
- throw new Error('No domain named `' + domain + '` could be found.');
- }
-
- val_list = dict[ key ];
-
- // If there is no match, then revert back to
- // english style singular/plural with the keys passed in.
- if ( ! val_list || val_idx > val_list.length ) {
- if (this.options.missing_key_callback) {
- this.options.missing_key_callback(key, domain);
- }
- res = [ singular_key, plural_key ];
-
- // collect untranslated strings
- if (this.options.debug===true) {
- console.log(res[ getPluralFormFunc(pluralForms)( val ) ]);
- }
- return res[ getPluralFormFunc()( val ) ];
- }
-
- res = val_list[ val_idx ];
-
- // This includes empty strings on purpose
- if ( ! res ) {
- res = [ singular_key, plural_key ];
- return res[ getPluralFormFunc()( val ) ];
- }
- return res;
- }
- });
-
-
- // We add in sprintf capabilities for post translation value interolation
- // This is not internally used, so you can remove it if you have this
- // available somewhere else, or want to use a different system.
-
- // We _slightly_ modify the normal sprintf behavior to more gracefully handle
- // undefined values.
-
- /**
- sprintf() for JavaScript 0.7-beta1
- http://www.diveintojavascript.com/projects/javascript-sprintf
-
- Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of sprintf() for JavaScript nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- var sprintf = (function() {
- function get_type(variable) {
- return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
- }
- function str_repeat(input, multiplier) {
- for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */}
- return output.join('');
- }
-
- var str_format = function() {
- if (!str_format.cache.hasOwnProperty(arguments[0])) {
- str_format.cache[arguments[0]] = str_format.parse(arguments[0]);
- }
- return str_format.format.call(null, str_format.cache[arguments[0]], arguments);
- };
-
- str_format.format = function(parse_tree, argv) {
- var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
- for (i = 0; i < tree_length; i++) {
- node_type = get_type(parse_tree[i]);
- if (node_type === 'string') {
- output.push(parse_tree[i]);
- }
- else if (node_type === 'array') {
- match = parse_tree[i]; // convenience purposes only
- if (match[2]) { // keyword argument
- arg = argv[cursor];
- for (k = 0; k < match[2].length; k++) {
- if (!arg.hasOwnProperty(match[2][k])) {
- throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
- }
- arg = arg[match[2][k]];
- }
- }
- else if (match[1]) { // positional argument (explicit)
- arg = argv[match[1]];
- }
- else { // positional argument (implicit)
- arg = argv[cursor++];
- }
-
- if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) {
- throw(sprintf('[sprintf] expecting number but found %s', get_type(arg)));
- }
-
- // Jed EDIT
- if ( typeof arg == 'undefined' || arg === null ) {
- arg = '';
- }
- // Jed EDIT
-
- switch (match[8]) {
- case 'b': arg = arg.toString(2); break;
- case 'c': arg = String.fromCharCode(arg); break;
- case 'd': arg = parseInt(arg, 10); break;
- case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break;
- case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break;
- case 'o': arg = arg.toString(8); break;
- case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break;
- case 'u': arg = Math.abs(arg); break;
- case 'x': arg = arg.toString(16); break;
- case 'X': arg = arg.toString(16).toUpperCase(); break;
- }
- arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg);
- pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' ';
- pad_length = match[6] - String(arg).length;
- pad = match[6] ? str_repeat(pad_character, pad_length) : '';
- output.push(match[5] ? arg + pad : pad + arg);
- }
- }
- return output.join('');
- };
-
- str_format.cache = {};
-
- str_format.parse = function(fmt) {
- var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
- while (_fmt) {
- if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
- parse_tree.push(match[0]);
- }
- else if ((match = /^\x25{2}/.exec(_fmt)) !== null) {
- parse_tree.push('%');
- }
- else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) {
- if (match[2]) {
- arg_names |= 1;
- var field_list = [], replacement_field = match[2], field_match = [];
- if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
- field_list.push(field_match[1]);
- while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
- if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
- field_list.push(field_match[1]);
- }
- else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
- field_list.push(field_match[1]);
- }
- else {
- throw('[sprintf] huh?');
- }
- }
- }
- else {
- throw('[sprintf] huh?');
- }
- match[2] = field_list;
- }
- else {
- arg_names |= 2;
- }
- if (arg_names === 3) {
- throw('[sprintf] mixing positional and named placeholders is not (yet) supported');
- }
- parse_tree.push(match);
- }
- else {
- throw('[sprintf] huh?');
- }
- _fmt = _fmt.substring(match[0].length);
- }
- return parse_tree;
- };
-
- return str_format;
- })();
-
- var vsprintf = function(fmt, argv) {
- argv.unshift(fmt);
- return sprintf.apply(null, argv);
- };
-
- Jed.parse_plural = function ( plural_forms, n ) {
- plural_forms = plural_forms.replace(/n/g, n);
- return Jed.parse_expression(plural_forms);
- };
-
- Jed.sprintf = function ( fmt, args ) {
- if ( {}.toString.call( args ) == '[object Array]' ) {
- return vsprintf( fmt, [].slice.call(args) );
- }
- return sprintf.apply(this, [].slice.call(arguments) );
- };
-
- Jed.prototype.sprintf = function () {
- return Jed.sprintf.apply(this, arguments);
- };
- // END sprintf Implementation
-
- // Start the Plural forms section
- // This is a full plural form expression parser. It is used to avoid
- // running 'eval' or 'new Function' directly against the plural
- // forms.
- //
- // This can be important if you get translations done through a 3rd
- // party vendor. I encourage you to use this instead, however, I
- // also will provide a 'precompiler' that you can use at build time
- // to output valid/safe function representations of the plural form
- // expressions. This means you can build this code out for the most
- // part.
- Jed.PF = {};
-
- Jed.PF.parse = function ( p ) {
- var plural_str = Jed.PF.extractPluralExpr( p );
- return Jed.PF.parser.parse.call(Jed.PF.parser, plural_str);
- };
-
- Jed.PF.compile = function ( p ) {
- // Handle trues and falses as 0 and 1
- function imply( val ) {
- return (val === true ? 1 : val ? val : 0);
- }
-
- var ast = Jed.PF.parse( p );
- return function ( n ) {
- return imply( Jed.PF.interpreter( ast )( n ) );
- };
- };
-
- Jed.PF.interpreter = function ( ast ) {
- return function ( n ) {
- var res;
- switch ( ast.type ) {
- case 'GROUP':
- return Jed.PF.interpreter( ast.expr )( n );
- case 'TERNARY':
- if ( Jed.PF.interpreter( ast.expr )( n ) ) {
- return Jed.PF.interpreter( ast.truthy )( n );
- }
- return Jed.PF.interpreter( ast.falsey )( n );
- case 'OR':
- return Jed.PF.interpreter( ast.left )( n ) || Jed.PF.interpreter( ast.right )( n );
- case 'AND':
- return Jed.PF.interpreter( ast.left )( n ) && Jed.PF.interpreter( ast.right )( n );
- case 'LT':
- return Jed.PF.interpreter( ast.left )( n ) < Jed.PF.interpreter( ast.right )( n );
- case 'GT':
- return Jed.PF.interpreter( ast.left )( n ) > Jed.PF.interpreter( ast.right )( n );
- case 'LTE':
- return Jed.PF.interpreter( ast.left )( n ) <= Jed.PF.interpreter( ast.right )( n );
- case 'GTE':
- return Jed.PF.interpreter( ast.left )( n ) >= Jed.PF.interpreter( ast.right )( n );
- case 'EQ':
- return Jed.PF.interpreter( ast.left )( n ) == Jed.PF.interpreter( ast.right )( n );
- case 'NEQ':
- return Jed.PF.interpreter( ast.left )( n ) != Jed.PF.interpreter( ast.right )( n );
- case 'MOD':
- return Jed.PF.interpreter( ast.left )( n ) % Jed.PF.interpreter( ast.right )( n );
- case 'VAR':
- return n;
- case 'NUM':
- return ast.val;
- default:
- throw new Error("Invalid Token found.");
- }
- };
- };
-
- Jed.PF.regexps = {
- TRIM_BEG: /^\s\s*/,
- TRIM_END: /\s\s*$/,
- HAS_SEMICOLON: /;\s*$/,
- NPLURALS: /nplurals\=(\d+);/,
- PLURAL: /plural\=(.*);/
- };
-
- Jed.PF.extractPluralExpr = function ( p ) {
- // trim first
- p = p.replace(Jed.PF.regexps.TRIM_BEG, '').replace(Jed.PF.regexps.TRIM_END, '');
-
- if (! Jed.PF.regexps.HAS_SEMICOLON.test(p)) {
- p = p.concat(';');
- }
-
- var nplurals_matches = p.match( Jed.PF.regexps.NPLURALS ),
- res = {},
- plural_matches;
-
- // Find the nplurals number
- if ( nplurals_matches.length > 1 ) {
- res.nplurals = nplurals_matches[1];
- }
- else {
- throw new Error('nplurals not found in plural_forms string: ' + p );
- }
-
- // remove that data to get to the formula
- p = p.replace( Jed.PF.regexps.NPLURALS, "" );
- plural_matches = p.match( Jed.PF.regexps.PLURAL );
-
- if (!( plural_matches && plural_matches.length > 1 ) ) {
- throw new Error('`plural` expression not found: ' + p);
- }
- return plural_matches[ 1 ];
- };
-
- /* Jison generated parser */
- Jed.PF.parser = (function(){
-
-var parser = {trace: function trace() { },
-yy: {},
-symbols_: {"error":2,"expressions":3,"e":4,"EOF":5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,"n":19,"NUMBER":20,"$accept":0,"$end":1},
-terminals_: {2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},
-productions_: [0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],
-performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
-
-var $0 = $$.length - 1;
-switch (yystate) {
-case 1: return { type : 'GROUP', expr: $$[$0-1] };
-break;
-case 2:this.$ = { type: 'TERNARY', expr: $$[$0-4], truthy : $$[$0-2], falsey: $$[$0] };
-break;
-case 3:this.$ = { type: "OR", left: $$[$0-2], right: $$[$0] };
-break;
-case 4:this.$ = { type: "AND", left: $$[$0-2], right: $$[$0] };
-break;
-case 5:this.$ = { type: 'LT', left: $$[$0-2], right: $$[$0] };
-break;
-case 6:this.$ = { type: 'LTE', left: $$[$0-2], right: $$[$0] };
-break;
-case 7:this.$ = { type: 'GT', left: $$[$0-2], right: $$[$0] };
-break;
-case 8:this.$ = { type: 'GTE', left: $$[$0-2], right: $$[$0] };
-break;
-case 9:this.$ = { type: 'NEQ', left: $$[$0-2], right: $$[$0] };
-break;
-case 10:this.$ = { type: 'EQ', left: $$[$0-2], right: $$[$0] };
-break;
-case 11:this.$ = { type: 'MOD', left: $$[$0-2], right: $$[$0] };
-break;
-case 12:this.$ = { type: 'GROUP', expr: $$[$0-1] };
-break;
-case 13:this.$ = { type: 'VAR' };
-break;
-case 14:this.$ = { type: 'NUM', val: Number(yytext) };
-break;
-}
-},
-table: [{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],
-defaultActions: {6:[2,1]},
-parseError: function parseError(str, hash) {
- throw new Error(str);
-},
-parse: function parse(input) {
- var self = this,
- stack = [0],
- vstack = [null], // semantic value stack
- lstack = [], // location stack
- table = this.table,
- yytext = '',
- yylineno = 0,
- yyleng = 0,
- recovering = 0,
- TERROR = 2,
- EOF = 1;
-
- //this.reductionCount = this.shiftCount = 0;
-
- this.lexer.setInput(input);
- this.lexer.yy = this.yy;
- this.yy.lexer = this.lexer;
- if (typeof this.lexer.yylloc == 'undefined')
- this.lexer.yylloc = {};
- var yyloc = this.lexer.yylloc;
- lstack.push(yyloc);
-
- if (typeof this.yy.parseError === 'function')
- this.parseError = this.yy.parseError;
-
- function popStack (n) {
- stack.length = stack.length - 2*n;
- vstack.length = vstack.length - n;
- lstack.length = lstack.length - n;
- }
-
- function lex() {
- var token;
- token = self.lexer.lex() || 1; // $end = 1
- // if token isn't its numeric value, convert
- if (typeof token !== 'number') {
- token = self.symbols_[token] || token;
- }
- return token;
- }
-
- var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
- while (true) {
- // retreive state number from top of stack
- state = stack[stack.length-1];
-
- // use default actions if available
- if (this.defaultActions[state]) {
- action = this.defaultActions[state];
- } else {
- if (symbol == null)
- symbol = lex();
- // read action for current state and first input
- action = table[state] && table[state][symbol];
- }
-
- // handle parse error
- _handle_error:
- if (typeof action === 'undefined' || !action.length || !action[0]) {
-
- if (!recovering) {
- // Report error
- expected = [];
- for (p in table[state]) if (this.terminals_[p] && p > 2) {
- expected.push("'"+this.terminals_[p]+"'");
- }
- var errStr = '';
- if (this.lexer.showPosition) {
- errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
- } else {
- errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
- (symbol == 1 /*EOF*/ ? "end of input" :
- ("'"+(this.terminals_[symbol] || symbol)+"'"));
- }
- this.parseError(errStr,
- {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
- }
-
- // just recovered from another error
- if (recovering == 3) {
- if (symbol == EOF) {
- throw new Error(errStr || 'Parsing halted.');
- }
-
- // discard current lookahead and grab another
- yyleng = this.lexer.yyleng;
- yytext = this.lexer.yytext;
- yylineno = this.lexer.yylineno;
- yyloc = this.lexer.yylloc;
- symbol = lex();
- }
-
- // try to recover from error
- while (1) {
- // check for error recovery rule in this state
- if ((TERROR.toString()) in table[state]) {
- break;
- }
- if (state == 0) {
- throw new Error(errStr || 'Parsing halted.');
- }
- popStack(1);
- state = stack[stack.length-1];
- }
-
- preErrorSymbol = symbol; // save the lookahead token
- symbol = TERROR; // insert generic error symbol as new lookahead
- state = stack[stack.length-1];
- action = table[state] && table[state][TERROR];
- recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
- }
-
- // this shouldn't happen, unless resolve defaults are off
- if (action[0] instanceof Array && action.length > 1) {
- throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
- }
-
- switch (action[0]) {
-
- case 1: // shift
- //this.shiftCount++;
-
- stack.push(symbol);
- vstack.push(this.lexer.yytext);
- lstack.push(this.lexer.yylloc);
- stack.push(action[1]); // push state
- symbol = null;
- if (!preErrorSymbol) { // normal execution/no error
- yyleng = this.lexer.yyleng;
- yytext = this.lexer.yytext;
- yylineno = this.lexer.yylineno;
- yyloc = this.lexer.yylloc;
- if (recovering > 0)
- recovering--;
- } else { // error just occurred, resume old lookahead f/ before error
- symbol = preErrorSymbol;
- preErrorSymbol = null;
- }
- break;
-
- case 2: // reduce
- //this.reductionCount++;
-
- len = this.productions_[action[1]][1];
-
- // perform semantic action
- yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
- // default location, uses first token for firsts, last for lasts
- yyval._$ = {
- first_line: lstack[lstack.length-(len||1)].first_line,
- last_line: lstack[lstack.length-1].last_line,
- first_column: lstack[lstack.length-(len||1)].first_column,
- last_column: lstack[lstack.length-1].last_column
- };
- r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
-
- if (typeof r !== 'undefined') {
- return r;
- }
-
- // pop off stack
- if (len) {
- stack = stack.slice(0,-1*len*2);
- vstack = vstack.slice(0, -1*len);
- lstack = lstack.slice(0, -1*len);
- }
-
- stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
- vstack.push(yyval.$);
- lstack.push(yyval._$);
- // goto new state = table[STATE][NONTERMINAL]
- newState = table[stack[stack.length-2]][stack[stack.length-1]];
- stack.push(newState);
- break;
-
- case 3: // accept
- return true;
- }
-
- }
-
- return true;
-}};/* Jison generated lexer */
-var lexer = (function(){
-
-var lexer = ({EOF:1,
-parseError:function parseError(str, hash) {
- if (this.yy.parseError) {
- this.yy.parseError(str, hash);
- } else {
- throw new Error(str);
- }
- },
-setInput:function (input) {
- this._input = input;
- this._more = this._less = this.done = false;
- this.yylineno = this.yyleng = 0;
- this.yytext = this.matched = this.match = '';
- this.conditionStack = ['INITIAL'];
- this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
- return this;
- },
-input:function () {
- var ch = this._input[0];
- this.yytext+=ch;
- this.yyleng++;
- this.match+=ch;
- this.matched+=ch;
- var lines = ch.match(/\n/);
- if (lines) this.yylineno++;
- this._input = this._input.slice(1);
- return ch;
- },
-unput:function (ch) {
- this._input = ch + this._input;
- return this;
- },
-more:function () {
- this._more = true;
- return this;
- },
-pastInput:function () {
- var past = this.matched.substr(0, this.matched.length - this.match.length);
- return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
- },
-upcomingInput:function () {
- var next = this.match;
- if (next.length < 20) {
- next += this._input.substr(0, 20-next.length);
- }
- return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
- },
-showPosition:function () {
- var pre = this.pastInput();
- var c = new Array(pre.length + 1).join("-");
- return pre + this.upcomingInput() + "\n" + c+"^";
- },
-next:function () {
- if (this.done) {
- return this.EOF;
- }
- if (!this._input) this.done = true;
-
- var token,
- match,
- col,
- lines;
- if (!this._more) {
- this.yytext = '';
- this.match = '';
- }
- var rules = this._currentRules();
- for (var i=0;i < rules.length; i++) {
- match = this._input.match(this.rules[rules[i]]);
- if (match) {
- lines = match[0].match(/\n.*/g);
- if (lines) this.yylineno += lines.length;
- this.yylloc = {first_line: this.yylloc.last_line,
- last_line: this.yylineno+1,
- first_column: this.yylloc.last_column,
- last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
- this.yytext += match[0];
- this.match += match[0];
- this.matches = match;
- this.yyleng = this.yytext.length;
- this._more = false;
- this._input = this._input.slice(match[0].length);
- this.matched += match[0];
- token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
- if (token) return token;
- else return;
- }
- }
- if (this._input === "") {
- return this.EOF;
- } else {
- this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
- {text: "", token: null, line: this.yylineno});
- }
- },
-lex:function lex() {
- var r = this.next();
- if (typeof r !== 'undefined') {
- return r;
- } else {
- return this.lex();
- }
- },
-begin:function begin(condition) {
- this.conditionStack.push(condition);
- },
-popState:function popState() {
- return this.conditionStack.pop();
- },
-_currentRules:function _currentRules() {
- return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
- },
-topState:function () {
- return this.conditionStack[this.conditionStack.length-2];
- },
-pushState:function begin(condition) {
- this.begin(condition);
- }});
-lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
-
-var YYSTATE=YY_START;
-switch($avoiding_name_collisions) {
-case 0:/* skip whitespace */
-break;
-case 1:return 20
-break;
-case 2:return 19
-break;
-case 3:return 8
-break;
-case 4:return 9
-break;
-case 5:return 6
-break;
-case 6:return 7
-break;
-case 7:return 11
-break;
-case 8:return 13
-break;
-case 9:return 10
-break;
-case 10:return 12
-break;
-case 11:return 14
-break;
-case 12:return 15
-break;
-case 13:return 16
-break;
-case 14:return 17
-break;
-case 15:return 18
-break;
-case 16:return 5
-break;
-case 17:return 'INVALID'
-break;
-}
-};
-lexer.rules = [/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./];
-lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"inclusive":true}};return lexer;})()
-parser.lexer = lexer;
-return parser;
-})();
-// End parser
-
- // Handle node, amd, and global systems
- if (typeof exports !== 'undefined') {
- if (typeof module !== 'undefined' && module.exports) {
- exports = module.exports = Jed;
- }
- exports.Jed = Jed;
- }
- else {
- if (typeof define === 'function' && define.amd) {
- define(function() {
- return Jed;
- });
- }
- // Leak a global regardless of module system
- root['Jed'] = Jed;
- }
-
-})(this);
diff --git a/thirdparty/jed/package.json b/thirdparty/jed/package.json
deleted file mode 100644
index 0e37bc704..000000000
--- a/thirdparty/jed/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "jed",
- "version": "1.1.1",
- "author": "Alex Sexton <alexsexton@gmail.com>",
- "description": "Gettext Style i18n for Modern JavaScript Apps",
- "repository": {
- "type": "git",
- "url": "https://SlexAxton@github.com/SlexAxton/Jed.git"
- },
- "scripts": {
- "test": "make test"
- },
- "main": "./jed",
- "keywords": [
- "i18n",
- "Jed",
- "gettext",
- "internationalization"
- ],
- "dependencies" : {},
- "devDependencies" : {
- "mocha" : "*",
- "expect.js" : "*",
- "serve": "*"
- },
- "license": "MIT"
-}
diff --git a/thirdparty/jed/plurals.jison b/thirdparty/jed/plurals.jison
deleted file mode 100644
index 9364f994e..000000000
--- a/thirdparty/jed/plurals.jison
+++ /dev/null
@@ -1,72 +0,0 @@
-/* description: Parses end executes mathematical expressions. */
-
-/* lexical grammar */
-%lex
-%%
-
-\s+ /* skip whitespace */
-[0-9]+("."[0-9]+)?\b return 'NUMBER'
-"n" return 'n'
-"||" return '||'
-"&&" return '&&'
-"?" return '?'
-":" return ':'
-"<=" return '<='
-">=" return '>='
-"<" return '<'
-">" return '>'
-"!=" return '!='
-"==" return '=='
-"%" return '%'
-"(" return '('
-")" return ')'
-<<EOF>> return 'EOF'
-. return 'INVALID'
-
-/lex
-
-/* operator associations and precedence */
-
-%right <code> '?' ':'
-%left '||'
-%left '&&'
-%left '<=' '>=' '<' '>' '!=' '=='
-%left '%'
-
-%start expressions
-
-%% /* language grammar */
-
-expressions
- : e EOF
- { return { type : 'GROUP', expr: $1 }; }
- ;
-
-e
- : e '?' e ':' e
- {$$ = { type: 'TERNARY', expr: $1, truthy : $3, falsey: $5 }; }
- | e '||' e
- {$$ = { type: "OR", left: $1, right: $3 };}
- | e '&&' e
- {$$ = { type: "AND", left: $1, right: $3 };}
- | e '<' e
- {$$ = { type: 'LT', left: $1, right: $3 }; }
- | e '<=' e
- {$$ = { type: 'LTE', left: $1, right: $3 };}
- | e '>' e
- {$$ = { type: 'GT', left: $1, right: $3 };}
- | e '>=' e
- {$$ = { type: 'GTE', left: $1, right: $3 };}
- | e '!=' e
- {$$ = { type: 'NEQ', left: $1, right: $3 };}
- | e '==' e
- {$$ = { type: 'EQ', left: $1, right: $3 };}
- | e '%' e
- {$$ = { type: 'MOD', left: $1, right: $3 };}
- | '(' e ')'
- {$$ = { type: 'GROUP', expr: $2 }; }
- | 'n'
- {$$ = { type: 'VAR' }; }
- | NUMBER
- {$$ = { type: 'NUM', val: Number(yytext) }; }
- ;
diff --git a/thirdparty/jed/test/common.js b/thirdparty/jed/test/common.js
deleted file mode 100644
index 7568d624c..000000000
--- a/thirdparty/jed/test/common.js
+++ /dev/null
@@ -1,2 +0,0 @@
-expect = require('expect.js');
-Jed = require('../jed');
diff --git a/thirdparty/jed/test/index.html b/thirdparty/jed/test/index.html
deleted file mode 100644
index bd92793a3..000000000
--- a/thirdparty/jed/test/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <meta charset=utf-8 />
- <title>Jed.js Test Suite</title>
- <link rel="stylesheet" href="/node_modules/mocha/mocha.css" />
- <script src="/test/jquery.min.js"></script>
- <script src="/node_modules/mocha/mocha.js"></script>
- <script src="/node_modules/expect.js/expect.js"></script>
- <script>mocha.setup('bdd')</script>
-
- <script src="/jed.js"></script>
- <script src="/test/tests.js"></script>
- </head>
- <body>
- <h1>Jed.js Test Suite</h1>
- <div id="mocha"></div>
- <script>
- window.onload = function () {
- mocha.run().globals(['Jed']);
- };
- </script>
- </body>
-</html>
diff --git a/thirdparty/jed/test/jquery.min.js b/thirdparty/jed/test/jquery.min.js
deleted file mode 100644
index 198b3ff07..000000000
--- a/thirdparty/jed/test/jquery.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.7.1 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
-f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
-{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file
diff --git a/thirdparty/jed/test/tests.js b/thirdparty/jed/test/tests.js
deleted file mode 100644
index 7ebc8c0bf..000000000
--- a/thirdparty/jed/test/tests.js
+++ /dev/null
@@ -1,746 +0,0 @@
-(function (Jed){
-
- describe("Property Checks", function () {
- it("should exist", function () {
- expect( Jed ).to.be.ok();
- });
-
- it("should have a context delimiter as per the gettext spec", function () {
- expect( Jed.context_delimiter ).to.be( "\u0004" );
- expect( Jed.context_delimiter ).to.be( String.fromCharCode( 4 ) );
- });
- });
-
- // Group tests that need similar data
- (function () {
- var locale_data = {
- "messages" : {
- "" : {
- "domain" : "messages",
- "lang" : "en",
- "plural-forms" : "nplurals=2; plural=(n != 1);"
- },
- "test" : ["test_translation_output"]
- }
- };
-
- var locale_data2 = {
- "some_domain" : {
- "" : {
- "domain" : "some_domain",
- "lang" : "en",
- "plural-forms" : "nplurals=2; plural=(n != 1);"
- },
- "test" : ["test_translation_output2"],
- "zero length translation" : [""]
- }
- };
-
- var locale_data3 = {
- "some_domain" : {
- "" : {
- "domain" : "some_domain",
- "lang" : "ar",
- "plural-forms" : "nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5);"
- },
- "test" : ["test_translation_output3"],
- "zero length translation" : [""]
- }
- };
-
- var i18n = new Jed({
- "domain" : "messages",
- "locale_data" : locale_data
- });
-
- var i18n_2 = new Jed({
- "domain" : "some_domain",
- "locale_data" : locale_data2
- });
-
- var i18n_3 = new Jed({
- "domain" : "some_domain",
- "locale_data" : locale_data3
- });
-
- // Standard shorthand function
- function _(msgid) {
- return i18n_2.gettext(msgid);
- }
-
- // Actual tests
- describe("Instantiation", function () {
- it("should exist", function () {
- expect( i18n ).to.be.ok();
- expect( i18n_2 ).to.be.ok();
- expect( i18n_3 ).to.be.ok();
- expect( _ ).to.be.ok();
- });
- });
-
- describe("Basic", function () {
- it("should translate a key that exists in the translation", function () {
- expect( i18n.gettext('test') ).to.be( 'test_translation_output' );
- });
-
- it("should just pass through strings that aren't translatable", function () {
- expect( i18n.gettext('missing') ).to.be( 'missing' );
- });
-
- it("should translate a key in a locale with plural-forms rules that don't assume n==1 will return 0", function () {
- expect(i18n_3.gettext('test')).to.be('test_translation_output3');
- });
-
- it("should allow you to wrap it as a shorthand function", function () {
- expect( _('test') ).to.be( 'test_translation_output2' );
- expect( _('missing') ).to.be( 'missing' );
- });
-
- it("should have identical output for wrapped and non-wrapped instances", function () {
- expect( _('test') ).to.be( i18n_2.gettext('test') );
- expect( _('missing') ).to.be( i18n_2.gettext('missing') );
- });
-
- it("should not allow you to use domains that don't exist", function () {
- function badCreate() {
- var x = new Jed({
- "domain" : "missing_domain",
- "locale_data" : locale_data
- });
- return x;
- }
- expect( badCreate ).to.throwException();
- });
-
- it("should just pass through translations that are empty strings", function () {
- expect( _('zero length translation') ).to.be('zero length translation' );
- });
-
- it("should call the callback function (if given) when a key is missing", function() {
- var callbackCalled;
- function missingKeyCallback(key) {
- callbackCalled = true;
- }
-
- callbackCalled = false;
- var jedWithCallback = new Jed({
- "missing_key_callback" : missingKeyCallback
- });
- jedWithCallback.gettext('missing key');
- expect(callbackCalled).to.be(true);
-
- callbackCalled = false;
- var jedWithoutCallback = new Jed({});
- jedWithoutCallback.gettext('missing key');
- expect(callbackCalled).to.be(false);
- });
- });
- })();
-
- (function () {
- var locale_data = {
- "messages_1": {
- "": {
- "domain": "messages_1",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test": ["test_1"],
- "test singular": ["test_1 singular", "test_1 plural"],
- "context\u0004test": ["test_1 context"],
- "context\u0004test singular": ["test_1 context singular", "test_1 context plural"]
- },
- "messages_2": {
- "": {
- "domain": "messages_2",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test": ["test_2"],
- "test singular": ["test_2 singular", "test_2 plural"],
- "context\u0004test": ["test_2 context"],
- "context\u0004test singular": ["test_2 context singular", "test_2 context plural"]
- }
- };
-
- describe("Domain", function () {
- var i18n1 = new Jed({
- domain : "messages_1",
- locale_data : locale_data
- });
-
- var i18n_2 = new Jed({
- domain : "messages_2",
- locale_data : locale_data
- });
-
- // No default domain
- var i18n_3 = new Jed({
- locale_data : locale_data
- });
-
- it("should use the correct domain when there are multiple", function () {
- expect( i18n1.gettext('test') ).to.be('test_1');
- expect( i18n_2.gettext('test') ).to.be('test_2');
- });
-
- it("should still pass through non-existent keys", function () {
- expect( i18n1.gettext('nope') ).to.be('nope');
- expect( i18n_2.gettext('nope again') ).to.be('nope again');
- });
-
- it("should reveal the current domain on any instance", function () {
- expect( i18n1.textdomain() ).to.be( 'messages_1' );
- expect( i18n_2.textdomain() ).to.be( 'messages_2' );
- });
-
- it("should use `messages` as the default domain if none given", function () {
- expect( i18n_3.textdomain() ).to.be('messages');
- });
-
- it("should allow on the fly domain switching", function () {
- // Switch these up
- i18n1.textdomain('messages_2');
- i18n_2.textdomain('messages_1');
-
- expect( i18n1.gettext('test') ).to.be('test_2');
- expect( i18n_2.gettext('test') ).to.be('test_1');
- expect( i18n1.textdomain() ).to.be( 'messages_2' );
- expect( i18n_2.textdomain() ).to.be( 'messages_1' );
- });
-
- describe("#dgettext", function () {
- it("should have the dgettext function", function () {
- expect( i18n_3.dgettext ).to.be.ok();
- });
-
- it("should allow you to call the domain on the fly", function () {
- expect( i18n_3.dgettext('messages_1', 'test') ).to.be('test_1');
- expect( i18n_3.dgettext('messages_2', 'test') ).to.be('test_2');
- });
-
- it("should pass through non-existent keys", function () {
- expect( i18n_3.dgettext('messages_1', 'nope') ).to.be('nope');
- expect( i18n_3.dgettext('messages_2', 'nope again') ).to.be('nope again');
- });
- });
-
- describe("#dcgettext", function () {
- var i18n_4 = new Jed({
- locale_data : locale_data
- });
-
- it("should have the dcgettext function", function () {
- expect( i18n_4.dcgettext ).to.be.ok();
- });
-
- it("should ignore categories altogether", function () {
- expect( i18n_4.dcgettext('messages_1', 'test', 'A_CATEGORY') ).to.be('test_1');
- });
- });
- });
-
- describe("Pluralization", function () {
- var locale_data1 = {
- "plural_test": {
- "": {
- "domain": "plural_test",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test singular": ["test_1"],
- "test plural %1$d": ["test_1_singular %1$d", "test_1_plural %1$d"],
- "context\u0004test context": ["test_1context"],
- "test2": ["test_2"],
- "zero length translation": [""],
- "context\u0004test2": ["test_2context"],
- "Not translated plural": ["asdf", "asdf"], // this should never hit, since it's msgid2
- "context\u0004context plural %1$d": ["context_plural_1 singular %1$d", "context_plural_1 plural %1$d"]
- }
- };
-
- var locale_data2 = {
- "plural_test2": {
- "": {
- "domain": "plural_test2",
- "lang": "sl",
- // actual Slovenian pluralization rules
- "plural_forms": "nplurals=4; plural=(n==1 ? 0 : n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3);"
- },
- "Singular" : ["Numerus 0", "Numerus 1", "Numerus 2", "Numerus 3" ]
- }
- };
-
- var i18n = new Jed({
- domain: "plural_test",
- locale_data: locale_data1
- });
-
- var i18n_2 = new Jed({
- domain: "plural_test2",
- locale_data: locale_data2
- });
-
- describe("#ngettext", function () {
-
- it("should have a ngettext function", function () {
- expect( i18n.ngettext ).to.be.ok();
- });
-
- it("should choose the correct pluralization translation", function () {
- expect( i18n.ngettext('test plural %1$d', 'test plural %1$d', 1) ).to.be( 'test_1_singular %1$d' );
- expect( i18n.ngettext('test plural %1$d', 'test plural %1$d', 2) ).to.be( 'test_1_plural %1$d' );
- expect( i18n.ngettext('test plural %1$d', 'test plural %1$d', 0) ).to.be( 'test_1_plural %1$d' );
- });
-
- it("should still pass through on plurals", function () {
- expect(i18n.ngettext('Not translated', 'Not translated plural', 1) ).to.be( 'Not translated' );
- expect(i18n.ngettext('Not translated', 'Not translated plural', 2) ).to.be( 'Not translated plural' );
- expect(i18n.ngettext('Not translated', 'Not translated plural', 0) ).to.be( 'Not translated plural' );
- expect(i18n_2.ngettext('Not translated', 'Not translated plural', 3) ).to.be( 'Not translated plural' );
- });
-
- it("should be able to parse complex pluralization rules", function () {
- var strings = ['Singular', 'Plural'];
- for (var i=0; i<=40; i++) {
- var translation = i18n_2.ngettext(strings[0], strings[1], i);
- var plural = ((i == 1) ? 0 :
- (i % 10 == 2) ? 1 :
- (i % 10 == 3 || i % 10 == 4) ? 2 : 3);
-
- expect(translation).to.be( 'Numerus ' + plural );
- }
- });
- });
-
- var locale_data_multi = {
- "messages_3": {
- "": {
- "domain": "messages_3",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test": ["test_1"],
- "test singular": ["test_1 singular", "test_1 plural"],
- "context\u0004test": ["test_1 context"],
- "context\u0004test singular": ["test_1 context singular", "test_1 context plural"]
- },
- "messages_4": {
- "": {
- "domain": "messages_4",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test": ["test_2"],
- "test singular": ["test_2 singular", "test_2 plural"],
- "context\u0004test": ["test_2 context"],
- "context\u0004test singular": ["test_2 context singular", "test_2 context plural"]
- }
- };
-
- describe("#dngettext", function () {
- var i18n = new Jed({
- locale_data : locale_data_multi
- });
-
- it("should have a dngettext function", function () {
- expect( i18n.dngettext).to.be.ok();
- });
-
- it("should pluralize correctly, based on domain rules", function () {
- expect(i18n.dngettext('messages_3', 'test singular', 'test plural', 1)).to.be('test_1 singular');
- expect(i18n.dngettext('messages_3', 'test singular', 'test plural', 2)).to.be('test_1 plural');
- expect(i18n.dngettext('messages_3', 'test singular', 'test plural', 0)).to.be('test_1 plural');
-
- expect(i18n.dngettext('messages_4', 'test singular', 'test plural', 1)).to.be('test_2 singular');
- expect(i18n.dngettext('messages_4', 'test singular', 'test plural', 2)).to.be('test_2 plural');
- expect(i18n.dngettext('messages_4', 'test singular', 'test plural', 0)).to.be('test_2 plural');
- });
-
- it("should passthrough non-found keys regardless of pluralization addition", function (){
- expect(i18n.dngettext('messages_3', 'Not translated', 'Not translated plural', 1)).to.be('Not translated');
- expect(i18n.dngettext('messages_3', 'Not translated', 'Not translated plural', 2)).to.be('Not translated plural');
- expect(i18n.dngettext('messages_3', 'Not translated', 'Not translated plural', 0)).to.be('Not translated plural');
-
- expect(i18n.dngettext('messages_4', 'Not translated', 'Not translated plural', 1)).to.be('Not translated');
- expect(i18n.dngettext('messages_4', 'Not translated', 'Not translated plural', 2)).to.be('Not translated plural');
- expect(i18n.dngettext('messages_4', 'Not translated', 'Not translated plural', 0)).to.be('Not translated plural');
- });
- });
-
- describe("#dcngettext", function () {
- var i18n = new Jed({
- locale_data : locale_data_multi
- });
-
- it("should more or less ignore the category", function () {
- expect(i18n.dcngettext('messages_3', 'test singular', 'test plural', 1, 'LC_MESSAGES')).to.be('test_1 singular');
- expect(i18n.dcngettext('messages_3', 'test singular', 'test plural', 2, 'LC_MESSAGES')).to.be('test_1 plural');
- expect(i18n.dcngettext('messages_3', 'test singular', 'test plural', 0, 'LC_MESSAGES')).to.be('test_1 plural');
-
- expect(i18n.dcngettext('messages_4', 'test singular', 'test plural', 1, 'LC_MESSAGES')).to.be('test_2 singular');
- expect(i18n.dcngettext('messages_4', 'test singular', 'test plural', 2, 'LC_MESSAGES')).to.be('test_2 plural');
- expect(i18n.dcngettext('messages_4', 'test singular', 'test plural', 0, 'LC_MESSAGES')).to.be('test_2 plural');
-
- expect(i18n.dcngettext('messages_3', 'Not translated', 'Not translated plural', 1, 'LC_MESSAGES')).to.be('Not translated');
- expect(i18n.dcngettext('messages_3', 'Not translated', 'Not translated plural', 2, 'LC_MESSAGES')).to.be('Not translated plural');
- expect(i18n.dcngettext('messages_3', 'Not translated', 'Not translated plural', 0, 'LC_MESSAGES')).to.be('Not translated plural');
-
- expect(i18n.dcngettext('messages_4', 'Not translated', 'Not translated plural', 1, 'LC_MESSAGES')).to.be('Not translated');
- expect(i18n.dcngettext('messages_4', 'Not translated', 'Not translated plural', 2, 'LC_MESSAGES')).to.be('Not translated plural');
- expect(i18n.dcngettext('messages_4', 'Not translated', 'Not translated plural', 0, 'LC_MESSAGES')).to.be('Not translated plural');
- });
- });
-
- describe("#pgettext", function () {
- var locale_data_w_context = {
- "context_test": {
- "": {
- "domain": "context_test",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test singular": ["test_1"],
- "test plural %1$d": ["test_1_singular %1$d", "test_1_plural %1$d"],
- "context\u0004test context": ["test_1context"],
- "test2": ["test_2"],
- "zero length translation": [""],
- "context\u0004test2": ["test_2context"],
- "context\u0004context plural %1$d": ["context_plural_1 singular %1$d", "context_plural_1 plural %1$d"]
- }
- };
-
- var i18n = new Jed({
- domain : "context_test",
- locale_data : locale_data_w_context
- });
-
- it("should expose the pgettext function", function () {
- expect( i18n.pgettext ).to.be.ok();
- });
-
- it("should accept a context and look up a new key using the context_glue", function () {
- expect( i18n.pgettext('context', 'test context') ).to.be( 'test_1context' );
- });
-
- it("should still pass through missing keys", function () {
- expect( i18n.pgettext('context', 'Not translated') ).to.be( 'Not translated' );
- });
-
- it("should make sure same msgid returns diff results w/ context when appropriate", function () {
- expect(i18n.gettext('test2')).to.be('test_2');
- expect(i18n.pgettext('context', 'test2')).to.be( 'test_2context' );
- });
- });
-
- describe("#dpgettext", function () {
- var i18n = new Jed({
- locale_data : locale_data_multi
- });
-
- it("should have a dpgettext function", function () {
- expect( i18n.dpgettext ).to.be.ok();
- });
-
- it("should use the domain and the context simultaneously", function () {
- expect(i18n.dpgettext('messages_3', 'context', 'test')).to.be('test_1 context');
- expect(i18n.dpgettext('messages_4', 'context', 'test')).to.be('test_2 context');
- });
-
- it("should pass through if either the domain, the key or the context isn't found", function () {
- expect(i18n.dpgettext('messages_3', 'context', 'Not translated')).to.be('Not translated');
- expect(i18n.dpgettext('messages_4', 'context', 'Not translated')).to.be('Not translated');
- });
-
- });
-
- describe("#dcpgettext", function () {
- var i18n = new Jed({
- locale_data : locale_data_multi
- });
-
- it("should have a dcpgettext function", function () {
- expect( i18n.dcpgettext ).to.be.ok();
- });
-
- it("should use the domain and the context simultaneously - ignore the category", function () {
- expect(i18n.dcpgettext('messages_3', 'context', 'test', 'LC_MESSAGES')).to.be('test_1 context');
- expect(i18n.dcpgettext('messages_4', 'context', 'test', 'LC_MESSAGES')).to.be('test_2 context');
- });
-
- it("should pass through if either the domain, the key or the context isn't found", function () {
- expect(i18n.dcpgettext('messages_3', 'context', 'Not translated', 'LC_MESSAGES')).to.be('Not translated');
- expect(i18n.dcpgettext('messages_4', 'context', 'Not translated', 'LC_MESSAGES')).to.be('Not translated');
- });
-
- });
-
- describe("#npgettext", function () {
- var locale_data_w_context = {
- "context_plural_test": {
- "": {
- "domain": "context_plural_test",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test singular": ["test_1"],
- "test plural %1$d": ["test_1_singular %1$d", "test_1_plural %1$d"],
- "context\u0004test context": ["test_1context"],
- "test2": ["test_2"],
- "zero length translation": [""],
- "context\u0004test2": ["test_2context"],
- "context\u0004context plural %1$d": ["context_plural_1 singular %1$d", "context_plural_1 plural %1$d"]
- }
- };
-
- var i18n = new Jed({
- domain : "context_plural_test",
- locale_data : locale_data_w_context
- });
-
- it("should have a dcpgettext function", function () {
- expect( i18n.dcpgettext ).to.be.ok();
- });
-
- it("should handle plurals at the same time as contexts", function () {
- expect(i18n.npgettext('context', 'context plural %1$d', 'plural %1$d', 1)).to.be('context_plural_1 singular %1$d');
- expect(i18n.npgettext('context', 'context plural %1$d', 'plural %1$d', 2)).to.be('context_plural_1 plural %1$d');
- expect(i18n.npgettext('context', 'context plural %1$d', 'plural %1$d', 0)).to.be('context_plural_1 plural %1$d');
- });
-
- it("should just pass through on not-found cases", function () {
- expect(i18n.npgettext('context', 'Not translated', 'Not translated plural', 1)).to.be('Not translated');
- expect(i18n.npgettext('context', 'Not translated', 'Not translated plural', 2)).to.be('Not translated plural');
- expect(i18n.npgettext('context', 'Not translated', 'Not translated plural', 0)).to.be('Not translated plural');
- });
- });
-
- describe("#dnpgettext", function () {
- var i18n = new Jed({
- locale_data : locale_data_multi
- });
-
- it("should have a dnpgettext function", function () {
- expect( i18n.dnpgettext ).to.be.ok();
- });
-
- it("should be able to do a domain, context, and pluralization lookup all at once", function () {
- expect(i18n.dnpgettext('messages_3', 'context', 'test singular', 'test plural', 1)).to.be('test_1 context singular');
- expect(i18n.dnpgettext('messages_3', 'context', 'test singular', 'test plural', 2)).to.be('test_1 context plural');
- expect(i18n.dnpgettext('messages_3', 'context', 'test singular', 'test plural', 0)).to.be('test_1 context plural');
-
- expect(i18n.dnpgettext('messages_4', 'context', 'test singular', 'test plural', 1)).to.be('test_2 context singular');
- expect(i18n.dnpgettext('messages_4', 'context', 'test singular', 'test plural', 2)).to.be('test_2 context plural');
- expect(i18n.dnpgettext('messages_4', 'context', 'test singular', 'test plural', 0)).to.be('test_2 context plural');
- });
-
- it("should pass through if everything doesn't point towards a key", function () {
- expect(i18n.dnpgettext('messages_3', 'context', 'Not translated', 'Not translated plural', 1)).to.be('Not translated');
- expect(i18n.dnpgettext('messages_3', 'context', 'Not translated', 'Not translated plural', 2)).to.be('Not translated plural');
- expect(i18n.dnpgettext('messages_3', 'context', 'Not translated', 'Not translated plural', 0)).to.be('Not translated plural');
-
- expect(i18n.dnpgettext('messages_4', 'context', 'Not translated', 'Not translated plural', 1)).to.be('Not translated');
- expect(i18n.dnpgettext('messages_4', 'context', 'Not translated', 'Not translated plural', 2)).to.be('Not translated plural');
- expect(i18n.dnpgettext('messages_4', 'context', 'Not translated', 'Not translated plural', 0)).to.be('Not translated plural');
- });
- });
-
- describe("#dcnpgettext", function () {
- var i18n = new Jed({
- locale_data : locale_data_multi
- });
-
- it("should have a dcnpgettext function", function () {
- expect( i18n.dcnpgettext ).to.be.ok();
- });
-
- it("should be able to do a domain, context, and pluralization lookup all at once - ignore category", function () {
- expect(i18n.dcnpgettext('messages_3', 'context', 'test singular', 'test plural', 1, "LC_MESSAGES")).to.be('test_1 context singular');
- expect(i18n.dcnpgettext('messages_3', 'context', 'test singular', 'test plural', 2, "LC_MESSAGES")).to.be('test_1 context plural');
- expect(i18n.dcnpgettext('messages_3', 'context', 'test singular', 'test plural', 0, "LC_MESSAGES")).to.be('test_1 context plural');
-
- expect(i18n.dcnpgettext('messages_4', 'context', 'test singular', 'test plural', 1, "LC_MESSAGES")).to.be('test_2 context singular');
- expect(i18n.dcnpgettext('messages_4', 'context', 'test singular', 'test plural', 2, "LC_MESSAGES")).to.be('test_2 context plural');
- expect(i18n.dcnpgettext('messages_4', 'context', 'test singular', 'test plural', 0, "LC_MESSAGES")).to.be('test_2 context plural');
- });
-
- it("should pass through if everything doesn't point towards a key", function () {
- expect(i18n.dcnpgettext('messages_3', 'context', 'Not translated', 'Not translated plural', 1, "LC_MESSAGES")).to.be('Not translated');
- expect(i18n.dcnpgettext('messages_3', 'context', 'Not translated', 'Not translated plural', 2, "LC_MESSAGES")).to.be('Not translated plural');
- expect(i18n.dcnpgettext('messages_3', 'context', 'Not translated', 'Not translated plural', 0, "LC_MESSAGES")).to.be('Not translated plural');
-
- expect(i18n.dcnpgettext('messages_4', 'context', 'Not translated', 'Not translated plural', 1, "LC_MESSAGES")).to.be('Not translated');
- expect(i18n.dcnpgettext('messages_4', 'context', 'Not translated', 'Not translated plural', 2, "LC_MESSAGES")).to.be('Not translated plural');
- expect(i18n.dcnpgettext('messages_4', 'context', 'Not translated', 'Not translated plural', 0, "LC_MESSAGES")).to.be('Not translated plural');
- });
- });
- });
-
- describe("Plural Forms Parsing", function (){
- // This is the method from the original gettext.js that uses new Function
- function evalParse( plural_forms ) {
- var pf_re = new RegExp('^(\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;a-zA-Z0-9_\(\)])+)', 'm');
- if (pf_re.test(plural_forms)) {
- var pf = plural_forms;
- if (! /;\s*$/.test(pf)) pf = pf.concat(';');
-
- var code = 'var plural; var nplurals; '+pf+' return { "nplural" : nplurals, "plural" : (plural === true ? 1 : plural ? plural : 0) };';
- return (new Function("n", code));
- } else {
- throw new Error("Syntax error in language file. Plural-Forms header is invalid ["+plural_forms+"]");
- }
- }
-
- // http://translate.sourceforge.net/wiki/l10n/pluralforms
- it("should have the same result as doing an eval on the expression for all known plural-forms.", function (){
- var pfs = ["nplurals=2; plural=(n > 1)","nplurals=2; plural=(n != 1)","nplurals=6; plural= n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5;","nplurals=1; plural=0","nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)","nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2","nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2","nplurals=4; plural= (n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3","nplurals=2; plural=n > 1","nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4","nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3","nplurals=2; plural= (n > 1)","nplurals=2; plural=(n%10!=1 || n%100==11)","nplurals=2; plural=n!=0","nplurals=2; plural=(n!=1)","nplurals=2; plural=(n!= 1)","nplurals=4; plural= (n==1) ? 0 : (n==2) ? 1 : (n == 3) ? 2 : 3","nplurals=2; plural=n>1;","nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2)","nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2)","nplurals=2; plural= n==1 || n%10==1 ? 0 : 1","nplurals=3; plural=(n==0 ? 0 : n==1 ? 1 : 2)","nplurals=4; plural=(n==1 ? 0 : n==0 || ( n%100>1 && n%100<11) ? 1 : (n%100>10 && n%100<20 ) ? 2 : 3)","nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)","nplurals=2; plural=(n!=1);","nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2);","nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0)","nplurals=2; plural=n != 1","nplurals=2; plural=(n>1)","nplurals=1; plural=0;"],
- pf, pfc, pfe, pfi, i;
- for ( pfi = 0; pfi < pfs.length; pfi++ ) {
- pf = ""+pfs[ pfi ];
- for( i = 0; i < 106; i++ ){
- pfc = Jed.PF.compile( ""+pf )( i );
- pfe = evalParse( ""+pf )( i ).plural;
- if (pfc !== pfe) {
- throw new Error('expected ' + pfe + ' but got ' + pfc);
- }
- }
- }
- });
-
- });
-
- describe("Chainable API", function () {
- var locale_data_w_context = {
- "context_sprintf_test": {
- "": {
- "domain": "context_sprintf_test",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test singular": ["test_1"],
- "test plural %1$d": ["test_1_singular %1$d", "test_1_plural %1$d"],
- "context\u0004test context": ["test_1context"],
- "test2": ["test_2"],
- "zero length translation": [""],
- "context\u0004test2": ["test_2context"],
- "context\u0004context plural %1$d": ["context_plural_1 singular %1$d", "context_plural_1 plural %1$d"]
- },
- "other_domain": {
- "": {
- "domain": "other_domain",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test other_domain singular": ["other domain test 1"],
- "context\u0004context other plural %1$d": ["context_plural_1 singular %1$d", "context_plural_1 plural %1$d"]
- }
- };
- var i18n = new Jed({
- "locale_data" : locale_data_w_context,
- "domain": "context_sprintf_test"
- });
-
- it("should handle a simple gettext passthrough", function (){
- expect( i18n.translate('test singular').fetch() ).to.be('test_1');
- });
-
- it("should handle changing domains", function (){
- expect( i18n.translate('test other_domain singular').onDomain('other_domain').fetch() ).to.be('other domain test 1');
- });
-
- it("should allow you to add plural information in the chain.", function () {
- expect( i18n.translate("test plural %1$d").ifPlural(5, "dont matta").fetch() ).to.be( "test_1_plural %1$d" );
- });
-
- it("should take in a sprintf set of args (as array) on the plural lookup", function(){
- expect( i18n.translate("test plural %1$d").ifPlural(5, "dont matta").fetch([5]) ).to.be( "test_1_plural 5" );
- expect( i18n.translate("test plural %1$d %2$d").ifPlural(5, "dont matta %1$d %2$d").fetch([5, 6]) ).to.be( "dont matta 5 6" );
- expect( i18n.translate("test plural %1$d %2$d").ifPlural(1, "dont matta %1$d %2$d").fetch([1, 6]) ).to.be( "test plural 1 6" );
- });
-
- it("should take in a sprintf set of args (as args) on the plural lookup", function(){
- expect( i18n.translate("test plural %1$d %2$d").ifPlural(5, "dont matta %1$d %2$d").fetch(5, 6) ).to.be( "dont matta 5 6" );
- expect( i18n.translate("test plural %1$d %2$d").ifPlural(1, "dont matta %1$d %2$d").fetch(1, 6) ).to.be( "test plural 1 6" );
- });
-
- it("should handle context information.", function () {
- expect(i18n.translate('test context').withContext('context').fetch() ).to.be('test_1context');
- });
-
- it("should be able to do all at the same time.", function () {
- expect( i18n.translate("context other plural %1$d").withContext('context').onDomain('other_domain').ifPlural(5, "ignored %1$d").fetch(5) ).to.be( "context_plural_1 plural 5" );
- expect( i18n.translate("context other plural %1$d").withContext('context').onDomain('other_domain').ifPlural(1, "ignored %1$d").fetch(1) ).to.be( "context_plural_1 singular 1" );
- });
-
- });
-
- describe("Sprintf", function () {
- var locale_data_w_context = {
- "context_sprintf_test": {
- "": {
- "domain": "context_sprintf_test",
- "lang": "en",
- "plural-forms": "nplurals=2; plural=(n != 1);"
- },
- "test singular": ["test_1"],
- "test plural %1$d": ["test_1_singular %1$d", "test_1_plural %1$d"],
- "context\u0004test context": ["test_1context"],
- "test2": ["test_2"],
- "zero length translation": [""],
- "context\u0004test2": ["test_2context"],
- "context\u0004context plural %1$d": ["context_plural_1 singular %1$d", "context_plural_1 plural %1$d"]
- }
- };
-
- var i18n = new Jed({
- "locale_data" : locale_data_w_context,
- "domain": "context_sprintf_test"
- });
-
-
- it("should take multiple types of arrays as input", function () {
- var strings = {
- "blah" : "blah",
- "thing%1$sbob" : "thing[one]bob",
- "thing%1$s%2$sbob" : "thing[one][two]bob",
- "thing%1$sasdf%2$sasdf" : "thing[one]asdf[two]asdf",
- "%1$s%2$s%3$s" : "[one][two]",
- "tom%1$saDick" : "tom[one]aDick"
- };
- var args = ["[one]", "[two]"];
-
- for (var i in strings) {
- // test using new Array
- expect(Jed.sprintf(i, ["[one]","[two]"])).to.be(strings[i]);
- expect(i18n.sprintf(i, ["[one]","[two]"])).to.be(strings[i]);
- // test using predefined array
- expect(Jed.sprintf(i, args)).to.be(strings[i]);
- expect(i18n.sprintf(i, args)).to.be(strings[i]);
- }
- });
-
-
-
- it("should accept a single string instead of an array", function () {
- // test using scalar rather than array
- var strings = {
- "blah" : "blah",
- "" : "",
- "%%" : "%",
- "tom%%dick" : "tom%dick",
- "thing%1$sbob" : "thing[one]bob",
- "thing%1$s%2$sbob" : "thing[one]bob",
- "thing%1$sasdf%2$sasdf" : "thing[one]asdfasdf",
- "%1$s%2$s%3$s" : "[one]"
- };
- var arg = "[one]";
-
- for (var i in strings) {
- expect(Jed.sprintf(i, arg)).to.be(strings[i]);
- expect(i18n.sprintf(i, arg)).to.be(strings[i]);
- }
- });
- });
- })();
-
-})( Jed );
diff --git a/thirdparty/systemjs/.agignore b/thirdparty/systemjs/.agignore
deleted file mode 100644
index a261f2917..000000000
--- a/thirdparty/systemjs/.agignore
+++ /dev/null
@@ -1 +0,0 @@
-dist/*
diff --git a/thirdparty/systemjs/.gitignore b/thirdparty/systemjs/.gitignore
deleted file mode 100644
index 76a84faec..000000000
--- a/thirdparty/systemjs/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-bower_components
-.DS_Store
diff --git a/thirdparty/systemjs/.travis.yml b/thirdparty/systemjs/.travis.yml
deleted file mode 100644
index b09421142..000000000
--- a/thirdparty/systemjs/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-git:
- depth: 1
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - '4'
- - '6'
-
-before_install:
- - npm install
-script:
- - npm run build
- - npm run test
diff --git a/thirdparty/systemjs/LICENSE b/thirdparty/systemjs/LICENSE
deleted file mode 100644
index 1e467a8cf..000000000
--- a/thirdparty/systemjs/LICENSE
+++ /dev/null
@@ -1,10 +0,0 @@
-MIT License
------------
-
-Copyright (C) 2013-2016 Guy Bedford
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/thirdparty/systemjs/Makefile b/thirdparty/systemjs/Makefile
deleted file mode 100755
index cc002c540..000000000
--- a/thirdparty/systemjs/Makefile
+++ /dev/null
@@ -1,186 +0,0 @@
-VERSION = $(shell cat package.json | sed -n 's/.*"version": "\([^"]*\)",/\1/p')
-
-define BANNER
-/*
- * SystemJS v$(VERSION)
- */
-endef
-export BANNER
-
-define POLYFILLS_BANNER
-/*
- * SystemJS Promise Polyfill
- */
-endef
-export POLYFILLS_BANNER
-
-define STANDARD_VERSION
-
-System.version = '$(VERSION) Standard';
-endef
-export STANDARD_VERSION
-
-define REGISTER_VERSION
-
-System.version = '$(VERSION) Register Only';
-endef
-export REGISTER_VERSION
-
-define CSP_VERSION
-
-System.version = '$(VERSION) CSP';
-endef
-export CSP_VERSION
-
-compile: clean-compile dist/system.src.js dist/system.perf.js dist/system-csp-production.src.js dist/system-register-only.src.js
-build: clean dist/system.js dist/system-csp-production.js dist/system-register-only.js dist/system-polyfills.js
-
-version:
- @echo $(VERSION)
-
-footprint: build
- @cat dist/system.js | gzip -9f | wc -c
- @cat dist/system-csp-production.js | gzip -9f | wc -c
- @cat dist/system-register-only.js | gzip -9f | wc -c
- @cat dist/system-polyfills.js | gzip -9f | wc -c
-
-clean-compile:
- @rm -f dist/system.src.js dist/system.perf.js dist/system-csp-production.src.js
-
-clean:
- @rm -f dist/*
-
-test: compile
- open test/test-traceur.html test/test-traceur-runtime.html
- sleep 0.1
- open test/test-babel.html test/test-babel-runtime.html
- sleep 0.1
- open test/test-typescript.html
- sleep 0.1
- open test/test-csp.html test/test-tracer.html
-
-dist/system-polyfills.js: dist/system-polyfills.src.js
- cd dist && ../node_modules/.bin/uglifyjs $(subst dist/,,$<) --compress drop_console --preamble "$$POLYFILLS_BANNER" --mangle --source-map system-polyfills.js.map >> $(subst dist/,,$@) || rm $(subst dist/,,$@)
-
-dist/%.js: dist/%.src.js
- cd dist && ../node_modules/.bin/uglifyjs $(subst dist/,,$<) --compress drop_console --preamble "$$BANNER" --mangle --source-map $*.js.map >> $(subst dist/,,$@) || rm $(subst dist/,,$@)
-
-dist/system.src.js: lib/*.js
- ( echo "$$BANNER"; \
- cat \
- lib/wrapper-start.js \
- lib/url-polyfill.js \
- lib/loader-wrapper-start.js \
- lib/system-fetch.js \
- lib/legacy-transpiler.js \
- lib/proto.js \
- lib/global-eval.js \
- lib/core.js \
- lib/package.js \
- lib/scriptLoader.js \
- lib/register.js \
- lib/esm.js \
- lib/global.js \
- lib/global-helpers.js \
- lib/cjs.js \
- lib/cjs-helpers.js \
- lib/amd-helpers.js \
- lib/amd.js \
- lib/plugins.js \
- lib/conditionals.js \
- lib/alias.js \
- lib/meta.js \
- lib/bundles.js \
- lib/depCache.js \
- lib/createSystem.js \
- ; echo "$$STANDARD_VERSION" ; cat \
- lib/loader-wrapper-end.js \
- lib/wrapper-end.js \
- ) > $@;
-
-dist/system.perf.js: lib/*.js
- ( echo "$$BANNER"; \
- cat \
- lib/wrapper-start.js \
- lib/url-polyfill.js \
- lib/loader-wrapper-start.js \
- lib/legacy-transpiler.js \
- lib/proto.js \
- lib/perf.js \
- lib/global-eval.js \
- lib/core.js \
- lib/package.js \
- lib/scriptLoader.js \
- lib/register.js \
- lib/esm.js \
- lib/global.js \
- lib/global-helpers.js \
- lib/cjs.js \
- lib/cjs-helpers.js \
- lib/amd-helpers.js \
- lib/amd.js \
- lib/plugins.js \
- lib/conditionals.js \
- lib/alias.js \
- lib/meta.js \
- lib/bundles.js \
- lib/depCache.js \
- lib/createSystem.js \
- ; echo "$$STANDARD_VERSION" ; cat \
- lib/loader-wrapper-end.js \
- lib/wrapper-end.js \
- ) > $@;
-
-dist/system-csp-production.src.js: lib/*.js
- ( echo "$$BANNER"; \
- cat \
- lib/wrapper-start.js \
- lib/url-polyfill.js \
- lib/loader-wrapper-start.js \
- lib/proto.js \
- lib/system-fetch.js \
- lib/core.js \
- lib/package.js \
- lib/scriptLoader.js \
- lib/register.js \
- lib/global-helpers.js \
- lib/cjs-helpers.js \
- lib/amd-helpers.js \
- lib/plugins.js \
- lib/conditionals.js \
- lib/alias.js \
- lib/meta.js \
- lib/bundles.js \
- lib/depCache.js \
- lib/scriptOnly.js \
- lib/createSystem.js \
- ; echo "$$CSP_VERSION" ; cat \
- lib/loader-wrapper-end.js \
- lib/wrapper-end.js \
- ) > $@;
-
-dist/system-register-only.src.js: lib/*.js
- ( echo "$$BANNER"; \
- cat \
- lib/url-polyfill.js \
- lib/loader-wrapper-start.js \
- lib/proto.js \
- lib/system-only-resolve.js \
- lib/scriptLoader.js \
- lib/register.js \
- lib/bundles.js \
- lib/scriptOnly.js \
- lib/createSystem.js \
- ; echo "$$REGISTER_VERSION" ; cat \
- lib/loader-wrapper-end.js \
- ) > $@;
-
-dist/system-polyfills.src.js: lib/*.js
- ( echo "$$POLYFILLS_BANNER"; \
- echo "(function(define) {"; \
- echo ""; \
- cat \
- node_modules/when/es6-shim/Promise.js \
- lib/polyfills-bootstrap.js; \
- echo "})();" \
- ) > $@; \ No newline at end of file
diff --git a/thirdparty/systemjs/README.md b/thirdparty/systemjs/README.md
deleted file mode 100644
index afe998a27..000000000
--- a/thirdparty/systemjs/README.md
+++ /dev/null
@@ -1,149 +0,0 @@
-SystemJS
-========
-
-[![Build Status][travis-image]][travis-url]
-[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/systemjs/systemjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[![Support](https://supporterhq.com/api/b/33df4abbec4d39260f49015d2457eafe/SystemJS)](https://supporterhq.com/support/33df4abbec4d39260f49015d2457eafe/SystemJS)
-
-Universal dynamic module loader - loads ES6 modules, AMD, CommonJS and global scripts in the browser and NodeJS.
-
-* [Loads any module format](docs/module-formats.md) with [exact circular reference and binding support](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/circular-references-bindings.md).
-* Loads [ES6 modules compiled into the `System.register` bundle format for production](docs/production-workflows.md), maintaining circular references support.
-* Supports RequireJS-style [map](docs/overview.md#map-config), [paths](https://github.com/ModuleLoader/es6-module-loader/blob/master/docs/loader-config.md#paths-implementation), [bundles](docs/production-workflows.md#bundle-extension) and [global shims](docs/module-formats.md#shim-dependencies).
-* [Loader plugins](docs/overview.md#plugin-loaders) allow custom transpilation or asset loading.
-
-Built to the format ES6-specified loader API from [ES6 Specification Draft Rev 27, Section 15](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#august_24_2014_draft_rev_27),
-and will be updated to the [WhatWG loader API](https://whatwg.github.io/loader/) as soon as it can be considered stable for implementation.
-
-~19KB minified and gzipped, runs in IE8+ and NodeJS.
-
-For discussion, join the [Gitter Room](https://gitter.im/systemjs/systemjs).
-
-Documentation
----
-
-* [ES6 Modules Overview](docs/es6-modules-overview.md)
-* [SystemJS Overview](docs/overview.md)
-* [Config API](docs/config-api.md)
-* [Module Formats](docs/module-formats.md)
-* [Production Workflows](docs/production-workflows.md)
-* [System API](docs/system-api.md)
-* [Creating Plugins](docs/creating-plugins.md)
-
-Basic Use
----
-
-### Browser
-
-```html
-<script src="system.js"></script>
-<script>
- // set our baseURL reference path
- SystemJS.config({
- baseURL: '/js'
- });
-
- // loads /js/main.js
- SystemJS.import('main.js');
-</script>
-```
-
-The above will support loading all module formats, including ES Modules transpiled into the System.register format.
-
-To load ES6 code with in-browser transpilation, configure one of the following transpiler plugins:
-
-* [Babel](https://github.com/systemjs/plugin-babel)
-* [TypeScript](https://github.com/frankwallis/plugin-typescript)
-* [Traceur](http://github.com/systemjs/plugin-traceur)
-
-### Promise Polyfill
-
-SystemJS relies on `Promise` being present in the environment.
-
-For the best performance in IE and older browsers, it is advisable to load a polyfill like [Bluebird](https://github.com/petkaantonov/bluebird) or [es6-promise](https://github.com/stefanpenner/es6-promise) before SystemJS.
-
-Otherwise, when Promise is not available, SystemJS will attempt to load the `system-polyfills.js` file located in the dist folder which contains the when.js Promise polyfill.
-
-### NodeJS
-
-To load modules in NodeJS, install SystemJS with:
-
-```
- npm install systemjs
-```
-
-If transpiling ES6, also install the transpiler plugin, following the instructions from the transpiler project page.
-
-We can then load modules equivalently in NodeJS as we do in the browser:
-
-```javascript
-var SystemJS = require('systemjs');
-
-// loads './app.js' from the current directory
-SystemJS.import('./app.js').then(function(m) {
- console.log(m);
-});
-```
-
-If you are using jspm as a package manager you will also need to load the generated configuration.
-The best way to do this in node is to get your `System` instance through jspm, which will automatically load your config correctly for you:
-
-```js
-var Loader = require('jspm').Loader;
-var SystemJS = new Loader();
-
-SystemJS.import('lodash').then(function (_) {
- console.log(_);
-});
-```
-
-### Plugins
-
-Supported loader plugins:
-
-* [CSS](https://github.com/systemjs/plugin-css)
-* [LESS](https://github.com/systemjs/plugin-less)
-* [Image](https://github.com/systemjs/plugin-image)
-* [JSON](https://github.com/systemjs/plugin-json)
-* [Text](https://github.com/systemjs/plugin-text)
-* [Node Binary](https://github.com/systemjs/plugin-node-binary)
-
-Additional Plugins:
-
-* [Audio](https://github.com/ozsay/plugin-audio)
-* [CoffeeScript](https://github.com/forresto/plugin-coffee)
-* [Ember Handlebars](https://github.com/n-fuse/plugin-ember-hbs)
-* [Handlebars](https://github.com/davis/plugin-hbs)
-* [HTML](https://github.com/Hypercubed/systemjs-plugin-html/)
-* [Image (lazy)](https://github.com/laurentgoudet/plugin-lazyimage)
-* [Jade](https://github.com/johnsoftek/plugin-jade)
-* [Jade VirtualDOM](https://github.com/WorldMaker/system-jade-virtualdom)
-* [jst](https://github.com/podio/plugin-jst)
-* [JSX](https://github.com/floatdrop/plugin-jsx)
-* [Markdown](https://github.com/guybedford/plugin-md)
-* [raw](https://github.com/matthewbauer/plugin-raw)
-* [SASS](https://github.com/screendriver/plugin-sass)
-* [SCSS](https://github.com/kevcjones/plugin-scss)
-* [sofe](https://github.com/CanopyTax/sofe)
-* [SVG](https://github.com/vuzonp/systemjs-plugin-svg)
-* [WebFont](https://github.com/guybedford/plugin-font)
-* [WebWorkers](https://github.com/casperlamboo/plugin-worker)
-* [YAML](https://github.com/tb/plugin-yaml)
-
-Guides:
-
-* [Using plugins](docs/overview.md#plugin-loaders)
-* [Creating plugins](docs/creating-plugins.md)
-
-#### Running the tests
-
-To install the dependencies correctly, run `bower install` from the root of the repo, then open `test/test.html` in a browser with a local server
-or file access flags enabled.
-
-License
----
-
-MIT
-
-[travis-url]: https://travis-ci.org/systemjs/systemjs
-[travis-image]: https://travis-ci.org/systemjs/systemjs.svg?branch=master
diff --git a/thirdparty/systemjs/bench/cjs-sample/cjs.js b/thirdparty/systemjs/bench/cjs-sample/cjs.js
deleted file mode 100644
index 376672579..000000000
--- a/thirdparty/systemjs/bench/cjs-sample/cjs.js
+++ /dev/null
@@ -1,949 +0,0 @@
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- * @providesModule ReactDOMComponent
- */
-
-/* global hasOwnProperty:true */
-
-'use strict';
-
-var _assign = require('object-assign');
-
-var AutoFocusUtils = require('./AutoFocusUtils');
-var CSSPropertyOperations = require('./CSSPropertyOperations');
-var DOMLazyTree = require('./DOMLazyTree');
-var DOMNamespaces = require('./DOMNamespaces');
-var DOMProperty = require('./DOMProperty');
-var DOMPropertyOperations = require('./DOMPropertyOperations');
-var EventConstants = require('./EventConstants');
-var EventPluginHub = require('./EventPluginHub');
-var EventPluginRegistry = require('./EventPluginRegistry');
-var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
-var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
-var ReactDOMButton = require('./ReactDOMButton');
-var ReactDOMComponentFlags = require('./ReactDOMComponentFlags');
-var ReactDOMComponentTree = require('./ReactDOMComponentTree');
-var ReactDOMInput = require('./ReactDOMInput');
-var ReactDOMOption = require('./ReactDOMOption');
-var ReactDOMSelect = require('./ReactDOMSelect');
-var ReactDOMTextarea = require('./ReactDOMTextarea');
-var ReactInstrumentation = require('./ReactInstrumentation');
-var ReactMultiChild = require('./ReactMultiChild');
-var ReactServerRenderingTransaction = require('./ReactServerRenderingTransaction');
-
-var emptyFunction = require('fbjs/lib/emptyFunction');
-var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
-var invariant = require('fbjs/lib/invariant');
-var isEventSupported = require('./isEventSupported');
-var keyOf = require('fbjs/lib/keyOf');
-var shallowEqual = require('fbjs/lib/shallowEqual');
-var validateDOMNesting = require('./validateDOMNesting');
-var warning = require('fbjs/lib/warning');
-
-var Flags = ReactDOMComponentFlags;
-var deleteListener = EventPluginHub.deleteListener;
-var getNode = ReactDOMComponentTree.getNodeFromInstance;
-var listenTo = ReactBrowserEventEmitter.listenTo;
-var registrationNameModules = EventPluginRegistry.registrationNameModules;
-
-// For quickly matching children type, to test if can be treated as content.
-var CONTENT_TYPES = { 'string': true, 'number': true };
-
-var STYLE = keyOf({ style: null });
-var HTML = keyOf({ __html: null });
-var RESERVED_PROPS = {
- children: null,
- dangerouslySetInnerHTML: null,
- suppressContentEditableWarning: null
-};
-
-// Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).
-var DOC_FRAGMENT_TYPE = 11;
-
-function getDeclarationErrorAddendum(internalInstance) {
- if (internalInstance) {
- var owner = internalInstance._currentElement._owner || null;
- if (owner) {
- var name = owner.getName();
- if (name) {
- return ' This DOM node was rendered by `' + name + '`.';
- }
- }
- }
- return '';
-}
-
-function friendlyStringify(obj) {
- if (typeof obj === 'object') {
- if (Array.isArray(obj)) {
- return '[' + obj.map(friendlyStringify).join(', ') + ']';
- } else {
- var pairs = [];
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
- pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
- }
- }
- return '{' + pairs.join(', ') + '}';
- }
- } else if (typeof obj === 'string') {
- return JSON.stringify(obj);
- } else if (typeof obj === 'function') {
- return '[function object]';
- }
- // Differs from JSON.stringify in that undefined because undefined and that
- // inf and nan don't become null
- return String(obj);
-}
-
-var styleMutationWarning = {};
-
-function checkAndWarnForMutatedStyle(style1, style2, component) {
- if (style1 == null || style2 == null) {
- return;
- }
- if (shallowEqual(style1, style2)) {
- return;
- }
-
- var componentName = component._tag;
- var owner = component._currentElement._owner;
- var ownerName;
- if (owner) {
- ownerName = owner.getName();
- }
-
- var hash = ownerName + '|' + componentName;
-
- if (styleMutationWarning.hasOwnProperty(hash)) {
- return;
- }
-
- styleMutationWarning[hash] = true;
-
- process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
-}
-
-/**
- * @param {object} component
- * @param {?object} props
- */
-function assertValidProps(component, props) {
- if (!props) {
- return;
- }
- // Note the use of `==` which checks for null or undefined.
- if (voidElementTags[component._tag]) {
- !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must not have `children` or ' + 'use `props.dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : invariant(false) : void 0;
- }
- if (props.dangerouslySetInnerHTML != null) {
- !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(false) : void 0;
- !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(false) : void 0;
- }
- if (process.env.NODE_ENV !== 'production') {
- process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
- process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
- process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;
- }
- !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, ' + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + 'using JSX.%s', getDeclarationErrorAddendum(component)) : invariant(false) : void 0;
-}
-
-function enqueuePutListener(inst, registrationName, listener, transaction) {
- if (transaction instanceof ReactServerRenderingTransaction) {
- return;
- }
- if (process.env.NODE_ENV !== 'production') {
- // IE8 has no API for event capturing and the `onScroll` event doesn't
- // bubble.
- process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0;
- }
- var containerInfo = inst._nativeContainerInfo;
- var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
- var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
- listenTo(registrationName, doc);
- transaction.getReactMountReady().enqueue(putListener, {
- inst: inst,
- registrationName: registrationName,
- listener: listener
- });
-}
-
-function putListener() {
- var listenerToPut = this;
- EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
-}
-
-function optionPostMount() {
- var inst = this;
- ReactDOMOption.postMountWrapper(inst);
-}
-
-var setContentChildForInstrumentation = emptyFunction;
-if (process.env.NODE_ENV !== 'production') {
- setContentChildForInstrumentation = function (contentToUse) {
- var debugID = this._debugID;
- var contentDebugID = debugID + '#text';
- this._contentDebugID = contentDebugID;
- ReactInstrumentation.debugTool.onSetDisplayName(contentDebugID, '#text');
- ReactInstrumentation.debugTool.onSetText(contentDebugID, '' + contentToUse);
- ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
- ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
- };
-}
-
-// There are so many media events, it makes sense to just
-// maintain a list rather than create a `trapBubbledEvent` for each
-var mediaEvents = {
- topAbort: 'abort',
- topCanPlay: 'canplay',
- topCanPlayThrough: 'canplaythrough',
- topDurationChange: 'durationchange',
- topEmptied: 'emptied',
- topEncrypted: 'encrypted',
- topEnded: 'ended',
- topError: 'error',
- topLoadedData: 'loadeddata',
- topLoadedMetadata: 'loadedmetadata',
- topLoadStart: 'loadstart',
- topPause: 'pause',
- topPlay: 'play',
- topPlaying: 'playing',
- topProgress: 'progress',
- topRateChange: 'ratechange',
- topSeeked: 'seeked',
- topSeeking: 'seeking',
- topStalled: 'stalled',
- topSuspend: 'suspend',
- topTimeUpdate: 'timeupdate',
- topVolumeChange: 'volumechange',
- topWaiting: 'waiting'
-};
-
-function trapBubbledEventsLocal() {
- var inst = this;
- // If a component renders to null or if another component fatals and causes
- // the state of the tree to be corrupted, `node` here can be null.
- !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : invariant(false) : void 0;
- var node = getNode(inst);
- !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : invariant(false) : void 0;
-
- switch (inst._tag) {
- case 'iframe':
- case 'object':
- inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
- break;
- case 'video':
- case 'audio':
-
- inst._wrapperState.listeners = [];
- // Create listener for each media event
- for (var event in mediaEvents) {
- if (mediaEvents.hasOwnProperty(event)) {
- inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event], mediaEvents[event], node));
- }
- }
-
- break;
- case 'img':
- inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
- break;
- case 'form':
- inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit', node)];
- break;
- case 'input':
- case 'select':
- case 'textarea':
- inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topInvalid, 'invalid', node)];
- break;
- }
-}
-
-function postUpdateSelectWrapper() {
- ReactDOMSelect.postUpdateWrapper(this);
-}
-
-// For HTML, certain tags should omit their close tag. We keep a whitelist for
-// those special-case tags.
-
-var omittedCloseTags = {
- 'area': true,
- 'base': true,
- 'br': true,
- 'col': true,
- 'embed': true,
- 'hr': true,
- 'img': true,
- 'input': true,
- 'keygen': true,
- 'link': true,
- 'meta': true,
- 'param': true,
- 'source': true,
- 'track': true,
- 'wbr': true
-};
-
-// NOTE: menuitem's close tag should be omitted, but that causes problems.
-var newlineEatingTags = {
- 'listing': true,
- 'pre': true,
- 'textarea': true
-};
-
-// For HTML, certain tags cannot have children. This has the same purpose as
-// `omittedCloseTags` except that `menuitem` should still have its closing tag.
-
-var voidElementTags = _assign({
- 'menuitem': true
-}, omittedCloseTags);
-
-// We accept any tag to be rendered but since this gets injected into arbitrary
-// HTML, we want to make sure that it's a safe tag.
-// http://www.w3.org/TR/REC-xml/#NT-Name
-
-var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
-var validatedTagCache = {};
-var hasOwnProperty = {}.hasOwnProperty;
-
-function validateDangerousTag(tag) {
- if (!hasOwnProperty.call(validatedTagCache, tag)) {
- !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : invariant(false) : void 0;
- validatedTagCache[tag] = true;
- }
-}
-
-function isCustomComponent(tagName, props) {
- return tagName.indexOf('-') >= 0 || props.is != null;
-}
-
-var globalIdCounter = 1;
-
-/**
- * Creates a new React class that is idempotent and capable of containing other
- * React components. It accepts event listeners and DOM properties that are
- * valid according to `DOMProperty`.
- *
- * - Event listeners: `onClick`, `onMouseDown`, etc.
- * - DOM properties: `className`, `name`, `title`, etc.
- *
- * The `style` property functions differently from the DOM API. It accepts an
- * object mapping of style properties to values.
- *
- * @constructor ReactDOMComponent
- * @extends ReactMultiChild
- */
-function ReactDOMComponent(element) {
- var tag = element.type;
- validateDangerousTag(tag);
- this._currentElement = element;
- this._tag = tag.toLowerCase();
- this._namespaceURI = null;
- this._renderedChildren = null;
- this._previousStyle = null;
- this._previousStyleCopy = null;
- this._nativeNode = null;
- this._nativeParent = null;
- this._rootNodeID = null;
- this._domID = null;
- this._nativeContainerInfo = null;
- this._wrapperState = null;
- this._topLevelWrapper = null;
- this._flags = 0;
- if (process.env.NODE_ENV !== 'production') {
- this._ancestorInfo = null;
- this._contentDebugID = null;
- }
-}
-
-ReactDOMComponent.displayName = 'ReactDOMComponent';
-
-ReactDOMComponent.Mixin = {
-
- /**
- * Generates root tag markup then recurses. This method has side effects and
- * is not idempotent.
- *
- * @internal
- * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
- * @param {?ReactDOMComponent} the containing DOM component instance
- * @param {?object} info about the native container
- * @param {object} context
- * @return {string} The computed markup.
- */
- mountComponent: function (transaction, nativeParent, nativeContainerInfo, context) {
- this._rootNodeID = globalIdCounter++;
- this._domID = nativeContainerInfo._idCounter++;
- this._nativeParent = nativeParent;
- this._nativeContainerInfo = nativeContainerInfo;
-
- var props = this._currentElement.props;
-
- switch (this._tag) {
- case 'iframe':
- case 'object':
- case 'img':
- case 'form':
- case 'video':
- case 'audio':
- this._wrapperState = {
- listeners: null
- };
- transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
- break;
- case 'button':
- props = ReactDOMButton.getNativeProps(this, props, nativeParent);
- break;
- case 'input':
- ReactDOMInput.mountWrapper(this, props, nativeParent);
- props = ReactDOMInput.getNativeProps(this, props);
- transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
- break;
- case 'option':
- ReactDOMOption.mountWrapper(this, props, nativeParent);
- props = ReactDOMOption.getNativeProps(this, props);
- break;
- case 'select':
- ReactDOMSelect.mountWrapper(this, props, nativeParent);
- props = ReactDOMSelect.getNativeProps(this, props);
- transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
- break;
- case 'textarea':
- ReactDOMTextarea.mountWrapper(this, props, nativeParent);
- props = ReactDOMTextarea.getNativeProps(this, props);
- transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
- break;
- }
-
- assertValidProps(this, props);
-
- // We create tags in the namespace of their parent container, except HTML
- // tags get no namespace.
- var namespaceURI;
- var parentTag;
- if (nativeParent != null) {
- namespaceURI = nativeParent._namespaceURI;
- parentTag = nativeParent._tag;
- } else if (nativeContainerInfo._tag) {
- namespaceURI = nativeContainerInfo._namespaceURI;
- parentTag = nativeContainerInfo._tag;
- }
- if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
- namespaceURI = DOMNamespaces.html;
- }
- if (namespaceURI === DOMNamespaces.html) {
- if (this._tag === 'svg') {
- namespaceURI = DOMNamespaces.svg;
- } else if (this._tag === 'math') {
- namespaceURI = DOMNamespaces.mathml;
- }
- }
- this._namespaceURI = namespaceURI;
-
- if (process.env.NODE_ENV !== 'production') {
- var parentInfo;
- if (nativeParent != null) {
- parentInfo = nativeParent._ancestorInfo;
- } else if (nativeContainerInfo._tag) {
- parentInfo = nativeContainerInfo._ancestorInfo;
- }
- if (parentInfo) {
- // parentInfo should always be present except for the top-level
- // component when server rendering
- validateDOMNesting(this._tag, this, parentInfo);
- }
- this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
- }
-
- var mountImage;
- if (transaction.useCreateElement) {
- var ownerDocument = nativeContainerInfo._ownerDocument;
- var el;
- if (namespaceURI === DOMNamespaces.html) {
- if (this._tag === 'script') {
- // Create the script via .innerHTML so its "parser-inserted" flag is
- // set to true and it does not execute
- var div = ownerDocument.createElement('div');
- var type = this._currentElement.type;
- div.innerHTML = '<' + type + '></' + type + '>';
- el = div.removeChild(div.firstChild);
- } else {
- el = ownerDocument.createElement(this._currentElement.type, props.is || null);
- }
- } else {
- el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
- }
- ReactDOMComponentTree.precacheNode(this, el);
- this._flags |= Flags.hasCachedChildNodes;
- if (!this._nativeParent) {
- DOMPropertyOperations.setAttributeForRoot(el);
- }
- this._updateDOMProperties(null, props, transaction);
- var lazyTree = DOMLazyTree(el);
- this._createInitialChildren(transaction, props, context, lazyTree);
- mountImage = lazyTree;
- } else {
- var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
- var tagContent = this._createContentMarkup(transaction, props, context);
- if (!tagContent && omittedCloseTags[this._tag]) {
- mountImage = tagOpen + '/>';
- } else {
- mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
- }
- }
-
- switch (this._tag) {
- case 'button':
- case 'input':
- case 'select':
- case 'textarea':
- if (props.autoFocus) {
- transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
- }
- break;
- case 'option':
- transaction.getReactMountReady().enqueue(optionPostMount, this);
- }
-
- return mountImage;
- },
-
- /**
- * Creates markup for the open tag and all attributes.
- *
- * This method has side effects because events get registered.
- *
- * Iterating over object properties is faster than iterating over arrays.
- * @see http://jsperf.com/obj-vs-arr-iteration
- *
- * @private
- * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
- * @param {object} props
- * @return {string} Markup of opening tag.
- */
- _createOpenTagMarkupAndPutListeners: function (transaction, props) {
- var ret = '<' + this._currentElement.type;
-
- for (var propKey in props) {
- if (!props.hasOwnProperty(propKey)) {
- continue;
- }
- var propValue = props[propKey];
- if (propValue == null) {
- continue;
- }
- if (registrationNameModules.hasOwnProperty(propKey)) {
- if (propValue) {
- enqueuePutListener(this, propKey, propValue, transaction);
- }
- } else {
- if (propKey === STYLE) {
- if (propValue) {
- if (process.env.NODE_ENV !== 'production') {
- // See `_updateDOMProperties`. style block
- this._previousStyle = propValue;
- }
- propValue = this._previousStyleCopy = _assign({}, props.style);
- }
- propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
- }
- var markup = null;
- if (this._tag != null && isCustomComponent(this._tag, props)) {
- if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
- markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
- }
- } else {
- markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
- }
- if (markup) {
- ret += ' ' + markup;
- }
- }
- }
-
- // For static pages, no need to put React ID and checksum. Saves lots of
- // bytes.
- if (transaction.renderToStaticMarkup) {
- return ret;
- }
-
- if (!this._nativeParent) {
- ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
- }
- ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
- return ret;
- },
-
- /**
- * Creates markup for the content between the tags.
- *
- * @private
- * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
- * @param {object} props
- * @param {object} context
- * @return {string} Content markup.
- */
- _createContentMarkup: function (transaction, props, context) {
- var ret = '';
-
- // Intentional use of != to avoid catching zero/false.
- var innerHTML = props.dangerouslySetInnerHTML;
- if (innerHTML != null) {
- if (innerHTML.__html != null) {
- ret = innerHTML.__html;
- }
- } else {
- var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
- var childrenToUse = contentToUse != null ? null : props.children;
- if (contentToUse != null) {
- // TODO: Validate that text is allowed as a child of this node
- ret = escapeTextContentForBrowser(contentToUse);
- if (process.env.NODE_ENV !== 'production') {
- setContentChildForInstrumentation.call(this, contentToUse);
- }
- } else if (childrenToUse != null) {
- var mountImages = this.mountChildren(childrenToUse, transaction, context);
- ret = mountImages.join('');
- }
- }
- if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
- // text/html ignores the first character in these tags if it's a newline
- // Prefer to break application/xml over text/html (for now) by adding
- // a newline specifically to get eaten by the parser. (Alternately for
- // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
- // \r is normalized out by HTMLTextAreaElement#value.)
- // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
- // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
- // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
- // See: Parsing of "textarea" "listing" and "pre" elements
- // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
- return '\n' + ret;
- } else {
- return ret;
- }
- },
-
- _createInitialChildren: function (transaction, props, context, lazyTree) {
- // Intentional use of != to avoid catching zero/false.
- var innerHTML = props.dangerouslySetInnerHTML;
- if (innerHTML != null) {
- if (innerHTML.__html != null) {
- DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
- }
- } else {
- var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
- var childrenToUse = contentToUse != null ? null : props.children;
- if (contentToUse != null) {
- // TODO: Validate that text is allowed as a child of this node
- if (process.env.NODE_ENV !== 'production') {
- setContentChildForInstrumentation.call(this, contentToUse);
- }
- DOMLazyTree.queueText(lazyTree, contentToUse);
- } else if (childrenToUse != null) {
- var mountImages = this.mountChildren(childrenToUse, transaction, context);
- for (var i = 0; i < mountImages.length; i++) {
- DOMLazyTree.queueChild(lazyTree, mountImages[i]);
- }
- }
- }
- },
-
- /**
- * Receives a next element and updates the component.
- *
- * @internal
- * @param {ReactElement} nextElement
- * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
- * @param {object} context
- */
- receiveComponent: function (nextElement, transaction, context) {
- var prevElement = this._currentElement;
- this._currentElement = nextElement;
- this.updateComponent(transaction, prevElement, nextElement, context);
- },
-
- /**
- * Updates a native DOM component after it has already been allocated and
- * attached to the DOM. Reconciles the root DOM node, then recurses.
- *
- * @param {ReactReconcileTransaction} transaction
- * @param {ReactElement} prevElement
- * @param {ReactElement} nextElement
- * @internal
- * @overridable
- */
- updateComponent: function (transaction, prevElement, nextElement, context) {
- var lastProps = prevElement.props;
- var nextProps = this._currentElement.props;
-
- switch (this._tag) {
- case 'button':
- lastProps = ReactDOMButton.getNativeProps(this, lastProps);
- nextProps = ReactDOMButton.getNativeProps(this, nextProps);
- break;
- case 'input':
- ReactDOMInput.updateWrapper(this);
- lastProps = ReactDOMInput.getNativeProps(this, lastProps);
- nextProps = ReactDOMInput.getNativeProps(this, nextProps);
- break;
- case 'option':
- lastProps = ReactDOMOption.getNativeProps(this, lastProps);
- nextProps = ReactDOMOption.getNativeProps(this, nextProps);
- break;
- case 'select':
- lastProps = ReactDOMSelect.getNativeProps(this, lastProps);
- nextProps = ReactDOMSelect.getNativeProps(this, nextProps);
- break;
- case 'textarea':
- ReactDOMTextarea.updateWrapper(this);
- lastProps = ReactDOMTextarea.getNativeProps(this, lastProps);
- nextProps = ReactDOMTextarea.getNativeProps(this, nextProps);
- break;
- }
-
- assertValidProps(this, nextProps);
- this._updateDOMProperties(lastProps, nextProps, transaction);
- this._updateDOMChildren(lastProps, nextProps, transaction, context);
-
- if (this._tag === 'select') {
- // <select> value update needs to occur after <option> children
- // reconciliation
- transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
- }
- },
-
- /**
- * Reconciles the properties by detecting differences in property values and
- * updating the DOM as necessary. This function is probably the single most
- * critical path for performance optimization.
- *
- * TODO: Benchmark whether checking for changed values in memory actually
- * improves performance (especially statically positioned elements).
- * TODO: Benchmark the effects of putting this at the top since 99% of props
- * do not change for a given reconciliation.
- * TODO: Benchmark areas that can be improved with caching.
- *
- * @private
- * @param {object} lastProps
- * @param {object} nextProps
- * @param {?DOMElement} node
- */
- _updateDOMProperties: function (lastProps, nextProps, transaction) {
- var propKey;
- var styleName;
- var styleUpdates;
- for (propKey in lastProps) {
- if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
- continue;
- }
- if (propKey === STYLE) {
- var lastStyle = this._previousStyleCopy;
- for (styleName in lastStyle) {
- if (lastStyle.hasOwnProperty(styleName)) {
- styleUpdates = styleUpdates || {};
- styleUpdates[styleName] = '';
- }
- }
- this._previousStyleCopy = null;
- } else if (registrationNameModules.hasOwnProperty(propKey)) {
- if (lastProps[propKey]) {
- // Only call deleteListener if there was a listener previously or
- // else willDeleteListener gets called when there wasn't actually a
- // listener (e.g., onClick={null})
- deleteListener(this, propKey);
- }
- } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
- DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
- }
- }
- for (propKey in nextProps) {
- var nextProp = nextProps[propKey];
- var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
- if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
- continue;
- }
- if (propKey === STYLE) {
- if (nextProp) {
- if (process.env.NODE_ENV !== 'production') {
- checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
- this._previousStyle = nextProp;
- }
- nextProp = this._previousStyleCopy = _assign({}, nextProp);
- } else {
- this._previousStyleCopy = null;
- }
- if (lastProp) {
- // Unset styles on `lastProp` but not on `nextProp`.
- for (styleName in lastProp) {
- if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
- styleUpdates = styleUpdates || {};
- styleUpdates[styleName] = '';
- }
- }
- // Update styles that changed since `lastProp`.
- for (styleName in nextProp) {
- if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
- styleUpdates = styleUpdates || {};
- styleUpdates[styleName] = nextProp[styleName];
- }
- }
- } else {
- // Relies on `updateStylesByID` not mutating `styleUpdates`.
- styleUpdates = nextProp;
- }
- } else if (registrationNameModules.hasOwnProperty(propKey)) {
- if (nextProp) {
- enqueuePutListener(this, propKey, nextProp, transaction);
- } else if (lastProp) {
- deleteListener(this, propKey);
- }
- } else if (isCustomComponent(this._tag, nextProps)) {
- if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
- DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
- }
- } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
- var node = getNode(this);
- // If we're updating to null or undefined, we should remove the property
- // from the DOM node instead of inadvertently setting to a string. This
- // brings us in line with the same behavior we have on initial render.
- if (nextProp != null) {
- DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
- } else {
- DOMPropertyOperations.deleteValueForProperty(node, propKey);
- }
- }
- }
- if (styleUpdates) {
- CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
- }
- },
-
- /**
- * Reconciles the children with the various properties that affect the
- * children content.
- *
- * @param {object} lastProps
- * @param {object} nextProps
- * @param {ReactReconcileTransaction} transaction
- * @param {object} context
- */
- _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
- var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
- var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
-
- var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
- var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
-
- // Note the use of `!=` which checks for null or undefined.
- var lastChildren = lastContent != null ? null : lastProps.children;
- var nextChildren = nextContent != null ? null : nextProps.children;
-
- // If we're switching from children to content/html or vice versa, remove
- // the old content
- var lastHasContentOrHtml = lastContent != null || lastHtml != null;
- var nextHasContentOrHtml = nextContent != null || nextHtml != null;
- if (lastChildren != null && nextChildren == null) {
- this.updateChildren(null, transaction, context);
- } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
- this.updateTextContent('');
- if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
- }
- }
-
- if (nextContent != null) {
- if (lastContent !== nextContent) {
- this.updateTextContent('' + nextContent);
- if (process.env.NODE_ENV !== 'production') {
- this._contentDebugID = this._debugID + '#text';
- setContentChildForInstrumentation.call(this, nextContent);
- }
- }
- } else if (nextHtml != null) {
- if (lastHtml !== nextHtml) {
- this.updateMarkup('' + nextHtml);
- }
- if (process.env.NODE_ENV !== 'production') {
- ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
- }
- } else if (nextChildren != null) {
- if (process.env.NODE_ENV !== 'production') {
- if (this._contentDebugID) {
- ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
- this._contentDebugID = null;
- }
- }
-
- this.updateChildren(nextChildren, transaction, context);
- }
- },
-
- getNativeNode: function () {
- return getNode(this);
- },
-
- /**
- * Destroys all event registrations for this instance. Does not remove from
- * the DOM. That must be done by the parent.
- *
- * @internal
- */
- unmountComponent: function (safely) {
- switch (this._tag) {
- case 'iframe':
- case 'object':
- case 'img':
- case 'form':
- case 'video':
- case 'audio':
- var listeners = this._wrapperState.listeners;
- if (listeners) {
- for (var i = 0; i < listeners.length; i++) {
- listeners[i].remove();
- }
- }
- break;
- case 'html':
- case 'head':
- case 'body':
- /**
- * Components like <html> <head> and <body> can't be removed or added
- * easily in a cross-browser way, however it's valuable to be able to
- * take advantage of React's reconciliation for styling and <title>
- * management. So we just document it and throw in dangerous cases.
- */
- !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is ' + 'impossible to unmount some top-level components (eg <html>, ' + '<head>, and <body>) reliably and efficiently. To fix this, have a ' + 'single top-level component that never unmounts render these ' + 'elements.', this._tag) : invariant(false) : void 0;
- break;
- }
-
- this.unmountChildren(safely);
- ReactDOMComponentTree.uncacheNode(this);
- EventPluginHub.deleteAllListeners(this);
- ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
- this._rootNodeID = null;
- this._domID = null;
- this._wrapperState = null;
-
- if (process.env.NODE_ENV !== 'production') {
- if (this._contentDebugID) {
- ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
- this._contentDebugID = null;
- }
- }
- },
-
- getPublicInstance: function () {
- return getNode(this);
- }
-
-};
-
-_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
-
-module.exports = ReactDOMComponent; \ No newline at end of file
diff --git a/thirdparty/systemjs/bench/config-example/config.js b/thirdparty/systemjs/bench/config-example/config.js
deleted file mode 100644
index fc0dc184a..000000000
--- a/thirdparty/systemjs/bench/config-example/config.js
+++ /dev/null
@@ -1,1474 +0,0 @@
-SystemJS.config({
- paths: {
- 'npm:': 'npm/',
- 'github:': 'github/'
- },
- packageConfigPaths: [
- "npm:@*/*.json",
- "npm:*.json",
- "github:*/*.json"
- ],
- devConfig: {
- "map": {
- "plugin-babel": "npm:systemjs-plugin-babel@0.0.10"
- }
- },
- transpiler: "plugin-babel"
-});
-
-SystemJS.config({
- map: {
- "angular": "github:angular/bower-angular@1.4.8",
- "assert": "github:jspm/nodelibs-assert@0.2.0-alpha",
- "bootstrap": "github:twbs/bootstrap@3.3.6",
- "buffer": "github:jspm/nodelibs-buffer@0.2.0-alpha",
- "builder": "npm:systemjs-builder@0.15.18",
- "child_process": "github:jspm/nodelibs-child_process@0.2.0-alpha",
- "clean-css": "npm:clean-css@3.4.9",
- "cluster": "github:jspm/nodelibs-cluster@0.2.0-alpha",
- "console": "github:jspm/nodelibs-console@0.2.0-alpha",
- "constants": "github:jspm/nodelibs-constants@0.2.0-alpha",
- "core-js": "npm:core-js@1.2.6",
- "crypto": "github:jspm/nodelibs-crypto@0.2.0-alpha",
- "css": "github:systemjs/plugin-css@0.1.20",
- "d3": "github:mbostock/d3@3.5.12",
- "dgram": "github:jspm/nodelibs-dgram@0.2.0-alpha",
- "dns": "github:jspm/nodelibs-dns@0.2.0-alpha",
- "domain": "github:jspm/nodelibs-domain@0.2.0-alpha",
- "ecc-jsbn": "npm:ecc-jsbn@0.1.1",
- "ember": "github:components/ember@1.13.2",
- "events": "github:jspm/nodelibs-events@0.2.0-alpha",
- "fs": "github:jspm/nodelibs-fs@0.2.0-alpha",
- "github": "npm:jspm-github@0.14.7",
- "http": "github:jspm/nodelibs-http@0.2.0-alpha",
- "https": "github:jspm/nodelibs-https@0.2.0-alpha",
- "jodid25519": "npm:jodid25519@1.0.2",
- "jquery": "github:components/jquery@2.1.4",
- "jsbn": "npm:jsbn@0.1.0",
- "jspm": "github:jspm/jspm-cli@0.17",
- "jspm-registry": "npm:jspm-registry@0.4.0",
- "mocha": "npm:mocha@1.21.5",
- "module": "github:jspm/nodelibs-module@0.2.0-alpha",
- "net": "github:jspm/nodelibs-net@0.2.0-alpha",
- "npm": "npm:jspm-npm@0.28.12",
- "os": "github:jspm/nodelibs-os@0.2.0-alpha",
- "path": "github:jspm/nodelibs-path@0.2.0-alpha",
- "process": "github:jspm/nodelibs-process@0.2.0-alpha",
- "punycode": "github:jspm/nodelibs-punycode@0.2.0-alpha",
- "querystring": "github:jspm/nodelibs-querystring@0.2.0-alpha",
- "readline": "github:jspm/nodelibs-readline@0.2.0-alpha",
- "repl": "github:jspm/nodelibs-repl@0.2.0-alpha",
- "rsvp": "npm:rsvp@3.1.0",
- "source-map": "npm:source-map@0.5.3",
- "sshpk": "npm:sshpk@1.7.3",
- "stream": "github:jspm/nodelibs-stream@0.2.0-alpha",
- "string_decoder": "github:jspm/nodelibs-string_decoder@0.2.0-alpha",
- "systemjs": "npm:systemjs@0.19.29",
- "text": "github:systemjs/plugin-text@0.0.2",
- "timers": "github:jspm/nodelibs-timers@0.2.0-alpha",
- "tls": "github:jspm/nodelibs-tls@0.2.0-alpha",
- "tty": "github:jspm/nodelibs-tty@0.2.0-alpha",
- "tweetnacl": "npm:tweetnacl@0.14.1",
- "url": "github:jspm/nodelibs-url@0.2.0-alpha",
- "util": "github:jspm/nodelibs-util@0.2.0-alpha",
- "vm": "github:jspm/nodelibs-vm@0.2.0-alpha",
- "voxel-demo": "npm:voxel-demo@0.0.1",
- "zlib": "github:jspm/nodelibs-zlib@0.2.0-alpha"
- }
-});
-
-SystemJS.config({
- packages: {
- "npm:asn1.js@4.5.1": {
- "map": {
- "bn.js": "npm:bn.js@4.11.0",
- "inherits": "npm:inherits@2.0.1",
- "minimalistic-assert": "npm:minimalistic-assert@1.0.0"
- }
- },
- "npm:babel-code-frame@6.7.7": {
- "map": {
- "babel-runtime": "npm:babel-runtime@5.8.38",
- "chalk": "npm:chalk@1.1.1",
- "esutils": "npm:esutils@2.0.2",
- "js-tokens": "npm:js-tokens@1.0.3"
- }
- },
- "npm:babel-helper-hoist-variables@6.6.5": {
- "map": {
- "babel-runtime": "npm:babel-runtime@5.8.38",
- "babel-types": "npm:babel-types@6.7.7"
- }
- },
- "npm:babel-messages@6.7.2": {
- "map": {
- "babel-runtime": "npm:babel-runtime@5.8.38"
- }
- },
- "npm:babel-plugin-transform-es2015-modules-systemjs@6.6.5": {
- "map": {
- "babel-helper-hoist-variables": "npm:babel-helper-hoist-variables@6.6.5",
- "babel-plugin-transform-strict-mode": "npm:babel-plugin-transform-strict-mode@6.6.5",
- "babel-runtime": "npm:babel-runtime@5.8.38",
- "babel-template": "npm:babel-template@6.7.0"
- }
- },
- "npm:babel-plugin-transform-strict-mode@6.6.5": {
- "map": {
- "babel-runtime": "npm:babel-runtime@5.8.38",
- "babel-types": "npm:babel-types@6.7.7"
- }
- },
- "npm:babel-template@6.7.0": {
- "map": {
- "babel-runtime": "npm:babel-runtime@5.8.38",
- "babel-traverse": "npm:babel-traverse@6.7.6",
- "babel-types": "npm:babel-types@6.7.7",
- "babylon": "npm:babylon@6.7.0",
- "lodash": "npm:lodash@3.10.1"
- }
- },
- "npm:babel-traverse@6.7.6": {
- "map": {
- "babel-code-frame": "npm:babel-code-frame@6.7.7",
- "babel-messages": "npm:babel-messages@6.7.2",
- "babel-runtime": "npm:babel-runtime@5.8.38",
- "babel-types": "npm:babel-types@6.7.7",
- "babylon": "npm:babylon@6.7.0",
- "debug": "npm:debug@2.2.0",
- "globals": "npm:globals@8.18.0",
- "invariant": "npm:invariant@2.2.1",
- "lodash": "npm:lodash@3.10.1",
- "repeating": "npm:repeating@1.1.3"
- }
- },
- "npm:babel-types@6.7.7": {
- "map": {
- "babel-runtime": "npm:babel-runtime@5.8.38",
- "babel-traverse": "npm:babel-traverse@6.7.6",
- "esutils": "npm:esutils@2.0.2",
- "lodash": "npm:lodash@3.10.1",
- "to-fast-properties": "npm:to-fast-properties@1.0.2"
- }
- },
- "npm:babylon@6.7.0": {
- "map": {
- "babel-runtime": "npm:babel-runtime@5.8.38"
- }
- },
- "npm:browserify-aes@1.0.6": {
- "map": {
- "buffer-xor": "npm:buffer-xor@1.0.3",
- "cipher-base": "npm:cipher-base@1.0.2",
- "create-hash": "npm:create-hash@1.1.2",
- "evp_bytestokey": "npm:evp_bytestokey@1.0.0",
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:browserify-rsa@4.0.1": {
- "map": {
- "bn.js": "npm:bn.js@4.11.0",
- "randombytes": "npm:randombytes@2.0.3"
- }
- },
- "npm:bser@1.0.2": {
- "map": {
- "node-int64": "npm:node-int64@0.4.0"
- }
- },
- "npm:buffer@4.5.0": {
- "map": {
- "base64-js": "npm:base64-js@1.1.1",
- "ieee754": "npm:ieee754@1.1.6",
- "isarray": "npm:isarray@1.0.0"
- }
- },
- "npm:dashdash@1.13.0": {
- "map": {
- "assert-plus": "npm:assert-plus@1.0.0"
- }
- },
- "npm:debug@2.2.0": {
- "map": {
- "ms": "npm:ms@0.7.1"
- }
- },
- "npm:detect-indent@3.0.1": {
- "map": {
- "get-stdin": "npm:get-stdin@4.0.1",
- "minimist": "npm:minimist@1.2.0",
- "repeating": "npm:repeating@1.1.3"
- }
- },
- "npm:diffie-hellman@5.0.2": {
- "map": {
- "bn.js": "npm:bn.js@4.11.0",
- "miller-rabin": "npm:miller-rabin@4.0.0",
- "randombytes": "npm:randombytes@2.0.3"
- }
- },
- "npm:elliptic@6.2.3": {
- "map": {
- "bn.js": "npm:bn.js@4.11.0",
- "brorand": "npm:brorand@1.0.5",
- "hash.js": "npm:hash.js@1.0.3",
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:exec-sh@0.2.0": {
- "map": {
- "merge": "npm:merge@1.2.0"
- }
- },
- "npm:fb-watchman@1.9.0": {
- "map": {
- "bser": "npm:bser@1.0.2"
- }
- },
- "npm:glob@6.0.4": {
- "map": {
- "inflight": "npm:inflight@1.0.4",
- "inherits": "npm:inherits@2.0.1",
- "minimatch": "npm:minimatch@3.0.0",
- "once": "npm:once@1.3.3",
- "path-is-absolute": "npm:path-is-absolute@1.0.0"
- }
- },
- "npm:glob@7.0.3": {
- "map": {
- "inflight": "npm:inflight@1.0.4",
- "inherits": "npm:inherits@2.0.1",
- "minimatch": "npm:minimatch@3.0.0",
- "once": "npm:once@1.3.3",
- "path-is-absolute": "npm:path-is-absolute@1.0.0"
- }
- },
- "npm:graceful-readlink@1.0.1": {
- "map": {}
- },
- "npm:home-or-tmp@1.0.0": {
- "map": {
- "os-tmpdir": "npm:os-tmpdir@1.0.1",
- "user-home": "npm:user-home@1.1.1"
- }
- },
- "npm:inherits@2.0.1": {
- "map": {}
- },
- "npm:invariant@2.2.1": {
- "map": {
- "loose-envify": "npm:loose-envify@1.1.0"
- }
- },
- "npm:is-finite@1.0.1": {
- "map": {
- "number-is-nan": "npm:number-is-nan@1.0.0"
- }
- },
- "github:jspm/jspm-cli@0.17": {
- "map": {
- "bluebird": "npm:bluebird@3.3.5",
- "chalk": "npm:chalk@1.1.1",
- "core-js": "npm:core-js@1.2.6",
- "glob": "npm:glob@6.0.4",
- "graceful-fs": "npm:graceful-fs@4.1.2",
- "jspm-github": "npm:jspm-github@0.14.7",
- "jspm-npm": "npm:jspm-npm@0.28.12",
- "jspm-registry": "npm:jspm-registry@0.4.0",
- "liftoff": "npm:liftoff@2.2.0",
- "minimatch": "npm:minimatch@3.0.0",
- "mkdirp": "npm:mkdirp@0.5.1",
- "ncp": "npm:ncp@2.0.0",
- "proper-lockfile": "npm:proper-lockfile@1.1.1",
- "request": "npm:request@2.67.0",
- "rimraf": "npm:rimraf@2.5.0",
- "sane": "npm:sane@1.3.3",
- "semver": "npm:semver@5.1.0",
- "systemjs": "npm:systemjs@0.19.29",
- "systemjs-builder": "npm:systemjs-builder@0.15.18",
- "traceur": "npm:traceur@0.0.105",
- "uglify-js": "npm:uglify-js@2.6.1",
- "resolve": "npm:resolve@1.1.7"
- }
- },
- "github:jspm/nodelibs-buffer@0.2.0-alpha": {
- "map": {
- "buffer-browserify": "npm:buffer@4.5.0"
- }
- },
- "github:jspm/nodelibs-crypto@0.2.0-alpha": {
- "map": {
- "crypto-browserify": "npm:crypto-browserify@3.11.0"
- }
- },
- "github:jspm/nodelibs-http@0.2.0-alpha": {
- "map": {
- "http-browserify": "npm:stream-http@2.0.5"
- }
- },
- "github:jspm/nodelibs-os@0.2.0-alpha": {
- "map": {
- "os-browserify": "npm:os-browserify@0.2.0"
- }
- },
- "github:jspm/nodelibs-punycode@0.2.0-alpha": {
- "map": {
- "punycode-browserify": "npm:punycode@1.3.2"
- }
- },
- "github:jspm/nodelibs-stream@0.2.0-alpha": {
- "map": {
- "stream-browserify": "npm:stream-browserify@2.0.1"
- }
- },
- "github:jspm/nodelibs-string_decoder@0.2.0-alpha": {
- "map": {
- "string_decoder-browserify": "npm:string_decoder@0.10.31"
- }
- },
- "github:jspm/nodelibs-url@0.2.0-alpha": {
- "map": {
- "url-browserify": "npm:url@0.11.0"
- }
- },
- "github:jspm/nodelibs-zlib@0.2.0-alpha": {
- "map": {
- "zlib-browserify": "npm:browserify-zlib@0.1.4"
- }
- },
- "npm:loose-envify@1.1.0": {
- "map": {
- "js-tokens": "npm:js-tokens@1.0.3"
- }
- },
- "npm:makeerror@1.0.11": {
- "map": {
- "tmpl": "npm:tmpl@1.0.4"
- }
- },
- "npm:minimatch@0.2.14": {
- "map": {
- "lru-cache": "npm:lru-cache@2.7.3",
- "sigmund": "npm:sigmund@1.0.1"
- }
- },
- "npm:mocha@1.21.5": {
- "map": {
- "css": "github:systemjs/plugin-css@0.1.20"
- }
- },
- "npm:repeating@1.1.3": {
- "map": {
- "is-finite": "npm:is-finite@1.0.1"
- }
- },
- "npm:rollup@0.25.8": {
- "map": {
- "chalk": "npm:chalk@1.1.1",
- "minimist": "npm:minimist@1.2.0",
- "source-map-support": "npm:source-map-support@0.3.3"
- }
- },
- "npm:sane@1.3.3": {
- "map": {
- "exec-sh": "npm:exec-sh@0.2.0",
- "fb-watchman": "npm:fb-watchman@1.9.0",
- "minimatch": "npm:minimatch@0.2.14",
- "minimist": "npm:minimist@1.2.0",
- "walker": "npm:walker@1.0.7",
- "watch": "npm:watch@0.10.0"
- }
- },
- "npm:sha.js@2.4.5": {
- "map": {
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:sshpk@1.7.3": {
- "map": {
- "asn1": "npm:asn1@0.2.3",
- "assert-plus": "npm:assert-plus@0.2.0",
- "dashdash": "npm:dashdash@1.13.0"
- }
- },
- "npm:stream-browserify@1.0.0": {
- "map": {
- "inherits": "npm:inherits@2.0.1",
- "readable-stream": "npm:readable-stream@1.0.33"
- }
- },
- "npm:stream-http@2.0.5": {
- "map": {
- "builtin-status-codes": "npm:builtin-status-codes@1.0.0",
- "inherits": "npm:inherits@2.0.1",
- "xtend": "npm:xtend@4.0.1"
- }
- },
- "npm:string_decoder@0.10.31": {
- "map": {}
- },
- "github:twbs/bootstrap@3.3.6": {
- "map": {
- "jquery": "github:components/jquery@2.1.4"
- }
- },
- "npm:align-text@0.1.3": {
- "map": {
- "kind-of": "npm:kind-of@2.0.1",
- "longest": "npm:longest@1.0.1",
- "repeat-string": "npm:repeat-string@1.5.2"
- }
- },
- "npm:ao-mesher@0.2.10": {
- "map": {
- "cwise-compiler": "npm:cwise-compiler@0.1.0",
- "greedy-mesher": "npm:greedy-mesher@1.0.2",
- "ndarray": "npm:ndarray@1.0.18",
- "typedarray-pool": "npm:typedarray-pool@0.1.2"
- }
- },
- "npm:ao-shader@0.2.3": {
- "map": {
- "brfs": "npm:brfs@0.0.9",
- "gl-shader": "npm:gl-shader@0.0.6"
- }
- },
- "npm:bl@0.9.4": {
- "map": {
- "readable-stream": "npm:readable-stream@1.0.33"
- }
- },
- "npm:bl@1.0.0": {
- "map": {
- "readable-stream": "npm:readable-stream@2.0.5"
- }
- },
- "npm:block-stream@0.0.8": {
- "map": {
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:boom@2.10.1": {
- "map": {
- "hoek": "npm:hoek@2.16.3"
- }
- },
- "npm:brace-expansion@1.1.2": {
- "map": {
- "balanced-match": "npm:balanced-match@0.3.0",
- "concat-map": "npm:concat-map@0.0.1"
- }
- },
- "npm:brfs@0.0.9": {
- "map": {
- "escodegen": "npm:escodegen@0.0.17",
- "falafel": "npm:falafel@0.1.6",
- "through": "npm:through@2.2.7"
- }
- },
- "npm:browserify-cipher@1.0.0": {
- "map": {
- "browserify-aes": "npm:browserify-aes@1.0.6",
- "browserify-des": "npm:browserify-des@1.0.0",
- "evp_bytestokey": "npm:evp_bytestokey@1.0.0"
- }
- },
- "npm:browserify-des@1.0.0": {
- "map": {
- "cipher-base": "npm:cipher-base@1.0.2",
- "des.js": "npm:des.js@1.0.0",
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:browserify-sign@4.0.0": {
- "map": {
- "bn.js": "npm:bn.js@4.11.0",
- "browserify-rsa": "npm:browserify-rsa@4.0.1",
- "create-hash": "npm:create-hash@1.1.2",
- "create-hmac": "npm:create-hmac@1.1.4",
- "elliptic": "npm:elliptic@6.2.3",
- "inherits": "npm:inherits@2.0.1",
- "parse-asn1": "npm:parse-asn1@5.0.0"
- }
- },
- "npm:browserify-zlib@0.1.4": {
- "map": {
- "pako": "npm:pako@0.2.8",
- "readable-stream": "npm:readable-stream@1.0.33"
- }
- },
- "npm:center-align@0.1.2": {
- "map": {
- "align-text": "npm:align-text@0.1.3",
- "lazy-cache": "npm:lazy-cache@0.2.7"
- }
- },
- "npm:chalk@1.1.1": {
- "map": {
- "ansi-styles": "npm:ansi-styles@2.1.0",
- "escape-string-regexp": "npm:escape-string-regexp@1.0.4",
- "has-ansi": "npm:has-ansi@2.0.0",
- "strip-ansi": "npm:strip-ansi@3.0.0",
- "supports-color": "npm:supports-color@2.0.0"
- }
- },
- "npm:cipher-base@1.0.2": {
- "map": {
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:clean-css@3.4.9": {
- "map": {
- "commander": "npm:commander@2.8.1",
- "source-map": "npm:source-map@0.4.4"
- }
- },
- "npm:cliui@2.1.0": {
- "map": {
- "center-align": "npm:center-align@0.1.2",
- "right-align": "npm:right-align@0.1.3",
- "wordwrap": "npm:wordwrap@0.0.2"
- }
- },
- "npm:combined-stream@0.0.7": {
- "map": {
- "delayed-stream": "npm:delayed-stream@0.0.5"
- }
- },
- "npm:combined-stream@1.0.5": {
- "map": {
- "delayed-stream": "npm:delayed-stream@1.0.0"
- }
- },
- "npm:commander@2.8.1": {
- "map": {
- "graceful-readlink": "npm:graceful-readlink@1.0.1"
- }
- },
- "npm:commander@2.9.0": {
- "map": {
- "graceful-readlink": "npm:graceful-readlink@1.0.1"
- }
- },
- "npm:create-ecdh@4.0.0": {
- "map": {
- "bn.js": "npm:bn.js@4.11.0",
- "elliptic": "npm:elliptic@6.2.3"
- }
- },
- "npm:create-hash@1.1.2": {
- "map": {
- "cipher-base": "npm:cipher-base@1.0.2",
- "inherits": "npm:inherits@2.0.1",
- "ripemd160": "npm:ripemd160@1.0.1",
- "sha.js": "npm:sha.js@2.4.5"
- }
- },
- "npm:create-hmac@1.1.4": {
- "map": {
- "create-hash": "npm:create-hash@1.1.2",
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:cryptiles@2.0.5": {
- "map": {
- "boom": "npm:boom@2.10.1"
- }
- },
- "npm:crypto-browserify@3.11.0": {
- "map": {
- "browserify-cipher": "npm:browserify-cipher@1.0.0",
- "browserify-sign": "npm:browserify-sign@4.0.0",
- "create-ecdh": "npm:create-ecdh@4.0.0",
- "create-hash": "npm:create-hash@1.1.2",
- "create-hmac": "npm:create-hmac@1.1.4",
- "diffie-hellman": "npm:diffie-hellman@5.0.2",
- "inherits": "npm:inherits@2.0.1",
- "pbkdf2": "npm:pbkdf2@3.0.4",
- "public-encrypt": "npm:public-encrypt@4.0.0",
- "randombytes": "npm:randombytes@2.0.3"
- }
- },
- "npm:cwise-compiler@0.0.0": {
- "map": {
- "uniq": "npm:uniq@0.0.2"
- }
- },
- "npm:cwise-compiler@0.1.0": {
- "map": {
- "uniq": "npm:uniq@0.0.2"
- }
- },
- "npm:cwise-parser@0.0.1": {
- "map": {
- "esprima": "npm:esprima@1.0.4",
- "uniq": "npm:uniq@0.0.2"
- }
- },
- "npm:cwise@0.3.4": {
- "map": {
- "cwise-compiler": "npm:cwise-compiler@0.0.0",
- "cwise-parser": "npm:cwise-parser@0.0.1"
- }
- },
- "npm:d@0.1.1": {
- "map": {
- "es5-ext": "npm:es5-ext@0.10.11"
- }
- },
- "npm:decamelize@1.1.2": {
- "map": {
- "escape-string-regexp": "npm:escape-string-regexp@1.0.4"
- }
- },
- "npm:des.js@1.0.0": {
- "map": {
- "inherits": "npm:inherits@2.0.1",
- "minimalistic-assert": "npm:minimalistic-assert@1.0.0"
- }
- },
- "npm:ecc-jsbn@0.1.1": {
- "map": {
- "jsbn": "npm:jsbn@0.1.0"
- }
- },
- "npm:es5-ext@0.10.11": {
- "map": {
- "es6-iterator": "npm:es6-iterator@2.0.0",
- "es6-symbol": "npm:es6-symbol@3.0.2"
- }
- },
- "npm:es6-iterator@2.0.0": {
- "map": {
- "d": "npm:d@0.1.1",
- "es5-ext": "npm:es5-ext@0.10.11",
- "es6-symbol": "npm:es6-symbol@3.0.2"
- }
- },
- "npm:es6-symbol@3.0.2": {
- "map": {
- "d": "npm:d@0.1.1",
- "es5-ext": "npm:es5-ext@0.10.11"
- }
- },
- "npm:es6-template-strings@2.0.0": {
- "map": {
- "es5-ext": "npm:es5-ext@0.10.11",
- "esniff": "npm:esniff@1.0.0"
- }
- },
- "npm:escodegen@0.0.17": {
- "map": {
- "esprima": "npm:esprima@1.0.4",
- "estraverse": "npm:estraverse@0.0.4"
- }
- },
- "npm:esniff@1.0.0": {
- "map": {
- "d": "npm:d@0.1.1",
- "es5-ext": "npm:es5-ext@0.10.11"
- }
- },
- "npm:evp_bytestokey@1.0.0": {
- "map": {
- "create-hash": "npm:create-hash@1.1.2"
- }
- },
- "npm:expand-tilde@1.2.0": {
- "map": {
- "user-home": "npm:user-home@1.1.1"
- }
- },
- "npm:falafel@0.1.6": {
- "map": {
- "esprima": "npm:esprima@1.0.4"
- }
- },
- "npm:findup-sync@0.3.0": {
- "map": {
- "glob": "npm:glob@5.0.15"
- }
- },
- "npm:form-data@0.2.0": {
- "map": {
- "async": "npm:async@0.9.2",
- "combined-stream": "npm:combined-stream@0.0.7",
- "mime-types": "npm:mime-types@2.0.14"
- }
- },
- "npm:form-data@1.0.0-rc3": {
- "map": {
- "async": "npm:async@1.5.2",
- "combined-stream": "npm:combined-stream@1.0.5",
- "mime-types": "npm:mime-types@2.1.9"
- }
- },
- "npm:fstream@1.0.8": {
- "map": {
- "graceful-fs": "npm:graceful-fs@4.1.2",
- "inherits": "npm:inherits@2.0.1",
- "mkdirp": "npm:mkdirp@0.5.1",
- "rimraf": "npm:rimraf@2.5.0"
- }
- },
- "npm:game-shell@0.1.4": {
- "map": {
- "domready": "npm:domready@0.2.13",
- "invert-hash": "npm:invert-hash@0.0.0",
- "iota-array": "npm:iota-array@0.0.1",
- "lower-bound": "npm:lower-bound@0.0.3",
- "uniq": "npm:uniq@0.0.2",
- "vkey": "npm:vkey@0.0.3"
- }
- },
- "npm:generate-object-property@1.2.0": {
- "map": {
- "is-property": "npm:is-property@1.0.2"
- }
- },
- "npm:gl-buffer@0.1.2": {
- "map": {
- "ndarray": "npm:ndarray@1.0.18",
- "ndarray-ops": "npm:ndarray-ops@1.1.1",
- "typedarray-pool": "npm:typedarray-pool@0.1.2"
- }
- },
- "npm:gl-now@0.0.4": {
- "map": {
- "game-shell": "npm:game-shell@0.1.4",
- "webglew": "npm:webglew@0.0.0"
- }
- },
- "npm:gl-shader@0.0.6": {
- "map": {
- "glsl-exports": "npm:glsl-exports@0.0.0",
- "uniq": "npm:uniq@0.0.2"
- }
- },
- "npm:gl-texture2d@0.1.12": {
- "map": {
- "bit-twiddle": "npm:bit-twiddle@0.0.2",
- "cwise-compiler": "npm:cwise-compiler@0.1.0",
- "ndarray": "npm:ndarray@1.0.18",
- "ndarray-ops": "npm:ndarray-ops@1.1.1",
- "typedarray-pool": "npm:typedarray-pool@1.1.0",
- "webglew": "npm:webglew@0.0.0"
- }
- },
- "npm:gl-tile-map@0.3.0": {
- "map": {
- "gl-texture2d": "npm:gl-texture2d@0.1.12",
- "ndarray": "npm:ndarray@1.0.18",
- "tile-mip-map": "npm:tile-mip-map@0.2.1",
- "webglew": "npm:webglew@0.0.0"
- }
- },
- "npm:gl-vao@0.0.3": {
- "map": {
- "webglew": "npm:webglew@0.0.0"
- }
- },
- "npm:glob@4.5.3": {
- "map": {
- "inflight": "npm:inflight@1.0.4",
- "inherits": "npm:inherits@2.0.1",
- "minimatch": "npm:minimatch@2.0.10",
- "once": "npm:once@1.3.3"
- }
- },
- "npm:glob@5.0.15": {
- "map": {
- "inflight": "npm:inflight@1.0.4",
- "inherits": "npm:inherits@2.0.1",
- "minimatch": "npm:minimatch@3.0.0",
- "once": "npm:once@1.3.3",
- "path-is-absolute": "npm:path-is-absolute@1.0.0"
- }
- },
- "npm:glsl-exports@0.0.0": {
- "map": {
- "glsl-parser": "npm:glsl-parser@0.0.9",
- "glsl-tokenizer": "npm:glsl-tokenizer@0.0.9",
- "through": "npm:through@2.3.8"
- }
- },
- "npm:glsl-parser@0.0.9": {
- "map": {
- "glsl-tokenizer": "npm:glsl-tokenizer@0.0.9",
- "through": "npm:through@1.1.2"
- }
- },
- "npm:glsl-tokenizer@0.0.9": {
- "map": {
- "through": "npm:through@2.3.8"
- }
- },
- "npm:greedy-mesher@1.0.2": {
- "map": {
- "iota-array": "npm:iota-array@1.0.0",
- "typedarray-pool": "npm:typedarray-pool@1.1.0",
- "uniq": "npm:uniq@1.0.1"
- }
- },
- "npm:har-validator@1.8.0": {
- "map": {
- "bluebird": "npm:bluebird@2.10.2",
- "chalk": "npm:chalk@1.1.1",
- "commander": "npm:commander@2.9.0",
- "is-my-json-valid": "npm:is-my-json-valid@2.12.3"
- }
- },
- "npm:har-validator@2.0.3": {
- "map": {
- "chalk": "npm:chalk@1.1.1",
- "commander": "npm:commander@2.9.0",
- "is-my-json-valid": "npm:is-my-json-valid@2.12.3",
- "pinkie-promise": "npm:pinkie-promise@2.0.0"
- }
- },
- "npm:has-ansi@2.0.0": {
- "map": {
- "ansi-regex": "npm:ansi-regex@2.0.0"
- }
- },
- "npm:hash.js@1.0.3": {
- "map": {
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:hawk@2.3.1": {
- "map": {
- "boom": "npm:boom@2.10.1",
- "cryptiles": "npm:cryptiles@2.0.5",
- "hoek": "npm:hoek@2.16.3",
- "sntp": "npm:sntp@1.0.9"
- }
- },
- "npm:hawk@3.1.2": {
- "map": {
- "boom": "npm:boom@2.10.1",
- "cryptiles": "npm:cryptiles@2.0.5",
- "hoek": "npm:hoek@2.16.3",
- "sntp": "npm:sntp@1.0.9"
- }
- },
- "npm:http-signature@0.10.1": {
- "map": {
- "asn1": "npm:asn1@0.1.11",
- "assert-plus": "npm:assert-plus@0.1.5",
- "ctype": "npm:ctype@0.5.3"
- }
- },
- "npm:http-signature@0.11.0": {
- "map": {
- "asn1": "npm:asn1@0.1.11",
- "assert-plus": "npm:assert-plus@0.1.5",
- "ctype": "npm:ctype@0.5.3"
- }
- },
- "npm:http-signature@1.1.0": {
- "map": {
- "assert-plus": "npm:assert-plus@0.1.5",
- "jsprim": "npm:jsprim@1.2.2",
- "sshpk": "npm:sshpk@1.7.3"
- }
- },
- "npm:inflight@1.0.4": {
- "map": {
- "once": "npm:once@1.3.3",
- "wrappy": "npm:wrappy@1.0.1"
- }
- },
- "npm:is-absolute@0.1.7": {
- "map": {
- "is-relative": "npm:is-relative@0.1.3"
- }
- },
- "npm:is-my-json-valid@2.12.3": {
- "map": {
- "generate-function": "npm:generate-function@2.0.0",
- "generate-object-property": "npm:generate-object-property@1.2.0",
- "jsonpointer": "npm:jsonpointer@2.0.0",
- "xtend": "npm:xtend@4.0.1"
- }
- },
- "npm:jodid25519@1.0.2": {
- "map": {
- "jsbn": "npm:jsbn@0.1.0"
- }
- },
- "npm:jspm-registry@0.4.0": {
- "map": {
- "graceful-fs": "npm:graceful-fs@3.0.8",
- "rimraf": "npm:rimraf@2.5.0",
- "rsvp": "npm:rsvp@3.1.0",
- "semver": "npm:semver@4.3.6"
- }
- },
- "npm:jsprim@1.2.2": {
- "map": {
- "extsprintf": "npm:extsprintf@1.0.2",
- "json-schema": "npm:json-schema@0.2.2",
- "verror": "npm:verror@1.3.6"
- }
- },
- "npm:kind-of@2.0.1": {
- "map": {
- "is-buffer": "npm:is-buffer@1.1.1"
- }
- },
- "npm:liftoff@2.2.0": {
- "map": {
- "extend": "npm:extend@2.0.1",
- "findup-sync": "npm:findup-sync@0.3.0",
- "flagged-respawn": "npm:flagged-respawn@0.3.1",
- "rechoir": "npm:rechoir@0.6.2",
- "resolve": "npm:resolve@1.1.6"
- }
- },
- "npm:miller-rabin@4.0.0": {
- "map": {
- "bn.js": "npm:bn.js@4.11.0",
- "brorand": "npm:brorand@1.0.5"
- }
- },
- "npm:mime-types@2.0.14": {
- "map": {
- "mime-db": "npm:mime-db@1.12.0"
- }
- },
- "npm:mime-types@2.1.9": {
- "map": {
- "mime-db": "npm:mime-db@1.21.0"
- }
- },
- "npm:minimatch@2.0.10": {
- "map": {
- "brace-expansion": "npm:brace-expansion@1.1.2"
- }
- },
- "npm:minimatch@3.0.0": {
- "map": {
- "brace-expansion": "npm:brace-expansion@1.1.2"
- }
- },
- "npm:mkdirp@0.5.1": {
- "map": {
- "minimist": "npm:minimist@0.0.8"
- }
- },
- "npm:ndarray-downsample2x@0.1.1": {
- "map": {
- "cwise": "npm:cwise@0.3.4",
- "ndarray-fft": "npm:ndarray-fft@0.1.0",
- "ndarray-ops": "npm:ndarray-ops@1.1.1",
- "ndarray-scratch": "npm:ndarray-scratch@0.0.1"
- }
- },
- "npm:ndarray-fft@0.1.0": {
- "map": {
- "bit-twiddle": "npm:bit-twiddle@0.0.2",
- "cwise": "npm:cwise@0.3.4",
- "ndarray": "npm:ndarray@1.0.18",
- "ndarray-ops": "npm:ndarray-ops@1.1.1",
- "typedarray-pool": "npm:typedarray-pool@0.1.2"
- }
- },
- "npm:ndarray-fill@0.1.0": {
- "map": {
- "cwise": "npm:cwise@0.3.4"
- }
- },
- "npm:ndarray-ops@1.1.1": {
- "map": {
- "cwise-compiler": "npm:cwise-compiler@0.0.0"
- }
- },
- "npm:ndarray-scratch@0.0.1": {
- "map": {
- "ndarray": "npm:ndarray@1.0.18",
- "typedarray-pool": "npm:typedarray-pool@0.1.2"
- }
- },
- "npm:ndarray@1.0.18": {
- "map": {
- "iota-array": "npm:iota-array@1.0.0",
- "is-buffer": "npm:is-buffer@1.1.1"
- }
- },
- "npm:node.extend@1.0.8": {
- "map": {
- "is": "npm:is@0.2.7",
- "object-keys": "npm:object-keys@0.4.0"
- }
- },
- "npm:node.flow@1.2.3": {
- "map": {
- "node.extend": "npm:node.extend@1.0.8"
- }
- },
- "npm:once@1.3.3": {
- "map": {
- "wrappy": "npm:wrappy@1.0.1"
- }
- },
- "npm:parse-asn1@5.0.0": {
- "map": {
- "asn1.js": "npm:asn1.js@4.5.1",
- "browserify-aes": "npm:browserify-aes@1.0.6",
- "create-hash": "npm:create-hash@1.1.2",
- "evp_bytestokey": "npm:evp_bytestokey@1.0.0",
- "pbkdf2": "npm:pbkdf2@3.0.4"
- }
- },
- "npm:pbkdf2@3.0.4": {
- "map": {
- "create-hmac": "npm:create-hmac@1.1.4"
- }
- },
- "npm:pinkie-promise@2.0.0": {
- "map": {
- "pinkie": "npm:pinkie@2.0.1"
- }
- },
- "npm:proper-lockfile@1.1.1": {
- "map": {
- "err-code": "npm:err-code@1.0.0",
- "extend": "npm:extend@3.0.0",
- "graceful-fs": "npm:graceful-fs@4.1.2",
- "retry": "npm:retry@0.8.0"
- }
- },
- "npm:public-encrypt@4.0.0": {
- "map": {
- "bn.js": "npm:bn.js@4.11.0",
- "browserify-rsa": "npm:browserify-rsa@4.0.1",
- "create-hash": "npm:create-hash@1.1.2",
- "parse-asn1": "npm:parse-asn1@5.0.0",
- "randombytes": "npm:randombytes@2.0.3"
- }
- },
- "npm:readable-stream@1.0.33": {
- "map": {
- "core-util-is": "npm:core-util-is@1.0.2",
- "inherits": "npm:inherits@2.0.1",
- "isarray": "npm:isarray@0.0.1",
- "stream-browserify": "npm:stream-browserify@1.0.0",
- "string_decoder": "npm:string_decoder@0.10.31"
- }
- },
- "npm:readable-stream@2.0.5": {
- "map": {
- "core-util-is": "npm:core-util-is@1.0.2",
- "inherits": "npm:inherits@2.0.1",
- "isarray": "npm:isarray@0.0.1",
- "process-nextick-args": "npm:process-nextick-args@1.0.6",
- "string_decoder": "npm:string_decoder@0.10.31",
- "util-deprecate": "npm:util-deprecate@1.0.2"
- }
- },
- "npm:readdirp@2.0.0": {
- "map": {
- "graceful-fs": "npm:graceful-fs@4.1.2",
- "minimatch": "npm:minimatch@2.0.10",
- "readable-stream": "npm:readable-stream@2.0.5"
- }
- },
- "npm:rechoir@0.6.2": {
- "map": {
- "resolve": "npm:resolve@1.1.6"
- }
- },
- "npm:request@2.53.0": {
- "map": {
- "aws-sign2": "npm:aws-sign2@0.5.0",
- "bl": "npm:bl@0.9.4",
- "caseless": "npm:caseless@0.9.0",
- "combined-stream": "npm:combined-stream@0.0.7",
- "forever-agent": "npm:forever-agent@0.5.2",
- "form-data": "npm:form-data@0.2.0",
- "hawk": "npm:hawk@2.3.1",
- "http-signature": "npm:http-signature@0.10.1",
- "isstream": "npm:isstream@0.1.2",
- "json-stringify-safe": "npm:json-stringify-safe@5.0.1",
- "mime-types": "npm:mime-types@2.0.14",
- "node-uuid": "npm:node-uuid@1.4.7",
- "oauth-sign": "npm:oauth-sign@0.6.0",
- "qs": "npm:qs@2.3.3",
- "stringstream": "npm:stringstream@0.0.5",
- "tough-cookie": "npm:tough-cookie@2.2.1",
- "tunnel-agent": "npm:tunnel-agent@0.4.2"
- }
- },
- "npm:request@2.58.0": {
- "map": {
- "aws-sign2": "npm:aws-sign2@0.5.0",
- "bl": "npm:bl@0.9.4",
- "caseless": "npm:caseless@0.10.0",
- "combined-stream": "npm:combined-stream@1.0.5",
- "extend": "npm:extend@2.0.1",
- "forever-agent": "npm:forever-agent@0.6.1",
- "form-data": "npm:form-data@1.0.0-rc3",
- "har-validator": "npm:har-validator@1.8.0",
- "hawk": "npm:hawk@2.3.1",
- "http-signature": "npm:http-signature@0.11.0",
- "isstream": "npm:isstream@0.1.2",
- "json-stringify-safe": "npm:json-stringify-safe@5.0.1",
- "mime-types": "npm:mime-types@2.0.14",
- "node-uuid": "npm:node-uuid@1.4.7",
- "oauth-sign": "npm:oauth-sign@0.8.0",
- "qs": "npm:qs@3.1.0",
- "stringstream": "npm:stringstream@0.0.5",
- "tough-cookie": "npm:tough-cookie@2.2.1",
- "tunnel-agent": "npm:tunnel-agent@0.4.2"
- }
- },
- "npm:request@2.67.0": {
- "map": {
- "aws-sign2": "npm:aws-sign2@0.6.0",
- "bl": "npm:bl@1.0.0",
- "caseless": "npm:caseless@0.11.0",
- "combined-stream": "npm:combined-stream@1.0.5",
- "extend": "npm:extend@3.0.0",
- "forever-agent": "npm:forever-agent@0.6.1",
- "form-data": "npm:form-data@1.0.0-rc3",
- "har-validator": "npm:har-validator@2.0.3",
- "hawk": "npm:hawk@3.1.2",
- "http-signature": "npm:http-signature@1.1.0",
- "is-typedarray": "npm:is-typedarray@1.0.0",
- "isstream": "npm:isstream@0.1.2",
- "json-stringify-safe": "npm:json-stringify-safe@5.0.1",
- "mime-types": "npm:mime-types@2.1.9",
- "node-uuid": "npm:node-uuid@1.4.7",
- "oauth-sign": "npm:oauth-sign@0.8.0",
- "qs": "npm:qs@5.2.0",
- "stringstream": "npm:stringstream@0.0.5",
- "tough-cookie": "npm:tough-cookie@2.2.1",
- "tunnel-agent": "npm:tunnel-agent@0.4.2"
- }
- },
- "npm:right-align@0.1.3": {
- "map": {
- "align-text": "npm:align-text@0.1.3"
- }
- },
- "npm:rimraf@2.3.4": {
- "map": {
- "glob": "npm:glob@4.5.3"
- }
- },
- "npm:rimraf@2.5.0": {
- "map": {
- "glob": "npm:glob@6.0.4"
- }
- },
- "npm:rmdir@1.1.0": {
- "map": {
- "node.flow": "npm:node.flow@1.2.3"
- }
- },
- "npm:sntp@1.0.9": {
- "map": {
- "hoek": "npm:hoek@2.16.3"
- }
- },
- "npm:source-map-support@0.2.10": {
- "map": {
- "source-map": "npm:source-map@0.1.32"
- }
- },
- "npm:source-map-support@0.3.3": {
- "map": {
- "source-map": "npm:source-map@0.1.32"
- }
- },
- "npm:source-map@0.1.32": {
- "map": {
- "amdefine": "npm:amdefine@1.0.0"
- }
- },
- "npm:source-map@0.4.4": {
- "map": {
- "amdefine": "npm:amdefine@1.0.0"
- }
- },
- "npm:stream-browserify@2.0.1": {
- "map": {
- "inherits": "npm:inherits@2.0.1",
- "readable-stream": "npm:readable-stream@2.0.5"
- }
- },
- "npm:strip-ansi@3.0.0": {
- "map": {
- "ansi-regex": "npm:ansi-regex@2.0.0"
- }
- },
- "npm:systemjs@0.19.29": {
- "map": {
- "when": "npm:when@3.7.7"
- }
- },
- "npm:tar@1.0.3": {
- "map": {
- "block-stream": "npm:block-stream@0.0.8",
- "fstream": "npm:fstream@1.0.8",
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:tar@2.2.1": {
- "map": {
- "block-stream": "npm:block-stream@0.0.8",
- "fstream": "npm:fstream@1.0.8",
- "inherits": "npm:inherits@2.0.1"
- }
- },
- "npm:through@1.1.2": {
- "map": {}
- },
- "npm:through@2.2.7": {
- "map": {}
- },
- "npm:tile-mip-map@0.2.1": {
- "map": {
- "ndarray": "npm:ndarray@1.0.18",
- "ndarray-downsample2x": "npm:ndarray-downsample2x@0.1.1",
- "ndarray-ops": "npm:ndarray-ops@1.1.1"
- }
- },
- "npm:traceur@0.0.105": {
- "map": {
- "commander": "npm:commander@2.9.0",
- "glob": "npm:glob@5.0.15",
- "rsvp": "npm:rsvp@3.1.0",
- "semver": "npm:semver@4.3.6",
- "source-map-support": "npm:source-map-support@0.2.10"
- }
- },
- "npm:typedarray-pool@0.1.2": {
- "map": {
- "bit-twiddle": "npm:bit-twiddle@0.0.2",
- "dup": "npm:dup@0.0.0"
- }
- },
- "npm:typedarray-pool@1.1.0": {
- "map": {
- "bit-twiddle": "npm:bit-twiddle@1.0.2",
- "dup": "npm:dup@1.0.0"
- }
- },
- "npm:uglify-js@2.6.1": {
- "map": {
- "async": "npm:async@0.2.10",
- "source-map": "npm:source-map@0.5.3",
- "uglify-to-browserify": "npm:uglify-to-browserify@1.0.2",
- "yargs": "npm:yargs@3.10.0"
- }
- },
- "npm:url@0.11.0": {
- "map": {
- "punycode": "npm:punycode@1.3.2",
- "querystring": "npm:querystring@0.2.0"
- }
- },
- "npm:verror@1.3.6": {
- "map": {
- "extsprintf": "npm:extsprintf@1.0.2"
- }
- },
- "npm:voxel-demo@0.0.1": {
- "map": {
- "ao-mesher": "npm:ao-mesher@0.2.10",
- "ao-shader": "npm:ao-shader@0.2.3",
- "gl-buffer": "npm:gl-buffer@0.1.2",
- "gl-matrix": "npm:gl-matrix@2.0.0",
- "gl-now": "npm:gl-now@0.0.4",
- "gl-shader": "npm:gl-shader@0.0.6",
- "gl-tile-map": "npm:gl-tile-map@0.3.0",
- "gl-vao": "npm:gl-vao@0.0.3",
- "ndarray": "npm:ndarray@1.0.18",
- "ndarray-fill": "npm:ndarray-fill@0.1.0",
- "ndarray-ops": "npm:ndarray-ops@1.1.1"
- }
- },
- "npm:walker@1.0.7": {
- "map": {
- "makeerror": "npm:makeerror@1.0.11"
- }
- },
- "npm:which@1.2.1": {
- "map": {
- "is-absolute": "npm:is-absolute@0.1.7"
- }
- },
- "npm:yargs@3.10.0": {
- "map": {
- "camelcase": "npm:camelcase@1.2.1",
- "cliui": "npm:cliui@2.1.0",
- "decamelize": "npm:decamelize@1.1.2",
- "window-size": "npm:window-size@0.1.0"
- }
- },
- "github:jspm/nodelibs-domain@0.2.0-alpha": {
- "map": {
- "domain-browserify": "npm:domain-browser@1.1.7"
- }
- },
- "github:jspm/nodelibs-timers@0.2.0-alpha": {
- "map": {
- "timers-browserify": "npm:timers-browserify@1.4.2"
- }
- },
- "npm:timers-browserify@1.4.2": {
- "map": {
- "process": "npm:process@0.11.3"
- }
- },
- "npm:systemjs-builder@0.15.18": {
- "map": {
- "babel-plugin-transform-es2015-modules-systemjs": "npm:babel-plugin-transform-es2015-modules-systemjs@6.6.5",
- "bluebird": "npm:bluebird@3.3.5",
- "es6-template-strings": "npm:es6-template-strings@2.0.0",
- "glob": "npm:glob@7.0.3",
- "mkdirp": "npm:mkdirp@0.5.1",
- "rollup": "npm:rollup@0.25.8",
- "source-map": "npm:source-map@0.5.3",
- "systemjs": "npm:systemjs@0.19.29",
- "traceur": "npm:traceur@0.0.105",
- "uglify-js": "npm:uglify-js@2.6.1",
- "data-uri-to-buffer": "npm:data-uri-to-buffer@0.0.4",
- "babel-core": "npm:babel-core@6.9.0"
- }
- },
- "npm:babel-core@6.9.0": {
- "map": {
- "babylon": "npm:babylon@6.7.0",
- "convert-source-map": "npm:convert-source-map@1.2.0",
- "debug": "npm:debug@2.2.0",
- "json5": "npm:json5@0.4.0",
- "minimatch": "npm:minimatch@2.0.10",
- "path-exists": "npm:path-exists@1.0.0",
- "path-is-absolute": "npm:path-is-absolute@1.0.0",
- "private": "npm:private@0.1.6",
- "shebang-regex": "npm:shebang-regex@1.0.0",
- "slash": "npm:slash@1.0.0",
- "source-map": "npm:source-map@0.5.3",
- "babel-code-frame": "npm:babel-code-frame@6.8.0",
- "babel-messages": "npm:babel-messages@6.8.0",
- "babel-generator": "npm:babel-generator@6.9.0",
- "babel-runtime": "npm:babel-runtime@6.9.0",
- "babel-traverse": "npm:babel-traverse@6.9.0",
- "babel-types": "npm:babel-types@6.9.0",
- "babel-register": "npm:babel-register@6.9.0",
- "babel-template": "npm:babel-template@6.9.0",
- "lodash": "npm:lodash@4.13.1",
- "babel-helpers": "npm:babel-helpers@6.8.0"
- }
- },
- "npm:jspm-npm@0.28.12": {
- "map": {
- "bluebird": "npm:bluebird@3.3.5",
- "mkdirp": "npm:mkdirp@0.5.1",
- "readdirp": "npm:readdirp@2.0.0",
- "request": "npm:request@2.58.0",
- "rmdir": "npm:rmdir@1.1.0",
- "semver": "npm:semver@5.1.0",
- "systemjs-builder": "npm:systemjs-builder@0.15.18",
- "tar": "npm:tar@1.0.3",
- "traceur": "npm:traceur@0.0.105",
- "which": "npm:which@1.2.1",
- "graceful-fs": "npm:graceful-fs@4.1.4"
- }
- },
- "npm:babel-runtime@6.9.0": {
- "map": {
- "core-js": "npm:core-js@2.4.0"
- }
- },
- "npm:babel-register@6.9.0": {
- "map": {
- "core-js": "npm:core-js@2.4.0",
- "babel-core": "npm:babel-core@6.9.0",
- "babel-runtime": "npm:babel-runtime@6.9.0",
- "home-or-tmp": "npm:home-or-tmp@1.0.0",
- "lodash": "npm:lodash@4.13.1",
- "mkdirp": "npm:mkdirp@0.5.1",
- "path-exists": "npm:path-exists@1.0.0",
- "source-map-support": "npm:source-map-support@0.2.10"
- }
- },
- "npm:babel-code-frame@6.8.0": {
- "map": {
- "babel-runtime": "npm:babel-runtime@6.9.0",
- "chalk": "npm:chalk@1.1.1",
- "esutils": "npm:esutils@2.0.2",
- "js-tokens": "npm:js-tokens@1.0.3"
- }
- },
- "npm:babel-generator@6.9.0": {
- "map": {
- "babel-messages": "npm:babel-messages@6.8.0",
- "babel-runtime": "npm:babel-runtime@6.9.0",
- "babel-types": "npm:babel-types@6.9.0",
- "detect-indent": "npm:detect-indent@3.0.1",
- "lodash": "npm:lodash@4.13.1",
- "source-map": "npm:source-map@0.5.3"
- }
- },
- "npm:babel-traverse@6.9.0": {
- "map": {
- "babel-code-frame": "npm:babel-code-frame@6.8.0",
- "babel-messages": "npm:babel-messages@6.8.0",
- "babel-runtime": "npm:babel-runtime@6.9.0",
- "babel-types": "npm:babel-types@6.9.0",
- "babylon": "npm:babylon@6.7.0",
- "debug": "npm:debug@2.2.0",
- "globals": "npm:globals@8.18.0",
- "invariant": "npm:invariant@2.2.1",
- "lodash": "npm:lodash@4.13.1"
- }
- },
- "npm:babel-messages@6.8.0": {
- "map": {
- "babel-runtime": "npm:babel-runtime@6.9.0"
- }
- },
- "npm:babel-template@6.9.0": {
- "map": {
- "babylon": "npm:babylon@6.7.0",
- "babel-traverse": "npm:babel-traverse@6.9.0",
- "babel-types": "npm:babel-types@6.9.0",
- "babel-runtime": "npm:babel-runtime@6.9.0",
- "lodash": "npm:lodash@4.13.1"
- }
- },
- "npm:babel-types@6.9.0": {
- "map": {
- "babel-runtime": "npm:babel-runtime@6.9.0",
- "babel-traverse": "npm:babel-traverse@6.9.0",
- "esutils": "npm:esutils@2.0.2",
- "lodash": "npm:lodash@4.13.1",
- "to-fast-properties": "npm:to-fast-properties@1.0.2"
- }
- },
- "npm:jspm-github@0.14.7": {
- "map": {
- "expand-tilde": "npm:expand-tilde@1.2.0",
- "bluebird": "npm:bluebird@3.3.5",
- "mkdirp": "npm:mkdirp@0.5.1",
- "netrc": "npm:netrc@0.1.4",
- "request": "npm:request@2.53.0",
- "rimraf": "npm:rimraf@2.3.4",
- "semver": "npm:semver@5.1.0",
- "tar": "npm:tar@2.2.1",
- "which": "npm:which@1.2.1",
- "graceful-fs": "npm:graceful-fs@4.1.4"
- }
- },
- "npm:babel-helpers@6.8.0": {
- "map": {
- "babel-runtime": "npm:babel-runtime@6.9.0",
- "babel-template": "npm:babel-template@6.9.0"
- }
- }
- }
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/bench/config-example/normalize-data.js b/thirdparty/systemjs/bench/config-example/normalize-data.js
deleted file mode 100644
index eef3db3e7..000000000
--- a/thirdparty/systemjs/bench/config-example/normalize-data.js
+++ /dev/null
@@ -1,69 +0,0 @@
-module.exports = [
-["npm:mocha@1.21.5/mocha.js", ["./mocha.css!"]],
-['tests/angular.js', ['angular']],
-['tests/jquery.js', ["jquery"]],
-['tests/bootstrap.js', ['bootstrap', 'bootstrap/dist/css/bootstrap.css!', './bootstrap.html!text']],
-['tests/jquery.js', ['jquery']],
-['tests/d3.js', ['d3']],
-['tests/tests.js', ['./angular.js', './bootstrap.js', './jquery.js', './d3.js', './voxel-demo.js']],
-['tests/main.js', ['mocha', './tests/tests.js']],
-['github:jspm/nodelibs-util@0.2.0-alpha/util.js', ["process", "./isBuffer.js"]],
-['npm:game-shell@0.1.4/shell.js', ["events", "util", "domready", "vkey", "invert-hash", "uniq", "lower-bound", "iota-array", "./lib/raf-polyfill.js", "./lib/mousewheel-polyfill.js", "./lib/hrtime-polyfill.js"]],
-['npm:gl-now@0.0.4/index.js', ["game-shell", "webglew"]],
-["npm:ndarray-fft@0.1.0/lib/fft-matrix.js", ["bit-twiddle"]],
-['npm:ndarray-fft@0.1.0/fft.js', ["ndarray-ops", "cwise", "ndarray", "./lib/fft-matrix.js", "typedarray-pool"]],
-['npm:ndarray-scratch@0.0.1/scratch.js', ["ndarray", "typedarray-pool"]],
-['npm:ndarray-downsample2x@0.1.1/downsample.js', ["ndarray-fft", "ndarray-scratch", "ndarray-ops", "cwise", "process"]],
-['npm:tile-mip-map@0.2.1/mipmap.js', ["ndarray", "ndarray-ops", "ndarray-downsample2x"]],
-['npm:gl-texture2d@0.1.12/texture.js', ["ndarray", "ndarray-ops", "typedarray-pool", "webglew"]],
-['npm:gl-tile-map@0.3.0/tilemap.js', ["ndarray", "tile-mip-map", "gl-texture2d"]],
-['npm:gl-buffer@0.1.2/buffer.js', ["typedarray-pool", "ndarray-ops", "ndarray"]],
-['npm:gl-vao@0.0.3/lib/vao-native.js', ["./do-bind.js"]],
-['npm:gl-vao@0.0.3/lib/vao-emulated.js', ["./do-bind.js"]],
-['npm:gl-vao@0.0.3/vao.js', ["webglew", "./lib/vao-native.js", "./lib/vao-emulated.js"]],
-['npm:esprima@1.0.4/esprima.js', ["process"]],
-['npm:cwise-parser@0.0.1/index.js', ["esprima", "uniq"]],
-["npm:cwise@0.3.4/cwise.js", ["cwise-parser", "cwise-compiler"]],
-['npm:ndarray-fill@0.1.0/index.js', ["cwise"]],
-["npm:cwise-compiler@0.0.0/lib/compile.js", ["uniq"]],
-["npm:cwise-compiler@0.0.0/lib/thunk.js", ["./compile.js"]],
-['npm:cwise-compiler@0.0.0/compiler.js', ["./lib/thunk.js"]],
-["npm:ndarray-ops@1.1.1/ndarray-ops.js", ["cwise-compiler"]],
-["npm:ndarray@1.0.18/ndarray.js", ["iota-array", "is-buffer"]],
-["npm:cwise-compiler@0.1.0/lib/compile.js", ["uniq"]],
-["npm:cwise-compiler@0.1.0/lib/thunk.js", ["./compile.js"]],
-["npm:cwise-compiler@0.1.0/compiler.js", ["./lib/thunk.js"]],
-["npm:typedarray-pool@1.1.0/pool.js", ["bit-twiddle", "dup", "buffer/global"]],
-["npm:greedy-mesher@1.0.2/greedy.js", ["typedarray-pool", "uniq", "iota-array"]],
-["npm:typedarray-pool@0.1.2/pool.js", ["bit-twiddle", "dup"]],
-["npm:ao-mesher@0.2.10/mesh.js", ["ndarray", "cwise-compiler", "greedy-mesher", "typedarray-pool"]],
-["npm:glsl-tokenizer@0.0.9/lib/literals.js", ["process"]],
-["npm:glsl-tokenizer@0.0.9/lib/operators.js", ["process"]],
-["npm:glsl-tokenizer@0.0.9/lib/builtins.js", ["process"]],
-["npm:glsl-tokenizer@0.0.9/index.js", ["through", "./lib/literals", "./lib/operators", "./lib/builtins", "process"]],
-["npm:through@1.1.2/index.js", ["stream", "process"]],
-["npm:glsl-parser@0.0.9/lib/index.js", ["through", "./expr", "./scope"]],
-["npm:glsl-parser@0.0.9/index.js", ["./lib/index"]],
-["npm:readable-stream@2.0.5/readable.js", ["./lib/_stream_readable.js", "./lib/_stream_writable.js", "./lib/_stream_duplex.js", "./lib/_stream_transform.js", "./lib/_stream_passthrough.js", "process"]],
-["npm:readable-stream@2.0.5/writable.js", ["./lib/_stream_writable.js", "process"]],
-["npm:readable-stream@2.0.5/duplex.js", ["./lib/_stream_duplex.js", "process"]],
-["npm:readable-stream@2.0.5/transform.js", ["./lib/_stream_transform.js", "process"]],
-["npm:string_decoder@0.10.31/index.js", ["buffer", "buffer/global"]],
-["npm:readable-stream@2.0.5/lib/_stream_readable.js", ["process-nextick-args", "isarray", "buffer", "events", "core-util-is", "inherits", "util", "./_stream_duplex", "string_decoder", "process", "buffer/global"]],
-["npm:process-nextick-args@1.0.6/index.js", ["process"]],
-["npm:readable-stream@2.0.5/lib/_stream_writable.js", ["process-nextick-args", "buffer", "core-util-is", "inherits", "util-deprecate", "events", "./_stream_duplex", "process", "buffer/global"]],
-["npm:readable-stream@2.0.5/lib/_stream_duplex.js", ["process-nextick-args", "core-util-is", "inherits", "./_stream_readable", "./_stream_writable", "process"]],
-["npm:readable-stream@2.0.5/lib/_stream_transform.js", ["./_stream_duplex", "core-util-is", "inherits", "process"]],
-["npm:buffer@4.5.0/index.js", ["base64-js", "ieee754", "isarray", "process"]],
-["github:jspm/nodelibs-buffer@0.2.0-alpha/global.js", ["./buffer.js"]],
-["npm:core-util-is@1.0.2/lib/util.js", ["buffer/global"]],
-["npm:readable-stream@2.0.5/lib/_stream_passthrough.js", ["./_stream_transform", "core-util-is", "inherits", "process"]],
-["npm:readable-stream@2.0.5/passthrough.js", ["./lib/_stream_passthrough.js", "process"]],
-["npm:stream-browserify@2.0.1/index.js", ["events", "inherits", "readable-stream/readable.js", "readable-stream/writable.js", "readable-stream/duplex.js", "readable-stream/transform.js", "readable-stream/passthrough.js"]],
-["github:jspm/nodelibs-process@0.2.0-alpha/process.js", ["@system-env"]],
-["npm:through@2.3.8/index.js", ["stream", "process"]],
-["npm:glsl-exports@0.0.0/index.js", ["glsl-tokenizer", "glsl-parser", "through"]],
-["npm:gl-shader@0.0.6/index.js", ["glsl-exports", "uniq"]],
-["npm:ao-shader@0.2.3/aoshader.js", ["fs", "gl-shader"]],
-["npm:voxel-demo@0.0.1/shader.js", ["gl-now", "gl-tile-map", "gl-buffer", "gl-vao", "gl-matrix", "ndarray", "ndarray-fill", "ndarray-ops", "ao-mesher", "ao-shader"]]
-]; \ No newline at end of file
diff --git a/thirdparty/systemjs/bench/config-example/pkg-configs.js b/thirdparty/systemjs/bench/config-example/pkg-configs.js
deleted file mode 100644
index 7bbe38627..000000000
--- a/thirdparty/systemjs/bench/config-example/pkg-configs.js
+++ /dev/null
@@ -1,972 +0,0 @@
-System.registerDynamic("npm:mocha@1.21.5.json", [], false, function() {
- return {
- "main": "mocha",
- "meta": {
- "mocha.js": {
- "deps": [
- "./mocha.css!"
- ],
- "exports": "mocha"
- }
- }
- };
-});
-
-System.registerDynamic("github:angular/bower-angular@1.4.8.json", [], false, function() {
- return {
- "main": "angular",
- "meta": {
- "angular.js": {
- "exports": "angular"
- }
- }
- };
-});
-
-System.registerDynamic("github:systemjs/plugin-css@0.1.20.json", [], false, function() {
- return {
- "main": "css"
- };
-});
-
-System.registerDynamic("github:twbs/bootstrap@3.3.6.json", [], false, function() {
- return {
- "main": "dist/js/bootstrap.js",
- "meta": {
- "dist/js/bootstrap.js": {
- "deps": [
- "jquery"
- ],
- "exports": "$"
- }
- }
- };
-});
-
-System.registerDynamic("github:systemjs/plugin-text@0.0.2.json", [], false, function() {
- return {
- "main": "text"
- };
-});
-
-System.registerDynamic("github:components/jquery@2.1.4.json", [], false, function() {
- return {
- "main": "jquery"
- };
-});
-
-System.registerDynamic("github:mbostock/d3@3.5.12.json", [], false, function() {
- return {
- "main": "d3",
- "meta": {
- "d3.js": {
- "exports": "d3",
- "format": "global"
- }
- }
- };
-});
-
-System.registerDynamic("github:jspm/nodelibs-util@0.2.0-alpha.json", [], false, function() {
- return {
- "main": "./util.js",
- "map": {
- "./isBuffer.js": {
- "~node": "./isBufferBrowser.js"
- }
- }
- };
-});
-
-System.registerDynamic("npm:domready@0.2.13.json", [], false, function() {
- return {
- "main": "ready.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- },
- "map": {
- "domready": "."
- }
- };
-});
-
-System.registerDynamic("npm:vkey@0.0.3.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:invert-hash@0.0.0.json", [], false, function() {
- return {
- "main": "invert.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:lower-bound@0.0.3.json", [], false, function() {
- return {
- "main": "lb.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:iota-array@0.0.1.json", [], false, function() {
- return {
- "main": "iota.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:game-shell@0.1.4.json", [], false, function() {
- return {
- "main": "shell.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:gl-now@0.0.4.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:ndarray-fft@0.1.0.json", [], false, function() {
- return {
- "main": "fft.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:ndarray-scratch@0.0.1.json", [], false, function() {
- return {
- "main": "scratch.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:ndarray-downsample2x@0.1.1.json", [], false, function() {
- return {
- "main": "downsample.js",
- "format": "cjs",
- "meta": {
- "*": {
- "globals": {
- "process": "process"
- }
- },
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:tile-mip-map@0.2.1.json", [], false, function() {
- return {
- "main": "mipmap.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:gl-texture2d@0.1.12.json", [], false, function() {
- return {
- "main": "texture.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:gl-tile-map@0.3.0.json", [], false, function() {
- return {
- "main": "tilemap.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:gl-buffer@0.1.2.json", [], false, function() {
- return {
- "main": "buffer.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:webglew@0.0.0.json", [], false, function() {
- return {
- "main": "webglew.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:gl-vao@0.0.3.json", [], false, function() {
- return {
- "main": "vao.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:gl-matrix@2.0.0.json", [], false, function() {
- return {
- "main": "dist/gl-matrix.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- },
- "dist/gl-matrix-min.js": {
- "format": "amd"
- },
- "src/gl-matrix.js.erb": {
- "format": "amd"
- }
- }
- };
-});
-
-System.registerDynamic("npm:esprima@1.0.4.json", [], false, function() {
- return {
- "main": "esprima.js",
- "format": "cjs",
- "meta": {
- "*": {
- "globals": {
- "process": "process"
- }
- },
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:cwise-parser@0.0.1.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:cwise@0.3.4.json", [], false, function() {
- return {
- "main": "cwise.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:ndarray-fill@0.1.0.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:cwise-compiler@0.0.0.json", [], false, function() {
- return {
- "main": "compiler.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:ndarray-ops@1.1.1.json", [], false, function() {
- return {
- "main": "ndarray-ops.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:is-buffer@1.1.1.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- },
- "test/*": {
- "globals": {
- "Buffer": "buffer/global"
- }
- }
- }
- };
-});
-
-System.registerDynamic("npm:ndarray@1.0.18.json", [], false, function() {
- return {
- "main": "ndarray.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:cwise-compiler@0.1.0.json", [], false, function() {
- return {
- "main": "compiler.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:bit-twiddle@1.0.2.json", [], false, function() {
- return {
- "main": "twiddle.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:dup@1.0.0.json", [], false, function() {
- return {
- "main": "dup.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:typedarray-pool@1.1.0.json", [], false, function() {
- return {
- "main": "pool.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- },
- "pool.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/*": {
- "globals": {
- "Buffer": "buffer/global"
- }
- }
- }
- };
-});
-
-System.registerDynamic("npm:uniq@1.0.1.json", [], false, function() {
- return {
- "main": "uniq.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:iota-array@1.0.0.json", [], false, function() {
- return {
- "main": "iota.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:greedy-mesher@1.0.2.json", [], false, function() {
- return {
- "main": "greedy.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:bit-twiddle@0.0.2.json", [], false, function() {
- return {
- "main": "twiddle.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:dup@0.0.0.json", [], false, function() {
- return {
- "main": "dup.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:typedarray-pool@0.1.2.json", [], false, function() {
- return {
- "main": "pool.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:ao-mesher@0.2.10.json", [], false, function() {
- return {
- "main": "mesh.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("github:jspm/nodelibs-fs@0.2.0-alpha.json", [], false, function() {
- return {
- "main": "./fs.js"
- };
-});
-
-System.registerDynamic("npm:glsl-tokenizer@0.0.9.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*": {
- "globals": {
- "process": "process"
- }
- },
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:through@1.1.2.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*": {
- "globals": {
- "process": "process"
- }
- },
- "*.json": {
- "format": "json"
- }
- },
- "map": {
- "./test.js": "./test/index.js"
- }
- };
-});
-
-System.registerDynamic("npm:glsl-parser@0.0.9.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- },
- "map": {
- "./lib.js": "./lib/index.js",
- "./test.js": "./test/index.js"
- }
- };
-});
-
-System.registerDynamic("github:jspm/nodelibs-stream@0.2.0-alpha.json", [], false, function() {
- return {
- "main": "./stream.js",
- "map": {
- "./stream.js": {
- "browser": "stream-browserify"
- }
- }
- };
-});
-
-System.registerDynamic("npm:isarray@0.0.1.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:string_decoder@0.10.31.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- },
- "index.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- }
- }
- };
-});
-
-System.registerDynamic("npm:process-nextick-args@1.0.6.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*": {
- "globals": {
- "process": "process"
- }
- },
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:util-deprecate@1.0.2.json", [], false, function() {
- return {
- "main": "node.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- },
- "map": {
- "./node.js": {
- "browser": "./browser.js"
- }
- }
- };
-});
-
-System.registerDynamic("github:jspm/nodelibs-events@0.2.0-alpha.json", [], false, function() {
- return {
- "main": "./events.js"
- };
-});
-
-System.registerDynamic("npm:base64-js@1.1.1.json", [], false, function() {
- return {
- "main": "lib/b64.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:ieee754@1.1.6.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- },
- "test/*": {
- "globals": {
- "Buffer": "buffer/global"
- }
- }
- }
- };
-});
-
-System.registerDynamic("npm:isarray@1.0.0.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:buffer@4.5.0.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*": {
- "globals": {
- "process": "process"
- }
- },
- "*.json": {
- "format": "json"
- },
- "test/constructor.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/node-es6/test-buffer-arraybuffer.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/node-es6/test-buffer-iterator.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/node/test-buffer-ascii.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/node/test-buffer-bytelength.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/node/test-buffer-concat.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/node/test-buffer-indexof.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/node/test-buffer-inspect.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test/node/test-buffer.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- }
- }
- };
-});
-
-System.registerDynamic("github:jspm/nodelibs-buffer@0.2.0-alpha.json", [], false, function() {
- return {
- "main": "buffer.js",
- "map": {
- "./buffer.js": {
- "browser": "buffer-browserify"
- }
- }
- };
-});
-
-System.registerDynamic("npm:core-util-is@1.0.2.json", [], false, function() {
- return {
- "main": "lib/util.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- },
- "lib/*": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "test.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- }
- }
- };
-});
-
-System.registerDynamic("npm:inherits@2.0.1.json", [], false, function() {
- return {
- "main": "inherits.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- },
- "map": {
- "./inherits.js": {
- "browser": "./inherits_browser.js"
- }
- }
- };
-});
-
-System.registerDynamic("npm:readable-stream@2.0.5.json", [], false, function() {
- return {
- "main": "readable.js",
- "format": "cjs",
- "meta": {
- "*": {
- "globals": {
- "process": "process"
- }
- },
- "*.json": {
- "format": "json"
- },
- "lib/_stream_readable.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- },
- "lib/_stream_writable.js": {
- "globals": {
- "Buffer": "buffer/global"
- }
- }
- },
- "map": {
- "util": {
- "browser": "@empty"
- }
- }
- };
-});
-
-System.registerDynamic("npm:stream-browserify@2.0.1.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- },
- "test/*": {
- "globals": {
- "Buffer": "buffer/global"
- }
- }
- }
- };
-});
-
-System.registerDynamic("github:jspm/nodelibs-process@0.2.0-alpha.json", [], false, function() {
- return {
- "main": "./process.js"
- };
-});
-
-System.registerDynamic("npm:through@2.3.8.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*": {
- "globals": {
- "process": "process"
- }
- },
- "*.json": {
- "format": "json"
- }
- },
- "map": {
- "./test.js": "./test/index.js"
- }
- };
-});
-
-System.registerDynamic("npm:glsl-exports@0.0.0.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:uniq@0.0.2.json", [], false, function() {
- return {
- "main": "uniq.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:gl-shader@0.0.6.json", [], false, function() {
- return {
- "main": "index.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:ao-shader@0.2.3.json", [], false, function() {
- return {
- "main": "aoshader.js",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-});
-
-System.registerDynamic("npm:voxel-demo@0.0.1.json", [], false, function() {
- return {
- "main": "shader",
- "format": "cjs",
- "meta": {
- "*.json": {
- "format": "json"
- }
- }
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/bench/get-cjs-deps.js b/thirdparty/systemjs/bench/get-cjs-deps.js
deleted file mode 100644
index b999a1c16..000000000
--- a/thirdparty/systemjs/bench/get-cjs-deps.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var fs = require('fs');
-
-// require('...') || exports[''] = ... || exports.asd = ... || module.exports = ...
-var cjsExportsRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/;
-// RegEx adjusted from https://github.com/jbrantly/yabble/blob/master/lib/yabble.js#L339
-var cjsRequireRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g;
-var commentRegEx = /(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
-
-var stringRegEx = /("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g;
-function getCJSDeps(source) {
- cjsRequireRegEx.lastIndex = commentRegEx.lastIndex = stringRegEx.lastIndex = 0;
-
- var deps = [];
-
- var match;
-
- // track string and comment locations for unminified source
- var stringLocations = [], commentLocations = [];
-
- function inLocation(locations, match) {
- for (var i = 0; i < locations.length; i++)
- if (locations[i][0] < match.index && locations[i][1] > match.index)
- return true;
- return false;
- }
-
- if (source.length / source.split('\n').length < 200) {
- while (match = stringRegEx.exec(source))
- stringLocations.push([match.index, match.index + match[0].length]);
-
- // TODO: track template literals here before comments
-
- while (match = commentRegEx.exec(source)) {
- // only track comments not starting in strings
- if (!inLocation(stringLocations, match))
- commentLocations.push([match.index + match[1].length, match.index + match[0].length - 1]);
- }
- }
-
- while (match = cjsRequireRegEx.exec(source)) {
- // ensure we're not within a string or comment location
- if (!inLocation(stringLocations, match) && !inLocation(commentLocations, match)) {
- var dep = match[1].substr(1, match[1].length - 2);
- // skip cases like require('" + file + "')
- if (dep.match(/"|'/))
- continue;
- // trailing slash requires are removed as they don't map mains in SystemJS
- if (dep[dep.length - 1] == '/')
- dep = dep.substr(0, dep.length - 1);
- deps.push(dep);
- }
- }
-
- return deps;
-}
-
-var cjs = fs.readFileSync('./cjs-sample/cjs.js').toString();
-
-var startTime = Date.now();
-for (var i = 0; i < 1000; i++)
- getCJSDeps(cjs);
-console.log(Date.now() - startTime);
-
diff --git a/thirdparty/systemjs/bench/normalize-perf.js b/thirdparty/systemjs/bench/normalize-perf.js
deleted file mode 100644
index 6749382a2..000000000
--- a/thirdparty/systemjs/bench/normalize-perf.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var systemjs = require('../index.js');
-
-var num = 5;
-
-var startTime, endTime;
-
-startTime = Date.now();
-require('./config-example/config.js');
-endTime = Date.now();
-console.log('Configured in ' + (endTime - startTime) + 'ms');
-
-require('./config-example/pkg-configs.js');
-
-var normalizeData = require('./config-example/normalize-data.js');
-
-// decanonicalize the parentNames (we're not measuring decanonicalize)
-var normalizationCnt = 0;
-normalizeData.forEach(function(item) {
- normalizationCnt += item[1].length;
- item[0] = System.decanonicalize(item[0]);
-});
-
-// simulated System.register normalization test
-// timed normalize of 'x', ['./dep'] cases
-function test() {
- return Promise.all(normalizeData.map(function(item) {
- var parentName = item[0];
- var deps = item[1];
- return Promise.all(deps.map(function(dep) {
- return System.normalize(dep, parentName);
- }));
- }));
-}
-
-return Promise.resolve()
-.then(function() {
- starTime = Date.now();
- return test()
- .then(function() {
- endTime = Date.now();
- console.log(normalizationCnt + ' first run normalizations in ' + (endTime - startTime) + 'ms');
- console.log((endTime - startTime) / normalizationCnt + 'ms per normalization');
- });
-})
-.then(function() {
- startTime = Date.now();
- var testPromise = Promise.resolve();
- for (var i = 0; i < num; i++)
- testPromise = testPromise.then(test);
- return testPromise
- .then(function() {
- endTime = Date.now();
-
- var time = (endTime - startTime) / num;
-
- console.log(normalizationCnt + ' subsequent normalizations in ' + time + 'ms');
- console.log(time / normalizationCnt + 'ms per normalization');
-
- /* System.perfSummary(function(evt) {
- return evt.name.match(/^normalize\:/);
- }); */
- })
- .catch(function(e) {
- console.error(e.stack || e);
- });
-
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/bower.json b/thirdparty/systemjs/bower.json
deleted file mode 100644
index fa64a2d81..000000000
--- a/thirdparty/systemjs/bower.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "system.js",
- "main": "./dist/system.js",
- "ignore": [
- ".agignore",
- ".gitignore",
- ".travis.yml",
- "index.js",
- "lib/",
- "package.json",
- "Makefile",
- "test"
- ],
- "devDependencies": {
- "qunit": "~1.12.0"
- }
-}
diff --git a/thirdparty/systemjs/dist/system-csp-production.js b/thirdparty/systemjs/dist/system-csp-production.js
deleted file mode 100644
index 048a1e192..000000000
--- a/thirdparty/systemjs/dist/system-csp-production.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * SystemJS v0.19.39
- */
-!function(){function e(){!function(e){function t(e,n){if("string"!=typeof e)throw new TypeError("URL must be a string");var r=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!r)throw new RangeError("Invalid URL format");var a=r[1]||"",o=r[2]||"",i=r[3]||"",s=r[4]||"",l=r[5]||"",u=r[6]||"",d=r[7]||"",c=r[8]||"",f=r[9]||"";if(void 0!==n){var m=n instanceof t?n:new t(n),p=!a&&!s&&!o;!p||d||c||(c=m.search),p&&"/"!==d[0]&&(d=d?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+d:m.pathname);var h=[];d.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),d=h.join("").replace(/^\//,"/"===d[0]?"/":""),p&&(u=m.port,l=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}d=d.replace(/\\/g,"/"),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+d+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=l,this.port=u,this.pathname=d,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var n=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),r=[],a=0;a<n.length;a++)"undefined"!=typeof $__curScript&&n[a].indexOf($__curScript.src)!=-1||r.push(n[a]);var o="(SystemJS) "+(r?r.join("\n\t"):e.message.substr(11))+"\n\t"+t;q||(o=o.replace(U?/file:\/\/\//g:/file:\/\//g,""));var i=N?new Error(o,e.fileName,e.lineNumber):new Error(o);return i.stack=o,i.originalErr=e.originalErr||e,i}function n(){}function r(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},A(this,"global",{get:function(){return e}})}function a(){r.call(this),this.paths={},this._loader.paths={},G.call(this)}function o(){}function i(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function s(e){G=e(G||function(){})}function l(e){return e.match(V)}function u(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function d(e){return!u(e)&&!l(e)}function c(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||$)+e.substr(2)}else if("/"!=e[0]&&e.indexOf(":")==-1)return(t&&t.substr(0,t.lastIndexOf("/")+1)||$)+e;return new H(e,t&&t.replace(/#/g,"%05")||Y).href.replace(/%05/g,"#")}function f(e,t){var n,r="",a=0,o=e.paths,i=e._loader.paths;for(var s in o)if(!o.hasOwnProperty||o.hasOwnProperty(s)){var l=o[s];if(l!==i[s]&&(l=o[s]=i[s]=c(o[s],u(o[s])?$:e.baseURL)),s.indexOf("*")===-1){if(t==s)return o[s];if(t.substr(0,s.length-1)==s.substr(0,s.length-1)&&(t.length<s.length||t[s.length-1]==s[s.length-1])&&("/"==o[s][o[s].length-1]||""==o[s]))return o[s].substr(0,o[s].length-1)+(t.length>s.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var d=s.split("*");if(d.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=d[0].length;f>=a&&t.substr(0,d[0].length)==d[0]&&t.substr(t.length-d[1].length)==d[1]&&(a=f,r=s,n=t.substr(d[0].length,t.length-d[1].length-d[0].length))}}var m=o[r];return"string"==typeof n&&(m=m.replace("*",n)),m}function m(e){for(var t=[],n=[],r=0,a=e.length;r<a;r++){var o=J.call(t,e[r]);o===-1?(t.push(e[r]),n.push([r])):n[o].push(r)}return{names:t,indices:n}}function p(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(Z)for(var r in t)"default"!==r&&h(n,t,r);else g(n,t);return n.default=t,A(n,"__useDefault",{value:!0}),n}function h(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&A(e,n,r)}catch(r){return e[n]=t[n],!1}}function g(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)r&&!t.hasOwnProperty(a)||n&&a in e||(e[a]=t[a]);return e}function v(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)if(!r||t.hasOwnProperty(a)){var o=t[a];a in e?o instanceof Array&&e[a]instanceof Array?e[a]=[].concat(n?o:e[a]).concat(n?e[a]:o):"object"==typeof o&&null!==o&&"object"==typeof e[a]?e[a]=g(g({},e[a]),o,n):n||(e[a]=o):e[a]=o}}function y(e,t,n,r,a){for(var o in t)if(J.call(["main","format","defaultExtension","basePath"],o)!=-1)e[o]=t[o];else if("map"==o)g(e.map=e.map||{},t.map);else if("meta"==o)g(e.meta=e.meta||{},t.meta);else if("depCache"==o)for(var i in t.depCache){var s;s="./"==i.substr(0,2)?n+"/"+i.substr(2):k.call(r,i),r.depCache[s]=(r.depCache[s]||[]).concat(t.depCache[i])}else!a||J.call(["browserConfig","nodeConfig","devConfig","productionConfig"],o)!=-1||t.hasOwnProperty&&!t.hasOwnProperty(o)||w.call(r,'"'+o+'" is not a valid package configuration option in package '+n)}function b(e,t,n,r){var a;if(e.packages[t]){var o=e.packages[t];a=e.packages[t]={},y(a,r?n:o,t,e,r),y(a,r?o:n,t,e,!r)}else a=e.packages[t]=n;return"object"==typeof a.main&&(a.map=a.map||{},a.map["./@main"]=a.main,a.main.default=a.main.default||"./",a.main="@main"),a}function w(e){this.warnings&&"undefined"!=typeof console&&console.warn}function x(e,t){for(var n=e.split(".");n.length;)t=t[n.shift()];return t}function S(e,t){var n,r=0;for(var a in e)if(t.substr(0,a.length)==a&&(t.length==a.length||"/"==t[a.length])){var o=a.split("/").length;if(o<=r)continue;n=a,r=o}return n}function E(e){this._loader.baseURL!==this.baseURL&&("/"!=this.baseURL[this.baseURL.length-1]&&(this.baseURL+="/"),this._loader.baseURL=this.baseURL=new H(this.baseURL,Y).href)}function _(e,t){this.set("@system-env",W=this.newModule({browser:q,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,default:!0}))}function P(e,t){if(!d(e))throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!ee){var n=this._nodeRequire("module"),r=t.substr(U?8:7);ee=new n(r),ee.paths=n._nodeModulePaths(r)}return ee.require(e)}function k(e,t){if(u(e))return c(e,t);if(l(e))return e;var n=S(this.map,e);if(n){if(e=this.map[n]+e.substr(n.length),u(e))return c(e);if(l(e))return e}if(this.has(e))return e;if("@node/"==e.substr(0,6)){if(!this._nodeRequire)throw new TypeError("Error loading "+e+". Can only load node core modules in Node.");return this.builder?this.set(e,this.newModule({})):this.set(e,this.newModule(p(P.call(this,e.substr(6),this.baseURL)))),e}return E.call(this),f(this,e)||this.baseURL+e}function j(e,t,n){W.browser&&t.browserConfig&&n(t.browserConfig),W.node&&t.nodeConfig&&n(t.nodeConfig),W.dev&&t.devConfig&&n(t.devConfig),W.build&&t.buildConfig&&n(t.buildConfig),W.production&&t.productionConfig&&n(t.productionConfig)}function O(e){var t=e.match(re);return t&&"System.register"==e.substr(t[0].length,15)}function R(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}function M(t){if("string"==typeof t)return x(t,e);if(!(t instanceof Array))throw new Error("Global exports must be a string or array.");for(var n={},r=!0,a=0;a<t.length;a++){var o=x(t[a],e);r&&(n.default=o,r=!1),n[t[a].split(".").pop()]=o}return n}function z(e){var t,n,r,r="~"==e[0],a=e.lastIndexOf("|");return a!=-1?(t=e.substr(a+1),n=e.substr(r,a-r),r&&w.call(this,'Condition negation form "'+e+'" is deprecated for "'+n+"|~"+t+'"'),"~"==t[0]&&(r=!0,t=t.substr(1))):(t="default",n=e.substr(r),ae.indexOf(n)!=-1&&(t=n,n=null)),{module:n||"@system-env",prop:t,negate:r}}function I(e){return e.module+"|"+(e.negate?"~":"")+e.prop}function C(e,t,n){var r=this;return this.normalize(e.module,t).then(function(t){return r.load(t).then(function(a){var o=x(e.prop,r.get(t));if(n&&"boolean"!=typeof o)throw new TypeError("Condition "+I(e)+" did not resolve to a boolean.");return e.negate?!o:o})})}function L(e,t){var n=e.match(oe);if(!n)return Promise.resolve(e);var r=z.call(this,n[0].substr(2,n[0].length-3));return this.builder?this.normalize(r.module,t).then(function(t){return r.module=t,e.replace(oe,"#{"+I(r)+"}")}):C.call(this,r,t,!1).then(function(n){if("string"!=typeof n)throw new TypeError("The condition value for "+e+" doesn't resolve to a string.");if(n.indexOf("/")!=-1)throw new TypeError("Unabled to interpolate conditional "+e+(t?" in "+t:"")+"\n\tThe condition value "+n+' cannot contain a "/" separator.');return e.replace(oe,n)})}function T(e,t){var n=e.lastIndexOf("#?");if(n==-1)return Promise.resolve(e);var r=z.call(this,e.substr(n+2));return this.builder?this.normalize(r.module,t).then(function(t){return r.module=t,e.substr(0,n)+"#?"+I(r)}):C.call(this,r,t,!0).then(function(t){return t?e.substr(0,n):"@empty"})}var D="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,q="undefined"!=typeof window&&"undefined"!=typeof document,U="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var A,J=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(A=Object.defineProperty)}catch(e){A=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}();var $,N="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if($=document.baseURI,!$){var F=document.getElementsByTagName("base");$=F[0]&&F[0].href||window.location.href}}else"undefined"!=typeof location&&($=e.location.href);if($)$=$.split("#")[0].split("?")[0],$=$.substr(0,$.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");$="file://"+(U?"/":"")+process.cwd()+"/",U&&($=$.replace(/\\/g,"/"))}try{var B="test:"==new e.URL("test:///").protocol}catch(e){}var H=B?e.URL:e.URLPolyfill;A(n.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++b+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,n){return new Promise(u({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function o(t,n,r,a){return new Promise(function(e,o){e(t.loaderObj.normalize(n,r,a))}).then(function(n){var r;if(t.modules[n])return r=e(n),r.status="linked",r.module=t.modules[n],r;for(var a=0,o=t.loads.length;a<o;a++)if(r=t.loads[a],r.name==n)return r;return r=e(n),t.loads.push(r),i(t,r),r})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,n){l(e,t,n.then(function(n){if("loading"==t.status)return t.address=n,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:n})}))}function l(e,t,n){n.then(function(n){if("loading"==t.status)return t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:n})).then(function(n){return t.source=n,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:n})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var n=t.depsList,r=[],a=0,i=n.length;a<i;a++)(function(n,a){r.push(o(e,n,t.name,t.address).then(function(e){if(t.dependencies[a]={key:n,value:e.name},"linked"!=e.status)for(var r=t.linkSets.concat([]),o=0,i=r.length;o<i;o++)c(r[o],e)}))})(n[a],a);return Promise.all(r)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),n=0,r=e.length;n<r;n++)m(e[n],t)})}).catch(function(e){t.status="failed",t.exception=e;for(var n=t.linkSets.concat([]),r=0,a=n.length;r<a;r++)p(n[r],t,e)})}function u(t){return function(n,r){var a=t.loader,o=t.moduleName,u=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;f<m;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=u||c.source||(c.address=t.moduleAddress,l(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){n(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=d(a,p);a.loads.push(p),n(h.done),"locate"==u?i(a,p):"fetch"==u?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,l(a,p,Promise.resolve(t.moduleSource)))}}function d(e,t){var n={loader:e,loads:[],startingLoad:t,loadingCount:0};return n.done=new Promise(function(e,t){n.resolve=e,n.reject=t}),c(n,t),n}function c(e,t){if("failed"!=t.status){for(var n=0,r=e.loads.length;n<r;n++)if(e.loads[n]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,n=0,r=t.dependencies.length;n<r;n++)if(t.dependencies[n]){var o=t.dependencies[n].value;if(!a.modules[o])for(var i=0,s=a.loads.length;i<s;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{y(e,function(n,r){p(e,n,r),t=!0})}catch(n){p(e,null,n),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var n=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var r=[].concat(e.loads),a=0,o=r.length;a<o;a++){var t=r[a];t.module={name:t.name,module:w({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(n)}var i=f(e);i||e.resolve(n)}}function p(e,n,r){var a=e.loader;e:if(n)if(e.loads[0].name==n.name)r=t(r,"Error loading "+n.name);else{for(var o=0;o<e.loads.length;o++)for(var i=e.loads[o],s=0;s<i.dependencies.length;s++){var l=i.dependencies[s];if(l.value==n.name){r=t(r,"Error loading "+n.name+' as "'+l.key+'" from '+i.name);break e}}r=t(r,"Error loading "+n.name+" from "+e.loads[0].name)}else r=t(r,"Error linking "+e.loads[0].name);for(var u=e.loads.concat([]),o=0,d=u.length;o<d;o++){var n=u[o];a.loaderObj.failed=a.loaderObj.failed||[],J.call(a.loaderObj.failed,n)==-1&&a.loaderObj.failed.push(n);var c=J.call(n.linkSets,e);if(n.linkSets.splice(c,1),0==n.linkSets.length){var f=J.call(e.loader.loads,n);f!=-1&&e.loader.loads.splice(f,1)}}e.reject(r)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var n={};t.dependencies.forEach(function(e){n[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:n,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var r=J.call(e.loads,t);r!=-1&&e.loads.splice(r,1);for(var a=0,o=t.linkSets.length;a<o;a++)r=J.call(t.linkSets[a].loads,t),r!=-1&&t.linkSets[a].loads.splice(r,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,r){try{var a=t.execute()}catch(e){return void r(t,e)}return a&&a instanceof n?a:void r(t,new TypeError("Execution must define a Module instance"))}function v(e,t,n){var r=e._loader.importPromises;return r[t]=n.then(function(e){return r[t]=void 0,e},function(e){throw r[t]=void 0,e})}function y(e,t){var n=e.loader;if(e.loads.length)for(var r=e.loads.concat([]),a=0;a<r.length;a++){var o=r[a],i=g(e,o,t);if(!i)return;o.module={name:o.name,module:i},o.status="linked",h(n,o)}}var b=0;r.prototype={constructor:r,define:function(e,t,n){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(u({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:n&&n.metadata||{},moduleSource:t,moduleAddress:n&&n.address})))},delete:function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],!!t.modules[e]&&delete t.modules[e]},get:function(e){if(this._loader.modules[e])return this._loader.modules[e].module},has:function(e){return!!this._loader.modules[e]},import:function(e,t,n){"object"==typeof t&&(t=t.name);var r=this;return Promise.resolve(r.normalize(e,t)).then(function(e){var t=r._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(r,e,a(t,e,{}).then(function(n){return delete t.importPromises[e],n.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():t.importPromises[e]||v(this,e,new Promise(u({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(){delete t.importPromises[e]}))},module:function(t,n){var r=e();r.address=n&&n.address;var a=d(this._loader,r),o=Promise.resolve(t),i=this._loader,s=a.done.then(function(){return r.module.module});return l(i,r,o),s},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new n,r=[];if(Object.getOwnPropertyNames&&null!=e)r=Object.getOwnPropertyNames(e);else for(var a in e)r.push(a);for(var o=0;o<r.length;o++)(function(n){A(t,n,{configurable:!1,enumerable:!0,get:function(){return e[n]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(r[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof n))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,n){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var w=r.prototype.newModule}();var X;o.prototype=r.prototype,a.prototype=new o,a.prototype.constructor=a;var G,V=/^[^\/]+:\/\//,Y=new H($),Z=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(e){Z=!1}var K;if("undefined"!=typeof XMLHttpRequest)K=function(e,t,n,r){function a(){n(i.responseText)}function o(){r(new Error("XHR error"+(i.status?" ("+i.status+(i.statusText?" "+i.statusText:"")+")":"")+" loading "+e))}var i=new XMLHttpRequest,s=!0,l=!1;if(!("withCredentials"in i)){var u=/^(\w+:)?\/\/([^\/]+)/.exec(e);u&&(s=u[2]===window.location.host,u[1]&&(s&=u[1]===window.location.protocol))}s||"undefined"==typeof XDomainRequest||(i=new XDomainRequest,i.onload=a,i.onerror=o,i.ontimeout=o,i.onprogress=function(){},i.timeout=0,l=!0),i.onreadystatechange=function(){4===i.readyState&&(0==i.status?i.responseText?a():(i.addEventListener("error",o),i.addEventListener("load",a)):200===i.status?a():o())},i.open("GET",e,!0),i.setRequestHeader&&(i.setRequestHeader("Accept","application/x-es-module, */*"),t&&("string"==typeof t&&i.setRequestHeader("Authorization",t),i.withCredentials=!0)),l?setTimeout(function(){i.send()},0):i.send(null)};else if("undefined"!=typeof require&&"undefined"!=typeof process){var Q;K=function(e,t,n,r){if("file:///"!=e.substr(0,8))throw new Error('Unable to fetch "'+e+'". Only file URLs of the form file:/// allowed running in Node.');return Q=Q||require("fs"),e=U?e.replace(/\//g,"\\").substr(8):e.substr(7),Q.readFile(e,function(e,t){if(e)return r(e);var a=t+"";"\ufeff"===a[0]&&(a=a.substr(1)),n(a)})}}else{if("undefined"==typeof self||"undefined"==typeof self.fetch)throw new TypeError("No environment fetch API available.");K=function(e,t,n,r){var a={headers:{Accept:"application/x-es-module, */*"}};t&&("string"==typeof t&&(a.headers.Authorization=t),a.credentials="include"),fetch(e,a).then(function(e){if(e.ok)return e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)}).then(n,r)}}var W;s(function(e){return function(){e.call(this),this.baseURL=$,this.map={},"undefined"!=typeof $__curScript&&(this.scriptSrc=$__curScript.src),this.warnings=!1,this.defaultJSExtensions=!1,this.pluginFirst=!1,this.loaderErrorStack=!1,this.set("@empty",this.newModule({})),_.call(this,!1,!1)}}),"undefined"==typeof require||"undefined"==typeof process||process.browser||(a.prototype._nodeRequire=require);var ee;i("normalize",function(e){return function(e,t,n){var r=k.call(this,e,t);return!this.defaultJSExtensions||n||".js"==r.substr(r.length-3,3)||d(r)||(r+=".js"),r}});var te="undefined"!=typeof XMLHttpRequest;i("locate",function(e){return function(t){return Promise.resolve(e.call(this,t)).then(function(e){return te?e.replace(/#/g,"%23"):e})}}),i("fetch",function(){return function(e){return new Promise(function(t,n){K(e.address,e.metadata.authorization,t,n)})}}),i("import",function(e){return function(t,n,r){return n&&n.name&&w.call(this,"SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing "+t+" from "+n.name),e.call(this,t,n,r).then(function(e){return e.__useDefault?e.default:e})}}),i("translate",function(e){return function(t){return"detect"==t.metadata.format&&(t.metadata.format=void 0),e.apply(this,arguments)}}),i("instantiate",function(e){return function(e){if("json"==e.metadata.format&&!this.builder){var t=e.metadata.entry=R();t.deps=[],t.execute=function(){try{return JSON.parse(e.source)}catch(t){throw new Error("Invalid JSON file "+e.name)}}}}}),a.prototype.getConfig=function(e){var t={},n=this;for(var r in n)n.hasOwnProperty&&!n.hasOwnProperty(r)||r in a.prototype&&"transpiler"!=r||J.call(["_loader","amdDefine","amdRequire","defined","failed","version","loads"],r)==-1&&(t[r]=n[r]);return t.production=W.production,t};var ne;a.prototype.config=function(e,t){function n(e){for(var t in e)if(e.hasOwnProperty(t))return!0}var r=this;if("loaderErrorStack"in e&&(ne=$__curScript,e.loaderErrorStack?$__curScript=void 0:$__curScript=ne),"warnings"in e&&(r.warnings=e.warnings),e.transpilerRuntime===!1&&(r._loader.loadedTranspilerRuntime=!0),("production"in e||"build"in e)&&_.call(r,!!e.production,!!(e.build||W&&W.build)),!t){var a;if(j(r,e,function(e){a=a||e.baseURL}),a=a||e.baseURL){if(n(r.packages)||n(r.meta)||n(r.depCache)||n(r.bundles)||n(r.packageConfigPaths))throw new TypeError("Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.");this.baseURL=a,E.call(this)}if(e.paths&&g(r.paths,e.paths),j(r,e,function(e){e.paths&&g(r.paths,e.paths)}),this.warnings)for(var o in r.paths)o.indexOf("*")!=-1&&w.call(r,'Paths configuration "'+o+'" -> "'+r.paths[o]+'" uses wildcards which are being deprecated for simpler trailing "/" folder paths.')}if(e.defaultJSExtensions&&(r.defaultJSExtensions=e.defaultJSExtensions,w.call(r,"The defaultJSExtensions configuration option is deprecated, use packages configuration instead.")),e.pluginFirst&&(r.pluginFirst=e.pluginFirst),e.map){var i="";for(var o in e.map){var s=e.map[o];if("string"!=typeof s){i+=(i.length?", ":"")+'"'+o+'"';var l=r.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),u=r.decanonicalize(o);l&&".js"==u.substr(u.length-3,3)&&(u=u.substr(0,u.length-3));var c="";for(var f in r.packages)u.substr(0,f.length)==f&&(!u[f.length]||"/"==u[f.length])&&c.split("/").length<f.split("/").length&&(c=f);c&&r.packages[c].main&&(u=u.substr(0,u.length-r.packages[c].main.length-1));var f=r.packages[u]=r.packages[u]||{};f.map=s}else r.map[o]=s}i&&w.call(r,"The map configuration for "+i+' uses object submaps, which is deprecated in global map.\nUpdate this to use package contextual map with configs like SystemJS.config({ packages: { "'+o+'": { map: {...} } } }).')}if(e.packageConfigPaths){for(var m=[],p=0;p<e.packageConfigPaths.length;p++){var h=e.packageConfigPaths[p],v=Math.max(h.lastIndexOf("*")+1,h.lastIndexOf("/")),y=k.call(r,h.substr(0,v));m[p]=y+h.substr(v)}r.packageConfigPaths=m}if(e.bundles)for(var o in e.bundles){for(var x=[],p=0;p<e.bundles[o].length;p++){var l=r.defaultJSExtensions&&".js"!=e.bundles[o][p].substr(e.bundles[o][p].length-3,3),S=r.decanonicalize(e.bundles[o][p]);l&&".js"==S.substr(S.length-3,3)&&(S=S.substr(0,S.length-3)),x.push(S)}r.bundles[o]=x}if(e.packages)for(var o in e.packages){if(o.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+o+'" is not a valid package name.');var u=k.call(r,o);"/"==u[u.length-1]&&(u=u.substr(0,u.length-1)),b(r,u,e.packages[o],!1)}for(var P in e){var s=e[P];if(J.call(["baseURL","map","packages","bundles","paths","warnings","packageConfigPaths","loaderErrorStack","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig"],P)==-1)if("object"!=typeof s||s instanceof Array)r[P]=s;else{r[P]=r[P]||{};for(var o in s)if("meta"==P&&"*"==o[0])g(r[P][o]=r[P][o]||{},s[o]);else if("meta"==P){var O=k.call(r,o);r.defaultJSExtensions&&".js"!=O.substr(O.length-3,3)&&!d(O)&&(O+=".js"),g(r[P][O]=r[P][O]||{},s[o])}else if("depCache"==P){var l=r.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),u=r.decanonicalize(o);l&&".js"==u.substr(u.length-3,3)&&(u=u.substr(0,u.length-3)),r[P][u]=[].concat(s[o])}else r[P][o]=s[o]}}j(r,e,function(e){r.config(e,!0)})},function(){function e(e,t){var n,r,a=0;for(var o in e.packages)t.substr(0,o.length)!==o||t.length!==o.length&&"/"!==t[o.length]||(r=o.split("/").length,r>a&&(n=o,a=r));return n}function t(e,t,n,r,a){if(!r||"/"==r[r.length-1]||a||t.defaultExtension===!1)return r;var o=!1;if(t.meta&&p(t.meta,r,function(e,t,n){if(0==n||e.lastIndexOf("*")!=e.length-1)return o=!0}),!o&&e.meta&&p(e.meta,n+"/"+r,function(e,t,n){if(0==n||e.lastIndexOf("*")!=e.length-1)return o=!0}),o)return r;var i="."+(t.defaultExtension||"js");return r.substr(r.length-i.length)!=i?r+i:r}function n(e,n,r,a,i){if(!a){if(!n.main)return r+(e.defaultJSExtensions?".js":"");a="./"==n.main.substr(0,2)?n.main.substr(2):n.main}if(n.map){var s="./"+a,l=S(n.map,s);if(l||(s="./"+t(e,n,r,a,i),s!="./"+a&&(l=S(n.map,s))),l){var u=o(e,n,r,l,s,i);if(u)return u}}return r+"/"+t(e,n,r,a,i)}function r(e,t,n,r){if("."==e)throw new Error("Package "+n+' has a map entry for "." which is not permitted.');return!(t.substr(0,e.length)==e&&r.length>e.length)}function o(e,n,a,o,i,s){"/"==i[i.length-1]&&(i=i.substr(0,i.length-1));var l=n.map[o];if("object"==typeof l)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+a);if(r(o,l,a,i)&&"string"==typeof l){if("."==l)l=a;else if("./"==l.substr(0,2))return a+"/"+t(e,n,a,l.substr(2)+i.substr(o.length),s);return e.normalizeSync(l+i.substr(o.length),a+"/")}}function l(e,n,r,a,o){if(!a){if(!n.main)return Promise.resolve(r+(e.defaultJSExtensions?".js":""));a="./"==n.main.substr(0,2)?n.main.substr(2):n.main}var i,s;return n.map&&(i="./"+a,s=S(n.map,i),s||(i="./"+t(e,n,r,a,o),i!="./"+a&&(s=S(n.map,i)))),(s?d(e,n,r,s,i,o):Promise.resolve()).then(function(i){return i?Promise.resolve(i):Promise.resolve(r+"/"+t(e,n,r,a,o))})}function u(e,n,r,a,o,i,s){if("."==o)o=r;else if("./"==o.substr(0,2))return Promise.resolve(r+"/"+t(e,n,r,o.substr(2)+i.substr(a.length),s)).then(function(t){return L.call(e,t,r+"/")});return e.normalize(o+i.substr(a.length),r+"/")}function d(e,t,n,a,o,i){"/"==o[o.length-1]&&(o=o.substr(0,o.length-1));var s=t.map[a];if("string"==typeof s)return r(a,s,n,o)?u(e,t,n,a,s,o,i):Promise.resolve();if(e.builder)return Promise.resolve(n+"/#:"+o);var l=[],d=[];for(var c in s){var f=z(c);d.push({condition:f,map:s[c]}),l.push(e.import(f.module,n))}return Promise.all(l).then(function(e){for(var t=0;t<d.length;t++){var n=d[t].condition,r=x(n.prop,e[t]);if(!n.negate&&r||n.negate&&!r)return d[t].map}}).then(function(s){if(s){if(!r(a,s,n,o))return;return u(e,t,n,a,s,o,i)}})}function c(e){var t=e.lastIndexOf("*"),n=Math.max(t+1,e.lastIndexOf("/"));return{length:n,regEx:new RegExp("^("+e.substr(0,n).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:t!=-1}}function f(e,t){for(var n,r,a=!1,o=0;o<e.packageConfigPaths.length;o++){var i=e.packageConfigPaths[o],s=h[i]||(h[i]=c(i));if(!(t.length<s.length)){var l=t.match(s.regEx);!l||n&&(a&&s.wildcard||!(n.length<l[1].length))||(n=l[1],a=!s.wildcard,r=n+i.substr(s.length))}}if(n)return{packageName:n,configPath:r}}function m(e,t,n){var r=e.pluginLoader||e;return(r.meta[n]=r.meta[n]||{}).format="json",r.meta[n].loader=null,r.load(n).then(function(){var a=r.get(n).default;return a.systemjs&&(a=a.systemjs),a.modules&&(a.meta=a.modules,w.call(e,"Package config file "+n+' is configured with "modules", which is deprecated as it has been renamed to "meta".')),b(e,t,a,!0)})}function p(e,t,n){var r;for(var a in e){var o="./"==a.substr(0,2)?"./":"";if(o&&(a=a.substr(2)),r=a.indexOf("*"),r!==-1&&a.substr(0,r)==t.substr(0,r)&&a.substr(r+1)==t.substr(t.length-a.length+r+1)&&n(a,e[o+a],a.split("/").length))return}var i=e[t]&&e.hasOwnProperty&&e.hasOwnProperty(t)?e[t]:e["./"+t];i&&n(i,i,0)}s(function(e){return function(){e.call(this),this.packages={},this.packageConfigPaths=[]}}),a.prototype.normalizeSync=a.prototype.decanonicalize=a.prototype.normalize,i("decanonicalize",function(t){return function(n,r){if(this.builder)return t.call(this,n,r,!0);var a=t.call(this,n,r,!1);if(!this.defaultJSExtensions)return a;var o=e(this,a),i=this.packages[o],s=i&&i.defaultExtension;return void 0==s&&i&&i.meta&&p(i.meta,a.substr(o),function(e,t,n){if(0==n||e.lastIndexOf("*")!=e.length-1)return s=!1,!0}),(s===!1||s&&".js"!=s)&&".js"!=n.substr(n.length-3,3)&&".js"==a.substr(a.length-3,3)&&(a=a.substr(0,a.length-3)),a}}),i("normalizeSync",function(t){return function(r,a,i){var s=this;if(i=i===!0,a)var l=e(s,a)||s.defaultJSExtensions&&".js"==a.substr(a.length-3,3)&&e(s,a.substr(0,a.length-3));var u=l&&s.packages[l];if(u&&"."!=r[0]){var d=u.map,c=d&&S(d,r);if(c&&"string"==typeof d[c]){var m=o(s,u,l,c,r,i);if(m)return m}}var p=s.defaultJSExtensions&&".js"!=r.substr(r.length-3,3),h=t.call(s,r,a,!1);p&&".js"!=h.substr(h.length-3,3)&&(p=!1),p&&(h=h.substr(0,h.length-3));var g=f(s,h),v=g&&g.packageName||e(s,h);if(!v)return h+(p?".js":"");var y=h.substr(v.length+1);return n(s,s.packages[v]||{},v,y,i)}}),i("normalize",function(t){return function(n,r,a){var o=this;return a=a===!0,Promise.resolve().then(function(){if(r)var t=e(o,r)||o.defaultJSExtensions&&".js"==r.substr(r.length-3,3)&&e(o,r.substr(0,r.length-3));var i=t&&o.packages[t];if(i&&"./"!=n.substr(0,2)){var s=i.map,l=s&&S(s,n);if(l)return d(o,i,t,l,n,a)}return Promise.resolve()}).then(function(i){if(i)return i;var s=o.defaultJSExtensions&&".js"!=n.substr(n.length-3,3),u=t.call(o,n,r,!1);s&&".js"!=u.substr(u.length-3,3)&&(s=!1),s&&(u=u.substr(0,u.length-3));var d=f(o,u),c=d&&d.packageName||e(o,u);if(!c)return Promise.resolve(u+(s?".js":""));var p=o.packages[c],h=p&&(p.configured||!d);return(h?Promise.resolve(p):m(o,c,d.configPath)).then(function(e){var t=u.substr(c.length+1);return l(o,e,c,t,a)})})}});var h={};i("locate",function(t){return function(n){var r=this;return Promise.resolve(t.call(this,n)).then(function(t){var a=e(r,n.name);if(a){var o=r.packages[a],i=n.name.substr(a.length+1),s={};if(o.meta){var l=0;p(o.meta,i,function(e,t,n){n>l&&(l=n),v(s,t,n&&l>n)}),v(n.metadata,s)}o.format&&!n.metadata.loader&&(n.metadata.format=n.metadata.format||o.format)}return t})}})}(),function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;e<d.length;e++)if("interactive"==d[e].script.readyState)return s=d[e],s.load}function n(e,t){return new Promise(function(e,n){t.metadata.integrity&&n(new Error("Subresource integrity checking is not supported in web workers.")),l=t;try{importScripts(t.address)}catch(e){l=null,n(e)}l=null,t.metadata.entry||n(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var r=document.getElementsByTagName("head")[0];var a,o,s,l=null,u=r&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),d=[],c=0,f=[];i("pushRegister_",function(e){return function(n){return!e.call(this,n)&&(l?this.reduceRegister_(l,n):u?this.reduceRegister_(t(),n):c?f.push(n):this.reduceRegister_(null,n),!0)}}),i("fetch",function(t){return function(i){var l=this;return"json"!=i.metadata.format&&i.metadata.scriptLoad&&(q||D)?D?n(l,i):new Promise(function(t,n){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,i.metadata.entry||f.length){if(!u){for(var r=0;r<f.length;r++)l.reduceRegister_(i,f[r]);f=[]}}else l.reduceRegister_(i);h(),i.metadata.entry||i.metadata.bundle||n(new Error(i.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("")}}function p(e){h(),n(new Error("Unable to load script "+i.address));
-}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<d.length;t++)d[t].script==g&&(s&&s.script==g&&(s=null),d.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);r.removeChild(g)}var g=document.createElement("script");g.async=!0,i.metadata.crossOrigin&&(g.crossOrigin=i.metadata.crossOrigin),i.metadata.integrity&&g.setAttribute("integrity",i.metadata.integrity),u?(g.attachEvent("onreadystatechange",m),d.push({script:g,load:i})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=i.address,r.appendChild(g)}):t.call(this,i)}})}();var re=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,n,r){if(r[e.groupIndex]=r[e.groupIndex]||[],J.call(r[e.groupIndex],e)==-1){r[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;a<o;a++){var i=e.normalizedDeps[a],s=n.defined[i];if(s&&!s.evaluated){var l=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex<l){if(null!==s.groupIndex&&(r[s.groupIndex].splice(J.call(r[s.groupIndex],s),1),0==r[s.groupIndex].length))throw new Error("Mixed dependency cycle detected");s.groupIndex=l}t(s,n,r)}}}}function r(e,n,r){if(!n.module){n.groupIndex=0;var a=[];t(n,r,a);for(var o=!!n.declarative==a.length%2,i=a.length-1;i>=0;i--){for(var s=a[i],l=0;l<s.length;l++){var d=s[l];o?u(d,r):c(d,r)}o=!o}}}function o(){}function l(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function u(t,n){if(!t.module){var r=n._loader.moduleRecords,a=t.module=l(t.name,r),o=t.module.exports,i=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var n in e)o[n]=e[n];else o[e]=t;for(var r=0,i=a.importers.length;r<i;r++){var s=a.importers[r];if(!s.locked){var l=J.call(s.dependencies,a),u=s.setters[l];u&&u(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof i&&(i={setters:[],execute:i}),i=i||{setters:[],execute:function(){}},a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,d=t.normalizedDeps.length;s<d;s++){var c,f=t.normalizedDeps[s],m=n.defined[f],p=r[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(u(m,n),p=m.module,c=p.exports):c=n.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;g<v;++g){var y=h[g];a.setters[y]&&a.setters[y](c)}}}}function d(e,t){var n,r=t.defined[e];if(r)r.declarative?f(e,r,[],t):r.evaluated||c(r,t),n=r.module.exports;else if(n=t.get(e),!n)throw new Error("Unable to load dependency "+e+".");return(!r||r.declarative)&&n&&n.__useDefault?n.default:n}function c(t,r){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;i<s;i++){var l=t.normalizedDeps[i],u=r.defined[l];u&&c(u,r)}t.evaluated=!0;var f=t.execute.call(e,function(e){for(var n=0,a=t.deps.length;n<a;n++)if(t.deps[n]==e)return d(t.normalizedDeps[n],r);var o=r.normalizeSync(e,t.name);if(J.call(t.normalizedDeps,o)!=-1)return d(o,r);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==f&&(o.exports=f),a=o.exports,a&&(a.__esModule||a instanceof n)?t.esModule=r.newModule(a):t.esmExports&&a!==e?t.esModule=r.newModule(p(a)):t.esModule=r.newModule({default:a,__useDefault:!0})}}function f(t,n,r,a){if(n&&!n.evaluated&&n.declarative){r.push(t);for(var o=0,i=n.normalizedDeps.length;o<i;o++){var s=n.normalizedDeps[o];J.call(r,s)==-1&&(a.defined[s]?f(s,a.defined[s],r,a):a.get(s))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}a.prototype.register=function(e,t,n){if("string"!=typeof e&&(n=t,t=e,e=null),"boolean"==typeof n)return this.registerDynamic.apply(this,arguments);var r=R();r.name=e&&(this.decanonicalize||this.normalize).call(this,e),r.declarative=!0,r.deps=t,r.declare=n,this.pushRegister_({amd:!1,entry:r})},a.prototype.registerDynamic=function(e,t,n,r){"string"!=typeof e&&(r=n,n=t,t=e,e=null);var a=R();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=r,a.executingRequire=n,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var n=t.entry,r=e&&e.metadata;if(n.name&&(n.name in this.defined||(this.defined[n.name]=n),r&&(r.bundle=!0)),!n.name||e&&!r.entry&&n.name==e.name){if(!r)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(r.entry)throw"register"==r.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+r.format+" module format, but called System.register.");r.format||(r.format="register"),r.entry=n}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),A(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||!t.metadata.format&&O(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var n=this,a=n.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],r(t,a,n),f(t,a,[],n),a.esModule||(a.esModule=n.newModule(a.module.exports)),n.trace||(n.defined[t]=void 0),n.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var n,a=this;if(a.defined[t.name])n=a.defined[t.name],n.declarative||(n.deps=n.deps.concat(t.metadata.deps)),n.deps=n.deps.concat(t.metadata.deps);else if(t.metadata.entry)n=t.metadata.entry,n.deps=n.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof __exec&&__exec.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");n=t.metadata.entry,n&&t.metadata.deps&&(n.deps=n.deps.concat(t.metadata.deps))}n||(n=R(),n.deps=t.metadata.deps,n.execute=function(){}),a.defined[t.name]=n;var o=m(n.deps);n.deps=o.names,n.originalIndices=o.indices,n.name=t.name,n.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,l=n.deps.length;s<l;s++)i.push(Promise.resolve(a.normalize(n.deps[s],t.name)));return Promise.all(i).then(function(e){return n.normalizedDeps=e,{deps:n.deps,execute:function(){return r(t.name,n,a),f(t.name,n,[],a),n.esModule||(n.esModule=a.newModule(n.module.exports)),a.trace||(a.defined[t.name]=void 0),n.esModule}}})}})}(),i("reduceRegister_",function(e){return function(t,n){if(n||!t.metadata.exports&&(!D||"global"!=t.metadata.format))return e.call(this,t,n);t.metadata.format="global";var r=t.metadata.entry=R();r.deps=t.metadata.deps;var a=M(t.metadata.exports);r.execute=function(){return a}}}),s(function(t){return function(){function n(t){if(Object.keys)Object.keys(e).forEach(t);else for(var n in e)i.call(e,n)&&t(n)}function r(t){n(function(n){if(J.call(s,n)==-1){try{var r=e[n]}catch(e){s.push(n)}t(n,r)}})}var a=this;t.call(a);var o,i=Object.prototype.hasOwnProperty,s=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];a.set("@@global-helpers",a.newModule({prepareGlobal:function(t,n,a,i){var s=e.define;e.define=void 0;var l;if(a){l={};for(var u in a)l[u]=e[u],e[u]=a[u]}return n||(o={},r(function(e,t){o[e]=t})),function(){var t,a=n?M(n):{},u=!!n;if(n&&!i||r(function(r,s){o[r]!==s&&"undefined"!=typeof s&&(i&&(e[r]=void 0),n||(a[r]=s,"undefined"!=typeof t?u||t===s||(u=!0):t=s))}),a=u?a:t,l)for(var d in l)e[d]=l[d];return e.define=s,a}}}))}}),s(function(e){return function(){function t(e){return"file:///"==e.substr(0,8)?e.substr(7+!!U):r&&e.substr(0,r.length)==r?e.substr(r.length):e}var n=this;if(e.call(n),"undefined"!=typeof window&&"undefined"!=typeof document&&window.location)var r=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"");n.set("@@cjs-helpers",n.newModule({requireResolve:function(e,r){return t(n.normalizeSync(e,r))},getPathVars:function(e){var n,r=e.lastIndexOf("!");n=r!=-1?e.substr(0,r):e;var a=n.split("/");return a.pop(),a=a.join("/"),{filename:t(n),dirname:t(a)}}}))}}),i("fetch",function(t){return function(n){return n.metadata.scriptLoad&&q&&(e.define=this.amdDefine),t.call(this,n)}}),s(function(t){return function(){function n(e,t){e=e.replace(s,"");var n=e.match(d),r=(n[1].split(",")[t]||"require").replace(c,""),a=f[r]||(f[r]=new RegExp(l+r+u,"g"));a.lastIndex=0;for(var o,i=[];o=a.exec(e);)i.push(o[2]||o[3]);return i}function r(e,t,n,a){if("object"==typeof e&&!(e instanceof Array))return r.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof e&&"function"==typeof t&&(e=[e]),!(e instanceof Array)){if("string"==typeof e){var i=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),s=o.decanonicalize(e,a);i&&".js"==s.substr(s.length-3,3)&&(s=s.substr(0,s.length-3));var l=o.get(s);if(!l)throw new Error('Module not already loaded loading "'+e+'" as '+s+(a?' from "'+a+'".':"."));return l.__useDefault?l.default:l}throw new TypeError("Invalid require")}for(var u=[],d=0;d<e.length;d++)u.push(o.import(e[d],a));Promise.all(u).then(function(e){t&&t.apply(null,e)},n)}function a(t,a,i){function s(t,n,s){function c(e,n,a){return"string"==typeof e&&"function"!=typeof n?t(e):r.call(o,e,n,a,s.id)}for(var f=[],m=0;m<a.length;m++)f.push(t(a[m]));s.uri=s.id,s.config=function(){},d!=-1&&f.splice(d,0,s),u!=-1&&f.splice(u,0,n),l!=-1&&(c.toUrl=function(e){var t=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),n=o.decanonicalize(e,s.id);return t&&".js"==n.substr(n.length-3,3)&&(n=n.substr(0,n.length-3)),n},f.splice(l,0,c));var p=e.require;e.require=r;var h=i.apply(u==-1?e:n,f);if(e.require=p,"undefined"==typeof h&&s&&(h=s.exports),"undefined"!=typeof h)return h}"string"!=typeof t&&(i=a,a=t,t=null),a instanceof Array||(i=a,a=["require","exports","module"].splice(0,i.length)),"function"!=typeof i&&(i=function(e){return function(){return e}}(i)),void 0===a[a.length-1]&&a.pop();var l,u,d;(l=J.call(a,"require"))!=-1&&(a.splice(l,1),t||(a=a.concat(n(i.toString(),l)))),(u=J.call(a,"exports"))!=-1&&a.splice(u,1),(d=J.call(a,"module"))!=-1&&a.splice(d,1);var c=R();c.name=t&&(o.decanonicalize||o.normalize).call(o,t),c.deps=a,c.execute=s,o.pushRegister_({amd:!0,entry:c})}var o=this;t.call(this);var s=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,l="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",u="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",d=/\(([^\)]*)\)/,c=/^\s+|\s+$/g,f={};a.amd={},i("reduceRegister_",function(e){return function(t,n){if(!n||!n.amd)return e.call(this,t,n);var r=t&&t.metadata,a=n.entry;if(r)if(r.format&&"detect"!=r.format){if(!a.name&&"amd"!=r.format)throw new Error("AMD define called while executing "+r.format+" module "+t.name)}else r.format="amd";if(a.name)r&&(r.entry||r.bundle?r.entry&&r.entry.name&&r.entry.name!=t.name&&(r.entry=void 0):r.entry=a,r.bundle=!0),a.name in this.defined||(this.defined[a.name]=a);else{if(!r)throw new TypeError("Unexpected anonymous AMD define.");if(r.entry&&!r.entry.name)throw new Error("Multiple anonymous defines in module "+t.name);r.entry=a}}}),o.amdDefine=a,o.amdRequire=r}}),function(){function e(e,t){if(t){var n;if(e.pluginFirst){if((n=t.lastIndexOf("!"))!=-1)return t.substr(n+1)}else if((n=t.indexOf("!"))!=-1)return t.substr(0,n);return t}}function t(e,t){var n,r,a=t.lastIndexOf("!");if(a!=-1)return e.pluginFirst?(n=t.substr(a+1),r=t.substr(0,a)):(n=t.substr(0,a),r=t.substr(a+1)||n.substr(n.lastIndexOf(".")+1)),{argument:n,plugin:r}}function n(e,t,n,r){return r&&".js"==t.substr(t.length-3,3)&&(t=t.substr(0,t.length-3)),e.pluginFirst?n+"!"+t:t+"!"+n}function r(e,t){return e.defaultJSExtensions&&".js"!=t.substr(t.length-3,3)}function a(a){return function(o,i,s){var l=this,u=t(l,o);if(i=e(this,i),!u)return a.call(this,o,i,s);var d=l.normalizeSync(u.argument,i,!0),c=l.normalizeSync(u.plugin,i,!0);return n(l,d,c,r(l,u.argument))}}i("decanonicalize",a),i("normalizeSync",a),i("normalize",function(a){return function(o,i,s){var l=this;i=e(this,i);var u=t(l,o);return u?Promise.all([l.normalize(u.argument,i,!0),l.normalize(u.plugin,i,!1)]).then(function(e){return n(l,e[0],e[1],r(l,u.argument))}):a.call(l,o,i,s)}}),i("locate",function(e){return function(t){var n,r=this,a=t.name;return r.pluginFirst?(n=a.indexOf("!"))!=-1&&(t.metadata.loader=a.substr(0,n),t.name=a.substr(n+1)):(n=a.lastIndexOf("!"))!=-1&&(t.metadata.loader=a.substr(n+1),t.name=a.substr(0,n)),e.call(r,t).then(function(e){return n==-1&&t.metadata.loader?(r.pluginLoader||r).normalize(t.metadata.loader,t.name).then(function(n){return t.metadata.loader=n,e}):e}).then(function(e){var n=t.metadata.loader;if(!n)return e;if(t.name==n)throw new Error("Plugin "+n+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");if(r.defined&&r.defined[a])return e;var o=r.pluginLoader||r;return o.import(n).then(function(n){return t.metadata.loaderModule=n,t.address=e,n.locate?n.locate.call(r,t):e})})}}),i("fetch",function(e){return function(t){var n=this;return t.metadata.loaderModule&&t.metadata.loaderModule.fetch&&"defined"!=t.metadata.format?(t.metadata.scriptLoad=!1,t.metadata.loaderModule.fetch.call(n,t,function(t){return e.call(n,t)})):e.call(n,t)}}),i("translate",function(e){return function(t){var n=this,r=arguments;return t.metadata.loaderModule&&t.metadata.loaderModule.translate&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.translate.apply(n,r)).then(function(a){var o=t.metadata.sourceMap;if(o){if("object"!=typeof o)throw new Error("load.metadata.sourceMap must be set to an object.");var i=t.address.split("!")[0];o.file&&o.file!=t.address||(o.file=i+"!transpiled"),(!o.sources||o.sources.length<=1&&(!o.sources[0]||o.sources[0]==t.address))&&(o.sources=[i])}return"string"==typeof a?t.source=a:w.call(this,"Plugin "+t.metadata.loader+" should return the source in translate, instead of setting load.source directly. This support will be deprecated."),e.apply(n,r)}):e.apply(n,r)}}),i("instantiate",function(e){return function(t){var n=this,r=!1;return t.metadata.loaderModule&&t.metadata.loaderModule.instantiate&&!n.builder&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.instantiate.call(n,t,function(t){if(r)throw new Error("Instantiate must only be called once.");return r=!0,e.call(n,t)})).then(function(a){return r?a:(t.metadata.entry=R(),t.metadata.entry.execute=function(){return a},t.metadata.entry.deps=t.metadata.deps,t.metadata.format="defined",e.call(n,t))}):e.call(n,t)}})}();var ae=["browser","node","dev","build","production","default"],oe=/#\{[^\}]+\}/;i("normalize",function(e){return function(t,n,r){var a=this;return T.call(a,t,n).then(function(t){return e.call(a,t,n,r)}).then(function(e){return L.call(a,e,n)})}}),function(){i("fetch",function(e){return function(t){var n=t.metadata.alias,r=t.metadata.deps||[];if(n){t.metadata.format="defined";var a=R();return this.defined[t.name]=a,a.declarative=!0,a.deps=r.concat([n]),a.declare=function(e){return{setters:[function(t){for(var n in t)e(n,t[n]);t.__useDefault&&(a.module.exports.__useDefault=!0)}],execute:function(){}}},""}return e.call(this,t)}})}(),function(){function e(e,t,n){for(var r,a=t.split(".");a.length>1;)r=a.shift(),e=e[r]=e[r]||{};r=a.shift(),r in e||(e[r]=n)}s(function(e){return function(){this.meta={},e.call(this)}}),i("locate",function(e){return function(t){var n,r=this.meta,a=t.name,o=0;for(var i in r)if(n=i.indexOf("*"),n!==-1&&i.substr(0,n)===a.substr(0,n)&&i.substr(n+1)===a.substr(a.length-i.length+n+1)){var s=i.split("/").length;s>o&&(o=s),v(t.metadata,r[i],o!=s)}return r[a]&&v(t.metadata,r[a]),e.call(this,t)}});var t=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,n=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;i("translate",function(r){return function(a){if("defined"==a.metadata.format)return a.metadata.deps=a.metadata.deps||[],Promise.resolve(a.source);var o=a.source.match(t);if(o)for(var i=o[0].match(n),s=0;s<i.length;s++){var l=i[s],u=l.length,d=l.substr(0,1);if(";"==l.substr(u-1,1)&&u--,'"'==d||"'"==d){var c=l.substr(1,l.length-3),f=c.substr(0,c.indexOf(" "));if(f){var m=c.substr(f.length+1,c.length-f.length-1);"[]"==f.substr(f.length-2,2)?(f=f.substr(0,f.length-2),a.metadata[f]=a.metadata[f]||[],a.metadata[f].push(m)):a.metadata[f]instanceof Array?(w.call(this,"Module "+a.name+' contains deprecated "deps '+m+'" meta syntax.\nThis should be updated to "deps[] '+m+'" for pushing to array meta.'),a.metadata[f].push(m)):e(a.metadata,f,m)}else a.metadata[c]=!0}}return r.apply(this,arguments)}})}(),function(){s(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),i("locate",function(e){return function(t){var n=this,r=!1;if(!(t.name in n.defined))for(var a in n.bundles){for(var o=0;o<n.bundles[a].length;o++){var i=n.bundles[a][o];if(i==t.name){r=!0;break}if(i.indexOf("*")!=-1){var s=i.split("*");if(2!=s.length){n.bundles[a].splice(o--,1);continue}if(t.name.substring(0,s[0].length)==s[0]&&t.name.substr(t.name.length-s[1].length,s[1].length)==s[1]&&t.name.substr(s[0].length,t.name.length-s[1].length-s[0].length).indexOf("/")==-1){r=!0;break}}}if(r)return n.import(a).then(function(){return e.call(n,t)})}return e.call(n,t)}})}(),function(){s(function(e){return function(){e.call(this),this.depCache={}}}),i("locate",function(e){return function(t){var n=this,r=n.depCache[t.name];if(r)for(var a=0;a<r.length;a++)n.import(r[a],t.name);return e.call(n,t)}})}(),s(function(t){return function(){t.apply(this,arguments),e.define=this.amdDefine}}),i("fetch",function(e){return function(t){return t.metadata.scriptLoad=!0,e.call(this,t)}}),X=new a,e.SystemJS=X,X.version="0.19.39 CSP","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=X),e.System=X}("undefined"!=typeof self?self:global)}var t="undefined"==typeof Promise;if("undefined"!=typeof document){var n=document.getElementsByTagName("script");if($__curScript=n[n.length-1],document.currentScript&&($__curScript.defer||$__curScript.async)&&($__curScript=document.currentScript),t){var r=$__curScript.src,a=r.substr(0,r.lastIndexOf("/")+1);window.systemJSBootstrap=e,document.write('<script type="text/javascript" src="'+a+'system-polyfills.js"></script>')}else e()}else if("undefined"!=typeof importScripts){var a="";try{throw new Error("_")}catch(e){e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){$__curScript={src:t},a=t.replace(/\/[^\/]*$/,"/")})}t&&importScripts(a+"system-polyfills.js"),e()}else $__curScript="undefined"!=typeof __filename?{src:__filename}:null,e()}();
-//# sourceMappingURL=system-csp-production.js.map
diff --git a/thirdparty/systemjs/dist/system-csp-production.js.map b/thirdparty/systemjs/dist/system-csp-production.js.map
deleted file mode 100644
index 00237ee6e..000000000
--- a/thirdparty/systemjs/dist/system-csp-production.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["system-csp-production.src.js"],"names":["bootstrap","global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isAbsolute","absURLRegEx","isRel","isPlain","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","extendMeta","val","Array","concat","extendPkgConfig","pkgCfgA","pkgCfgB","pkgName","warnInvalidProperties","prop","map","meta","depCache","dNormalized","coreResolve","warn","setPkgConfig","cfg","prependConfig","pkg","packages","basePkg","main","warnings","console","readMemberExpression","pParts","shift","getMapMatch","bestMatch","bestMatchLength","curMatchLength","prepareBaseURL","setProduction","isProduction","isBuilder","set","envModule","newModule","browser","node","_nodeRequire","production","dev","build","default","getNodeModule","parentModuleContext","_nodeModulePaths","require","parentName","mapMatch","has","builder","envSet","envCallback","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","createEntry","originalIndices","declare","execute","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","getGlobalValue","globalValue","first","parseCondition","condition","conditionExport","conditionModule","negation","conditionExportIndex","sysConditions","negate","serializeCondition","conditionObj","resolveCondition","bool","normalize","then","normalizedCondition","load","q","interpolateConditional","conditionalMatch","interpolationRegEx","Promise","resolve","conditionValue","booleanConditional","booleanIndex","isWorker","window","importScripts","document","process","platform","assert","item","thisLen","e","obj","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","metadata","loadModule","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","reject","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","import","parentAddress","sourcePromise","pNames","getOwnPropertyNames","configurable","enumerable","freeze","referrerName","referrerAddress","System","fetchTextFromURL","XMLHttpRequest","authorization","fulfill","xhr","responseText","statusText","sameDomain","doTimeout","domainCheck","exec","XDomainRequest","onload","onerror","ontimeout","onprogress","timeout","onreadystatechange","readyState","addEventListener","open","setRequestHeader","withCredentials","setTimeout","send","fs","readFile","data","dataString","opts","headers","Accept","credentials","r","ok","text","scriptSrc","defaultJSExtensions","pluginFirst","loaderErrorStack","skipExt","resolved","httpRequest","systemImport","__useDefault","systemTranslate","format","apply","arguments","entry","JSON","parse","getConfig","curCurScript","config","isEnvConfig","checkHasConfig","transpilerRuntime","loadedTranspilerRuntime","bundles","packageConfigPaths","objMaps","v","defaultJSExtension","decanonicalize","pkgMatch","packageLength","Math","max","normalized","bundle","normalizedBundleDep","c","getPackage","curPkg","pkgLen","curPkgLen","addDefaultExtension","subPath","skipExtensions","defaultExtension","metaMatch","getMetaMatches","metaPattern","matchMeta","matchDepth","applyPackageConfigSync","mapPath","mapped","doMapSync","validMapping","normalizeSync","applyPackageConfig","doMap","doStringMap","conditionPromises","conditions","conditionValues","createPkgConfigPathObj","lastWildcard","regEx","RegExp","getPackageConfigMatch","configPath","exactMatch","packageConfigPath","packageName","loadPackageConfigPath","pkgConfigPath","configLoader","pluginLoader","systemjs","pkgMeta","matchFn","wildcardIndex","dotRel","exactMeta","decanonicalized","isPlugin","parentPackageName","parentPackage","parentMap","parentMapMatch","pkgConfigMatch","isConfigured","configured","bestDepth","getInteractiveScriptLoad","interactiveScript","script","interactiveLoadingScripts","webWorkerImport","integrity","workerLoad","head","curSystem","curRequire","ieEvents","s","createElement","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","register","reduceRegister_","scriptLoad","complete","evt","cleanup","detachEvent","removeEventListener","removeChild","async","crossOrigin","setAttribute","appendChild","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","nameNormalized","__esModule","seen","registerDynamic","pushRegister_","amd","curMeta","del","doLoad","__exec","grouped","normalizePromises","reduceRegister","forEachGlobal","callback","keys","g","forEachGlobalValue","globalName","ignoredGlobalProps","globalSnapshot","prepareGlobal","globals","encapsulate","curDefine","oldGlobals","singleGlobal","multipleExports","stripOrigin","windowOrigin","requireResolve","parentId","getPathVars","moduleId","filename","pluginIndex","dirname","amdDefine","getCJSDeps","requireIndex","commentRegEx","params","fnBracketRegEx","requireAlias","wsRegEx","requireRegEx","requireRegExs","cjsRequirePre","cjsRequirePost","lastIndex","errback","referer","dynamicRequires","factory","req","contextualRequire","depValues","uri","moduleIndex","exportsIndex","toUrl","amdRequire","getParentName","parentPluginIndex","parsePlugin","argumentName","pluginName","argument","plugin","combinePluginParts","checkDefaultExtension","arg","createNormalizeSync","parsed","pluginSyntaxIndex","loaderNormalized","loaderModule","args","result","sourceMap","originalName","file","sources","calledInstantiate","alias","aliasDeps","_export","setMetaProperty","target","curPart","depth","metaRegEx","metaPartRegEx","metaParts","firstChar","metaString","metaName","metaValue","loadedBundles","matched","curModule","parts","substring","SystemJS","version","doPolyfill","scripts","currentScript","defer","curPath","basePath","systemJSBootstrap","write","__filename"],"mappings":";;;CAGA,WACA,QAASA,MACT,SAAUC,GACV,QAASC,GAAYC,EAAKC,GACxB,GAAkB,gBAAPD,GACT,KAAM,IAAIE,WAAU,uBACtB,IAAIC,GAAIC,OAAOJ,GAAKK,QAAQ,aAAc,IAAIC,MAAM,mHACpD,KAAKH,EACH,KAAM,IAAII,YAAW,qBACvB,IAAIC,GAAWL,EAAE,IAAM,GACnBM,EAAWN,EAAE,IAAM,GACnBO,EAAWP,EAAE,IAAM,GACnBQ,EAAOR,EAAE,IAAM,GACfS,EAAWT,EAAE,IAAM,GACnBU,EAAOV,EAAE,IAAM,GACfW,EAAWX,EAAE,IAAM,GACnBY,EAASZ,EAAE,IAAM,GACjBa,EAAOb,EAAE,IAAM,EACnB,IAAgBc,SAAZhB,EAAuB,CACzB,GAAIiB,GAAOjB,YAAmBF,GAAcE,EAAU,GAAIF,GAAYE,GAClEkB,GAAQX,IAAaG,IAASF,GAC9BU,GAASL,GAAaC,IACxBA,EAASG,EAAKH,QACZI,GAAwB,MAAhBL,EAAS,KACnBA,EAAYA,IAAcI,EAAKP,OAAQO,EAAKT,UAAcS,EAAKJ,SAAiB,GAAN,KAAYI,EAAKJ,SAASM,MAAM,EAAGF,EAAKJ,SAASO,YAAY,KAAO,GAAKP,EAAYI,EAAKJ,SAEtK,IAAIQ,KACJR,GAAST,QAAQ,kBAAmB,IACjCA,QAAQ,iBAAkB,KAC1BA,QAAQ,UAAW,QACnBA,QAAQ,aAAc,SAAUkB,GACrB,QAANA,EACFD,EAAOE,MAEPF,EAAOG,KAAKF,KAElBT,EAAWQ,EAAOI,KAAK,IAAIrB,QAAQ,MAAuB,MAAhBS,EAAS,GAAa,IAAM,IAClEK,IACFN,EAAOK,EAAKL,KACZD,EAAWM,EAAKN,SAChBD,EAAOO,EAAKP,KACZD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,OAASA,GAEF,mBAAR/R,MAAsBA,KAAOhC,QAGvC,GAAIimB,GAAgC,mBAAZvY,QAGxB,IAAwB,mBAAbQ,UAA0B,CACnC,GAAIgY,GAAUhY,SAASS,qBAAqB,SAI5C,IAHA9L,aAAeqjB,EAAQA,EAAQtjB,OAAS,GACpCsL,SAASiY,gBAAkBtjB,aAAaujB,OAASvjB,aAAa8a,SAChE9a,aAAeqL,SAASiY,eACtBF,EAAY,CACd,GAAII,GAAUxjB,aAAaE,IACvBujB,EAAWD,EAAQpjB,OAAO,EAAGojB,EAAQ9kB,YAAY,KAAO,EAC5DyM,QAAOuY,kBAAoBxmB,EAC3BmO,SAASsY,MACP,uCAA8CF,EAAW,sCAI3DvmB,SAIC,IAA6B,mBAAlBkO,eAA+B,CAC7C,GAAIqY,GAAW,EACf,KACE,KAAM,IAAIhjB,OAAM,KAChB,MAAOkL,GACPA,EAAElM,MAAM/B,QAAQ,iCAAkC,SAASF,EAAGH,GAC5D2C,cAAiBE,IAAK7C,GACtBomB,EAAWpmB,EAAIK,QAAQ,YAAa,OAGpC0lB,GACFhY,cAAcqY,EAAW,uBAC3BvmB,QAGA8C,cAAoC,mBAAd4jB,aAA8B1jB,IAAK0jB,YAAe,KACxE1mB"} \ No newline at end of file
diff --git a/thirdparty/systemjs/dist/system-csp-production.src.js b/thirdparty/systemjs/dist/system-csp-production.src.js
deleted file mode 100644
index 9c5e56532..000000000
--- a/thirdparty/systemjs/dist/system-csp-production.src.js
+++ /dev/null
@@ -1,4536 +0,0 @@
-/*
- * SystemJS v0.19.39
- */
-(function() {
-function bootstrap() {// from https://gist.github.com/Yaffle/1088850
-(function(global) {
-function URLPolyfill(url, baseURL) {
- if (typeof url != 'string')
- throw new TypeError('URL must be a string');
- var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
- if (!m)
- throw new RangeError('Invalid URL format');
- var protocol = m[1] || "";
- var username = m[2] || "";
- var password = m[3] || "";
- var host = m[4] || "";
- var hostname = m[5] || "";
- var port = m[6] || "";
- var pathname = m[7] || "";
- var search = m[8] || "";
- var hash = m[9] || "";
- if (baseURL !== undefined) {
- var base = baseURL instanceof URLPolyfill ? baseURL : new URLPolyfill(baseURL);
- var flag = !protocol && !host && !username;
- if (flag && !pathname && !search)
- search = base.search;
- if (flag && pathname[0] !== "/")
- pathname = (pathname ? (((base.host || base.username) && !base.pathname ? "/" : "") + base.pathname.slice(0, base.pathname.lastIndexOf("/") + 1) + pathname) : base.pathname);
- // dot segments removal
- var output = [];
- pathname.replace(/^(\.\.?(\/|$))+/, "")
- .replace(/\/(\.(\/|$))+/g, "/")
- .replace(/\/\.\.$/, "/../")
- .replace(/\/?[^\/]*/g, function (p) {
- if (p === "/..")
- output.pop();
- else
- output.push(p);
- });
- pathname = output.join("").replace(/^\//, pathname[0] === "/" ? "/" : "");
- if (flag) {
- port = base.port;
- hostname = base.hostname;
- host = base.host;
- password = base.password;
- username = base.username;
- }
- if (!protocol)
- protocol = base.protocol;
- }
-
- // convert URLs to use / always
- pathname = pathname.replace(/\\/g, '/');
-
- this.origin = host ? protocol + (protocol !== "" || host !== "" ? "//" : "") + host : "";
- this.href = protocol + (protocol && host || protocol == "file:" ? "//" : "") + (username !== "" ? username + (password !== "" ? ":" + password : "") + "@" : "") + host + pathname + search + hash;
- this.protocol = protocol;
- this.username = username;
- this.password = password;
- this.host = host;
- this.hostname = hostname;
- this.port = port;
- this.pathname = pathname;
- this.search = search;
- this.hash = hash;
-}
-global.URLPolyfill = URLPolyfill;
-})(typeof self != 'undefined' ? self : global);(function(__global) {
-
- var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined';
- var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
- var isWindows = typeof process != 'undefined' && typeof process.platform != 'undefined' && !!process.platform.match(/^win/);
-
- if (!__global.console)
- __global.console = { assert: function() {} };
-
- // IE8 support
- var indexOf = Array.prototype.indexOf || function(item) {
- for (var i = 0, thisLen = this.length; i < thisLen; i++) {
- if (this[i] === item) {
- return i;
- }
- }
- return -1;
- };
-
- var defineProperty;
- (function () {
- try {
- if (!!Object.defineProperty({}, 'a', {}))
- defineProperty = Object.defineProperty;
- }
- catch (e) {
- defineProperty = function(obj, prop, opt) {
- try {
- obj[prop] = opt.value || opt.get.call(obj);
- }
- catch(e) {}
- }
- }
- })();
-
- var errArgs = new Error(0, '_').fileName == '_';
-
- function addToError(err, msg) {
- // parse the stack removing loader code lines for simplification
- if (!err.originalErr) {
- var stack = ((err.message || err) + (err.stack ? '\n' + err.stack : '')).toString().split('\n');
- var newStack = [];
- for (var i = 0; i < stack.length; i++) {
- if (typeof $__curScript == 'undefined' || stack[i].indexOf($__curScript.src) == -1)
- newStack.push(stack[i]);
- }
- }
-
- var newMsg = '(SystemJS) ' + (newStack ? newStack.join('\n\t') : err.message.substr(11)) + '\n\t' + msg;
-
- // Convert file:/// URLs to paths in Node
- if (!isBrowser)
- newMsg = newMsg.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, '');
-
- var newErr = errArgs ? new Error(newMsg, err.fileName, err.lineNumber) : new Error(newMsg);
-
- newErr.stack = newMsg;
-
- // track the original error
- newErr.originalErr = err.originalErr || err;
-
- return newErr;
- }
-
- function __eval(source, debugName, context) {
- try {
- new Function(source).call(context);
- }
- catch(e) {
- throw addToError(e, 'Evaluating ' + debugName);
- }
- }
-
- var baseURI;
-
- // environent baseURI detection
- if (typeof document != 'undefined' && document.getElementsByTagName) {
- baseURI = document.baseURI;
-
- if (!baseURI) {
- var bases = document.getElementsByTagName('base');
- baseURI = bases[0] && bases[0].href || window.location.href;
- }
- }
- else if (typeof location != 'undefined') {
- baseURI = __global.location.href;
- }
-
- // sanitize out the hash and querystring
- if (baseURI) {
- baseURI = baseURI.split('#')[0].split('?')[0];
- baseURI = baseURI.substr(0, baseURI.lastIndexOf('/') + 1);
- }
- else if (typeof process != 'undefined' && process.cwd) {
- baseURI = 'file://' + (isWindows ? '/' : '') + process.cwd() + '/';
- if (isWindows)
- baseURI = baseURI.replace(/\\/g, '/');
- }
- else {
- throw new TypeError('No environment baseURI');
- }
-
- try {
- var nativeURL = new __global.URL('test:///').protocol == 'test:';
- }
- catch(e) {}
-
- var URL = nativeURL ? __global.URL : __global.URLPolyfill;
-
-/*
-*********************************************************************************************
-
- Dynamic Module Loader Polyfill
-
- - Implemented exactly to the former 2014-08-24 ES6 Specification Draft Rev 27, Section 15
- http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#august_24_2014_draft_rev_27
-
- - Functions are commented with their spec numbers, with spec differences commented.
-
- - Spec bugs are commented in this code with links.
-
- - Abstract functions have been combined where possible, and their associated functions
- commented.
-
- - Realm implementation is entirely omitted.
-
-*********************************************************************************************
-*/
-
-function Module() {}
-// http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag
-defineProperty(Module.prototype, 'toString', {
- value: function() {
- return 'Module';
- }
-});
-function Loader(options) {
- this._loader = {
- loaderObj: this,
- loads: [],
- modules: {},
- importPromises: {},
- moduleRecords: {}
- };
-
- // 26.3.3.6
- defineProperty(this, 'global', {
- get: function() {
- return __global;
- }
- });
-
- // 26.3.3.13 realm not implemented
-}
-
-(function() {
-
-// Some Helpers
-
-// logs a linkset snapshot for debugging
-/* function snapshot(loader) {
- console.log('---Snapshot---');
- for (var i = 0; i < loader.loads.length; i++) {
- var load = loader.loads[i];
- var linkSetLog = ' ' + load.name + ' (' + load.status + '): ';
-
- for (var j = 0; j < load.linkSets.length; j++) {
- linkSetLog += '{' + logloads(load.linkSets[j].loads) + '} ';
- }
- console.log(linkSetLog);
- }
- console.log('');
-}
-function logloads(loads) {
- var log = '';
- for (var k = 0; k < loads.length; k++)
- log += loads[k].name + (k != loads.length - 1 ? ' ' : '');
- return log;
-} */
-
-
-/* function checkInvariants() {
- // see https://bugs.ecmascript.org/show_bug.cgi?id=2603#c1
-
- var loads = System._loader.loads;
- var linkSets = [];
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
- console.assert(load.status == 'loading' || load.status == 'loaded', 'Each load is loading or loaded');
-
- for (var j = 0; j < load.linkSets.length; j++) {
- var linkSet = load.linkSets[j];
-
- for (var k = 0; k < linkSet.loads.length; k++)
- console.assert(loads.indexOf(linkSet.loads[k]) != -1, 'linkSet loads are a subset of loader loads');
-
- if (linkSets.indexOf(linkSet) == -1)
- linkSets.push(linkSet);
- }
- }
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
- for (var j = 0; j < linkSets.length; j++) {
- var linkSet = linkSets[j];
-
- if (linkSet.loads.indexOf(load) != -1)
- console.assert(load.linkSets.indexOf(linkSet) != -1, 'linkSet contains load -> load contains linkSet');
-
- if (load.linkSets.indexOf(linkSet) != -1)
- console.assert(linkSet.loads.indexOf(load) != -1, 'load contains linkSet -> linkSet contains load');
- }
- }
-
- for (var i = 0; i < linkSets.length; i++) {
- var linkSet = linkSets[i];
- for (var j = 0; j < linkSet.loads.length; j++) {
- var load = linkSet.loads[j];
-
- for (var k = 0; k < load.dependencies.length; k++) {
- var depName = load.dependencies[k].value;
- var depLoad;
- for (var l = 0; l < loads.length; l++) {
- if (loads[l].name != depName)
- continue;
- depLoad = loads[l];
- break;
- }
-
- // loading records are allowed not to have their dependencies yet
- // if (load.status != 'loading')
- // console.assert(depLoad, 'depLoad found');
-
- // console.assert(linkSet.loads.indexOf(depLoad) != -1, 'linkset contains all dependencies');
- }
- }
- }
-} */
-
- // 15.2.3 - Runtime Semantics: Loader State
-
- // 15.2.3.11
- function createLoaderLoad(object) {
- return {
- // modules is an object for ES5 implementation
- modules: {},
- loads: [],
- loaderObj: object
- };
- }
-
- // 15.2.3.2 Load Records and LoadRequest Objects
-
- var anonCnt = 0;
-
- // 15.2.3.2.1
- function createLoad(name) {
- return {
- status: 'loading',
- name: name || '<Anonymous' + ++anonCnt + '>',
- linkSets: [],
- dependencies: [],
- metadata: {}
- };
- }
-
- // 15.2.3.2.2 createLoadRequestObject, absorbed into calling functions
-
- // 15.2.4
-
- // 15.2.4.1
- function loadModule(loader, name, options) {
- return new Promise(asyncStartLoadPartwayThrough({
- step: options.address ? 'fetch' : 'locate',
- loader: loader,
- moduleName: name,
- // allow metadata for import https://bugs.ecmascript.org/show_bug.cgi?id=3091
- moduleMetadata: options && options.metadata || {},
- moduleSource: options.source,
- moduleAddress: options.address
- }));
- }
-
- // 15.2.4.2
- function requestLoad(loader, request, refererName, refererAddress) {
- // 15.2.4.2.1 CallNormalize
- return new Promise(function(resolve, reject) {
- resolve(loader.loaderObj.normalize(request, refererName, refererAddress));
- })
- // 15.2.4.2.2 GetOrCreateLoad
- .then(function(name) {
- var load;
- if (loader.modules[name]) {
- load = createLoad(name);
- load.status = 'linked';
- // https://bugs.ecmascript.org/show_bug.cgi?id=2795
- load.module = loader.modules[name];
- return load;
- }
-
- for (var i = 0, l = loader.loads.length; i < l; i++) {
- load = loader.loads[i];
- if (load.name != name)
- continue;
- return load;
- }
-
- load = createLoad(name);
- loader.loads.push(load);
-
- proceedToLocate(loader, load);
-
- return load;
- });
- }
-
- // 15.2.4.3
- function proceedToLocate(loader, load) {
- proceedToFetch(loader, load,
- Promise.resolve()
- // 15.2.4.3.1 CallLocate
- .then(function() {
- return loader.loaderObj.locate({ name: load.name, metadata: load.metadata });
- })
- );
- }
-
- // 15.2.4.4
- function proceedToFetch(loader, load, p) {
- proceedToTranslate(loader, load,
- p
- // 15.2.4.4.1 CallFetch
- .then(function(address) {
- // adjusted, see https://bugs.ecmascript.org/show_bug.cgi?id=2602
- if (load.status != 'loading')
- return;
- load.address = address;
-
- return loader.loaderObj.fetch({ name: load.name, metadata: load.metadata, address: address });
- })
- );
- }
-
- // 15.2.4.5
- function proceedToTranslate(loader, load, p) {
- p
- // 15.2.4.5.1 CallTranslate
- .then(function(source) {
- if (load.status != 'loading')
- return;
-
- load.address = load.address || load.name;
-
- return Promise.resolve(loader.loaderObj.translate({ name: load.name, metadata: load.metadata, address: load.address, source: source }))
-
- // 15.2.4.5.2 CallInstantiate
- .then(function(source) {
- load.source = source;
- return loader.loaderObj.instantiate({ name: load.name, metadata: load.metadata, address: load.address, source: source });
- })
-
- // 15.2.4.5.3 InstantiateSucceeded
- .then(function(instantiateResult) {
- if (instantiateResult === undefined)
- throw new TypeError('Declarative modules unsupported in the polyfill.');
-
- if (typeof instantiateResult != 'object')
- throw new TypeError('Invalid instantiate return value');
-
- load.depsList = instantiateResult.deps || [];
- load.execute = instantiateResult.execute;
- })
- // 15.2.4.6 ProcessLoadDependencies
- .then(function() {
- load.dependencies = [];
- var depsList = load.depsList;
-
- var loadPromises = [];
- for (var i = 0, l = depsList.length; i < l; i++) (function(request, index) {
- loadPromises.push(
- requestLoad(loader, request, load.name, load.address)
-
- // 15.2.4.6.1 AddDependencyLoad (load is parentLoad)
- .then(function(depLoad) {
-
- // adjusted from spec to maintain dependency order
- // this is due to the System.register internal implementation needs
- load.dependencies[index] = {
- key: request,
- value: depLoad.name
- };
-
- if (depLoad.status != 'linked') {
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++)
- addLoadToLinkSet(linkSets[i], depLoad);
- }
-
- // console.log('AddDependencyLoad ' + depLoad.name + ' for ' + load.name);
- // snapshot(loader);
- })
- );
- })(depsList[i], i);
-
- return Promise.all(loadPromises);
- })
-
- // 15.2.4.6.2 LoadSucceeded
- .then(function() {
- // console.log('LoadSucceeded ' + load.name);
- // snapshot(loader);
-
- load.status = 'loaded';
-
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++)
- updateLinkSetOnLoad(linkSets[i], load);
- });
- })
- // 15.2.4.5.4 LoadFailed
- ['catch'](function(exc) {
- load.status = 'failed';
- load.exception = exc;
-
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++) {
- linkSetFailed(linkSets[i], load, exc);
- }
-
- console.assert(load.linkSets.length == 0, 'linkSets not removed');
- });
- }
-
- // 15.2.4.7 PromiseOfStartLoadPartwayThrough absorbed into calling functions
-
- // 15.2.4.7.1
- function asyncStartLoadPartwayThrough(stepState) {
- return function(resolve, reject) {
- var loader = stepState.loader;
- var name = stepState.moduleName;
- var step = stepState.step;
-
- if (loader.modules[name])
- throw new TypeError('"' + name + '" already exists in the module table');
-
- // adjusted to pick up existing loads
- var existingLoad;
- for (var i = 0, l = loader.loads.length; i < l; i++) {
- if (loader.loads[i].name == name) {
- existingLoad = loader.loads[i];
-
- if (step == 'translate' && !existingLoad.source) {
- existingLoad.address = stepState.moduleAddress;
- proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));
- }
-
- // a primary load -> use that existing linkset if it is for the direct load here
- // otherwise create a new linkset unit
- if (existingLoad.linkSets.length && existingLoad.linkSets[0].loads[0].name == existingLoad.name)
- return existingLoad.linkSets[0].done.then(function() {
- resolve(existingLoad);
- });
- }
- }
-
- var load = existingLoad || createLoad(name);
-
- load.metadata = stepState.moduleMetadata;
-
- var linkSet = createLinkSet(loader, load);
-
- loader.loads.push(load);
-
- resolve(linkSet.done);
-
- if (step == 'locate')
- proceedToLocate(loader, load);
-
- else if (step == 'fetch')
- proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));
-
- else {
- console.assert(step == 'translate', 'translate step');
- load.address = stepState.moduleAddress;
- proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));
- }
- }
- }
-
- // Declarative linking functions run through alternative implementation:
- // 15.2.5.1.1 CreateModuleLinkageRecord not implemented
- // 15.2.5.1.2 LookupExport not implemented
- // 15.2.5.1.3 LookupModuleDependency not implemented
-
- // 15.2.5.2.1
- function createLinkSet(loader, startingLoad) {
- var linkSet = {
- loader: loader,
- loads: [],
- startingLoad: startingLoad, // added see spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
- loadingCount: 0
- };
- linkSet.done = new Promise(function(resolve, reject) {
- linkSet.resolve = resolve;
- linkSet.reject = reject;
- });
- addLoadToLinkSet(linkSet, startingLoad);
- return linkSet;
- }
- // 15.2.5.2.2
- function addLoadToLinkSet(linkSet, load) {
- if (load.status == 'failed')
- return;
-
- for (var i = 0, l = linkSet.loads.length; i < l; i++)
- if (linkSet.loads[i] == load)
- return;
-
- linkSet.loads.push(load);
- load.linkSets.push(linkSet);
-
- // adjustment, see https://bugs.ecmascript.org/show_bug.cgi?id=2603
- if (load.status != 'loaded') {
- linkSet.loadingCount++;
- }
-
- var loader = linkSet.loader;
-
- for (var i = 0, l = load.dependencies.length; i < l; i++) {
- if (!load.dependencies[i])
- continue;
-
- var name = load.dependencies[i].value;
-
- if (loader.modules[name])
- continue;
-
- for (var j = 0, d = loader.loads.length; j < d; j++) {
- if (loader.loads[j].name != name)
- continue;
-
- addLoadToLinkSet(linkSet, loader.loads[j]);
- break;
- }
- }
- // console.log('add to linkset ' + load.name);
- // snapshot(linkSet.loader);
- }
-
- // linking errors can be generic or load-specific
- // this is necessary for debugging info
- function doLink(linkSet) {
- var error = false;
- try {
- link(linkSet, function(load, exc) {
- linkSetFailed(linkSet, load, exc);
- error = true;
- });
- }
- catch(e) {
- linkSetFailed(linkSet, null, e);
- error = true;
- }
- return error;
- }
-
- // 15.2.5.2.3
- function updateLinkSetOnLoad(linkSet, load) {
- // console.log('update linkset on load ' + load.name);
- // snapshot(linkSet.loader);
-
- console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
-
- linkSet.loadingCount--;
-
- if (linkSet.loadingCount > 0)
- return;
-
- // adjusted for spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
- var startingLoad = linkSet.startingLoad;
-
- // non-executing link variation for loader tracing
- // on the server. Not in spec.
- /***/
- if (linkSet.loader.loaderObj.execute === false) {
- var loads = [].concat(linkSet.loads);
- for (var i = 0, l = loads.length; i < l; i++) {
- var load = loads[i];
- load.module = {
- name: load.name,
- module: _newModule({}),
- evaluated: true
- };
- load.status = 'linked';
- finishLoad(linkSet.loader, load);
- }
- return linkSet.resolve(startingLoad);
- }
- /***/
-
- var abrupt = doLink(linkSet);
-
- if (abrupt)
- return;
-
- console.assert(linkSet.loads.length == 0, 'loads cleared');
-
- linkSet.resolve(startingLoad);
- }
-
- // 15.2.5.2.4
- function linkSetFailed(linkSet, load, exc) {
- var loader = linkSet.loader;
- var requests;
-
- checkError:
- if (load) {
- if (linkSet.loads[0].name == load.name) {
- exc = addToError(exc, 'Error loading ' + load.name);
- }
- else {
- for (var i = 0; i < linkSet.loads.length; i++) {
- var pLoad = linkSet.loads[i];
- for (var j = 0; j < pLoad.dependencies.length; j++) {
- var dep = pLoad.dependencies[j];
- if (dep.value == load.name) {
- exc = addToError(exc, 'Error loading ' + load.name + ' as "' + dep.key + '" from ' + pLoad.name);
- break checkError;
- }
- }
- }
- exc = addToError(exc, 'Error loading ' + load.name + ' from ' + linkSet.loads[0].name);
- }
- }
- else {
- exc = addToError(exc, 'Error linking ' + linkSet.loads[0].name);
- }
-
-
- var loads = linkSet.loads.concat([]);
- for (var i = 0, l = loads.length; i < l; i++) {
- var load = loads[i];
-
- // store all failed load records
- loader.loaderObj.failed = loader.loaderObj.failed || [];
- if (indexOf.call(loader.loaderObj.failed, load) == -1)
- loader.loaderObj.failed.push(load);
-
- var linkIndex = indexOf.call(load.linkSets, linkSet);
- console.assert(linkIndex != -1, 'link not present');
- load.linkSets.splice(linkIndex, 1);
- if (load.linkSets.length == 0) {
- var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
- if (globalLoadsIndex != -1)
- linkSet.loader.loads.splice(globalLoadsIndex, 1);
- }
- }
- linkSet.reject(exc);
- }
-
- // 15.2.5.2.5
- function finishLoad(loader, load) {
- // add to global trace if tracing
- if (loader.loaderObj.trace) {
- if (!loader.loaderObj.loads)
- loader.loaderObj.loads = {};
- var depMap = {};
- load.dependencies.forEach(function(dep) {
- depMap[dep.key] = dep.value;
- });
- loader.loaderObj.loads[load.name] = {
- name: load.name,
- deps: load.dependencies.map(function(dep){ return dep.key }),
- depMap: depMap,
- address: load.address,
- metadata: load.metadata,
- source: load.source
- };
- }
- // if not anonymous, add to the module table
- if (load.name) {
- console.assert(!loader.modules[load.name] || loader.modules[load.name].module === load.module.module, 'load not in module table');
- loader.modules[load.name] = load.module;
- }
- var loadIndex = indexOf.call(loader.loads, load);
- if (loadIndex != -1)
- loader.loads.splice(loadIndex, 1);
- for (var i = 0, l = load.linkSets.length; i < l; i++) {
- loadIndex = indexOf.call(load.linkSets[i].loads, load);
- if (loadIndex != -1)
- load.linkSets[i].loads.splice(loadIndex, 1);
- }
- load.linkSets.splice(0, load.linkSets.length);
- }
-
- function doDynamicExecute(linkSet, load, linkError) {
- try {
- var module = load.execute();
- }
- catch(e) {
- linkError(load, e);
- return;
- }
- if (!module || !(module instanceof Module))
- linkError(load, new TypeError('Execution must define a Module instance'));
- else
- return module;
- }
-
- // 26.3 Loader
-
- // 26.3.1.1
- // defined at top
-
- // importPromises adds ability to import a module twice without error - https://bugs.ecmascript.org/show_bug.cgi?id=2601
- function createImportPromise(loader, name, promise) {
- var importPromises = loader._loader.importPromises;
- return importPromises[name] = promise.then(function(m) {
- importPromises[name] = undefined;
- return m;
- }, function(e) {
- importPromises[name] = undefined;
- throw e;
- });
- }
-
- Loader.prototype = {
- // 26.3.3.1
- constructor: Loader,
- // 26.3.3.2
- define: function(name, source, options) {
- // check if already defined
- if (this._loader.importPromises[name])
- throw new TypeError('Module is already loading.');
- return createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
- step: 'translate',
- loader: this._loader,
- moduleName: name,
- moduleMetadata: options && options.metadata || {},
- moduleSource: source,
- moduleAddress: options && options.address
- })));
- },
- // 26.3.3.3
- 'delete': function(name) {
- var loader = this._loader;
- delete loader.importPromises[name];
- delete loader.moduleRecords[name];
- return loader.modules[name] ? delete loader.modules[name] : false;
- },
- // 26.3.3.4 entries not implemented
- // 26.3.3.5
- get: function(key) {
- if (!this._loader.modules[key])
- return;
- return this._loader.modules[key].module;
- },
- // 26.3.3.7
- has: function(name) {
- return !!this._loader.modules[name];
- },
- // 26.3.3.8
- 'import': function(name, parentName, parentAddress) {
- if (typeof parentName == 'object')
- parentName = parentName.name;
-
- // run normalize first
- var loaderObj = this;
-
- // added, see https://bugs.ecmascript.org/show_bug.cgi?id=2659
- return Promise.resolve(loaderObj.normalize(name, parentName))
- .then(function(name) {
- var loader = loaderObj._loader;
-
- if (loader.modules[name])
- return loader.modules[name].module;
-
- return loader.importPromises[name] || createImportPromise(loaderObj, name,
- loadModule(loader, name, {})
- .then(function(load) {
- delete loader.importPromises[name];
- return load.module.module;
- }));
- });
- },
- // 26.3.3.9 keys not implemented
- // 26.3.3.10
- load: function(name) {
- var loader = this._loader;
- if (loader.modules[name])
- return Promise.resolve();
- return loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
- step: 'locate',
- loader: loader,
- moduleName: name,
- moduleMetadata: {},
- moduleSource: undefined,
- moduleAddress: undefined
- }))
- .then(function() {
- delete loader.importPromises[name];
- }));
- },
- // 26.3.3.11
- module: function(source, options) {
- var load = createLoad();
- load.address = options && options.address;
- var linkSet = createLinkSet(this._loader, load);
- var sourcePromise = Promise.resolve(source);
- var loader = this._loader;
- var p = linkSet.done.then(function() {
- return load.module.module;
- });
- proceedToTranslate(loader, load, sourcePromise);
- return p;
- },
- // 26.3.3.12
- newModule: function (obj) {
- if (typeof obj != 'object')
- throw new TypeError('Expected object');
-
- var m = new Module();
-
- var pNames = [];
- if (Object.getOwnPropertyNames && obj != null)
- pNames = Object.getOwnPropertyNames(obj);
- else
- for (var key in obj)
- pNames.push(key);
-
- for (var i = 0; i < pNames.length; i++) (function(key) {
- defineProperty(m, key, {
- configurable: false,
- enumerable: true,
- get: function () {
- return obj[key];
- },
- set: function() {
- throw new Error('Module exports cannot be changed externally.');
- }
- });
- })(pNames[i]);
-
- if (Object.freeze)
- Object.freeze(m);
-
- return m;
- },
- // 26.3.3.14
- set: function(name, module) {
- if (!(module instanceof Module))
- throw new TypeError('Loader.set(' + name + ', module) must be a module');
- this._loader.modules[name] = {
- module: module
- };
- },
- // 26.3.3.15 values not implemented
- // 26.3.3.16 @@iterator not implemented
- // 26.3.3.17 @@toStringTag not implemented
-
- // 26.3.3.18.1
- normalize: function(name, referrerName, referrerAddress) {},
- // 26.3.3.18.2
- locate: function(load) {
- return load.name;
- },
- // 26.3.3.18.3
- fetch: function(load) {
- },
- // 26.3.3.18.4
- translate: function(load) {
- return load.source;
- },
- // 26.3.3.18.5
- instantiate: function(load) {
- }
- };
-
- var _newModule = Loader.prototype.newModule;
-
-/*
- * ES6 Module Declarative Linking Code
- */
- function link(linkSet, linkError) {
-
- var loader = linkSet.loader;
-
- if (!linkSet.loads.length)
- return;
-
- var loads = linkSet.loads.concat([]);
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
-
- var module = doDynamicExecute(linkSet, load, linkError);
- if (!module)
- return;
- load.module = {
- name: load.name,
- module: module
- };
- load.status = 'linked';
-
- finishLoad(loader, load);
- }
- }
-
-})();
-
-var System;
-
-// SystemJS Loader Class and Extension helpers
-function SystemJSLoader() {
- Loader.call(this);
-
- this.paths = {};
- this._loader.paths = {};
-
- systemJSConstructor.call(this);
-}
-
-// inline Object.create-style class extension
-function SystemProto() {};
-SystemProto.prototype = Loader.prototype;
-SystemJSLoader.prototype = new SystemProto();
-SystemJSLoader.prototype.constructor = SystemJSLoader;
-
-var systemJSConstructor;
-
-function hook(name, hook) {
- SystemJSLoader.prototype[name] = hook(SystemJSLoader.prototype[name] || function() {});
-}
-function hookConstructor(hook) {
- systemJSConstructor = hook(systemJSConstructor || function() {});
-}
-
-
-var absURLRegEx = /^[^\/]+:\/\//;
-function isAbsolute(name) {
- return name.match(absURLRegEx);
-}
-function isRel(name) {
- return (name[0] == '.' && (!name[1] || name[1] == '/' || name[1] == '.')) || name[0] == '/';
-}
-function isPlain(name) {
- return !isRel(name) && !isAbsolute(name);
-}
-
-var baseURIObj = new URL(baseURI);
-
-function urlResolve(name, parent) {
- // url resolution shortpaths
- if (name[0] == '.') {
- // dot-relative url normalization
- if (name[1] == '/' && name[2] != '.')
- return (parent && parent.substr(0, parent.lastIndexOf('/') + 1) || baseURI) + name.substr(2);
- }
- else if (name[0] != '/' && name.indexOf(':') == -1) {
- // plain parent normalization
- return (parent && parent.substr(0, parent.lastIndexOf('/') + 1) || baseURI) + name;
- }
-
- return new URL(name, parent && parent.replace(/#/g, '%05') || baseURIObj).href.replace(/%05/g, '#');
-}
-
-// NB no specification provided for System.paths, used ideas discussed in https://github.com/jorendorff/js-loaders/issues/25
-function applyPaths(loader, name) {
- // most specific (most number of slashes in path) match wins
- var pathMatch = '', wildcard, maxWildcardPrefixLen = 0;
-
- var paths = loader.paths;
- var pathsCache = loader._loader.paths;
-
- // check to see if we have a paths entry
- for (var p in paths) {
- if (paths.hasOwnProperty && !paths.hasOwnProperty(p))
- continue;
-
- // paths sanitization
- var path = paths[p];
- if (path !== pathsCache[p])
- path = paths[p] = pathsCache[p] = urlResolve(paths[p], isRel(paths[p]) ? baseURI : loader.baseURL);
-
- // exact path match
- if (p.indexOf('*') === -1) {
- if (name == p)
- return paths[p];
-
- // support trailing / in paths rules
- else if (name.substr(0, p.length - 1) == p.substr(0, p.length - 1) && (name.length < p.length || name[p.length - 1] == p[p.length - 1]) && (paths[p][paths[p].length - 1] == '/' || paths[p] == '')) {
- return paths[p].substr(0, paths[p].length - 1) + (name.length > p.length ? (paths[p] && '/' || '') + name.substr(p.length) : '');
- }
- }
- // wildcard path match
- else {
- var pathParts = p.split('*');
- if (pathParts.length > 2)
- throw new TypeError('Only one wildcard in a path is permitted');
-
- var wildcardPrefixLen = pathParts[0].length;
- if (wildcardPrefixLen >= maxWildcardPrefixLen &&
- name.substr(0, pathParts[0].length) == pathParts[0] &&
- name.substr(name.length - pathParts[1].length) == pathParts[1]) {
- maxWildcardPrefixLen = wildcardPrefixLen;
- pathMatch = p;
- wildcard = name.substr(pathParts[0].length, name.length - pathParts[1].length - pathParts[0].length);
- }
- }
- }
-
- var outPath = paths[pathMatch];
- if (typeof wildcard == 'string')
- outPath = outPath.replace('*', wildcard);
-
- return outPath;
-}
-
-function dedupe(deps) {
- var newDeps = [];
- for (var i = 0, l = deps.length; i < l; i++)
- if (indexOf.call(newDeps, deps[i]) == -1)
- newDeps.push(deps[i])
- return newDeps;
-}
-
-function group(deps) {
- var names = [];
- var indices = [];
- for (var i = 0, l = deps.length; i < l; i++) {
- var index = indexOf.call(names, deps[i]);
- if (index === -1) {
- names.push(deps[i]);
- indices.push([i]);
- }
- else {
- indices[index].push(i);
- }
- }
- return { names: names, indices: indices };
-}
-
-var getOwnPropertyDescriptor = true;
-try {
- Object.getOwnPropertyDescriptor({ a: 0 }, 'a');
-}
-catch(e) {
- getOwnPropertyDescriptor = false;
-}
-
-// converts any module.exports object into an object ready for SystemJS.newModule
-function getESModule(exports) {
- var esModule = {};
- // don't trigger getters/setters in environments that support them
- if ((typeof exports == 'object' || typeof exports == 'function') && exports !== __global) {
- if (getOwnPropertyDescriptor) {
- for (var p in exports) {
- // The default property is copied to esModule later on
- if (p === 'default')
- continue;
- defineOrCopyProperty(esModule, exports, p);
- }
- }
- else {
- extend(esModule, exports);
- }
- }
- esModule['default'] = exports;
- defineProperty(esModule, '__useDefault', {
- value: true
- });
- return esModule;
-}
-
-function defineOrCopyProperty(targetObj, sourceObj, propName) {
- try {
- var d;
- if (d = Object.getOwnPropertyDescriptor(sourceObj, propName))
- defineProperty(targetObj, propName, d);
- }
- catch (ex) {
- // Object.getOwnPropertyDescriptor threw an exception, fall back to normal set property
- // we dont need hasOwnProperty here because getOwnPropertyDescriptor would have returned undefined above
- targetObj[propName] = sourceObj[propName];
- return false;
- }
-}
-
-function extend(a, b, prepend) {
- var hasOwnProperty = b && b.hasOwnProperty;
- for (var p in b) {
- if (hasOwnProperty && !b.hasOwnProperty(p))
- continue;
- if (!prepend || !(p in a))
- a[p] = b[p];
- }
- return a;
-}
-
-// meta first-level extends where:
-// array + array appends
-// object + object extends
-// other properties replace
-function extendMeta(a, b, prepend) {
- var hasOwnProperty = b && b.hasOwnProperty;
- for (var p in b) {
- if (hasOwnProperty && !b.hasOwnProperty(p))
- continue;
- var val = b[p];
- if (!(p in a))
- a[p] = val;
- else if (val instanceof Array && a[p] instanceof Array)
- a[p] = [].concat(prepend ? val : a[p]).concat(prepend ? a[p] : val);
- else if (typeof val == 'object' && val !== null && typeof a[p] == 'object')
- a[p] = extend(extend({}, a[p]), val, prepend);
- else if (!prepend)
- a[p] = val;
- }
-}
-
-function extendPkgConfig(pkgCfgA, pkgCfgB, pkgName, loader, warnInvalidProperties) {
- for (var prop in pkgCfgB) {
- if (indexOf.call(['main', 'format', 'defaultExtension', 'basePath'], prop) != -1) {
- pkgCfgA[prop] = pkgCfgB[prop];
- }
- else if (prop == 'map') {
- extend(pkgCfgA.map = pkgCfgA.map || {}, pkgCfgB.map);
- }
- else if (prop == 'meta') {
- extend(pkgCfgA.meta = pkgCfgA.meta || {}, pkgCfgB.meta);
- }
- else if (prop == 'depCache') {
- for (var d in pkgCfgB.depCache) {
- var dNormalized;
-
- if (d.substr(0, 2) == './')
- dNormalized = pkgName + '/' + d.substr(2);
- else
- dNormalized = coreResolve.call(loader, d);
- loader.depCache[dNormalized] = (loader.depCache[dNormalized] || []).concat(pkgCfgB.depCache[d]);
- }
- }
- else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
- (!pkgCfgB.hasOwnProperty || pkgCfgB.hasOwnProperty(prop))) {
- warn.call(loader, '"' + prop + '" is not a valid package configuration option in package ' + pkgName);
- }
- }
-}
-
-// deeply-merge (to first level) config with any existing package config
-function setPkgConfig(loader, pkgName, cfg, prependConfig) {
- var pkg;
-
- // first package is config by reference for fast path, cloned after that
- if (!loader.packages[pkgName]) {
- pkg = loader.packages[pkgName] = cfg;
- }
- else {
- var basePkg = loader.packages[pkgName];
- pkg = loader.packages[pkgName] = {};
-
- extendPkgConfig(pkg, prependConfig ? cfg : basePkg, pkgName, loader, prependConfig);
- extendPkgConfig(pkg, prependConfig ? basePkg : cfg, pkgName, loader, !prependConfig);
- }
-
- // main object becomes main map
- if (typeof pkg.main == 'object') {
- pkg.map = pkg.map || {};
- pkg.map['./@main'] = pkg.main;
- pkg.main['default'] = pkg.main['default'] || './';
- pkg.main = '@main';
- }
-
- return pkg;
-}
-
-function warn(msg) {
- if (this.warnings && typeof console != 'undefined' && console.warn)
- console.warn(msg);
-}
- var fetchTextFromURL;
- if (typeof XMLHttpRequest != 'undefined') {
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- var xhr = new XMLHttpRequest();
- var sameDomain = true;
- var doTimeout = false;
- if (!('withCredentials' in xhr)) {
- // check if same domain
- var domainCheck = /^(\w+:)?\/\/([^\/]+)/.exec(url);
- if (domainCheck) {
- sameDomain = domainCheck[2] === window.location.host;
- if (domainCheck[1])
- sameDomain &= domainCheck[1] === window.location.protocol;
- }
- }
- if (!sameDomain && typeof XDomainRequest != 'undefined') {
- xhr = new XDomainRequest();
- xhr.onload = load;
- xhr.onerror = error;
- xhr.ontimeout = error;
- xhr.onprogress = function() {};
- xhr.timeout = 0;
- doTimeout = true;
- }
- function load() {
- fulfill(xhr.responseText);
- }
- function error() {
- reject(new Error('XHR error' + (xhr.status ? ' (' + xhr.status + (xhr.statusText ? ' ' + xhr.statusText : '') + ')' : '') + ' loading ' + url));
- }
-
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4) {
- // in Chrome on file:/// URLs, status is 0
- if (xhr.status == 0) {
- if (xhr.responseText) {
- load();
- }
- else {
- // when responseText is empty, wait for load or error event
- // to inform if it is a 404 or empty file
- xhr.addEventListener('error', error);
- xhr.addEventListener('load', load);
- }
- }
- else if (xhr.status === 200) {
- load();
- }
- else {
- error();
- }
- }
- };
- xhr.open("GET", url, true);
-
- if (xhr.setRequestHeader) {
- xhr.setRequestHeader('Accept', 'application/x-es-module, */*');
- // can set "authorization: true" to enable withCredentials only
- if (authorization) {
- if (typeof authorization == 'string')
- xhr.setRequestHeader('Authorization', authorization);
- xhr.withCredentials = true;
- }
- }
-
- if (doTimeout) {
- setTimeout(function() {
- xhr.send();
- }, 0);
- } else {
- xhr.send(null);
- }
- };
- }
- else if (typeof require != 'undefined' && typeof process != 'undefined') {
- var fs;
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- if (url.substr(0, 8) != 'file:///')
- throw new Error('Unable to fetch "' + url + '". Only file URLs of the form file:/// allowed running in Node.');
- fs = fs || require('fs');
- if (isWindows)
- url = url.replace(/\//g, '\\').substr(8);
- else
- url = url.substr(7);
- return fs.readFile(url, function(err, data) {
- if (err) {
- return reject(err);
- }
- else {
- // Strip Byte Order Mark out if it's the leading char
- var dataString = data + '';
- if (dataString[0] === '\ufeff')
- dataString = dataString.substr(1);
-
- fulfill(dataString);
- }
- });
- };
- }
- else if (typeof self != 'undefined' && typeof self.fetch != 'undefined') {
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- var opts = {
- headers: {'Accept': 'application/x-es-module, */*'}
- };
-
- if (authorization) {
- if (typeof authorization == 'string')
- opts.headers['Authorization'] = authorization;
- opts.credentials = 'include';
- }
-
- fetch(url, opts)
- .then(function (r) {
- if (r.ok) {
- return r.text();
- } else {
- throw new Error('Fetch error: ' + r.status + ' ' + r.statusText);
- }
- })
- .then(fulfill, reject);
- }
- }
- else {
- throw new TypeError('No environment fetch API available.');
- }
-function readMemberExpression(p, value) {
- var pParts = p.split('.');
- while (pParts.length)
- value = value[pParts.shift()];
- return value;
-}
-
-function getMapMatch(map, name) {
- var bestMatch, bestMatchLength = 0;
-
- for (var p in map) {
- if (name.substr(0, p.length) == p && (name.length == p.length || name[p.length] == '/')) {
- var curMatchLength = p.split('/').length;
- if (curMatchLength <= bestMatchLength)
- continue;
- bestMatch = p;
- bestMatchLength = curMatchLength;
- }
- }
-
- return bestMatch;
-}
-
-function prepareBaseURL(loader) {
- // ensure baseURl is fully normalized
- if (this._loader.baseURL !== this.baseURL) {
- if (this.baseURL[this.baseURL.length - 1] != '/')
- this.baseURL += '/';
-
- this._loader.baseURL = this.baseURL = new URL(this.baseURL, baseURIObj).href;
- }
-}
-
-var envModule;
-function setProduction(isProduction, isBuilder) {
- this.set('@system-env', envModule = this.newModule({
- browser: isBrowser,
- node: !!this._nodeRequire,
- production: !isBuilder && isProduction,
- dev: isBuilder || !isProduction,
- build: isBuilder,
- 'default': true
- }));
-}
-
-hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
-
- // support baseURL
- this.baseURL = baseURI;
-
- // support map and paths
- this.map = {};
-
- // make the location of the system.js script accessible
- if (typeof $__curScript != 'undefined')
- this.scriptSrc = $__curScript.src;
-
- // global behaviour flags
- this.warnings = false;
- this.defaultJSExtensions = false;
- this.pluginFirst = false;
- this.loaderErrorStack = false;
-
- // by default load ".json" files as json
- // leading * meta doesn't need normalization
- // NB add this in next breaking release
- // this.meta['*.json'] = { format: 'json' };
-
- // support the empty module, as a concept
- this.set('@empty', this.newModule({}));
-
- setProduction.call(this, false, false);
- };
-});
-
-// include the node require since we're overriding it
-if (typeof require != 'undefined' && typeof process != 'undefined' && !process.browser)
- SystemJSLoader.prototype._nodeRequire = require;
-
-/*
- Core SystemJS Normalization
-
- If a name is relative, we apply URL normalization to the page
- If a name is an absolute URL, we leave it as-is
-
- Plain names (neither of the above) run through the map and paths
- normalization phases.
-
- The paths normalization phase applies last (paths extension), which
- defines the `decanonicalize` function and normalizes everything into
- a URL.
- */
-
-var parentModuleContext;
-function getNodeModule(name, baseURL) {
- if (!isPlain(name))
- throw new Error('Node module ' + name + ' can\'t be loaded as it is not a package require.');
-
- if (!parentModuleContext) {
- var Module = this._nodeRequire('module');
- var base = baseURL.substr(isWindows ? 8 : 7);
- parentModuleContext = new Module(base);
- parentModuleContext.paths = Module._nodeModulePaths(base);
- }
- return parentModuleContext.require(name);
-}
-
-function coreResolve(name, parentName) {
- // standard URL resolution
- if (isRel(name))
- return urlResolve(name, parentName);
- else if (isAbsolute(name))
- return name;
-
- // plain names not starting with './', '://' and '/' go through custom resolution
- var mapMatch = getMapMatch(this.map, name);
-
- if (mapMatch) {
- name = this.map[mapMatch] + name.substr(mapMatch.length);
-
- if (isRel(name))
- return urlResolve(name);
- else if (isAbsolute(name))
- return name;
- }
-
- if (this.has(name))
- return name;
-
- // dynamically load node-core modules when requiring `@node/fs` for example
- if (name.substr(0, 6) == '@node/') {
- if (!this._nodeRequire)
- throw new TypeError('Error loading ' + name + '. Can only load node core modules in Node.');
- if (this.builder)
- this.set(name, this.newModule({}));
- else
- this.set(name, this.newModule(getESModule(getNodeModule.call(this, name.substr(6), this.baseURL))));
- return name;
- }
-
- // prepare the baseURL to ensure it is normalized
- prepareBaseURL.call(this);
-
- return applyPaths(this, name) || this.baseURL + name;
-}
-
-hook('normalize', function(normalize) {
- return function(name, parentName, skipExt) {
- var resolved = coreResolve.call(this, name, parentName);
- if (this.defaultJSExtensions && !skipExt && resolved.substr(resolved.length - 3, 3) != '.js' && !isPlain(resolved))
- resolved += '.js';
- return resolved;
- };
-});
-
-// percent encode just '#' in urls if using HTTP requests
-var httpRequest = typeof XMLHttpRequest != 'undefined';
-hook('locate', function(locate) {
- return function(load) {
- return Promise.resolve(locate.call(this, load))
- .then(function(address) {
- if (httpRequest)
- return address.replace(/#/g, '%23');
- return address;
- });
- };
-});
-
-/*
- * Fetch with authorization
- */
-hook('fetch', function() {
- return function(load) {
- return new Promise(function(resolve, reject) {
- fetchTextFromURL(load.address, load.metadata.authorization, resolve, reject);
- });
- };
-});
-
-/*
- __useDefault
-
- When a module object looks like:
- newModule(
- __useDefault: true,
- default: 'some-module'
- })
-
- Then importing that module provides the 'some-module'
- result directly instead of the full module.
-
- Useful for eg module.exports = function() {}
-*/
-hook('import', function(systemImport) {
- return function(name, parentName, parentAddress) {
- if (parentName && parentName.name)
- warn.call(this, 'SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing ' + name + ' from ' + parentName.name);
- return systemImport.call(this, name, parentName, parentAddress).then(function(module) {
- return module.__useDefault ? module['default'] : module;
- });
- };
-});
-
-/*
- * Allow format: 'detect' meta to enable format detection
- */
-hook('translate', function(systemTranslate) {
- return function(load) {
- if (load.metadata.format == 'detect')
- load.metadata.format = undefined;
- return systemTranslate.apply(this, arguments);
- };
-});
-
-
-/*
- * JSON format support
- *
- * Supports loading JSON files as a module format itself
- *
- * Usage:
- *
- * SystemJS.config({
- * meta: {
- * '*.json': { format: 'json' }
- * }
- * });
- *
- * Module is returned as if written:
- *
- * export default {JSON}
- *
- * No named exports are provided
- *
- * Files ending in ".json" are treated as json automatically by SystemJS
- */
-hook('instantiate', function(instantiate) {
- return function(load) {
- if (load.metadata.format == 'json' && !this.builder) {
- var entry = load.metadata.entry = createEntry();
- entry.deps = [];
- entry.execute = function() {
- try {
- return JSON.parse(load.source);
- }
- catch(e) {
- throw new Error("Invalid JSON file " + load.name);
- }
- };
- }
- };
-})
-
-/*
- Extend config merging one deep only
-
- loader.config({
- some: 'random',
- config: 'here',
- deep: {
- config: { too: 'too' }
- }
- });
-
- <=>
-
- loader.some = 'random';
- loader.config = 'here'
- loader.deep = loader.deep || {};
- loader.deep.config = { too: 'too' };
-
-
- Normalizes meta and package configs allowing for:
-
- SystemJS.config({
- meta: {
- './index.js': {}
- }
- });
-
- To become
-
- SystemJS.meta['https://thissite.com/index.js'] = {};
-
- For easy normalization canonicalization with latest URL support.
-
-*/
-function envSet(loader, cfg, envCallback) {
- if (envModule.browser && cfg.browserConfig)
- envCallback(cfg.browserConfig);
- if (envModule.node && cfg.nodeConfig)
- envCallback(cfg.nodeConfig);
- if (envModule.dev && cfg.devConfig)
- envCallback(cfg.devConfig);
- if (envModule.build && cfg.buildConfig)
- envCallback(cfg.buildConfig);
- if (envModule.production && cfg.productionConfig)
- envCallback(cfg.productionConfig);
-}
-
-SystemJSLoader.prototype.getConfig = function(name) {
- var cfg = {};
- var loader = this;
- for (var p in loader) {
- if (loader.hasOwnProperty && !loader.hasOwnProperty(p) || p in SystemJSLoader.prototype && p != 'transpiler')
- continue;
- if (indexOf.call(['_loader', 'amdDefine', 'amdRequire', 'defined', 'failed', 'version', 'loads'], p) == -1)
- cfg[p] = loader[p];
- }
- cfg.production = envModule.production;
- return cfg;
-};
-
-var curCurScript;
-SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
- var loader = this;
-
- if ('loaderErrorStack' in cfg) {
- curCurScript = $__curScript;
- if (cfg.loaderErrorStack)
- $__curScript = undefined;
- else
- $__curScript = curCurScript;
- }
-
- if ('warnings' in cfg)
- loader.warnings = cfg.warnings;
-
- // transpiler deprecation path
- if (cfg.transpilerRuntime === false)
- loader._loader.loadedTranspilerRuntime = true;
-
- if ('production' in cfg || 'build' in cfg)
- setProduction.call(loader, !!cfg.production, !!(cfg.build || envModule && envModule.build));
-
- if (!isEnvConfig) {
- // if using nodeConfig / browserConfig / productionConfig, take baseURL from there
- // these exceptions will be unnecessary when we can properly implement config queuings
- var baseURL;
- envSet(loader, cfg, function(cfg) {
- baseURL = baseURL || cfg.baseURL;
- });
- baseURL = baseURL || cfg.baseURL;
-
- // always configure baseURL first
- if (baseURL) {
- var hasConfig = false;
- function checkHasConfig(obj) {
- for (var p in obj)
- if (obj.hasOwnProperty(p))
- return true;
- }
- if (checkHasConfig(loader.packages) || checkHasConfig(loader.meta) || checkHasConfig(loader.depCache) || checkHasConfig(loader.bundles) || checkHasConfig(loader.packageConfigPaths))
- throw new TypeError('Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.');
-
- this.baseURL = baseURL;
- prepareBaseURL.call(this);
- }
-
- if (cfg.paths)
- extend(loader.paths, cfg.paths);
-
- envSet(loader, cfg, function(cfg) {
- if (cfg.paths)
- extend(loader.paths, cfg.paths);
- });
-
- // warn on wildcard path deprecations
- if (this.warnings) {
- for (var p in loader.paths)
- if (p.indexOf('*') != -1)
- warn.call(loader, 'Paths configuration "' + p + '" -> "' + loader.paths[p] + '" uses wildcards which are being deprecated for simpler trailing "/" folder paths.');
- }
- }
-
- if (cfg.defaultJSExtensions) {
- loader.defaultJSExtensions = cfg.defaultJSExtensions;
- warn.call(loader, 'The defaultJSExtensions configuration option is deprecated, use packages configuration instead.');
- }
-
- if (cfg.pluginFirst)
- loader.pluginFirst = cfg.pluginFirst;
-
- if (cfg.map) {
- var objMaps = '';
- for (var p in cfg.map) {
- var v = cfg.map[p];
-
- // object map backwards-compat into packages configuration
- if (typeof v !== 'string') {
- objMaps += (objMaps.length ? ', ' : '') + '"' + p + '"';
-
- var defaultJSExtension = loader.defaultJSExtensions && p.substr(p.length - 3, 3) != '.js';
- var prop = loader.decanonicalize(p);
- if (defaultJSExtension && prop.substr(prop.length - 3, 3) == '.js')
- prop = prop.substr(0, prop.length - 3);
-
- // if a package main, revert it
- var pkgMatch = '';
- for (var pkg in loader.packages) {
- if (prop.substr(0, pkg.length) == pkg
- && (!prop[pkg.length] || prop[pkg.length] == '/')
- && pkgMatch.split('/').length < pkg.split('/').length)
- pkgMatch = pkg;
- }
- if (pkgMatch && loader.packages[pkgMatch].main)
- prop = prop.substr(0, prop.length - loader.packages[pkgMatch].main.length - 1);
-
- var pkg = loader.packages[prop] = loader.packages[prop] || {};
- pkg.map = v;
- }
- else {
- loader.map[p] = v;
- }
- }
- if (objMaps)
- warn.call(loader, 'The map configuration for ' + objMaps + ' uses object submaps, which is deprecated in global map.\nUpdate this to use package contextual map with configs like SystemJS.config({ packages: { "' + p + '": { map: {...} } } }).');
- }
-
- if (cfg.packageConfigPaths) {
- var packageConfigPaths = [];
- for (var i = 0; i < cfg.packageConfigPaths.length; i++) {
- var path = cfg.packageConfigPaths[i];
- var packageLength = Math.max(path.lastIndexOf('*') + 1, path.lastIndexOf('/'));
- var normalized = coreResolve.call(loader, path.substr(0, packageLength));
- packageConfigPaths[i] = normalized + path.substr(packageLength);
- }
- loader.packageConfigPaths = packageConfigPaths;
- }
-
- if (cfg.bundles) {
- for (var p in cfg.bundles) {
- var bundle = [];
- for (var i = 0; i < cfg.bundles[p].length; i++) {
- var defaultJSExtension = loader.defaultJSExtensions && cfg.bundles[p][i].substr(cfg.bundles[p][i].length - 3, 3) != '.js';
- var normalizedBundleDep = loader.decanonicalize(cfg.bundles[p][i]);
- if (defaultJSExtension && normalizedBundleDep.substr(normalizedBundleDep.length - 3, 3) == '.js')
- normalizedBundleDep = normalizedBundleDep.substr(0, normalizedBundleDep.length - 3);
- bundle.push(normalizedBundleDep);
- }
- loader.bundles[p] = bundle;
- }
- }
-
- if (cfg.packages) {
- for (var p in cfg.packages) {
- if (p.match(/^([^\/]+:)?\/\/$/))
- throw new TypeError('"' + p + '" is not a valid package name.');
-
- var prop = coreResolve.call(loader, p);
-
- // allow trailing slash in packages
- if (prop[prop.length - 1] == '/')
- prop = prop.substr(0, prop.length - 1);
-
- setPkgConfig(loader, prop, cfg.packages[p], false);
- }
- }
-
- for (var c in cfg) {
- var v = cfg[c];
-
- if (indexOf.call(['baseURL', 'map', 'packages', 'bundles', 'paths', 'warnings', 'packageConfigPaths',
- 'loaderErrorStack', 'browserConfig', 'nodeConfig', 'devConfig', 'buildConfig', 'productionConfig'], c) != -1)
- continue;
-
- if (typeof v != 'object' || v instanceof Array) {
- loader[c] = v;
- }
- else {
- loader[c] = loader[c] || {};
-
- for (var p in v) {
- // base-level wildcard meta does not normalize to retain catch-all quality
- if (c == 'meta' && p[0] == '*') {
- extend(loader[c][p] = loader[c][p] || {}, v[p]);
- }
- else if (c == 'meta') {
- // meta can go through global map, with defaultJSExtensions adding
- var resolved = coreResolve.call(loader, p);
- if (loader.defaultJSExtensions && resolved.substr(resolved.length - 3, 3) != '.js' && !isPlain(resolved))
- resolved += '.js';
- extend(loader[c][resolved] = loader[c][resolved] || {}, v[p]);
- }
- else if (c == 'depCache') {
- var defaultJSExtension = loader.defaultJSExtensions && p.substr(p.length - 3, 3) != '.js';
- var prop = loader.decanonicalize(p);
- if (defaultJSExtension && prop.substr(prop.length - 3, 3) == '.js')
- prop = prop.substr(0, prop.length - 3);
- loader[c][prop] = [].concat(v[p]);
- }
- else {
- loader[c][p] = v[p];
- }
- }
- }
- }
-
- envSet(loader, cfg, function(cfg) {
- loader.config(cfg, true);
- });
-};/*
- * Package Configuration Extension
- *
- * Example:
- *
- * SystemJS.packages = {
- * jquery: {
- * main: 'index.js', // when not set, package name is requested directly
- * format: 'amd',
- * defaultExtension: 'ts', // defaults to 'js', can be set to false
- * modules: {
- * '*.ts': {
- * loader: 'typescript'
- * },
- * 'vendor/sizzle.js': {
- * format: 'global'
- * }
- * },
- * map: {
- * // map internal require('sizzle') to local require('./vendor/sizzle')
- * sizzle: './vendor/sizzle.js',
- * // map any internal or external require of 'jquery/vendor/another' to 'another/index.js'
- * './vendor/another.js': './another/index.js',
- * // test.js / test -> lib/test.js
- * './test.js': './lib/test.js',
- *
- * // environment-specific map configurations
- * './index.js': {
- * '~browser': './index-node.js',
- * './custom-condition.js|~export': './index-custom.js'
- * }
- * },
- * // allows for setting package-prefixed depCache
- * // keys are normalized module names relative to the package itself
- * depCache: {
- * // import 'package/index.js' loads in parallel package/lib/test.js,package/vendor/sizzle.js
- * './index.js': ['./test'],
- * './test.js': ['external-dep'],
- * 'external-dep/path.js': ['./another.js']
- * }
- * }
- * };
- *
- * Then:
- * import 'jquery' -> jquery/index.js
- * import 'jquery/submodule' -> jquery/submodule.js
- * import 'jquery/submodule.ts' -> jquery/submodule.ts loaded as typescript
- * import 'jquery/vendor/another' -> another/index.js
- *
- * Detailed Behaviours
- * - main can have a leading "./" can be added optionally
- * - map and defaultExtension are applied to the main
- * - defaultExtension adds the extension only if the exact extension is not present
- * - defaultJSExtensions applies after map when defaultExtension is not set
- * - if a meta value is available for a module, map and defaultExtension are skipped
- * - like global map, package map also applies to subpaths (sizzle/x, ./vendor/another/sub)
- * - condition module map is '@env' module in package or '@system-env' globally
- * - map targets support conditional interpolation ('./x': './x.#{|env}.js')
- * - internal package map targets cannot use boolean conditionals
- *
- * Package Configuration Loading
- *
- * Not all packages may already have their configuration present in the System config
- * For these cases, a list of packageConfigPaths can be provided, which when matched against
- * a request, will first request a ".json" file by the package name to derive the package
- * configuration from. This allows dynamic loading of non-predetermined code, a key use
- * case in SystemJS.
- *
- * Example:
- *
- * SystemJS.packageConfigPaths = ['packages/test/package.json', 'packages/*.json'];
- *
- * // will first request 'packages/new-package/package.json' for the package config
- * // before completing the package request to 'packages/new-package/path'
- * SystemJS.import('packages/new-package/path');
- *
- * // will first request 'packages/test/package.json' before the main
- * SystemJS.import('packages/test');
- *
- * When a package matches packageConfigPaths, it will always send a config request for
- * the package configuration.
- * The package name itself is taken to be the match up to and including the last wildcard
- * or trailing slash.
- * The most specific package config path will be used.
- * Any existing package configurations for the package will deeply merge with the
- * package config, with the existing package configurations taking preference.
- * To opt-out of the package configuration request for a package that matches
- * packageConfigPaths, use the { configured: true } package config option.
- *
- */
-(function() {
-
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.packages = {};
- this.packageConfigPaths = [];
- };
- });
-
- function getPackage(loader, normalized) {
- // use most specific package
- var curPkg, curPkgLen = 0, pkgLen;
- for (var p in loader.packages) {
- if (normalized.substr(0, p.length) === p && (normalized.length === p.length || normalized[p.length] === '/')) {
- pkgLen = p.split('/').length;
- if (pkgLen > curPkgLen) {
- curPkg = p;
- curPkgLen = pkgLen;
- }
- }
- }
- return curPkg;
- }
-
- function addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions) {
- // don't apply extensions to folders or if defaultExtension = false
- if (!subPath || subPath[subPath.length - 1] == '/' || skipExtensions || pkg.defaultExtension === false)
- return subPath;
-
- var metaMatch = false;
-
- // exact meta or meta with any content after the last wildcard skips extension
- if (pkg.meta)
- getMetaMatches(pkg.meta, subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1)
- return metaMatch = true;
- });
-
- // exact global meta or meta with any content after the last wildcard skips extension
- if (!metaMatch && loader.meta)
- getMetaMatches(loader.meta, pkgName + '/' + subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1)
- return metaMatch = true;
- });
-
- if (metaMatch)
- return subPath;
-
- // work out what the defaultExtension is and add if not there already
- // NB reconsider if default should really be ".js"?
- var defaultExtension = '.' + (pkg.defaultExtension || 'js');
- if (subPath.substr(subPath.length - defaultExtension.length) != defaultExtension)
- return subPath + defaultExtension;
- else
- return subPath;
- }
-
- function applyPackageConfigSync(loader, pkg, pkgName, subPath, skipExtensions) {
- // main
- if (!subPath) {
- if (pkg.main)
- subPath = pkg.main.substr(0, 2) == './' ? pkg.main.substr(2) : pkg.main;
- // also no submap if name is package itself (import 'pkg' -> 'path/to/pkg.js')
- else
- // NB can add a default package main convention here when defaultJSExtensions is deprecated
- // if it becomes internal to the package then it would no longer be an exit path
- return pkgName + (loader.defaultJSExtensions ? '.js' : '');
- }
-
- // map config checking without then with extensions
- if (pkg.map) {
- var mapPath = './' + subPath;
-
- var mapMatch = getMapMatch(pkg.map, mapPath);
-
- // we then check map with the default extension adding
- if (!mapMatch) {
- mapPath = './' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- if (mapPath != './' + subPath)
- mapMatch = getMapMatch(pkg.map, mapPath);
- }
- if (mapMatch) {
- var mapped = doMapSync(loader, pkg, pkgName, mapMatch, mapPath, skipExtensions);
- if (mapped)
- return mapped;
- }
- }
-
- // normal package resolution
- return pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- }
-
- function validMapping(mapMatch, mapped, pkgName, path) {
- // disallow internal to subpath maps
- if (mapMatch == '.')
- throw new Error('Package ' + pkgName + ' has a map entry for "." which is not permitted.');
-
- // allow internal ./x -> ./x/y or ./x/ -> ./x/y recursive maps
- // but only if the path is exactly ./x and not ./x/z
- if (mapped.substr(0, mapMatch.length) == mapMatch && path.length > mapMatch.length)
- return false;
-
- return true;
- }
-
- function doMapSync(loader, pkg, pkgName, mapMatch, path, skipExtensions) {
- if (path[path.length - 1] == '/')
- path = path.substr(0, path.length - 1);
- var mapped = pkg.map[mapMatch];
-
- if (typeof mapped == 'object')
- throw new Error('Synchronous conditional normalization not supported sync normalizing ' + mapMatch + ' in ' + pkgName);
-
- if (!validMapping(mapMatch, mapped, pkgName, path) || typeof mapped != 'string')
- return;
-
- // package map to main / base-level
- if (mapped == '.')
- mapped = pkgName;
-
- // internal package map
- else if (mapped.substr(0, 2) == './')
- return pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, mapped.substr(2) + path.substr(mapMatch.length), skipExtensions);
-
- // external map reference
- return loader.normalizeSync(mapped + path.substr(mapMatch.length), pkgName + '/');
- }
-
- function applyPackageConfig(loader, pkg, pkgName, subPath, skipExtensions) {
- // main
- if (!subPath) {
- if (pkg.main)
- subPath = pkg.main.substr(0, 2) == './' ? pkg.main.substr(2) : pkg.main;
- // also no submap if name is package itself (import 'pkg' -> 'path/to/pkg.js')
- else
- // NB can add a default package main convention here when defaultJSExtensions is deprecated
- // if it becomes internal to the package then it would no longer be an exit path
- return Promise.resolve(pkgName + (loader.defaultJSExtensions ? '.js' : ''));
- }
-
- // map config checking without then with extensions
- var mapPath, mapMatch;
-
- if (pkg.map) {
- mapPath = './' + subPath;
- mapMatch = getMapMatch(pkg.map, mapPath);
-
- // we then check map with the default extension adding
- if (!mapMatch) {
- mapPath = './' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- if (mapPath != './' + subPath)
- mapMatch = getMapMatch(pkg.map, mapPath);
- }
- }
-
- return (mapMatch ? doMap(loader, pkg, pkgName, mapMatch, mapPath, skipExtensions) : Promise.resolve())
- .then(function(mapped) {
- if (mapped)
- return Promise.resolve(mapped);
-
- // normal package resolution / fallback resolution for no conditional match
- return Promise.resolve(pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions));
- });
- }
-
- function doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions) {
- // NB the interpolation cases should strictly skip subsequent interpolation
- // package map to main / base-level
- if (mapped == '.')
- mapped = pkgName;
-
- // internal package map
- else if (mapped.substr(0, 2) == './')
- return Promise.resolve(pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, mapped.substr(2) + path.substr(mapMatch.length), skipExtensions))
- .then(function(name) {
- return interpolateConditional.call(loader, name, pkgName + '/');
- });
-
- // external map reference
- return loader.normalize(mapped + path.substr(mapMatch.length), pkgName + '/');
- }
-
- function doMap(loader, pkg, pkgName, mapMatch, path, skipExtensions) {
- if (path[path.length - 1] == '/')
- path = path.substr(0, path.length - 1);
-
- var mapped = pkg.map[mapMatch];
-
- if (typeof mapped == 'string') {
- if (!validMapping(mapMatch, mapped, pkgName, path))
- return Promise.resolve();
- return doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions);
- }
-
- // we use a special conditional syntax to allow the builder to handle conditional branch points further
- if (loader.builder)
- return Promise.resolve(pkgName + '/#:' + path);
-
- // we load all conditions upfront
- var conditionPromises = [];
- var conditions = [];
- for (var e in mapped) {
- var c = parseCondition(e);
- conditions.push({
- condition: c,
- map: mapped[e]
- });
- conditionPromises.push(loader['import'](c.module, pkgName));
- }
-
- // map object -> conditional map
- return Promise.all(conditionPromises)
- .then(function(conditionValues) {
- // first map condition to match is used
- for (var i = 0; i < conditions.length; i++) {
- var c = conditions[i].condition;
- var value = readMemberExpression(c.prop, conditionValues[i]);
- if (!c.negate && value || c.negate && !value)
- return conditions[i].map;
- }
- })
- .then(function(mapped) {
- if (mapped) {
- if (!validMapping(mapMatch, mapped, pkgName, path))
- return;
- return doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions);
- }
-
- // no environment match -> fallback to original subPath by returning undefined
- });
- }
-
- // normalizeSync = decanonicalize + package resolution
- SystemJSLoader.prototype.normalizeSync = SystemJSLoader.prototype.decanonicalize = SystemJSLoader.prototype.normalize;
-
- // decanonicalize must JUST handle package defaultExtension: false case when defaultJSExtensions is set
- // to be deprecated!
- hook('decanonicalize', function(decanonicalize) {
- return function(name, parentName) {
- if (this.builder)
- return decanonicalize.call(this, name, parentName, true);
-
- var decanonicalized = decanonicalize.call(this, name, parentName, false);
-
- if (!this.defaultJSExtensions)
- return decanonicalized;
-
- var pkgName = getPackage(this, decanonicalized);
-
- var pkg = this.packages[pkgName];
- var defaultExtension = pkg && pkg.defaultExtension;
-
- if (defaultExtension == undefined && pkg && pkg.meta)
- getMetaMatches(pkg.meta, decanonicalized.substr(pkgName), function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1) {
- defaultExtension = false;
- return true;
- }
- });
-
- if ((defaultExtension === false || defaultExtension && defaultExtension != '.js') && name.substr(name.length - 3, 3) != '.js' && decanonicalized.substr(decanonicalized.length - 3, 3) == '.js')
- decanonicalized = decanonicalized.substr(0, decanonicalized.length - 3);
-
- return decanonicalized;
- };
- });
-
- hook('normalizeSync', function(normalizeSync) {
- return function(name, parentName, isPlugin) {
- var loader = this;
- isPlugin = isPlugin === true;
-
- // apply contextual package map first
- // (we assume the parent package config has already been loaded)
- if (parentName)
- var parentPackageName = getPackage(loader, parentName) ||
- loader.defaultJSExtensions && parentName.substr(parentName.length - 3, 3) == '.js' &&
- getPackage(loader, parentName.substr(0, parentName.length - 3));
-
- var parentPackage = parentPackageName && loader.packages[parentPackageName];
-
- // ignore . since internal maps handled by standard package resolution
- if (parentPackage && name[0] != '.') {
- var parentMap = parentPackage.map;
- var parentMapMatch = parentMap && getMapMatch(parentMap, name);
-
- if (parentMapMatch && typeof parentMap[parentMapMatch] == 'string') {
- var mapped = doMapSync(loader, parentPackage, parentPackageName, parentMapMatch, name, isPlugin);
- if (mapped)
- return mapped;
- }
- }
-
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
-
- // apply map, core, paths, contextual package map
- var normalized = normalizeSync.call(loader, name, parentName, false);
-
- // undo defaultJSExtension
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) != '.js')
- defaultJSExtension = false;
- if (defaultJSExtension)
- normalized = normalized.substr(0, normalized.length - 3);
-
- var pkgConfigMatch = getPackageConfigMatch(loader, normalized);
- var pkgName = pkgConfigMatch && pkgConfigMatch.packageName || getPackage(loader, normalized);
-
- if (!pkgName)
- return normalized + (defaultJSExtension ? '.js' : '');
-
- var subPath = normalized.substr(pkgName.length + 1);
-
- return applyPackageConfigSync(loader, loader.packages[pkgName] || {}, pkgName, subPath, isPlugin);
- };
- });
-
- hook('normalize', function(normalize) {
- return function(name, parentName, isPlugin) {
- var loader = this;
- isPlugin = isPlugin === true;
-
- return Promise.resolve()
- .then(function() {
- // apply contextual package map first
- // (we assume the parent package config has already been loaded)
- if (parentName)
- var parentPackageName = getPackage(loader, parentName) ||
- loader.defaultJSExtensions && parentName.substr(parentName.length - 3, 3) == '.js' &&
- getPackage(loader, parentName.substr(0, parentName.length - 3));
-
- var parentPackage = parentPackageName && loader.packages[parentPackageName];
-
- // ignore . since internal maps handled by standard package resolution
- if (parentPackage && name.substr(0, 2) != './') {
- var parentMap = parentPackage.map;
- var parentMapMatch = parentMap && getMapMatch(parentMap, name);
-
- if (parentMapMatch)
- return doMap(loader, parentPackage, parentPackageName, parentMapMatch, name, isPlugin);
- }
-
- return Promise.resolve();
- })
- .then(function(mapped) {
- if (mapped)
- return mapped;
-
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
-
- // apply map, core, paths, contextual package map
- var normalized = normalize.call(loader, name, parentName, false);
-
- // undo defaultJSExtension
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) != '.js')
- defaultJSExtension = false;
- if (defaultJSExtension)
- normalized = normalized.substr(0, normalized.length - 3);
-
- var pkgConfigMatch = getPackageConfigMatch(loader, normalized);
- var pkgName = pkgConfigMatch && pkgConfigMatch.packageName || getPackage(loader, normalized);
-
- if (!pkgName)
- return Promise.resolve(normalized + (defaultJSExtension ? '.js' : ''));
-
- var pkg = loader.packages[pkgName];
-
- // if package is already configured or not a dynamic config package, use existing package config
- var isConfigured = pkg && (pkg.configured || !pkgConfigMatch);
- return (isConfigured ? Promise.resolve(pkg) : loadPackageConfigPath(loader, pkgName, pkgConfigMatch.configPath))
- .then(function(pkg) {
- var subPath = normalized.substr(pkgName.length + 1);
-
- return applyPackageConfig(loader, pkg, pkgName, subPath, isPlugin);
- });
- });
- };
- });
-
- // check if the given normalized name matches a packageConfigPath
- // if so, loads the config
- var packageConfigPaths = {};
-
- // data object for quick checks against package paths
- function createPkgConfigPathObj(path) {
- var lastWildcard = path.lastIndexOf('*');
- var length = Math.max(lastWildcard + 1, path.lastIndexOf('/'));
- return {
- length: length,
- regEx: new RegExp('^(' + path.substr(0, length).replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '[^\\/]+') + ')(\\/|$)'),
- wildcard: lastWildcard != -1
- };
- }
-
- // most specific match wins
- function getPackageConfigMatch(loader, normalized) {
- var pkgName, exactMatch = false, configPath;
- for (var i = 0; i < loader.packageConfigPaths.length; i++) {
- var packageConfigPath = loader.packageConfigPaths[i];
- var p = packageConfigPaths[packageConfigPath] || (packageConfigPaths[packageConfigPath] = createPkgConfigPathObj(packageConfigPath));
- if (normalized.length < p.length)
- continue;
- var match = normalized.match(p.regEx);
- if (match && (!pkgName || (!(exactMatch && p.wildcard) && pkgName.length < match[1].length))) {
- pkgName = match[1];
- exactMatch = !p.wildcard;
- configPath = pkgName + packageConfigPath.substr(p.length);
- }
- }
-
- if (!pkgName)
- return;
-
- return {
- packageName: pkgName,
- configPath: configPath
- };
- }
-
- function loadPackageConfigPath(loader, pkgName, pkgConfigPath) {
- var configLoader = loader.pluginLoader || loader;
-
- // NB remove this when json is default
- (configLoader.meta[pkgConfigPath] = configLoader.meta[pkgConfigPath] || {}).format = 'json';
- configLoader.meta[pkgConfigPath].loader = null;
-
- return configLoader.load(pkgConfigPath)
- .then(function() {
- var cfg = configLoader.get(pkgConfigPath)['default'];
-
- // support "systemjs" prefixing
- if (cfg.systemjs)
- cfg = cfg.systemjs;
-
- // modules backwards compatibility
- if (cfg.modules) {
- cfg.meta = cfg.modules;
- warn.call(loader, 'Package config file ' + pkgConfigPath + ' is configured with "modules", which is deprecated as it has been renamed to "meta".');
- }
-
- return setPkgConfig(loader, pkgName, cfg, true);
- });
- }
-
- function getMetaMatches(pkgMeta, subPath, matchFn) {
- // wildcard meta
- var meta = {};
- var wildcardIndex;
- for (var module in pkgMeta) {
- // allow meta to start with ./ for flexibility
- var dotRel = module.substr(0, 2) == './' ? './' : '';
- if (dotRel)
- module = module.substr(2);
-
- wildcardIndex = module.indexOf('*');
- if (wildcardIndex === -1)
- continue;
-
- if (module.substr(0, wildcardIndex) == subPath.substr(0, wildcardIndex)
- && module.substr(wildcardIndex + 1) == subPath.substr(subPath.length - module.length + wildcardIndex + 1)) {
- // alow match function to return true for an exit path
- if (matchFn(module, pkgMeta[dotRel + module], module.split('/').length))
- return;
- }
- }
- // exact meta
- var exactMeta = pkgMeta[subPath] && pkgMeta.hasOwnProperty && pkgMeta.hasOwnProperty(subPath) ? pkgMeta[subPath] : pkgMeta['./' + subPath];
- if (exactMeta)
- matchFn(exactMeta, exactMeta, 0);
- }
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- return Promise.resolve(locate.call(this, load))
- .then(function(address) {
- var pkgName = getPackage(loader, load.name);
- if (pkgName) {
- var pkg = loader.packages[pkgName];
- var subPath = load.name.substr(pkgName.length + 1);
-
- var meta = {};
- if (pkg.meta) {
- var bestDepth = 0;
-
- // NB support a main shorthand in meta here?
- getMetaMatches(pkg.meta, subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth > bestDepth)
- bestDepth = matchDepth;
- extendMeta(meta, matchMeta, matchDepth && bestDepth > matchDepth);
- });
-
- extendMeta(load.metadata, meta);
- }
-
- // format
- if (pkg.format && !load.metadata.loader)
- load.metadata.format = load.metadata.format || pkg.format;
- }
-
- return address;
- });
- };
- });
-
-})();
-/*
- * Script tag fetch
- *
- * When load.metadata.scriptLoad is true, we load via script tag injection.
- */
-(function() {
-
- if (typeof document != 'undefined')
- var head = document.getElementsByTagName('head')[0];
-
- var curSystem;
- var curRequire;
-
- // if doing worker executing, this is set to the load record being executed
- var workerLoad = null;
-
- // interactive mode handling method courtesy RequireJS
- var ieEvents = head && (function() {
- var s = document.createElement('script');
- var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';
- return s.attachEvent && !(s.attachEvent.toString && s.attachEvent.toString().indexOf('[native code') < 0) && !isOpera;
- })();
-
- // IE interactive-only part
- // we store loading scripts array as { script: <script>, load: {...} }
- var interactiveLoadingScripts = [];
- var interactiveScript;
- function getInteractiveScriptLoad() {
- if (interactiveScript && interactiveScript.script.readyState === 'interactive')
- return interactiveScript.load;
-
- for (var i = 0; i < interactiveLoadingScripts.length; i++)
- if (interactiveLoadingScripts[i].script.readyState == 'interactive') {
- interactiveScript = interactiveLoadingScripts[i];
- return interactiveScript.load;
- }
- }
-
- // System.register, System.registerDynamic, AMD define pipeline
- // this is called by the above methods when they execute
- // we then run the reduceRegister_ collection function either immediately
- // if we are in IE and know the currently executing script (interactive)
- // or later if we need to wait for the synchronous load callback to know the script
- var loadingCnt = 0;
- var registerQueue = [];
- hook('pushRegister_', function(pushRegister) {
- return function(register) {
- // if using eval-execution then skip
- if (pushRegister.call(this, register))
- return false;
-
- // if using worker execution, then we're done
- if (workerLoad)
- this.reduceRegister_(workerLoad, register);
-
- // detect if we know the currently executing load (IE)
- // if so, immediately call reduceRegister
- else if (ieEvents)
- this.reduceRegister_(getInteractiveScriptLoad(), register);
-
- // otherwise, add to our execution queue
- // to call reduceRegister on sync script load event
- else if (loadingCnt)
- registerQueue.push(register);
-
- // if we're not currently loading anything though
- // then do the reduction against a null load
- // (out of band named define or named register)
- // note even in non-script environments, this catch is used
- else
- this.reduceRegister_(null, register);
-
- return true;
- };
- });
-
- function webWorkerImport(loader, load) {
- return new Promise(function(resolve, reject) {
- if (load.metadata.integrity)
- reject(new Error('Subresource integrity checking is not supported in web workers.'));
-
- workerLoad = load;
- try {
- importScripts(load.address);
- }
- catch(e) {
- workerLoad = null;
- reject(e);
- }
- workerLoad = null;
-
- // if nothing registered, then something went wrong
- if (!load.metadata.entry)
- reject(new Error(load.address + ' did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.'));
-
- resolve('');
- });
- }
-
- // override fetch to use script injection
- hook('fetch', function(fetch) {
- return function(load) {
- var loader = this;
-
- if (load.metadata.format == 'json' || !load.metadata.scriptLoad || (!isBrowser && !isWorker))
- return fetch.call(this, load);
-
- if (isWorker)
- return webWorkerImport(loader, load);
-
- return new Promise(function(resolve, reject) {
- var s = document.createElement('script');
-
- s.async = true;
-
- if (load.metadata.crossOrigin)
- s.crossOrigin = load.metadata.crossOrigin;
-
- if (load.metadata.integrity)
- s.setAttribute('integrity', load.metadata.integrity);
-
- if (ieEvents) {
- s.attachEvent('onreadystatechange', complete);
- interactiveLoadingScripts.push({
- script: s,
- load: load
- });
- }
- else {
- s.addEventListener('load', complete, false);
- s.addEventListener('error', error, false);
- }
-
- loadingCnt++;
-
- curSystem = __global.System;
- curRequire = __global.require;
-
- s.src = load.address;
- head.appendChild(s);
-
- function complete(evt) {
- if (s.readyState && s.readyState != 'loaded' && s.readyState != 'complete')
- return;
-
- loadingCnt--;
-
- // complete call is sync on execution finish
- // (in ie already done reductions)
- if (!load.metadata.entry && !registerQueue.length) {
- loader.reduceRegister_(load);
- }
- else if (!ieEvents) {
- for (var i = 0; i < registerQueue.length; i++)
- loader.reduceRegister_(load, registerQueue[i]);
- registerQueue = [];
- }
-
- cleanup();
-
- // if nothing registered, then something went wrong
- if (!load.metadata.entry && !load.metadata.bundle)
- reject(new Error(load.name + ' did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.'));
-
- resolve('');
- }
-
- function error(evt) {
- cleanup();
- reject(new Error('Unable to load script ' + load.address));
- }
-
- function cleanup() {
- __global.System = curSystem;
- __global.require = curRequire;
-
- if (s.detachEvent) {
- s.detachEvent('onreadystatechange', complete);
- for (var i = 0; i < interactiveLoadingScripts.length; i++)
- if (interactiveLoadingScripts[i].script == s) {
- if (interactiveScript && interactiveScript.script == s)
- interactiveScript = null;
- interactiveLoadingScripts.splice(i, 1);
- }
- }
- else {
- s.removeEventListener('load', complete, false);
- s.removeEventListener('error', error, false);
- }
-
- head.removeChild(s);
- }
- });
- };
- });
-})();
-/*
- * Instantiate registry extension
- *
- * Supports Traceur System.register 'instantiate' output for loading ES6 as ES5.
- *
- * - Creates the loader.register function
- * - Also supports metadata.format = 'register' in instantiate for anonymous register modules
- * - Also supports metadata.deps, metadata.execute and metadata.executingRequire
- * for handling dynamic modules alongside register-transformed ES6 modules
- *
- *
- * The code here replicates the ES6 linking groups algorithm to ensure that
- * circular ES6 compiled into System.register can work alongside circular AMD
- * and CommonJS, identically to the actual ES6 loader.
- *
- */
-
-
-/*
- * Registry side table entries in loader.defined
- * Registry Entry Contains:
- * - name
- * - deps
- * - declare for declarative modules
- * - execute for dynamic modules, different to declarative execute on module
- * - executingRequire indicates require drives execution for circularity of dynamic modules
- * - declarative optional boolean indicating which of the above
- *
- * Can preload modules directly on SystemJS.defined['my/module'] = { deps, execute, executingRequire }
- *
- * Then the entry gets populated with derived information during processing:
- * - normalizedDeps derived from deps, created in instantiate
- * - groupIndex used by group linking algorithm
- * - evaluated indicating whether evaluation has happend
- * - module the module record object, containing:
- * - exports actual module exports
- *
- * For dynamic we track the es module with:
- * - esModule actual es module value
- * - esmExports whether to extend the esModule with named exports
- *
- * Then for declarative only we track dynamic bindings with the 'module' records:
- * - name
- * - exports
- * - setters declarative setter functions
- * - dependencies, module records of dependencies
- * - importers, module records of dependents
- *
- * After linked and evaluated, entries are removed, declarative module records remain in separate
- * module binding table
- *
- */
-
-var leadingCommentAndMetaRegEx = /^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;
-function detectRegisterFormat(source) {
- var leadingCommentAndMeta = source.match(leadingCommentAndMetaRegEx);
- return leadingCommentAndMeta && source.substr(leadingCommentAndMeta[0].length, 15) == 'System.register';
-}
-
-function createEntry() {
- return {
- name: null,
- deps: null,
- originalIndices: null,
- declare: null,
- execute: null,
- executingRequire: false,
- declarative: false,
- normalizedDeps: null,
- groupIndex: null,
- evaluated: false,
- module: null,
- esModule: null,
- esmExports: false
- };
-}
-
-(function() {
-
- /*
- * There are two variations of System.register:
- * 1. System.register for ES6 conversion (2-3 params) - System.register([name, ]deps, declare)
- * see https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
- *
- * 2. System.registerDynamic for dynamic modules (3-4 params) - System.registerDynamic([name, ]deps, executingRequire, execute)
- * the true or false statement
- *
- * this extension implements the linking algorithm for the two variations identical to the spec
- * allowing compiled ES6 circular references to work alongside AMD and CJS circular references.
- *
- */
- SystemJSLoader.prototype.register = function(name, deps, declare) {
- if (typeof name != 'string') {
- declare = deps;
- deps = name;
- name = null;
- }
-
- // dynamic backwards-compatibility
- // can be deprecated eventually
- if (typeof declare == 'boolean')
- return this.registerDynamic.apply(this, arguments);
-
- var entry = createEntry();
- // ideally wouldn't apply map config to bundle names but
- // dependencies go through map regardless so we can't restrict
- // could reconsider in shift to new spec
- entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
- entry.declarative = true;
- entry.deps = deps;
- entry.declare = declare;
-
- this.pushRegister_({
- amd: false,
- entry: entry
- });
- };
- SystemJSLoader.prototype.registerDynamic = function(name, deps, declare, execute) {
- if (typeof name != 'string') {
- execute = declare;
- declare = deps;
- deps = name;
- name = null;
- }
-
- // dynamic
- var entry = createEntry();
- entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
- entry.deps = deps;
- entry.execute = execute;
- entry.executingRequire = declare;
-
- this.pushRegister_({
- amd: false,
- entry: entry
- });
- };
- hook('reduceRegister_', function() {
- return function(load, register) {
- if (!register)
- return;
-
- var entry = register.entry;
- var curMeta = load && load.metadata;
-
- // named register
- if (entry.name) {
- if (!(entry.name in this.defined))
- this.defined[entry.name] = entry;
-
- if (curMeta)
- curMeta.bundle = true;
- }
- // anonymous register
- if (!entry.name || load && !curMeta.entry && entry.name == load.name) {
- if (!curMeta)
- throw new TypeError('Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.');
- if (curMeta.entry) {
- if (curMeta.format == 'register')
- throw new Error('Multiple anonymous System.register calls in module ' + load.name + '. If loading a bundle, ensure all the System.register calls are named.');
- else
- throw new Error('Module ' + load.name + ' interpreted as ' + curMeta.format + ' module format, but called System.register.');
- }
- if (!curMeta.format)
- curMeta.format = 'register';
- curMeta.entry = entry;
- }
- };
- });
-
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
-
- this.defined = {};
- this._loader.moduleRecords = {};
- };
- });
-
- function buildGroups(entry, loader, groups) {
- groups[entry.groupIndex] = groups[entry.groupIndex] || [];
-
- if (indexOf.call(groups[entry.groupIndex], entry) != -1)
- return;
-
- groups[entry.groupIndex].push(entry);
-
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- var depEntry = loader.defined[depName];
-
- // not in the registry means already linked / ES6
- if (!depEntry || depEntry.evaluated)
- continue;
-
- // now we know the entry is in our unlinked linkage group
- var depGroupIndex = entry.groupIndex + (depEntry.declarative != entry.declarative);
-
- // the group index of an entry is always the maximum
- if (depEntry.groupIndex === null || depEntry.groupIndex < depGroupIndex) {
-
- // if already in a group, remove from the old group
- if (depEntry.groupIndex !== null) {
- groups[depEntry.groupIndex].splice(indexOf.call(groups[depEntry.groupIndex], depEntry), 1);
-
- // if the old group is empty, then we have a mixed depndency cycle
- if (groups[depEntry.groupIndex].length == 0)
- throw new Error("Mixed dependency cycle detected");
- }
-
- depEntry.groupIndex = depGroupIndex;
- }
-
- buildGroups(depEntry, loader, groups);
- }
- }
-
- function link(name, startEntry, loader) {
- // skip if already linked
- if (startEntry.module)
- return;
-
- startEntry.groupIndex = 0;
-
- var groups = [];
-
- buildGroups(startEntry, loader, groups);
-
- var curGroupDeclarative = !!startEntry.declarative == groups.length % 2;
- for (var i = groups.length - 1; i >= 0; i--) {
- var group = groups[i];
- for (var j = 0; j < group.length; j++) {
- var entry = group[j];
-
- // link each group
- if (curGroupDeclarative)
- linkDeclarativeModule(entry, loader);
- else
- linkDynamicModule(entry, loader);
- }
- curGroupDeclarative = !curGroupDeclarative;
- }
- }
-
- // module binding records
- function ModuleRecord() {}
- defineProperty(ModuleRecord, 'toString', {
- value: function() {
- return 'Module';
- }
- });
-
- function getOrCreateModuleRecord(name, moduleRecords) {
- return moduleRecords[name] || (moduleRecords[name] = {
- name: name,
- dependencies: [],
- exports: new ModuleRecord(), // start from an empty module and extend
- importers: []
- });
- }
-
- function linkDeclarativeModule(entry, loader) {
- // only link if already not already started linking (stops at circular)
- if (entry.module)
- return;
-
- var moduleRecords = loader._loader.moduleRecords;
- var module = entry.module = getOrCreateModuleRecord(entry.name, moduleRecords);
- var exports = entry.module.exports;
-
- var declaration = entry.declare.call(__global, function(name, value) {
- module.locked = true;
-
- if (typeof name == 'object') {
- for (var p in name)
- exports[p] = name[p];
- }
- else {
- exports[name] = value;
- }
-
- for (var i = 0, l = module.importers.length; i < l; i++) {
- var importerModule = module.importers[i];
- if (!importerModule.locked) {
- var importerIndex = indexOf.call(importerModule.dependencies, module);
- var setter = importerModule.setters[importerIndex];
- if (setter)
- setter(exports);
- }
- }
-
- module.locked = false;
- return value;
- }, { id: entry.name });
-
- if (typeof declaration == 'function')
- declaration = { setters: [], execute: declaration };
-
- // allowing undefined declaration was a mistake! To be deprecated.
- declaration = declaration || { setters: [], execute: function() {} };
-
- module.setters = declaration.setters;
- module.execute = declaration.execute;
-
- if (!module.setters || !module.execute) {
- throw new TypeError('Invalid System.register form for ' + entry.name);
- }
-
- // now link all the module dependencies
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- var depEntry = loader.defined[depName];
- var depModule = moduleRecords[depName];
-
- // work out how to set depExports based on scenarios...
- var depExports;
-
- if (depModule) {
- depExports = depModule.exports;
- }
- // dynamic, already linked in our registry
- else if (depEntry && !depEntry.declarative) {
- depExports = depEntry.esModule;
- }
- // in the loader registry
- else if (!depEntry) {
- depExports = loader.get(depName);
- }
- // we have an entry -> link
- else {
- linkDeclarativeModule(depEntry, loader);
- depModule = depEntry.module;
- depExports = depModule.exports;
- }
-
- // only declarative modules have dynamic bindings
- if (depModule && depModule.importers) {
- depModule.importers.push(module);
- module.dependencies.push(depModule);
- }
- else {
- module.dependencies.push(null);
- }
-
- // run setters for all entries with the matching dependency name
- var originalIndices = entry.originalIndices[i];
- for (var j = 0, len = originalIndices.length; j < len; ++j) {
- var index = originalIndices[j];
- if (module.setters[index]) {
- module.setters[index](depExports);
- }
- }
- }
- }
-
- // An analog to loader.get covering execution of all three layers (real declarative, simulated declarative, simulated dynamic)
- function getModule(name, loader) {
- var exports;
- var entry = loader.defined[name];
-
- if (!entry) {
- exports = loader.get(name);
- if (!exports)
- throw new Error('Unable to load dependency ' + name + '.');
- }
-
- else {
- if (entry.declarative)
- ensureEvaluated(name, entry, [], loader);
-
- else if (!entry.evaluated)
- linkDynamicModule(entry, loader);
-
- exports = entry.module.exports;
- }
-
- if ((!entry || entry.declarative) && exports && exports.__useDefault)
- return exports['default'];
-
- return exports;
- }
-
- function linkDynamicModule(entry, loader) {
- if (entry.module)
- return;
-
- var exports = {};
-
- var module = entry.module = { exports: exports, id: entry.name };
-
- // AMD requires execute the tree first
- if (!entry.executingRequire) {
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- // we know we only need to link dynamic due to linking algorithm
- var depEntry = loader.defined[depName];
- if (depEntry)
- linkDynamicModule(depEntry, loader);
- }
- }
-
- // now execute
- entry.evaluated = true;
- var output = entry.execute.call(__global, function(name) {
- for (var i = 0, l = entry.deps.length; i < l; i++) {
- if (entry.deps[i] != name)
- continue;
- return getModule(entry.normalizedDeps[i], loader);
- }
- // try and normalize the dependency to see if we have another form
- var nameNormalized = loader.normalizeSync(name, entry.name);
- if (indexOf.call(entry.normalizedDeps, nameNormalized) != -1)
- return getModule(nameNormalized, loader);
-
- throw new Error('Module ' + name + ' not declared as a dependency of ' + entry.name);
- }, exports, module);
-
- if (output !== undefined)
- module.exports = output;
-
- // create the esModule object, which allows ES6 named imports of dynamics
- exports = module.exports;
-
- // __esModule flag treats as already-named
- if (exports && (exports.__esModule || exports instanceof Module))
- entry.esModule = loader.newModule(exports);
- // set module as 'default' export, then fake named exports by iterating properties
- else if (entry.esmExports && exports !== __global)
- entry.esModule = loader.newModule(getESModule(exports));
- // just use the 'default' export
- else
- entry.esModule = loader.newModule({ 'default': exports, __useDefault: true });
- }
-
- /*
- * Given a module, and the list of modules for this current branch,
- * ensure that each of the dependencies of this module is evaluated
- * (unless one is a circular dependency already in the list of seen
- * modules, in which case we execute it)
- *
- * Then we evaluate the module itself depth-first left to right
- * execution to match ES6 modules
- */
- function ensureEvaluated(moduleName, entry, seen, loader) {
- // if already seen, that means it's an already-evaluated non circular dependency
- if (!entry || entry.evaluated || !entry.declarative)
- return;
-
- // this only applies to declarative modules which late-execute
-
- seen.push(moduleName);
-
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- if (indexOf.call(seen, depName) == -1) {
- if (!loader.defined[depName])
- loader.get(depName);
- else
- ensureEvaluated(depName, loader.defined[depName], seen, loader);
- }
- }
-
- if (entry.evaluated)
- return;
-
- entry.evaluated = true;
- entry.module.execute.call(__global);
- }
-
- // override the delete method to also clear the register caches
- hook('delete', function(del) {
- return function(name) {
- delete this._loader.moduleRecords[name];
- delete this.defined[name];
- return del.call(this, name);
- };
- });
-
- hook('fetch', function(fetch) {
- return function(load) {
- if (this.defined[load.name]) {
- load.metadata.format = 'defined';
- return '';
- }
-
- load.metadata.deps = load.metadata.deps || [];
-
- return fetch.call(this, load);
- };
- });
-
- hook('translate', function(translate) {
- // we run the meta detection here (register is after meta)
- return function(load) {
- load.metadata.deps = load.metadata.deps || [];
- return Promise.resolve(translate.apply(this, arguments)).then(function(source) {
- // run detection for register format
- if (load.metadata.format == 'register' || !load.metadata.format && detectRegisterFormat(load.source))
- load.metadata.format = 'register';
- return source;
- });
- };
- });
-
- // implement a perforance shortpath for System.load with no deps
- hook('load', function(doLoad) {
- return function(normalized) {
- var loader = this;
- var entry = loader.defined[normalized];
-
- if (!entry || entry.deps.length)
- return doLoad.apply(this, arguments);
-
- entry.originalIndices = entry.normalizedDeps = [];
-
- // recursively ensure that the module and all its
- // dependencies are linked (with dependency group handling)
- link(normalized, entry, loader);
-
- // now handle dependency execution in correct order
- ensureEvaluated(normalized, entry, [], loader);
- if (!entry.esModule)
- entry.esModule = loader.newModule(entry.module.exports);
-
- // remove from the registry
- if (!loader.trace)
- loader.defined[normalized] = undefined;
-
- // return the defined module object
- loader.set(normalized, entry.esModule);
-
- return Promise.resolve();
- };
- });
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- if (load.metadata.format == 'detect')
- load.metadata.format = undefined;
-
- // assumes previous instantiate is sync
- // (core json support)
- instantiate.call(this, load);
-
- var loader = this;
-
- var entry;
-
- // first we check if this module has already been defined in the registry
- if (loader.defined[load.name]) {
- entry = loader.defined[load.name];
- // don't support deps for ES modules
- if (!entry.declarative)
- entry.deps = entry.deps.concat(load.metadata.deps);
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // picked up already by an anonymous System.register script injection
- // or via the dynamic formats
- else if (load.metadata.entry) {
- entry = load.metadata.entry;
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // Contains System.register calls
- // (dont run bundles in the builder)
- else if (!(loader.builder && load.metadata.bundle)
- && (load.metadata.format == 'register' || load.metadata.format == 'esm' || load.metadata.format == 'es6')) {
-
- if (typeof __exec != 'undefined')
- __exec.call(loader, load);
-
- if (!load.metadata.entry && !load.metadata.bundle)
- throw new Error(load.name + ' detected as ' + load.metadata.format + ' but didn\'t execute.');
-
- entry = load.metadata.entry;
-
- // support metadata deps for System.register
- if (entry && load.metadata.deps)
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // named bundles are just an empty module
- if (!entry) {
- entry = createEntry();
- entry.deps = load.metadata.deps;
- entry.execute = function() {};
- }
-
- // place this module onto defined for circular references
- loader.defined[load.name] = entry;
-
- var grouped = group(entry.deps);
-
- entry.deps = grouped.names;
- entry.originalIndices = grouped.indices;
- entry.name = load.name;
- entry.esmExports = load.metadata.esmExports !== false;
-
- // first, normalize all dependencies
- var normalizePromises = [];
- for (var i = 0, l = entry.deps.length; i < l; i++)
- normalizePromises.push(Promise.resolve(loader.normalize(entry.deps[i], load.name)));
-
- return Promise.all(normalizePromises).then(function(normalizedDeps) {
-
- entry.normalizedDeps = normalizedDeps;
-
- return {
- deps: entry.deps,
- execute: function() {
- // recursively ensure that the module and all its
- // dependencies are linked (with dependency group handling)
- link(load.name, entry, loader);
-
- // now handle dependency execution in correct order
- ensureEvaluated(load.name, entry, [], loader);
-
- if (!entry.esModule)
- entry.esModule = loader.newModule(entry.module.exports);
-
- // remove from the registry
- if (!loader.trace)
- loader.defined[load.name] = undefined;
-
- // return the defined module object
- return entry.esModule;
- }
- };
- });
- };
- });
-})();
-
-
-function getGlobalValue(exports) {
- if (typeof exports == 'string')
- return readMemberExpression(exports, __global);
-
- if (!(exports instanceof Array))
- throw new Error('Global exports must be a string or array.');
-
- var globalValue = {};
- var first = true;
- for (var i = 0; i < exports.length; i++) {
- var val = readMemberExpression(exports[i], __global);
- if (first) {
- globalValue['default'] = val;
- first = false;
- }
- globalValue[exports[i].split('.').pop()] = val;
- }
- return globalValue;
-}
-
-hook('reduceRegister_', function(reduceRegister) {
- return function(load, register) {
- if (register || (!load.metadata.exports && !(isWorker && load.metadata.format == 'global')))
- return reduceRegister.call(this, load, register);
-
- load.metadata.format = 'global';
- var entry = load.metadata.entry = createEntry();
- entry.deps = load.metadata.deps;
- var globalValue = getGlobalValue(load.metadata.exports);
- entry.execute = function() {
- return globalValue;
- };
- };
-});
-
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(loader);
-
- var hasOwnProperty = Object.prototype.hasOwnProperty;
-
- // bare minimum ignores
- var ignoredGlobalProps = ['_g', 'sessionStorage', 'localStorage', 'clipboardData', 'frames', 'frameElement', 'external',
- 'mozAnimationStartTime', 'webkitStorageInfo', 'webkitIndexedDB', 'mozInnerScreenY', 'mozInnerScreenX'];
-
- var globalSnapshot;
-
- function forEachGlobal(callback) {
- if (Object.keys)
- Object.keys(__global).forEach(callback);
- else
- for (var g in __global) {
- if (!hasOwnProperty.call(__global, g))
- continue;
- callback(g);
- }
- }
-
- function forEachGlobalValue(callback) {
- forEachGlobal(function(globalName) {
- if (indexOf.call(ignoredGlobalProps, globalName) != -1)
- return;
- try {
- var value = __global[globalName];
- }
- catch (e) {
- ignoredGlobalProps.push(globalName);
- }
- callback(globalName, value);
- });
- }
-
- loader.set('@@global-helpers', loader.newModule({
- prepareGlobal: function(moduleName, exports, globals, encapsulate) {
- // disable module detection
- var curDefine = __global.define;
-
- __global.define = undefined;
-
- // set globals
- var oldGlobals;
- if (globals) {
- oldGlobals = {};
- for (var g in globals) {
- oldGlobals[g] = __global[g];
- __global[g] = globals[g];
- }
- }
-
- // store a complete copy of the global object in order to detect changes
- if (!exports) {
- globalSnapshot = {};
-
- forEachGlobalValue(function(name, value) {
- globalSnapshot[name] = value;
- });
- }
-
- // return function to retrieve global
- return function() {
- var globalValue = exports ? getGlobalValue(exports) : {};
-
- var singleGlobal;
- var multipleExports = !!exports;
-
- if (!exports || encapsulate)
- forEachGlobalValue(function(name, value) {
- if (globalSnapshot[name] === value)
- return;
- if (typeof value == 'undefined')
- return;
-
- // allow global encapsulation where globals are removed
- if (encapsulate)
- __global[name] = undefined;
-
- if (!exports) {
- globalValue[name] = value;
-
- if (typeof singleGlobal != 'undefined') {
- if (!multipleExports && singleGlobal !== value)
- multipleExports = true;
- }
- else {
- singleGlobal = value;
- }
- }
- });
-
- globalValue = multipleExports ? globalValue : singleGlobal;
-
- // revert globals
- if (oldGlobals) {
- for (var g in oldGlobals)
- __global[g] = oldGlobals[g];
- }
- __global.define = curDefine;
-
- return globalValue;
- };
- }
- }));
- };
-});
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(loader);
-
- if (typeof window != 'undefined' && typeof document != 'undefined' && window.location)
- var windowOrigin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
-
- function stripOrigin(path) {
- if (path.substr(0, 8) == 'file:///')
- return path.substr(7 + !!isWindows);
-
- if (windowOrigin && path.substr(0, windowOrigin.length) == windowOrigin)
- return path.substr(windowOrigin.length);
-
- return path;
- }
-
- loader.set('@@cjs-helpers', loader.newModule({
- requireResolve: function(request, parentId) {
- return stripOrigin(loader.normalizeSync(request, parentId));
- },
- getPathVars: function(moduleId) {
- // remove any plugin syntax
- var pluginIndex = moduleId.lastIndexOf('!');
- var filename;
- if (pluginIndex != -1)
- filename = moduleId.substr(0, pluginIndex);
- else
- filename = moduleId;
-
- var dirname = filename.split('/');
- dirname.pop();
- dirname = dirname.join('/');
-
- return {
- filename: stripOrigin(filename),
- dirname: stripOrigin(dirname)
- };
- }
- }))
- };
-});/*
- * AMD Helper function module
- * Separated into its own file as this is the part needed for full AMD support in SFX builds
- * NB since implementations have now diverged this can be merged back with amd.js
- */
-
-hook('fetch', function(fetch) {
- return function(load) {
- // script load implies define global leak
- if (load.metadata.scriptLoad && isBrowser)
- __global.define = this.amdDefine;
- return fetch.call(this, load);
- };
-});
-
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(this);
-
- var commentRegEx = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
- var cjsRequirePre = "(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])";
- var cjsRequirePost = "\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)";
- var fnBracketRegEx = /\(([^\)]*)\)/;
- var wsRegEx = /^\s+|\s+$/g;
-
- var requireRegExs = {};
-
- function getCJSDeps(source, requireIndex) {
-
- // remove comments
- source = source.replace(commentRegEx, '');
-
- // determine the require alias
- var params = source.match(fnBracketRegEx);
- var requireAlias = (params[1].split(',')[requireIndex] || 'require').replace(wsRegEx, '');
-
- // find or generate the regex for this requireAlias
- var requireRegEx = requireRegExs[requireAlias] || (requireRegExs[requireAlias] = new RegExp(cjsRequirePre + requireAlias + cjsRequirePost, 'g'));
-
- requireRegEx.lastIndex = 0;
-
- var deps = [];
-
- var match;
- while (match = requireRegEx.exec(source))
- deps.push(match[2] || match[3]);
-
- return deps;
- }
-
- /*
- AMD-compatible require
- To copy RequireJS, set window.require = window.requirejs = loader.amdRequire
- */
- function require(names, callback, errback, referer) {
- // in amd, first arg can be a config object... we just ignore
- if (typeof names == 'object' && !(names instanceof Array))
- return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));
-
- // amd require
- if (typeof names == 'string' && typeof callback == 'function')
- names = [names];
- if (names instanceof Array) {
- var dynamicRequires = [];
- for (var i = 0; i < names.length; i++)
- dynamicRequires.push(loader['import'](names[i], referer));
- Promise.all(dynamicRequires).then(function(modules) {
- if (callback)
- callback.apply(null, modules);
- }, errback);
- }
-
- // commonjs require
- else if (typeof names == 'string') {
- var defaultJSExtension = loader.defaultJSExtensions && names.substr(names.length - 3, 3) != '.js';
- var normalized = loader.decanonicalize(names, referer);
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) == '.js')
- normalized = normalized.substr(0, normalized.length - 3);
- var module = loader.get(normalized);
- if (!module)
- throw new Error('Module not already loaded loading "' + names + '" as ' + normalized + (referer ? ' from "' + referer + '".' : '.'));
- return module.__useDefault ? module['default'] : module;
- }
-
- else
- throw new TypeError('Invalid require');
- }
-
- function define(name, deps, factory) {
- if (typeof name != 'string') {
- factory = deps;
- deps = name;
- name = null;
- }
- if (!(deps instanceof Array)) {
- factory = deps;
- deps = ['require', 'exports', 'module'].splice(0, factory.length);
- }
-
- if (typeof factory != 'function')
- factory = (function(factory) {
- return function() { return factory; }
- })(factory);
-
- // in IE8, a trailing comma becomes a trailing undefined entry
- if (deps[deps.length - 1] === undefined)
- deps.pop();
-
- // remove system dependencies
- var requireIndex, exportsIndex, moduleIndex;
-
- if ((requireIndex = indexOf.call(deps, 'require')) != -1) {
-
- deps.splice(requireIndex, 1);
-
- // only trace cjs requires for non-named
- // named defines assume the trace has already been done
- if (!name)
- deps = deps.concat(getCJSDeps(factory.toString(), requireIndex));
- }
-
- if ((exportsIndex = indexOf.call(deps, 'exports')) != -1)
- deps.splice(exportsIndex, 1);
-
- if ((moduleIndex = indexOf.call(deps, 'module')) != -1)
- deps.splice(moduleIndex, 1);
-
- function execute(req, exports, module) {
- var depValues = [];
- for (var i = 0; i < deps.length; i++)
- depValues.push(req(deps[i]));
-
- module.uri = module.id;
-
- module.config = function() {};
-
- // add back in system dependencies
- if (moduleIndex != -1)
- depValues.splice(moduleIndex, 0, module);
-
- if (exportsIndex != -1)
- depValues.splice(exportsIndex, 0, exports);
-
- if (requireIndex != -1) {
- function contextualRequire(names, callback, errback) {
- if (typeof names == 'string' && typeof callback != 'function')
- return req(names);
- return require.call(loader, names, callback, errback, module.id);
- }
- contextualRequire.toUrl = function(name) {
- // normalize without defaultJSExtensions
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
- var url = loader.decanonicalize(name, module.id);
- if (defaultJSExtension && url.substr(url.length - 3, 3) == '.js')
- url = url.substr(0, url.length - 3);
- return url;
- };
- depValues.splice(requireIndex, 0, contextualRequire);
- }
-
- // set global require to AMD require
- var curRequire = __global.require;
- __global.require = require;
-
- var output = factory.apply(exportsIndex == -1 ? __global : exports, depValues);
-
- __global.require = curRequire;
-
- if (typeof output == 'undefined' && module)
- output = module.exports;
-
- if (typeof output != 'undefined')
- return output;
- }
-
- var entry = createEntry();
- entry.name = name && (loader.decanonicalize || loader.normalize).call(loader, name);
- entry.deps = deps;
- entry.execute = execute;
-
- loader.pushRegister_({
- amd: true,
- entry: entry
- });
- }
- define.amd = {};
-
- // reduction function to attach defines to a load record
- hook('reduceRegister_', function(reduceRegister) {
- return function(load, register) {
- // only handle AMD registers here
- if (!register || !register.amd)
- return reduceRegister.call(this, load, register);
-
- var curMeta = load && load.metadata;
- var entry = register.entry;
-
- if (curMeta) {
- if (!curMeta.format || curMeta.format == 'detect')
- curMeta.format = 'amd';
- else if (!entry.name && curMeta.format != 'amd')
- throw new Error('AMD define called while executing ' + curMeta.format + ' module ' + load.name);
- }
-
- // anonymous define
- if (!entry.name) {
- if (!curMeta)
- throw new TypeError('Unexpected anonymous AMD define.');
-
- if (curMeta.entry && !curMeta.entry.name)
- throw new Error('Multiple anonymous defines in module ' + load.name);
-
- curMeta.entry = entry;
- }
- // named define
- else {
- // if we don't have any other defines,
- // then let this be an anonymous define
- // this is just to support single modules of the form:
- // define('jquery')
- // still loading anonymously
- // because it is done widely enough to be useful
- // as soon as there is more than one define, this gets removed though
- if (curMeta) {
- if (!curMeta.entry && !curMeta.bundle)
- curMeta.entry = entry;
- else if (curMeta.entry && curMeta.entry.name && curMeta.entry.name != load.name)
- curMeta.entry = undefined;
-
- // note this is now a bundle
- curMeta.bundle = true;
- }
-
- // define the module through the register registry
- if (!(entry.name in this.defined))
- this.defined[entry.name] = entry;
- }
- };
- });
-
- loader.amdDefine = define;
- loader.amdRequire = require;
- };
-});/*
- SystemJS Loader Plugin Support
-
- Supports plugin loader syntax with "!", or via metadata.loader
-
- The plugin name is loaded as a module itself, and can override standard loader hooks
- for the plugin resource. See the plugin section of the systemjs readme.
-*/
-
-(function() {
- function getParentName(loader, parentName) {
- // if parent is a plugin, normalize against the parent plugin argument only
- if (parentName) {
- var parentPluginIndex;
- if (loader.pluginFirst) {
- if ((parentPluginIndex = parentName.lastIndexOf('!')) != -1)
- return parentName.substr(parentPluginIndex + 1);
- }
- else {
- if ((parentPluginIndex = parentName.indexOf('!')) != -1)
- return parentName.substr(0, parentPluginIndex);
- }
-
- return parentName;
- }
- }
-
- function parsePlugin(loader, name) {
- var argumentName;
- var pluginName;
-
- var pluginIndex = name.lastIndexOf('!');
-
- if (pluginIndex == -1)
- return;
-
- if (loader.pluginFirst) {
- argumentName = name.substr(pluginIndex + 1);
- pluginName = name.substr(0, pluginIndex);
- }
- else {
- argumentName = name.substr(0, pluginIndex);
- pluginName = name.substr(pluginIndex + 1) || argumentName.substr(argumentName.lastIndexOf('.') + 1);
- }
-
- return {
- argument: argumentName,
- plugin: pluginName
- };
- }
-
- // put name back together after parts have been normalized
- function combinePluginParts(loader, argumentName, pluginName, defaultExtension) {
- if (defaultExtension && argumentName.substr(argumentName.length - 3, 3) == '.js')
- argumentName = argumentName.substr(0, argumentName.length - 3);
-
- if (loader.pluginFirst) {
- return pluginName + '!' + argumentName;
- }
- else {
- return argumentName + '!' + pluginName;
- }
- }
-
- // note if normalize will add a default js extension
- // if so, remove for backwards compat
- // this is strange and sucks, but will be deprecated
- function checkDefaultExtension(loader, arg) {
- return loader.defaultJSExtensions && arg.substr(arg.length - 3, 3) != '.js';
- }
-
- function createNormalizeSync(normalizeSync) {
- return function(name, parentName, isPlugin) {
- var loader = this;
-
- var parsed = parsePlugin(loader, name);
- parentName = getParentName(this, parentName);
-
- if (!parsed)
- return normalizeSync.call(this, name, parentName, isPlugin);
-
- // if this is a plugin, normalize the plugin name and the argument
- var argumentName = loader.normalizeSync(parsed.argument, parentName, true);
- var pluginName = loader.normalizeSync(parsed.plugin, parentName, true);
- return combinePluginParts(loader, argumentName, pluginName, checkDefaultExtension(loader, parsed.argument));
- };
- }
-
- hook('decanonicalize', createNormalizeSync);
- hook('normalizeSync', createNormalizeSync);
-
- hook('normalize', function(normalize) {
- return function(name, parentName, isPlugin) {
- var loader = this;
-
- parentName = getParentName(this, parentName);
-
- var parsed = parsePlugin(loader, name);
-
- if (!parsed)
- return normalize.call(loader, name, parentName, isPlugin);
-
- return Promise.all([
- loader.normalize(parsed.argument, parentName, true),
- loader.normalize(parsed.plugin, parentName, false)
- ])
- .then(function(normalized) {
- return combinePluginParts(loader, normalized[0], normalized[1], checkDefaultExtension(loader, parsed.argument));
- });
- }
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
-
- var name = load.name;
-
- // plugin syntax
- var pluginSyntaxIndex;
- if (loader.pluginFirst) {
- if ((pluginSyntaxIndex = name.indexOf('!')) != -1) {
- load.metadata.loader = name.substr(0, pluginSyntaxIndex);
- load.name = name.substr(pluginSyntaxIndex + 1);
- }
- }
- else {
- if ((pluginSyntaxIndex = name.lastIndexOf('!')) != -1) {
- load.metadata.loader = name.substr(pluginSyntaxIndex + 1);
- load.name = name.substr(0, pluginSyntaxIndex);
- }
- }
-
- return locate.call(loader, load)
- .then(function(address) {
- if (pluginSyntaxIndex != -1 || !load.metadata.loader)
- return address;
-
- // normalize plugin relative to parent in locate here when
- // using plugin via loader metadata
- return (loader.pluginLoader || loader).normalize(load.metadata.loader, load.name)
- .then(function(loaderNormalized) {
- load.metadata.loader = loaderNormalized;
- return address;
- });
- })
- .then(function(address) {
- var plugin = load.metadata.loader;
-
- if (!plugin)
- return address;
-
- // don't allow a plugin to load itself
- if (load.name == plugin)
- throw new Error('Plugin ' + plugin + ' cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.');
-
- // only fetch the plugin itself if this name isn't defined
- if (loader.defined && loader.defined[name])
- return address;
-
- var pluginLoader = loader.pluginLoader || loader;
-
- // load the plugin module and run standard locate
- return pluginLoader['import'](plugin)
- .then(function(loaderModule) {
- // store the plugin module itself on the metadata
- load.metadata.loaderModule = loaderModule;
-
- load.address = address;
- if (loaderModule.locate)
- return loaderModule.locate.call(loader, load);
-
- return address;
- });
- });
- };
- });
-
- hook('fetch', function(fetch) {
- return function(load) {
- var loader = this;
- if (load.metadata.loaderModule && load.metadata.loaderModule.fetch && load.metadata.format != 'defined') {
- load.metadata.scriptLoad = false;
- return load.metadata.loaderModule.fetch.call(loader, load, function(load) {
- return fetch.call(loader, load);
- });
- }
- else {
- return fetch.call(loader, load);
- }
- };
- });
-
- hook('translate', function(translate) {
- return function(load) {
- var loader = this;
- var args = arguments;
- if (load.metadata.loaderModule && load.metadata.loaderModule.translate && load.metadata.format != 'defined') {
- return Promise.resolve(load.metadata.loaderModule.translate.apply(loader, args)).then(function(result) {
- var sourceMap = load.metadata.sourceMap;
-
- // sanitize sourceMap if an object not a JSON string
- if (sourceMap) {
- if (typeof sourceMap != 'object')
- throw new Error('load.metadata.sourceMap must be set to an object.');
-
- var originalName = load.address.split('!')[0];
-
- // force set the filename of the original file
- if (!sourceMap.file || sourceMap.file == load.address)
- sourceMap.file = originalName + '!transpiled';
-
- // force set the sources list if only one source
- if (!sourceMap.sources || sourceMap.sources.length <= 1 && (!sourceMap.sources[0] || sourceMap.sources[0] == load.address))
- sourceMap.sources = [originalName];
- }
-
- // if running on file:/// URLs, sourcesContent is necessary
- // load.metadata.sourceMap.sourcesContent = [load.source];
-
- if (typeof result == 'string')
- load.source = result;
- else
- warn.call(this, 'Plugin ' + load.metadata.loader + ' should return the source in translate, instead of setting load.source directly. This support will be deprecated.');
-
- return translate.apply(loader, args);
- });
- }
- else {
- return translate.apply(loader, args);
- }
- };
- });
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
- var calledInstantiate = false;
-
- if (load.metadata.loaderModule && load.metadata.loaderModule.instantiate && !loader.builder && load.metadata.format != 'defined')
- return Promise.resolve(load.metadata.loaderModule.instantiate.call(loader, load, function(load) {
- if (calledInstantiate)
- throw new Error('Instantiate must only be called once.');
- calledInstantiate = true;
- return instantiate.call(loader, load);
- })).then(function(result) {
- if (calledInstantiate)
- return result;
-
- load.metadata.entry = createEntry();
- load.metadata.entry.execute = function() {
- return result;
- }
- load.metadata.entry.deps = load.metadata.deps;
- load.metadata.format = 'defined';
- return instantiate.call(loader, load);
- });
- else
- return instantiate.call(loader, load);
- };
- });
-
-})();/*
- * Conditions Extension
- *
- * Allows a condition module to alter the resolution of an import via syntax:
- *
- * import $ from 'jquery/#{browser}';
- *
- * Will first load the module 'browser' via `SystemJS.import('browser')` and
- * take the default export of that module.
- * If the default export is not a string, an error is thrown.
- *
- * We then substitute the string into the require to get the conditional resolution
- * enabling environment-specific variations like:
- *
- * import $ from 'jquery/ie'
- * import $ from 'jquery/firefox'
- * import $ from 'jquery/chrome'
- * import $ from 'jquery/safari'
- *
- * It can be useful for a condition module to define multiple conditions.
- * This can be done via the `|` modifier to specify an export member expression:
- *
- * import 'jquery/#{./browser.js|grade.version}'
- *
- * Where the `grade` export `version` member in the `browser.js` module is substituted.
- *
- *
- * Boolean Conditionals
- *
- * For polyfill modules, that are used as imports but have no module value,
- * a binary conditional allows a module not to be loaded at all if not needed:
- *
- * import 'es5-shim#?./conditions.js|needs-es5shim'
- *
- * These conditions can also be negated via:
- *
- * import 'es5-shim#?./conditions.js|~es6'
- *
- */
-
- var sysConditions = ['browser', 'node', 'dev', 'build', 'production', 'default'];
-
- function parseCondition(condition) {
- var conditionExport, conditionModule, negation;
-
- var negation = condition[0] == '~';
- var conditionExportIndex = condition.lastIndexOf('|');
- if (conditionExportIndex != -1) {
- conditionExport = condition.substr(conditionExportIndex + 1);
- conditionModule = condition.substr(negation, conditionExportIndex - negation);
-
- if (negation)
- warn.call(this, 'Condition negation form "' + condition + '" is deprecated for "' + conditionModule + '|~' + conditionExport + '"');
-
- if (conditionExport[0] == '~') {
- negation = true;
- conditionExport = conditionExport.substr(1);
- }
- }
- else {
- conditionExport = 'default';
- conditionModule = condition.substr(negation);
- if (sysConditions.indexOf(conditionModule) != -1) {
- conditionExport = conditionModule;
- conditionModule = null;
- }
- }
-
- return {
- module: conditionModule || '@system-env',
- prop: conditionExport,
- negate: negation
- };
- }
-
- function serializeCondition(conditionObj) {
- return conditionObj.module + '|' + (conditionObj.negate ? '~' : '') + conditionObj.prop;
- }
-
- function resolveCondition(conditionObj, parentName, bool) {
- var self = this;
- return this.normalize(conditionObj.module, parentName)
- .then(function(normalizedCondition) {
- return self.load(normalizedCondition)
- .then(function(q) {
- var m = readMemberExpression(conditionObj.prop, self.get(normalizedCondition));
-
- if (bool && typeof m != 'boolean')
- throw new TypeError('Condition ' + serializeCondition(conditionObj) + ' did not resolve to a boolean.');
-
- return conditionObj.negate ? !m : m;
- });
- });
- }
-
- var interpolationRegEx = /#\{[^\}]+\}/;
- function interpolateConditional(name, parentName) {
- // first we normalize the conditional
- var conditionalMatch = name.match(interpolationRegEx);
-
- if (!conditionalMatch)
- return Promise.resolve(name);
-
- var conditionObj = parseCondition.call(this, conditionalMatch[0].substr(2, conditionalMatch[0].length - 3));
-
- // in builds, return normalized conditional
- if (this.builder)
- return this['normalize'](conditionObj.module, parentName)
- .then(function(conditionModule) {
- conditionObj.module = conditionModule;
- return name.replace(interpolationRegEx, '#{' + serializeCondition(conditionObj) + '}');
- });
-
- return resolveCondition.call(this, conditionObj, parentName, false)
- .then(function(conditionValue) {
- if (typeof conditionValue !== 'string')
- throw new TypeError('The condition value for ' + name + ' doesn\'t resolve to a string.');
-
- if (conditionValue.indexOf('/') != -1)
- throw new TypeError('Unabled to interpolate conditional ' + name + (parentName ? ' in ' + parentName : '') + '\n\tThe condition value ' + conditionValue + ' cannot contain a "/" separator.');
-
- return name.replace(interpolationRegEx, conditionValue);
- });
- }
-
- function booleanConditional(name, parentName) {
- // first we normalize the conditional
- var booleanIndex = name.lastIndexOf('#?');
-
- if (booleanIndex == -1)
- return Promise.resolve(name);
-
- var conditionObj = parseCondition.call(this, name.substr(booleanIndex + 2));
-
- // in builds, return normalized conditional
- if (this.builder)
- return this['normalize'](conditionObj.module, parentName)
- .then(function(conditionModule) {
- conditionObj.module = conditionModule;
- return name.substr(0, booleanIndex) + '#?' + serializeCondition(conditionObj);
- });
-
- return resolveCondition.call(this, conditionObj, parentName, true)
- .then(function(conditionValue) {
- return conditionValue ? name.substr(0, booleanIndex) : '@empty';
- });
- }
-
- // normalizeSync does not parse conditionals at all although it could
- hook('normalize', function(normalize) {
- return function(name, parentName, skipExt) {
- var loader = this;
- return booleanConditional.call(loader, name, parentName)
- .then(function(name) {
- return normalize.call(loader, name, parentName, skipExt);
- })
- .then(function(normalized) {
- return interpolateConditional.call(loader, normalized, parentName);
- });
- };
- });
-/*
- * Alias Extension
- *
- * Allows a module to be a plain copy of another module by module name
- *
- * SystemJS.meta['mybootstrapalias'] = { alias: 'bootstrap' };
- *
- */
-(function() {
- // aliases
- hook('fetch', function(fetch) {
- return function(load) {
- var alias = load.metadata.alias;
- var aliasDeps = load.metadata.deps || [];
- if (alias) {
- load.metadata.format = 'defined';
- var entry = createEntry();
- this.defined[load.name] = entry;
- entry.declarative = true;
- entry.deps = aliasDeps.concat([alias]);
- entry.declare = function(_export) {
- return {
- setters: [function(module) {
- for (var p in module)
- _export(p, module[p]);
- if (module.__useDefault)
- entry.module.exports.__useDefault = true;
- }],
- execute: function() {}
- };
- };
- return '';
- }
-
- return fetch.call(this, load);
- };
- });
-})();/*
- * Meta Extension
- *
- * Sets default metadata on a load record (load.metadata) from
- * loader.metadata via SystemJS.meta function.
- *
- *
- * Also provides an inline meta syntax for module meta in source.
- *
- * Eg:
- *
- * loader.meta({
- * 'my/module': { deps: ['jquery'] }
- * 'my/*': { format: 'amd' }
- * });
- *
- * Which in turn populates loader.metadata.
- *
- * load.metadata.deps and load.metadata.format will then be set
- * for 'my/module'
- *
- * The same meta could be set with a my/module.js file containing:
- *
- * my/module.js
- * "format amd";
- * "deps[] jquery";
- * "globals.some value"
- * console.log('this is my/module');
- *
- * Configuration meta always takes preference to inline meta.
- *
- * Multiple matches in wildcards are supported and ammend the meta.
- *
- *
- * The benefits of the function form is that paths are URL-normalized
- * supporting say
- *
- * loader.meta({ './app': { format: 'cjs' } });
- *
- * Instead of needing to set against the absolute URL (https://site.com/app.js)
- *
- */
-
-(function() {
-
- hookConstructor(function(constructor) {
- return function() {
- this.meta = {};
- constructor.call(this);
- };
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var meta = this.meta;
- var name = load.name;
-
- // NB for perf, maybe introduce a fast-path wildcard lookup cache here
- // which is checked first
-
- // apply wildcard metas
- var bestDepth = 0;
- var wildcardIndex;
- for (var module in meta) {
- wildcardIndex = module.indexOf('*');
- if (wildcardIndex === -1)
- continue;
- if (module.substr(0, wildcardIndex) === name.substr(0, wildcardIndex)
- && module.substr(wildcardIndex + 1) === name.substr(name.length - module.length + wildcardIndex + 1)) {
- var depth = module.split('/').length;
- if (depth > bestDepth)
- bestDepth = depth;
- extendMeta(load.metadata, meta[module], bestDepth != depth);
- }
- }
-
- // apply exact meta
- if (meta[name])
- extendMeta(load.metadata, meta[name]);
-
- return locate.call(this, load);
- };
- });
-
- // detect any meta header syntax
- // only set if not already set
- var metaRegEx = /^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/;
- var metaPartRegEx = /\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;
-
- function setMetaProperty(target, p, value) {
- var pParts = p.split('.');
- var curPart;
- while (pParts.length > 1) {
- curPart = pParts.shift();
- target = target[curPart] = target[curPart] || {};
- }
- curPart = pParts.shift();
- if (!(curPart in target))
- target[curPart] = value;
- }
-
- hook('translate', function(translate) {
- return function(load) {
- // shortpath for bundled
- if (load.metadata.format == 'defined') {
- load.metadata.deps = load.metadata.deps || [];
- return Promise.resolve(load.source);
- }
-
- // NB meta will be post-translate pending transpiler conversion to plugins
- var meta = load.source.match(metaRegEx);
- if (meta) {
- var metaParts = meta[0].match(metaPartRegEx);
-
- for (var i = 0; i < metaParts.length; i++) {
- var curPart = metaParts[i];
- var len = curPart.length;
-
- var firstChar = curPart.substr(0, 1);
- if (curPart.substr(len - 1, 1) == ';')
- len--;
-
- if (firstChar != '"' && firstChar != "'")
- continue;
-
- var metaString = curPart.substr(1, curPart.length - 3);
- var metaName = metaString.substr(0, metaString.indexOf(' '));
-
- if (metaName) {
- var metaValue = metaString.substr(metaName.length + 1, metaString.length - metaName.length - 1);
-
- if (metaName.substr(metaName.length - 2, 2) == '[]') {
- metaName = metaName.substr(0, metaName.length - 2);
- load.metadata[metaName] = load.metadata[metaName] || [];
- load.metadata[metaName].push(metaValue);
- }
- else if (load.metadata[metaName] instanceof Array) {
- // temporary backwards compat for previous "deps" syntax
- warn.call(this, 'Module ' + load.name + ' contains deprecated "deps ' + metaValue + '" meta syntax.\nThis should be updated to "deps[] ' + metaValue + '" for pushing to array meta.');
- load.metadata[metaName].push(metaValue);
- }
- else {
- setMetaProperty(load.metadata, metaName, metaValue);
- }
- }
- else {
- load.metadata[metaString] = true;
- }
- }
- }
-
- return translate.apply(this, arguments);
- };
- });
-})();
-/*
- System bundles
-
- Allows a bundle module to be specified which will be dynamically
- loaded before trying to load a given module.
-
- For example:
- SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
-
- Will result in a load to "mybundle" whenever a load to "jquery"
- or "bootstrap/js/bootstrap" is made.
-
- In this way, the bundle becomes the request that provides the module
-*/
-
-(function() {
- // bundles support (just like RequireJS)
- // bundle name is module name of bundle itself
- // bundle is array of modules defined by the bundle
- // when a module in the bundle is requested, the bundle is loaded instead
- // of the form SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.bundles = {};
- this._loader.loadedBundles = {};
- };
- });
-
- // assign bundle metadata for bundle loads
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- var matched = false;
-
- if (!(load.name in loader.defined))
- for (var b in loader.bundles) {
- for (var i = 0; i < loader.bundles[b].length; i++) {
- var curModule = loader.bundles[b][i];
-
- if (curModule == load.name) {
- matched = true;
- break;
- }
-
- // wildcard in bundles does not include / boundaries
- if (curModule.indexOf('*') != -1) {
- var parts = curModule.split('*');
- if (parts.length != 2) {
- loader.bundles[b].splice(i--, 1);
- continue;
- }
-
- if (load.name.substring(0, parts[0].length) == parts[0] &&
- load.name.substr(load.name.length - parts[1].length, parts[1].length) == parts[1] &&
- load.name.substr(parts[0].length, load.name.length - parts[1].length - parts[0].length).indexOf('/') == -1) {
- matched = true;
- break;
- }
- }
- }
-
- if (matched)
- return loader['import'](b)
- .then(function() {
- return locate.call(loader, load);
- });
- }
-
- return locate.call(loader, load);
- };
- });
-})();
-/*
- * Dependency Tree Cache
- *
- * Allows a build to pre-populate a dependency trace tree on the loader of
- * the expected dependency tree, to be loaded upfront when requesting the
- * module, avoinding the n round trips latency of module loading, where
- * n is the dependency tree depth.
- *
- * eg:
- * SystemJS.depCache = {
- * 'app': ['normalized', 'deps'],
- * 'normalized': ['another'],
- * 'deps': ['tree']
- * };
- *
- * SystemJS.import('app')
- * // simultaneously starts loading all of:
- * // 'normalized', 'deps', 'another', 'tree'
- * // before "app" source is even loaded
- *
- */
-
-(function() {
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.depCache = {};
- }
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- // load direct deps, in turn will pick up their trace trees
- var deps = loader.depCache[load.name];
- if (deps)
- for (var i = 0; i < deps.length; i++)
- loader['import'](deps[i], load.name);
-
- return locate.call(loader, load);
- };
- });
-})();
-
-/*
- * Script-only addition used for production loader
- *
- */
-hookConstructor(function(constructor) {
- return function() {
- constructor.apply(this, arguments);
- __global.define = this.amdDefine;
- };
-});
-
-hook('fetch', function(fetch) {
- return function(load) {
- load.metadata.scriptLoad = true;
- return fetch.call(this, load);
- };
-});System = new SystemJSLoader();
-
-__global.SystemJS = System;
-System.version = '0.19.39 CSP';
- if (typeof module == 'object' && module.exports && typeof exports == 'object')
- module.exports = System;
-
- __global.System = System;
-
-})(typeof self != 'undefined' ? self : global);}
-
-// auto-load Promise polyfill if needed in the browser
-var doPolyfill = typeof Promise === 'undefined';
-
-// document.write
-if (typeof document !== 'undefined') {
- var scripts = document.getElementsByTagName('script');
- $__curScript = scripts[scripts.length - 1];
- if (document.currentScript && ($__curScript.defer || $__curScript.async))
- $__curScript = document.currentScript;
- if (doPolyfill) {
- var curPath = $__curScript.src;
- var basePath = curPath.substr(0, curPath.lastIndexOf('/') + 1);
- window.systemJSBootstrap = bootstrap;
- document.write(
- '<' + 'script type="text/javascript" src="' + basePath + 'system-polyfills.js">' + '<' + '/script>'
- );
- }
- else {
- bootstrap();
- }
-}
-// importScripts
-else if (typeof importScripts !== 'undefined') {
- var basePath = '';
- try {
- throw new Error('_');
- } catch (e) {
- e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/, function(m, url) {
- $__curScript = { src: url };
- basePath = url.replace(/\/[^\/]*$/, '/');
- });
- }
- if (doPolyfill)
- importScripts(basePath + 'system-polyfills.js');
- bootstrap();
-}
-else {
- $__curScript = typeof __filename != 'undefined' ? { src: __filename } : null;
- bootstrap();
-}
-
-
-})(); \ No newline at end of file
diff --git a/thirdparty/systemjs/dist/system-polyfills.js b/thirdparty/systemjs/dist/system-polyfills.js
deleted file mode 100644
index ca76c2418..000000000
--- a/thirdparty/systemjs/dist/system-polyfills.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * SystemJS Promise Polyfill
- */
-!function(t){!function(e){"object"==typeof exports?module.exports=e():"function"==typeof t&&t.amd?t(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var t;return function t(e,n,o){function r(u,c){if(!n[u]){if(!e[u]){var f="function"==typeof require&&require;if(!c&&f)return f(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var s=n[u]={exports:{}};e[u][0].call(s.exports,function(t){var n=e[u][1][t];return r(n?n:t)},s,s.exports,t,e,n,o)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<o.length;u++)r(o[u]);return r}({1:[function(t,e,n){var o=t("../lib/decorators/unhandledRejection"),r=o(t("../lib/Promise"));e.exports="undefined"!=typeof global?global.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,n,o){!function(t){"use strict";t(function(t){var e=t("./makePromise"),n=t("./Scheduler"),o=t("./env").asap;return e({scheduler:new n(o)})})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){this._async=t,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var e=this;this.drain=function(){e._drain()}}return t.prototype.enqueue=function(t){this._queue[this._queueLen++]=t,this.run()},t.prototype.afterQueue=function(t){this._afterQueue[this._afterQueueLen++]=t,this.run()},t.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},t.prototype._drain=function(){for(var t=0;t<this._queueLen;++t)this._queue[t].run(),this._queue[t]=void 0;for(this._queueLen=0,this._running=!1,t=0;t<this._afterQueueLen;++t)this._afterQueue[t].run(),this._afterQueue[t]=void 0;this._afterQueueLen=0},t})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],4:[function(e,n,o){!function(t){"use strict";t(function(t){function e(t){throw t}function n(){}var o=t("../env").setTimer,r=t("../format");return function(t){function i(t){t.handled||(l.push(t),a("Potentially unhandled rejection ["+t.id+"] "+r.formatError(t.value)))}function u(t){var e=l.indexOf(t);e>=0&&(l.splice(e,1),h("Handled previous rejection ["+t.id+"] "+r.formatObject(t.value)))}function c(t,e){p.push(t,e),null===d&&(d=o(f,0))}function f(){for(d=null;p.length>0;)p.shift()(p.shift())}var s,a=n,h=n;"undefined"!=typeof console&&(s=console,a="undefined"!=typeof s.error?function(t){s.error(t)}:function(t){s.log(t)},h="undefined"!=typeof s.info?function(t){s.info(t)}:function(t){s.log(t)}),t.onPotentiallyUnhandledRejection=function(t){c(i,t)},t.onPotentiallyUnhandledRejectionHandled=function(t){c(u,t)},t.onFatalRejection=function(t){c(e,t.value)};var p=[],l=[],d=null;return t}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{"../env":5,"../format":6}],5:[function(e,n,o){!function(t){"use strict";t(function(t){function e(){return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)}function n(){return"function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver}function o(t){function e(){var t=n;n=void 0,t()}var n,o=document.createTextNode(""),r=new t(e);r.observe(o,{characterData:!0});var i=0;return function(t){n=t,o.data=i^=1}}var r,i="undefined"!=typeof setTimeout&&setTimeout,u=function(t,e){return setTimeout(t,e)},c=function(t){return clearTimeout(t)},f=function(t){return i(t,0)};if(e())f=function(t){return process.nextTick(t)};else if(r=n())f=o(r);else if(!i){var s=t,a=s("vertx");u=function(t,e){return a.setTimer(e,t)},c=a.cancelTimer,f=a.runOnLoop||a.runOnContext}return{setTimer:u,clearTimer:c,asap:f}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t(e)})},{}],6:[function(e,n,o){!function(t){"use strict";t(function(){function t(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"}function e(t){var e=String(t);return"[object Object]"===e&&"undefined"!=typeof JSON&&(e=n(t,e)),e}function n(t,e){try{return JSON.stringify(t)}catch(t){return e}}return{formatError:t,formatObject:e,tryStringify:n}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}],7:[function(e,n,o){!function(t){"use strict";t(function(){return function(t){function e(t,e){this._handler=t===_?e:n(t)}function n(t){function e(t){r.resolve(t)}function n(t){r.reject(t)}function o(t){r.notify(t)}var r=new b;try{t(e,n,o)}catch(t){n(t)}return r}function o(t){return k(t)?t:new e(_,new x(v(t)))}function r(t){return new e(_,new x(new P(t)))}function i(){return $}function u(){return new e(_,new b)}function c(t,e){var n=new b(t.receiver,t.join().context);return new e(_,n)}function f(t){return a(B,null,t)}function s(t,e){return a(M,t,e)}function a(t,n,o){function r(e,r,u){u.resolved||h(o,i,e,t(n,r,e),u)}function i(t,e,n){a[t]=e,0===--s&&n.become(new q(a))}for(var u,c="function"==typeof n?r:i,f=new b,s=o.length>>>0,a=new Array(s),p=0;p<o.length&&!f.resolved;++p)u=o[p],void 0!==u||p in o?h(o,c,p,u,f):--s;return 0===s&&f.become(new q(a)),new e(_,f)}function h(t,e,n,o,r){if(U(o)){var i=m(o),u=i.state();0===u?i.fold(e,n,void 0,r):u>0?e(n,i.value,r):(r.become(i),p(t,n+1,i))}else e(n,o,r)}function p(t,e,n){for(var o=e;o<t.length;++o)l(v(t[o]),n)}function l(t,e){if(t!==e){var n=t.state();0===n?t.visit(t,void 0,t._unreport):n<0&&t._unreport()}}function d(t){return"object"!=typeof t||null===t?r(new TypeError("non-iterable passed to race()")):0===t.length?i():1===t.length?o(t[0]):y(t)}function y(t){var n,o,r,i=new b;for(n=0;n<t.length;++n)if(o=t[n],void 0!==o||n in t){if(r=v(o),0!==r.state()){i.become(r),p(t,n+1,r);break}r.visit(i,i.resolve,i.reject)}return new e(_,i)}function v(t){return k(t)?t._handler.join():U(t)?j(t):new q(t)}function m(t){return k(t)?t._handler.join():j(t)}function j(t){try{var e=t.then;return"function"==typeof e?new g(e,t):new q(t)}catch(t){return new P(t)}}function _(){}function w(){}function b(t,n){e.createContext(this,n),this.consumers=void 0,this.receiver=t,this.handler=void 0,this.resolved=!1}function x(t){this.handler=t}function g(t,e){b.call(this),G.enqueue(new E(t,e,this))}function q(t){e.createContext(this),this.value=t}function P(t){e.createContext(this),this.id=++Y,this.value=t,this.handled=!1,this.reported=!1,this._report()}function R(t,e){this.rejection=t,this.context=e}function C(t){this.rejection=t}function O(){return new P(new TypeError("Promise cycle"))}function T(t,e){this.continuation=t,this.handler=e}function Q(t,e){this.handler=e,this.value=t}function E(t,e,n){this._then=t,this.thenable=e,this.resolver=n}function L(t,e,n,o,r){try{t.call(e,n,o,r)}catch(t){o(t)}}function S(t,e,n,o){this.f=t,this.z=e,this.c=n,this.to=o,this.resolver=X,this.receiver=this}function k(t){return t instanceof e}function U(t){return("object"==typeof t||"function"==typeof t)&&null!==t}function H(t,n,o,r){return"function"!=typeof t?r.become(n):(e.enterContext(n),F(t,n.value,o,r),void e.exitContext())}function N(t,n,o,r,i){return"function"!=typeof t?i.become(o):(e.enterContext(o),W(t,n,o.value,r,i),void e.exitContext())}function J(t,n,o,r,i){return"function"!=typeof t?i.notify(n):(e.enterContext(o),z(t,n,r,i),void e.exitContext())}function M(t,e,n){try{return t(e,n)}catch(t){return r(t)}}function F(t,e,n,o){try{o.become(v(t.call(n,e)))}catch(t){o.become(new P(t))}}function W(t,e,n,o,r){try{t.call(o,e,n,r)}catch(t){r.become(new P(t))}}function z(t,e,n,o){try{o.notify(t.call(n,e))}catch(t){o.notify(t)}}function A(t,e){e.prototype=V(t.prototype),e.prototype.constructor=e}function B(t,e){return e}function K(){}function D(){return"undefined"!=typeof process&&null!==process&&"function"==typeof process.emit?function(t,e){return"unhandledRejection"===t?process.emit(t,e.value,e):process.emit(t,e)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(t,e,n){var o=!1;try{var r=new n("unhandledRejection");o=r instanceof n}catch(t){}return o?function(t,o){var r=new n(t,{detail:{reason:o.value,key:o},bubbles:!1,cancelable:!0});return!e.dispatchEvent(r)}:t}(K,self,CustomEvent):K}var G=t.scheduler,I=D(),V=Object.create||function(t){function e(){}return e.prototype=t,new e};e.resolve=o,e.reject=r,e.never=i,e._defer=u,e._handler=v,e.prototype.then=function(t,e,n){var o=this._handler,r=o.join().state();if("function"!=typeof t&&r>0||"function"!=typeof e&&r<0)return new this.constructor(_,o);var i=this._beget(),u=i._handler;return o.chain(u,o.receiver,t,e,n),i},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype._beget=function(){return c(this._handler,this.constructor)},e.all=f,e.race=d,e._traverse=s,e._visitRemaining=p,_.prototype.when=_.prototype.become=_.prototype.notify=_.prototype.fail=_.prototype._unreport=_.prototype._report=K,_.prototype._state=0,_.prototype.state=function(){return this._state},_.prototype.join=function(){for(var t=this;void 0!==t.handler;)t=t.handler;return t},_.prototype.chain=function(t,e,n,o,r){this.when({resolver:t,receiver:e,fulfilled:n,rejected:o,progress:r})},_.prototype.visit=function(t,e,n,o){this.chain(X,t,e,n,o)},_.prototype.fold=function(t,e,n,o){this.when(new S(t,e,n,o))},A(_,w),w.prototype.become=function(t){t.fail()};var X=new w;A(_,b),b.prototype._state=0,b.prototype.resolve=function(t){this.become(v(t))},b.prototype.reject=function(t){this.resolved||this.become(new P(t))},b.prototype.join=function(){if(!this.resolved)return this;for(var t=this;void 0!==t.handler;)if(t=t.handler,t===this)return this.handler=O();return t},b.prototype.run=function(){var t=this.consumers,e=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n<t.length;++n)e.when(t[n])},b.prototype.become=function(t){this.resolved||(this.resolved=!0,this.handler=t,void 0!==this.consumers&&G.enqueue(this),void 0!==this.context&&t._report(this.context))},b.prototype.when=function(t){this.resolved?G.enqueue(new T(t,this.handler)):void 0===this.consumers?this.consumers=[t]:this.consumers.push(t)},b.prototype.notify=function(t){this.resolved||G.enqueue(new Q(t,this))},b.prototype.fail=function(t){var e="undefined"==typeof t?this.context:t;this.resolved&&this.handler.join().fail(e)},b.prototype._report=function(t){this.resolved&&this.handler.join()._report(t)},b.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},A(_,x),x.prototype.when=function(t){G.enqueue(new T(t,this))},x.prototype._report=function(t){this.join()._report(t)},x.prototype._unreport=function(){this.join()._unreport()},A(b,g),A(_,q),q.prototype._state=1,q.prototype.fold=function(t,e,n,o){N(t,e,this,n,o)},q.prototype.when=function(t){H(t.fulfilled,this,t.receiver,t.resolver)};var Y=0;A(_,P),P.prototype._state=-1,P.prototype.fold=function(t,e,n,o){o.become(this)},P.prototype.when=function(t){"function"==typeof t.rejected&&this._unreport(),H(t.rejected,this,t.receiver,t.resolver)},P.prototype._report=function(t){G.afterQueue(new R(this,t))},P.prototype._unreport=function(){this.handled||(this.handled=!0,G.afterQueue(new C(this)))},P.prototype.fail=function(t){this.reported=!0,I("unhandledRejection",this),e.onFatalRejection(this,void 0===t?this.context:t)},R.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,I("unhandledRejection",this.rejection)||e.onPotentiallyUnhandledRejection(this.rejection,this.context))},C.prototype.run=function(){this.rejection.reported&&(I("rejectionHandled",this.rejection)||e.onPotentiallyUnhandledRejectionHandled(this.rejection))},e.createContext=e.enterContext=e.exitContext=e.onPotentiallyUnhandledRejection=e.onPotentiallyUnhandledRejectionHandled=e.onFatalRejection=K;var Z=new _,$=new e(_,Z);return T.prototype.run=function(){this.handler.join().when(this.continuation)},Q.prototype.run=function(){var t=this.handler.consumers;if(void 0!==t)for(var e,n=0;n<t.length;++n)e=t[n],J(e.progress,this.value,this.handler,e.receiver,e.resolver)},E.prototype.run=function(){function t(t){o.resolve(t)}function e(t){o.reject(t)}function n(t){o.notify(t)}var o=this.resolver;L(this._then,this.thenable,t,e,n)},S.prototype.fulfilled=function(t){this.f.call(this.c,this.z,t,this.to)},S.prototype.rejected=function(t){this.to.reject(t)},S.prototype.progress=function(t){this.to.notify(t)},e}})}("function"==typeof t&&t.amd?t:function(t){n.exports=t()})},{}]},{},[1])(1)}),"undefined"!=typeof systemJSBootstrap&&systemJSBootstrap()}();
-//# sourceMappingURL=system-polyfills.js.map
diff --git a/thirdparty/systemjs/dist/system-polyfills.js.map b/thirdparty/systemjs/dist/system-polyfills.js.map
deleted file mode 100644
index a53942fea..000000000
--- a/thirdparty/systemjs/dist/system-polyfills.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["system-polyfills.src.js"],"names":["define","e","exports","module","amd","window","Promise","global","self","t","n","r","s","o","u","a","require","i","Error","f","call","length","1","unhandledRejections","PromiseConstructor","../lib/Promise","../lib/decorators/unhandledRejection","2","makePromise","Scheduler","async","asap","scheduler","factory","./Scheduler","./env","./makePromise","3","this","_async","_running","_queue","_queueLen","_afterQueue","_afterQueueLen","drain","_drain","prototype","enqueue","task","run","afterQueue","4","throwit","noop","setTimer","format","report","handled","reported","push","logError","id","formatError","value","unreport","indexOf","splice","logInfo","formatObject","x","tasks","running","flush","shift","localConsole","console","error","log","info","onPotentiallyUnhandledRejection","rejection","onPotentiallyUnhandledRejectionHandled","onFatalRejection","../env","../format","5","isNode","process","Object","toString","hasMutationObserver","MutationObserver","WebKitMutationObserver","initMutationObserver","scheduled","node","document","createTextNode","observe","characterData","data","MutationObs","capturedSetTimeout","setTimeout","ms","clearTimer","clearTimeout","nextTick","vertxRequire","vertx","cancelTimer","runOnLoop","runOnContext","6","stack","message","String","JSON","tryStringify","defaultValue","stringify","7","environment","resolver","handler","_handler","Handler","init","promiseResolve","resolve","promiseReject","reason","reject","promiseNotify","notify","Pending","isPromise","Async","getHandler","Rejected","never","foreverPendingPromise","defer","begetFrom","parent","child","receiver","join","context","all","promises","traverseWith","snd","traverse","tryCatch2","tryMap","mapAt","resolved","traverseAt","settleAt","results","pending","become","Fulfilled","Array","maybeThenable","h","getHandlerMaybeThenable","state","fold","visitRemaining","start","markAsHandled","visit","_unreport","race","TypeError","runRace","getHandlerUntrusted","untrustedThen","then","Thenable","FailIfRejected","inheritedContext","createContext","consumers","thenable","AssimilateTask","errorId","_report","ReportTask","UnreportTask","cycle","ContinuationTask","continuation","ProgressTask","_then","tryAssimilate","Fold","z","c","to","failIfRejected","runContinuation1","next","enterContext","tryCatchReject","exitContext","runContinuation3","tryCatchReject3","runNotify","tryCatchReturn","b","thisArg","y","inherit","Parent","Child","objectCreate","constructor","initEmitRejection","emit","type","CustomEvent","hasCustomEvent","ev","detail","key","bubbles","cancelable","dispatchEvent","emitRejection","create","proto","_defer","onFulfilled","onRejected","onProgress","p","_beget","chain","_traverse","_visitRemaining","when","fail","_state","fulfilled","rejected","progress","q","cont","foreverPendingHandler","_resolve","_reject","_notify","systemJSBootstrap"],"mappings":";;;CAGA,SAAUA,IAET,SAASC,GAAG,gBAAiBC,SAAQC,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AK9M,KAAK6J,eAY/BC,EAAarJ,UAAUG,IAAM,WAC5B,GAAIwM,GAAIpN,KAAKuF,QAAQ6D,SACrB,IAAS,SAANgE,EAIH,IAAK,GAAIjD,GAAGxL,EAAI,EAAGA,EAAIyO,EAAErO,SAAUJ,EAClCwL,EAAIiD,EAAEzO,GACNkM,EAAUV,EAAEgD,SAAUnN,KAAK0B,MAAO1B,KAAKuF,QAAS4E,EAAEtD,SAAUsD,EAAE7E,WAiBhEgE,EAAe7I,UAAUG,IAAM,WAI9B,QAAS2M,GAASvL,GAAKiG,EAAErC,QAAQ5D,GACjC,QAASwL,GAAQxL,GAAMiG,EAAElC,OAAO/D,GAChC,QAASyL,GAAQzL,GAAMiG,EAAEhC,OAAOjE,GALhC,GAAIiG,GAAIjI,KAAKsF,QACb0E,GAAchK,KAAK+J,MAAO/J,KAAKqJ,SAAUkE,EAAUC,EAASC,IAyB7DxD,EAAKxJ,UAAUwM,UAAY,SAASjL,GACnChC,KAAKnB,EAAEC,KAAKkB,KAAKmK,EAAGnK,KAAKkK,EAAGlI,EAAGhC,KAAKoK,KAGrCH,EAAKxJ,UAAUyM,SAAW,SAASlL,GAClChC,KAAKoK,GAAGrE,OAAO/D,IAGhBiI,EAAKxJ,UAAU0M,SAAW,SAASnL,GAClChC,KAAKoK,GAAGnE,OAAOjE,IAqJThE,MAGW,kBAAXN,IAAyBA,EAAOI,IAAMJ,EAAS,SAASiC,GAAW9B,EAAOD,QAAU+B,gBAElF,IAEV,KAEiC,mBAAtB+N,oBACVA"} \ No newline at end of file
diff --git a/thirdparty/systemjs/dist/system-polyfills.src.js b/thirdparty/systemjs/dist/system-polyfills.src.js
deleted file mode 100644
index 45bf75813..000000000
--- a/thirdparty/systemjs/dist/system-polyfills.src.js
+++ /dev/null
@@ -1,1277 +0,0 @@
-/*
- * SystemJS Promise Polyfill
- */
-(function(define) {
-
-!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-/** @license MIT License (c) copyright 2010-2014 original author or authors */
-/** @author Brian Cavalier */
-/** @author John Hann */
-
-/**
- * ES6 global Promise shim
- */
-var unhandledRejections = require('../lib/decorators/unhandledRejection');
-var PromiseConstructor = unhandledRejections(require('../lib/Promise'));
-
-module.exports = typeof global != 'undefined' ? (global.Promise = PromiseConstructor)
- : typeof self != 'undefined' ? (self.Promise = PromiseConstructor)
- : PromiseConstructor;
-
-},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(require,module,exports){
-/** @license MIT License (c) copyright 2010-2014 original author or authors */
-/** @author Brian Cavalier */
-/** @author John Hann */
-
-(function(define) { 'use strict';
-define(function (require) {
-
- var makePromise = require('./makePromise');
- var Scheduler = require('./Scheduler');
- var async = require('./env').asap;
-
- return makePromise({
- scheduler: new Scheduler(async)
- });
-
-});
-})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });
-
-},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(require,module,exports){
-/** @license MIT License (c) copyright 2010-2014 original author or authors */
-/** @author Brian Cavalier */
-/** @author John Hann */
-
-(function(define) { 'use strict';
-define(function() {
-
- // Credit to Twisol (https://github.com/Twisol) for suggesting
- // this type of extensible queue + trampoline approach for next-tick conflation.
-
- /**
- * Async task scheduler
- * @param {function} async function to schedule a single async function
- * @constructor
- */
- function Scheduler(async) {
- this._async = async;
- this._running = false;
-
- this._queue = this;
- this._queueLen = 0;
- this._afterQueue = {};
- this._afterQueueLen = 0;
-
- var self = this;
- this.drain = function() {
- self._drain();
- };
- }
-
- /**
- * Enqueue a task
- * @param {{ run:function }} task
- */
- Scheduler.prototype.enqueue = function(task) {
- this._queue[this._queueLen++] = task;
- this.run();
- };
-
- /**
- * Enqueue a task to run after the main task queue
- * @param {{ run:function }} task
- */
- Scheduler.prototype.afterQueue = function(task) {
- this._afterQueue[this._afterQueueLen++] = task;
- this.run();
- };
-
- Scheduler.prototype.run = function() {
- if (!this._running) {
- this._running = true;
- this._async(this.drain);
- }
- };
-
- /**
- * Drain the handler queue entirely, and then the after queue
- */
- Scheduler.prototype._drain = function() {
- var i = 0;
- for (; i < this._queueLen; ++i) {
- this._queue[i].run();
- this._queue[i] = void 0;
- }
-
- this._queueLen = 0;
- this._running = false;
-
- for (i = 0; i < this._afterQueueLen; ++i) {
- this._afterQueue[i].run();
- this._afterQueue[i] = void 0;
- }
-
- this._afterQueueLen = 0;
- };
-
- return Scheduler;
-
-});
-}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));
-
-},{}],4:[function(require,module,exports){
-/** @license MIT License (c) copyright 2010-2014 original author or authors */
-/** @author Brian Cavalier */
-/** @author John Hann */
-
-(function(define) { 'use strict';
-define(function(require) {
-
- var setTimer = require('../env').setTimer;
- var format = require('../format');
-
- return function unhandledRejection(Promise) {
-
- var logError = noop;
- var logInfo = noop;
- var localConsole;
-
- if(typeof console !== 'undefined') {
- // Alias console to prevent things like uglify's drop_console option from
- // removing console.log/error. Unhandled rejections fall into the same
- // category as uncaught exceptions, and build tools shouldn't silence them.
- localConsole = console;
- logError = typeof localConsole.error !== 'undefined'
- ? function (e) { localConsole.error(e); }
- : function (e) { localConsole.log(e); };
-
- logInfo = typeof localConsole.info !== 'undefined'
- ? function (e) { localConsole.info(e); }
- : function (e) { localConsole.log(e); };
- }
-
- Promise.onPotentiallyUnhandledRejection = function(rejection) {
- enqueue(report, rejection);
- };
-
- Promise.onPotentiallyUnhandledRejectionHandled = function(rejection) {
- enqueue(unreport, rejection);
- };
-
- Promise.onFatalRejection = function(rejection) {
- enqueue(throwit, rejection.value);
- };
-
- var tasks = [];
- var reported = [];
- var running = null;
-
- function report(r) {
- if(!r.handled) {
- reported.push(r);
- logError('Potentially unhandled rejection [' + r.id + '] ' + format.formatError(r.value));
- }
- }
-
- function unreport(r) {
- var i = reported.indexOf(r);
- if(i >= 0) {
- reported.splice(i, 1);
- logInfo('Handled previous rejection [' + r.id + '] ' + format.formatObject(r.value));
- }
- }
-
- function enqueue(f, x) {
- tasks.push(f, x);
- if(running === null) {
- running = setTimer(flush, 0);
- }
- }
-
- function flush() {
- running = null;
- while(tasks.length > 0) {
- tasks.shift()(tasks.shift());
- }
- }
-
- return Promise;
- };
-
- function throwit(e) {
- throw e;
- }
-
- function noop() {}
-
-});
-}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));
-
-},{"../env":5,"../format":6}],5:[function(require,module,exports){
-/** @license MIT License (c) copyright 2010-2014 original author or authors */
-/** @author Brian Cavalier */
-/** @author John Hann */
-
-/*global process,document,setTimeout,clearTimeout,MutationObserver,WebKitMutationObserver*/
-(function(define) { 'use strict';
-define(function(require) {
- /*jshint maxcomplexity:6*/
-
- // Sniff "best" async scheduling option
- // Prefer process.nextTick or MutationObserver, then check for
- // setTimeout, and finally vertx, since its the only env that doesn't
- // have setTimeout
-
- var MutationObs;
- var capturedSetTimeout = typeof setTimeout !== 'undefined' && setTimeout;
-
- // Default env
- var setTimer = function(f, ms) { return setTimeout(f, ms); };
- var clearTimer = function(t) { return clearTimeout(t); };
- var asap = function (f) { return capturedSetTimeout(f, 0); };
-
- // Detect specific env
- if (isNode()) { // Node
- asap = function (f) { return process.nextTick(f); };
-
- } else if (MutationObs = hasMutationObserver()) { // Modern browser
- asap = initMutationObserver(MutationObs);
-
- } else if (!capturedSetTimeout) { // vert.x
- var vertxRequire = require;
- var vertx = vertxRequire('vertx');
- setTimer = function (f, ms) { return vertx.setTimer(ms, f); };
- clearTimer = vertx.cancelTimer;
- asap = vertx.runOnLoop || vertx.runOnContext;
- }
-
- return {
- setTimer: setTimer,
- clearTimer: clearTimer,
- asap: asap
- };
-
- function isNode () {
- return typeof process !== 'undefined' &&
- Object.prototype.toString.call(process) === '[object process]';
- }
-
- function hasMutationObserver () {
- return (typeof MutationObserver === 'function' && MutationObserver) ||
- (typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);
- }
-
- function initMutationObserver(MutationObserver) {
- var scheduled;
- var node = document.createTextNode('');
- var o = new MutationObserver(run);
- o.observe(node, { characterData: true });
-
- function run() {
- var f = scheduled;
- scheduled = void 0;
- f();
- }
-
- var i = 0;
- return function (f) {
- scheduled = f;
- node.data = (i ^= 1);
- };
- }
-});
-}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(require); }));
-
-},{}],6:[function(require,module,exports){
-/** @license MIT License (c) copyright 2010-2014 original author or authors */
-/** @author Brian Cavalier */
-/** @author John Hann */
-
-(function(define) { 'use strict';
-define(function() {
-
- return {
- formatError: formatError,
- formatObject: formatObject,
- tryStringify: tryStringify
- };
-
- /**
- * Format an error into a string. If e is an Error and has a stack property,
- * it's returned. Otherwise, e is formatted using formatObject, with a
- * warning added about e not being a proper Error.
- * @param {*} e
- * @returns {String} formatted string, suitable for output to developers
- */
- function formatError(e) {
- var s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);
- return e instanceof Error ? s : s + ' (WARNING: non-Error used)';
- }
-
- /**
- * Format an object, detecting "plain" objects and running them through
- * JSON.stringify if possible.
- * @param {Object} o
- * @returns {string}
- */
- function formatObject(o) {
- var s = String(o);
- if(s === '[object Object]' && typeof JSON !== 'undefined') {
- s = tryStringify(o, s);
- }
- return s;
- }
-
- /**
- * Try to return the result of JSON.stringify(x). If that fails, return
- * defaultValue
- * @param {*} x
- * @param {*} defaultValue
- * @returns {String|*} JSON.stringify(x) or defaultValue
- */
- function tryStringify(x, defaultValue) {
- try {
- return JSON.stringify(x);
- } catch(e) {
- return defaultValue;
- }
- }
-
-});
-}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));
-
-},{}],7:[function(require,module,exports){
-/** @license MIT License (c) copyright 2010-2014 original author or authors */
-/** @author Brian Cavalier */
-/** @author John Hann */
-
-(function(define) { 'use strict';
-define(function() {
-
- return function makePromise(environment) {
-
- var tasks = environment.scheduler;
- var emitRejection = initEmitRejection();
-
- var objectCreate = Object.create ||
- function(proto) {
- function Child() {}
- Child.prototype = proto;
- return new Child();
- };
-
- /**
- * Create a promise whose fate is determined by resolver
- * @constructor
- * @returns {Promise} promise
- * @name Promise
- */
- function Promise(resolver, handler) {
- this._handler = resolver === Handler ? handler : init(resolver);
- }
-
- /**
- * Run the supplied resolver
- * @param resolver
- * @returns {Pending}
- */
- function init(resolver) {
- var handler = new Pending();
-
- try {
- resolver(promiseResolve, promiseReject, promiseNotify);
- } catch (e) {
- promiseReject(e);
- }
-
- return handler;
-
- /**
- * Transition from pre-resolution state to post-resolution state, notifying
- * all listeners of the ultimate fulfillment or rejection
- * @param {*} x resolution value
- */
- function promiseResolve (x) {
- handler.resolve(x);
- }
- /**
- * Reject this promise with reason, which will be used verbatim
- * @param {Error|*} reason rejection reason, strongly suggested
- * to be an Error type
- */
- function promiseReject (reason) {
- handler.reject(reason);
- }
-
- /**
- * @deprecated
- * Issue a progress event, notifying all progress listeners
- * @param {*} x progress event payload to pass to all listeners
- */
- function promiseNotify (x) {
- handler.notify(x);
- }
- }
-
- // Creation
-
- Promise.resolve = resolve;
- Promise.reject = reject;
- Promise.never = never;
-
- Promise._defer = defer;
- Promise._handler = getHandler;
-
- /**
- * Returns a trusted promise. If x is already a trusted promise, it is
- * returned, otherwise returns a new trusted Promise which follows x.
- * @param {*} x
- * @return {Promise} promise
- */
- function resolve(x) {
- return isPromise(x) ? x
- : new Promise(Handler, new Async(getHandler(x)));
- }
-
- /**
- * Return a reject promise with x as its reason (x is used verbatim)
- * @param {*} x
- * @returns {Promise} rejected promise
- */
- function reject(x) {
- return new Promise(Handler, new Async(new Rejected(x)));
- }
-
- /**
- * Return a promise that remains pending forever
- * @returns {Promise} forever-pending promise.
- */
- function never() {
- return foreverPendingPromise; // Should be frozen
- }
-
- /**
- * Creates an internal {promise, resolver} pair
- * @private
- * @returns {Promise}
- */
- function defer() {
- return new Promise(Handler, new Pending());
- }
-
- // Transformation and flow control
-
- /**
- * Transform this promise's fulfillment value, returning a new Promise
- * for the transformed result. If the promise cannot be fulfilled, onRejected
- * is called with the reason. onProgress *may* be called with updates toward
- * this promise's fulfillment.
- * @param {function=} onFulfilled fulfillment handler
- * @param {function=} onRejected rejection handler
- * @param {function=} onProgress @deprecated progress handler
- * @return {Promise} new promise
- */
- Promise.prototype.then = function(onFulfilled, onRejected, onProgress) {
- var parent = this._handler;
- var state = parent.join().state();
-
- if ((typeof onFulfilled !== 'function' && state > 0) ||
- (typeof onRejected !== 'function' && state < 0)) {
- // Short circuit: value will not change, simply share handler
- return new this.constructor(Handler, parent);
- }
-
- var p = this._beget();
- var child = p._handler;
-
- parent.chain(child, parent.receiver, onFulfilled, onRejected, onProgress);
-
- return p;
- };
-
- /**
- * If this promise cannot be fulfilled due to an error, call onRejected to
- * handle the error. Shortcut for .then(undefined, onRejected)
- * @param {function?} onRejected
- * @return {Promise}
- */
- Promise.prototype['catch'] = function(onRejected) {
- return this.then(void 0, onRejected);
- };
-
- /**
- * Creates a new, pending promise of the same type as this promise
- * @private
- * @returns {Promise}
- */
- Promise.prototype._beget = function() {
- return begetFrom(this._handler, this.constructor);
- };
-
- function begetFrom(parent, Promise) {
- var child = new Pending(parent.receiver, parent.join().context);
- return new Promise(Handler, child);
- }
-
- // Array combinators
-
- Promise.all = all;
- Promise.race = race;
- Promise._traverse = traverse;
-
- /**
- * Return a promise that will fulfill when all promises in the
- * input array have fulfilled, or will reject when one of the
- * promises rejects.
- * @param {array} promises array of promises
- * @returns {Promise} promise for array of fulfillment values
- */
- function all(promises) {
- return traverseWith(snd, null, promises);
- }
-
- /**
- * Array<Promise<X>> -> Promise<Array<f(X)>>
- * @private
- * @param {function} f function to apply to each promise's value
- * @param {Array} promises array of promises
- * @returns {Promise} promise for transformed values
- */
- function traverse(f, promises) {
- return traverseWith(tryCatch2, f, promises);
- }
-
- function traverseWith(tryMap, f, promises) {
- var handler = typeof f === 'function' ? mapAt : settleAt;
-
- var resolver = new Pending();
- var pending = promises.length >>> 0;
- var results = new Array(pending);
-
- for (var i = 0, x; i < promises.length && !resolver.resolved; ++i) {
- x = promises[i];
-
- if (x === void 0 && !(i in promises)) {
- --pending;
- continue;
- }
-
- traverseAt(promises, handler, i, x, resolver);
- }
-
- if(pending === 0) {
- resolver.become(new Fulfilled(results));
- }
-
- return new Promise(Handler, resolver);
-
- function mapAt(i, x, resolver) {
- if(!resolver.resolved) {
- traverseAt(promises, settleAt, i, tryMap(f, x, i), resolver);
- }
- }
-
- function settleAt(i, x, resolver) {
- results[i] = x;
- if(--pending === 0) {
- resolver.become(new Fulfilled(results));
- }
- }
- }
-
- function traverseAt(promises, handler, i, x, resolver) {
- if (maybeThenable(x)) {
- var h = getHandlerMaybeThenable(x);
- var s = h.state();
-
- if (s === 0) {
- h.fold(handler, i, void 0, resolver);
- } else if (s > 0) {
- handler(i, h.value, resolver);
- } else {
- resolver.become(h);
- visitRemaining(promises, i+1, h);
- }
- } else {
- handler(i, x, resolver);
- }
- }
-
- Promise._visitRemaining = visitRemaining;
- function visitRemaining(promises, start, handler) {
- for(var i=start; i<promises.length; ++i) {
- markAsHandled(getHandler(promises[i]), handler);
- }
- }
-
- function markAsHandled(h, handler) {
- if(h === handler) {
- return;
- }
-
- var s = h.state();
- if(s === 0) {
- h.visit(h, void 0, h._unreport);
- } else if(s < 0) {
- h._unreport();
- }
- }
-
- /**
- * Fulfill-reject competitive race. Return a promise that will settle
- * to the same state as the earliest input promise to settle.
- *
- * WARNING: The ES6 Promise spec requires that race()ing an empty array
- * must return a promise that is pending forever. This implementation
- * returns a singleton forever-pending promise, the same singleton that is
- * returned by Promise.never(), thus can be checked with ===
- *
- * @param {array} promises array of promises to race
- * @returns {Promise} if input is non-empty, a promise that will settle
- * to the same outcome as the earliest input promise to settle. if empty
- * is empty, returns a promise that will never settle.
- */
- function race(promises) {
- if(typeof promises !== 'object' || promises === null) {
- return reject(new TypeError('non-iterable passed to race()'));
- }
-
- // Sigh, race([]) is untestable unless we return *something*
- // that is recognizable without calling .then() on it.
- return promises.length === 0 ? never()
- : promises.length === 1 ? resolve(promises[0])
- : runRace(promises);
- }
-
- function runRace(promises) {
- var resolver = new Pending();
- var i, x, h;
- for(i=0; i<promises.length; ++i) {
- x = promises[i];
- if (x === void 0 && !(i in promises)) {
- continue;
- }
-
- h = getHandler(x);
- if(h.state() !== 0) {
- resolver.become(h);
- visitRemaining(promises, i+1, h);
- break;
- } else {
- h.visit(resolver, resolver.resolve, resolver.reject);
- }
- }
- return new Promise(Handler, resolver);
- }
-
- // Promise internals
- // Below this, everything is @private
-
- /**
- * Get an appropriate handler for x, without checking for cycles
- * @param {*} x
- * @returns {object} handler
- */
- function getHandler(x) {
- if(isPromise(x)) {
- return x._handler.join();
- }
- return maybeThenable(x) ? getHandlerUntrusted(x) : new Fulfilled(x);
- }
-
- /**
- * Get a handler for thenable x.
- * NOTE: You must only call this if maybeThenable(x) == true
- * @param {object|function|Promise} x
- * @returns {object} handler
- */
- function getHandlerMaybeThenable(x) {
- return isPromise(x) ? x._handler.join() : getHandlerUntrusted(x);
- }
-
- /**
- * Get a handler for potentially untrusted thenable x
- * @param {*} x
- * @returns {object} handler
- */
- function getHandlerUntrusted(x) {
- try {
- var untrustedThen = x.then;
- return typeof untrustedThen === 'function'
- ? new Thenable(untrustedThen, x)
- : new Fulfilled(x);
- } catch(e) {
- return new Rejected(e);
- }
- }
-
- /**
- * Handler for a promise that is pending forever
- * @constructor
- */
- function Handler() {}
-
- Handler.prototype.when
- = Handler.prototype.become
- = Handler.prototype.notify // deprecated
- = Handler.prototype.fail
- = Handler.prototype._unreport
- = Handler.prototype._report
- = noop;
-
- Handler.prototype._state = 0;
-
- Handler.prototype.state = function() {
- return this._state;
- };
-
- /**
- * Recursively collapse handler chain to find the handler
- * nearest to the fully resolved value.
- * @returns {object} handler nearest the fully resolved value
- */
- Handler.prototype.join = function() {
- var h = this;
- while(h.handler !== void 0) {
- h = h.handler;
- }
- return h;
- };
-
- Handler.prototype.chain = function(to, receiver, fulfilled, rejected, progress) {
- this.when({
- resolver: to,
- receiver: receiver,
- fulfilled: fulfilled,
- rejected: rejected,
- progress: progress
- });
- };
-
- Handler.prototype.visit = function(receiver, fulfilled, rejected, progress) {
- this.chain(failIfRejected, receiver, fulfilled, rejected, progress);
- };
-
- Handler.prototype.fold = function(f, z, c, to) {
- this.when(new Fold(f, z, c, to));
- };
-
- /**
- * Handler that invokes fail() on any handler it becomes
- * @constructor
- */
- function FailIfRejected() {}
-
- inherit(Handler, FailIfRejected);
-
- FailIfRejected.prototype.become = function(h) {
- h.fail();
- };
-
- var failIfRejected = new FailIfRejected();
-
- /**
- * Handler that manages a queue of consumers waiting on a pending promise
- * @constructor
- */
- function Pending(receiver, inheritedContext) {
- Promise.createContext(this, inheritedContext);
-
- this.consumers = void 0;
- this.receiver = receiver;
- this.handler = void 0;
- this.resolved = false;
- }
-
- inherit(Handler, Pending);
-
- Pending.prototype._state = 0;
-
- Pending.prototype.resolve = function(x) {
- this.become(getHandler(x));
- };
-
- Pending.prototype.reject = function(x) {
- if(this.resolved) {
- return;
- }
-
- this.become(new Rejected(x));
- };
-
- Pending.prototype.join = function() {
- if (!this.resolved) {
- return this;
- }
-
- var h = this;
-
- while (h.handler !== void 0) {
- h = h.handler;
- if (h === this) {
- return this.handler = cycle();
- }
- }
-
- return h;
- };
-
- Pending.prototype.run = function() {
- var q = this.consumers;
- var handler = this.handler;
- this.handler = this.handler.join();
- this.consumers = void 0;
-
- for (var i = 0; i < q.length; ++i) {
- handler.when(q[i]);
- }
- };
-
- Pending.prototype.become = function(handler) {
- if(this.resolved) {
- return;
- }
-
- this.resolved = true;
- this.handler = handler;
- if(this.consumers !== void 0) {
- tasks.enqueue(this);
- }
-
- if(this.context !== void 0) {
- handler._report(this.context);
- }
- };
-
- Pending.prototype.when = function(continuation) {
- if(this.resolved) {
- tasks.enqueue(new ContinuationTask(continuation, this.handler));
- } else {
- if(this.consumers === void 0) {
- this.consumers = [continuation];
- } else {
- this.consumers.push(continuation);
- }
- }
- };
-
- /**
- * @deprecated
- */
- Pending.prototype.notify = function(x) {
- if(!this.resolved) {
- tasks.enqueue(new ProgressTask(x, this));
- }
- };
-
- Pending.prototype.fail = function(context) {
- var c = typeof context === 'undefined' ? this.context : context;
- this.resolved && this.handler.join().fail(c);
- };
-
- Pending.prototype._report = function(context) {
- this.resolved && this.handler.join()._report(context);
- };
-
- Pending.prototype._unreport = function() {
- this.resolved && this.handler.join()._unreport();
- };
-
- /**
- * Wrap another handler and force it into a future stack
- * @param {object} handler
- * @constructor
- */
- function Async(handler) {
- this.handler = handler;
- }
-
- inherit(Handler, Async);
-
- Async.prototype.when = function(continuation) {
- tasks.enqueue(new ContinuationTask(continuation, this));
- };
-
- Async.prototype._report = function(context) {
- this.join()._report(context);
- };
-
- Async.prototype._unreport = function() {
- this.join()._unreport();
- };
-
- /**
- * Handler that wraps an untrusted thenable and assimilates it in a future stack
- * @param {function} then
- * @param {{then: function}} thenable
- * @constructor
- */
- function Thenable(then, thenable) {
- Pending.call(this);
- tasks.enqueue(new AssimilateTask(then, thenable, this));
- }
-
- inherit(Pending, Thenable);
-
- /**
- * Handler for a fulfilled promise
- * @param {*} x fulfillment value
- * @constructor
- */
- function Fulfilled(x) {
- Promise.createContext(this);
- this.value = x;
- }
-
- inherit(Handler, Fulfilled);
-
- Fulfilled.prototype._state = 1;
-
- Fulfilled.prototype.fold = function(f, z, c, to) {
- runContinuation3(f, z, this, c, to);
- };
-
- Fulfilled.prototype.when = function(cont) {
- runContinuation1(cont.fulfilled, this, cont.receiver, cont.resolver);
- };
-
- var errorId = 0;
-
- /**
- * Handler for a rejected promise
- * @param {*} x rejection reason
- * @constructor
- */
- function Rejected(x) {
- Promise.createContext(this);
-
- this.id = ++errorId;
- this.value = x;
- this.handled = false;
- this.reported = false;
-
- this._report();
- }
-
- inherit(Handler, Rejected);
-
- Rejected.prototype._state = -1;
-
- Rejected.prototype.fold = function(f, z, c, to) {
- to.become(this);
- };
-
- Rejected.prototype.when = function(cont) {
- if(typeof cont.rejected === 'function') {
- this._unreport();
- }
- runContinuation1(cont.rejected, this, cont.receiver, cont.resolver);
- };
-
- Rejected.prototype._report = function(context) {
- tasks.afterQueue(new ReportTask(this, context));
- };
-
- Rejected.prototype._unreport = function() {
- if(this.handled) {
- return;
- }
- this.handled = true;
- tasks.afterQueue(new UnreportTask(this));
- };
-
- Rejected.prototype.fail = function(context) {
- this.reported = true;
- emitRejection('unhandledRejection', this);
- Promise.onFatalRejection(this, context === void 0 ? this.context : context);
- };
-
- function ReportTask(rejection, context) {
- this.rejection = rejection;
- this.context = context;
- }
-
- ReportTask.prototype.run = function() {
- if(!this.rejection.handled && !this.rejection.reported) {
- this.rejection.reported = true;
- emitRejection('unhandledRejection', this.rejection) ||
- Promise.onPotentiallyUnhandledRejection(this.rejection, this.context);
- }
- };
-
- function UnreportTask(rejection) {
- this.rejection = rejection;
- }
-
- UnreportTask.prototype.run = function() {
- if(this.rejection.reported) {
- emitRejection('rejectionHandled', this.rejection) ||
- Promise.onPotentiallyUnhandledRejectionHandled(this.rejection);
- }
- };
-
- // Unhandled rejection hooks
- // By default, everything is a noop
-
- Promise.createContext
- = Promise.enterContext
- = Promise.exitContext
- = Promise.onPotentiallyUnhandledRejection
- = Promise.onPotentiallyUnhandledRejectionHandled
- = Promise.onFatalRejection
- = noop;
-
- // Errors and singletons
-
- var foreverPendingHandler = new Handler();
- var foreverPendingPromise = new Promise(Handler, foreverPendingHandler);
-
- function cycle() {
- return new Rejected(new TypeError('Promise cycle'));
- }
-
- // Task runners
-
- /**
- * Run a single consumer
- * @constructor
- */
- function ContinuationTask(continuation, handler) {
- this.continuation = continuation;
- this.handler = handler;
- }
-
- ContinuationTask.prototype.run = function() {
- this.handler.join().when(this.continuation);
- };
-
- /**
- * Run a queue of progress handlers
- * @constructor
- */
- function ProgressTask(value, handler) {
- this.handler = handler;
- this.value = value;
- }
-
- ProgressTask.prototype.run = function() {
- var q = this.handler.consumers;
- if(q === void 0) {
- return;
- }
-
- for (var c, i = 0; i < q.length; ++i) {
- c = q[i];
- runNotify(c.progress, this.value, this.handler, c.receiver, c.resolver);
- }
- };
-
- /**
- * Assimilate a thenable, sending it's value to resolver
- * @param {function} then
- * @param {object|function} thenable
- * @param {object} resolver
- * @constructor
- */
- function AssimilateTask(then, thenable, resolver) {
- this._then = then;
- this.thenable = thenable;
- this.resolver = resolver;
- }
-
- AssimilateTask.prototype.run = function() {
- var h = this.resolver;
- tryAssimilate(this._then, this.thenable, _resolve, _reject, _notify);
-
- function _resolve(x) { h.resolve(x); }
- function _reject(x) { h.reject(x); }
- function _notify(x) { h.notify(x); }
- };
-
- function tryAssimilate(then, thenable, resolve, reject, notify) {
- try {
- then.call(thenable, resolve, reject, notify);
- } catch (e) {
- reject(e);
- }
- }
-
- /**
- * Fold a handler value with z
- * @constructor
- */
- function Fold(f, z, c, to) {
- this.f = f; this.z = z; this.c = c; this.to = to;
- this.resolver = failIfRejected;
- this.receiver = this;
- }
-
- Fold.prototype.fulfilled = function(x) {
- this.f.call(this.c, this.z, x, this.to);
- };
-
- Fold.prototype.rejected = function(x) {
- this.to.reject(x);
- };
-
- Fold.prototype.progress = function(x) {
- this.to.notify(x);
- };
-
- // Other helpers
-
- /**
- * @param {*} x
- * @returns {boolean} true iff x is a trusted Promise
- */
- function isPromise(x) {
- return x instanceof Promise;
- }
-
- /**
- * Test just enough to rule out primitives, in order to take faster
- * paths in some code
- * @param {*} x
- * @returns {boolean} false iff x is guaranteed *not* to be a thenable
- */
- function maybeThenable(x) {
- return (typeof x === 'object' || typeof x === 'function') && x !== null;
- }
-
- function runContinuation1(f, h, receiver, next) {
- if(typeof f !== 'function') {
- return next.become(h);
- }
-
- Promise.enterContext(h);
- tryCatchReject(f, h.value, receiver, next);
- Promise.exitContext();
- }
-
- function runContinuation3(f, x, h, receiver, next) {
- if(typeof f !== 'function') {
- return next.become(h);
- }
-
- Promise.enterContext(h);
- tryCatchReject3(f, x, h.value, receiver, next);
- Promise.exitContext();
- }
-
- /**
- * @deprecated
- */
- function runNotify(f, x, h, receiver, next) {
- if(typeof f !== 'function') {
- return next.notify(x);
- }
-
- Promise.enterContext(h);
- tryCatchReturn(f, x, receiver, next);
- Promise.exitContext();
- }
-
- function tryCatch2(f, a, b) {
- try {
- return f(a, b);
- } catch(e) {
- return reject(e);
- }
- }
-
- /**
- * Return f.call(thisArg, x), or if it throws return a rejected promise for
- * the thrown exception
- */
- function tryCatchReject(f, x, thisArg, next) {
- try {
- next.become(getHandler(f.call(thisArg, x)));
- } catch(e) {
- next.become(new Rejected(e));
- }
- }
-
- /**
- * Same as above, but includes the extra argument parameter.
- */
- function tryCatchReject3(f, x, y, thisArg, next) {
- try {
- f.call(thisArg, x, y, next);
- } catch(e) {
- next.become(new Rejected(e));
- }
- }
-
- /**
- * @deprecated
- * Return f.call(thisArg, x), or if it throws, *return* the exception
- */
- function tryCatchReturn(f, x, thisArg, next) {
- try {
- next.notify(f.call(thisArg, x));
- } catch(e) {
- next.notify(e);
- }
- }
-
- function inherit(Parent, Child) {
- Child.prototype = objectCreate(Parent.prototype);
- Child.prototype.constructor = Child;
- }
-
- function snd(x, y) {
- return y;
- }
-
- function noop() {}
-
- function initEmitRejection() {
- /*global process, self, CustomEvent*/
- if(typeof process !== 'undefined' && process !== null
- && typeof process.emit === 'function') {
- // Returning falsy here means to call the default
- // onPotentiallyUnhandledRejection API. This is safe even in
- // browserify since process.emit always returns falsy in browserify:
- // https://github.com/defunctzombie/node-process/blob/master/browser.js#L40-L46
- return function(type, rejection) {
- return type === 'unhandledRejection'
- ? process.emit(type, rejection.value, rejection)
- : process.emit(type, rejection);
- };
- } else if(typeof self !== 'undefined' && typeof CustomEvent === 'function') {
- return (function(noop, self, CustomEvent) {
- var hasCustomEvent = false;
- try {
- var ev = new CustomEvent('unhandledRejection');
- hasCustomEvent = ev instanceof CustomEvent;
- } catch (e) {}
-
- return !hasCustomEvent ? noop : function(type, rejection) {
- var ev = new CustomEvent(type, {
- detail: {
- reason: rejection.value,
- key: rejection
- },
- bubbles: false,
- cancelable: true
- });
-
- return !self.dispatchEvent(ev);
- };
- }(noop, self, CustomEvent));
- }
-
- return noop;
- }
-
- return Promise;
- };
-});
-}(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));
-
-},{}]},{},[1])
-//# sourceMappingURL=Promise.js.map
-(1)
-});
-;if (typeof systemJSBootstrap !== 'undefined')
- systemJSBootstrap();})();
diff --git a/thirdparty/systemjs/dist/system-register-only.js b/thirdparty/systemjs/dist/system-register-only.js
deleted file mode 100644
index a29a90333..000000000
--- a/thirdparty/systemjs/dist/system-register-only.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * SystemJS v0.19.39
- */
-!function(e){function t(e,n){if("string"!=typeof e)throw new TypeError("URL must be a string");var r=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!r)throw new RangeError("Invalid URL format");var a=r[1]||"",o=r[2]||"",i=r[3]||"",s=r[4]||"",d=r[5]||"",l=r[6]||"",u=r[7]||"",c=r[8]||"",f=r[9]||"";if(void 0!==n){var m=n instanceof t?n:new t(n),p=!a&&!s&&!o;!p||u||c||(c=m.search),p&&"/"!==u[0]&&(u=u?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+u:m.pathname);var h=[];u.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),u=h.join("").replace(/^\//,"/"===u[0]?"/":""),p&&(l=m.port,d=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}u=u.replace(/\\/g,"/"),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+u+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=d,this.port=l,this.pathname=u,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var n=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),r=[],a=0;a<n.length;a++)"undefined"!=typeof $__curScript&&n[a].indexOf($__curScript.src)!=-1||r.push(n[a]);var o="(SystemJS) "+(r?r.join("\n\t"):e.message.substr(11))+"\n\t"+t;y||(o=o.replace(b?/file:\/\/\//g:/file:\/\//g,""));var i=E?new Error(o,e.fileName,e.lineNumber):new Error(o);return i.stack=o,i.originalErr=e.originalErr||e,i}function n(){}function r(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},w(this,"global",{get:function(){return e}})}function a(){r.call(this),this.paths={},this._loader.paths={},k.call(this)}function o(){}function i(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function s(e){k=e(k||function(){})}function d(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function l(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||S)+e.substr(2)}else if("/"!=e[0]&&e.indexOf(":")==-1)return(t&&t.substr(0,t.lastIndexOf("/")+1)||S)+e;return new P(e,t&&t.replace(/#/g,"%05")||I).href.replace(/%05/g,"#")}function u(e,t){var n,r="",a=0,o=e.paths,i=e._loader.paths;for(var s in o)if(!o.hasOwnProperty||o.hasOwnProperty(s)){var u=o[s];if(u!==i[s]&&(u=o[s]=i[s]=l(o[s],d(o[s])?S:e.baseURL)),s.indexOf("*")===-1){if(t==s)return o[s];if(t.substr(0,s.length-1)==s.substr(0,s.length-1)&&(t.length<s.length||t[s.length-1]==s[s.length-1])&&("/"==o[s][o[s].length-1]||""==o[s]))return o[s].substr(0,o[s].length-1)+(t.length>s.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var c=s.split("*");if(c.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=c[0].length;f>=a&&t.substr(0,c[0].length)==c[0]&&t.substr(t.length-c[1].length)==c[1]&&(a=f,r=s,n=t.substr(c[0].length,t.length-c[1].length-c[0].length))}}var m=o[r];return"string"==typeof n&&(m=m.replace("*",n)),m}function c(e){for(var t=[],n=[],r=0,a=e.length;r<a;r++){var o=x.call(t,e[r]);o===-1?(t.push(e[r]),n.push([r])):n[o].push(r)}return{names:t,indices:n}}function f(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(R)for(var r in t)"default"!==r&&m(n,t,r);else p(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function m(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function p(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)r&&!t.hasOwnProperty(a)||n&&a in e||(e[a]=t[a]);return e}function h(e){var t=e.match(z);return t&&"System.register"==e.substr(t[0].length,15)}function g(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}var v="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,y="undefined"!=typeof window&&"undefined"!=typeof document,b="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var w,x=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(w=Object.defineProperty)}catch(e){w=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}();var S,E="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if(S=document.baseURI,!S){var O=document.getElementsByTagName("base");S=O[0]&&O[0].href||window.location.href}}else"undefined"!=typeof location&&(S=e.location.href);if(S)S=S.split("#")[0].split("?")[0],S=S.substr(0,S.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");S="file://"+(b?"/":"")+process.cwd()+"/",b&&(S=S.replace(/\\/g,"/"))}try{var _="test:"==new e.URL("test:///").protocol}catch(e){}var P=_?e.URL:e.URLPolyfill;w(n.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++b+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,n){return new Promise(l({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function o(t,n,r,a){return new Promise(function(e,o){e(t.loaderObj.normalize(n,r,a))}).then(function(n){var r;if(t.modules[n])return r=e(n),r.status="linked",r.module=t.modules[n],r;for(var a=0,o=t.loads.length;a<o;a++)if(r=t.loads[a],r.name==n)return r;return r=e(n),t.loads.push(r),i(t,r),r})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,n){d(e,t,n.then(function(n){if("loading"==t.status)return t.address=n,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:n})}))}function d(e,t,n){n.then(function(n){if("loading"==t.status)return t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:n})).then(function(n){return t.source=n,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:n})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var n=t.depsList,r=[],a=0,i=n.length;a<i;a++)(function(n,a){r.push(o(e,n,t.name,t.address).then(function(e){if(t.dependencies[a]={key:n,value:e.name},"linked"!=e.status)for(var r=t.linkSets.concat([]),o=0,i=r.length;o<i;o++)c(r[o],e)}))})(n[a],a);return Promise.all(r)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),n=0,r=e.length;n<r;n++)m(e[n],t)})}).catch(function(e){t.status="failed",t.exception=e;for(var n=t.linkSets.concat([]),r=0,a=n.length;r<a;r++)p(n[r],t,e)})}function l(t){return function(n,r){var a=t.loader,o=t.moduleName,l=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;f<m;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=l||c.source||(c.address=t.moduleAddress,d(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){n(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=u(a,p);a.loads.push(p),n(h.done),"locate"==l?i(a,p):"fetch"==l?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,d(a,p,Promise.resolve(t.moduleSource)))}}function u(e,t){var n={loader:e,loads:[],startingLoad:t,loadingCount:0};return n.done=new Promise(function(e,t){n.resolve=e,n.reject=t}),c(n,t),n}function c(e,t){if("failed"!=t.status){for(var n=0,r=e.loads.length;n<r;n++)if(e.loads[n]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,n=0,r=t.dependencies.length;n<r;n++)if(t.dependencies[n]){var o=t.dependencies[n].value;if(!a.modules[o])for(var i=0,s=a.loads.length;i<s;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{y(e,function(n,r){p(e,n,r),t=!0})}catch(n){p(e,null,n),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var n=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var r=[].concat(e.loads),a=0,o=r.length;a<o;a++){var t=r[a];t.module={name:t.name,module:S({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(n)}var i=f(e);i||e.resolve(n)}}function p(e,n,r){var a=e.loader;e:if(n)if(e.loads[0].name==n.name)r=t(r,"Error loading "+n.name);else{for(var o=0;o<e.loads.length;o++)for(var i=e.loads[o],s=0;s<i.dependencies.length;s++){var d=i.dependencies[s];if(d.value==n.name){r=t(r,"Error loading "+n.name+' as "'+d.key+'" from '+i.name);break e}}r=t(r,"Error loading "+n.name+" from "+e.loads[0].name)}else r=t(r,"Error linking "+e.loads[0].name);for(var l=e.loads.concat([]),o=0,u=l.length;o<u;o++){var n=l[o];a.loaderObj.failed=a.loaderObj.failed||[],x.call(a.loaderObj.failed,n)==-1&&a.loaderObj.failed.push(n);var c=x.call(n.linkSets,e);if(n.linkSets.splice(c,1),0==n.linkSets.length){var f=x.call(e.loader.loads,n);f!=-1&&e.loader.loads.splice(f,1)}}e.reject(r)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var n={};t.dependencies.forEach(function(e){n[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:n,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var r=x.call(e.loads,t);r!=-1&&e.loads.splice(r,1);for(var a=0,o=t.linkSets.length;a<o;a++)r=x.call(t.linkSets[a].loads,t),r!=-1&&t.linkSets[a].loads.splice(r,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,r){try{var a=t.execute()}catch(e){return void r(t,e)}return a&&a instanceof n?a:void r(t,new TypeError("Execution must define a Module instance"))}function v(e,t,n){var r=e._loader.importPromises;return r[t]=n.then(function(e){return r[t]=void 0,e},function(e){throw r[t]=void 0,e})}function y(e,t){var n=e.loader;if(e.loads.length)for(var r=e.loads.concat([]),a=0;a<r.length;a++){var o=r[a],i=g(e,o,t);if(!i)return;o.module={name:o.name,module:i},o.status="linked",h(n,o)}}var b=0;r.prototype={constructor:r,define:function(e,t,n){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(l({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:n&&n.metadata||{},moduleSource:t,moduleAddress:n&&n.address})))},delete:function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],!!t.modules[e]&&delete t.modules[e]},get:function(e){if(this._loader.modules[e])return this._loader.modules[e].module},has:function(e){return!!this._loader.modules[e]},import:function(e,t,n){"object"==typeof t&&(t=t.name);var r=this;return Promise.resolve(r.normalize(e,t)).then(function(e){var t=r._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(r,e,a(t,e,{}).then(function(n){return delete t.importPromises[e],n.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():t.importPromises[e]||v(this,e,new Promise(l({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(){delete t.importPromises[e]}))},module:function(t,n){var r=e();r.address=n&&n.address;var a=u(this._loader,r),o=Promise.resolve(t),i=this._loader,s=a.done.then(function(){return r.module.module});return d(i,r,o),s},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new n,r=[];if(Object.getOwnPropertyNames&&null!=e)r=Object.getOwnPropertyNames(e);else for(var a in e)r.push(a);for(var o=0;o<r.length;o++)(function(n){w(t,n,{configurable:!1,enumerable:!0,get:function(){return e[n]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(r[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof n))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,n){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var S=r.prototype.newModule}();var j;o.prototype=r.prototype,a.prototype=new o,a.prototype.constructor=a;var k,M=/^[^\/]+:\/\//,I=new P(S),R=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(e){R=!1}var M=/^([^\/]+:\/\/|\/)/;a.prototype.normalize=function(e,t,n){return e=e.match(M)||"."==e[0]?new P(e,t||S).href:new P(u(this,e)||e,S).href},function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;e<u.length;e++)if("interactive"==u[e].script.readyState)return s=u[e],s.load}function n(e,t){return new Promise(function(e,n){t.metadata.integrity&&n(new Error("Subresource integrity checking is not supported in web workers.")),d=t;try{importScripts(t.address)}catch(e){d=null,n(e)}d=null,t.metadata.entry||n(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var r=document.getElementsByTagName("head")[0];var a,o,s,d=null,l=r&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),u=[],c=0,f=[];i("pushRegister_",function(e){return function(n){return!e.call(this,n)&&(d?this.reduceRegister_(d,n):l?this.reduceRegister_(t(),n):c?f.push(n):this.reduceRegister_(null,n),!0)}}),i("fetch",function(t){return function(i){var d=this;return"json"!=i.metadata.format&&i.metadata.scriptLoad&&(y||v)?v?n(d,i):new Promise(function(t,n){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,i.metadata.entry||f.length){if(!l){for(var r=0;r<f.length;r++)d.reduceRegister_(i,f[r]);f=[]}}else d.reduceRegister_(i);h(),i.metadata.entry||i.metadata.bundle||n(new Error(i.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("")}}function p(e){h(),n(new Error("Unable to load script "+i.address))}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<u.length;t++)u[t].script==g&&(s&&s.script==g&&(s=null),u.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);r.removeChild(g)}var g=document.createElement("script");g.async=!0,i.metadata.crossOrigin&&(g.crossOrigin=i.metadata.crossOrigin),i.metadata.integrity&&g.setAttribute("integrity",i.metadata.integrity),l?(g.attachEvent("onreadystatechange",m),u.push({script:g,load:i})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=i.address,r.appendChild(g)}):t.call(this,i)}})}();var z=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,n,r){if(r[e.groupIndex]=r[e.groupIndex]||[],x.call(r[e.groupIndex],e)==-1){r[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;a<o;a++){var i=e.normalizedDeps[a],s=n.defined[i];if(s&&!s.evaluated){var d=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex<d){if(null!==s.groupIndex&&(r[s.groupIndex].splice(x.call(r[s.groupIndex],s),1),0==r[s.groupIndex].length))throw new Error("Mixed dependency cycle detected");s.groupIndex=d}t(s,n,r)}}}}function r(e,n,r){if(!n.module){n.groupIndex=0;var a=[];t(n,r,a);for(var o=!!n.declarative==a.length%2,i=a.length-1;i>=0;i--){for(var s=a[i],d=0;d<s.length;d++){var u=s[d];o?l(u,r):m(u,r)}o=!o}}}function o(){}function d(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function l(t,n){if(!t.module){var r=n._loader.moduleRecords,a=t.module=d(t.name,r),o=t.module.exports,i=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var n in e)o[n]=e[n];else o[e]=t;for(var r=0,i=a.importers.length;r<i;r++){var s=a.importers[r];if(!s.locked){var d=x.call(s.dependencies,a),l=s.setters[d];l&&l(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof i&&(i={setters:[],execute:i}),i=i||{setters:[],execute:function(){}},a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,u=t.normalizedDeps.length;s<u;s++){var c,f=t.normalizedDeps[s],m=n.defined[f],p=r[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(l(m,n),p=m.module,c=p.exports):c=n.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;g<v;++g){var y=h[g];a.setters[y]&&a.setters[y](c)}}}}function u(e,t){var n,r=t.defined[e];if(r)r.declarative?p(e,r,[],t):r.evaluated||m(r,t),n=r.module.exports;else if(n=t.get(e),!n)throw new Error("Unable to load dependency "+e+".");return(!r||r.declarative)&&n&&n.__useDefault?n.default:n}function m(t,r){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;i<s;i++){var d=t.normalizedDeps[i],l=r.defined[d];l&&m(l,r)}t.evaluated=!0;var c=t.execute.call(e,function(e){for(var n=0,a=t.deps.length;n<a;n++)if(t.deps[n]==e)return u(t.normalizedDeps[n],r);var o=r.normalizeSync(e,t.name);if(x.call(t.normalizedDeps,o)!=-1)return u(o,r);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==c&&(o.exports=c),a=o.exports,a&&(a.__esModule||a instanceof n)?t.esModule=r.newModule(a):t.esmExports&&a!==e?t.esModule=r.newModule(f(a)):t.esModule=r.newModule({default:a,__useDefault:!0})}}function p(t,n,r,a){if(n&&!n.evaluated&&n.declarative){r.push(t);for(var o=0,i=n.normalizedDeps.length;o<i;o++){var s=n.normalizedDeps[o];x.call(r,s)==-1&&(a.defined[s]?p(s,a.defined[s],r,a):a.get(s))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}a.prototype.register=function(e,t,n){if("string"!=typeof e&&(n=t,t=e,e=null),"boolean"==typeof n)return this.registerDynamic.apply(this,arguments);var r=g();r.name=e&&(this.decanonicalize||this.normalize).call(this,e),r.declarative=!0,r.deps=t,r.declare=n,this.pushRegister_({amd:!1,entry:r})},a.prototype.registerDynamic=function(e,t,n,r){"string"!=typeof e&&(r=n,n=t,t=e,e=null);var a=g();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=r,a.executingRequire=n,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var n=t.entry,r=e&&e.metadata;if(n.name&&(n.name in this.defined||(this.defined[n.name]=n),r&&(r.bundle=!0)),!n.name||e&&!r.entry&&n.name==e.name){if(!r)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(r.entry)throw"register"==r.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+r.format+" module format, but called System.register.");r.format||(r.format="register"),r.entry=n}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),w(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||!t.metadata.format&&h(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var n=this,a=n.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],r(t,a,n),p(t,a,[],n),a.esModule||(a.esModule=n.newModule(a.module.exports)),n.trace||(n.defined[t]=void 0),n.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var n,a=this;if(a.defined[t.name])n=a.defined[t.name],n.declarative||(n.deps=n.deps.concat(t.metadata.deps)),n.deps=n.deps.concat(t.metadata.deps);else if(t.metadata.entry)n=t.metadata.entry,n.deps=n.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof __exec&&__exec.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");n=t.metadata.entry,n&&t.metadata.deps&&(n.deps=n.deps.concat(t.metadata.deps))}n||(n=g(),n.deps=t.metadata.deps,n.execute=function(){}),a.defined[t.name]=n;var o=c(n.deps);n.deps=o.names,n.originalIndices=o.indices,n.name=t.name,n.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,d=n.deps.length;s<d;s++)i.push(Promise.resolve(a.normalize(n.deps[s],t.name)));return Promise.all(i).then(function(e){return n.normalizedDeps=e,{deps:n.deps,execute:function(){return r(t.name,n,a),p(t.name,n,[],a),n.esModule||(n.esModule=a.newModule(n.module.exports)),a.trace||(a.defined[t.name]=void 0),n.esModule}}})}})}(),function(){s(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),i("locate",function(e){return function(t){var n=this,r=!1;if(!(t.name in n.defined))for(var a in n.bundles){for(var o=0;o<n.bundles[a].length;o++){var i=n.bundles[a][o];if(i==t.name){r=!0;break}if(i.indexOf("*")!=-1){var s=i.split("*");if(2!=s.length){n.bundles[a].splice(o--,1);continue}if(t.name.substring(0,s[0].length)==s[0]&&t.name.substr(t.name.length-s[1].length,s[1].length)==s[1]&&t.name.substr(s[0].length,t.name.length-s[1].length-s[0].length).indexOf("/")==-1){r=!0;break}}}if(r)return n.import(a).then(function(){return e.call(n,t)})}return e.call(n,t)}})}(),s(function(t){return function(){t.apply(this,arguments),e.define=this.amdDefine}}),i("fetch",function(e){return function(t){return t.metadata.scriptLoad=!0,e.call(this,t)}}),j=new a,e.SystemJS=j,j.version="0.19.39 Register Only","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=j),e.System=j}("undefined"!=typeof self?self:global);
-//# sourceMappingURL=system-register-only.js.map
diff --git a/thirdparty/systemjs/dist/system-register-only.js.map b/thirdparty/systemjs/dist/system-register-only.js.map
deleted file mode 100644
index c3f8fbee0..000000000
--- a/thirdparty/systemjs/dist/system-register-only.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["system-register-only.src.js"],"names":["global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isRel","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","createEntry","originalIndices","declare","execute","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","isWorker","window","importScripts","document","process","platform","console","assert","Array","item","thisLen","e","obj","prop","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","metadata","loadModule","Promise","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","resolve","reject","normalize","then","load","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","concat","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","map","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","has","import","parentName","parentAddress","sourcePromise","newModule","pNames","getOwnPropertyNames","configurable","enumerable","set","freeze","referrerName","referrerAddress","System","absURLRegEx","getInteractiveScriptLoad","interactiveScript","script","readyState","interactiveLoadingScripts","webWorkerImport","integrity","workerLoad","entry","head","curSystem","curRequire","ieEvents","s","createElement","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","register","reduceRegister_","format","scriptLoad","complete","evt","cleanup","bundle","require","detachEvent","removeEventListener","removeChild","async","crossOrigin","setAttribute","addEventListener","appendChild","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","__useDefault","nameNormalized","normalizeSync","__esModule","default","seen","registerDynamic","apply","arguments","decanonicalize","pushRegister_","amd","curMeta","del","doLoad","normalized","builder","__exec","grouped","normalizePromises","bundles","loadedBundles","matched","curModule","parts","substring","amdDefine","SystemJS","version"],"mappings":";;;CAIA,SAAUA,GACV,QAASC,GAAYC,EAAKC,GACxB,GAAkB,gBAAPD,GACT,KAAM,IAAIE,WAAU,uBACtB,IAAIC,GAAIC,OAAOJ,GAAKK,QAAQ,aAAc,IAAIC,MAAM,mHACpD,KAAKH,EACH,KAAM,IAAII,YAAW,qBACvB,IAAIC,GA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AGD,EAAM,GAAG9R,SAAW8R,EAAM,IACjD5J,EAAKpG,KAAKzB,OAAO6H,EAAKpG,KAAK9B,OAAS8R,EAAM,GAAG9R,OAAQ8R,EAAM,GAAG9R,SAAW8R,EAAM,IAC/E5J,EAAKpG,KAAKzB,OAAOyR,EAAM,GAAG9R,OAAQkI,EAAKpG,KAAK9B,OAAS8R,EAAM,GAAG9R,OAAS8R,EAAM,GAAG9R,QAAQE,QAAQ,OAAQ,EAAI,CAC9G0R,GAAU,CACV,SAKN,GAAIA,EACF,MAAOpP,GAAe,OAAE8B,GACvB2D,KAAK,WACJ,MAAOI,GAAO5G,KAAKe,EAAQ0F,KAInC,MAAOG,GAAO5G,KAAKe,EAAQ0F,SAQjClG,EAAgB,SAASoJ,GACvB,MAAO,YACLA,EAAYyF,MAAM5R,KAAM6R,WACxBzR,EAASgM,OAASpM,KAAK+S,aAI3BnQ,EAAK,QAAS,SAAS0G,GACrB,MAAO,UAASL,GAEd,MADAA,GAAKlB,SAAS+G,YAAa,EACpBxF,EAAM9G,KAAKxC,KAAMiJ,MAEzBmE,EAAS,GAAI7K,GAEhBnC,EAAS4S,SAAW5F,EACpBA,EAAO6F,QAAU,wBACM,gBAAV7M,SAAsBA,OAAO5B,SAA6B,gBAAXA,WACxD4B,OAAO5B,QAAU4I,GAEnBhN,EAASgN,OAASA,GAEF,mBAARjN,MAAsBA,KAAOhC"} \ No newline at end of file
diff --git a/thirdparty/systemjs/dist/system-register-only.src.js b/thirdparty/systemjs/dist/system-register-only.src.js
deleted file mode 100644
index 7ff22628f..000000000
--- a/thirdparty/systemjs/dist/system-register-only.src.js
+++ /dev/null
@@ -1,2198 +0,0 @@
-/*
- * SystemJS v0.19.39
- */
-// from https://gist.github.com/Yaffle/1088850
-(function(global) {
-function URLPolyfill(url, baseURL) {
- if (typeof url != 'string')
- throw new TypeError('URL must be a string');
- var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
- if (!m)
- throw new RangeError('Invalid URL format');
- var protocol = m[1] || "";
- var username = m[2] || "";
- var password = m[3] || "";
- var host = m[4] || "";
- var hostname = m[5] || "";
- var port = m[6] || "";
- var pathname = m[7] || "";
- var search = m[8] || "";
- var hash = m[9] || "";
- if (baseURL !== undefined) {
- var base = baseURL instanceof URLPolyfill ? baseURL : new URLPolyfill(baseURL);
- var flag = !protocol && !host && !username;
- if (flag && !pathname && !search)
- search = base.search;
- if (flag && pathname[0] !== "/")
- pathname = (pathname ? (((base.host || base.username) && !base.pathname ? "/" : "") + base.pathname.slice(0, base.pathname.lastIndexOf("/") + 1) + pathname) : base.pathname);
- // dot segments removal
- var output = [];
- pathname.replace(/^(\.\.?(\/|$))+/, "")
- .replace(/\/(\.(\/|$))+/g, "/")
- .replace(/\/\.\.$/, "/../")
- .replace(/\/?[^\/]*/g, function (p) {
- if (p === "/..")
- output.pop();
- else
- output.push(p);
- });
- pathname = output.join("").replace(/^\//, pathname[0] === "/" ? "/" : "");
- if (flag) {
- port = base.port;
- hostname = base.hostname;
- host = base.host;
- password = base.password;
- username = base.username;
- }
- if (!protocol)
- protocol = base.protocol;
- }
-
- // convert URLs to use / always
- pathname = pathname.replace(/\\/g, '/');
-
- this.origin = host ? protocol + (protocol !== "" || host !== "" ? "//" : "") + host : "";
- this.href = protocol + (protocol && host || protocol == "file:" ? "//" : "") + (username !== "" ? username + (password !== "" ? ":" + password : "") + "@" : "") + host + pathname + search + hash;
- this.protocol = protocol;
- this.username = username;
- this.password = password;
- this.host = host;
- this.hostname = hostname;
- this.port = port;
- this.pathname = pathname;
- this.search = search;
- this.hash = hash;
-}
-global.URLPolyfill = URLPolyfill;
-})(typeof self != 'undefined' ? self : global);(function(__global) {
-
- var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined';
- var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
- var isWindows = typeof process != 'undefined' && typeof process.platform != 'undefined' && !!process.platform.match(/^win/);
-
- if (!__global.console)
- __global.console = { assert: function() {} };
-
- // IE8 support
- var indexOf = Array.prototype.indexOf || function(item) {
- for (var i = 0, thisLen = this.length; i < thisLen; i++) {
- if (this[i] === item) {
- return i;
- }
- }
- return -1;
- };
-
- var defineProperty;
- (function () {
- try {
- if (!!Object.defineProperty({}, 'a', {}))
- defineProperty = Object.defineProperty;
- }
- catch (e) {
- defineProperty = function(obj, prop, opt) {
- try {
- obj[prop] = opt.value || opt.get.call(obj);
- }
- catch(e) {}
- }
- }
- })();
-
- var errArgs = new Error(0, '_').fileName == '_';
-
- function addToError(err, msg) {
- // parse the stack removing loader code lines for simplification
- if (!err.originalErr) {
- var stack = ((err.message || err) + (err.stack ? '\n' + err.stack : '')).toString().split('\n');
- var newStack = [];
- for (var i = 0; i < stack.length; i++) {
- if (typeof $__curScript == 'undefined' || stack[i].indexOf($__curScript.src) == -1)
- newStack.push(stack[i]);
- }
- }
-
- var newMsg = '(SystemJS) ' + (newStack ? newStack.join('\n\t') : err.message.substr(11)) + '\n\t' + msg;
-
- // Convert file:/// URLs to paths in Node
- if (!isBrowser)
- newMsg = newMsg.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, '');
-
- var newErr = errArgs ? new Error(newMsg, err.fileName, err.lineNumber) : new Error(newMsg);
-
- newErr.stack = newMsg;
-
- // track the original error
- newErr.originalErr = err.originalErr || err;
-
- return newErr;
- }
-
- function __eval(source, debugName, context) {
- try {
- new Function(source).call(context);
- }
- catch(e) {
- throw addToError(e, 'Evaluating ' + debugName);
- }
- }
-
- var baseURI;
-
- // environent baseURI detection
- if (typeof document != 'undefined' && document.getElementsByTagName) {
- baseURI = document.baseURI;
-
- if (!baseURI) {
- var bases = document.getElementsByTagName('base');
- baseURI = bases[0] && bases[0].href || window.location.href;
- }
- }
- else if (typeof location != 'undefined') {
- baseURI = __global.location.href;
- }
-
- // sanitize out the hash and querystring
- if (baseURI) {
- baseURI = baseURI.split('#')[0].split('?')[0];
- baseURI = baseURI.substr(0, baseURI.lastIndexOf('/') + 1);
- }
- else if (typeof process != 'undefined' && process.cwd) {
- baseURI = 'file://' + (isWindows ? '/' : '') + process.cwd() + '/';
- if (isWindows)
- baseURI = baseURI.replace(/\\/g, '/');
- }
- else {
- throw new TypeError('No environment baseURI');
- }
-
- try {
- var nativeURL = new __global.URL('test:///').protocol == 'test:';
- }
- catch(e) {}
-
- var URL = nativeURL ? __global.URL : __global.URLPolyfill;
-
-/*
-*********************************************************************************************
-
- Dynamic Module Loader Polyfill
-
- - Implemented exactly to the former 2014-08-24 ES6 Specification Draft Rev 27, Section 15
- http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#august_24_2014_draft_rev_27
-
- - Functions are commented with their spec numbers, with spec differences commented.
-
- - Spec bugs are commented in this code with links.
-
- - Abstract functions have been combined where possible, and their associated functions
- commented.
-
- - Realm implementation is entirely omitted.
-
-*********************************************************************************************
-*/
-
-function Module() {}
-// http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag
-defineProperty(Module.prototype, 'toString', {
- value: function() {
- return 'Module';
- }
-});
-function Loader(options) {
- this._loader = {
- loaderObj: this,
- loads: [],
- modules: {},
- importPromises: {},
- moduleRecords: {}
- };
-
- // 26.3.3.6
- defineProperty(this, 'global', {
- get: function() {
- return __global;
- }
- });
-
- // 26.3.3.13 realm not implemented
-}
-
-(function() {
-
-// Some Helpers
-
-// logs a linkset snapshot for debugging
-/* function snapshot(loader) {
- console.log('---Snapshot---');
- for (var i = 0; i < loader.loads.length; i++) {
- var load = loader.loads[i];
- var linkSetLog = ' ' + load.name + ' (' + load.status + '): ';
-
- for (var j = 0; j < load.linkSets.length; j++) {
- linkSetLog += '{' + logloads(load.linkSets[j].loads) + '} ';
- }
- console.log(linkSetLog);
- }
- console.log('');
-}
-function logloads(loads) {
- var log = '';
- for (var k = 0; k < loads.length; k++)
- log += loads[k].name + (k != loads.length - 1 ? ' ' : '');
- return log;
-} */
-
-
-/* function checkInvariants() {
- // see https://bugs.ecmascript.org/show_bug.cgi?id=2603#c1
-
- var loads = System._loader.loads;
- var linkSets = [];
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
- console.assert(load.status == 'loading' || load.status == 'loaded', 'Each load is loading or loaded');
-
- for (var j = 0; j < load.linkSets.length; j++) {
- var linkSet = load.linkSets[j];
-
- for (var k = 0; k < linkSet.loads.length; k++)
- console.assert(loads.indexOf(linkSet.loads[k]) != -1, 'linkSet loads are a subset of loader loads');
-
- if (linkSets.indexOf(linkSet) == -1)
- linkSets.push(linkSet);
- }
- }
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
- for (var j = 0; j < linkSets.length; j++) {
- var linkSet = linkSets[j];
-
- if (linkSet.loads.indexOf(load) != -1)
- console.assert(load.linkSets.indexOf(linkSet) != -1, 'linkSet contains load -> load contains linkSet');
-
- if (load.linkSets.indexOf(linkSet) != -1)
- console.assert(linkSet.loads.indexOf(load) != -1, 'load contains linkSet -> linkSet contains load');
- }
- }
-
- for (var i = 0; i < linkSets.length; i++) {
- var linkSet = linkSets[i];
- for (var j = 0; j < linkSet.loads.length; j++) {
- var load = linkSet.loads[j];
-
- for (var k = 0; k < load.dependencies.length; k++) {
- var depName = load.dependencies[k].value;
- var depLoad;
- for (var l = 0; l < loads.length; l++) {
- if (loads[l].name != depName)
- continue;
- depLoad = loads[l];
- break;
- }
-
- // loading records are allowed not to have their dependencies yet
- // if (load.status != 'loading')
- // console.assert(depLoad, 'depLoad found');
-
- // console.assert(linkSet.loads.indexOf(depLoad) != -1, 'linkset contains all dependencies');
- }
- }
- }
-} */
-
- // 15.2.3 - Runtime Semantics: Loader State
-
- // 15.2.3.11
- function createLoaderLoad(object) {
- return {
- // modules is an object for ES5 implementation
- modules: {},
- loads: [],
- loaderObj: object
- };
- }
-
- // 15.2.3.2 Load Records and LoadRequest Objects
-
- var anonCnt = 0;
-
- // 15.2.3.2.1
- function createLoad(name) {
- return {
- status: 'loading',
- name: name || '<Anonymous' + ++anonCnt + '>',
- linkSets: [],
- dependencies: [],
- metadata: {}
- };
- }
-
- // 15.2.3.2.2 createLoadRequestObject, absorbed into calling functions
-
- // 15.2.4
-
- // 15.2.4.1
- function loadModule(loader, name, options) {
- return new Promise(asyncStartLoadPartwayThrough({
- step: options.address ? 'fetch' : 'locate',
- loader: loader,
- moduleName: name,
- // allow metadata for import https://bugs.ecmascript.org/show_bug.cgi?id=3091
- moduleMetadata: options && options.metadata || {},
- moduleSource: options.source,
- moduleAddress: options.address
- }));
- }
-
- // 15.2.4.2
- function requestLoad(loader, request, refererName, refererAddress) {
- // 15.2.4.2.1 CallNormalize
- return new Promise(function(resolve, reject) {
- resolve(loader.loaderObj.normalize(request, refererName, refererAddress));
- })
- // 15.2.4.2.2 GetOrCreateLoad
- .then(function(name) {
- var load;
- if (loader.modules[name]) {
- load = createLoad(name);
- load.status = 'linked';
- // https://bugs.ecmascript.org/show_bug.cgi?id=2795
- load.module = loader.modules[name];
- return load;
- }
-
- for (var i = 0, l = loader.loads.length; i < l; i++) {
- load = loader.loads[i];
- if (load.name != name)
- continue;
- return load;
- }
-
- load = createLoad(name);
- loader.loads.push(load);
-
- proceedToLocate(loader, load);
-
- return load;
- });
- }
-
- // 15.2.4.3
- function proceedToLocate(loader, load) {
- proceedToFetch(loader, load,
- Promise.resolve()
- // 15.2.4.3.1 CallLocate
- .then(function() {
- return loader.loaderObj.locate({ name: load.name, metadata: load.metadata });
- })
- );
- }
-
- // 15.2.4.4
- function proceedToFetch(loader, load, p) {
- proceedToTranslate(loader, load,
- p
- // 15.2.4.4.1 CallFetch
- .then(function(address) {
- // adjusted, see https://bugs.ecmascript.org/show_bug.cgi?id=2602
- if (load.status != 'loading')
- return;
- load.address = address;
-
- return loader.loaderObj.fetch({ name: load.name, metadata: load.metadata, address: address });
- })
- );
- }
-
- // 15.2.4.5
- function proceedToTranslate(loader, load, p) {
- p
- // 15.2.4.5.1 CallTranslate
- .then(function(source) {
- if (load.status != 'loading')
- return;
-
- load.address = load.address || load.name;
-
- return Promise.resolve(loader.loaderObj.translate({ name: load.name, metadata: load.metadata, address: load.address, source: source }))
-
- // 15.2.4.5.2 CallInstantiate
- .then(function(source) {
- load.source = source;
- return loader.loaderObj.instantiate({ name: load.name, metadata: load.metadata, address: load.address, source: source });
- })
-
- // 15.2.4.5.3 InstantiateSucceeded
- .then(function(instantiateResult) {
- if (instantiateResult === undefined)
- throw new TypeError('Declarative modules unsupported in the polyfill.');
-
- if (typeof instantiateResult != 'object')
- throw new TypeError('Invalid instantiate return value');
-
- load.depsList = instantiateResult.deps || [];
- load.execute = instantiateResult.execute;
- })
- // 15.2.4.6 ProcessLoadDependencies
- .then(function() {
- load.dependencies = [];
- var depsList = load.depsList;
-
- var loadPromises = [];
- for (var i = 0, l = depsList.length; i < l; i++) (function(request, index) {
- loadPromises.push(
- requestLoad(loader, request, load.name, load.address)
-
- // 15.2.4.6.1 AddDependencyLoad (load is parentLoad)
- .then(function(depLoad) {
-
- // adjusted from spec to maintain dependency order
- // this is due to the System.register internal implementation needs
- load.dependencies[index] = {
- key: request,
- value: depLoad.name
- };
-
- if (depLoad.status != 'linked') {
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++)
- addLoadToLinkSet(linkSets[i], depLoad);
- }
-
- // console.log('AddDependencyLoad ' + depLoad.name + ' for ' + load.name);
- // snapshot(loader);
- })
- );
- })(depsList[i], i);
-
- return Promise.all(loadPromises);
- })
-
- // 15.2.4.6.2 LoadSucceeded
- .then(function() {
- // console.log('LoadSucceeded ' + load.name);
- // snapshot(loader);
-
- load.status = 'loaded';
-
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++)
- updateLinkSetOnLoad(linkSets[i], load);
- });
- })
- // 15.2.4.5.4 LoadFailed
- ['catch'](function(exc) {
- load.status = 'failed';
- load.exception = exc;
-
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++) {
- linkSetFailed(linkSets[i], load, exc);
- }
-
- console.assert(load.linkSets.length == 0, 'linkSets not removed');
- });
- }
-
- // 15.2.4.7 PromiseOfStartLoadPartwayThrough absorbed into calling functions
-
- // 15.2.4.7.1
- function asyncStartLoadPartwayThrough(stepState) {
- return function(resolve, reject) {
- var loader = stepState.loader;
- var name = stepState.moduleName;
- var step = stepState.step;
-
- if (loader.modules[name])
- throw new TypeError('"' + name + '" already exists in the module table');
-
- // adjusted to pick up existing loads
- var existingLoad;
- for (var i = 0, l = loader.loads.length; i < l; i++) {
- if (loader.loads[i].name == name) {
- existingLoad = loader.loads[i];
-
- if (step == 'translate' && !existingLoad.source) {
- existingLoad.address = stepState.moduleAddress;
- proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));
- }
-
- // a primary load -> use that existing linkset if it is for the direct load here
- // otherwise create a new linkset unit
- if (existingLoad.linkSets.length && existingLoad.linkSets[0].loads[0].name == existingLoad.name)
- return existingLoad.linkSets[0].done.then(function() {
- resolve(existingLoad);
- });
- }
- }
-
- var load = existingLoad || createLoad(name);
-
- load.metadata = stepState.moduleMetadata;
-
- var linkSet = createLinkSet(loader, load);
-
- loader.loads.push(load);
-
- resolve(linkSet.done);
-
- if (step == 'locate')
- proceedToLocate(loader, load);
-
- else if (step == 'fetch')
- proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));
-
- else {
- console.assert(step == 'translate', 'translate step');
- load.address = stepState.moduleAddress;
- proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));
- }
- }
- }
-
- // Declarative linking functions run through alternative implementation:
- // 15.2.5.1.1 CreateModuleLinkageRecord not implemented
- // 15.2.5.1.2 LookupExport not implemented
- // 15.2.5.1.3 LookupModuleDependency not implemented
-
- // 15.2.5.2.1
- function createLinkSet(loader, startingLoad) {
- var linkSet = {
- loader: loader,
- loads: [],
- startingLoad: startingLoad, // added see spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
- loadingCount: 0
- };
- linkSet.done = new Promise(function(resolve, reject) {
- linkSet.resolve = resolve;
- linkSet.reject = reject;
- });
- addLoadToLinkSet(linkSet, startingLoad);
- return linkSet;
- }
- // 15.2.5.2.2
- function addLoadToLinkSet(linkSet, load) {
- if (load.status == 'failed')
- return;
-
- for (var i = 0, l = linkSet.loads.length; i < l; i++)
- if (linkSet.loads[i] == load)
- return;
-
- linkSet.loads.push(load);
- load.linkSets.push(linkSet);
-
- // adjustment, see https://bugs.ecmascript.org/show_bug.cgi?id=2603
- if (load.status != 'loaded') {
- linkSet.loadingCount++;
- }
-
- var loader = linkSet.loader;
-
- for (var i = 0, l = load.dependencies.length; i < l; i++) {
- if (!load.dependencies[i])
- continue;
-
- var name = load.dependencies[i].value;
-
- if (loader.modules[name])
- continue;
-
- for (var j = 0, d = loader.loads.length; j < d; j++) {
- if (loader.loads[j].name != name)
- continue;
-
- addLoadToLinkSet(linkSet, loader.loads[j]);
- break;
- }
- }
- // console.log('add to linkset ' + load.name);
- // snapshot(linkSet.loader);
- }
-
- // linking errors can be generic or load-specific
- // this is necessary for debugging info
- function doLink(linkSet) {
- var error = false;
- try {
- link(linkSet, function(load, exc) {
- linkSetFailed(linkSet, load, exc);
- error = true;
- });
- }
- catch(e) {
- linkSetFailed(linkSet, null, e);
- error = true;
- }
- return error;
- }
-
- // 15.2.5.2.3
- function updateLinkSetOnLoad(linkSet, load) {
- // console.log('update linkset on load ' + load.name);
- // snapshot(linkSet.loader);
-
- console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
-
- linkSet.loadingCount--;
-
- if (linkSet.loadingCount > 0)
- return;
-
- // adjusted for spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
- var startingLoad = linkSet.startingLoad;
-
- // non-executing link variation for loader tracing
- // on the server. Not in spec.
- /***/
- if (linkSet.loader.loaderObj.execute === false) {
- var loads = [].concat(linkSet.loads);
- for (var i = 0, l = loads.length; i < l; i++) {
- var load = loads[i];
- load.module = {
- name: load.name,
- module: _newModule({}),
- evaluated: true
- };
- load.status = 'linked';
- finishLoad(linkSet.loader, load);
- }
- return linkSet.resolve(startingLoad);
- }
- /***/
-
- var abrupt = doLink(linkSet);
-
- if (abrupt)
- return;
-
- console.assert(linkSet.loads.length == 0, 'loads cleared');
-
- linkSet.resolve(startingLoad);
- }
-
- // 15.2.5.2.4
- function linkSetFailed(linkSet, load, exc) {
- var loader = linkSet.loader;
- var requests;
-
- checkError:
- if (load) {
- if (linkSet.loads[0].name == load.name) {
- exc = addToError(exc, 'Error loading ' + load.name);
- }
- else {
- for (var i = 0; i < linkSet.loads.length; i++) {
- var pLoad = linkSet.loads[i];
- for (var j = 0; j < pLoad.dependencies.length; j++) {
- var dep = pLoad.dependencies[j];
- if (dep.value == load.name) {
- exc = addToError(exc, 'Error loading ' + load.name + ' as "' + dep.key + '" from ' + pLoad.name);
- break checkError;
- }
- }
- }
- exc = addToError(exc, 'Error loading ' + load.name + ' from ' + linkSet.loads[0].name);
- }
- }
- else {
- exc = addToError(exc, 'Error linking ' + linkSet.loads[0].name);
- }
-
-
- var loads = linkSet.loads.concat([]);
- for (var i = 0, l = loads.length; i < l; i++) {
- var load = loads[i];
-
- // store all failed load records
- loader.loaderObj.failed = loader.loaderObj.failed || [];
- if (indexOf.call(loader.loaderObj.failed, load) == -1)
- loader.loaderObj.failed.push(load);
-
- var linkIndex = indexOf.call(load.linkSets, linkSet);
- console.assert(linkIndex != -1, 'link not present');
- load.linkSets.splice(linkIndex, 1);
- if (load.linkSets.length == 0) {
- var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
- if (globalLoadsIndex != -1)
- linkSet.loader.loads.splice(globalLoadsIndex, 1);
- }
- }
- linkSet.reject(exc);
- }
-
- // 15.2.5.2.5
- function finishLoad(loader, load) {
- // add to global trace if tracing
- if (loader.loaderObj.trace) {
- if (!loader.loaderObj.loads)
- loader.loaderObj.loads = {};
- var depMap = {};
- load.dependencies.forEach(function(dep) {
- depMap[dep.key] = dep.value;
- });
- loader.loaderObj.loads[load.name] = {
- name: load.name,
- deps: load.dependencies.map(function(dep){ return dep.key }),
- depMap: depMap,
- address: load.address,
- metadata: load.metadata,
- source: load.source
- };
- }
- // if not anonymous, add to the module table
- if (load.name) {
- console.assert(!loader.modules[load.name] || loader.modules[load.name].module === load.module.module, 'load not in module table');
- loader.modules[load.name] = load.module;
- }
- var loadIndex = indexOf.call(loader.loads, load);
- if (loadIndex != -1)
- loader.loads.splice(loadIndex, 1);
- for (var i = 0, l = load.linkSets.length; i < l; i++) {
- loadIndex = indexOf.call(load.linkSets[i].loads, load);
- if (loadIndex != -1)
- load.linkSets[i].loads.splice(loadIndex, 1);
- }
- load.linkSets.splice(0, load.linkSets.length);
- }
-
- function doDynamicExecute(linkSet, load, linkError) {
- try {
- var module = load.execute();
- }
- catch(e) {
- linkError(load, e);
- return;
- }
- if (!module || !(module instanceof Module))
- linkError(load, new TypeError('Execution must define a Module instance'));
- else
- return module;
- }
-
- // 26.3 Loader
-
- // 26.3.1.1
- // defined at top
-
- // importPromises adds ability to import a module twice without error - https://bugs.ecmascript.org/show_bug.cgi?id=2601
- function createImportPromise(loader, name, promise) {
- var importPromises = loader._loader.importPromises;
- return importPromises[name] = promise.then(function(m) {
- importPromises[name] = undefined;
- return m;
- }, function(e) {
- importPromises[name] = undefined;
- throw e;
- });
- }
-
- Loader.prototype = {
- // 26.3.3.1
- constructor: Loader,
- // 26.3.3.2
- define: function(name, source, options) {
- // check if already defined
- if (this._loader.importPromises[name])
- throw new TypeError('Module is already loading.');
- return createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
- step: 'translate',
- loader: this._loader,
- moduleName: name,
- moduleMetadata: options && options.metadata || {},
- moduleSource: source,
- moduleAddress: options && options.address
- })));
- },
- // 26.3.3.3
- 'delete': function(name) {
- var loader = this._loader;
- delete loader.importPromises[name];
- delete loader.moduleRecords[name];
- return loader.modules[name] ? delete loader.modules[name] : false;
- },
- // 26.3.3.4 entries not implemented
- // 26.3.3.5
- get: function(key) {
- if (!this._loader.modules[key])
- return;
- return this._loader.modules[key].module;
- },
- // 26.3.3.7
- has: function(name) {
- return !!this._loader.modules[name];
- },
- // 26.3.3.8
- 'import': function(name, parentName, parentAddress) {
- if (typeof parentName == 'object')
- parentName = parentName.name;
-
- // run normalize first
- var loaderObj = this;
-
- // added, see https://bugs.ecmascript.org/show_bug.cgi?id=2659
- return Promise.resolve(loaderObj.normalize(name, parentName))
- .then(function(name) {
- var loader = loaderObj._loader;
-
- if (loader.modules[name])
- return loader.modules[name].module;
-
- return loader.importPromises[name] || createImportPromise(loaderObj, name,
- loadModule(loader, name, {})
- .then(function(load) {
- delete loader.importPromises[name];
- return load.module.module;
- }));
- });
- },
- // 26.3.3.9 keys not implemented
- // 26.3.3.10
- load: function(name) {
- var loader = this._loader;
- if (loader.modules[name])
- return Promise.resolve();
- return loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
- step: 'locate',
- loader: loader,
- moduleName: name,
- moduleMetadata: {},
- moduleSource: undefined,
- moduleAddress: undefined
- }))
- .then(function() {
- delete loader.importPromises[name];
- }));
- },
- // 26.3.3.11
- module: function(source, options) {
- var load = createLoad();
- load.address = options && options.address;
- var linkSet = createLinkSet(this._loader, load);
- var sourcePromise = Promise.resolve(source);
- var loader = this._loader;
- var p = linkSet.done.then(function() {
- return load.module.module;
- });
- proceedToTranslate(loader, load, sourcePromise);
- return p;
- },
- // 26.3.3.12
- newModule: function (obj) {
- if (typeof obj != 'object')
- throw new TypeError('Expected object');
-
- var m = new Module();
-
- var pNames = [];
- if (Object.getOwnPropertyNames && obj != null)
- pNames = Object.getOwnPropertyNames(obj);
- else
- for (var key in obj)
- pNames.push(key);
-
- for (var i = 0; i < pNames.length; i++) (function(key) {
- defineProperty(m, key, {
- configurable: false,
- enumerable: true,
- get: function () {
- return obj[key];
- },
- set: function() {
- throw new Error('Module exports cannot be changed externally.');
- }
- });
- })(pNames[i]);
-
- if (Object.freeze)
- Object.freeze(m);
-
- return m;
- },
- // 26.3.3.14
- set: function(name, module) {
- if (!(module instanceof Module))
- throw new TypeError('Loader.set(' + name + ', module) must be a module');
- this._loader.modules[name] = {
- module: module
- };
- },
- // 26.3.3.15 values not implemented
- // 26.3.3.16 @@iterator not implemented
- // 26.3.3.17 @@toStringTag not implemented
-
- // 26.3.3.18.1
- normalize: function(name, referrerName, referrerAddress) {},
- // 26.3.3.18.2
- locate: function(load) {
- return load.name;
- },
- // 26.3.3.18.3
- fetch: function(load) {
- },
- // 26.3.3.18.4
- translate: function(load) {
- return load.source;
- },
- // 26.3.3.18.5
- instantiate: function(load) {
- }
- };
-
- var _newModule = Loader.prototype.newModule;
-
-/*
- * ES6 Module Declarative Linking Code
- */
- function link(linkSet, linkError) {
-
- var loader = linkSet.loader;
-
- if (!linkSet.loads.length)
- return;
-
- var loads = linkSet.loads.concat([]);
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
-
- var module = doDynamicExecute(linkSet, load, linkError);
- if (!module)
- return;
- load.module = {
- name: load.name,
- module: module
- };
- load.status = 'linked';
-
- finishLoad(loader, load);
- }
- }
-
-})();
-
-var System;
-
-// SystemJS Loader Class and Extension helpers
-function SystemJSLoader() {
- Loader.call(this);
-
- this.paths = {};
- this._loader.paths = {};
-
- systemJSConstructor.call(this);
-}
-
-// inline Object.create-style class extension
-function SystemProto() {};
-SystemProto.prototype = Loader.prototype;
-SystemJSLoader.prototype = new SystemProto();
-SystemJSLoader.prototype.constructor = SystemJSLoader;
-
-var systemJSConstructor;
-
-function hook(name, hook) {
- SystemJSLoader.prototype[name] = hook(SystemJSLoader.prototype[name] || function() {});
-}
-function hookConstructor(hook) {
- systemJSConstructor = hook(systemJSConstructor || function() {});
-}
-
-
-var absURLRegEx = /^[^\/]+:\/\//;
-function isAbsolute(name) {
- return name.match(absURLRegEx);
-}
-function isRel(name) {
- return (name[0] == '.' && (!name[1] || name[1] == '/' || name[1] == '.')) || name[0] == '/';
-}
-function isPlain(name) {
- return !isRel(name) && !isAbsolute(name);
-}
-
-var baseURIObj = new URL(baseURI);
-
-function urlResolve(name, parent) {
- // url resolution shortpaths
- if (name[0] == '.') {
- // dot-relative url normalization
- if (name[1] == '/' && name[2] != '.')
- return (parent && parent.substr(0, parent.lastIndexOf('/') + 1) || baseURI) + name.substr(2);
- }
- else if (name[0] != '/' && name.indexOf(':') == -1) {
- // plain parent normalization
- return (parent && parent.substr(0, parent.lastIndexOf('/') + 1) || baseURI) + name;
- }
-
- return new URL(name, parent && parent.replace(/#/g, '%05') || baseURIObj).href.replace(/%05/g, '#');
-}
-
-// NB no specification provided for System.paths, used ideas discussed in https://github.com/jorendorff/js-loaders/issues/25
-function applyPaths(loader, name) {
- // most specific (most number of slashes in path) match wins
- var pathMatch = '', wildcard, maxWildcardPrefixLen = 0;
-
- var paths = loader.paths;
- var pathsCache = loader._loader.paths;
-
- // check to see if we have a paths entry
- for (var p in paths) {
- if (paths.hasOwnProperty && !paths.hasOwnProperty(p))
- continue;
-
- // paths sanitization
- var path = paths[p];
- if (path !== pathsCache[p])
- path = paths[p] = pathsCache[p] = urlResolve(paths[p], isRel(paths[p]) ? baseURI : loader.baseURL);
-
- // exact path match
- if (p.indexOf('*') === -1) {
- if (name == p)
- return paths[p];
-
- // support trailing / in paths rules
- else if (name.substr(0, p.length - 1) == p.substr(0, p.length - 1) && (name.length < p.length || name[p.length - 1] == p[p.length - 1]) && (paths[p][paths[p].length - 1] == '/' || paths[p] == '')) {
- return paths[p].substr(0, paths[p].length - 1) + (name.length > p.length ? (paths[p] && '/' || '') + name.substr(p.length) : '');
- }
- }
- // wildcard path match
- else {
- var pathParts = p.split('*');
- if (pathParts.length > 2)
- throw new TypeError('Only one wildcard in a path is permitted');
-
- var wildcardPrefixLen = pathParts[0].length;
- if (wildcardPrefixLen >= maxWildcardPrefixLen &&
- name.substr(0, pathParts[0].length) == pathParts[0] &&
- name.substr(name.length - pathParts[1].length) == pathParts[1]) {
- maxWildcardPrefixLen = wildcardPrefixLen;
- pathMatch = p;
- wildcard = name.substr(pathParts[0].length, name.length - pathParts[1].length - pathParts[0].length);
- }
- }
- }
-
- var outPath = paths[pathMatch];
- if (typeof wildcard == 'string')
- outPath = outPath.replace('*', wildcard);
-
- return outPath;
-}
-
-function dedupe(deps) {
- var newDeps = [];
- for (var i = 0, l = deps.length; i < l; i++)
- if (indexOf.call(newDeps, deps[i]) == -1)
- newDeps.push(deps[i])
- return newDeps;
-}
-
-function group(deps) {
- var names = [];
- var indices = [];
- for (var i = 0, l = deps.length; i < l; i++) {
- var index = indexOf.call(names, deps[i]);
- if (index === -1) {
- names.push(deps[i]);
- indices.push([i]);
- }
- else {
- indices[index].push(i);
- }
- }
- return { names: names, indices: indices };
-}
-
-var getOwnPropertyDescriptor = true;
-try {
- Object.getOwnPropertyDescriptor({ a: 0 }, 'a');
-}
-catch(e) {
- getOwnPropertyDescriptor = false;
-}
-
-// converts any module.exports object into an object ready for SystemJS.newModule
-function getESModule(exports) {
- var esModule = {};
- // don't trigger getters/setters in environments that support them
- if ((typeof exports == 'object' || typeof exports == 'function') && exports !== __global) {
- if (getOwnPropertyDescriptor) {
- for (var p in exports) {
- // The default property is copied to esModule later on
- if (p === 'default')
- continue;
- defineOrCopyProperty(esModule, exports, p);
- }
- }
- else {
- extend(esModule, exports);
- }
- }
- esModule['default'] = exports;
- defineProperty(esModule, '__useDefault', {
- value: true
- });
- return esModule;
-}
-
-function defineOrCopyProperty(targetObj, sourceObj, propName) {
- try {
- var d;
- if (d = Object.getOwnPropertyDescriptor(sourceObj, propName))
- defineProperty(targetObj, propName, d);
- }
- catch (ex) {
- // Object.getOwnPropertyDescriptor threw an exception, fall back to normal set property
- // we dont need hasOwnProperty here because getOwnPropertyDescriptor would have returned undefined above
- targetObj[propName] = sourceObj[propName];
- return false;
- }
-}
-
-function extend(a, b, prepend) {
- var hasOwnProperty = b && b.hasOwnProperty;
- for (var p in b) {
- if (hasOwnProperty && !b.hasOwnProperty(p))
- continue;
- if (!prepend || !(p in a))
- a[p] = b[p];
- }
- return a;
-}
-
-// meta first-level extends where:
-// array + array appends
-// object + object extends
-// other properties replace
-function extendMeta(a, b, prepend) {
- var hasOwnProperty = b && b.hasOwnProperty;
- for (var p in b) {
- if (hasOwnProperty && !b.hasOwnProperty(p))
- continue;
- var val = b[p];
- if (!(p in a))
- a[p] = val;
- else if (val instanceof Array && a[p] instanceof Array)
- a[p] = [].concat(prepend ? val : a[p]).concat(prepend ? a[p] : val);
- else if (typeof val == 'object' && val !== null && typeof a[p] == 'object')
- a[p] = extend(extend({}, a[p]), val, prepend);
- else if (!prepend)
- a[p] = val;
- }
-}
-
-function extendPkgConfig(pkgCfgA, pkgCfgB, pkgName, loader, warnInvalidProperties) {
- for (var prop in pkgCfgB) {
- if (indexOf.call(['main', 'format', 'defaultExtension', 'basePath'], prop) != -1) {
- pkgCfgA[prop] = pkgCfgB[prop];
- }
- else if (prop == 'map') {
- extend(pkgCfgA.map = pkgCfgA.map || {}, pkgCfgB.map);
- }
- else if (prop == 'meta') {
- extend(pkgCfgA.meta = pkgCfgA.meta || {}, pkgCfgB.meta);
- }
- else if (prop == 'depCache') {
- for (var d in pkgCfgB.depCache) {
- var dNormalized;
-
- if (d.substr(0, 2) == './')
- dNormalized = pkgName + '/' + d.substr(2);
- else
- dNormalized = coreResolve.call(loader, d);
- loader.depCache[dNormalized] = (loader.depCache[dNormalized] || []).concat(pkgCfgB.depCache[d]);
- }
- }
- else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
- (!pkgCfgB.hasOwnProperty || pkgCfgB.hasOwnProperty(prop))) {
- warn.call(loader, '"' + prop + '" is not a valid package configuration option in package ' + pkgName);
- }
- }
-}
-
-// deeply-merge (to first level) config with any existing package config
-function setPkgConfig(loader, pkgName, cfg, prependConfig) {
- var pkg;
-
- // first package is config by reference for fast path, cloned after that
- if (!loader.packages[pkgName]) {
- pkg = loader.packages[pkgName] = cfg;
- }
- else {
- var basePkg = loader.packages[pkgName];
- pkg = loader.packages[pkgName] = {};
-
- extendPkgConfig(pkg, prependConfig ? cfg : basePkg, pkgName, loader, prependConfig);
- extendPkgConfig(pkg, prependConfig ? basePkg : cfg, pkgName, loader, !prependConfig);
- }
-
- // main object becomes main map
- if (typeof pkg.main == 'object') {
- pkg.map = pkg.map || {};
- pkg.map['./@main'] = pkg.main;
- pkg.main['default'] = pkg.main['default'] || './';
- pkg.main = '@main';
- }
-
- return pkg;
-}
-
-function warn(msg) {
- if (this.warnings && typeof console != 'undefined' && console.warn)
- console.warn(msg);
-}
-var absURLRegEx = /^([^\/]+:\/\/|\/)/;
-
-// Normalization with module names as absolute URLs
-SystemJSLoader.prototype.normalize = function(name, parentName, parentAddress) {
- // NB does `import 'file.js'` import relative to the parent name or baseURL?
- // have assumed that it is baseURL-relative here, but spec may well align with URLs to be the latter
- // safe option for users is to always use "./file.js" for relative
-
- // not absolute or relative -> apply paths (what will be sites)
- if (!name.match(absURLRegEx) && name[0] != '.')
- name = new URL(applyPaths(this, name) || name, baseURI).href;
- // apply parent-relative normalization, parentAddress is already normalized
- else
- name = new URL(name, parentName || baseURI).href;
-
- return name;
-};
-
-// default locate is this
-/*
-SystemJSLoader.prototype.locate = function(load) {
- return load.name;
-};
-*//*
- * Script tag fetch
- *
- * When load.metadata.scriptLoad is true, we load via script tag injection.
- */
-(function() {
-
- if (typeof document != 'undefined')
- var head = document.getElementsByTagName('head')[0];
-
- var curSystem;
- var curRequire;
-
- // if doing worker executing, this is set to the load record being executed
- var workerLoad = null;
-
- // interactive mode handling method courtesy RequireJS
- var ieEvents = head && (function() {
- var s = document.createElement('script');
- var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';
- return s.attachEvent && !(s.attachEvent.toString && s.attachEvent.toString().indexOf('[native code') < 0) && !isOpera;
- })();
-
- // IE interactive-only part
- // we store loading scripts array as { script: <script>, load: {...} }
- var interactiveLoadingScripts = [];
- var interactiveScript;
- function getInteractiveScriptLoad() {
- if (interactiveScript && interactiveScript.script.readyState === 'interactive')
- return interactiveScript.load;
-
- for (var i = 0; i < interactiveLoadingScripts.length; i++)
- if (interactiveLoadingScripts[i].script.readyState == 'interactive') {
- interactiveScript = interactiveLoadingScripts[i];
- return interactiveScript.load;
- }
- }
-
- // System.register, System.registerDynamic, AMD define pipeline
- // this is called by the above methods when they execute
- // we then run the reduceRegister_ collection function either immediately
- // if we are in IE and know the currently executing script (interactive)
- // or later if we need to wait for the synchronous load callback to know the script
- var loadingCnt = 0;
- var registerQueue = [];
- hook('pushRegister_', function(pushRegister) {
- return function(register) {
- // if using eval-execution then skip
- if (pushRegister.call(this, register))
- return false;
-
- // if using worker execution, then we're done
- if (workerLoad)
- this.reduceRegister_(workerLoad, register);
-
- // detect if we know the currently executing load (IE)
- // if so, immediately call reduceRegister
- else if (ieEvents)
- this.reduceRegister_(getInteractiveScriptLoad(), register);
-
- // otherwise, add to our execution queue
- // to call reduceRegister on sync script load event
- else if (loadingCnt)
- registerQueue.push(register);
-
- // if we're not currently loading anything though
- // then do the reduction against a null load
- // (out of band named define or named register)
- // note even in non-script environments, this catch is used
- else
- this.reduceRegister_(null, register);
-
- return true;
- };
- });
-
- function webWorkerImport(loader, load) {
- return new Promise(function(resolve, reject) {
- if (load.metadata.integrity)
- reject(new Error('Subresource integrity checking is not supported in web workers.'));
-
- workerLoad = load;
- try {
- importScripts(load.address);
- }
- catch(e) {
- workerLoad = null;
- reject(e);
- }
- workerLoad = null;
-
- // if nothing registered, then something went wrong
- if (!load.metadata.entry)
- reject(new Error(load.address + ' did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.'));
-
- resolve('');
- });
- }
-
- // override fetch to use script injection
- hook('fetch', function(fetch) {
- return function(load) {
- var loader = this;
-
- if (load.metadata.format == 'json' || !load.metadata.scriptLoad || (!isBrowser && !isWorker))
- return fetch.call(this, load);
-
- if (isWorker)
- return webWorkerImport(loader, load);
-
- return new Promise(function(resolve, reject) {
- var s = document.createElement('script');
-
- s.async = true;
-
- if (load.metadata.crossOrigin)
- s.crossOrigin = load.metadata.crossOrigin;
-
- if (load.metadata.integrity)
- s.setAttribute('integrity', load.metadata.integrity);
-
- if (ieEvents) {
- s.attachEvent('onreadystatechange', complete);
- interactiveLoadingScripts.push({
- script: s,
- load: load
- });
- }
- else {
- s.addEventListener('load', complete, false);
- s.addEventListener('error', error, false);
- }
-
- loadingCnt++;
-
- curSystem = __global.System;
- curRequire = __global.require;
-
- s.src = load.address;
- head.appendChild(s);
-
- function complete(evt) {
- if (s.readyState && s.readyState != 'loaded' && s.readyState != 'complete')
- return;
-
- loadingCnt--;
-
- // complete call is sync on execution finish
- // (in ie already done reductions)
- if (!load.metadata.entry && !registerQueue.length) {
- loader.reduceRegister_(load);
- }
- else if (!ieEvents) {
- for (var i = 0; i < registerQueue.length; i++)
- loader.reduceRegister_(load, registerQueue[i]);
- registerQueue = [];
- }
-
- cleanup();
-
- // if nothing registered, then something went wrong
- if (!load.metadata.entry && !load.metadata.bundle)
- reject(new Error(load.name + ' did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.'));
-
- resolve('');
- }
-
- function error(evt) {
- cleanup();
- reject(new Error('Unable to load script ' + load.address));
- }
-
- function cleanup() {
- __global.System = curSystem;
- __global.require = curRequire;
-
- if (s.detachEvent) {
- s.detachEvent('onreadystatechange', complete);
- for (var i = 0; i < interactiveLoadingScripts.length; i++)
- if (interactiveLoadingScripts[i].script == s) {
- if (interactiveScript && interactiveScript.script == s)
- interactiveScript = null;
- interactiveLoadingScripts.splice(i, 1);
- }
- }
- else {
- s.removeEventListener('load', complete, false);
- s.removeEventListener('error', error, false);
- }
-
- head.removeChild(s);
- }
- });
- };
- });
-})();
-/*
- * Instantiate registry extension
- *
- * Supports Traceur System.register 'instantiate' output for loading ES6 as ES5.
- *
- * - Creates the loader.register function
- * - Also supports metadata.format = 'register' in instantiate for anonymous register modules
- * - Also supports metadata.deps, metadata.execute and metadata.executingRequire
- * for handling dynamic modules alongside register-transformed ES6 modules
- *
- *
- * The code here replicates the ES6 linking groups algorithm to ensure that
- * circular ES6 compiled into System.register can work alongside circular AMD
- * and CommonJS, identically to the actual ES6 loader.
- *
- */
-
-
-/*
- * Registry side table entries in loader.defined
- * Registry Entry Contains:
- * - name
- * - deps
- * - declare for declarative modules
- * - execute for dynamic modules, different to declarative execute on module
- * - executingRequire indicates require drives execution for circularity of dynamic modules
- * - declarative optional boolean indicating which of the above
- *
- * Can preload modules directly on SystemJS.defined['my/module'] = { deps, execute, executingRequire }
- *
- * Then the entry gets populated with derived information during processing:
- * - normalizedDeps derived from deps, created in instantiate
- * - groupIndex used by group linking algorithm
- * - evaluated indicating whether evaluation has happend
- * - module the module record object, containing:
- * - exports actual module exports
- *
- * For dynamic we track the es module with:
- * - esModule actual es module value
- * - esmExports whether to extend the esModule with named exports
- *
- * Then for declarative only we track dynamic bindings with the 'module' records:
- * - name
- * - exports
- * - setters declarative setter functions
- * - dependencies, module records of dependencies
- * - importers, module records of dependents
- *
- * After linked and evaluated, entries are removed, declarative module records remain in separate
- * module binding table
- *
- */
-
-var leadingCommentAndMetaRegEx = /^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;
-function detectRegisterFormat(source) {
- var leadingCommentAndMeta = source.match(leadingCommentAndMetaRegEx);
- return leadingCommentAndMeta && source.substr(leadingCommentAndMeta[0].length, 15) == 'System.register';
-}
-
-function createEntry() {
- return {
- name: null,
- deps: null,
- originalIndices: null,
- declare: null,
- execute: null,
- executingRequire: false,
- declarative: false,
- normalizedDeps: null,
- groupIndex: null,
- evaluated: false,
- module: null,
- esModule: null,
- esmExports: false
- };
-}
-
-(function() {
-
- /*
- * There are two variations of System.register:
- * 1. System.register for ES6 conversion (2-3 params) - System.register([name, ]deps, declare)
- * see https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
- *
- * 2. System.registerDynamic for dynamic modules (3-4 params) - System.registerDynamic([name, ]deps, executingRequire, execute)
- * the true or false statement
- *
- * this extension implements the linking algorithm for the two variations identical to the spec
- * allowing compiled ES6 circular references to work alongside AMD and CJS circular references.
- *
- */
- SystemJSLoader.prototype.register = function(name, deps, declare) {
- if (typeof name != 'string') {
- declare = deps;
- deps = name;
- name = null;
- }
-
- // dynamic backwards-compatibility
- // can be deprecated eventually
- if (typeof declare == 'boolean')
- return this.registerDynamic.apply(this, arguments);
-
- var entry = createEntry();
- // ideally wouldn't apply map config to bundle names but
- // dependencies go through map regardless so we can't restrict
- // could reconsider in shift to new spec
- entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
- entry.declarative = true;
- entry.deps = deps;
- entry.declare = declare;
-
- this.pushRegister_({
- amd: false,
- entry: entry
- });
- };
- SystemJSLoader.prototype.registerDynamic = function(name, deps, declare, execute) {
- if (typeof name != 'string') {
- execute = declare;
- declare = deps;
- deps = name;
- name = null;
- }
-
- // dynamic
- var entry = createEntry();
- entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
- entry.deps = deps;
- entry.execute = execute;
- entry.executingRequire = declare;
-
- this.pushRegister_({
- amd: false,
- entry: entry
- });
- };
- hook('reduceRegister_', function() {
- return function(load, register) {
- if (!register)
- return;
-
- var entry = register.entry;
- var curMeta = load && load.metadata;
-
- // named register
- if (entry.name) {
- if (!(entry.name in this.defined))
- this.defined[entry.name] = entry;
-
- if (curMeta)
- curMeta.bundle = true;
- }
- // anonymous register
- if (!entry.name || load && !curMeta.entry && entry.name == load.name) {
- if (!curMeta)
- throw new TypeError('Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.');
- if (curMeta.entry) {
- if (curMeta.format == 'register')
- throw new Error('Multiple anonymous System.register calls in module ' + load.name + '. If loading a bundle, ensure all the System.register calls are named.');
- else
- throw new Error('Module ' + load.name + ' interpreted as ' + curMeta.format + ' module format, but called System.register.');
- }
- if (!curMeta.format)
- curMeta.format = 'register';
- curMeta.entry = entry;
- }
- };
- });
-
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
-
- this.defined = {};
- this._loader.moduleRecords = {};
- };
- });
-
- function buildGroups(entry, loader, groups) {
- groups[entry.groupIndex] = groups[entry.groupIndex] || [];
-
- if (indexOf.call(groups[entry.groupIndex], entry) != -1)
- return;
-
- groups[entry.groupIndex].push(entry);
-
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- var depEntry = loader.defined[depName];
-
- // not in the registry means already linked / ES6
- if (!depEntry || depEntry.evaluated)
- continue;
-
- // now we know the entry is in our unlinked linkage group
- var depGroupIndex = entry.groupIndex + (depEntry.declarative != entry.declarative);
-
- // the group index of an entry is always the maximum
- if (depEntry.groupIndex === null || depEntry.groupIndex < depGroupIndex) {
-
- // if already in a group, remove from the old group
- if (depEntry.groupIndex !== null) {
- groups[depEntry.groupIndex].splice(indexOf.call(groups[depEntry.groupIndex], depEntry), 1);
-
- // if the old group is empty, then we have a mixed depndency cycle
- if (groups[depEntry.groupIndex].length == 0)
- throw new Error("Mixed dependency cycle detected");
- }
-
- depEntry.groupIndex = depGroupIndex;
- }
-
- buildGroups(depEntry, loader, groups);
- }
- }
-
- function link(name, startEntry, loader) {
- // skip if already linked
- if (startEntry.module)
- return;
-
- startEntry.groupIndex = 0;
-
- var groups = [];
-
- buildGroups(startEntry, loader, groups);
-
- var curGroupDeclarative = !!startEntry.declarative == groups.length % 2;
- for (var i = groups.length - 1; i >= 0; i--) {
- var group = groups[i];
- for (var j = 0; j < group.length; j++) {
- var entry = group[j];
-
- // link each group
- if (curGroupDeclarative)
- linkDeclarativeModule(entry, loader);
- else
- linkDynamicModule(entry, loader);
- }
- curGroupDeclarative = !curGroupDeclarative;
- }
- }
-
- // module binding records
- function ModuleRecord() {}
- defineProperty(ModuleRecord, 'toString', {
- value: function() {
- return 'Module';
- }
- });
-
- function getOrCreateModuleRecord(name, moduleRecords) {
- return moduleRecords[name] || (moduleRecords[name] = {
- name: name,
- dependencies: [],
- exports: new ModuleRecord(), // start from an empty module and extend
- importers: []
- });
- }
-
- function linkDeclarativeModule(entry, loader) {
- // only link if already not already started linking (stops at circular)
- if (entry.module)
- return;
-
- var moduleRecords = loader._loader.moduleRecords;
- var module = entry.module = getOrCreateModuleRecord(entry.name, moduleRecords);
- var exports = entry.module.exports;
-
- var declaration = entry.declare.call(__global, function(name, value) {
- module.locked = true;
-
- if (typeof name == 'object') {
- for (var p in name)
- exports[p] = name[p];
- }
- else {
- exports[name] = value;
- }
-
- for (var i = 0, l = module.importers.length; i < l; i++) {
- var importerModule = module.importers[i];
- if (!importerModule.locked) {
- var importerIndex = indexOf.call(importerModule.dependencies, module);
- var setter = importerModule.setters[importerIndex];
- if (setter)
- setter(exports);
- }
- }
-
- module.locked = false;
- return value;
- }, { id: entry.name });
-
- if (typeof declaration == 'function')
- declaration = { setters: [], execute: declaration };
-
- // allowing undefined declaration was a mistake! To be deprecated.
- declaration = declaration || { setters: [], execute: function() {} };
-
- module.setters = declaration.setters;
- module.execute = declaration.execute;
-
- if (!module.setters || !module.execute) {
- throw new TypeError('Invalid System.register form for ' + entry.name);
- }
-
- // now link all the module dependencies
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- var depEntry = loader.defined[depName];
- var depModule = moduleRecords[depName];
-
- // work out how to set depExports based on scenarios...
- var depExports;
-
- if (depModule) {
- depExports = depModule.exports;
- }
- // dynamic, already linked in our registry
- else if (depEntry && !depEntry.declarative) {
- depExports = depEntry.esModule;
- }
- // in the loader registry
- else if (!depEntry) {
- depExports = loader.get(depName);
- }
- // we have an entry -> link
- else {
- linkDeclarativeModule(depEntry, loader);
- depModule = depEntry.module;
- depExports = depModule.exports;
- }
-
- // only declarative modules have dynamic bindings
- if (depModule && depModule.importers) {
- depModule.importers.push(module);
- module.dependencies.push(depModule);
- }
- else {
- module.dependencies.push(null);
- }
-
- // run setters for all entries with the matching dependency name
- var originalIndices = entry.originalIndices[i];
- for (var j = 0, len = originalIndices.length; j < len; ++j) {
- var index = originalIndices[j];
- if (module.setters[index]) {
- module.setters[index](depExports);
- }
- }
- }
- }
-
- // An analog to loader.get covering execution of all three layers (real declarative, simulated declarative, simulated dynamic)
- function getModule(name, loader) {
- var exports;
- var entry = loader.defined[name];
-
- if (!entry) {
- exports = loader.get(name);
- if (!exports)
- throw new Error('Unable to load dependency ' + name + '.');
- }
-
- else {
- if (entry.declarative)
- ensureEvaluated(name, entry, [], loader);
-
- else if (!entry.evaluated)
- linkDynamicModule(entry, loader);
-
- exports = entry.module.exports;
- }
-
- if ((!entry || entry.declarative) && exports && exports.__useDefault)
- return exports['default'];
-
- return exports;
- }
-
- function linkDynamicModule(entry, loader) {
- if (entry.module)
- return;
-
- var exports = {};
-
- var module = entry.module = { exports: exports, id: entry.name };
-
- // AMD requires execute the tree first
- if (!entry.executingRequire) {
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- // we know we only need to link dynamic due to linking algorithm
- var depEntry = loader.defined[depName];
- if (depEntry)
- linkDynamicModule(depEntry, loader);
- }
- }
-
- // now execute
- entry.evaluated = true;
- var output = entry.execute.call(__global, function(name) {
- for (var i = 0, l = entry.deps.length; i < l; i++) {
- if (entry.deps[i] != name)
- continue;
- return getModule(entry.normalizedDeps[i], loader);
- }
- // try and normalize the dependency to see if we have another form
- var nameNormalized = loader.normalizeSync(name, entry.name);
- if (indexOf.call(entry.normalizedDeps, nameNormalized) != -1)
- return getModule(nameNormalized, loader);
-
- throw new Error('Module ' + name + ' not declared as a dependency of ' + entry.name);
- }, exports, module);
-
- if (output !== undefined)
- module.exports = output;
-
- // create the esModule object, which allows ES6 named imports of dynamics
- exports = module.exports;
-
- // __esModule flag treats as already-named
- if (exports && (exports.__esModule || exports instanceof Module))
- entry.esModule = loader.newModule(exports);
- // set module as 'default' export, then fake named exports by iterating properties
- else if (entry.esmExports && exports !== __global)
- entry.esModule = loader.newModule(getESModule(exports));
- // just use the 'default' export
- else
- entry.esModule = loader.newModule({ 'default': exports, __useDefault: true });
- }
-
- /*
- * Given a module, and the list of modules for this current branch,
- * ensure that each of the dependencies of this module is evaluated
- * (unless one is a circular dependency already in the list of seen
- * modules, in which case we execute it)
- *
- * Then we evaluate the module itself depth-first left to right
- * execution to match ES6 modules
- */
- function ensureEvaluated(moduleName, entry, seen, loader) {
- // if already seen, that means it's an already-evaluated non circular dependency
- if (!entry || entry.evaluated || !entry.declarative)
- return;
-
- // this only applies to declarative modules which late-execute
-
- seen.push(moduleName);
-
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- if (indexOf.call(seen, depName) == -1) {
- if (!loader.defined[depName])
- loader.get(depName);
- else
- ensureEvaluated(depName, loader.defined[depName], seen, loader);
- }
- }
-
- if (entry.evaluated)
- return;
-
- entry.evaluated = true;
- entry.module.execute.call(__global);
- }
-
- // override the delete method to also clear the register caches
- hook('delete', function(del) {
- return function(name) {
- delete this._loader.moduleRecords[name];
- delete this.defined[name];
- return del.call(this, name);
- };
- });
-
- hook('fetch', function(fetch) {
- return function(load) {
- if (this.defined[load.name]) {
- load.metadata.format = 'defined';
- return '';
- }
-
- load.metadata.deps = load.metadata.deps || [];
-
- return fetch.call(this, load);
- };
- });
-
- hook('translate', function(translate) {
- // we run the meta detection here (register is after meta)
- return function(load) {
- load.metadata.deps = load.metadata.deps || [];
- return Promise.resolve(translate.apply(this, arguments)).then(function(source) {
- // run detection for register format
- if (load.metadata.format == 'register' || !load.metadata.format && detectRegisterFormat(load.source))
- load.metadata.format = 'register';
- return source;
- });
- };
- });
-
- // implement a perforance shortpath for System.load with no deps
- hook('load', function(doLoad) {
- return function(normalized) {
- var loader = this;
- var entry = loader.defined[normalized];
-
- if (!entry || entry.deps.length)
- return doLoad.apply(this, arguments);
-
- entry.originalIndices = entry.normalizedDeps = [];
-
- // recursively ensure that the module and all its
- // dependencies are linked (with dependency group handling)
- link(normalized, entry, loader);
-
- // now handle dependency execution in correct order
- ensureEvaluated(normalized, entry, [], loader);
- if (!entry.esModule)
- entry.esModule = loader.newModule(entry.module.exports);
-
- // remove from the registry
- if (!loader.trace)
- loader.defined[normalized] = undefined;
-
- // return the defined module object
- loader.set(normalized, entry.esModule);
-
- return Promise.resolve();
- };
- });
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- if (load.metadata.format == 'detect')
- load.metadata.format = undefined;
-
- // assumes previous instantiate is sync
- // (core json support)
- instantiate.call(this, load);
-
- var loader = this;
-
- var entry;
-
- // first we check if this module has already been defined in the registry
- if (loader.defined[load.name]) {
- entry = loader.defined[load.name];
- // don't support deps for ES modules
- if (!entry.declarative)
- entry.deps = entry.deps.concat(load.metadata.deps);
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // picked up already by an anonymous System.register script injection
- // or via the dynamic formats
- else if (load.metadata.entry) {
- entry = load.metadata.entry;
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // Contains System.register calls
- // (dont run bundles in the builder)
- else if (!(loader.builder && load.metadata.bundle)
- && (load.metadata.format == 'register' || load.metadata.format == 'esm' || load.metadata.format == 'es6')) {
-
- if (typeof __exec != 'undefined')
- __exec.call(loader, load);
-
- if (!load.metadata.entry && !load.metadata.bundle)
- throw new Error(load.name + ' detected as ' + load.metadata.format + ' but didn\'t execute.');
-
- entry = load.metadata.entry;
-
- // support metadata deps for System.register
- if (entry && load.metadata.deps)
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // named bundles are just an empty module
- if (!entry) {
- entry = createEntry();
- entry.deps = load.metadata.deps;
- entry.execute = function() {};
- }
-
- // place this module onto defined for circular references
- loader.defined[load.name] = entry;
-
- var grouped = group(entry.deps);
-
- entry.deps = grouped.names;
- entry.originalIndices = grouped.indices;
- entry.name = load.name;
- entry.esmExports = load.metadata.esmExports !== false;
-
- // first, normalize all dependencies
- var normalizePromises = [];
- for (var i = 0, l = entry.deps.length; i < l; i++)
- normalizePromises.push(Promise.resolve(loader.normalize(entry.deps[i], load.name)));
-
- return Promise.all(normalizePromises).then(function(normalizedDeps) {
-
- entry.normalizedDeps = normalizedDeps;
-
- return {
- deps: entry.deps,
- execute: function() {
- // recursively ensure that the module and all its
- // dependencies are linked (with dependency group handling)
- link(load.name, entry, loader);
-
- // now handle dependency execution in correct order
- ensureEvaluated(load.name, entry, [], loader);
-
- if (!entry.esModule)
- entry.esModule = loader.newModule(entry.module.exports);
-
- // remove from the registry
- if (!loader.trace)
- loader.defined[load.name] = undefined;
-
- // return the defined module object
- return entry.esModule;
- }
- };
- });
- };
- });
-})();
-/*
- System bundles
-
- Allows a bundle module to be specified which will be dynamically
- loaded before trying to load a given module.
-
- For example:
- SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
-
- Will result in a load to "mybundle" whenever a load to "jquery"
- or "bootstrap/js/bootstrap" is made.
-
- In this way, the bundle becomes the request that provides the module
-*/
-
-(function() {
- // bundles support (just like RequireJS)
- // bundle name is module name of bundle itself
- // bundle is array of modules defined by the bundle
- // when a module in the bundle is requested, the bundle is loaded instead
- // of the form SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.bundles = {};
- this._loader.loadedBundles = {};
- };
- });
-
- // assign bundle metadata for bundle loads
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- var matched = false;
-
- if (!(load.name in loader.defined))
- for (var b in loader.bundles) {
- for (var i = 0; i < loader.bundles[b].length; i++) {
- var curModule = loader.bundles[b][i];
-
- if (curModule == load.name) {
- matched = true;
- break;
- }
-
- // wildcard in bundles does not include / boundaries
- if (curModule.indexOf('*') != -1) {
- var parts = curModule.split('*');
- if (parts.length != 2) {
- loader.bundles[b].splice(i--, 1);
- continue;
- }
-
- if (load.name.substring(0, parts[0].length) == parts[0] &&
- load.name.substr(load.name.length - parts[1].length, parts[1].length) == parts[1] &&
- load.name.substr(parts[0].length, load.name.length - parts[1].length - parts[0].length).indexOf('/') == -1) {
- matched = true;
- break;
- }
- }
- }
-
- if (matched)
- return loader['import'](b)
- .then(function() {
- return locate.call(loader, load);
- });
- }
-
- return locate.call(loader, load);
- };
- });
-})();
-/*
- * Script-only addition used for production loader
- *
- */
-hookConstructor(function(constructor) {
- return function() {
- constructor.apply(this, arguments);
- __global.define = this.amdDefine;
- };
-});
-
-hook('fetch', function(fetch) {
- return function(load) {
- load.metadata.scriptLoad = true;
- return fetch.call(this, load);
- };
-});System = new SystemJSLoader();
-
-__global.SystemJS = System;
-System.version = '0.19.39 Register Only';
- if (typeof module == 'object' && module.exports && typeof exports == 'object')
- module.exports = System;
-
- __global.System = System;
-
-})(typeof self != 'undefined' ? self : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/dist/system.js b/thirdparty/systemjs/dist/system.js
deleted file mode 100644
index f6f69052e..000000000
--- a/thirdparty/systemjs/dist/system.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * SystemJS v0.19.39
- */
-!function(){function e(){!function(e){function t(e,r){if("string"!=typeof e)throw new TypeError("URL must be a string");var n=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!n)throw new RangeError("Invalid URL format");var a=n[1]||"",o=n[2]||"",i=n[3]||"",s=n[4]||"",l=n[5]||"",u=n[6]||"",d=n[7]||"",c=n[8]||"",f=n[9]||"";if(void 0!==r){var m=r instanceof t?r:new t(r),p=!a&&!s&&!o;!p||d||c||(c=m.search),p&&"/"!==d[0]&&(d=d?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+d:m.pathname);var h=[];d.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),d=h.join("").replace(/^\//,"/"===d[0]?"/":""),p&&(u=m.port,l=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}d=d.replace(/\\/g,"/"),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+d+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=l,this.port=u,this.pathname=d,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var r=((e.message||e)+(e.stack?"\n"+e.stack:"")).toString().split("\n"),n=[],a=0;a<r.length;a++)"undefined"!=typeof $__curScript&&r[a].indexOf($__curScript.src)!=-1||n.push(r[a]);var o="(SystemJS) "+(n?n.join("\n\t"):e.message.substr(11))+"\n\t"+t;F||(o=o.replace(D?/file:\/\/\//g:/file:\/\//g,""));var i=$?new Error(o,e.fileName,e.lineNumber):new Error(o);return i.stack=o,i.originalErr=e.originalErr||e,i}function r(){}function n(t){this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},q(this,"global",{get:function(){return e}})}function a(){n.call(this),this.paths={},this._loader.paths={},V.call(this)}function o(){}function i(e,t){a.prototype[e]=t(a.prototype[e]||function(){})}function s(e){V=e(V||function(){})}function l(e){return e.match(Y)}function u(e){return"."==e[0]&&(!e[1]||"/"==e[1]||"."==e[1])||"/"==e[0]}function d(e){return!u(e)&&!l(e)}function c(e,t){if("."==e[0]){if("/"==e[1]&&"."!=e[2])return(t&&t.substr(0,t.lastIndexOf("/")+1)||J)+e.substr(2)}else if("/"!=e[0]&&e.indexOf(":")==-1)return(t&&t.substr(0,t.lastIndexOf("/")+1)||J)+e;return new H(e,t&&t.replace(/#/g,"%05")||K).href.replace(/%05/g,"#")}function f(e,t){var r,n="",a=0,o=e.paths,i=e._loader.paths;for(var s in o)if(!o.hasOwnProperty||o.hasOwnProperty(s)){var l=o[s];if(l!==i[s]&&(l=o[s]=i[s]=c(o[s],u(o[s])?J:e.baseURL)),s.indexOf("*")===-1){if(t==s)return o[s];if(t.substr(0,s.length-1)==s.substr(0,s.length-1)&&(t.length<s.length||t[s.length-1]==s[s.length-1])&&("/"==o[s][o[s].length-1]||""==o[s]))return o[s].substr(0,o[s].length-1)+(t.length>s.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var d=s.split("*");if(d.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=d[0].length;f>=a&&t.substr(0,d[0].length)==d[0]&&t.substr(t.length-d[1].length)==d[1]&&(a=f,n=s,r=t.substr(d[0].length,t.length-d[1].length-d[0].length))}}var m=o[n];return"string"==typeof r&&(m=m.replace("*",r)),m}function m(e){for(var t=[],r=[],n=0,a=e.length;n<a;n++){var o=U.call(t,e[n]);o===-1?(t.push(e[n]),r.push([n])):r[o].push(n)}return{names:t,indices:r}}function p(t){var r={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(Q)for(var n in t)"default"!==n&&h(r,t,n);else g(r,t);return r.default=t,q(r,"__useDefault",{value:!0}),r}function h(e,t,r){try{var n;(n=Object.getOwnPropertyDescriptor(t,r))&&q(e,r,n)}catch(n){return e[r]=t[r],!1}}function g(e,t,r){var n=t&&t.hasOwnProperty;for(var a in t)n&&!t.hasOwnProperty(a)||r&&a in e||(e[a]=t[a]);return e}function v(e,t,r){var n=t&&t.hasOwnProperty;for(var a in t)if(!n||t.hasOwnProperty(a)){var o=t[a];a in e?o instanceof Array&&e[a]instanceof Array?e[a]=[].concat(r?o:e[a]).concat(r?e[a]:o):"object"==typeof o&&null!==o&&"object"==typeof e[a]?e[a]=g(g({},e[a]),o,r):r||(e[a]=o):e[a]=o}}function b(e,t,r,n,a){for(var o in t)if(U.call(["main","format","defaultExtension","basePath"],o)!=-1)e[o]=t[o];else if("map"==o)g(e.map=e.map||{},t.map);else if("meta"==o)g(e.meta=e.meta||{},t.meta);else if("depCache"==o)for(var i in t.depCache){var s;s="./"==i.substr(0,2)?r+"/"+i.substr(2):P.call(n,i),n.depCache[s]=(n.depCache[s]||[]).concat(t.depCache[i])}else!a||U.call(["browserConfig","nodeConfig","devConfig","productionConfig"],o)!=-1||t.hasOwnProperty&&!t.hasOwnProperty(o)||w.call(n,'"'+o+'" is not a valid package configuration option in package '+r)}function y(e,t,r,n){var a;if(e.packages[t]){var o=e.packages[t];a=e.packages[t]={},b(a,n?r:o,t,e,n),b(a,n?o:r,t,e,!n)}else a=e.packages[t]=r;return"object"==typeof a.main&&(a.map=a.map||{},a.map["./@main"]=a.main,a.main.default=a.main.default||"./",a.main="@main"),a}function w(e){this.warnings&&"undefined"!=typeof console&&console.warn}function x(e,t){for(var r=e.split(".");r.length;)t=t[r.shift()];return t}function S(e,t){var r,n=0;for(var a in e)if(t.substr(0,a.length)==a&&(t.length==a.length||"/"==t[a.length])){var o=a.split("/").length;if(o<=n)continue;r=a,n=o}return r}function _(e){this._loader.baseURL!==this.baseURL&&("/"!=this.baseURL[this.baseURL.length-1]&&(this.baseURL+="/"),this._loader.baseURL=this.baseURL=new H(this.baseURL,K).href)}function E(e,t){this.set("@system-env",te=this.newModule({browser:F,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,default:!0}))}function j(e,t){if(!d(e))throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!re){var r=this._nodeRequire("module"),n=t.substr(D?8:7);re=new r(n),re.paths=r._nodeModulePaths(n)}return re.require(e)}function P(e,t){if(u(e))return c(e,t);if(l(e))return e;var r=S(this.map,e);if(r){if(e=this.map[r]+e.substr(r.length),u(e))return c(e);if(l(e))return e}if(this.has(e))return e;if("@node/"==e.substr(0,6)){if(!this._nodeRequire)throw new TypeError("Error loading "+e+". Can only load node core modules in Node.");return this.builder?this.set(e,this.newModule({})):this.set(e,this.newModule(p(j.call(this,e.substr(6),this.baseURL)))),e}return _.call(this),f(this,e)||this.baseURL+e}function O(e,t,r){te.browser&&t.browserConfig&&r(t.browserConfig),te.node&&t.nodeConfig&&r(t.nodeConfig),te.dev&&t.devConfig&&r(t.devConfig),te.build&&t.buildConfig&&r(t.buildConfig),te.production&&t.productionConfig&&r(t.productionConfig)}function k(e){var t=e.match(oe);return t&&"System.register"==e.substr(t[0].length,15)}function M(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}function R(t){if("string"==typeof t)return x(t,e);if(!(t instanceof Array))throw new Error("Global exports must be a string or array.");for(var r={},n=!0,a=0;a<t.length;a++){var o=x(t[a],e);n&&(r.default=o,n=!1),r[t[a].split(".").pop()]=o}return r}function z(e){var t,r,n,n="~"==e[0],a=e.lastIndexOf("|");return a!=-1?(t=e.substr(a+1),r=e.substr(n,a-n),n&&w.call(this,'Condition negation form "'+e+'" is deprecated for "'+r+"|~"+t+'"'),"~"==t[0]&&(n=!0,t=t.substr(1))):(t="default",r=e.substr(n),se.indexOf(r)!=-1&&(t=r,r=null)),{module:r||"@system-env",prop:t,negate:n}}function I(e){return e.module+"|"+(e.negate?"~":"")+e.prop}function T(e,t,r){var n=this;return this.normalize(e.module,t).then(function(t){return n.load(t).then(function(a){var o=x(e.prop,n.get(t));if(r&&"boolean"!=typeof o)throw new TypeError("Condition "+I(e)+" did not resolve to a boolean.");return e.negate?!o:o})})}function C(e,t){var r=e.match(le);if(!r)return Promise.resolve(e);var n=z.call(this,r[0].substr(2,r[0].length-3));return this.builder?this.normalize(n.module,t).then(function(t){return n.module=t,e.replace(le,"#{"+I(n)+"}")}):T.call(this,n,t,!1).then(function(r){if("string"!=typeof r)throw new TypeError("The condition value for "+e+" doesn't resolve to a string.");if(r.indexOf("/")!=-1)throw new TypeError("Unabled to interpolate conditional "+e+(t?" in "+t:"")+"\n\tThe condition value "+r+' cannot contain a "/" separator.');return e.replace(le,r)})}function L(e,t){var r=e.lastIndexOf("#?");if(r==-1)return Promise.resolve(e);var n=z.call(this,e.substr(r+2));return this.builder?this.normalize(n.module,t).then(function(t){return n.module=t,e.substr(0,r)+"#?"+I(n)}):T.call(this,n,t,!0).then(function(t){return t?e.substr(0,r):"@empty"})}var A="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,F="undefined"!=typeof window&&"undefined"!=typeof document,D="undefined"!=typeof process&&"undefined"!=typeof process.platform&&!!process.platform.match(/^win/);e.console||(e.console={assert:function(){}});var q,U=Array.prototype.indexOf||function(e){for(var t=0,r=this.length;t<r;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(q=Object.defineProperty)}catch(e){q=function(e,t,r){try{e[t]=r.value||r.get.call(e)}catch(e){}}}}();var J,$="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if(J=document.baseURI,!J){var N=document.getElementsByTagName("base");J=N[0]&&N[0].href||window.location.href}}else"undefined"!=typeof location&&(J=e.location.href);if(J)J=J.split("#")[0].split("?")[0],J=J.substr(0,J.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");J="file://"+(D?"/":"")+process.cwd()+"/",D&&(J=J.replace(/\\/g,"/"))}try{var B="test:"==new e.URL("test:///").protocol}catch(e){}var H=B?e.URL:e.URLPolyfill;q(r.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"<Anonymous"+ ++y+">",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,r){return new Promise(u({step:r.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:r&&r.metadata||{},moduleSource:r.source,moduleAddress:r.address}))}function o(t,r,n,a){return new Promise(function(e,o){e(t.loaderObj.normalize(r,n,a))}).then(function(r){var n;if(t.modules[r])return n=e(r),n.status="linked",n.module=t.modules[r],n;for(var a=0,o=t.loads.length;a<o;a++)if(n=t.loads[a],n.name==r)return n;return n=e(r),t.loads.push(n),i(t,n),n})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,r){l(e,t,r.then(function(r){if("loading"==t.status)return t.address=r,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:r})}))}function l(e,t,r){r.then(function(r){if("loading"==t.status)return t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:r})).then(function(r){return t.source=r,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:r})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var r=t.depsList,n=[],a=0,i=r.length;a<i;a++)(function(r,a){n.push(o(e,r,t.name,t.address).then(function(e){if(t.dependencies[a]={key:r,value:e.name},"linked"!=e.status)for(var n=t.linkSets.concat([]),o=0,i=n.length;o<i;o++)c(n[o],e)}))})(r[a],a);return Promise.all(n)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),r=0,n=e.length;r<n;r++)m(e[r],t)})}).catch(function(e){t.status="failed",t.exception=e;for(var r=t.linkSets.concat([]),n=0,a=r.length;n<a;n++)p(r[n],t,e)})}function u(t){return function(r,n){var a=t.loader,o=t.moduleName,u=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;f<m;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=u||c.source||(c.address=t.moduleAddress,l(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){r(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=d(a,p);a.loads.push(p),r(h.done),"locate"==u?i(a,p):"fetch"==u?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,l(a,p,Promise.resolve(t.moduleSource)))}}function d(e,t){var r={loader:e,loads:[],startingLoad:t,loadingCount:0};return r.done=new Promise(function(e,t){r.resolve=e,r.reject=t}),c(r,t),r}function c(e,t){if("failed"!=t.status){for(var r=0,n=e.loads.length;r<n;r++)if(e.loads[r]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,r=0,n=t.dependencies.length;r<n;r++)if(t.dependencies[r]){var o=t.dependencies[r].value;if(!a.modules[o])for(var i=0,s=a.loads.length;i<s;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{b(e,function(r,n){p(e,r,n),t=!0})}catch(r){p(e,null,r),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var r=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var n=[].concat(e.loads),a=0,o=n.length;a<o;a++){var t=n[a];t.module={name:t.name,module:w({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(r)}var i=f(e);i||e.resolve(r)}}function p(e,r,n){var a=e.loader;e:if(r)if(e.loads[0].name==r.name)n=t(n,"Error loading "+r.name);else{for(var o=0;o<e.loads.length;o++)for(var i=e.loads[o],s=0;s<i.dependencies.length;s++){var l=i.dependencies[s];if(l.value==r.name){n=t(n,"Error loading "+r.name+' as "'+l.key+'" from '+i.name);break e}}n=t(n,"Error loading "+r.name+" from "+e.loads[0].name)}else n=t(n,"Error linking "+e.loads[0].name);for(var u=e.loads.concat([]),o=0,d=u.length;o<d;o++){var r=u[o];a.loaderObj.failed=a.loaderObj.failed||[],U.call(a.loaderObj.failed,r)==-1&&a.loaderObj.failed.push(r);var c=U.call(r.linkSets,e);if(r.linkSets.splice(c,1),0==r.linkSets.length){var f=U.call(e.loader.loads,r);f!=-1&&e.loader.loads.splice(f,1)}}e.reject(n)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var r={};t.dependencies.forEach(function(e){r[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:r,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var n=U.call(e.loads,t);n!=-1&&e.loads.splice(n,1);for(var a=0,o=t.linkSets.length;a<o;a++)n=U.call(t.linkSets[a].loads,t),n!=-1&&t.linkSets[a].loads.splice(n,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,n){try{var a=t.execute()}catch(e){return void n(t,e)}return a&&a instanceof r?a:void n(t,new TypeError("Execution must define a Module instance"))}function v(e,t,r){var n=e._loader.importPromises;return n[t]=r.then(function(e){return n[t]=void 0,e},function(e){throw n[t]=void 0,e})}function b(e,t){var r=e.loader;if(e.loads.length)for(var n=e.loads.concat([]),a=0;a<n.length;a++){var o=n[a],i=g(e,o,t);if(!i)return;o.module={name:o.name,module:i},o.status="linked",h(r,o)}}var y=0;n.prototype={constructor:n,define:function(e,t,r){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return v(this,e,new Promise(u({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:r&&r.metadata||{},moduleSource:t,moduleAddress:r&&r.address})))},delete:function(e){var t=this._loader;return delete t.importPromises[e],delete t.moduleRecords[e],!!t.modules[e]&&delete t.modules[e]},get:function(e){if(this._loader.modules[e])return this._loader.modules[e].module},has:function(e){return!!this._loader.modules[e]},import:function(e,t,r){"object"==typeof t&&(t=t.name);var n=this;return Promise.resolve(n.normalize(e,t)).then(function(e){var t=n._loader;return t.modules[e]?t.modules[e].module:t.importPromises[e]||v(n,e,a(t,e,{}).then(function(r){return delete t.importPromises[e],r.module.module}))})},load:function(e){var t=this._loader;return t.modules[e]?Promise.resolve():t.importPromises[e]||v(this,e,new Promise(u({step:"locate",loader:t,moduleName:e,moduleMetadata:{},moduleSource:void 0,moduleAddress:void 0})).then(function(){delete t.importPromises[e]}))},module:function(t,r){var n=e();n.address=r&&r.address;var a=d(this._loader,n),o=Promise.resolve(t),i=this._loader,s=a.done.then(function(){return n.module.module});return l(i,n,o),s},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t=new r,n=[];if(Object.getOwnPropertyNames&&null!=e)n=Object.getOwnPropertyNames(e);else for(var a in e)n.push(a);for(var o=0;o<n.length;o++)(function(r){q(t,r,{configurable:!1,enumerable:!0,get:function(){return e[r]},set:function(){throw new Error("Module exports cannot be changed externally.")}})})(n[o]);return Object.freeze&&Object.freeze(t),t},set:function(e,t){if(!(t instanceof r))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,r){},locate:function(e){return e.name},fetch:function(e){},translate:function(e){return e.source},instantiate:function(e){}};var w=n.prototype.newModule}();var X,G;if("undefined"!=typeof XMLHttpRequest)G=function(e,t,r,n){function a(){r(i.responseText)}function o(){n(new Error("XHR error"+(i.status?" ("+i.status+(i.statusText?" "+i.statusText:"")+")":"")+" loading "+e))}var i=new XMLHttpRequest,s=!0,l=!1;if(!("withCredentials"in i)){var u=/^(\w+:)?\/\/([^\/]+)/.exec(e);u&&(s=u[2]===window.location.host,u[1]&&(s&=u[1]===window.location.protocol))}s||"undefined"==typeof XDomainRequest||(i=new XDomainRequest,i.onload=a,i.onerror=o,i.ontimeout=o,i.onprogress=function(){},i.timeout=0,l=!0),i.onreadystatechange=function(){4===i.readyState&&(0==i.status?i.responseText?a():(i.addEventListener("error",o),i.addEventListener("load",a)):200===i.status?a():o())},i.open("GET",e,!0),i.setRequestHeader&&(i.setRequestHeader("Accept","application/x-es-module, */*"),t&&("string"==typeof t&&i.setRequestHeader("Authorization",t),i.withCredentials=!0)),l?setTimeout(function(){i.send()},0):i.send(null)};else if("undefined"!=typeof require&&"undefined"!=typeof process){var Z;G=function(e,t,r,n){if("file:///"!=e.substr(0,8))throw new Error('Unable to fetch "'+e+'". Only file URLs of the form file:/// allowed running in Node.');return Z=Z||require("fs"),e=D?e.replace(/\//g,"\\").substr(8):e.substr(7),Z.readFile(e,function(e,t){if(e)return n(e);var a=t+"";"\ufeff"===a[0]&&(a=a.substr(1)),r(a)})}}else{if("undefined"==typeof self||"undefined"==typeof self.fetch)throw new TypeError("No environment fetch API available.");G=function(e,t,r,n){var a={headers:{Accept:"application/x-es-module, */*"}};t&&("string"==typeof t&&(a.headers.Authorization=t),a.credentials="include"),fetch(e,a).then(function(e){if(e.ok)return e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)}).then(r,n)}}var W=function(){function t(t){var n=this;return Promise.resolve(e["typescript"==n.transpiler?"ts":n.transpiler]||(n.pluginLoader||n).import(n.transpiler)).then(function(e){e.__useDefault&&(e=e.default);var a;return a=e.Compiler?r:e.createLanguageService?i:o,"(function(__moduleName){"+a.call(n,t,e)+'\n})("'+t.name+'");\n//# sourceURL='+t.address+"!transpiled"})}function r(e,t){var r=this.traceurOptions||{};r.modules="instantiate",r.script=!1,void 0===r.sourceMaps&&(r.sourceMaps="inline"),r.filename=e.address,r.inputSourceMap=e.metadata.sourceMap,r.moduleName=!1;var n=new t.Compiler(r);return a(e.source,n,r.filename)}function a(e,t,r){try{return t.compile(e,r)}catch(e){if(e.length)throw e[0];throw e}}function o(e,t){var r=this.babelOptions||{};return r.modules="system",void 0===r.sourceMap&&(r.sourceMap="inline"),r.inputSourceMap=e.metadata.sourceMap,r.filename=e.address,r.code=!0,r.ast=!1,t.transform(e.source,r).code}function i(e,t){var r=this.typescriptOptions||{};return r.target=r.target||t.ScriptTarget.ES5,void 0===r.sourceMap&&(r.sourceMap=!0),r.sourceMap&&r.inlineSourceMap!==!1&&(r.inlineSourceMap=!0),r.module=t.ModuleKind.System,t.transpile(e.source,r,e.address)}return n.prototype.transpiler="traceur",t}();o.prototype=n.prototype,a.prototype=new o,a.prototype.constructor=a;var V,Y=/^[^\/]+:\/\//,K=new H(J),Q=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(e){Q=!1}var ee;!function(){function r(e){return l?d+new Buffer(e).toString("base64"):"undefined"!=typeof btoa?d+btoa(unescape(encodeURIComponent(e))):""}function n(e,t){var n=e.source.lastIndexOf("\n");"global"==e.metadata.format&&(t=!1);var a=e.metadata.sourceMap;if(a){if("object"!=typeof a)throw new TypeError("load.metadata.sourceMap must be set to an object.");a=JSON.stringify(a)}return(t?"(function(System, SystemJS) {":"")+e.source+(t?"\n})(System, System);":"")+("\n//# sourceURL="!=e.source.substr(n,15)?"\n//# sourceURL="+e.address+(a?"!transpiled":""):"")+(a&&r(a)||"")}function a(t,r){u=r,0==p++&&(c=e.System),e.System=e.SystemJS=t}function o(){0==--p&&(e.System=e.SystemJS=c),u=void 0}function s(e){v||(v=document.head||document.body||document.documentElement);var r=document.createElement("script");r.text=n(e,!1);var i,s=window.onerror;if(window.onerror=function(r){i=t(r,"Evaluating "+e.address),s&&s.apply(this,arguments)},a(this,e),e.metadata.integrity&&r.setAttribute("integrity",e.metadata.integrity),e.metadata.nonce&&r.setAttribute("nonce",e.metadata.nonce),v.appendChild(r),v.removeChild(r),o(),window.onerror=s,i)throw i}var l="undefined"!=typeof Buffer;try{l&&"YQ=="!=new Buffer("a").toString("base64")&&(l=!1)}catch(e){l=!1}var u,d="\n//# sourceMappingURL=data:application/json;base64,";i("pushRegister_",function(){return function(e){return!!u&&(this.reduceRegister_(u,e),!0)}});var c,f,m,p=0;ee=function(e){if(e.source){if((e.metadata.integrity||e.metadata.nonce)&&h)return s.call(this,e);try{a(this,e),u=e,!m&&this._nodeRequire&&(m=this._nodeRequire("vm"),f=m.runInThisContext("typeof System !== 'undefined' && System")===this),f?m.runInThisContext(n(e,!0),{filename:e.address+(e.metadata.sourceMap?"!transpiled":"")}):(0,eval)(n(e,!0)),o()}catch(r){throw o(),t(r,"Evaluating "+e.address)}}};var h=!1;if(F&&"undefined"!=typeof document&&document.getElementsByTagName){var g=document.getElementsByTagName("script");$__curScript=g[g.length-1],window.chrome&&window.chrome.extension||navigator.userAgent.match(/^Node\.js/)||(h=!0)}var v}();var te;s(function(e){return function(){e.call(this),this.baseURL=J,this.map={},"undefined"!=typeof $__curScript&&(this.scriptSrc=$__curScript.src),this.warnings=!1,this.defaultJSExtensions=!1,this.pluginFirst=!1,this.loaderErrorStack=!1,this.set("@empty",this.newModule({})),E.call(this,!1,!1)}}),"undefined"==typeof require||"undefined"==typeof process||process.browser||(a.prototype._nodeRequire=require);var re;i("normalize",function(e){return function(e,t,r){var n=P.call(this,e,t);return!this.defaultJSExtensions||r||".js"==n.substr(n.length-3,3)||d(n)||(n+=".js"),n}});var ne="undefined"!=typeof XMLHttpRequest;i("locate",function(e){return function(t){return Promise.resolve(e.call(this,t)).then(function(e){return ne?e.replace(/#/g,"%23"):e})}}),i("fetch",function(){return function(e){return new Promise(function(t,r){G(e.address,e.metadata.authorization,t,r)})}}),i("import",function(e){return function(t,r,n){return r&&r.name&&w.call(this,"SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing "+t+" from "+r.name),e.call(this,t,r,n).then(function(e){return e.__useDefault?e.default:e})}}),i("translate",function(e){return function(t){return"detect"==t.metadata.format&&(t.metadata.format=void 0),e.apply(this,arguments)}}),i("instantiate",function(e){return function(e){if("json"==e.metadata.format&&!this.builder){var t=e.metadata.entry=M();t.deps=[],t.execute=function(){try{return JSON.parse(e.source)}catch(t){throw new Error("Invalid JSON file "+e.name)}}}}}),a.prototype.getConfig=function(e){var t={},r=this;for(var n in r)r.hasOwnProperty&&!r.hasOwnProperty(n)||n in a.prototype&&"transpiler"!=n||U.call(["_loader","amdDefine","amdRequire","defined","failed","version","loads"],n)==-1&&(t[n]=r[n]);return t.production=te.production,t};var ae;a.prototype.config=function(e,t){function r(e){for(var t in e)if(e.hasOwnProperty(t))return!0}var n=this;if("loaderErrorStack"in e&&(ae=$__curScript,e.loaderErrorStack?$__curScript=void 0:$__curScript=ae),"warnings"in e&&(n.warnings=e.warnings),e.transpilerRuntime===!1&&(n._loader.loadedTranspilerRuntime=!0),("production"in e||"build"in e)&&E.call(n,!!e.production,!!(e.build||te&&te.build)),!t){var a;if(O(n,e,function(e){a=a||e.baseURL}),a=a||e.baseURL){if(r(n.packages)||r(n.meta)||r(n.depCache)||r(n.bundles)||r(n.packageConfigPaths))throw new TypeError("Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.");this.baseURL=a,_.call(this)}if(e.paths&&g(n.paths,e.paths),O(n,e,function(e){e.paths&&g(n.paths,e.paths)}),this.warnings)for(var o in n.paths)o.indexOf("*")!=-1&&w.call(n,'Paths configuration "'+o+'" -> "'+n.paths[o]+'" uses wildcards which are being deprecated for simpler trailing "/" folder paths.')}if(e.defaultJSExtensions&&(n.defaultJSExtensions=e.defaultJSExtensions,w.call(n,"The defaultJSExtensions configuration option is deprecated, use packages configuration instead.")),e.pluginFirst&&(n.pluginFirst=e.pluginFirst),e.map){var i="";for(var o in e.map){var s=e.map[o];if("string"!=typeof s){i+=(i.length?", ":"")+'"'+o+'"';var l=n.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),u=n.decanonicalize(o);l&&".js"==u.substr(u.length-3,3)&&(u=u.substr(0,u.length-3));var c="";for(var f in n.packages)u.substr(0,f.length)==f&&(!u[f.length]||"/"==u[f.length])&&c.split("/").length<f.split("/").length&&(c=f);c&&n.packages[c].main&&(u=u.substr(0,u.length-n.packages[c].main.length-1));var f=n.packages[u]=n.packages[u]||{};f.map=s}else n.map[o]=s}i&&w.call(n,"The map configuration for "+i+' uses object submaps, which is deprecated in global map.\nUpdate this to use package contextual map with configs like SystemJS.config({ packages: { "'+o+'": { map: {...} } } }).')}if(e.packageConfigPaths){for(var m=[],p=0;p<e.packageConfigPaths.length;p++){var h=e.packageConfigPaths[p],v=Math.max(h.lastIndexOf("*")+1,h.lastIndexOf("/")),b=P.call(n,h.substr(0,v));m[p]=b+h.substr(v)}n.packageConfigPaths=m}if(e.bundles)for(var o in e.bundles){for(var x=[],p=0;p<e.bundles[o].length;p++){var l=n.defaultJSExtensions&&".js"!=e.bundles[o][p].substr(e.bundles[o][p].length-3,3),S=n.decanonicalize(e.bundles[o][p]);l&&".js"==S.substr(S.length-3,3)&&(S=S.substr(0,S.length-3)),x.push(S)}n.bundles[o]=x}if(e.packages)for(var o in e.packages){if(o.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+o+'" is not a valid package name.');var u=P.call(n,o);"/"==u[u.length-1]&&(u=u.substr(0,u.length-1)),y(n,u,e.packages[o],!1)}for(var j in e){var s=e[j];if(U.call(["baseURL","map","packages","bundles","paths","warnings","packageConfigPaths","loaderErrorStack","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig"],j)==-1)if("object"!=typeof s||s instanceof Array)n[j]=s;else{n[j]=n[j]||{};for(var o in s)if("meta"==j&&"*"==o[0])g(n[j][o]=n[j][o]||{},s[o]);else if("meta"==j){var k=P.call(n,o);n.defaultJSExtensions&&".js"!=k.substr(k.length-3,3)&&!d(k)&&(k+=".js"),g(n[j][k]=n[j][k]||{},s[o])}else if("depCache"==j){var l=n.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),u=n.decanonicalize(o);l&&".js"==u.substr(u.length-3,3)&&(u=u.substr(0,u.length-3)),n[j][u]=[].concat(s[o])}else n[j][o]=s[o]}}O(n,e,function(e){n.config(e,!0)})},function(){function e(e,t){var r,n,a=0;for(var o in e.packages)t.substr(0,o.length)!==o||t.length!==o.length&&"/"!==t[o.length]||(n=o.split("/").length,n>a&&(r=o,a=n));return r}function t(e,t,r,n,a){if(!n||"/"==n[n.length-1]||a||t.defaultExtension===!1)return n;var o=!1;if(t.meta&&p(t.meta,n,function(e,t,r){if(0==r||e.lastIndexOf("*")!=e.length-1)return o=!0}),!o&&e.meta&&p(e.meta,r+"/"+n,function(e,t,r){if(0==r||e.lastIndexOf("*")!=e.length-1)return o=!0}),o)return n;var i="."+(t.defaultExtension||"js");return n.substr(n.length-i.length)!=i?n+i:n}function r(e,r,n,a,i){if(!a){if(!r.main)return n+(e.defaultJSExtensions?".js":"");a="./"==r.main.substr(0,2)?r.main.substr(2):r.main}if(r.map){var s="./"+a,l=S(r.map,s);if(l||(s="./"+t(e,r,n,a,i),s!="./"+a&&(l=S(r.map,s))),l){var u=o(e,r,n,l,s,i);if(u)return u}}return n+"/"+t(e,r,n,a,i)}function n(e,t,r,n){if("."==e)throw new Error("Package "+r+' has a map entry for "." which is not permitted.');return!(t.substr(0,e.length)==e&&n.length>e.length)}function o(e,r,a,o,i,s){"/"==i[i.length-1]&&(i=i.substr(0,i.length-1));var l=r.map[o];if("object"==typeof l)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+a);if(n(o,l,a,i)&&"string"==typeof l){if("."==l)l=a;else if("./"==l.substr(0,2))return a+"/"+t(e,r,a,l.substr(2)+i.substr(o.length),s);return e.normalizeSync(l+i.substr(o.length),a+"/")}}function l(e,r,n,a,o){if(!a){if(!r.main)return Promise.resolve(n+(e.defaultJSExtensions?".js":""));a="./"==r.main.substr(0,2)?r.main.substr(2):r.main}var i,s;return r.map&&(i="./"+a,s=S(r.map,i),s||(i="./"+t(e,r,n,a,o),i!="./"+a&&(s=S(r.map,i)))),(s?d(e,r,n,s,i,o):Promise.resolve()).then(function(i){return i?Promise.resolve(i):Promise.resolve(n+"/"+t(e,r,n,a,o))})}function u(e,r,n,a,o,i,s){if("."==o)o=n;else if("./"==o.substr(0,2))return Promise.resolve(n+"/"+t(e,r,n,o.substr(2)+i.substr(a.length),s)).then(function(t){return C.call(e,t,n+"/")});return e.normalize(o+i.substr(a.length),n+"/")}function d(e,t,r,a,o,i){"/"==o[o.length-1]&&(o=o.substr(0,o.length-1));var s=t.map[a];if("string"==typeof s)return n(a,s,r,o)?u(e,t,r,a,s,o,i):Promise.resolve();if(e.builder)return Promise.resolve(r+"/#:"+o);var l=[],d=[];for(var c in s){var f=z(c);d.push({condition:f,map:s[c]}),l.push(e.import(f.module,r))}return Promise.all(l).then(function(e){for(var t=0;t<d.length;t++){var r=d[t].condition,n=x(r.prop,e[t]);if(!r.negate&&n||r.negate&&!n)return d[t].map}}).then(function(s){if(s){if(!n(a,s,r,o))return;return u(e,t,r,a,s,o,i)}})}function c(e){var t=e.lastIndexOf("*"),r=Math.max(t+1,e.lastIndexOf("/"));return{length:r,regEx:new RegExp("^("+e.substr(0,r).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:t!=-1}}function f(e,t){for(var r,n,a=!1,o=0;o<e.packageConfigPaths.length;o++){var i=e.packageConfigPaths[o],s=h[i]||(h[i]=c(i));if(!(t.length<s.length)){var l=t.match(s.regEx);!l||r&&(a&&s.wildcard||!(r.length<l[1].length))||(r=l[1],a=!s.wildcard,n=r+i.substr(s.length))}}if(r)return{packageName:r,configPath:n}}function m(e,t,r){var n=e.pluginLoader||e;return(n.meta[r]=n.meta[r]||{}).format="json",n.meta[r].loader=null,n.load(r).then(function(){var a=n.get(r).default;return a.systemjs&&(a=a.systemjs),a.modules&&(a.meta=a.modules,w.call(e,"Package config file "+r+' is configured with "modules", which is deprecated as it has been renamed to "meta".')),y(e,t,a,!0)})}function p(e,t,r){var n;for(var a in e){var o="./"==a.substr(0,2)?"./":"";if(o&&(a=a.substr(2)),n=a.indexOf("*"),n!==-1&&a.substr(0,n)==t.substr(0,n)&&a.substr(n+1)==t.substr(t.length-a.length+n+1)&&r(a,e[o+a],a.split("/").length))return}var i=e[t]&&e.hasOwnProperty&&e.hasOwnProperty(t)?e[t]:e["./"+t];i&&r(i,i,0)}s(function(e){return function(){e.call(this),this.packages={},this.packageConfigPaths=[]}}),a.prototype.normalizeSync=a.prototype.decanonicalize=a.prototype.normalize,i("decanonicalize",function(t){return function(r,n){if(this.builder)return t.call(this,r,n,!0);var a=t.call(this,r,n,!1);if(!this.defaultJSExtensions)return a;var o=e(this,a),i=this.packages[o],s=i&&i.defaultExtension;return void 0==s&&i&&i.meta&&p(i.meta,a.substr(o),function(e,t,r){if(0==r||e.lastIndexOf("*")!=e.length-1)return s=!1,!0}),(s===!1||s&&".js"!=s)&&".js"!=r.substr(r.length-3,3)&&".js"==a.substr(a.length-3,3)&&(a=a.substr(0,a.length-3)),a}}),i("normalizeSync",function(t){return function(n,a,i){var s=this;if(i=i===!0,a)var l=e(s,a)||s.defaultJSExtensions&&".js"==a.substr(a.length-3,3)&&e(s,a.substr(0,a.length-3));
-var u=l&&s.packages[l];if(u&&"."!=n[0]){var d=u.map,c=d&&S(d,n);if(c&&"string"==typeof d[c]){var m=o(s,u,l,c,n,i);if(m)return m}}var p=s.defaultJSExtensions&&".js"!=n.substr(n.length-3,3),h=t.call(s,n,a,!1);p&&".js"!=h.substr(h.length-3,3)&&(p=!1),p&&(h=h.substr(0,h.length-3));var g=f(s,h),v=g&&g.packageName||e(s,h);if(!v)return h+(p?".js":"");var b=h.substr(v.length+1);return r(s,s.packages[v]||{},v,b,i)}}),i("normalize",function(t){return function(r,n,a){var o=this;return a=a===!0,Promise.resolve().then(function(){if(n)var t=e(o,n)||o.defaultJSExtensions&&".js"==n.substr(n.length-3,3)&&e(o,n.substr(0,n.length-3));var i=t&&o.packages[t];if(i&&"./"!=r.substr(0,2)){var s=i.map,l=s&&S(s,r);if(l)return d(o,i,t,l,r,a)}return Promise.resolve()}).then(function(i){if(i)return i;var s=o.defaultJSExtensions&&".js"!=r.substr(r.length-3,3),u=t.call(o,r,n,!1);s&&".js"!=u.substr(u.length-3,3)&&(s=!1),s&&(u=u.substr(0,u.length-3));var d=f(o,u),c=d&&d.packageName||e(o,u);if(!c)return Promise.resolve(u+(s?".js":""));var p=o.packages[c],h=p&&(p.configured||!d);return(h?Promise.resolve(p):m(o,c,d.configPath)).then(function(e){var t=u.substr(c.length+1);return l(o,e,c,t,a)})})}});var h={};i("locate",function(t){return function(r){var n=this;return Promise.resolve(t.call(this,r)).then(function(t){var a=e(n,r.name);if(a){var o=n.packages[a],i=r.name.substr(a.length+1),s={};if(o.meta){var l=0;p(o.meta,i,function(e,t,r){r>l&&(l=r),v(s,t,r&&l>r)}),v(r.metadata,s)}o.format&&!r.metadata.loader&&(r.metadata.format=r.metadata.format||o.format)}return t})}})}(),function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;e<d.length;e++)if("interactive"==d[e].script.readyState)return s=d[e],s.load}function r(e,t){return new Promise(function(e,r){t.metadata.integrity&&r(new Error("Subresource integrity checking is not supported in web workers.")),l=t;try{importScripts(t.address)}catch(e){l=null,r(e)}l=null,t.metadata.entry||r(new Error(t.address+" did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.")),e("")})}if("undefined"!=typeof document)var n=document.getElementsByTagName("head")[0];var a,o,s,l=null,u=n&&function(){var e=document.createElement("script"),t="undefined"!=typeof opera&&"[object Opera]"===opera.toString();return e.attachEvent&&!(e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0)&&!t}(),d=[],c=0,f=[];i("pushRegister_",function(e){return function(r){return!e.call(this,r)&&(l?this.reduceRegister_(l,r):u?this.reduceRegister_(t(),r):c?f.push(r):this.reduceRegister_(null,r),!0)}}),i("fetch",function(t){return function(i){var l=this;return"json"!=i.metadata.format&&i.metadata.scriptLoad&&(F||A)?A?r(l,i):new Promise(function(t,r){function m(e){if(!g.readyState||"loaded"==g.readyState||"complete"==g.readyState){if(c--,i.metadata.entry||f.length){if(!u){for(var n=0;n<f.length;n++)l.reduceRegister_(i,f[n]);f=[]}}else l.reduceRegister_(i);h(),i.metadata.entry||i.metadata.bundle||r(new Error(i.name+" did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.")),t("")}}function p(e){h(),r(new Error("Unable to load script "+i.address))}function h(){if(e.System=a,e.require=o,g.detachEvent){g.detachEvent("onreadystatechange",m);for(var t=0;t<d.length;t++)d[t].script==g&&(s&&s.script==g&&(s=null),d.splice(t,1))}else g.removeEventListener("load",m,!1),g.removeEventListener("error",p,!1);n.removeChild(g)}var g=document.createElement("script");g.async=!0,i.metadata.crossOrigin&&(g.crossOrigin=i.metadata.crossOrigin),i.metadata.integrity&&g.setAttribute("integrity",i.metadata.integrity),u?(g.attachEvent("onreadystatechange",m),d.push({script:g,load:i})):(g.addEventListener("load",m,!1),g.addEventListener("error",p,!1)),c++,a=e.System,o=e.require,g.src=i.address,n.appendChild(g)}):t.call(this,i)}})}();var oe=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;!function(){function t(e,r,n){if(n[e.groupIndex]=n[e.groupIndex]||[],U.call(n[e.groupIndex],e)==-1){n[e.groupIndex].push(e);for(var a=0,o=e.normalizedDeps.length;a<o;a++){var i=e.normalizedDeps[a],s=r.defined[i];if(s&&!s.evaluated){var l=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex<l){if(null!==s.groupIndex&&(n[s.groupIndex].splice(U.call(n[s.groupIndex],s),1),0==n[s.groupIndex].length))throw new Error("Mixed dependency cycle detected");s.groupIndex=l}t(s,r,n)}}}}function n(e,r,n){if(!r.module){r.groupIndex=0;var a=[];t(r,n,a);for(var o=!!r.declarative==a.length%2,i=a.length-1;i>=0;i--){for(var s=a[i],l=0;l<s.length;l++){var d=s[l];o?u(d,n):c(d,n)}o=!o}}}function o(){}function l(e,t){return t[e]||(t[e]={name:e,dependencies:[],exports:new o,importers:[]})}function u(t,r){if(!t.module){var n=r._loader.moduleRecords,a=t.module=l(t.name,n),o=t.module.exports,i=t.declare.call(e,function(e,t){if(a.locked=!0,"object"==typeof e)for(var r in e)o[r]=e[r];else o[e]=t;for(var n=0,i=a.importers.length;n<i;n++){var s=a.importers[n];if(!s.locked){var l=U.call(s.dependencies,a),u=s.setters[l];u&&u(o)}}return a.locked=!1,t},{id:t.name});if("function"==typeof i&&(i={setters:[],execute:i}),i=i||{setters:[],execute:function(){}},a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,d=t.normalizedDeps.length;s<d;s++){var c,f=t.normalizedDeps[s],m=r.defined[f],p=n[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(u(m,r),p=m.module,c=p.exports):c=r.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;g<v;++g){var b=h[g];a.setters[b]&&a.setters[b](c)}}}}function d(e,t){var r,n=t.defined[e];if(n)n.declarative?f(e,n,[],t):n.evaluated||c(n,t),r=n.module.exports;else if(r=t.get(e),!r)throw new Error("Unable to load dependency "+e+".");return(!n||n.declarative)&&r&&r.__useDefault?r.default:r}function c(t,n){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;i<s;i++){var l=t.normalizedDeps[i],u=n.defined[l];u&&c(u,n)}t.evaluated=!0;var f=t.execute.call(e,function(e){for(var r=0,a=t.deps.length;r<a;r++)if(t.deps[r]==e)return d(t.normalizedDeps[r],n);var o=n.normalizeSync(e,t.name);if(U.call(t.normalizedDeps,o)!=-1)return d(o,n);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);void 0!==f&&(o.exports=f),a=o.exports,a&&(a.__esModule||a instanceof r)?t.esModule=n.newModule(a):t.esmExports&&a!==e?t.esModule=n.newModule(p(a)):t.esModule=n.newModule({default:a,__useDefault:!0})}}function f(t,r,n,a){if(r&&!r.evaluated&&r.declarative){n.push(t);for(var o=0,i=r.normalizedDeps.length;o<i;o++){var s=r.normalizedDeps[o];U.call(n,s)==-1&&(a.defined[s]?f(s,a.defined[s],n,a):a.get(s))}r.evaluated||(r.evaluated=!0,r.module.execute.call(e))}}a.prototype.register=function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=null),"boolean"==typeof r)return this.registerDynamic.apply(this,arguments);var n=M();n.name=e&&(this.decanonicalize||this.normalize).call(this,e),n.declarative=!0,n.deps=t,n.declare=r,this.pushRegister_({amd:!1,entry:n})},a.prototype.registerDynamic=function(e,t,r,n){"string"!=typeof e&&(n=r,r=t,t=e,e=null);var a=M();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=n,a.executingRequire=r,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var r=t.entry,n=e&&e.metadata;if(r.name&&(r.name in this.defined||(this.defined[r.name]=r),n&&(n.bundle=!0)),!r.name||e&&!n.entry&&r.name==e.name){if(!n)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(n.entry)throw"register"==n.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+n.format+" module format, but called System.register.");n.format||(n.format="register"),n.entry=r}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),q(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||!t.metadata.format&&k(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var r=this,a=r.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],n(t,a,r),f(t,a,[],r),a.esModule||(a.esModule=r.newModule(a.module.exports)),r.trace||(r.defined[t]=void 0),r.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var r,a=this;if(a.defined[t.name])r=a.defined[t.name],r.declarative||(r.deps=r.deps.concat(t.metadata.deps)),r.deps=r.deps.concat(t.metadata.deps);else if(t.metadata.entry)r=t.metadata.entry,r.deps=r.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof ee&&ee.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");r=t.metadata.entry,r&&t.metadata.deps&&(r.deps=r.deps.concat(t.metadata.deps))}r||(r=M(),r.deps=t.metadata.deps,r.execute=function(){}),a.defined[t.name]=r;var o=m(r.deps);r.deps=o.names,r.originalIndices=o.indices,r.name=t.name,r.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,l=r.deps.length;s<l;s++)i.push(Promise.resolve(a.normalize(r.deps[s],t.name)));return Promise.all(i).then(function(e){return r.normalizedDeps=e,{deps:r.deps,execute:function(){return n(t.name,r,a),f(t.name,r,[],a),r.esModule||(r.esModule=a.newModule(r.module.exports)),a.trace||(a.defined[t.name]=void 0),r.esModule}}})}})}(),function(){var r=/(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/,n=/\$traceurRuntime\s*\./,a=/babelHelpers\s*\./;i("translate",function(o){return function(i){var s=this,l=arguments;return o.apply(s,l).then(function(o){if("esm"==i.metadata.format||"es6"==i.metadata.format||!i.metadata.format&&o.match(r)){if("es6"==i.metadata.format&&w.call(s,"Module "+i.name+' has metadata setting its format to "es6", which is deprecated.\nThis should be updated to "esm".'),i.metadata.format="esm",i.metadata.deps){for(var u="",d=0;d<i.metadata.deps.length;d++)u+='import "'+i.metadata.deps[d]+'"; ';i.source=u+o}if(s.transpiler===!1){if(s.builder)return o;throw new TypeError("Unable to dynamically transpile ES module as SystemJS.transpiler set to false.")}return s._loader.loadedTranspiler=s._loader.loadedTranspiler||!1,s.pluginLoader&&(s.pluginLoader._loader.loadedTranspiler=s._loader.loadedTranspiler||!1),(s._loader.transpilerPromise||(s._loader.transpilerPromise=Promise.resolve(e["typescript"==s.transpiler?"ts":s.transpiler]||(s.pluginLoader||s).import(s.transpiler)))).then(function(e){return s._loader.loadedTranspilerRuntime=!0,e.translate?e==i.metadata.loaderModule?i.source:("string"==typeof i.metadata.sourceMap&&(i.metadata.sourceMap=JSON.parse(i.metadata.sourceMap)),Promise.resolve(e.translate.apply(s,l)).then(function(e){var t=i.metadata.sourceMap;if(t&&"object"==typeof t){var r=i.address.split("!")[0];t.file&&t.file!=i.address||(t.file=r+"!transpiled"),(!t.sources||t.sources.length<=1&&(!t.sources[0]||t.sources[0]==i.address))&&(t.sources=[r])}return"esm"==i.metadata.format&&!s.builder&&k(e)&&(i.metadata.format="register"),e})):(s.builder&&(i.metadata.originalSource=i.source),W.call(s,i).then(function(e){return i.metadata.sourceMap=void 0,e}))},function(e){throw t(e,"Unable to load transpiler to transpile "+i.name)})}if(s.transpiler===!1)return o;if(s._loader.loadedTranspiler!==!1||"traceur"!=s.transpiler&&"typescript"!=s.transpiler&&"babel"!=s.transpiler||i.name!=s.normalizeSync(s.transpiler)||(o.length>100&&!i.metadata.format&&(i.metadata.format="global","traceur"===s.transpiler&&(i.metadata.exports="traceur"),"typescript"===s.transpiler&&(i.metadata.exports="ts")),s._loader.loadedTranspiler=!0),s._loader.loadedTranspilerRuntime===!1&&(i.name!=s.normalizeSync("traceur-runtime")&&i.name!=s.normalizeSync("babel/external-helpers*")||(o.length>100&&(i.metadata.format=i.metadata.format||"global"),s._loader.loadedTranspilerRuntime=!0)),("register"==i.metadata.format||i.metadata.bundle)&&s._loader.loadedTranspilerRuntime!==!0){if("traceur"==s.transpiler&&!e.$traceurRuntime&&i.source.match(n))return s._loader.loadedTranspilerRuntime=s._loader.loadedTranspilerRuntime||!1,s.import("traceur-runtime").then(function(){return o});if("babel"==s.transpiler&&!e.babelHelpers&&i.source.match(a))return s._loader.loadedTranspilerRuntime=s._loader.loadedTranspilerRuntime||!1,s.import("babel/external-helpers").then(function(){return o})}return o})}})}();var ie="undefined"!=typeof self?"self":"global";i("fetch",function(e){return function(t){return t.metadata.exports&&!t.metadata.format&&(t.metadata.format="global"),e.call(this,t)}}),i("instantiate",function(e){return function(t){var r=this;if(t.metadata.format||(t.metadata.format="global"),"global"==t.metadata.format&&!t.metadata.entry){var n=M();t.metadata.entry=n,n.deps=[];for(var a in t.metadata.globals){var o=t.metadata.globals[a];o&&n.deps.push(o)}n.execute=function(e,n,a){var o;if(t.metadata.globals){o={};for(var i in t.metadata.globals)t.metadata.globals[i]&&(o[i]=e(t.metadata.globals[i]))}var s=t.metadata.exports;s&&(t.source+="\n"+ie+'["'+s+'"] = '+s+";");var l=r.get("@@global-helpers").prepareGlobal(a.id,s,o,!!t.metadata.encapsulateGlobal);return ee.call(r,t),l()}}return e.call(this,t)}}),i("reduceRegister_",function(e){return function(t,r){if(r||!t.metadata.exports&&(!A||"global"!=t.metadata.format))return e.call(this,t,r);t.metadata.format="global";var n=t.metadata.entry=M();n.deps=t.metadata.deps;var a=R(t.metadata.exports);n.execute=function(){return a}}}),s(function(t){return function(){function r(t){if(Object.keys)Object.keys(e).forEach(t);else for(var r in e)i.call(e,r)&&t(r)}function n(t){r(function(r){if(U.call(s,r)==-1){try{var n=e[r]}catch(e){s.push(r)}t(r,n)}})}var a=this;t.call(a);var o,i=Object.prototype.hasOwnProperty,s=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];a.set("@@global-helpers",a.newModule({prepareGlobal:function(t,r,a,i){var s=e.define;e.define=void 0;var l;if(a){l={};for(var u in a)l[u]=e[u],e[u]=a[u]}return r||(o={},n(function(e,t){o[e]=t})),function(){var t,a=r?R(r):{},u=!!r;if(r&&!i||n(function(n,s){o[n]!==s&&"undefined"!=typeof s&&(i&&(e[n]=void 0),r||(a[n]=s,"undefined"!=typeof t?u||t===s||(u=!0):t=s))}),a=u?a:t,l)for(var d in l)e[d]=l[d];return e.define=s,a}}}))}}),function(){function t(e){function t(e,t){for(var r=0;r<e.length;r++)if(e[r][0]<t.index&&e[r][1]>t.index)return!0;return!1}n.lastIndex=a.lastIndex=o.lastIndex=0;var r,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;r=o.exec(e);)s.push([r.index,r.index+r[0].length]);for(;r=a.exec(e);)t(s,r)||l.push([r.index+r[1].length,r.index+r[0].length-1])}for(;r=n.exec(e);)if(!t(s,r)&&!t(l,r)){var u=r[1].substr(1,r[1].length-2);if(u.match(/"|'/))continue;"/"==u[u.length-1]&&(u=u.substr(0,u.length-1)),i.push(u)}return i}var r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/,n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,a=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,o=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,s=/^\#\!.*/;i("instantiate",function(a){return function(o){var i=this;if(o.metadata.format||(r.lastIndex=0,n.lastIndex=0,(n.exec(o.source)||r.exec(o.source))&&(o.metadata.format="cjs")),"cjs"==o.metadata.format){var l=o.metadata.deps,u=o.metadata.cjsRequireDetection===!1?[]:t(o.source);for(var d in o.metadata.globals)o.metadata.globals[d]&&u.push(o.metadata.globals[d]);var c=M();o.metadata.entry=c,c.deps=u,c.executingRequire=!0,c.execute=function(t,r,n){function a(e){return"/"==e[e.length-1]&&(e=e.substr(0,e.length-1)),t.apply(this,arguments)}if(a.resolve=function(e){return i.get("@@cjs-helpers").requireResolve(e,n.id)},n.paths=[],n.require=t,!o.metadata.cjsDeferDepsExecute)for(var u=0;u<l.length;u++)a(l[u]);var d=i.get("@@cjs-helpers").getPathVars(n.id),c={exports:r,args:[a,r,n,d.filename,d.dirname,e,e]},f="(function(require, exports, module, __filename, __dirname, global, GLOBAL";if(o.metadata.globals)for(var m in o.metadata.globals)c.args.push(a(o.metadata.globals[m])),f+=", "+m;var p=e.define;e.define=void 0,e.__cjsWrapper=c,o.source=f+") {"+o.source.replace(s,"")+"\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);",ee.call(i,o),e.__cjsWrapper=void 0,e.define=p}}return a.call(i,o)}})}(),s(function(e){return function(){function t(e){return"file:///"==e.substr(0,8)?e.substr(7+!!D):n&&e.substr(0,n.length)==n?e.substr(n.length):e}var r=this;if(e.call(r),"undefined"!=typeof window&&"undefined"!=typeof document&&window.location)var n=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"");r.set("@@cjs-helpers",r.newModule({requireResolve:function(e,n){return t(r.normalizeSync(e,n))},getPathVars:function(e){var r,n=e.lastIndexOf("!");r=n!=-1?e.substr(0,n):e;var a=r.split("/");return a.pop(),a=a.join("/"),{filename:t(r),dirname:t(a)}}}))}}),i("fetch",function(t){return function(r){return r.metadata.scriptLoad&&F&&(e.define=this.amdDefine),t.call(this,r)}}),s(function(t){return function(){function r(e,t){e=e.replace(s,"");var r=e.match(d),n=(r[1].split(",")[t]||"require").replace(c,""),a=f[n]||(f[n]=new RegExp(l+n+u,"g"));a.lastIndex=0;for(var o,i=[];o=a.exec(e);)i.push(o[2]||o[3]);return i}function n(e,t,r,a){if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof e&&"function"==typeof t&&(e=[e]),!(e instanceof Array)){if("string"==typeof e){var i=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),s=o.decanonicalize(e,a);i&&".js"==s.substr(s.length-3,3)&&(s=s.substr(0,s.length-3));var l=o.get(s);if(!l)throw new Error('Module not already loaded loading "'+e+'" as '+s+(a?' from "'+a+'".':"."));return l.__useDefault?l.default:l}throw new TypeError("Invalid require")}for(var u=[],d=0;d<e.length;d++)u.push(o.import(e[d],a));Promise.all(u).then(function(e){t&&t.apply(null,e)},r)}function a(t,a,i){function s(t,r,s){function c(e,r,a){return"string"==typeof e&&"function"!=typeof r?t(e):n.call(o,e,r,a,s.id)}for(var f=[],m=0;m<a.length;m++)f.push(t(a[m]));s.uri=s.id,s.config=function(){},d!=-1&&f.splice(d,0,s),u!=-1&&f.splice(u,0,r),l!=-1&&(c.toUrl=function(e){var t=o.defaultJSExtensions&&".js"!=e.substr(e.length-3,3),r=o.decanonicalize(e,s.id);return t&&".js"==r.substr(r.length-3,3)&&(r=r.substr(0,r.length-3)),r},f.splice(l,0,c));var p=e.require;e.require=n;var h=i.apply(u==-1?e:r,f);if(e.require=p,"undefined"==typeof h&&s&&(h=s.exports),"undefined"!=typeof h)return h}"string"!=typeof t&&(i=a,a=t,t=null),a instanceof Array||(i=a,a=["require","exports","module"].splice(0,i.length)),"function"!=typeof i&&(i=function(e){return function(){return e}}(i)),void 0===a[a.length-1]&&a.pop();var l,u,d;(l=U.call(a,"require"))!=-1&&(a.splice(l,1),t||(a=a.concat(r(i.toString(),l)))),(u=U.call(a,"exports"))!=-1&&a.splice(u,1),(d=U.call(a,"module"))!=-1&&a.splice(d,1);var c=M();c.name=t&&(o.decanonicalize||o.normalize).call(o,t),c.deps=a,c.execute=s,o.pushRegister_({amd:!0,entry:c})}var o=this;t.call(this);var s=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,l="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",u="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",d=/\(([^\)]*)\)/,c=/^\s+|\s+$/g,f={};a.amd={},i("reduceRegister_",function(e){return function(t,r){if(!r||!r.amd)return e.call(this,t,r);var n=t&&t.metadata,a=r.entry;if(n)if(n.format&&"detect"!=n.format){if(!a.name&&"amd"!=n.format)throw new Error("AMD define called while executing "+n.format+" module "+t.name)}else n.format="amd";if(a.name)n&&(n.entry||n.bundle?n.entry&&n.entry.name&&n.entry.name!=t.name&&(n.entry=void 0):n.entry=a,n.bundle=!0),a.name in this.defined||(this.defined[a.name]=a);else{if(!n)throw new TypeError("Unexpected anonymous AMD define.");if(n.entry&&!n.entry.name)throw new Error("Multiple anonymous defines in module "+t.name);n.entry=a}}}),o.amdDefine=a,o.amdRequire=n}}),function(){var t=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])define\s*\(\s*("[^"]+"\s*,\s*|'[^']+'\s*,\s*)?\s*(\[(\s*(("[^"]+"|'[^']+')\s*,|\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*(\s*("[^"]+"|'[^']+')\s*,?)?(\s*(\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*\s*\]|function\s*|{|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*\))/;i("instantiate",function(r){return function(n){var a=this;if("amd"==n.metadata.format||!n.metadata.format&&n.source.match(t))if(n.metadata.format="amd",a.builder||a.execute===!1)n.metadata.execute=function(){return n.metadata.builderExecute.apply(this,arguments)};else{var o=e.define;e.define=this.amdDefine;try{ee.call(a,n)}finally{e.define=o}if(!n.metadata.entry&&!n.metadata.bundle)throw new TypeError("AMD module "+n.name+" did not define")}return r.call(a,n)}})}(),function(){function e(e,t){if(t){var r;if(e.pluginFirst){if((r=t.lastIndexOf("!"))!=-1)return t.substr(r+1)}else if((r=t.indexOf("!"))!=-1)return t.substr(0,r);return t}}function t(e,t){var r,n,a=t.lastIndexOf("!");if(a!=-1)return e.pluginFirst?(r=t.substr(a+1),n=t.substr(0,a)):(r=t.substr(0,a),n=t.substr(a+1)||r.substr(r.lastIndexOf(".")+1)),{argument:r,plugin:n}}function r(e,t,r,n){return n&&".js"==t.substr(t.length-3,3)&&(t=t.substr(0,t.length-3)),e.pluginFirst?r+"!"+t:t+"!"+r}function n(e,t){return e.defaultJSExtensions&&".js"!=t.substr(t.length-3,3)}function a(a){return function(o,i,s){var l=this,u=t(l,o);if(i=e(this,i),!u)return a.call(this,o,i,s);var d=l.normalizeSync(u.argument,i,!0),c=l.normalizeSync(u.plugin,i,!0);return r(l,d,c,n(l,u.argument))}}i("decanonicalize",a),i("normalizeSync",a),i("normalize",function(a){return function(o,i,s){var l=this;i=e(this,i);var u=t(l,o);return u?Promise.all([l.normalize(u.argument,i,!0),l.normalize(u.plugin,i,!1)]).then(function(e){return r(l,e[0],e[1],n(l,u.argument))}):a.call(l,o,i,s)}}),i("locate",function(e){return function(t){var r,n=this,a=t.name;return n.pluginFirst?(r=a.indexOf("!"))!=-1&&(t.metadata.loader=a.substr(0,r),t.name=a.substr(r+1)):(r=a.lastIndexOf("!"))!=-1&&(t.metadata.loader=a.substr(r+1),t.name=a.substr(0,r)),e.call(n,t).then(function(e){return r==-1&&t.metadata.loader?(n.pluginLoader||n).normalize(t.metadata.loader,t.name).then(function(r){return t.metadata.loader=r,e}):e}).then(function(e){var r=t.metadata.loader;if(!r)return e;if(t.name==r)throw new Error("Plugin "+r+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");if(n.defined&&n.defined[a])return e;var o=n.pluginLoader||n;return o.import(r).then(function(r){return t.metadata.loaderModule=r,t.address=e,r.locate?r.locate.call(n,t):e})})}}),i("fetch",function(e){return function(t){var r=this;return t.metadata.loaderModule&&t.metadata.loaderModule.fetch&&"defined"!=t.metadata.format?(t.metadata.scriptLoad=!1,t.metadata.loaderModule.fetch.call(r,t,function(t){return e.call(r,t)})):e.call(r,t)}}),i("translate",function(e){return function(t){var r=this,n=arguments;return t.metadata.loaderModule&&t.metadata.loaderModule.translate&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.translate.apply(r,n)).then(function(a){var o=t.metadata.sourceMap;if(o){if("object"!=typeof o)throw new Error("load.metadata.sourceMap must be set to an object.");var i=t.address.split("!")[0];o.file&&o.file!=t.address||(o.file=i+"!transpiled"),(!o.sources||o.sources.length<=1&&(!o.sources[0]||o.sources[0]==t.address))&&(o.sources=[i])}return"string"==typeof a?t.source=a:w.call(this,"Plugin "+t.metadata.loader+" should return the source in translate, instead of setting load.source directly. This support will be deprecated."),e.apply(r,n)}):e.apply(r,n)}}),i("instantiate",function(e){return function(t){var r=this,n=!1;return t.metadata.loaderModule&&t.metadata.loaderModule.instantiate&&!r.builder&&"defined"!=t.metadata.format?Promise.resolve(t.metadata.loaderModule.instantiate.call(r,t,function(t){if(n)throw new Error("Instantiate must only be called once.");return n=!0,e.call(r,t)})).then(function(a){return n?a:(t.metadata.entry=M(),t.metadata.entry.execute=function(){return a},t.metadata.entry.deps=t.metadata.deps,t.metadata.format="defined",e.call(r,t))}):e.call(r,t)}})}();var se=["browser","node","dev","build","production","default"],le=/#\{[^\}]+\}/;i("normalize",function(e){return function(t,r,n){var a=this;return L.call(a,t,r).then(function(t){return e.call(a,t,r,n)}).then(function(e){return C.call(a,e,r)})}}),function(){i("fetch",function(e){return function(t){var r=t.metadata.alias,n=t.metadata.deps||[];if(r){t.metadata.format="defined";var a=M();return this.defined[t.name]=a,a.declarative=!0,a.deps=n.concat([r]),a.declare=function(e){return{setters:[function(t){for(var r in t)e(r,t[r]);t.__useDefault&&(a.module.exports.__useDefault=!0)}],execute:function(){}}},""}return e.call(this,t)}})}(),function(){function e(e,t,r){for(var n,a=t.split(".");a.length>1;)n=a.shift(),e=e[n]=e[n]||{};n=a.shift(),n in e||(e[n]=r)}s(function(e){return function(){this.meta={},e.call(this)}}),i("locate",function(e){return function(t){var r,n=this.meta,a=t.name,o=0;for(var i in n)if(r=i.indexOf("*"),r!==-1&&i.substr(0,r)===a.substr(0,r)&&i.substr(r+1)===a.substr(a.length-i.length+r+1)){var s=i.split("/").length;s>o&&(o=s),v(t.metadata,n[i],o!=s)}return n[a]&&v(t.metadata,n[a]),e.call(this,t)}});var t=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,r=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;i("translate",function(n){return function(a){if("defined"==a.metadata.format)return a.metadata.deps=a.metadata.deps||[],Promise.resolve(a.source);var o=a.source.match(t);if(o)for(var i=o[0].match(r),s=0;s<i.length;s++){var l=i[s],u=l.length,d=l.substr(0,1);if(";"==l.substr(u-1,1)&&u--,'"'==d||"'"==d){var c=l.substr(1,l.length-3),f=c.substr(0,c.indexOf(" "));if(f){var m=c.substr(f.length+1,c.length-f.length-1);"[]"==f.substr(f.length-2,2)?(f=f.substr(0,f.length-2),a.metadata[f]=a.metadata[f]||[],a.metadata[f].push(m)):a.metadata[f]instanceof Array?(w.call(this,"Module "+a.name+' contains deprecated "deps '+m+'" meta syntax.\nThis should be updated to "deps[] '+m+'" for pushing to array meta.'),a.metadata[f].push(m)):e(a.metadata,f,m)}else a.metadata[c]=!0}}return n.apply(this,arguments)}})}(),function(){s(function(e){return function(){e.call(this),this.bundles={},this._loader.loadedBundles={}}}),i("locate",function(e){return function(t){var r=this,n=!1;if(!(t.name in r.defined))for(var a in r.bundles){for(var o=0;o<r.bundles[a].length;o++){var i=r.bundles[a][o];if(i==t.name){n=!0;break}if(i.indexOf("*")!=-1){var s=i.split("*");if(2!=s.length){r.bundles[a].splice(o--,1);continue}if(t.name.substring(0,s[0].length)==s[0]&&t.name.substr(t.name.length-s[1].length,s[1].length)==s[1]&&t.name.substr(s[0].length,t.name.length-s[1].length-s[0].length).indexOf("/")==-1){n=!0;break}}}if(n)return r.import(a).then(function(){return e.call(r,t)})}return e.call(r,t)}})}(),function(){s(function(e){return function(){e.call(this),this.depCache={}}}),i("locate",function(e){return function(t){var r=this,n=r.depCache[t.name];if(n)for(var a=0;a<n.length;a++)r.import(n[a],t.name);return e.call(r,t)}})}(),X=new a,e.SystemJS=X,X.version="0.19.39 Standard","object"==typeof module&&module.exports&&"object"==typeof exports&&(module.exports=X),e.System=X}("undefined"!=typeof self?self:global)}var t="undefined"==typeof Promise;if("undefined"!=typeof document){var r=document.getElementsByTagName("script");if($__curScript=r[r.length-1],document.currentScript&&($__curScript.defer||$__curScript.async)&&($__curScript=document.currentScript),t){var n=$__curScript.src,a=n.substr(0,n.lastIndexOf("/")+1);window.systemJSBootstrap=e,document.write('<script type="text/javascript" src="'+a+'system-polyfills.js"></script>')}else e()}else if("undefined"!=typeof importScripts){var a="";try{throw new Error("_")}catch(e){e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){$__curScript={src:t},a=t.replace(/\/[^\/]*$/,"/")})}t&&importScripts(a+"system-polyfills.js"),e()}else $__curScript="undefined"!=typeof __filename?{src:__filename}:null,e()}();
-//# sourceMappingURL=system.js.map
diff --git a/thirdparty/systemjs/dist/system.js.map b/thirdparty/systemjs/dist/system.js.map
deleted file mode 100644
index 95326bbe5..000000000
--- a/thirdparty/systemjs/dist/system.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["system.src.js"],"names":["bootstrap","global","URLPolyfill","url","baseURL","TypeError","m","String","replace","match","RangeError","protocol","username","password","host","hostname","port","pathname","search","hash","undefined","base","flag","slice","lastIndexOf","output","p","pop","push","join","this","origin","href","self","__global","addToError","err","msg","originalErr","stack","message","toString","split","newStack","i","length","$__curScript","indexOf","src","newMsg","substr","isBrowser","isWindows","newErr","errArgs","Error","fileName","lineNumber","Module","Loader","options","_loader","loaderObj","loads","modules","importPromises","moduleRecords","defineProperty","get","SystemJSLoader","call","paths","systemJSConstructor","SystemProto","hook","name","prototype","hookConstructor","isAbsolute","absURLRegEx","isRel","isPlain","urlResolve","parent","baseURI","URL","baseURIObj","applyPaths","loader","wildcard","pathMatch","maxWildcardPrefixLen","pathsCache","hasOwnProperty","path","pathParts","wildcardPrefixLen","outPath","group","deps","names","indices","l","index","getESModule","exports","esModule","getOwnPropertyDescriptor","defineOrCopyProperty","extend","value","targetObj","sourceObj","propName","d","Object","ex","a","b","prepend","extendMeta","val","Array","concat","extendPkgConfig","pkgCfgA","pkgCfgB","pkgName","warnInvalidProperties","prop","map","meta","depCache","dNormalized","coreResolve","warn","setPkgConfig","cfg","prependConfig","pkg","packages","basePkg","main","warnings","console","readMemberExpression","pParts","shift","getMapMatch","bestMatch","bestMatchLength","curMatchLength","prepareBaseURL","setProduction","isProduction","isBuilder","set","envModule","newModule","browser","node","_nodeRequire","production","dev","build","default","getNodeModule","parentModuleContext","_nodeModulePaths","require","parentName","mapMatch","has","builder","envSet","envCallback","browserConfig","nodeConfig","devConfig","buildConfig","productionConfig","detectRegisterFormat","source","leadingCommentAndMeta","leadingCommentAndMetaRegEx","createEntry","originalIndices","declare","execute","executingRequire","declarative","normalizedDeps","groupIndex","evaluated","module","esmExports","getGlobalValue","globalValue","first","parseCondition","condition","conditionExport","conditionModule","negation","conditionExportIndex","sysConditions","negate","serializeCondition","conditionObj","resolveCondition","bool","normalize","then","normalizedCondition","load","q","interpolateConditional","conditionalMatch","interpolationRegEx","Promise","resolve","conditionValue","booleanConditional","booleanIndex","isWorker","window","importScripts","document","process","platform","assert","item","thisLen","e","obj","opt","getElementsByTagName","bases","location","cwd","nativeURL","createLoad","status","anonCnt","linkSets","dependencies","metadata","loadModule","asyncStartLoadPartwayThrough","step","address","moduleName","moduleMetadata","moduleSource","moduleAddress","requestLoad","request","refererName","refererAddress","reject","proceedToLocate","proceedToFetch","locate","proceedToTranslate","fetch","translate","instantiate","instantiateResult","depsList","loadPromises","depLoad","key","addLoadToLinkSet","all","updateLinkSetOnLoad","exc","exception","linkSetFailed","stepState","existingLoad","done","linkSet","createLinkSet","startingLoad","loadingCount","j","doLink","error","link","_newModule","finishLoad","abrupt","checkError","pLoad","dep","failed","linkIndex","splice","globalLoadsIndex","trace","depMap","forEach","loadIndex","doDynamicExecute","linkError","createImportPromise","promise","constructor","define","delete","import","parentAddress","sourcePromise","pNames","getOwnPropertyNames","configurable","enumerable","freeze","referrerName","referrerAddress","System","fetchTextFromURL","XMLHttpRequest","authorization","fulfill","xhr","responseText","statusText","sameDomain","doTimeout","domainCheck","exec","XDomainRequest","onload","onerror","ontimeout","onprogress","timeout","onreadystatechange","readyState","addEventListener","open","setRequestHeader","withCredentials","setTimeout","send","fs","readFile","data","dataString","opts","headers","Accept","credentials","r","ok","text","transpile","transpiler","pluginLoader","__useDefault","transpileFunction","Compiler","traceurTranspile","createLanguageService","typescriptTranspile","babelTranspile","traceur","traceurOptions","script","sourceMaps","filename","inputSourceMap","sourceMap","compiler","doTraceurCompile","compile","babel","babelOptions","code","ast","transform","ts","typescriptOptions","target","ScriptTarget","ES5","inlineSourceMap","ModuleKind","__exec","sourceMapString","hasBuffer","sourceMapPrefix","Buffer","btoa","unescape","encodeURIComponent","getSource","wrap","lastLineIndex","format","JSON","stringify","preExec","curLoad","callCounter","curSystem","SystemJS","postExec","scriptExec","head","body","documentElement","createElement","_e","apply","arguments","integrity","setAttribute","nonce","appendChild","removeChild","register","reduceRegister_","useVm","vm","supportsScriptExec","runInThisContext","eval","scripts","chrome","extension","navigator","userAgent","scriptSrc","defaultJSExtensions","pluginFirst","loaderErrorStack","skipExt","resolved","httpRequest","systemImport","systemTranslate","entry","parse","getConfig","curCurScript","config","isEnvConfig","checkHasConfig","transpilerRuntime","loadedTranspilerRuntime","bundles","packageConfigPaths","objMaps","v","defaultJSExtension","decanonicalize","pkgMatch","packageLength","Math","max","normalized","bundle","normalizedBundleDep","c","getPackage","curPkg","pkgLen","curPkgLen","addDefaultExtension","subPath","skipExtensions","defaultExtension","metaMatch","getMetaMatches","metaPattern","matchMeta","matchDepth","applyPackageConfigSync","mapPath","mapped","doMapSync","validMapping","normalizeSync","applyPackageConfig","doMap","doStringMap","conditionPromises","conditions","conditionValues","createPkgConfigPathObj","lastWildcard","regEx","RegExp","getPackageConfigMatch","configPath","exactMatch","packageConfigPath","packageName","loadPackageConfigPath","pkgConfigPath","configLoader","systemjs","pkgMeta","matchFn","wildcardIndex","dotRel","exactMeta","decanonicalized","isPlugin","parentPackageName","parentPackage","parentMap","parentMapMatch","pkgConfigMatch","isConfigured","configured","bestDepth","getInteractiveScriptLoad","interactiveScript","interactiveLoadingScripts","webWorkerImport","workerLoad","curRequire","ieEvents","s","isOpera","opera","attachEvent","loadingCnt","registerQueue","pushRegister","scriptLoad","complete","evt","cleanup","detachEvent","removeEventListener","async","crossOrigin","buildGroups","groups","depName","depEntry","defined","depGroupIndex","startEntry","curGroupDeclarative","linkDeclarativeModule","linkDynamicModule","ModuleRecord","getOrCreateModuleRecord","importers","declaration","locked","importerModule","importerIndex","setter","setters","id","depExports","depModule","len","getModule","ensureEvaluated","nameNormalized","__esModule","seen","registerDynamic","pushRegister_","amd","curMeta","del","doLoad","grouped","normalizePromises","esmRegEx","traceurRuntimeRegEx","babelHelpersRegEx","args","depInject","loadedTranspiler","transpilerPromise","loaderModule","originalName","file","sources","originalSource","$traceurRuntime","babelHelpers","__globalName","g","globals","gl","exportName","retrieveGlobal","prepareGlobal","encapsulateGlobal","reduceRegister","forEachGlobal","callback","keys","forEachGlobalValue","globalName","ignoredGlobalProps","globalSnapshot","encapsulate","curDefine","oldGlobals","singleGlobal","multipleExports","getCJSDeps","inLocation","locations","cjsRequireRegEx","lastIndex","commentRegEx","stringRegEx","stringLocations","commentLocations","cjsExportsRegEx","hashBangRegEx","metaDeps","cjsRequireDetection","_require","requireResolve","cjsDeferDepsExecute","pathVars","getPathVars","__cjsWrapper","dirname","cjsWrapper","stripOrigin","windowOrigin","parentId","moduleId","pluginIndex","amdDefine","requireIndex","params","fnBracketRegEx","requireAlias","wsRegEx","requireRegEx","requireRegExs","cjsRequirePre","cjsRequirePost","errback","referer","dynamicRequires","factory","req","contextualRequire","depValues","uri","moduleIndex","exportsIndex","toUrl","amdRequire","amdRegEx","builderExecute","getParentName","parentPluginIndex","parsePlugin","argumentName","pluginName","argument","plugin","combinePluginParts","checkDefaultExtension","arg","createNormalizeSync","parsed","pluginSyntaxIndex","loaderNormalized","result","calledInstantiate","alias","aliasDeps","_export","setMetaProperty","curPart","depth","metaRegEx","metaPartRegEx","metaParts","firstChar","metaString","metaName","metaValue","loadedBundles","matched","curModule","parts","substring","version","doPolyfill","currentScript","defer","curPath","basePath","systemJSBootstrap","write","__filename"],"mappings":";;;CAGA,WACA,QAASA,MACT,SAAUC,GACV,QAASC,GAAYC,EAAKC,GACxB,GAAkB,gBAAPD,GACT,KAAM,IAAIE,WAAU,uBACtB,IAAIC,GAAIC,OAAOJ,GAAKK,QAAQ,aAAc,IAAIC,MAAM,mHACpD,KAAKH,EACH,KAAM,IAAII,YAAW,qBACvB,IAAIC,GAAWL,EAAE,IAAM,GACnBM,EAAWN,EAAE,IAAM,GACnBO,EAAWP,EAAE,IAAM,GACnBQ,EAAOR,EAAE,IAAM,GACfS,EAAWT,EAAE,IAAM,GACnBU,EAAOV,EAAE,IAAM,GACfW,EAAWX,EAAE,IAAM,GACnBY,EAASZ,EAAE,IAAM,GACjBa,EAAOb,EAAE,IAAM,EACnB,IAAgBc,SAAZhB,EAAuB,CACzB,GAAIiB,GAAOjB,YAAmBF,GAAcE,EAAU,GAAIF,GAAYE,GAClEkB,GAAQX,IAAaG,IAASF,GAC9BU,GAASL,GAAaC,IACxBA,EAASG,EAAKH,QACZI,GAAwB,MAAhBL,EAAS,KACnBA,EAAYA,IAAcI,EAAKP,OAAQO,EAAKT,UAAcS,EAAKJ,SAAiB,GAAN,KAAYI,EAAKJ,SAASM,MAAM,EAAGF,EAAKJ,SAASO,YAAY,KAAO,GAAKP,EAAYI,EAAKJ,SAEtK,IAAIQ,KACJR,GAAST,QAAQ,kBAAmB,IACjCA,QAAQ,iBAAkB,KAC1BA,QAAQ,UAAW,QACnBA,QAAQ,aAAc,SAAUkB,GACrB,QAANA,EACFD,EAAOE,MAEPF,EAAOG,KAAKF,KAElBT,EAAWQ,EAAOI,KAAK,IAAIrB,QAAQ,MAAuB,MAAhBS,EAAS,GAAa,IAAM,IAClEK,IACFN,EAAOK,EAAKL,KACZD,EAAWM,EAAKN,SAChBD,EAAOO,EAAKP,KACZD,EAAWQ,EAAKR,SAChBD,EAAWS,EAAKT,UAEbD,IACHA,EAAWU,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AAU9oB,aAAaE,IACvB6oB,EAAWD,EAAQ1oB,OAAO,EAAG0oB,EAAQpqB,YAAY,KAAO,EAC5DyM,QAAO6d,kBAAoB9rB,EAC3BmO,SAAS4d,MACP,uCAA8CF,EAAW,sCAI3D7rB,SAIC,IAA6B,mBAAlBkO,eAA+B,CAC7C,GAAI2d,GAAW,EACf,KACE,KAAM,IAAItoB,OAAM,KAChB,MAAOkL,GACPA,EAAElM,MAAM/B,QAAQ,iCAAkC,SAASF,EAAGH,GAC5D2C,cAAiBE,IAAK7C,GACtB0rB,EAAW1rB,EAAIK,QAAQ,YAAa,OAGpCirB,GACFvd,cAAc2d,EAAW,uBAC3B7rB,QAGA8C,cAAoC,mBAAdkpB,aAA8BhpB,IAAKgpB,YAAe,KACxEhsB"} \ No newline at end of file
diff --git a/thirdparty/systemjs/dist/system.src.js b/thirdparty/systemjs/dist/system.src.js
deleted file mode 100644
index 3734388df..000000000
--- a/thirdparty/systemjs/dist/system.src.js
+++ /dev/null
@@ -1,5153 +0,0 @@
-/*
- * SystemJS v0.19.39
- */
-(function() {
-function bootstrap() {// from https://gist.github.com/Yaffle/1088850
-(function(global) {
-function URLPolyfill(url, baseURL) {
- if (typeof url != 'string')
- throw new TypeError('URL must be a string');
- var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
- if (!m)
- throw new RangeError('Invalid URL format');
- var protocol = m[1] || "";
- var username = m[2] || "";
- var password = m[3] || "";
- var host = m[4] || "";
- var hostname = m[5] || "";
- var port = m[6] || "";
- var pathname = m[7] || "";
- var search = m[8] || "";
- var hash = m[9] || "";
- if (baseURL !== undefined) {
- var base = baseURL instanceof URLPolyfill ? baseURL : new URLPolyfill(baseURL);
- var flag = !protocol && !host && !username;
- if (flag && !pathname && !search)
- search = base.search;
- if (flag && pathname[0] !== "/")
- pathname = (pathname ? (((base.host || base.username) && !base.pathname ? "/" : "") + base.pathname.slice(0, base.pathname.lastIndexOf("/") + 1) + pathname) : base.pathname);
- // dot segments removal
- var output = [];
- pathname.replace(/^(\.\.?(\/|$))+/, "")
- .replace(/\/(\.(\/|$))+/g, "/")
- .replace(/\/\.\.$/, "/../")
- .replace(/\/?[^\/]*/g, function (p) {
- if (p === "/..")
- output.pop();
- else
- output.push(p);
- });
- pathname = output.join("").replace(/^\//, pathname[0] === "/" ? "/" : "");
- if (flag) {
- port = base.port;
- hostname = base.hostname;
- host = base.host;
- password = base.password;
- username = base.username;
- }
- if (!protocol)
- protocol = base.protocol;
- }
-
- // convert URLs to use / always
- pathname = pathname.replace(/\\/g, '/');
-
- this.origin = host ? protocol + (protocol !== "" || host !== "" ? "//" : "") + host : "";
- this.href = protocol + (protocol && host || protocol == "file:" ? "//" : "") + (username !== "" ? username + (password !== "" ? ":" + password : "") + "@" : "") + host + pathname + search + hash;
- this.protocol = protocol;
- this.username = username;
- this.password = password;
- this.host = host;
- this.hostname = hostname;
- this.port = port;
- this.pathname = pathname;
- this.search = search;
- this.hash = hash;
-}
-global.URLPolyfill = URLPolyfill;
-})(typeof self != 'undefined' ? self : global);(function(__global) {
-
- var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined';
- var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
- var isWindows = typeof process != 'undefined' && typeof process.platform != 'undefined' && !!process.platform.match(/^win/);
-
- if (!__global.console)
- __global.console = { assert: function() {} };
-
- // IE8 support
- var indexOf = Array.prototype.indexOf || function(item) {
- for (var i = 0, thisLen = this.length; i < thisLen; i++) {
- if (this[i] === item) {
- return i;
- }
- }
- return -1;
- };
-
- var defineProperty;
- (function () {
- try {
- if (!!Object.defineProperty({}, 'a', {}))
- defineProperty = Object.defineProperty;
- }
- catch (e) {
- defineProperty = function(obj, prop, opt) {
- try {
- obj[prop] = opt.value || opt.get.call(obj);
- }
- catch(e) {}
- }
- }
- })();
-
- var errArgs = new Error(0, '_').fileName == '_';
-
- function addToError(err, msg) {
- // parse the stack removing loader code lines for simplification
- if (!err.originalErr) {
- var stack = ((err.message || err) + (err.stack ? '\n' + err.stack : '')).toString().split('\n');
- var newStack = [];
- for (var i = 0; i < stack.length; i++) {
- if (typeof $__curScript == 'undefined' || stack[i].indexOf($__curScript.src) == -1)
- newStack.push(stack[i]);
- }
- }
-
- var newMsg = '(SystemJS) ' + (newStack ? newStack.join('\n\t') : err.message.substr(11)) + '\n\t' + msg;
-
- // Convert file:/// URLs to paths in Node
- if (!isBrowser)
- newMsg = newMsg.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, '');
-
- var newErr = errArgs ? new Error(newMsg, err.fileName, err.lineNumber) : new Error(newMsg);
-
- newErr.stack = newMsg;
-
- // track the original error
- newErr.originalErr = err.originalErr || err;
-
- return newErr;
- }
-
- function __eval(source, debugName, context) {
- try {
- new Function(source).call(context);
- }
- catch(e) {
- throw addToError(e, 'Evaluating ' + debugName);
- }
- }
-
- var baseURI;
-
- // environent baseURI detection
- if (typeof document != 'undefined' && document.getElementsByTagName) {
- baseURI = document.baseURI;
-
- if (!baseURI) {
- var bases = document.getElementsByTagName('base');
- baseURI = bases[0] && bases[0].href || window.location.href;
- }
- }
- else if (typeof location != 'undefined') {
- baseURI = __global.location.href;
- }
-
- // sanitize out the hash and querystring
- if (baseURI) {
- baseURI = baseURI.split('#')[0].split('?')[0];
- baseURI = baseURI.substr(0, baseURI.lastIndexOf('/') + 1);
- }
- else if (typeof process != 'undefined' && process.cwd) {
- baseURI = 'file://' + (isWindows ? '/' : '') + process.cwd() + '/';
- if (isWindows)
- baseURI = baseURI.replace(/\\/g, '/');
- }
- else {
- throw new TypeError('No environment baseURI');
- }
-
- try {
- var nativeURL = new __global.URL('test:///').protocol == 'test:';
- }
- catch(e) {}
-
- var URL = nativeURL ? __global.URL : __global.URLPolyfill;
-
-/*
-*********************************************************************************************
-
- Dynamic Module Loader Polyfill
-
- - Implemented exactly to the former 2014-08-24 ES6 Specification Draft Rev 27, Section 15
- http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#august_24_2014_draft_rev_27
-
- - Functions are commented with their spec numbers, with spec differences commented.
-
- - Spec bugs are commented in this code with links.
-
- - Abstract functions have been combined where possible, and their associated functions
- commented.
-
- - Realm implementation is entirely omitted.
-
-*********************************************************************************************
-*/
-
-function Module() {}
-// http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag
-defineProperty(Module.prototype, 'toString', {
- value: function() {
- return 'Module';
- }
-});
-function Loader(options) {
- this._loader = {
- loaderObj: this,
- loads: [],
- modules: {},
- importPromises: {},
- moduleRecords: {}
- };
-
- // 26.3.3.6
- defineProperty(this, 'global', {
- get: function() {
- return __global;
- }
- });
-
- // 26.3.3.13 realm not implemented
-}
-
-(function() {
-
-// Some Helpers
-
-// logs a linkset snapshot for debugging
-/* function snapshot(loader) {
- console.log('---Snapshot---');
- for (var i = 0; i < loader.loads.length; i++) {
- var load = loader.loads[i];
- var linkSetLog = ' ' + load.name + ' (' + load.status + '): ';
-
- for (var j = 0; j < load.linkSets.length; j++) {
- linkSetLog += '{' + logloads(load.linkSets[j].loads) + '} ';
- }
- console.log(linkSetLog);
- }
- console.log('');
-}
-function logloads(loads) {
- var log = '';
- for (var k = 0; k < loads.length; k++)
- log += loads[k].name + (k != loads.length - 1 ? ' ' : '');
- return log;
-} */
-
-
-/* function checkInvariants() {
- // see https://bugs.ecmascript.org/show_bug.cgi?id=2603#c1
-
- var loads = System._loader.loads;
- var linkSets = [];
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
- console.assert(load.status == 'loading' || load.status == 'loaded', 'Each load is loading or loaded');
-
- for (var j = 0; j < load.linkSets.length; j++) {
- var linkSet = load.linkSets[j];
-
- for (var k = 0; k < linkSet.loads.length; k++)
- console.assert(loads.indexOf(linkSet.loads[k]) != -1, 'linkSet loads are a subset of loader loads');
-
- if (linkSets.indexOf(linkSet) == -1)
- linkSets.push(linkSet);
- }
- }
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
- for (var j = 0; j < linkSets.length; j++) {
- var linkSet = linkSets[j];
-
- if (linkSet.loads.indexOf(load) != -1)
- console.assert(load.linkSets.indexOf(linkSet) != -1, 'linkSet contains load -> load contains linkSet');
-
- if (load.linkSets.indexOf(linkSet) != -1)
- console.assert(linkSet.loads.indexOf(load) != -1, 'load contains linkSet -> linkSet contains load');
- }
- }
-
- for (var i = 0; i < linkSets.length; i++) {
- var linkSet = linkSets[i];
- for (var j = 0; j < linkSet.loads.length; j++) {
- var load = linkSet.loads[j];
-
- for (var k = 0; k < load.dependencies.length; k++) {
- var depName = load.dependencies[k].value;
- var depLoad;
- for (var l = 0; l < loads.length; l++) {
- if (loads[l].name != depName)
- continue;
- depLoad = loads[l];
- break;
- }
-
- // loading records are allowed not to have their dependencies yet
- // if (load.status != 'loading')
- // console.assert(depLoad, 'depLoad found');
-
- // console.assert(linkSet.loads.indexOf(depLoad) != -1, 'linkset contains all dependencies');
- }
- }
- }
-} */
-
- // 15.2.3 - Runtime Semantics: Loader State
-
- // 15.2.3.11
- function createLoaderLoad(object) {
- return {
- // modules is an object for ES5 implementation
- modules: {},
- loads: [],
- loaderObj: object
- };
- }
-
- // 15.2.3.2 Load Records and LoadRequest Objects
-
- var anonCnt = 0;
-
- // 15.2.3.2.1
- function createLoad(name) {
- return {
- status: 'loading',
- name: name || '<Anonymous' + ++anonCnt + '>',
- linkSets: [],
- dependencies: [],
- metadata: {}
- };
- }
-
- // 15.2.3.2.2 createLoadRequestObject, absorbed into calling functions
-
- // 15.2.4
-
- // 15.2.4.1
- function loadModule(loader, name, options) {
- return new Promise(asyncStartLoadPartwayThrough({
- step: options.address ? 'fetch' : 'locate',
- loader: loader,
- moduleName: name,
- // allow metadata for import https://bugs.ecmascript.org/show_bug.cgi?id=3091
- moduleMetadata: options && options.metadata || {},
- moduleSource: options.source,
- moduleAddress: options.address
- }));
- }
-
- // 15.2.4.2
- function requestLoad(loader, request, refererName, refererAddress) {
- // 15.2.4.2.1 CallNormalize
- return new Promise(function(resolve, reject) {
- resolve(loader.loaderObj.normalize(request, refererName, refererAddress));
- })
- // 15.2.4.2.2 GetOrCreateLoad
- .then(function(name) {
- var load;
- if (loader.modules[name]) {
- load = createLoad(name);
- load.status = 'linked';
- // https://bugs.ecmascript.org/show_bug.cgi?id=2795
- load.module = loader.modules[name];
- return load;
- }
-
- for (var i = 0, l = loader.loads.length; i < l; i++) {
- load = loader.loads[i];
- if (load.name != name)
- continue;
- return load;
- }
-
- load = createLoad(name);
- loader.loads.push(load);
-
- proceedToLocate(loader, load);
-
- return load;
- });
- }
-
- // 15.2.4.3
- function proceedToLocate(loader, load) {
- proceedToFetch(loader, load,
- Promise.resolve()
- // 15.2.4.3.1 CallLocate
- .then(function() {
- return loader.loaderObj.locate({ name: load.name, metadata: load.metadata });
- })
- );
- }
-
- // 15.2.4.4
- function proceedToFetch(loader, load, p) {
- proceedToTranslate(loader, load,
- p
- // 15.2.4.4.1 CallFetch
- .then(function(address) {
- // adjusted, see https://bugs.ecmascript.org/show_bug.cgi?id=2602
- if (load.status != 'loading')
- return;
- load.address = address;
-
- return loader.loaderObj.fetch({ name: load.name, metadata: load.metadata, address: address });
- })
- );
- }
-
- // 15.2.4.5
- function proceedToTranslate(loader, load, p) {
- p
- // 15.2.4.5.1 CallTranslate
- .then(function(source) {
- if (load.status != 'loading')
- return;
-
- load.address = load.address || load.name;
-
- return Promise.resolve(loader.loaderObj.translate({ name: load.name, metadata: load.metadata, address: load.address, source: source }))
-
- // 15.2.4.5.2 CallInstantiate
- .then(function(source) {
- load.source = source;
- return loader.loaderObj.instantiate({ name: load.name, metadata: load.metadata, address: load.address, source: source });
- })
-
- // 15.2.4.5.3 InstantiateSucceeded
- .then(function(instantiateResult) {
- if (instantiateResult === undefined)
- throw new TypeError('Declarative modules unsupported in the polyfill.');
-
- if (typeof instantiateResult != 'object')
- throw new TypeError('Invalid instantiate return value');
-
- load.depsList = instantiateResult.deps || [];
- load.execute = instantiateResult.execute;
- })
- // 15.2.4.6 ProcessLoadDependencies
- .then(function() {
- load.dependencies = [];
- var depsList = load.depsList;
-
- var loadPromises = [];
- for (var i = 0, l = depsList.length; i < l; i++) (function(request, index) {
- loadPromises.push(
- requestLoad(loader, request, load.name, load.address)
-
- // 15.2.4.6.1 AddDependencyLoad (load is parentLoad)
- .then(function(depLoad) {
-
- // adjusted from spec to maintain dependency order
- // this is due to the System.register internal implementation needs
- load.dependencies[index] = {
- key: request,
- value: depLoad.name
- };
-
- if (depLoad.status != 'linked') {
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++)
- addLoadToLinkSet(linkSets[i], depLoad);
- }
-
- // console.log('AddDependencyLoad ' + depLoad.name + ' for ' + load.name);
- // snapshot(loader);
- })
- );
- })(depsList[i], i);
-
- return Promise.all(loadPromises);
- })
-
- // 15.2.4.6.2 LoadSucceeded
- .then(function() {
- // console.log('LoadSucceeded ' + load.name);
- // snapshot(loader);
-
- load.status = 'loaded';
-
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++)
- updateLinkSetOnLoad(linkSets[i], load);
- });
- })
- // 15.2.4.5.4 LoadFailed
- ['catch'](function(exc) {
- load.status = 'failed';
- load.exception = exc;
-
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++) {
- linkSetFailed(linkSets[i], load, exc);
- }
-
- console.assert(load.linkSets.length == 0, 'linkSets not removed');
- });
- }
-
- // 15.2.4.7 PromiseOfStartLoadPartwayThrough absorbed into calling functions
-
- // 15.2.4.7.1
- function asyncStartLoadPartwayThrough(stepState) {
- return function(resolve, reject) {
- var loader = stepState.loader;
- var name = stepState.moduleName;
- var step = stepState.step;
-
- if (loader.modules[name])
- throw new TypeError('"' + name + '" already exists in the module table');
-
- // adjusted to pick up existing loads
- var existingLoad;
- for (var i = 0, l = loader.loads.length; i < l; i++) {
- if (loader.loads[i].name == name) {
- existingLoad = loader.loads[i];
-
- if (step == 'translate' && !existingLoad.source) {
- existingLoad.address = stepState.moduleAddress;
- proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));
- }
-
- // a primary load -> use that existing linkset if it is for the direct load here
- // otherwise create a new linkset unit
- if (existingLoad.linkSets.length && existingLoad.linkSets[0].loads[0].name == existingLoad.name)
- return existingLoad.linkSets[0].done.then(function() {
- resolve(existingLoad);
- });
- }
- }
-
- var load = existingLoad || createLoad(name);
-
- load.metadata = stepState.moduleMetadata;
-
- var linkSet = createLinkSet(loader, load);
-
- loader.loads.push(load);
-
- resolve(linkSet.done);
-
- if (step == 'locate')
- proceedToLocate(loader, load);
-
- else if (step == 'fetch')
- proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));
-
- else {
- console.assert(step == 'translate', 'translate step');
- load.address = stepState.moduleAddress;
- proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));
- }
- }
- }
-
- // Declarative linking functions run through alternative implementation:
- // 15.2.5.1.1 CreateModuleLinkageRecord not implemented
- // 15.2.5.1.2 LookupExport not implemented
- // 15.2.5.1.3 LookupModuleDependency not implemented
-
- // 15.2.5.2.1
- function createLinkSet(loader, startingLoad) {
- var linkSet = {
- loader: loader,
- loads: [],
- startingLoad: startingLoad, // added see spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
- loadingCount: 0
- };
- linkSet.done = new Promise(function(resolve, reject) {
- linkSet.resolve = resolve;
- linkSet.reject = reject;
- });
- addLoadToLinkSet(linkSet, startingLoad);
- return linkSet;
- }
- // 15.2.5.2.2
- function addLoadToLinkSet(linkSet, load) {
- if (load.status == 'failed')
- return;
-
- for (var i = 0, l = linkSet.loads.length; i < l; i++)
- if (linkSet.loads[i] == load)
- return;
-
- linkSet.loads.push(load);
- load.linkSets.push(linkSet);
-
- // adjustment, see https://bugs.ecmascript.org/show_bug.cgi?id=2603
- if (load.status != 'loaded') {
- linkSet.loadingCount++;
- }
-
- var loader = linkSet.loader;
-
- for (var i = 0, l = load.dependencies.length; i < l; i++) {
- if (!load.dependencies[i])
- continue;
-
- var name = load.dependencies[i].value;
-
- if (loader.modules[name])
- continue;
-
- for (var j = 0, d = loader.loads.length; j < d; j++) {
- if (loader.loads[j].name != name)
- continue;
-
- addLoadToLinkSet(linkSet, loader.loads[j]);
- break;
- }
- }
- // console.log('add to linkset ' + load.name);
- // snapshot(linkSet.loader);
- }
-
- // linking errors can be generic or load-specific
- // this is necessary for debugging info
- function doLink(linkSet) {
- var error = false;
- try {
- link(linkSet, function(load, exc) {
- linkSetFailed(linkSet, load, exc);
- error = true;
- });
- }
- catch(e) {
- linkSetFailed(linkSet, null, e);
- error = true;
- }
- return error;
- }
-
- // 15.2.5.2.3
- function updateLinkSetOnLoad(linkSet, load) {
- // console.log('update linkset on load ' + load.name);
- // snapshot(linkSet.loader);
-
- console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
-
- linkSet.loadingCount--;
-
- if (linkSet.loadingCount > 0)
- return;
-
- // adjusted for spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
- var startingLoad = linkSet.startingLoad;
-
- // non-executing link variation for loader tracing
- // on the server. Not in spec.
- /***/
- if (linkSet.loader.loaderObj.execute === false) {
- var loads = [].concat(linkSet.loads);
- for (var i = 0, l = loads.length; i < l; i++) {
- var load = loads[i];
- load.module = {
- name: load.name,
- module: _newModule({}),
- evaluated: true
- };
- load.status = 'linked';
- finishLoad(linkSet.loader, load);
- }
- return linkSet.resolve(startingLoad);
- }
- /***/
-
- var abrupt = doLink(linkSet);
-
- if (abrupt)
- return;
-
- console.assert(linkSet.loads.length == 0, 'loads cleared');
-
- linkSet.resolve(startingLoad);
- }
-
- // 15.2.5.2.4
- function linkSetFailed(linkSet, load, exc) {
- var loader = linkSet.loader;
- var requests;
-
- checkError:
- if (load) {
- if (linkSet.loads[0].name == load.name) {
- exc = addToError(exc, 'Error loading ' + load.name);
- }
- else {
- for (var i = 0; i < linkSet.loads.length; i++) {
- var pLoad = linkSet.loads[i];
- for (var j = 0; j < pLoad.dependencies.length; j++) {
- var dep = pLoad.dependencies[j];
- if (dep.value == load.name) {
- exc = addToError(exc, 'Error loading ' + load.name + ' as "' + dep.key + '" from ' + pLoad.name);
- break checkError;
- }
- }
- }
- exc = addToError(exc, 'Error loading ' + load.name + ' from ' + linkSet.loads[0].name);
- }
- }
- else {
- exc = addToError(exc, 'Error linking ' + linkSet.loads[0].name);
- }
-
-
- var loads = linkSet.loads.concat([]);
- for (var i = 0, l = loads.length; i < l; i++) {
- var load = loads[i];
-
- // store all failed load records
- loader.loaderObj.failed = loader.loaderObj.failed || [];
- if (indexOf.call(loader.loaderObj.failed, load) == -1)
- loader.loaderObj.failed.push(load);
-
- var linkIndex = indexOf.call(load.linkSets, linkSet);
- console.assert(linkIndex != -1, 'link not present');
- load.linkSets.splice(linkIndex, 1);
- if (load.linkSets.length == 0) {
- var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
- if (globalLoadsIndex != -1)
- linkSet.loader.loads.splice(globalLoadsIndex, 1);
- }
- }
- linkSet.reject(exc);
- }
-
- // 15.2.5.2.5
- function finishLoad(loader, load) {
- // add to global trace if tracing
- if (loader.loaderObj.trace) {
- if (!loader.loaderObj.loads)
- loader.loaderObj.loads = {};
- var depMap = {};
- load.dependencies.forEach(function(dep) {
- depMap[dep.key] = dep.value;
- });
- loader.loaderObj.loads[load.name] = {
- name: load.name,
- deps: load.dependencies.map(function(dep){ return dep.key }),
- depMap: depMap,
- address: load.address,
- metadata: load.metadata,
- source: load.source
- };
- }
- // if not anonymous, add to the module table
- if (load.name) {
- console.assert(!loader.modules[load.name] || loader.modules[load.name].module === load.module.module, 'load not in module table');
- loader.modules[load.name] = load.module;
- }
- var loadIndex = indexOf.call(loader.loads, load);
- if (loadIndex != -1)
- loader.loads.splice(loadIndex, 1);
- for (var i = 0, l = load.linkSets.length; i < l; i++) {
- loadIndex = indexOf.call(load.linkSets[i].loads, load);
- if (loadIndex != -1)
- load.linkSets[i].loads.splice(loadIndex, 1);
- }
- load.linkSets.splice(0, load.linkSets.length);
- }
-
- function doDynamicExecute(linkSet, load, linkError) {
- try {
- var module = load.execute();
- }
- catch(e) {
- linkError(load, e);
- return;
- }
- if (!module || !(module instanceof Module))
- linkError(load, new TypeError('Execution must define a Module instance'));
- else
- return module;
- }
-
- // 26.3 Loader
-
- // 26.3.1.1
- // defined at top
-
- // importPromises adds ability to import a module twice without error - https://bugs.ecmascript.org/show_bug.cgi?id=2601
- function createImportPromise(loader, name, promise) {
- var importPromises = loader._loader.importPromises;
- return importPromises[name] = promise.then(function(m) {
- importPromises[name] = undefined;
- return m;
- }, function(e) {
- importPromises[name] = undefined;
- throw e;
- });
- }
-
- Loader.prototype = {
- // 26.3.3.1
- constructor: Loader,
- // 26.3.3.2
- define: function(name, source, options) {
- // check if already defined
- if (this._loader.importPromises[name])
- throw new TypeError('Module is already loading.');
- return createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
- step: 'translate',
- loader: this._loader,
- moduleName: name,
- moduleMetadata: options && options.metadata || {},
- moduleSource: source,
- moduleAddress: options && options.address
- })));
- },
- // 26.3.3.3
- 'delete': function(name) {
- var loader = this._loader;
- delete loader.importPromises[name];
- delete loader.moduleRecords[name];
- return loader.modules[name] ? delete loader.modules[name] : false;
- },
- // 26.3.3.4 entries not implemented
- // 26.3.3.5
- get: function(key) {
- if (!this._loader.modules[key])
- return;
- return this._loader.modules[key].module;
- },
- // 26.3.3.7
- has: function(name) {
- return !!this._loader.modules[name];
- },
- // 26.3.3.8
- 'import': function(name, parentName, parentAddress) {
- if (typeof parentName == 'object')
- parentName = parentName.name;
-
- // run normalize first
- var loaderObj = this;
-
- // added, see https://bugs.ecmascript.org/show_bug.cgi?id=2659
- return Promise.resolve(loaderObj.normalize(name, parentName))
- .then(function(name) {
- var loader = loaderObj._loader;
-
- if (loader.modules[name])
- return loader.modules[name].module;
-
- return loader.importPromises[name] || createImportPromise(loaderObj, name,
- loadModule(loader, name, {})
- .then(function(load) {
- delete loader.importPromises[name];
- return load.module.module;
- }));
- });
- },
- // 26.3.3.9 keys not implemented
- // 26.3.3.10
- load: function(name) {
- var loader = this._loader;
- if (loader.modules[name])
- return Promise.resolve();
- return loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
- step: 'locate',
- loader: loader,
- moduleName: name,
- moduleMetadata: {},
- moduleSource: undefined,
- moduleAddress: undefined
- }))
- .then(function() {
- delete loader.importPromises[name];
- }));
- },
- // 26.3.3.11
- module: function(source, options) {
- var load = createLoad();
- load.address = options && options.address;
- var linkSet = createLinkSet(this._loader, load);
- var sourcePromise = Promise.resolve(source);
- var loader = this._loader;
- var p = linkSet.done.then(function() {
- return load.module.module;
- });
- proceedToTranslate(loader, load, sourcePromise);
- return p;
- },
- // 26.3.3.12
- newModule: function (obj) {
- if (typeof obj != 'object')
- throw new TypeError('Expected object');
-
- var m = new Module();
-
- var pNames = [];
- if (Object.getOwnPropertyNames && obj != null)
- pNames = Object.getOwnPropertyNames(obj);
- else
- for (var key in obj)
- pNames.push(key);
-
- for (var i = 0; i < pNames.length; i++) (function(key) {
- defineProperty(m, key, {
- configurable: false,
- enumerable: true,
- get: function () {
- return obj[key];
- },
- set: function() {
- throw new Error('Module exports cannot be changed externally.');
- }
- });
- })(pNames[i]);
-
- if (Object.freeze)
- Object.freeze(m);
-
- return m;
- },
- // 26.3.3.14
- set: function(name, module) {
- if (!(module instanceof Module))
- throw new TypeError('Loader.set(' + name + ', module) must be a module');
- this._loader.modules[name] = {
- module: module
- };
- },
- // 26.3.3.15 values not implemented
- // 26.3.3.16 @@iterator not implemented
- // 26.3.3.17 @@toStringTag not implemented
-
- // 26.3.3.18.1
- normalize: function(name, referrerName, referrerAddress) {},
- // 26.3.3.18.2
- locate: function(load) {
- return load.name;
- },
- // 26.3.3.18.3
- fetch: function(load) {
- },
- // 26.3.3.18.4
- translate: function(load) {
- return load.source;
- },
- // 26.3.3.18.5
- instantiate: function(load) {
- }
- };
-
- var _newModule = Loader.prototype.newModule;
-
-/*
- * ES6 Module Declarative Linking Code
- */
- function link(linkSet, linkError) {
-
- var loader = linkSet.loader;
-
- if (!linkSet.loads.length)
- return;
-
- var loads = linkSet.loads.concat([]);
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
-
- var module = doDynamicExecute(linkSet, load, linkError);
- if (!module)
- return;
- load.module = {
- name: load.name,
- module: module
- };
- load.status = 'linked';
-
- finishLoad(loader, load);
- }
- }
-
-})();
-
-var System;
-
- var fetchTextFromURL;
- if (typeof XMLHttpRequest != 'undefined') {
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- var xhr = new XMLHttpRequest();
- var sameDomain = true;
- var doTimeout = false;
- if (!('withCredentials' in xhr)) {
- // check if same domain
- var domainCheck = /^(\w+:)?\/\/([^\/]+)/.exec(url);
- if (domainCheck) {
- sameDomain = domainCheck[2] === window.location.host;
- if (domainCheck[1])
- sameDomain &= domainCheck[1] === window.location.protocol;
- }
- }
- if (!sameDomain && typeof XDomainRequest != 'undefined') {
- xhr = new XDomainRequest();
- xhr.onload = load;
- xhr.onerror = error;
- xhr.ontimeout = error;
- xhr.onprogress = function() {};
- xhr.timeout = 0;
- doTimeout = true;
- }
- function load() {
- fulfill(xhr.responseText);
- }
- function error() {
- reject(new Error('XHR error' + (xhr.status ? ' (' + xhr.status + (xhr.statusText ? ' ' + xhr.statusText : '') + ')' : '') + ' loading ' + url));
- }
-
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4) {
- // in Chrome on file:/// URLs, status is 0
- if (xhr.status == 0) {
- if (xhr.responseText) {
- load();
- }
- else {
- // when responseText is empty, wait for load or error event
- // to inform if it is a 404 or empty file
- xhr.addEventListener('error', error);
- xhr.addEventListener('load', load);
- }
- }
- else if (xhr.status === 200) {
- load();
- }
- else {
- error();
- }
- }
- };
- xhr.open("GET", url, true);
-
- if (xhr.setRequestHeader) {
- xhr.setRequestHeader('Accept', 'application/x-es-module, */*');
- // can set "authorization: true" to enable withCredentials only
- if (authorization) {
- if (typeof authorization == 'string')
- xhr.setRequestHeader('Authorization', authorization);
- xhr.withCredentials = true;
- }
- }
-
- if (doTimeout) {
- setTimeout(function() {
- xhr.send();
- }, 0);
- } else {
- xhr.send(null);
- }
- };
- }
- else if (typeof require != 'undefined' && typeof process != 'undefined') {
- var fs;
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- if (url.substr(0, 8) != 'file:///')
- throw new Error('Unable to fetch "' + url + '". Only file URLs of the form file:/// allowed running in Node.');
- fs = fs || require('fs');
- if (isWindows)
- url = url.replace(/\//g, '\\').substr(8);
- else
- url = url.substr(7);
- return fs.readFile(url, function(err, data) {
- if (err) {
- return reject(err);
- }
- else {
- // Strip Byte Order Mark out if it's the leading char
- var dataString = data + '';
- if (dataString[0] === '\ufeff')
- dataString = dataString.substr(1);
-
- fulfill(dataString);
- }
- });
- };
- }
- else if (typeof self != 'undefined' && typeof self.fetch != 'undefined') {
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- var opts = {
- headers: {'Accept': 'application/x-es-module, */*'}
- };
-
- if (authorization) {
- if (typeof authorization == 'string')
- opts.headers['Authorization'] = authorization;
- opts.credentials = 'include';
- }
-
- fetch(url, opts)
- .then(function (r) {
- if (r.ok) {
- return r.text();
- } else {
- throw new Error('Fetch error: ' + r.status + ' ' + r.statusText);
- }
- })
- .then(fulfill, reject);
- }
- }
- else {
- throw new TypeError('No environment fetch API available.');
- }
-/*
- * Traceur, Babel and TypeScript transpile hook for Loader
- */
-var transpile = (function() {
-
- // use Traceur by default
- Loader.prototype.transpiler = 'traceur';
-
- function transpile(load) {
- var self = this;
-
- return Promise.resolve(__global[self.transpiler == 'typescript' ? 'ts' : self.transpiler]
- || (self.pluginLoader || self)['import'](self.transpiler))
- .then(function(transpiler) {
- if (transpiler.__useDefault)
- transpiler = transpiler['default'];
-
- var transpileFunction;
- if (transpiler.Compiler)
- transpileFunction = traceurTranspile;
- else if (transpiler.createLanguageService)
- transpileFunction = typescriptTranspile;
- else
- transpileFunction = babelTranspile;
-
- // note __moduleName will be part of the transformer meta in future when we have the spec for this
- return '(function(__moduleName){' + transpileFunction.call(self, load, transpiler) + '\n})("' + load.name + '");\n//# sourceURL=' + load.address + '!transpiled';
- });
- };
-
- function traceurTranspile(load, traceur) {
- var options = this.traceurOptions || {};
- options.modules = 'instantiate';
- options.script = false;
- if (options.sourceMaps === undefined)
- options.sourceMaps = 'inline';
- options.filename = load.address;
- options.inputSourceMap = load.metadata.sourceMap;
- options.moduleName = false;
-
- var compiler = new traceur.Compiler(options);
-
- return doTraceurCompile(load.source, compiler, options.filename);
- }
- function doTraceurCompile(source, compiler, filename) {
- try {
- return compiler.compile(source, filename);
- }
- catch(e) {
- // on older versions of traceur (<0.9.3), an array of errors is thrown
- // rather than a single error.
- if (e.length) {
- throw e[0];
- }
- throw e;
- }
- }
-
- function babelTranspile(load, babel) {
- var options = this.babelOptions || {};
- options.modules = 'system';
- if (options.sourceMap === undefined)
- options.sourceMap = 'inline';
- options.inputSourceMap = load.metadata.sourceMap;
- options.filename = load.address;
- options.code = true;
- options.ast = false;
-
- return babel.transform(load.source, options).code;
- }
-
- function typescriptTranspile(load, ts) {
- var options = this.typescriptOptions || {};
- options.target = options.target || ts.ScriptTarget.ES5;
- if (options.sourceMap === undefined)
- options.sourceMap = true;
- if (options.sourceMap && options.inlineSourceMap !== false)
- options.inlineSourceMap = true;
-
- options.module = ts.ModuleKind.System;
-
- return ts.transpile(load.source, options, load.address);
- }
-
- return transpile;
-})();
-// SystemJS Loader Class and Extension helpers
-function SystemJSLoader() {
- Loader.call(this);
-
- this.paths = {};
- this._loader.paths = {};
-
- systemJSConstructor.call(this);
-}
-
-// inline Object.create-style class extension
-function SystemProto() {};
-SystemProto.prototype = Loader.prototype;
-SystemJSLoader.prototype = new SystemProto();
-SystemJSLoader.prototype.constructor = SystemJSLoader;
-
-var systemJSConstructor;
-
-function hook(name, hook) {
- SystemJSLoader.prototype[name] = hook(SystemJSLoader.prototype[name] || function() {});
-}
-function hookConstructor(hook) {
- systemJSConstructor = hook(systemJSConstructor || function() {});
-}
-
-
-var absURLRegEx = /^[^\/]+:\/\//;
-function isAbsolute(name) {
- return name.match(absURLRegEx);
-}
-function isRel(name) {
- return (name[0] == '.' && (!name[1] || name[1] == '/' || name[1] == '.')) || name[0] == '/';
-}
-function isPlain(name) {
- return !isRel(name) && !isAbsolute(name);
-}
-
-var baseURIObj = new URL(baseURI);
-
-function urlResolve(name, parent) {
- // url resolution shortpaths
- if (name[0] == '.') {
- // dot-relative url normalization
- if (name[1] == '/' && name[2] != '.')
- return (parent && parent.substr(0, parent.lastIndexOf('/') + 1) || baseURI) + name.substr(2);
- }
- else if (name[0] != '/' && name.indexOf(':') == -1) {
- // plain parent normalization
- return (parent && parent.substr(0, parent.lastIndexOf('/') + 1) || baseURI) + name;
- }
-
- return new URL(name, parent && parent.replace(/#/g, '%05') || baseURIObj).href.replace(/%05/g, '#');
-}
-
-// NB no specification provided for System.paths, used ideas discussed in https://github.com/jorendorff/js-loaders/issues/25
-function applyPaths(loader, name) {
- // most specific (most number of slashes in path) match wins
- var pathMatch = '', wildcard, maxWildcardPrefixLen = 0;
-
- var paths = loader.paths;
- var pathsCache = loader._loader.paths;
-
- // check to see if we have a paths entry
- for (var p in paths) {
- if (paths.hasOwnProperty && !paths.hasOwnProperty(p))
- continue;
-
- // paths sanitization
- var path = paths[p];
- if (path !== pathsCache[p])
- path = paths[p] = pathsCache[p] = urlResolve(paths[p], isRel(paths[p]) ? baseURI : loader.baseURL);
-
- // exact path match
- if (p.indexOf('*') === -1) {
- if (name == p)
- return paths[p];
-
- // support trailing / in paths rules
- else if (name.substr(0, p.length - 1) == p.substr(0, p.length - 1) && (name.length < p.length || name[p.length - 1] == p[p.length - 1]) && (paths[p][paths[p].length - 1] == '/' || paths[p] == '')) {
- return paths[p].substr(0, paths[p].length - 1) + (name.length > p.length ? (paths[p] && '/' || '') + name.substr(p.length) : '');
- }
- }
- // wildcard path match
- else {
- var pathParts = p.split('*');
- if (pathParts.length > 2)
- throw new TypeError('Only one wildcard in a path is permitted');
-
- var wildcardPrefixLen = pathParts[0].length;
- if (wildcardPrefixLen >= maxWildcardPrefixLen &&
- name.substr(0, pathParts[0].length) == pathParts[0] &&
- name.substr(name.length - pathParts[1].length) == pathParts[1]) {
- maxWildcardPrefixLen = wildcardPrefixLen;
- pathMatch = p;
- wildcard = name.substr(pathParts[0].length, name.length - pathParts[1].length - pathParts[0].length);
- }
- }
- }
-
- var outPath = paths[pathMatch];
- if (typeof wildcard == 'string')
- outPath = outPath.replace('*', wildcard);
-
- return outPath;
-}
-
-function dedupe(deps) {
- var newDeps = [];
- for (var i = 0, l = deps.length; i < l; i++)
- if (indexOf.call(newDeps, deps[i]) == -1)
- newDeps.push(deps[i])
- return newDeps;
-}
-
-function group(deps) {
- var names = [];
- var indices = [];
- for (var i = 0, l = deps.length; i < l; i++) {
- var index = indexOf.call(names, deps[i]);
- if (index === -1) {
- names.push(deps[i]);
- indices.push([i]);
- }
- else {
- indices[index].push(i);
- }
- }
- return { names: names, indices: indices };
-}
-
-var getOwnPropertyDescriptor = true;
-try {
- Object.getOwnPropertyDescriptor({ a: 0 }, 'a');
-}
-catch(e) {
- getOwnPropertyDescriptor = false;
-}
-
-// converts any module.exports object into an object ready for SystemJS.newModule
-function getESModule(exports) {
- var esModule = {};
- // don't trigger getters/setters in environments that support them
- if ((typeof exports == 'object' || typeof exports == 'function') && exports !== __global) {
- if (getOwnPropertyDescriptor) {
- for (var p in exports) {
- // The default property is copied to esModule later on
- if (p === 'default')
- continue;
- defineOrCopyProperty(esModule, exports, p);
- }
- }
- else {
- extend(esModule, exports);
- }
- }
- esModule['default'] = exports;
- defineProperty(esModule, '__useDefault', {
- value: true
- });
- return esModule;
-}
-
-function defineOrCopyProperty(targetObj, sourceObj, propName) {
- try {
- var d;
- if (d = Object.getOwnPropertyDescriptor(sourceObj, propName))
- defineProperty(targetObj, propName, d);
- }
- catch (ex) {
- // Object.getOwnPropertyDescriptor threw an exception, fall back to normal set property
- // we dont need hasOwnProperty here because getOwnPropertyDescriptor would have returned undefined above
- targetObj[propName] = sourceObj[propName];
- return false;
- }
-}
-
-function extend(a, b, prepend) {
- var hasOwnProperty = b && b.hasOwnProperty;
- for (var p in b) {
- if (hasOwnProperty && !b.hasOwnProperty(p))
- continue;
- if (!prepend || !(p in a))
- a[p] = b[p];
- }
- return a;
-}
-
-// meta first-level extends where:
-// array + array appends
-// object + object extends
-// other properties replace
-function extendMeta(a, b, prepend) {
- var hasOwnProperty = b && b.hasOwnProperty;
- for (var p in b) {
- if (hasOwnProperty && !b.hasOwnProperty(p))
- continue;
- var val = b[p];
- if (!(p in a))
- a[p] = val;
- else if (val instanceof Array && a[p] instanceof Array)
- a[p] = [].concat(prepend ? val : a[p]).concat(prepend ? a[p] : val);
- else if (typeof val == 'object' && val !== null && typeof a[p] == 'object')
- a[p] = extend(extend({}, a[p]), val, prepend);
- else if (!prepend)
- a[p] = val;
- }
-}
-
-function extendPkgConfig(pkgCfgA, pkgCfgB, pkgName, loader, warnInvalidProperties) {
- for (var prop in pkgCfgB) {
- if (indexOf.call(['main', 'format', 'defaultExtension', 'basePath'], prop) != -1) {
- pkgCfgA[prop] = pkgCfgB[prop];
- }
- else if (prop == 'map') {
- extend(pkgCfgA.map = pkgCfgA.map || {}, pkgCfgB.map);
- }
- else if (prop == 'meta') {
- extend(pkgCfgA.meta = pkgCfgA.meta || {}, pkgCfgB.meta);
- }
- else if (prop == 'depCache') {
- for (var d in pkgCfgB.depCache) {
- var dNormalized;
-
- if (d.substr(0, 2) == './')
- dNormalized = pkgName + '/' + d.substr(2);
- else
- dNormalized = coreResolve.call(loader, d);
- loader.depCache[dNormalized] = (loader.depCache[dNormalized] || []).concat(pkgCfgB.depCache[d]);
- }
- }
- else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
- (!pkgCfgB.hasOwnProperty || pkgCfgB.hasOwnProperty(prop))) {
- warn.call(loader, '"' + prop + '" is not a valid package configuration option in package ' + pkgName);
- }
- }
-}
-
-// deeply-merge (to first level) config with any existing package config
-function setPkgConfig(loader, pkgName, cfg, prependConfig) {
- var pkg;
-
- // first package is config by reference for fast path, cloned after that
- if (!loader.packages[pkgName]) {
- pkg = loader.packages[pkgName] = cfg;
- }
- else {
- var basePkg = loader.packages[pkgName];
- pkg = loader.packages[pkgName] = {};
-
- extendPkgConfig(pkg, prependConfig ? cfg : basePkg, pkgName, loader, prependConfig);
- extendPkgConfig(pkg, prependConfig ? basePkg : cfg, pkgName, loader, !prependConfig);
- }
-
- // main object becomes main map
- if (typeof pkg.main == 'object') {
- pkg.map = pkg.map || {};
- pkg.map['./@main'] = pkg.main;
- pkg.main['default'] = pkg.main['default'] || './';
- pkg.main = '@main';
- }
-
- return pkg;
-}
-
-function warn(msg) {
- if (this.warnings && typeof console != 'undefined' && console.warn)
- console.warn(msg);
-}
-// we define a __exec for globally-scoped execution
-// used by module format implementations
-var __exec;
-
-(function() {
-
- var hasBuffer = typeof Buffer != 'undefined';
- try {
- if (hasBuffer && new Buffer('a').toString('base64') != 'YQ==')
- hasBuffer = false;
- }
- catch(e) {
- hasBuffer = false;
- }
-
- var sourceMapPrefix = '\n//# sourceMappingURL=data:application/json;base64,';
- function inlineSourceMap(sourceMapString) {
- if (hasBuffer)
- return sourceMapPrefix + new Buffer(sourceMapString).toString('base64');
- else if (typeof btoa != 'undefined')
- return sourceMapPrefix + btoa(unescape(encodeURIComponent(sourceMapString)));
- else
- return '';
- }
-
- function getSource(load, wrap) {
- var lastLineIndex = load.source.lastIndexOf('\n');
-
- // wrap ES formats with a System closure for System global encapsulation
- if (load.metadata.format == 'global')
- wrap = false;
-
- var sourceMap = load.metadata.sourceMap;
- if (sourceMap) {
- if (typeof sourceMap != 'object')
- throw new TypeError('load.metadata.sourceMap must be set to an object.');
-
- sourceMap = JSON.stringify(sourceMap);
- }
-
- return (wrap ? '(function(System, SystemJS) {' : '') + load.source + (wrap ? '\n})(System, System);' : '')
- // adds the sourceURL comment if not already present
- + (load.source.substr(lastLineIndex, 15) != '\n//# sourceURL='
- ? '\n//# sourceURL=' + load.address + (sourceMap ? '!transpiled' : '') : '')
- // add sourceMappingURL if load.metadata.sourceMap is set
- + (sourceMap && inlineSourceMap(sourceMap) || '');
- }
-
- var curLoad;
-
- // System.register, System.registerDynamic, AMD define pipeline
- // if currently evalling code here, immediately reduce the registered entry against the load record
- hook('pushRegister_', function() {
- return function(register) {
- if (!curLoad)
- return false;
-
- this.reduceRegister_(curLoad, register);
- return true;
- };
- });
-
- // System clobbering protection (mostly for Traceur)
- var curSystem;
- var callCounter = 0;
- function preExec(loader, load) {
- curLoad = load;
- if (callCounter++ == 0)
- curSystem = __global.System;
- __global.System = __global.SystemJS = loader;
- }
- function postExec() {
- if (--callCounter == 0)
- __global.System = __global.SystemJS = curSystem;
- curLoad = undefined;
- }
-
- var useVm;
- var vm;
- __exec = function(load) {
- if (!load.source)
- return;
- if ((load.metadata.integrity || load.metadata.nonce) && supportsScriptExec)
- return scriptExec.call(this, load);
- try {
- preExec(this, load);
- curLoad = load;
- // global scoped eval for node (avoids require scope leak)
- if (!vm && this._nodeRequire) {
- vm = this._nodeRequire('vm');
- useVm = vm.runInThisContext("typeof System !== 'undefined' && System") === this;
- }
- if (useVm)
- vm.runInThisContext(getSource(load, true), { filename: load.address + (load.metadata.sourceMap ? '!transpiled' : '') });
- else
- (0, eval)(getSource(load, true));
- postExec();
- }
- catch(e) {
- postExec();
- throw addToError(e, 'Evaluating ' + load.address);
- }
- };
-
- var supportsScriptExec = false;
- if (isBrowser && typeof document != 'undefined' && document.getElementsByTagName) {
- var scripts = document.getElementsByTagName('script');
- $__curScript = scripts[scripts.length - 1];
-
- if (!(window.chrome && window.chrome.extension || navigator.userAgent.match(/^Node\.js/)))
- supportsScriptExec = true;
- }
-
- // script execution via injecting a script tag into the page
- // this allows CSP integrity and nonce to be set for CSP environments
- var head;
- function scriptExec(load) {
- if (!head)
- head = document.head || document.body || document.documentElement;
-
- var script = document.createElement('script');
- script.text = getSource(load, false);
- var onerror = window.onerror;
- var e;
- window.onerror = function(_e) {
- e = addToError(_e, 'Evaluating ' + load.address);
- if (onerror)
- onerror.apply(this, arguments);
- }
- preExec(this, load);
-
- if (load.metadata.integrity)
- script.setAttribute('integrity', load.metadata.integrity);
- if (load.metadata.nonce)
- script.setAttribute('nonce', load.metadata.nonce);
-
- head.appendChild(script);
- head.removeChild(script);
- postExec();
- window.onerror = onerror;
- if (e)
- throw e;
- }
-
-})();
-function readMemberExpression(p, value) {
- var pParts = p.split('.');
- while (pParts.length)
- value = value[pParts.shift()];
- return value;
-}
-
-function getMapMatch(map, name) {
- var bestMatch, bestMatchLength = 0;
-
- for (var p in map) {
- if (name.substr(0, p.length) == p && (name.length == p.length || name[p.length] == '/')) {
- var curMatchLength = p.split('/').length;
- if (curMatchLength <= bestMatchLength)
- continue;
- bestMatch = p;
- bestMatchLength = curMatchLength;
- }
- }
-
- return bestMatch;
-}
-
-function prepareBaseURL(loader) {
- // ensure baseURl is fully normalized
- if (this._loader.baseURL !== this.baseURL) {
- if (this.baseURL[this.baseURL.length - 1] != '/')
- this.baseURL += '/';
-
- this._loader.baseURL = this.baseURL = new URL(this.baseURL, baseURIObj).href;
- }
-}
-
-var envModule;
-function setProduction(isProduction, isBuilder) {
- this.set('@system-env', envModule = this.newModule({
- browser: isBrowser,
- node: !!this._nodeRequire,
- production: !isBuilder && isProduction,
- dev: isBuilder || !isProduction,
- build: isBuilder,
- 'default': true
- }));
-}
-
-hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
-
- // support baseURL
- this.baseURL = baseURI;
-
- // support map and paths
- this.map = {};
-
- // make the location of the system.js script accessible
- if (typeof $__curScript != 'undefined')
- this.scriptSrc = $__curScript.src;
-
- // global behaviour flags
- this.warnings = false;
- this.defaultJSExtensions = false;
- this.pluginFirst = false;
- this.loaderErrorStack = false;
-
- // by default load ".json" files as json
- // leading * meta doesn't need normalization
- // NB add this in next breaking release
- // this.meta['*.json'] = { format: 'json' };
-
- // support the empty module, as a concept
- this.set('@empty', this.newModule({}));
-
- setProduction.call(this, false, false);
- };
-});
-
-// include the node require since we're overriding it
-if (typeof require != 'undefined' && typeof process != 'undefined' && !process.browser)
- SystemJSLoader.prototype._nodeRequire = require;
-
-/*
- Core SystemJS Normalization
-
- If a name is relative, we apply URL normalization to the page
- If a name is an absolute URL, we leave it as-is
-
- Plain names (neither of the above) run through the map and paths
- normalization phases.
-
- The paths normalization phase applies last (paths extension), which
- defines the `decanonicalize` function and normalizes everything into
- a URL.
- */
-
-var parentModuleContext;
-function getNodeModule(name, baseURL) {
- if (!isPlain(name))
- throw new Error('Node module ' + name + ' can\'t be loaded as it is not a package require.');
-
- if (!parentModuleContext) {
- var Module = this._nodeRequire('module');
- var base = baseURL.substr(isWindows ? 8 : 7);
- parentModuleContext = new Module(base);
- parentModuleContext.paths = Module._nodeModulePaths(base);
- }
- return parentModuleContext.require(name);
-}
-
-function coreResolve(name, parentName) {
- // standard URL resolution
- if (isRel(name))
- return urlResolve(name, parentName);
- else if (isAbsolute(name))
- return name;
-
- // plain names not starting with './', '://' and '/' go through custom resolution
- var mapMatch = getMapMatch(this.map, name);
-
- if (mapMatch) {
- name = this.map[mapMatch] + name.substr(mapMatch.length);
-
- if (isRel(name))
- return urlResolve(name);
- else if (isAbsolute(name))
- return name;
- }
-
- if (this.has(name))
- return name;
-
- // dynamically load node-core modules when requiring `@node/fs` for example
- if (name.substr(0, 6) == '@node/') {
- if (!this._nodeRequire)
- throw new TypeError('Error loading ' + name + '. Can only load node core modules in Node.');
- if (this.builder)
- this.set(name, this.newModule({}));
- else
- this.set(name, this.newModule(getESModule(getNodeModule.call(this, name.substr(6), this.baseURL))));
- return name;
- }
-
- // prepare the baseURL to ensure it is normalized
- prepareBaseURL.call(this);
-
- return applyPaths(this, name) || this.baseURL + name;
-}
-
-hook('normalize', function(normalize) {
- return function(name, parentName, skipExt) {
- var resolved = coreResolve.call(this, name, parentName);
- if (this.defaultJSExtensions && !skipExt && resolved.substr(resolved.length - 3, 3) != '.js' && !isPlain(resolved))
- resolved += '.js';
- return resolved;
- };
-});
-
-// percent encode just '#' in urls if using HTTP requests
-var httpRequest = typeof XMLHttpRequest != 'undefined';
-hook('locate', function(locate) {
- return function(load) {
- return Promise.resolve(locate.call(this, load))
- .then(function(address) {
- if (httpRequest)
- return address.replace(/#/g, '%23');
- return address;
- });
- };
-});
-
-/*
- * Fetch with authorization
- */
-hook('fetch', function() {
- return function(load) {
- return new Promise(function(resolve, reject) {
- fetchTextFromURL(load.address, load.metadata.authorization, resolve, reject);
- });
- };
-});
-
-/*
- __useDefault
-
- When a module object looks like:
- newModule(
- __useDefault: true,
- default: 'some-module'
- })
-
- Then importing that module provides the 'some-module'
- result directly instead of the full module.
-
- Useful for eg module.exports = function() {}
-*/
-hook('import', function(systemImport) {
- return function(name, parentName, parentAddress) {
- if (parentName && parentName.name)
- warn.call(this, 'SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing ' + name + ' from ' + parentName.name);
- return systemImport.call(this, name, parentName, parentAddress).then(function(module) {
- return module.__useDefault ? module['default'] : module;
- });
- };
-});
-
-/*
- * Allow format: 'detect' meta to enable format detection
- */
-hook('translate', function(systemTranslate) {
- return function(load) {
- if (load.metadata.format == 'detect')
- load.metadata.format = undefined;
- return systemTranslate.apply(this, arguments);
- };
-});
-
-
-/*
- * JSON format support
- *
- * Supports loading JSON files as a module format itself
- *
- * Usage:
- *
- * SystemJS.config({
- * meta: {
- * '*.json': { format: 'json' }
- * }
- * });
- *
- * Module is returned as if written:
- *
- * export default {JSON}
- *
- * No named exports are provided
- *
- * Files ending in ".json" are treated as json automatically by SystemJS
- */
-hook('instantiate', function(instantiate) {
- return function(load) {
- if (load.metadata.format == 'json' && !this.builder) {
- var entry = load.metadata.entry = createEntry();
- entry.deps = [];
- entry.execute = function() {
- try {
- return JSON.parse(load.source);
- }
- catch(e) {
- throw new Error("Invalid JSON file " + load.name);
- }
- };
- }
- };
-})
-
-/*
- Extend config merging one deep only
-
- loader.config({
- some: 'random',
- config: 'here',
- deep: {
- config: { too: 'too' }
- }
- });
-
- <=>
-
- loader.some = 'random';
- loader.config = 'here'
- loader.deep = loader.deep || {};
- loader.deep.config = { too: 'too' };
-
-
- Normalizes meta and package configs allowing for:
-
- SystemJS.config({
- meta: {
- './index.js': {}
- }
- });
-
- To become
-
- SystemJS.meta['https://thissite.com/index.js'] = {};
-
- For easy normalization canonicalization with latest URL support.
-
-*/
-function envSet(loader, cfg, envCallback) {
- if (envModule.browser && cfg.browserConfig)
- envCallback(cfg.browserConfig);
- if (envModule.node && cfg.nodeConfig)
- envCallback(cfg.nodeConfig);
- if (envModule.dev && cfg.devConfig)
- envCallback(cfg.devConfig);
- if (envModule.build && cfg.buildConfig)
- envCallback(cfg.buildConfig);
- if (envModule.production && cfg.productionConfig)
- envCallback(cfg.productionConfig);
-}
-
-SystemJSLoader.prototype.getConfig = function(name) {
- var cfg = {};
- var loader = this;
- for (var p in loader) {
- if (loader.hasOwnProperty && !loader.hasOwnProperty(p) || p in SystemJSLoader.prototype && p != 'transpiler')
- continue;
- if (indexOf.call(['_loader', 'amdDefine', 'amdRequire', 'defined', 'failed', 'version', 'loads'], p) == -1)
- cfg[p] = loader[p];
- }
- cfg.production = envModule.production;
- return cfg;
-};
-
-var curCurScript;
-SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
- var loader = this;
-
- if ('loaderErrorStack' in cfg) {
- curCurScript = $__curScript;
- if (cfg.loaderErrorStack)
- $__curScript = undefined;
- else
- $__curScript = curCurScript;
- }
-
- if ('warnings' in cfg)
- loader.warnings = cfg.warnings;
-
- // transpiler deprecation path
- if (cfg.transpilerRuntime === false)
- loader._loader.loadedTranspilerRuntime = true;
-
- if ('production' in cfg || 'build' in cfg)
- setProduction.call(loader, !!cfg.production, !!(cfg.build || envModule && envModule.build));
-
- if (!isEnvConfig) {
- // if using nodeConfig / browserConfig / productionConfig, take baseURL from there
- // these exceptions will be unnecessary when we can properly implement config queuings
- var baseURL;
- envSet(loader, cfg, function(cfg) {
- baseURL = baseURL || cfg.baseURL;
- });
- baseURL = baseURL || cfg.baseURL;
-
- // always configure baseURL first
- if (baseURL) {
- var hasConfig = false;
- function checkHasConfig(obj) {
- for (var p in obj)
- if (obj.hasOwnProperty(p))
- return true;
- }
- if (checkHasConfig(loader.packages) || checkHasConfig(loader.meta) || checkHasConfig(loader.depCache) || checkHasConfig(loader.bundles) || checkHasConfig(loader.packageConfigPaths))
- throw new TypeError('Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.');
-
- this.baseURL = baseURL;
- prepareBaseURL.call(this);
- }
-
- if (cfg.paths)
- extend(loader.paths, cfg.paths);
-
- envSet(loader, cfg, function(cfg) {
- if (cfg.paths)
- extend(loader.paths, cfg.paths);
- });
-
- // warn on wildcard path deprecations
- if (this.warnings) {
- for (var p in loader.paths)
- if (p.indexOf('*') != -1)
- warn.call(loader, 'Paths configuration "' + p + '" -> "' + loader.paths[p] + '" uses wildcards which are being deprecated for simpler trailing "/" folder paths.');
- }
- }
-
- if (cfg.defaultJSExtensions) {
- loader.defaultJSExtensions = cfg.defaultJSExtensions;
- warn.call(loader, 'The defaultJSExtensions configuration option is deprecated, use packages configuration instead.');
- }
-
- if (cfg.pluginFirst)
- loader.pluginFirst = cfg.pluginFirst;
-
- if (cfg.map) {
- var objMaps = '';
- for (var p in cfg.map) {
- var v = cfg.map[p];
-
- // object map backwards-compat into packages configuration
- if (typeof v !== 'string') {
- objMaps += (objMaps.length ? ', ' : '') + '"' + p + '"';
-
- var defaultJSExtension = loader.defaultJSExtensions && p.substr(p.length - 3, 3) != '.js';
- var prop = loader.decanonicalize(p);
- if (defaultJSExtension && prop.substr(prop.length - 3, 3) == '.js')
- prop = prop.substr(0, prop.length - 3);
-
- // if a package main, revert it
- var pkgMatch = '';
- for (var pkg in loader.packages) {
- if (prop.substr(0, pkg.length) == pkg
- && (!prop[pkg.length] || prop[pkg.length] == '/')
- && pkgMatch.split('/').length < pkg.split('/').length)
- pkgMatch = pkg;
- }
- if (pkgMatch && loader.packages[pkgMatch].main)
- prop = prop.substr(0, prop.length - loader.packages[pkgMatch].main.length - 1);
-
- var pkg = loader.packages[prop] = loader.packages[prop] || {};
- pkg.map = v;
- }
- else {
- loader.map[p] = v;
- }
- }
- if (objMaps)
- warn.call(loader, 'The map configuration for ' + objMaps + ' uses object submaps, which is deprecated in global map.\nUpdate this to use package contextual map with configs like SystemJS.config({ packages: { "' + p + '": { map: {...} } } }).');
- }
-
- if (cfg.packageConfigPaths) {
- var packageConfigPaths = [];
- for (var i = 0; i < cfg.packageConfigPaths.length; i++) {
- var path = cfg.packageConfigPaths[i];
- var packageLength = Math.max(path.lastIndexOf('*') + 1, path.lastIndexOf('/'));
- var normalized = coreResolve.call(loader, path.substr(0, packageLength));
- packageConfigPaths[i] = normalized + path.substr(packageLength);
- }
- loader.packageConfigPaths = packageConfigPaths;
- }
-
- if (cfg.bundles) {
- for (var p in cfg.bundles) {
- var bundle = [];
- for (var i = 0; i < cfg.bundles[p].length; i++) {
- var defaultJSExtension = loader.defaultJSExtensions && cfg.bundles[p][i].substr(cfg.bundles[p][i].length - 3, 3) != '.js';
- var normalizedBundleDep = loader.decanonicalize(cfg.bundles[p][i]);
- if (defaultJSExtension && normalizedBundleDep.substr(normalizedBundleDep.length - 3, 3) == '.js')
- normalizedBundleDep = normalizedBundleDep.substr(0, normalizedBundleDep.length - 3);
- bundle.push(normalizedBundleDep);
- }
- loader.bundles[p] = bundle;
- }
- }
-
- if (cfg.packages) {
- for (var p in cfg.packages) {
- if (p.match(/^([^\/]+:)?\/\/$/))
- throw new TypeError('"' + p + '" is not a valid package name.');
-
- var prop = coreResolve.call(loader, p);
-
- // allow trailing slash in packages
- if (prop[prop.length - 1] == '/')
- prop = prop.substr(0, prop.length - 1);
-
- setPkgConfig(loader, prop, cfg.packages[p], false);
- }
- }
-
- for (var c in cfg) {
- var v = cfg[c];
-
- if (indexOf.call(['baseURL', 'map', 'packages', 'bundles', 'paths', 'warnings', 'packageConfigPaths',
- 'loaderErrorStack', 'browserConfig', 'nodeConfig', 'devConfig', 'buildConfig', 'productionConfig'], c) != -1)
- continue;
-
- if (typeof v != 'object' || v instanceof Array) {
- loader[c] = v;
- }
- else {
- loader[c] = loader[c] || {};
-
- for (var p in v) {
- // base-level wildcard meta does not normalize to retain catch-all quality
- if (c == 'meta' && p[0] == '*') {
- extend(loader[c][p] = loader[c][p] || {}, v[p]);
- }
- else if (c == 'meta') {
- // meta can go through global map, with defaultJSExtensions adding
- var resolved = coreResolve.call(loader, p);
- if (loader.defaultJSExtensions && resolved.substr(resolved.length - 3, 3) != '.js' && !isPlain(resolved))
- resolved += '.js';
- extend(loader[c][resolved] = loader[c][resolved] || {}, v[p]);
- }
- else if (c == 'depCache') {
- var defaultJSExtension = loader.defaultJSExtensions && p.substr(p.length - 3, 3) != '.js';
- var prop = loader.decanonicalize(p);
- if (defaultJSExtension && prop.substr(prop.length - 3, 3) == '.js')
- prop = prop.substr(0, prop.length - 3);
- loader[c][prop] = [].concat(v[p]);
- }
- else {
- loader[c][p] = v[p];
- }
- }
- }
- }
-
- envSet(loader, cfg, function(cfg) {
- loader.config(cfg, true);
- });
-};/*
- * Package Configuration Extension
- *
- * Example:
- *
- * SystemJS.packages = {
- * jquery: {
- * main: 'index.js', // when not set, package name is requested directly
- * format: 'amd',
- * defaultExtension: 'ts', // defaults to 'js', can be set to false
- * modules: {
- * '*.ts': {
- * loader: 'typescript'
- * },
- * 'vendor/sizzle.js': {
- * format: 'global'
- * }
- * },
- * map: {
- * // map internal require('sizzle') to local require('./vendor/sizzle')
- * sizzle: './vendor/sizzle.js',
- * // map any internal or external require of 'jquery/vendor/another' to 'another/index.js'
- * './vendor/another.js': './another/index.js',
- * // test.js / test -> lib/test.js
- * './test.js': './lib/test.js',
- *
- * // environment-specific map configurations
- * './index.js': {
- * '~browser': './index-node.js',
- * './custom-condition.js|~export': './index-custom.js'
- * }
- * },
- * // allows for setting package-prefixed depCache
- * // keys are normalized module names relative to the package itself
- * depCache: {
- * // import 'package/index.js' loads in parallel package/lib/test.js,package/vendor/sizzle.js
- * './index.js': ['./test'],
- * './test.js': ['external-dep'],
- * 'external-dep/path.js': ['./another.js']
- * }
- * }
- * };
- *
- * Then:
- * import 'jquery' -> jquery/index.js
- * import 'jquery/submodule' -> jquery/submodule.js
- * import 'jquery/submodule.ts' -> jquery/submodule.ts loaded as typescript
- * import 'jquery/vendor/another' -> another/index.js
- *
- * Detailed Behaviours
- * - main can have a leading "./" can be added optionally
- * - map and defaultExtension are applied to the main
- * - defaultExtension adds the extension only if the exact extension is not present
- * - defaultJSExtensions applies after map when defaultExtension is not set
- * - if a meta value is available for a module, map and defaultExtension are skipped
- * - like global map, package map also applies to subpaths (sizzle/x, ./vendor/another/sub)
- * - condition module map is '@env' module in package or '@system-env' globally
- * - map targets support conditional interpolation ('./x': './x.#{|env}.js')
- * - internal package map targets cannot use boolean conditionals
- *
- * Package Configuration Loading
- *
- * Not all packages may already have their configuration present in the System config
- * For these cases, a list of packageConfigPaths can be provided, which when matched against
- * a request, will first request a ".json" file by the package name to derive the package
- * configuration from. This allows dynamic loading of non-predetermined code, a key use
- * case in SystemJS.
- *
- * Example:
- *
- * SystemJS.packageConfigPaths = ['packages/test/package.json', 'packages/*.json'];
- *
- * // will first request 'packages/new-package/package.json' for the package config
- * // before completing the package request to 'packages/new-package/path'
- * SystemJS.import('packages/new-package/path');
- *
- * // will first request 'packages/test/package.json' before the main
- * SystemJS.import('packages/test');
- *
- * When a package matches packageConfigPaths, it will always send a config request for
- * the package configuration.
- * The package name itself is taken to be the match up to and including the last wildcard
- * or trailing slash.
- * The most specific package config path will be used.
- * Any existing package configurations for the package will deeply merge with the
- * package config, with the existing package configurations taking preference.
- * To opt-out of the package configuration request for a package that matches
- * packageConfigPaths, use the { configured: true } package config option.
- *
- */
-(function() {
-
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.packages = {};
- this.packageConfigPaths = [];
- };
- });
-
- function getPackage(loader, normalized) {
- // use most specific package
- var curPkg, curPkgLen = 0, pkgLen;
- for (var p in loader.packages) {
- if (normalized.substr(0, p.length) === p && (normalized.length === p.length || normalized[p.length] === '/')) {
- pkgLen = p.split('/').length;
- if (pkgLen > curPkgLen) {
- curPkg = p;
- curPkgLen = pkgLen;
- }
- }
- }
- return curPkg;
- }
-
- function addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions) {
- // don't apply extensions to folders or if defaultExtension = false
- if (!subPath || subPath[subPath.length - 1] == '/' || skipExtensions || pkg.defaultExtension === false)
- return subPath;
-
- var metaMatch = false;
-
- // exact meta or meta with any content after the last wildcard skips extension
- if (pkg.meta)
- getMetaMatches(pkg.meta, subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1)
- return metaMatch = true;
- });
-
- // exact global meta or meta with any content after the last wildcard skips extension
- if (!metaMatch && loader.meta)
- getMetaMatches(loader.meta, pkgName + '/' + subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1)
- return metaMatch = true;
- });
-
- if (metaMatch)
- return subPath;
-
- // work out what the defaultExtension is and add if not there already
- // NB reconsider if default should really be ".js"?
- var defaultExtension = '.' + (pkg.defaultExtension || 'js');
- if (subPath.substr(subPath.length - defaultExtension.length) != defaultExtension)
- return subPath + defaultExtension;
- else
- return subPath;
- }
-
- function applyPackageConfigSync(loader, pkg, pkgName, subPath, skipExtensions) {
- // main
- if (!subPath) {
- if (pkg.main)
- subPath = pkg.main.substr(0, 2) == './' ? pkg.main.substr(2) : pkg.main;
- // also no submap if name is package itself (import 'pkg' -> 'path/to/pkg.js')
- else
- // NB can add a default package main convention here when defaultJSExtensions is deprecated
- // if it becomes internal to the package then it would no longer be an exit path
- return pkgName + (loader.defaultJSExtensions ? '.js' : '');
- }
-
- // map config checking without then with extensions
- if (pkg.map) {
- var mapPath = './' + subPath;
-
- var mapMatch = getMapMatch(pkg.map, mapPath);
-
- // we then check map with the default extension adding
- if (!mapMatch) {
- mapPath = './' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- if (mapPath != './' + subPath)
- mapMatch = getMapMatch(pkg.map, mapPath);
- }
- if (mapMatch) {
- var mapped = doMapSync(loader, pkg, pkgName, mapMatch, mapPath, skipExtensions);
- if (mapped)
- return mapped;
- }
- }
-
- // normal package resolution
- return pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- }
-
- function validMapping(mapMatch, mapped, pkgName, path) {
- // disallow internal to subpath maps
- if (mapMatch == '.')
- throw new Error('Package ' + pkgName + ' has a map entry for "." which is not permitted.');
-
- // allow internal ./x -> ./x/y or ./x/ -> ./x/y recursive maps
- // but only if the path is exactly ./x and not ./x/z
- if (mapped.substr(0, mapMatch.length) == mapMatch && path.length > mapMatch.length)
- return false;
-
- return true;
- }
-
- function doMapSync(loader, pkg, pkgName, mapMatch, path, skipExtensions) {
- if (path[path.length - 1] == '/')
- path = path.substr(0, path.length - 1);
- var mapped = pkg.map[mapMatch];
-
- if (typeof mapped == 'object')
- throw new Error('Synchronous conditional normalization not supported sync normalizing ' + mapMatch + ' in ' + pkgName);
-
- if (!validMapping(mapMatch, mapped, pkgName, path) || typeof mapped != 'string')
- return;
-
- // package map to main / base-level
- if (mapped == '.')
- mapped = pkgName;
-
- // internal package map
- else if (mapped.substr(0, 2) == './')
- return pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, mapped.substr(2) + path.substr(mapMatch.length), skipExtensions);
-
- // external map reference
- return loader.normalizeSync(mapped + path.substr(mapMatch.length), pkgName + '/');
- }
-
- function applyPackageConfig(loader, pkg, pkgName, subPath, skipExtensions) {
- // main
- if (!subPath) {
- if (pkg.main)
- subPath = pkg.main.substr(0, 2) == './' ? pkg.main.substr(2) : pkg.main;
- // also no submap if name is package itself (import 'pkg' -> 'path/to/pkg.js')
- else
- // NB can add a default package main convention here when defaultJSExtensions is deprecated
- // if it becomes internal to the package then it would no longer be an exit path
- return Promise.resolve(pkgName + (loader.defaultJSExtensions ? '.js' : ''));
- }
-
- // map config checking without then with extensions
- var mapPath, mapMatch;
-
- if (pkg.map) {
- mapPath = './' + subPath;
- mapMatch = getMapMatch(pkg.map, mapPath);
-
- // we then check map with the default extension adding
- if (!mapMatch) {
- mapPath = './' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- if (mapPath != './' + subPath)
- mapMatch = getMapMatch(pkg.map, mapPath);
- }
- }
-
- return (mapMatch ? doMap(loader, pkg, pkgName, mapMatch, mapPath, skipExtensions) : Promise.resolve())
- .then(function(mapped) {
- if (mapped)
- return Promise.resolve(mapped);
-
- // normal package resolution / fallback resolution for no conditional match
- return Promise.resolve(pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions));
- });
- }
-
- function doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions) {
- // NB the interpolation cases should strictly skip subsequent interpolation
- // package map to main / base-level
- if (mapped == '.')
- mapped = pkgName;
-
- // internal package map
- else if (mapped.substr(0, 2) == './')
- return Promise.resolve(pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, mapped.substr(2) + path.substr(mapMatch.length), skipExtensions))
- .then(function(name) {
- return interpolateConditional.call(loader, name, pkgName + '/');
- });
-
- // external map reference
- return loader.normalize(mapped + path.substr(mapMatch.length), pkgName + '/');
- }
-
- function doMap(loader, pkg, pkgName, mapMatch, path, skipExtensions) {
- if (path[path.length - 1] == '/')
- path = path.substr(0, path.length - 1);
-
- var mapped = pkg.map[mapMatch];
-
- if (typeof mapped == 'string') {
- if (!validMapping(mapMatch, mapped, pkgName, path))
- return Promise.resolve();
- return doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions);
- }
-
- // we use a special conditional syntax to allow the builder to handle conditional branch points further
- if (loader.builder)
- return Promise.resolve(pkgName + '/#:' + path);
-
- // we load all conditions upfront
- var conditionPromises = [];
- var conditions = [];
- for (var e in mapped) {
- var c = parseCondition(e);
- conditions.push({
- condition: c,
- map: mapped[e]
- });
- conditionPromises.push(loader['import'](c.module, pkgName));
- }
-
- // map object -> conditional map
- return Promise.all(conditionPromises)
- .then(function(conditionValues) {
- // first map condition to match is used
- for (var i = 0; i < conditions.length; i++) {
- var c = conditions[i].condition;
- var value = readMemberExpression(c.prop, conditionValues[i]);
- if (!c.negate && value || c.negate && !value)
- return conditions[i].map;
- }
- })
- .then(function(mapped) {
- if (mapped) {
- if (!validMapping(mapMatch, mapped, pkgName, path))
- return;
- return doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions);
- }
-
- // no environment match -> fallback to original subPath by returning undefined
- });
- }
-
- // normalizeSync = decanonicalize + package resolution
- SystemJSLoader.prototype.normalizeSync = SystemJSLoader.prototype.decanonicalize = SystemJSLoader.prototype.normalize;
-
- // decanonicalize must JUST handle package defaultExtension: false case when defaultJSExtensions is set
- // to be deprecated!
- hook('decanonicalize', function(decanonicalize) {
- return function(name, parentName) {
- if (this.builder)
- return decanonicalize.call(this, name, parentName, true);
-
- var decanonicalized = decanonicalize.call(this, name, parentName, false);
-
- if (!this.defaultJSExtensions)
- return decanonicalized;
-
- var pkgName = getPackage(this, decanonicalized);
-
- var pkg = this.packages[pkgName];
- var defaultExtension = pkg && pkg.defaultExtension;
-
- if (defaultExtension == undefined && pkg && pkg.meta)
- getMetaMatches(pkg.meta, decanonicalized.substr(pkgName), function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1) {
- defaultExtension = false;
- return true;
- }
- });
-
- if ((defaultExtension === false || defaultExtension && defaultExtension != '.js') && name.substr(name.length - 3, 3) != '.js' && decanonicalized.substr(decanonicalized.length - 3, 3) == '.js')
- decanonicalized = decanonicalized.substr(0, decanonicalized.length - 3);
-
- return decanonicalized;
- };
- });
-
- hook('normalizeSync', function(normalizeSync) {
- return function(name, parentName, isPlugin) {
- var loader = this;
- isPlugin = isPlugin === true;
-
- // apply contextual package map first
- // (we assume the parent package config has already been loaded)
- if (parentName)
- var parentPackageName = getPackage(loader, parentName) ||
- loader.defaultJSExtensions && parentName.substr(parentName.length - 3, 3) == '.js' &&
- getPackage(loader, parentName.substr(0, parentName.length - 3));
-
- var parentPackage = parentPackageName && loader.packages[parentPackageName];
-
- // ignore . since internal maps handled by standard package resolution
- if (parentPackage && name[0] != '.') {
- var parentMap = parentPackage.map;
- var parentMapMatch = parentMap && getMapMatch(parentMap, name);
-
- if (parentMapMatch && typeof parentMap[parentMapMatch] == 'string') {
- var mapped = doMapSync(loader, parentPackage, parentPackageName, parentMapMatch, name, isPlugin);
- if (mapped)
- return mapped;
- }
- }
-
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
-
- // apply map, core, paths, contextual package map
- var normalized = normalizeSync.call(loader, name, parentName, false);
-
- // undo defaultJSExtension
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) != '.js')
- defaultJSExtension = false;
- if (defaultJSExtension)
- normalized = normalized.substr(0, normalized.length - 3);
-
- var pkgConfigMatch = getPackageConfigMatch(loader, normalized);
- var pkgName = pkgConfigMatch && pkgConfigMatch.packageName || getPackage(loader, normalized);
-
- if (!pkgName)
- return normalized + (defaultJSExtension ? '.js' : '');
-
- var subPath = normalized.substr(pkgName.length + 1);
-
- return applyPackageConfigSync(loader, loader.packages[pkgName] || {}, pkgName, subPath, isPlugin);
- };
- });
-
- hook('normalize', function(normalize) {
- return function(name, parentName, isPlugin) {
- var loader = this;
- isPlugin = isPlugin === true;
-
- return Promise.resolve()
- .then(function() {
- // apply contextual package map first
- // (we assume the parent package config has already been loaded)
- if (parentName)
- var parentPackageName = getPackage(loader, parentName) ||
- loader.defaultJSExtensions && parentName.substr(parentName.length - 3, 3) == '.js' &&
- getPackage(loader, parentName.substr(0, parentName.length - 3));
-
- var parentPackage = parentPackageName && loader.packages[parentPackageName];
-
- // ignore . since internal maps handled by standard package resolution
- if (parentPackage && name.substr(0, 2) != './') {
- var parentMap = parentPackage.map;
- var parentMapMatch = parentMap && getMapMatch(parentMap, name);
-
- if (parentMapMatch)
- return doMap(loader, parentPackage, parentPackageName, parentMapMatch, name, isPlugin);
- }
-
- return Promise.resolve();
- })
- .then(function(mapped) {
- if (mapped)
- return mapped;
-
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
-
- // apply map, core, paths, contextual package map
- var normalized = normalize.call(loader, name, parentName, false);
-
- // undo defaultJSExtension
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) != '.js')
- defaultJSExtension = false;
- if (defaultJSExtension)
- normalized = normalized.substr(0, normalized.length - 3);
-
- var pkgConfigMatch = getPackageConfigMatch(loader, normalized);
- var pkgName = pkgConfigMatch && pkgConfigMatch.packageName || getPackage(loader, normalized);
-
- if (!pkgName)
- return Promise.resolve(normalized + (defaultJSExtension ? '.js' : ''));
-
- var pkg = loader.packages[pkgName];
-
- // if package is already configured or not a dynamic config package, use existing package config
- var isConfigured = pkg && (pkg.configured || !pkgConfigMatch);
- return (isConfigured ? Promise.resolve(pkg) : loadPackageConfigPath(loader, pkgName, pkgConfigMatch.configPath))
- .then(function(pkg) {
- var subPath = normalized.substr(pkgName.length + 1);
-
- return applyPackageConfig(loader, pkg, pkgName, subPath, isPlugin);
- });
- });
- };
- });
-
- // check if the given normalized name matches a packageConfigPath
- // if so, loads the config
- var packageConfigPaths = {};
-
- // data object for quick checks against package paths
- function createPkgConfigPathObj(path) {
- var lastWildcard = path.lastIndexOf('*');
- var length = Math.max(lastWildcard + 1, path.lastIndexOf('/'));
- return {
- length: length,
- regEx: new RegExp('^(' + path.substr(0, length).replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '[^\\/]+') + ')(\\/|$)'),
- wildcard: lastWildcard != -1
- };
- }
-
- // most specific match wins
- function getPackageConfigMatch(loader, normalized) {
- var pkgName, exactMatch = false, configPath;
- for (var i = 0; i < loader.packageConfigPaths.length; i++) {
- var packageConfigPath = loader.packageConfigPaths[i];
- var p = packageConfigPaths[packageConfigPath] || (packageConfigPaths[packageConfigPath] = createPkgConfigPathObj(packageConfigPath));
- if (normalized.length < p.length)
- continue;
- var match = normalized.match(p.regEx);
- if (match && (!pkgName || (!(exactMatch && p.wildcard) && pkgName.length < match[1].length))) {
- pkgName = match[1];
- exactMatch = !p.wildcard;
- configPath = pkgName + packageConfigPath.substr(p.length);
- }
- }
-
- if (!pkgName)
- return;
-
- return {
- packageName: pkgName,
- configPath: configPath
- };
- }
-
- function loadPackageConfigPath(loader, pkgName, pkgConfigPath) {
- var configLoader = loader.pluginLoader || loader;
-
- // NB remove this when json is default
- (configLoader.meta[pkgConfigPath] = configLoader.meta[pkgConfigPath] || {}).format = 'json';
- configLoader.meta[pkgConfigPath].loader = null;
-
- return configLoader.load(pkgConfigPath)
- .then(function() {
- var cfg = configLoader.get(pkgConfigPath)['default'];
-
- // support "systemjs" prefixing
- if (cfg.systemjs)
- cfg = cfg.systemjs;
-
- // modules backwards compatibility
- if (cfg.modules) {
- cfg.meta = cfg.modules;
- warn.call(loader, 'Package config file ' + pkgConfigPath + ' is configured with "modules", which is deprecated as it has been renamed to "meta".');
- }
-
- return setPkgConfig(loader, pkgName, cfg, true);
- });
- }
-
- function getMetaMatches(pkgMeta, subPath, matchFn) {
- // wildcard meta
- var meta = {};
- var wildcardIndex;
- for (var module in pkgMeta) {
- // allow meta to start with ./ for flexibility
- var dotRel = module.substr(0, 2) == './' ? './' : '';
- if (dotRel)
- module = module.substr(2);
-
- wildcardIndex = module.indexOf('*');
- if (wildcardIndex === -1)
- continue;
-
- if (module.substr(0, wildcardIndex) == subPath.substr(0, wildcardIndex)
- && module.substr(wildcardIndex + 1) == subPath.substr(subPath.length - module.length + wildcardIndex + 1)) {
- // alow match function to return true for an exit path
- if (matchFn(module, pkgMeta[dotRel + module], module.split('/').length))
- return;
- }
- }
- // exact meta
- var exactMeta = pkgMeta[subPath] && pkgMeta.hasOwnProperty && pkgMeta.hasOwnProperty(subPath) ? pkgMeta[subPath] : pkgMeta['./' + subPath];
- if (exactMeta)
- matchFn(exactMeta, exactMeta, 0);
- }
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- return Promise.resolve(locate.call(this, load))
- .then(function(address) {
- var pkgName = getPackage(loader, load.name);
- if (pkgName) {
- var pkg = loader.packages[pkgName];
- var subPath = load.name.substr(pkgName.length + 1);
-
- var meta = {};
- if (pkg.meta) {
- var bestDepth = 0;
-
- // NB support a main shorthand in meta here?
- getMetaMatches(pkg.meta, subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth > bestDepth)
- bestDepth = matchDepth;
- extendMeta(meta, matchMeta, matchDepth && bestDepth > matchDepth);
- });
-
- extendMeta(load.metadata, meta);
- }
-
- // format
- if (pkg.format && !load.metadata.loader)
- load.metadata.format = load.metadata.format || pkg.format;
- }
-
- return address;
- });
- };
- });
-
-})();
-/*
- * Script tag fetch
- *
- * When load.metadata.scriptLoad is true, we load via script tag injection.
- */
-(function() {
-
- if (typeof document != 'undefined')
- var head = document.getElementsByTagName('head')[0];
-
- var curSystem;
- var curRequire;
-
- // if doing worker executing, this is set to the load record being executed
- var workerLoad = null;
-
- // interactive mode handling method courtesy RequireJS
- var ieEvents = head && (function() {
- var s = document.createElement('script');
- var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';
- return s.attachEvent && !(s.attachEvent.toString && s.attachEvent.toString().indexOf('[native code') < 0) && !isOpera;
- })();
-
- // IE interactive-only part
- // we store loading scripts array as { script: <script>, load: {...} }
- var interactiveLoadingScripts = [];
- var interactiveScript;
- function getInteractiveScriptLoad() {
- if (interactiveScript && interactiveScript.script.readyState === 'interactive')
- return interactiveScript.load;
-
- for (var i = 0; i < interactiveLoadingScripts.length; i++)
- if (interactiveLoadingScripts[i].script.readyState == 'interactive') {
- interactiveScript = interactiveLoadingScripts[i];
- return interactiveScript.load;
- }
- }
-
- // System.register, System.registerDynamic, AMD define pipeline
- // this is called by the above methods when they execute
- // we then run the reduceRegister_ collection function either immediately
- // if we are in IE and know the currently executing script (interactive)
- // or later if we need to wait for the synchronous load callback to know the script
- var loadingCnt = 0;
- var registerQueue = [];
- hook('pushRegister_', function(pushRegister) {
- return function(register) {
- // if using eval-execution then skip
- if (pushRegister.call(this, register))
- return false;
-
- // if using worker execution, then we're done
- if (workerLoad)
- this.reduceRegister_(workerLoad, register);
-
- // detect if we know the currently executing load (IE)
- // if so, immediately call reduceRegister
- else if (ieEvents)
- this.reduceRegister_(getInteractiveScriptLoad(), register);
-
- // otherwise, add to our execution queue
- // to call reduceRegister on sync script load event
- else if (loadingCnt)
- registerQueue.push(register);
-
- // if we're not currently loading anything though
- // then do the reduction against a null load
- // (out of band named define or named register)
- // note even in non-script environments, this catch is used
- else
- this.reduceRegister_(null, register);
-
- return true;
- };
- });
-
- function webWorkerImport(loader, load) {
- return new Promise(function(resolve, reject) {
- if (load.metadata.integrity)
- reject(new Error('Subresource integrity checking is not supported in web workers.'));
-
- workerLoad = load;
- try {
- importScripts(load.address);
- }
- catch(e) {
- workerLoad = null;
- reject(e);
- }
- workerLoad = null;
-
- // if nothing registered, then something went wrong
- if (!load.metadata.entry)
- reject(new Error(load.address + ' did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.'));
-
- resolve('');
- });
- }
-
- // override fetch to use script injection
- hook('fetch', function(fetch) {
- return function(load) {
- var loader = this;
-
- if (load.metadata.format == 'json' || !load.metadata.scriptLoad || (!isBrowser && !isWorker))
- return fetch.call(this, load);
-
- if (isWorker)
- return webWorkerImport(loader, load);
-
- return new Promise(function(resolve, reject) {
- var s = document.createElement('script');
-
- s.async = true;
-
- if (load.metadata.crossOrigin)
- s.crossOrigin = load.metadata.crossOrigin;
-
- if (load.metadata.integrity)
- s.setAttribute('integrity', load.metadata.integrity);
-
- if (ieEvents) {
- s.attachEvent('onreadystatechange', complete);
- interactiveLoadingScripts.push({
- script: s,
- load: load
- });
- }
- else {
- s.addEventListener('load', complete, false);
- s.addEventListener('error', error, false);
- }
-
- loadingCnt++;
-
- curSystem = __global.System;
- curRequire = __global.require;
-
- s.src = load.address;
- head.appendChild(s);
-
- function complete(evt) {
- if (s.readyState && s.readyState != 'loaded' && s.readyState != 'complete')
- return;
-
- loadingCnt--;
-
- // complete call is sync on execution finish
- // (in ie already done reductions)
- if (!load.metadata.entry && !registerQueue.length) {
- loader.reduceRegister_(load);
- }
- else if (!ieEvents) {
- for (var i = 0; i < registerQueue.length; i++)
- loader.reduceRegister_(load, registerQueue[i]);
- registerQueue = [];
- }
-
- cleanup();
-
- // if nothing registered, then something went wrong
- if (!load.metadata.entry && !load.metadata.bundle)
- reject(new Error(load.name + ' did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.'));
-
- resolve('');
- }
-
- function error(evt) {
- cleanup();
- reject(new Error('Unable to load script ' + load.address));
- }
-
- function cleanup() {
- __global.System = curSystem;
- __global.require = curRequire;
-
- if (s.detachEvent) {
- s.detachEvent('onreadystatechange', complete);
- for (var i = 0; i < interactiveLoadingScripts.length; i++)
- if (interactiveLoadingScripts[i].script == s) {
- if (interactiveScript && interactiveScript.script == s)
- interactiveScript = null;
- interactiveLoadingScripts.splice(i, 1);
- }
- }
- else {
- s.removeEventListener('load', complete, false);
- s.removeEventListener('error', error, false);
- }
-
- head.removeChild(s);
- }
- });
- };
- });
-})();
-/*
- * Instantiate registry extension
- *
- * Supports Traceur System.register 'instantiate' output for loading ES6 as ES5.
- *
- * - Creates the loader.register function
- * - Also supports metadata.format = 'register' in instantiate for anonymous register modules
- * - Also supports metadata.deps, metadata.execute and metadata.executingRequire
- * for handling dynamic modules alongside register-transformed ES6 modules
- *
- *
- * The code here replicates the ES6 linking groups algorithm to ensure that
- * circular ES6 compiled into System.register can work alongside circular AMD
- * and CommonJS, identically to the actual ES6 loader.
- *
- */
-
-
-/*
- * Registry side table entries in loader.defined
- * Registry Entry Contains:
- * - name
- * - deps
- * - declare for declarative modules
- * - execute for dynamic modules, different to declarative execute on module
- * - executingRequire indicates require drives execution for circularity of dynamic modules
- * - declarative optional boolean indicating which of the above
- *
- * Can preload modules directly on SystemJS.defined['my/module'] = { deps, execute, executingRequire }
- *
- * Then the entry gets populated with derived information during processing:
- * - normalizedDeps derived from deps, created in instantiate
- * - groupIndex used by group linking algorithm
- * - evaluated indicating whether evaluation has happend
- * - module the module record object, containing:
- * - exports actual module exports
- *
- * For dynamic we track the es module with:
- * - esModule actual es module value
- * - esmExports whether to extend the esModule with named exports
- *
- * Then for declarative only we track dynamic bindings with the 'module' records:
- * - name
- * - exports
- * - setters declarative setter functions
- * - dependencies, module records of dependencies
- * - importers, module records of dependents
- *
- * After linked and evaluated, entries are removed, declarative module records remain in separate
- * module binding table
- *
- */
-
-var leadingCommentAndMetaRegEx = /^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;
-function detectRegisterFormat(source) {
- var leadingCommentAndMeta = source.match(leadingCommentAndMetaRegEx);
- return leadingCommentAndMeta && source.substr(leadingCommentAndMeta[0].length, 15) == 'System.register';
-}
-
-function createEntry() {
- return {
- name: null,
- deps: null,
- originalIndices: null,
- declare: null,
- execute: null,
- executingRequire: false,
- declarative: false,
- normalizedDeps: null,
- groupIndex: null,
- evaluated: false,
- module: null,
- esModule: null,
- esmExports: false
- };
-}
-
-(function() {
-
- /*
- * There are two variations of System.register:
- * 1. System.register for ES6 conversion (2-3 params) - System.register([name, ]deps, declare)
- * see https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
- *
- * 2. System.registerDynamic for dynamic modules (3-4 params) - System.registerDynamic([name, ]deps, executingRequire, execute)
- * the true or false statement
- *
- * this extension implements the linking algorithm for the two variations identical to the spec
- * allowing compiled ES6 circular references to work alongside AMD and CJS circular references.
- *
- */
- SystemJSLoader.prototype.register = function(name, deps, declare) {
- if (typeof name != 'string') {
- declare = deps;
- deps = name;
- name = null;
- }
-
- // dynamic backwards-compatibility
- // can be deprecated eventually
- if (typeof declare == 'boolean')
- return this.registerDynamic.apply(this, arguments);
-
- var entry = createEntry();
- // ideally wouldn't apply map config to bundle names but
- // dependencies go through map regardless so we can't restrict
- // could reconsider in shift to new spec
- entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
- entry.declarative = true;
- entry.deps = deps;
- entry.declare = declare;
-
- this.pushRegister_({
- amd: false,
- entry: entry
- });
- };
- SystemJSLoader.prototype.registerDynamic = function(name, deps, declare, execute) {
- if (typeof name != 'string') {
- execute = declare;
- declare = deps;
- deps = name;
- name = null;
- }
-
- // dynamic
- var entry = createEntry();
- entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
- entry.deps = deps;
- entry.execute = execute;
- entry.executingRequire = declare;
-
- this.pushRegister_({
- amd: false,
- entry: entry
- });
- };
- hook('reduceRegister_', function() {
- return function(load, register) {
- if (!register)
- return;
-
- var entry = register.entry;
- var curMeta = load && load.metadata;
-
- // named register
- if (entry.name) {
- if (!(entry.name in this.defined))
- this.defined[entry.name] = entry;
-
- if (curMeta)
- curMeta.bundle = true;
- }
- // anonymous register
- if (!entry.name || load && !curMeta.entry && entry.name == load.name) {
- if (!curMeta)
- throw new TypeError('Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.');
- if (curMeta.entry) {
- if (curMeta.format == 'register')
- throw new Error('Multiple anonymous System.register calls in module ' + load.name + '. If loading a bundle, ensure all the System.register calls are named.');
- else
- throw new Error('Module ' + load.name + ' interpreted as ' + curMeta.format + ' module format, but called System.register.');
- }
- if (!curMeta.format)
- curMeta.format = 'register';
- curMeta.entry = entry;
- }
- };
- });
-
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
-
- this.defined = {};
- this._loader.moduleRecords = {};
- };
- });
-
- function buildGroups(entry, loader, groups) {
- groups[entry.groupIndex] = groups[entry.groupIndex] || [];
-
- if (indexOf.call(groups[entry.groupIndex], entry) != -1)
- return;
-
- groups[entry.groupIndex].push(entry);
-
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- var depEntry = loader.defined[depName];
-
- // not in the registry means already linked / ES6
- if (!depEntry || depEntry.evaluated)
- continue;
-
- // now we know the entry is in our unlinked linkage group
- var depGroupIndex = entry.groupIndex + (depEntry.declarative != entry.declarative);
-
- // the group index of an entry is always the maximum
- if (depEntry.groupIndex === null || depEntry.groupIndex < depGroupIndex) {
-
- // if already in a group, remove from the old group
- if (depEntry.groupIndex !== null) {
- groups[depEntry.groupIndex].splice(indexOf.call(groups[depEntry.groupIndex], depEntry), 1);
-
- // if the old group is empty, then we have a mixed depndency cycle
- if (groups[depEntry.groupIndex].length == 0)
- throw new Error("Mixed dependency cycle detected");
- }
-
- depEntry.groupIndex = depGroupIndex;
- }
-
- buildGroups(depEntry, loader, groups);
- }
- }
-
- function link(name, startEntry, loader) {
- // skip if already linked
- if (startEntry.module)
- return;
-
- startEntry.groupIndex = 0;
-
- var groups = [];
-
- buildGroups(startEntry, loader, groups);
-
- var curGroupDeclarative = !!startEntry.declarative == groups.length % 2;
- for (var i = groups.length - 1; i >= 0; i--) {
- var group = groups[i];
- for (var j = 0; j < group.length; j++) {
- var entry = group[j];
-
- // link each group
- if (curGroupDeclarative)
- linkDeclarativeModule(entry, loader);
- else
- linkDynamicModule(entry, loader);
- }
- curGroupDeclarative = !curGroupDeclarative;
- }
- }
-
- // module binding records
- function ModuleRecord() {}
- defineProperty(ModuleRecord, 'toString', {
- value: function() {
- return 'Module';
- }
- });
-
- function getOrCreateModuleRecord(name, moduleRecords) {
- return moduleRecords[name] || (moduleRecords[name] = {
- name: name,
- dependencies: [],
- exports: new ModuleRecord(), // start from an empty module and extend
- importers: []
- });
- }
-
- function linkDeclarativeModule(entry, loader) {
- // only link if already not already started linking (stops at circular)
- if (entry.module)
- return;
-
- var moduleRecords = loader._loader.moduleRecords;
- var module = entry.module = getOrCreateModuleRecord(entry.name, moduleRecords);
- var exports = entry.module.exports;
-
- var declaration = entry.declare.call(__global, function(name, value) {
- module.locked = true;
-
- if (typeof name == 'object') {
- for (var p in name)
- exports[p] = name[p];
- }
- else {
- exports[name] = value;
- }
-
- for (var i = 0, l = module.importers.length; i < l; i++) {
- var importerModule = module.importers[i];
- if (!importerModule.locked) {
- var importerIndex = indexOf.call(importerModule.dependencies, module);
- var setter = importerModule.setters[importerIndex];
- if (setter)
- setter(exports);
- }
- }
-
- module.locked = false;
- return value;
- }, { id: entry.name });
-
- if (typeof declaration == 'function')
- declaration = { setters: [], execute: declaration };
-
- // allowing undefined declaration was a mistake! To be deprecated.
- declaration = declaration || { setters: [], execute: function() {} };
-
- module.setters = declaration.setters;
- module.execute = declaration.execute;
-
- if (!module.setters || !module.execute) {
- throw new TypeError('Invalid System.register form for ' + entry.name);
- }
-
- // now link all the module dependencies
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- var depEntry = loader.defined[depName];
- var depModule = moduleRecords[depName];
-
- // work out how to set depExports based on scenarios...
- var depExports;
-
- if (depModule) {
- depExports = depModule.exports;
- }
- // dynamic, already linked in our registry
- else if (depEntry && !depEntry.declarative) {
- depExports = depEntry.esModule;
- }
- // in the loader registry
- else if (!depEntry) {
- depExports = loader.get(depName);
- }
- // we have an entry -> link
- else {
- linkDeclarativeModule(depEntry, loader);
- depModule = depEntry.module;
- depExports = depModule.exports;
- }
-
- // only declarative modules have dynamic bindings
- if (depModule && depModule.importers) {
- depModule.importers.push(module);
- module.dependencies.push(depModule);
- }
- else {
- module.dependencies.push(null);
- }
-
- // run setters for all entries with the matching dependency name
- var originalIndices = entry.originalIndices[i];
- for (var j = 0, len = originalIndices.length; j < len; ++j) {
- var index = originalIndices[j];
- if (module.setters[index]) {
- module.setters[index](depExports);
- }
- }
- }
- }
-
- // An analog to loader.get covering execution of all three layers (real declarative, simulated declarative, simulated dynamic)
- function getModule(name, loader) {
- var exports;
- var entry = loader.defined[name];
-
- if (!entry) {
- exports = loader.get(name);
- if (!exports)
- throw new Error('Unable to load dependency ' + name + '.');
- }
-
- else {
- if (entry.declarative)
- ensureEvaluated(name, entry, [], loader);
-
- else if (!entry.evaluated)
- linkDynamicModule(entry, loader);
-
- exports = entry.module.exports;
- }
-
- if ((!entry || entry.declarative) && exports && exports.__useDefault)
- return exports['default'];
-
- return exports;
- }
-
- function linkDynamicModule(entry, loader) {
- if (entry.module)
- return;
-
- var exports = {};
-
- var module = entry.module = { exports: exports, id: entry.name };
-
- // AMD requires execute the tree first
- if (!entry.executingRequire) {
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- // we know we only need to link dynamic due to linking algorithm
- var depEntry = loader.defined[depName];
- if (depEntry)
- linkDynamicModule(depEntry, loader);
- }
- }
-
- // now execute
- entry.evaluated = true;
- var output = entry.execute.call(__global, function(name) {
- for (var i = 0, l = entry.deps.length; i < l; i++) {
- if (entry.deps[i] != name)
- continue;
- return getModule(entry.normalizedDeps[i], loader);
- }
- // try and normalize the dependency to see if we have another form
- var nameNormalized = loader.normalizeSync(name, entry.name);
- if (indexOf.call(entry.normalizedDeps, nameNormalized) != -1)
- return getModule(nameNormalized, loader);
-
- throw new Error('Module ' + name + ' not declared as a dependency of ' + entry.name);
- }, exports, module);
-
- if (output !== undefined)
- module.exports = output;
-
- // create the esModule object, which allows ES6 named imports of dynamics
- exports = module.exports;
-
- // __esModule flag treats as already-named
- if (exports && (exports.__esModule || exports instanceof Module))
- entry.esModule = loader.newModule(exports);
- // set module as 'default' export, then fake named exports by iterating properties
- else if (entry.esmExports && exports !== __global)
- entry.esModule = loader.newModule(getESModule(exports));
- // just use the 'default' export
- else
- entry.esModule = loader.newModule({ 'default': exports, __useDefault: true });
- }
-
- /*
- * Given a module, and the list of modules for this current branch,
- * ensure that each of the dependencies of this module is evaluated
- * (unless one is a circular dependency already in the list of seen
- * modules, in which case we execute it)
- *
- * Then we evaluate the module itself depth-first left to right
- * execution to match ES6 modules
- */
- function ensureEvaluated(moduleName, entry, seen, loader) {
- // if already seen, that means it's an already-evaluated non circular dependency
- if (!entry || entry.evaluated || !entry.declarative)
- return;
-
- // this only applies to declarative modules which late-execute
-
- seen.push(moduleName);
-
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- if (indexOf.call(seen, depName) == -1) {
- if (!loader.defined[depName])
- loader.get(depName);
- else
- ensureEvaluated(depName, loader.defined[depName], seen, loader);
- }
- }
-
- if (entry.evaluated)
- return;
-
- entry.evaluated = true;
- entry.module.execute.call(__global);
- }
-
- // override the delete method to also clear the register caches
- hook('delete', function(del) {
- return function(name) {
- delete this._loader.moduleRecords[name];
- delete this.defined[name];
- return del.call(this, name);
- };
- });
-
- hook('fetch', function(fetch) {
- return function(load) {
- if (this.defined[load.name]) {
- load.metadata.format = 'defined';
- return '';
- }
-
- load.metadata.deps = load.metadata.deps || [];
-
- return fetch.call(this, load);
- };
- });
-
- hook('translate', function(translate) {
- // we run the meta detection here (register is after meta)
- return function(load) {
- load.metadata.deps = load.metadata.deps || [];
- return Promise.resolve(translate.apply(this, arguments)).then(function(source) {
- // run detection for register format
- if (load.metadata.format == 'register' || !load.metadata.format && detectRegisterFormat(load.source))
- load.metadata.format = 'register';
- return source;
- });
- };
- });
-
- // implement a perforance shortpath for System.load with no deps
- hook('load', function(doLoad) {
- return function(normalized) {
- var loader = this;
- var entry = loader.defined[normalized];
-
- if (!entry || entry.deps.length)
- return doLoad.apply(this, arguments);
-
- entry.originalIndices = entry.normalizedDeps = [];
-
- // recursively ensure that the module and all its
- // dependencies are linked (with dependency group handling)
- link(normalized, entry, loader);
-
- // now handle dependency execution in correct order
- ensureEvaluated(normalized, entry, [], loader);
- if (!entry.esModule)
- entry.esModule = loader.newModule(entry.module.exports);
-
- // remove from the registry
- if (!loader.trace)
- loader.defined[normalized] = undefined;
-
- // return the defined module object
- loader.set(normalized, entry.esModule);
-
- return Promise.resolve();
- };
- });
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- if (load.metadata.format == 'detect')
- load.metadata.format = undefined;
-
- // assumes previous instantiate is sync
- // (core json support)
- instantiate.call(this, load);
-
- var loader = this;
-
- var entry;
-
- // first we check if this module has already been defined in the registry
- if (loader.defined[load.name]) {
- entry = loader.defined[load.name];
- // don't support deps for ES modules
- if (!entry.declarative)
- entry.deps = entry.deps.concat(load.metadata.deps);
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // picked up already by an anonymous System.register script injection
- // or via the dynamic formats
- else if (load.metadata.entry) {
- entry = load.metadata.entry;
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // Contains System.register calls
- // (dont run bundles in the builder)
- else if (!(loader.builder && load.metadata.bundle)
- && (load.metadata.format == 'register' || load.metadata.format == 'esm' || load.metadata.format == 'es6')) {
-
- if (typeof __exec != 'undefined')
- __exec.call(loader, load);
-
- if (!load.metadata.entry && !load.metadata.bundle)
- throw new Error(load.name + ' detected as ' + load.metadata.format + ' but didn\'t execute.');
-
- entry = load.metadata.entry;
-
- // support metadata deps for System.register
- if (entry && load.metadata.deps)
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // named bundles are just an empty module
- if (!entry) {
- entry = createEntry();
- entry.deps = load.metadata.deps;
- entry.execute = function() {};
- }
-
- // place this module onto defined for circular references
- loader.defined[load.name] = entry;
-
- var grouped = group(entry.deps);
-
- entry.deps = grouped.names;
- entry.originalIndices = grouped.indices;
- entry.name = load.name;
- entry.esmExports = load.metadata.esmExports !== false;
-
- // first, normalize all dependencies
- var normalizePromises = [];
- for (var i = 0, l = entry.deps.length; i < l; i++)
- normalizePromises.push(Promise.resolve(loader.normalize(entry.deps[i], load.name)));
-
- return Promise.all(normalizePromises).then(function(normalizedDeps) {
-
- entry.normalizedDeps = normalizedDeps;
-
- return {
- deps: entry.deps,
- execute: function() {
- // recursively ensure that the module and all its
- // dependencies are linked (with dependency group handling)
- link(load.name, entry, loader);
-
- // now handle dependency execution in correct order
- ensureEvaluated(load.name, entry, [], loader);
-
- if (!entry.esModule)
- entry.esModule = loader.newModule(entry.module.exports);
-
- // remove from the registry
- if (!loader.trace)
- loader.defined[load.name] = undefined;
-
- // return the defined module object
- return entry.esModule;
- }
- };
- });
- };
- });
-})();
-/*
- * Extension to detect ES6 and auto-load Traceur or Babel for processing
- */
-(function() {
- // good enough ES6 module detection regex - format detections not designed to be accurate, but to handle the 99% use case
- var esmRegEx = /(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/;
-
- var traceurRuntimeRegEx = /\$traceurRuntime\s*\./;
- var babelHelpersRegEx = /babelHelpers\s*\./;
-
- hook('translate', function(translate) {
- return function(load) {
- var loader = this;
- var args = arguments;
- return translate.apply(loader, args)
- .then(function(source) {
- // detect & transpile ES6
- if (load.metadata.format == 'esm' || load.metadata.format == 'es6' || !load.metadata.format && source.match(esmRegEx)) {
- if (load.metadata.format == 'es6')
- warn.call(loader, 'Module ' + load.name + ' has metadata setting its format to "es6", which is deprecated.\nThis should be updated to "esm".');
-
- load.metadata.format = 'esm';
-
- if (load.metadata.deps) {
- var depInject = '';
- for (var i = 0; i < load.metadata.deps.length; i++)
- depInject += 'import "' + load.metadata.deps[i] + '"; ';
- load.source = depInject + source;
- }
-
- if (loader.transpiler === false) {
- // we accept translation to esm for builds though to enable eg rollup optimizations
- if (loader.builder)
- return source;
- throw new TypeError('Unable to dynamically transpile ES module as SystemJS.transpiler set to false.');
- }
-
- // setting _loader.loadedTranspiler = false tells the next block to
- // do checks for setting transpiler metadata
- loader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false;
- if (loader.pluginLoader)
- loader.pluginLoader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false;
-
- // do transpilation
- return (loader._loader.transpilerPromise || (
- loader._loader.transpilerPromise = Promise.resolve(
- __global[loader.transpiler == 'typescript' ? 'ts' : loader.transpiler] || (loader.pluginLoader || loader)['import'](loader.transpiler)
- ))).then(function(transpiler) {
- loader._loader.loadedTranspilerRuntime = true;
-
- // translate hooks means this is a transpiler plugin instead of a raw implementation
- if (transpiler.translate) {
- // if transpiler is the same as the plugin loader, then don't run twice
- if (transpiler == load.metadata.loaderModule)
- return load.source;
-
- // convert the source map into an object for transpilation chaining
- if (typeof load.metadata.sourceMap == 'string')
- load.metadata.sourceMap = JSON.parse(load.metadata.sourceMap);
-
- return Promise.resolve(transpiler.translate.apply(loader, args))
- .then(function(source) {
- // sanitize sourceMap if an object not a JSON string
- var sourceMap = load.metadata.sourceMap;
- if (sourceMap && typeof sourceMap == 'object') {
- var originalName = load.address.split('!')[0];
-
- // force set the filename of the original file
- if (!sourceMap.file || sourceMap.file == load.address)
- sourceMap.file = originalName + '!transpiled';
-
- // force set the sources list if only one source
- if (!sourceMap.sources || sourceMap.sources.length <= 1 && (!sourceMap.sources[0] || sourceMap.sources[0] == load.address))
- sourceMap.sources = [originalName];
- }
-
- if (load.metadata.format == 'esm' && !loader.builder && detectRegisterFormat(source))
- load.metadata.format = 'register';
- return source;
- });
- }
-
- // legacy builder support
- if (loader.builder)
- load.metadata.originalSource = load.source;
-
- // defined in es6-module-loader/src/transpile.js
- return transpile.call(loader, load)
- .then(function(source) {
- // clear sourceMap as transpiler embeds it
- load.metadata.sourceMap = undefined;
- return source;
- });
- }, function(err) {
- throw addToError(err, 'Unable to load transpiler to transpile ' + load.name);
- });
- }
-
- // skip transpiler and transpiler runtime loading when transpiler is disabled
- if (loader.transpiler === false)
- return source;
-
- // load the transpiler correctly
- if (loader._loader.loadedTranspiler === false && (loader.transpiler == 'traceur' || loader.transpiler == 'typescript' || loader.transpiler == 'babel')
- && load.name == loader.normalizeSync(loader.transpiler)) {
-
- // always load transpiler as a global
- if (source.length > 100 && !load.metadata.format) {
- load.metadata.format = 'global';
-
- if (loader.transpiler === 'traceur')
- load.metadata.exports = 'traceur';
- if (loader.transpiler === 'typescript')
- load.metadata.exports = 'ts';
- }
-
- loader._loader.loadedTranspiler = true;
- }
-
- // load the transpiler runtime correctly
- if (loader._loader.loadedTranspilerRuntime === false) {
- if (load.name == loader.normalizeSync('traceur-runtime')
- || load.name == loader.normalizeSync('babel/external-helpers*')) {
- if (source.length > 100)
- load.metadata.format = load.metadata.format || 'global';
-
- loader._loader.loadedTranspilerRuntime = true;
- }
- }
-
- // detect transpiler runtime usage to load runtimes
- if ((load.metadata.format == 'register' || load.metadata.bundle) && loader._loader.loadedTranspilerRuntime !== true) {
- if (loader.transpiler == 'traceur' && !__global.$traceurRuntime && load.source.match(traceurRuntimeRegEx)) {
- loader._loader.loadedTranspilerRuntime = loader._loader.loadedTranspilerRuntime || false;
- return loader['import']('traceur-runtime').then(function() {
- return source;
- });
- }
- if (loader.transpiler == 'babel' && !__global.babelHelpers && load.source.match(babelHelpersRegEx)) {
- loader._loader.loadedTranspilerRuntime = loader._loader.loadedTranspilerRuntime || false;
- return loader['import']('babel/external-helpers').then(function() {
- return source;
- });
- }
- }
-
- return source;
- });
- };
- });
-
-})();
-/*
- SystemJS Global Format
-
- Supports
- metadata.deps
- metadata.globals
- metadata.exports
-
- Without metadata.exports, detects writes to the global object.
-*/
-var __globalName = typeof self != 'undefined' ? 'self' : 'global';
-
-hook('fetch', function(fetch) {
- return function(load) {
- if (load.metadata.exports && !load.metadata.format)
- load.metadata.format = 'global';
- return fetch.call(this, load);
- };
-});
-
-// ideally we could support script loading for globals, but the issue with that is that
-// we can't do it with AMD support side-by-side since AMD support means defining the
-// global define, and global support means not definining it, yet we don't have any hook
-// into the "pre-execution" phase of a script tag being loaded to handle both cases
-hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
-
- if (!load.metadata.format)
- load.metadata.format = 'global';
-
- // global is a fallback module format
- if (load.metadata.format == 'global' && !load.metadata.entry) {
-
- var entry = createEntry();
-
- load.metadata.entry = entry;
-
- entry.deps = [];
-
- for (var g in load.metadata.globals) {
- var gl = load.metadata.globals[g];
- if (gl)
- entry.deps.push(gl);
- }
-
- entry.execute = function(require, exports, module) {
-
- var globals;
- if (load.metadata.globals) {
- globals = {};
- for (var g in load.metadata.globals)
- if (load.metadata.globals[g])
- globals[g] = require(load.metadata.globals[g]);
- }
-
- var exportName = load.metadata.exports;
-
- if (exportName)
- load.source += '\n' + __globalName + '["' + exportName + '"] = ' + exportName + ';';
-
- var retrieveGlobal = loader.get('@@global-helpers').prepareGlobal(module.id, exportName, globals, !!load.metadata.encapsulateGlobal);
- __exec.call(loader, load);
-
- return retrieveGlobal();
- }
- }
- return instantiate.call(this, load);
- };
-});
-
-
-function getGlobalValue(exports) {
- if (typeof exports == 'string')
- return readMemberExpression(exports, __global);
-
- if (!(exports instanceof Array))
- throw new Error('Global exports must be a string or array.');
-
- var globalValue = {};
- var first = true;
- for (var i = 0; i < exports.length; i++) {
- var val = readMemberExpression(exports[i], __global);
- if (first) {
- globalValue['default'] = val;
- first = false;
- }
- globalValue[exports[i].split('.').pop()] = val;
- }
- return globalValue;
-}
-
-hook('reduceRegister_', function(reduceRegister) {
- return function(load, register) {
- if (register || (!load.metadata.exports && !(isWorker && load.metadata.format == 'global')))
- return reduceRegister.call(this, load, register);
-
- load.metadata.format = 'global';
- var entry = load.metadata.entry = createEntry();
- entry.deps = load.metadata.deps;
- var globalValue = getGlobalValue(load.metadata.exports);
- entry.execute = function() {
- return globalValue;
- };
- };
-});
-
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(loader);
-
- var hasOwnProperty = Object.prototype.hasOwnProperty;
-
- // bare minimum ignores
- var ignoredGlobalProps = ['_g', 'sessionStorage', 'localStorage', 'clipboardData', 'frames', 'frameElement', 'external',
- 'mozAnimationStartTime', 'webkitStorageInfo', 'webkitIndexedDB', 'mozInnerScreenY', 'mozInnerScreenX'];
-
- var globalSnapshot;
-
- function forEachGlobal(callback) {
- if (Object.keys)
- Object.keys(__global).forEach(callback);
- else
- for (var g in __global) {
- if (!hasOwnProperty.call(__global, g))
- continue;
- callback(g);
- }
- }
-
- function forEachGlobalValue(callback) {
- forEachGlobal(function(globalName) {
- if (indexOf.call(ignoredGlobalProps, globalName) != -1)
- return;
- try {
- var value = __global[globalName];
- }
- catch (e) {
- ignoredGlobalProps.push(globalName);
- }
- callback(globalName, value);
- });
- }
-
- loader.set('@@global-helpers', loader.newModule({
- prepareGlobal: function(moduleName, exports, globals, encapsulate) {
- // disable module detection
- var curDefine = __global.define;
-
- __global.define = undefined;
-
- // set globals
- var oldGlobals;
- if (globals) {
- oldGlobals = {};
- for (var g in globals) {
- oldGlobals[g] = __global[g];
- __global[g] = globals[g];
- }
- }
-
- // store a complete copy of the global object in order to detect changes
- if (!exports) {
- globalSnapshot = {};
-
- forEachGlobalValue(function(name, value) {
- globalSnapshot[name] = value;
- });
- }
-
- // return function to retrieve global
- return function() {
- var globalValue = exports ? getGlobalValue(exports) : {};
-
- var singleGlobal;
- var multipleExports = !!exports;
-
- if (!exports || encapsulate)
- forEachGlobalValue(function(name, value) {
- if (globalSnapshot[name] === value)
- return;
- if (typeof value == 'undefined')
- return;
-
- // allow global encapsulation where globals are removed
- if (encapsulate)
- __global[name] = undefined;
-
- if (!exports) {
- globalValue[name] = value;
-
- if (typeof singleGlobal != 'undefined') {
- if (!multipleExports && singleGlobal !== value)
- multipleExports = true;
- }
- else {
- singleGlobal = value;
- }
- }
- });
-
- globalValue = multipleExports ? globalValue : singleGlobal;
-
- // revert globals
- if (oldGlobals) {
- for (var g in oldGlobals)
- __global[g] = oldGlobals[g];
- }
- __global.define = curDefine;
-
- return globalValue;
- };
- }
- }));
- };
-});
-/*
- SystemJS CommonJS Format
-*/
-(function() {
- // CJS Module Format
- // require('...') || exports[''] = ... || exports.asd = ... || module.exports = ...
- var cjsExportsRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/;
- // RegEx adjusted from https://github.com/jbrantly/yabble/blob/master/lib/yabble.js#L339
- var cjsRequireRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g;
- var commentRegEx = /(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
-
- var stringRegEx = /("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g;
-
- // used to support leading #!/usr/bin/env in scripts as supported in Node
- var hashBangRegEx = /^\#\!.*/;
-
- function getCJSDeps(source) {
- cjsRequireRegEx.lastIndex = commentRegEx.lastIndex = stringRegEx.lastIndex = 0;
-
- var deps = [];
-
- var match;
-
- // track string and comment locations for unminified source
- var stringLocations = [], commentLocations = [];
-
- function inLocation(locations, match) {
- for (var i = 0; i < locations.length; i++)
- if (locations[i][0] < match.index && locations[i][1] > match.index)
- return true;
- return false;
- }
-
- if (source.length / source.split('\n').length < 200) {
- while (match = stringRegEx.exec(source))
- stringLocations.push([match.index, match.index + match[0].length]);
-
- // TODO: track template literals here before comments
-
- while (match = commentRegEx.exec(source)) {
- // only track comments not starting in strings
- if (!inLocation(stringLocations, match))
- commentLocations.push([match.index + match[1].length, match.index + match[0].length - 1]);
- }
- }
-
- while (match = cjsRequireRegEx.exec(source)) {
- // ensure we're not within a string or comment location
- if (!inLocation(stringLocations, match) && !inLocation(commentLocations, match)) {
- var dep = match[1].substr(1, match[1].length - 2);
- // skip cases like require('" + file + "')
- if (dep.match(/"|'/))
- continue;
- // trailing slash requires are removed as they don't map mains in SystemJS
- if (dep[dep.length - 1] == '/')
- dep = dep.substr(0, dep.length - 1);
- deps.push(dep);
- }
- }
-
- return deps;
- }
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
- if (!load.metadata.format) {
- cjsExportsRegEx.lastIndex = 0;
- cjsRequireRegEx.lastIndex = 0;
- if (cjsRequireRegEx.exec(load.source) || cjsExportsRegEx.exec(load.source))
- load.metadata.format = 'cjs';
- }
-
- if (load.metadata.format == 'cjs') {
- var metaDeps = load.metadata.deps;
- var deps = load.metadata.cjsRequireDetection === false ? [] : getCJSDeps(load.source);
-
- for (var g in load.metadata.globals)
- if (load.metadata.globals[g])
- deps.push(load.metadata.globals[g]);
-
- var entry = createEntry();
-
- load.metadata.entry = entry;
-
- entry.deps = deps;
- entry.executingRequire = true;
- entry.execute = function(_require, exports, module) {
- function require(name) {
- if (name[name.length - 1] == '/')
- name = name.substr(0, name.length - 1);
- return _require.apply(this, arguments);
- }
- require.resolve = function(name) {
- return loader.get('@@cjs-helpers').requireResolve(name, module.id);
- };
- // support module.paths ish
- module.paths = [];
- module.require = _require;
-
- // ensure meta deps execute first
- if (!load.metadata.cjsDeferDepsExecute)
- for (var i = 0; i < metaDeps.length; i++)
- require(metaDeps[i]);
-
- var pathVars = loader.get('@@cjs-helpers').getPathVars(module.id);
- var __cjsWrapper = {
- exports: exports,
- args: [require, exports, module, pathVars.filename, pathVars.dirname, __global, __global]
- };
-
- var cjsWrapper = "(function(require, exports, module, __filename, __dirname, global, GLOBAL";
-
- // add metadata.globals to the wrapper arguments
- if (load.metadata.globals)
- for (var g in load.metadata.globals) {
- __cjsWrapper.args.push(require(load.metadata.globals[g]));
- cjsWrapper += ", " + g;
- }
-
- // disable AMD detection
- var define = __global.define;
- __global.define = undefined;
- __global.__cjsWrapper = __cjsWrapper;
-
- load.source = cjsWrapper + ") {" + load.source.replace(hashBangRegEx, '') + "\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);";
-
- __exec.call(loader, load);
-
- __global.__cjsWrapper = undefined;
- __global.define = define;
- };
- }
-
- return instantiate.call(loader, load);
- };
- });
-})();
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(loader);
-
- if (typeof window != 'undefined' && typeof document != 'undefined' && window.location)
- var windowOrigin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
-
- function stripOrigin(path) {
- if (path.substr(0, 8) == 'file:///')
- return path.substr(7 + !!isWindows);
-
- if (windowOrigin && path.substr(0, windowOrigin.length) == windowOrigin)
- return path.substr(windowOrigin.length);
-
- return path;
- }
-
- loader.set('@@cjs-helpers', loader.newModule({
- requireResolve: function(request, parentId) {
- return stripOrigin(loader.normalizeSync(request, parentId));
- },
- getPathVars: function(moduleId) {
- // remove any plugin syntax
- var pluginIndex = moduleId.lastIndexOf('!');
- var filename;
- if (pluginIndex != -1)
- filename = moduleId.substr(0, pluginIndex);
- else
- filename = moduleId;
-
- var dirname = filename.split('/');
- dirname.pop();
- dirname = dirname.join('/');
-
- return {
- filename: stripOrigin(filename),
- dirname: stripOrigin(dirname)
- };
- }
- }))
- };
-});/*
- * AMD Helper function module
- * Separated into its own file as this is the part needed for full AMD support in SFX builds
- * NB since implementations have now diverged this can be merged back with amd.js
- */
-
-hook('fetch', function(fetch) {
- return function(load) {
- // script load implies define global leak
- if (load.metadata.scriptLoad && isBrowser)
- __global.define = this.amdDefine;
- return fetch.call(this, load);
- };
-});
-
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(this);
-
- var commentRegEx = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
- var cjsRequirePre = "(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])";
- var cjsRequirePost = "\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)";
- var fnBracketRegEx = /\(([^\)]*)\)/;
- var wsRegEx = /^\s+|\s+$/g;
-
- var requireRegExs = {};
-
- function getCJSDeps(source, requireIndex) {
-
- // remove comments
- source = source.replace(commentRegEx, '');
-
- // determine the require alias
- var params = source.match(fnBracketRegEx);
- var requireAlias = (params[1].split(',')[requireIndex] || 'require').replace(wsRegEx, '');
-
- // find or generate the regex for this requireAlias
- var requireRegEx = requireRegExs[requireAlias] || (requireRegExs[requireAlias] = new RegExp(cjsRequirePre + requireAlias + cjsRequirePost, 'g'));
-
- requireRegEx.lastIndex = 0;
-
- var deps = [];
-
- var match;
- while (match = requireRegEx.exec(source))
- deps.push(match[2] || match[3]);
-
- return deps;
- }
-
- /*
- AMD-compatible require
- To copy RequireJS, set window.require = window.requirejs = loader.amdRequire
- */
- function require(names, callback, errback, referer) {
- // in amd, first arg can be a config object... we just ignore
- if (typeof names == 'object' && !(names instanceof Array))
- return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));
-
- // amd require
- if (typeof names == 'string' && typeof callback == 'function')
- names = [names];
- if (names instanceof Array) {
- var dynamicRequires = [];
- for (var i = 0; i < names.length; i++)
- dynamicRequires.push(loader['import'](names[i], referer));
- Promise.all(dynamicRequires).then(function(modules) {
- if (callback)
- callback.apply(null, modules);
- }, errback);
- }
-
- // commonjs require
- else if (typeof names == 'string') {
- var defaultJSExtension = loader.defaultJSExtensions && names.substr(names.length - 3, 3) != '.js';
- var normalized = loader.decanonicalize(names, referer);
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) == '.js')
- normalized = normalized.substr(0, normalized.length - 3);
- var module = loader.get(normalized);
- if (!module)
- throw new Error('Module not already loaded loading "' + names + '" as ' + normalized + (referer ? ' from "' + referer + '".' : '.'));
- return module.__useDefault ? module['default'] : module;
- }
-
- else
- throw new TypeError('Invalid require');
- }
-
- function define(name, deps, factory) {
- if (typeof name != 'string') {
- factory = deps;
- deps = name;
- name = null;
- }
- if (!(deps instanceof Array)) {
- factory = deps;
- deps = ['require', 'exports', 'module'].splice(0, factory.length);
- }
-
- if (typeof factory != 'function')
- factory = (function(factory) {
- return function() { return factory; }
- })(factory);
-
- // in IE8, a trailing comma becomes a trailing undefined entry
- if (deps[deps.length - 1] === undefined)
- deps.pop();
-
- // remove system dependencies
- var requireIndex, exportsIndex, moduleIndex;
-
- if ((requireIndex = indexOf.call(deps, 'require')) != -1) {
-
- deps.splice(requireIndex, 1);
-
- // only trace cjs requires for non-named
- // named defines assume the trace has already been done
- if (!name)
- deps = deps.concat(getCJSDeps(factory.toString(), requireIndex));
- }
-
- if ((exportsIndex = indexOf.call(deps, 'exports')) != -1)
- deps.splice(exportsIndex, 1);
-
- if ((moduleIndex = indexOf.call(deps, 'module')) != -1)
- deps.splice(moduleIndex, 1);
-
- function execute(req, exports, module) {
- var depValues = [];
- for (var i = 0; i < deps.length; i++)
- depValues.push(req(deps[i]));
-
- module.uri = module.id;
-
- module.config = function() {};
-
- // add back in system dependencies
- if (moduleIndex != -1)
- depValues.splice(moduleIndex, 0, module);
-
- if (exportsIndex != -1)
- depValues.splice(exportsIndex, 0, exports);
-
- if (requireIndex != -1) {
- function contextualRequire(names, callback, errback) {
- if (typeof names == 'string' && typeof callback != 'function')
- return req(names);
- return require.call(loader, names, callback, errback, module.id);
- }
- contextualRequire.toUrl = function(name) {
- // normalize without defaultJSExtensions
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
- var url = loader.decanonicalize(name, module.id);
- if (defaultJSExtension && url.substr(url.length - 3, 3) == '.js')
- url = url.substr(0, url.length - 3);
- return url;
- };
- depValues.splice(requireIndex, 0, contextualRequire);
- }
-
- // set global require to AMD require
- var curRequire = __global.require;
- __global.require = require;
-
- var output = factory.apply(exportsIndex == -1 ? __global : exports, depValues);
-
- __global.require = curRequire;
-
- if (typeof output == 'undefined' && module)
- output = module.exports;
-
- if (typeof output != 'undefined')
- return output;
- }
-
- var entry = createEntry();
- entry.name = name && (loader.decanonicalize || loader.normalize).call(loader, name);
- entry.deps = deps;
- entry.execute = execute;
-
- loader.pushRegister_({
- amd: true,
- entry: entry
- });
- }
- define.amd = {};
-
- // reduction function to attach defines to a load record
- hook('reduceRegister_', function(reduceRegister) {
- return function(load, register) {
- // only handle AMD registers here
- if (!register || !register.amd)
- return reduceRegister.call(this, load, register);
-
- var curMeta = load && load.metadata;
- var entry = register.entry;
-
- if (curMeta) {
- if (!curMeta.format || curMeta.format == 'detect')
- curMeta.format = 'amd';
- else if (!entry.name && curMeta.format != 'amd')
- throw new Error('AMD define called while executing ' + curMeta.format + ' module ' + load.name);
- }
-
- // anonymous define
- if (!entry.name) {
- if (!curMeta)
- throw new TypeError('Unexpected anonymous AMD define.');
-
- if (curMeta.entry && !curMeta.entry.name)
- throw new Error('Multiple anonymous defines in module ' + load.name);
-
- curMeta.entry = entry;
- }
- // named define
- else {
- // if we don't have any other defines,
- // then let this be an anonymous define
- // this is just to support single modules of the form:
- // define('jquery')
- // still loading anonymously
- // because it is done widely enough to be useful
- // as soon as there is more than one define, this gets removed though
- if (curMeta) {
- if (!curMeta.entry && !curMeta.bundle)
- curMeta.entry = entry;
- else if (curMeta.entry && curMeta.entry.name && curMeta.entry.name != load.name)
- curMeta.entry = undefined;
-
- // note this is now a bundle
- curMeta.bundle = true;
- }
-
- // define the module through the register registry
- if (!(entry.name in this.defined))
- this.defined[entry.name] = entry;
- }
- };
- });
-
- loader.amdDefine = define;
- loader.amdRequire = require;
- };
-});/*
- SystemJS AMD Format
-*/
-(function() {
- // AMD Module Format Detection RegEx
- // define([.., .., ..], ...)
- // define(varName); || define(function(require, exports) {}); || define({})
- var amdRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])define\s*\(\s*("[^"]+"\s*,\s*|'[^']+'\s*,\s*)?\s*(\[(\s*(("[^"]+"|'[^']+')\s*,|\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*(\s*("[^"]+"|'[^']+')\s*,?)?(\s*(\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*\s*\]|function\s*|{|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*\))/;
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
-
- if (load.metadata.format == 'amd' || !load.metadata.format && load.source.match(amdRegEx)) {
- load.metadata.format = 'amd';
-
- if (!loader.builder && loader.execute !== false) {
- var curDefine = __global.define;
- __global.define = this.amdDefine;
-
- try {
- __exec.call(loader, load);
- }
- finally {
- __global.define = curDefine;
- }
-
- if (!load.metadata.entry && !load.metadata.bundle)
- throw new TypeError('AMD module ' + load.name + ' did not define');
- }
- else {
- load.metadata.execute = function() {
- return load.metadata.builderExecute.apply(this, arguments);
- };
- }
- }
-
- return instantiate.call(loader, load);
- };
- });
-
-})();
-/*
- SystemJS Loader Plugin Support
-
- Supports plugin loader syntax with "!", or via metadata.loader
-
- The plugin name is loaded as a module itself, and can override standard loader hooks
- for the plugin resource. See the plugin section of the systemjs readme.
-*/
-
-(function() {
- function getParentName(loader, parentName) {
- // if parent is a plugin, normalize against the parent plugin argument only
- if (parentName) {
- var parentPluginIndex;
- if (loader.pluginFirst) {
- if ((parentPluginIndex = parentName.lastIndexOf('!')) != -1)
- return parentName.substr(parentPluginIndex + 1);
- }
- else {
- if ((parentPluginIndex = parentName.indexOf('!')) != -1)
- return parentName.substr(0, parentPluginIndex);
- }
-
- return parentName;
- }
- }
-
- function parsePlugin(loader, name) {
- var argumentName;
- var pluginName;
-
- var pluginIndex = name.lastIndexOf('!');
-
- if (pluginIndex == -1)
- return;
-
- if (loader.pluginFirst) {
- argumentName = name.substr(pluginIndex + 1);
- pluginName = name.substr(0, pluginIndex);
- }
- else {
- argumentName = name.substr(0, pluginIndex);
- pluginName = name.substr(pluginIndex + 1) || argumentName.substr(argumentName.lastIndexOf('.') + 1);
- }
-
- return {
- argument: argumentName,
- plugin: pluginName
- };
- }
-
- // put name back together after parts have been normalized
- function combinePluginParts(loader, argumentName, pluginName, defaultExtension) {
- if (defaultExtension && argumentName.substr(argumentName.length - 3, 3) == '.js')
- argumentName = argumentName.substr(0, argumentName.length - 3);
-
- if (loader.pluginFirst) {
- return pluginName + '!' + argumentName;
- }
- else {
- return argumentName + '!' + pluginName;
- }
- }
-
- // note if normalize will add a default js extension
- // if so, remove for backwards compat
- // this is strange and sucks, but will be deprecated
- function checkDefaultExtension(loader, arg) {
- return loader.defaultJSExtensions && arg.substr(arg.length - 3, 3) != '.js';
- }
-
- function createNormalizeSync(normalizeSync) {
- return function(name, parentName, isPlugin) {
- var loader = this;
-
- var parsed = parsePlugin(loader, name);
- parentName = getParentName(this, parentName);
-
- if (!parsed)
- return normalizeSync.call(this, name, parentName, isPlugin);
-
- // if this is a plugin, normalize the plugin name and the argument
- var argumentName = loader.normalizeSync(parsed.argument, parentName, true);
- var pluginName = loader.normalizeSync(parsed.plugin, parentName, true);
- return combinePluginParts(loader, argumentName, pluginName, checkDefaultExtension(loader, parsed.argument));
- };
- }
-
- hook('decanonicalize', createNormalizeSync);
- hook('normalizeSync', createNormalizeSync);
-
- hook('normalize', function(normalize) {
- return function(name, parentName, isPlugin) {
- var loader = this;
-
- parentName = getParentName(this, parentName);
-
- var parsed = parsePlugin(loader, name);
-
- if (!parsed)
- return normalize.call(loader, name, parentName, isPlugin);
-
- return Promise.all([
- loader.normalize(parsed.argument, parentName, true),
- loader.normalize(parsed.plugin, parentName, false)
- ])
- .then(function(normalized) {
- return combinePluginParts(loader, normalized[0], normalized[1], checkDefaultExtension(loader, parsed.argument));
- });
- }
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
-
- var name = load.name;
-
- // plugin syntax
- var pluginSyntaxIndex;
- if (loader.pluginFirst) {
- if ((pluginSyntaxIndex = name.indexOf('!')) != -1) {
- load.metadata.loader = name.substr(0, pluginSyntaxIndex);
- load.name = name.substr(pluginSyntaxIndex + 1);
- }
- }
- else {
- if ((pluginSyntaxIndex = name.lastIndexOf('!')) != -1) {
- load.metadata.loader = name.substr(pluginSyntaxIndex + 1);
- load.name = name.substr(0, pluginSyntaxIndex);
- }
- }
-
- return locate.call(loader, load)
- .then(function(address) {
- if (pluginSyntaxIndex != -1 || !load.metadata.loader)
- return address;
-
- // normalize plugin relative to parent in locate here when
- // using plugin via loader metadata
- return (loader.pluginLoader || loader).normalize(load.metadata.loader, load.name)
- .then(function(loaderNormalized) {
- load.metadata.loader = loaderNormalized;
- return address;
- });
- })
- .then(function(address) {
- var plugin = load.metadata.loader;
-
- if (!plugin)
- return address;
-
- // don't allow a plugin to load itself
- if (load.name == plugin)
- throw new Error('Plugin ' + plugin + ' cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.');
-
- // only fetch the plugin itself if this name isn't defined
- if (loader.defined && loader.defined[name])
- return address;
-
- var pluginLoader = loader.pluginLoader || loader;
-
- // load the plugin module and run standard locate
- return pluginLoader['import'](plugin)
- .then(function(loaderModule) {
- // store the plugin module itself on the metadata
- load.metadata.loaderModule = loaderModule;
-
- load.address = address;
- if (loaderModule.locate)
- return loaderModule.locate.call(loader, load);
-
- return address;
- });
- });
- };
- });
-
- hook('fetch', function(fetch) {
- return function(load) {
- var loader = this;
- if (load.metadata.loaderModule && load.metadata.loaderModule.fetch && load.metadata.format != 'defined') {
- load.metadata.scriptLoad = false;
- return load.metadata.loaderModule.fetch.call(loader, load, function(load) {
- return fetch.call(loader, load);
- });
- }
- else {
- return fetch.call(loader, load);
- }
- };
- });
-
- hook('translate', function(translate) {
- return function(load) {
- var loader = this;
- var args = arguments;
- if (load.metadata.loaderModule && load.metadata.loaderModule.translate && load.metadata.format != 'defined') {
- return Promise.resolve(load.metadata.loaderModule.translate.apply(loader, args)).then(function(result) {
- var sourceMap = load.metadata.sourceMap;
-
- // sanitize sourceMap if an object not a JSON string
- if (sourceMap) {
- if (typeof sourceMap != 'object')
- throw new Error('load.metadata.sourceMap must be set to an object.');
-
- var originalName = load.address.split('!')[0];
-
- // force set the filename of the original file
- if (!sourceMap.file || sourceMap.file == load.address)
- sourceMap.file = originalName + '!transpiled';
-
- // force set the sources list if only one source
- if (!sourceMap.sources || sourceMap.sources.length <= 1 && (!sourceMap.sources[0] || sourceMap.sources[0] == load.address))
- sourceMap.sources = [originalName];
- }
-
- // if running on file:/// URLs, sourcesContent is necessary
- // load.metadata.sourceMap.sourcesContent = [load.source];
-
- if (typeof result == 'string')
- load.source = result;
- else
- warn.call(this, 'Plugin ' + load.metadata.loader + ' should return the source in translate, instead of setting load.source directly. This support will be deprecated.');
-
- return translate.apply(loader, args);
- });
- }
- else {
- return translate.apply(loader, args);
- }
- };
- });
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
- var calledInstantiate = false;
-
- if (load.metadata.loaderModule && load.metadata.loaderModule.instantiate && !loader.builder && load.metadata.format != 'defined')
- return Promise.resolve(load.metadata.loaderModule.instantiate.call(loader, load, function(load) {
- if (calledInstantiate)
- throw new Error('Instantiate must only be called once.');
- calledInstantiate = true;
- return instantiate.call(loader, load);
- })).then(function(result) {
- if (calledInstantiate)
- return result;
-
- load.metadata.entry = createEntry();
- load.metadata.entry.execute = function() {
- return result;
- }
- load.metadata.entry.deps = load.metadata.deps;
- load.metadata.format = 'defined';
- return instantiate.call(loader, load);
- });
- else
- return instantiate.call(loader, load);
- };
- });
-
-})();/*
- * Conditions Extension
- *
- * Allows a condition module to alter the resolution of an import via syntax:
- *
- * import $ from 'jquery/#{browser}';
- *
- * Will first load the module 'browser' via `SystemJS.import('browser')` and
- * take the default export of that module.
- * If the default export is not a string, an error is thrown.
- *
- * We then substitute the string into the require to get the conditional resolution
- * enabling environment-specific variations like:
- *
- * import $ from 'jquery/ie'
- * import $ from 'jquery/firefox'
- * import $ from 'jquery/chrome'
- * import $ from 'jquery/safari'
- *
- * It can be useful for a condition module to define multiple conditions.
- * This can be done via the `|` modifier to specify an export member expression:
- *
- * import 'jquery/#{./browser.js|grade.version}'
- *
- * Where the `grade` export `version` member in the `browser.js` module is substituted.
- *
- *
- * Boolean Conditionals
- *
- * For polyfill modules, that are used as imports but have no module value,
- * a binary conditional allows a module not to be loaded at all if not needed:
- *
- * import 'es5-shim#?./conditions.js|needs-es5shim'
- *
- * These conditions can also be negated via:
- *
- * import 'es5-shim#?./conditions.js|~es6'
- *
- */
-
- var sysConditions = ['browser', 'node', 'dev', 'build', 'production', 'default'];
-
- function parseCondition(condition) {
- var conditionExport, conditionModule, negation;
-
- var negation = condition[0] == '~';
- var conditionExportIndex = condition.lastIndexOf('|');
- if (conditionExportIndex != -1) {
- conditionExport = condition.substr(conditionExportIndex + 1);
- conditionModule = condition.substr(negation, conditionExportIndex - negation);
-
- if (negation)
- warn.call(this, 'Condition negation form "' + condition + '" is deprecated for "' + conditionModule + '|~' + conditionExport + '"');
-
- if (conditionExport[0] == '~') {
- negation = true;
- conditionExport = conditionExport.substr(1);
- }
- }
- else {
- conditionExport = 'default';
- conditionModule = condition.substr(negation);
- if (sysConditions.indexOf(conditionModule) != -1) {
- conditionExport = conditionModule;
- conditionModule = null;
- }
- }
-
- return {
- module: conditionModule || '@system-env',
- prop: conditionExport,
- negate: negation
- };
- }
-
- function serializeCondition(conditionObj) {
- return conditionObj.module + '|' + (conditionObj.negate ? '~' : '') + conditionObj.prop;
- }
-
- function resolveCondition(conditionObj, parentName, bool) {
- var self = this;
- return this.normalize(conditionObj.module, parentName)
- .then(function(normalizedCondition) {
- return self.load(normalizedCondition)
- .then(function(q) {
- var m = readMemberExpression(conditionObj.prop, self.get(normalizedCondition));
-
- if (bool && typeof m != 'boolean')
- throw new TypeError('Condition ' + serializeCondition(conditionObj) + ' did not resolve to a boolean.');
-
- return conditionObj.negate ? !m : m;
- });
- });
- }
-
- var interpolationRegEx = /#\{[^\}]+\}/;
- function interpolateConditional(name, parentName) {
- // first we normalize the conditional
- var conditionalMatch = name.match(interpolationRegEx);
-
- if (!conditionalMatch)
- return Promise.resolve(name);
-
- var conditionObj = parseCondition.call(this, conditionalMatch[0].substr(2, conditionalMatch[0].length - 3));
-
- // in builds, return normalized conditional
- if (this.builder)
- return this['normalize'](conditionObj.module, parentName)
- .then(function(conditionModule) {
- conditionObj.module = conditionModule;
- return name.replace(interpolationRegEx, '#{' + serializeCondition(conditionObj) + '}');
- });
-
- return resolveCondition.call(this, conditionObj, parentName, false)
- .then(function(conditionValue) {
- if (typeof conditionValue !== 'string')
- throw new TypeError('The condition value for ' + name + ' doesn\'t resolve to a string.');
-
- if (conditionValue.indexOf('/') != -1)
- throw new TypeError('Unabled to interpolate conditional ' + name + (parentName ? ' in ' + parentName : '') + '\n\tThe condition value ' + conditionValue + ' cannot contain a "/" separator.');
-
- return name.replace(interpolationRegEx, conditionValue);
- });
- }
-
- function booleanConditional(name, parentName) {
- // first we normalize the conditional
- var booleanIndex = name.lastIndexOf('#?');
-
- if (booleanIndex == -1)
- return Promise.resolve(name);
-
- var conditionObj = parseCondition.call(this, name.substr(booleanIndex + 2));
-
- // in builds, return normalized conditional
- if (this.builder)
- return this['normalize'](conditionObj.module, parentName)
- .then(function(conditionModule) {
- conditionObj.module = conditionModule;
- return name.substr(0, booleanIndex) + '#?' + serializeCondition(conditionObj);
- });
-
- return resolveCondition.call(this, conditionObj, parentName, true)
- .then(function(conditionValue) {
- return conditionValue ? name.substr(0, booleanIndex) : '@empty';
- });
- }
-
- // normalizeSync does not parse conditionals at all although it could
- hook('normalize', function(normalize) {
- return function(name, parentName, skipExt) {
- var loader = this;
- return booleanConditional.call(loader, name, parentName)
- .then(function(name) {
- return normalize.call(loader, name, parentName, skipExt);
- })
- .then(function(normalized) {
- return interpolateConditional.call(loader, normalized, parentName);
- });
- };
- });
-/*
- * Alias Extension
- *
- * Allows a module to be a plain copy of another module by module name
- *
- * SystemJS.meta['mybootstrapalias'] = { alias: 'bootstrap' };
- *
- */
-(function() {
- // aliases
- hook('fetch', function(fetch) {
- return function(load) {
- var alias = load.metadata.alias;
- var aliasDeps = load.metadata.deps || [];
- if (alias) {
- load.metadata.format = 'defined';
- var entry = createEntry();
- this.defined[load.name] = entry;
- entry.declarative = true;
- entry.deps = aliasDeps.concat([alias]);
- entry.declare = function(_export) {
- return {
- setters: [function(module) {
- for (var p in module)
- _export(p, module[p]);
- if (module.__useDefault)
- entry.module.exports.__useDefault = true;
- }],
- execute: function() {}
- };
- };
- return '';
- }
-
- return fetch.call(this, load);
- };
- });
-})();/*
- * Meta Extension
- *
- * Sets default metadata on a load record (load.metadata) from
- * loader.metadata via SystemJS.meta function.
- *
- *
- * Also provides an inline meta syntax for module meta in source.
- *
- * Eg:
- *
- * loader.meta({
- * 'my/module': { deps: ['jquery'] }
- * 'my/*': { format: 'amd' }
- * });
- *
- * Which in turn populates loader.metadata.
- *
- * load.metadata.deps and load.metadata.format will then be set
- * for 'my/module'
- *
- * The same meta could be set with a my/module.js file containing:
- *
- * my/module.js
- * "format amd";
- * "deps[] jquery";
- * "globals.some value"
- * console.log('this is my/module');
- *
- * Configuration meta always takes preference to inline meta.
- *
- * Multiple matches in wildcards are supported and ammend the meta.
- *
- *
- * The benefits of the function form is that paths are URL-normalized
- * supporting say
- *
- * loader.meta({ './app': { format: 'cjs' } });
- *
- * Instead of needing to set against the absolute URL (https://site.com/app.js)
- *
- */
-
-(function() {
-
- hookConstructor(function(constructor) {
- return function() {
- this.meta = {};
- constructor.call(this);
- };
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var meta = this.meta;
- var name = load.name;
-
- // NB for perf, maybe introduce a fast-path wildcard lookup cache here
- // which is checked first
-
- // apply wildcard metas
- var bestDepth = 0;
- var wildcardIndex;
- for (var module in meta) {
- wildcardIndex = module.indexOf('*');
- if (wildcardIndex === -1)
- continue;
- if (module.substr(0, wildcardIndex) === name.substr(0, wildcardIndex)
- && module.substr(wildcardIndex + 1) === name.substr(name.length - module.length + wildcardIndex + 1)) {
- var depth = module.split('/').length;
- if (depth > bestDepth)
- bestDepth = depth;
- extendMeta(load.metadata, meta[module], bestDepth != depth);
- }
- }
-
- // apply exact meta
- if (meta[name])
- extendMeta(load.metadata, meta[name]);
-
- return locate.call(this, load);
- };
- });
-
- // detect any meta header syntax
- // only set if not already set
- var metaRegEx = /^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/;
- var metaPartRegEx = /\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;
-
- function setMetaProperty(target, p, value) {
- var pParts = p.split('.');
- var curPart;
- while (pParts.length > 1) {
- curPart = pParts.shift();
- target = target[curPart] = target[curPart] || {};
- }
- curPart = pParts.shift();
- if (!(curPart in target))
- target[curPart] = value;
- }
-
- hook('translate', function(translate) {
- return function(load) {
- // shortpath for bundled
- if (load.metadata.format == 'defined') {
- load.metadata.deps = load.metadata.deps || [];
- return Promise.resolve(load.source);
- }
-
- // NB meta will be post-translate pending transpiler conversion to plugins
- var meta = load.source.match(metaRegEx);
- if (meta) {
- var metaParts = meta[0].match(metaPartRegEx);
-
- for (var i = 0; i < metaParts.length; i++) {
- var curPart = metaParts[i];
- var len = curPart.length;
-
- var firstChar = curPart.substr(0, 1);
- if (curPart.substr(len - 1, 1) == ';')
- len--;
-
- if (firstChar != '"' && firstChar != "'")
- continue;
-
- var metaString = curPart.substr(1, curPart.length - 3);
- var metaName = metaString.substr(0, metaString.indexOf(' '));
-
- if (metaName) {
- var metaValue = metaString.substr(metaName.length + 1, metaString.length - metaName.length - 1);
-
- if (metaName.substr(metaName.length - 2, 2) == '[]') {
- metaName = metaName.substr(0, metaName.length - 2);
- load.metadata[metaName] = load.metadata[metaName] || [];
- load.metadata[metaName].push(metaValue);
- }
- else if (load.metadata[metaName] instanceof Array) {
- // temporary backwards compat for previous "deps" syntax
- warn.call(this, 'Module ' + load.name + ' contains deprecated "deps ' + metaValue + '" meta syntax.\nThis should be updated to "deps[] ' + metaValue + '" for pushing to array meta.');
- load.metadata[metaName].push(metaValue);
- }
- else {
- setMetaProperty(load.metadata, metaName, metaValue);
- }
- }
- else {
- load.metadata[metaString] = true;
- }
- }
- }
-
- return translate.apply(this, arguments);
- };
- });
-})();
-/*
- System bundles
-
- Allows a bundle module to be specified which will be dynamically
- loaded before trying to load a given module.
-
- For example:
- SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
-
- Will result in a load to "mybundle" whenever a load to "jquery"
- or "bootstrap/js/bootstrap" is made.
-
- In this way, the bundle becomes the request that provides the module
-*/
-
-(function() {
- // bundles support (just like RequireJS)
- // bundle name is module name of bundle itself
- // bundle is array of modules defined by the bundle
- // when a module in the bundle is requested, the bundle is loaded instead
- // of the form SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.bundles = {};
- this._loader.loadedBundles = {};
- };
- });
-
- // assign bundle metadata for bundle loads
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- var matched = false;
-
- if (!(load.name in loader.defined))
- for (var b in loader.bundles) {
- for (var i = 0; i < loader.bundles[b].length; i++) {
- var curModule = loader.bundles[b][i];
-
- if (curModule == load.name) {
- matched = true;
- break;
- }
-
- // wildcard in bundles does not include / boundaries
- if (curModule.indexOf('*') != -1) {
- var parts = curModule.split('*');
- if (parts.length != 2) {
- loader.bundles[b].splice(i--, 1);
- continue;
- }
-
- if (load.name.substring(0, parts[0].length) == parts[0] &&
- load.name.substr(load.name.length - parts[1].length, parts[1].length) == parts[1] &&
- load.name.substr(parts[0].length, load.name.length - parts[1].length - parts[0].length).indexOf('/') == -1) {
- matched = true;
- break;
- }
- }
- }
-
- if (matched)
- return loader['import'](b)
- .then(function() {
- return locate.call(loader, load);
- });
- }
-
- return locate.call(loader, load);
- };
- });
-})();
-/*
- * Dependency Tree Cache
- *
- * Allows a build to pre-populate a dependency trace tree on the loader of
- * the expected dependency tree, to be loaded upfront when requesting the
- * module, avoinding the n round trips latency of module loading, where
- * n is the dependency tree depth.
- *
- * eg:
- * SystemJS.depCache = {
- * 'app': ['normalized', 'deps'],
- * 'normalized': ['another'],
- * 'deps': ['tree']
- * };
- *
- * SystemJS.import('app')
- * // simultaneously starts loading all of:
- * // 'normalized', 'deps', 'another', 'tree'
- * // before "app" source is even loaded
- *
- */
-
-(function() {
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.depCache = {};
- }
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- // load direct deps, in turn will pick up their trace trees
- var deps = loader.depCache[load.name];
- if (deps)
- for (var i = 0; i < deps.length; i++)
- loader['import'](deps[i], load.name);
-
- return locate.call(loader, load);
- };
- });
-})();
-
-System = new SystemJSLoader();
-
-__global.SystemJS = System;
-System.version = '0.19.39 Standard';
- if (typeof module == 'object' && module.exports && typeof exports == 'object')
- module.exports = System;
-
- __global.System = System;
-
-})(typeof self != 'undefined' ? self : global);}
-
-// auto-load Promise polyfill if needed in the browser
-var doPolyfill = typeof Promise === 'undefined';
-
-// document.write
-if (typeof document !== 'undefined') {
- var scripts = document.getElementsByTagName('script');
- $__curScript = scripts[scripts.length - 1];
- if (document.currentScript && ($__curScript.defer || $__curScript.async))
- $__curScript = document.currentScript;
- if (doPolyfill) {
- var curPath = $__curScript.src;
- var basePath = curPath.substr(0, curPath.lastIndexOf('/') + 1);
- window.systemJSBootstrap = bootstrap;
- document.write(
- '<' + 'script type="text/javascript" src="' + basePath + 'system-polyfills.js">' + '<' + '/script>'
- );
- }
- else {
- bootstrap();
- }
-}
-// importScripts
-else if (typeof importScripts !== 'undefined') {
- var basePath = '';
- try {
- throw new Error('_');
- } catch (e) {
- e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/, function(m, url) {
- $__curScript = { src: url };
- basePath = url.replace(/\/[^\/]*$/, '/');
- });
- }
- if (doPolyfill)
- importScripts(basePath + 'system-polyfills.js');
- bootstrap();
-}
-else {
- $__curScript = typeof __filename != 'undefined' ? { src: __filename } : null;
- bootstrap();
-}
-
-
-})(); \ No newline at end of file
diff --git a/thirdparty/systemjs/docs/config-api.md b/thirdparty/systemjs/docs/config-api.md
deleted file mode 100644
index 6ef4c6b92..000000000
--- a/thirdparty/systemjs/docs/config-api.md
+++ /dev/null
@@ -1,292 +0,0 @@
-## Configuration API
-
-### Setting Configuration
-
-Once SystemJS has loaded, configuration can be set on SystemJS by using the configuration function `System.config`:
-
-```javascript
-System.config({
- configA: {},
- configB: 'value'
-});
-```
-
-This is a helper function which normalizes configuration and sets configuration properties on the SystemJS instance.
-
-`System.config({ prop: 'value' })` is mostly equivalent to `System.prop = value` except that it will extend configuration objects,
-and certain properties will be normalized to be stored correctly.
-
-For this reason it is usually advisable to use `System.config` instead of setting instance properties directly.
-
-### Configuration Options
-
-* [babelOptions](#babeloptions)
-* [bundle](#bundle)
-* [defaultJSExtensions](#defaultjsextensions)
-* [depCache](#depcache)
-* [map](#map)
-* [meta](#meta)
-* [packages](#packages)
-* [paths](#paths)
-* [traceurOptions](#traceuroptions)
-* [transpiler](#transpiler)
-* [typescriptOptions](#typescriptoptions)
-
-#### babelOptions
-Type: `Object`
-Default: `{}`
-
-Set the Babel transpiler options when [System.transpiler](#transpiler) is set to `babel`:
-
-```javascript
-System.config({
- babelOptions: {
- stage: 1
- }
-});
-```
-
-A list of options is available in the [Babel project documentation](https://babeljs.io/docs/usage/options/).
-
-#### bundle
-Type: `Object`
-
-Bundles allow a collection of modules to be downloaded together as a package whenever any module from that collection is requested.
-Useful for splitting an application into sub-modules for production. Use with the [SystemJS Builder](https://github.com/systemjs/builder).
-
-```javascript
-System.config({
- bundles: {
- bundleA: ['dependencyA', 'dependencyB']
- }
-});
-```
-
-In the above any require to `dependencyA` or `dependencyB` will first trigger a `System.import('bundleA')` before proceeding with the load of `dependencyA` or `dependencyB`.
-
-It is an alternative to including a script tag for a bundle in the page, useful for bundles that load dynamically where we want to trigger the bundle load automatically only when needed.
-
-The bundle itself is a module which contains named System.register and define calls as an output of the builder. The dependency names the bundles config lists should be the same names that are explicitly defined in the bundle.
-
-#### defaultJSExtensions
-
-Backwards-compatibility mode for the loader to automatically add '.js' extensions when not present to module requests.
-
-This allows code written for SystemJS 0.16 or less to work easily in the latest version:
-
-```javascript
-System.defaultJSExtensions = true;
-
-// requests ./some/module.js instead
-System.import('./some/module');
-```
-
-Note that this is a compatibility property for transitioning to using explicit extensions and will be deprecated in future.
-
-#### depCache
-Type: `Object`
-
-An alternative to bundling providing a solution to the latency issue of progressively loading dependencies.
-When a module specified in depCache is loaded, asynchronous loading of its pre-cached dependency list begins in parallel.
-
-```javascript
-System.config({
- depCache: {
- moduleA: ['moduleB'], // moduleA depends on moduleB
- moduleB: ['moduleC'] // moduleB depends on moduleC
- }
-});
-
-// when we do this import, depCache knows we also need moduleB and moduleC,
-// it then directly requests those modules as well as soon as we request moduleA
-System.import('moduleA')
-```
-
-Over HTTP/2 this approach may be preferable as it allows files to be individually cached in the browser meaning bundle optimizations are no longer a concern.
-
-#### map
-Type: `Object`
-
-The map option is similar to paths, but acts very early in the normalization process. It allows you to map a module alias to a
-location or package:
-
-```javascript
-System.config({
- map: {
- jquery: '//code.jquery.com/jquery-2.1.4.min.js'
- }
-});
-```
-
-```javascript
-import $ from 'jquery';
-
-```
-
-In addition, a map also applies to any subpaths, making it suitable for package folders as well:
-
-```javascript
-System.config({
- map: {
- package: 'local/package'
- }
-});
-```
-
-```javascript
-// loads /local/package/path.js
-System.import('package/path.js');
-```
-
-> Note map configuration used to support contextual submaps but this has been deprecated for package configuration.
-
-#### meta
-Type: `Object`
-Default: `{}`
-
-Module meta provides an API for SystemJS to understand how to load modules correctly.
-
-Meta is how we set the module format of a module, or know how to shim dependencies of a global script.
-
-```javascript
-System.config({
- meta: {
- // meaning [baseURL]/vendor/angular.js when no other rules are present
- // path is normalized using map and paths configuration
- 'vendor/angular.js': {
- format: 'global', // load this module as a global
- exports: 'angular', // the global property to take as the module value
- deps: [
- // dependencies to load before this module
- 'jquery'
- ]
- }
- }
-});
-```
-
-Wildcard meta is also supported and is additive from least to most specific match:
-
-```javascript
-System.config({
- meta: {
- '/vendor/*': { format: 'global' }
- }
-});
-```
-
-* [`format`](module-formats.md):
- Sets in what format the module is loaded.
-* [`exports`](module-formats.md#exports):
- For the `global` format, when automatic detection of exports is not enough, a custom exports meta value can be set.
- This tells the loader what global name to use as the module's export value.
-* [`deps`](module-formats.md#shim-dependencies):
- Dependencies to load before this module. Goes through regular paths and map normalization. Only supported for the `cjs`, `amd` and `global` formats.
-* [`globals`](module-formats.md#custom-globals):
- A map of global names to module names that should be defined only for the execution of this module.
- Enables use of legacy code that expects certain globals to be present.
- Referenced modules automatically becomes dependencies. Only supported for the `cjs` and `global` formats.
-* [`loader`](overview.md#plugin-loaders):
- Set a loader for this meta path.
-* [`sourceMap`](creating-plugins.md):
- For plugin transpilers to set the source map of their transpilation.
-* `scriptLoad`: Set to `true` to load the module using `<script>` tag injection (`importScript()` in a worker context) instead of using `fetch` and `eval`. This enables [CSP](https://www.w3.org/TR/CSP2/) support but disables the native loading of CommonJS modules and global modules where the export name is not declared via metadata.
-* `nonce`: The [nonce](https://www.w3.org/TR/CSP2/#script-src-the-nonce-attribute) attribute to use when loading the script as a way to enable CSP.
- This should correspond to the "nonce-" attribute set in the Content-Security-Policy header.
-* `integrity`: The [subresource integrity](http://www.w3.org/TR/SRI/#the-integrity-attribute) attribute corresponding to the script integrity, describing the expected hash of the final code to be executed.
- For example, `System.config({ meta: { 'src/example.js': { integrity: 'sha256-e3b0c44...' }});` would throw an error if the translated source of `src/example.js` doesn't match the expected hash.
-* `crossOrigin`: When scripts are loaded from a different domain (e.g. CDN) the global error handler (`window.onerror`)
- has very limited information about errors to [prevent unintended leaking]
- (https://developer.mozilla.org/en/docs/Web/API/GlobalEventHandlers/onerror#Notes).
- In order to mitigate this, the `<script>` tags need to set [`crossorigin` attribute]
- (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-crossorigin) and the server needs to
- [enable CORS](http://enable-cors.org/).
- The [valid values](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) are
- `"anonymous"` and `"use-credentials"`.
-* `esmExports`: When loading a module that is not an ECMAScript Module, we set the module as the `default` export, but then also
- iterate the module object and copy named exports for it a well. Use this option to disable this iteration and copying of the exports.
-
-#### packages
-Type: `Object`
-Default: `{}`
-
-Packages provide a convenience for setting meta and map configuration that is specific to a common path.
-
-In addition packages allow for setting contextual map configuration which only applies within the package itself.
-This allows for full dependency encapsulation without always needing to have all dependencies in a global namespace.
-
-```javascript
-System.config({
- packages: {
- // meaning [baseURL]/local/package when no other rules are present
- // path is normalized using map and paths configuration
- 'local/package': {
- main: 'index.js',
- format: 'cjs',
- defaultExtension: 'js',
- map: {
- // use local jquery for all jquery requires in this package
- 'jquery': './vendor/local-jquery.js',
-
- // import '/local/package/custom-import' should route to '/local/package/local/import/file.js'
- './custom-import': './local/import/file.js'
- },
- meta: {
- // sets meta for modules within the package
- 'vendor/*': {
- 'format': 'global'
- }
- }
- }
- }
-});
-```
-
-* `main`: The main entry point of the package (so `import 'local/package'` is equivalent to `import 'local/package/index.js'`)
-* `format`: The module format of the package. See [Module Formats](https://github.com/systemjs/systemjs/blob/master/docs/module-formats.md).
-* `defaultExtension`: The default extension to add to modules requested within the package.
- Takes preference over defaultJSExtensions.
- Can be set to `defaultExtension: false` to optionally opt-out of extension-adding when `defaultJSExtensions` is enabled.
-* `map`: Local and relative map configurations scoped to the package. Apply for subpaths as well.
-* `meta`: Package-scoped meta configuration with wildcard support. Modules are subpaths within the package path.
- This also provides an opt-out mechanism for `defaultExtension`, by adding modules here that should skip extension adding.
-
-#### paths
-Type: `Object`
-
-The [ES6 Module Loader](https://github.com/systemjs/systemjs/blob/master/docs/es6-modules-overview.md) paths implementation, applied after normalization and supporting subpaths via wildcards.
-
-_It is usually advisable to use map configuration over paths unless you need strict control over normalized module names._
-
-#### traceurOptions
-Type: `Object`
-Default: `{}`
-
-Set the Traceur compilation options.
-
-```javascript
-System.config({
- traceurOptions: {
- }
-});
-```
-
-A list of options is available in the [Traceur project documentation](https://github.com/google/traceur-compiler/wiki/Options-for-Compiling).
-
-#### transpiler
-Type: `String`
-Default: `traceur`
-
-Sets the module name of the transpiler to be used for loading ES6 modules.
-
-Represents a module name for `System.import` that must resolve to either Traceur, Babel or TypeScript.
-
-When set to `traceur`, `babel` or `typescript`, loading will be automatically configured as far as possible.
-
-#### typescriptOptions
-Type: `Object`
-Default: `{}`
-
-Sets the TypeScript transpiler options.
-
-A list of options is available in the [TypeScript project documentation](https://www.typescriptlang.org/docs/handbook/compiler-options.html).
diff --git a/thirdparty/systemjs/docs/creating-plugins.md b/thirdparty/systemjs/docs/creating-plugins.md
deleted file mode 100644
index 531ece163..000000000
--- a/thirdparty/systemjs/docs/creating-plugins.md
+++ /dev/null
@@ -1,84 +0,0 @@
-### Creating a Plugin
-
-A plugin is just a set of overrides for the loader hooks of the ES6 module specification.
-
-The hooks plugins can override are `locate`, `fetch`, `translate` and `instantiate`.
-
-Read more about loader extensions and hooks at the [ES6 Module Loader polyfill wiki](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/loader-extensions.md).
-
-The behaviors of the hooks are:
-
-* Locate: Overrides the location of the plugin resource
-* Fetch: Called with third argument representing default fetch function, has full control of fetch output.
-* Translate: Returns the translated source from `load.source`, can also set `load.metadata.sourceMap` for full source maps support.
-* Instantiate: Providing this hook as a promise or function allows the plugin to hook instantiate. Any return value becomes the defined custom module object for the plugin call.
-
-### Building Plugins
-
-When building via [SystemJS Builder](https://github.com/systemjs/builder), plugins that use the translate hook will be inlined into the bundle automatically.
-
-In this way, the bundle file becomes independent of the plugin loader and resource.
-
-If it is desired for the plugin itself not to be inlined into the bundle in this way, setting `exports.build = false` on the plugin will disable this,
-causing the plugin loader itself to be bundled in production instead to continue to dynamically load the resource.
-
-#### Sample CoffeeScript Plugin
-
-For example, we can write a CoffeeScript plugin with the following (CommonJS as an example, any module format works fine):
-
-js/coffee.js:
-```javascript
- var CoffeeScript = require('coffeescript');
-
- exports.translate = function(load) {
- // optionally also set the sourceMap to support both builds and in-browser transpilation
- // load.metadata.sourceMap = generatedSourceMap;
- return CoffeeScript.compile(load.source);
- }
-```
-
-By overriding the `translate` hook, we now support CoffeeScript loading with:
-
-```
- - js/
- - coffee.js our plugin above
- - coffeescript.js the CoffeeScript compiler
- - app/
- - main.coffee
-```
-
-```javascript
- System.import('app/main.coffee!').then(function(main) {
- // main is now loaded from CoffeeScript
- });
-```
-
-Source maps can also be passed by setting `load.metadata.sourceMap`.
-
-#### Sample CSS Plugin
-
-A CSS plugin, on the other hand, could override the fetch hook:
-
-js/css.js:
-```javascript
- exports.fetch = function(load, fetch) {
- return new Promise(function(resolve, reject) {
- var cssFile = load.address;
-
- var link = document.createElement('link');
- link.rel = 'stylesheet';
- link.href = cssFile;
- link.onload = resolve;
-
- document.head.appendChild(link);
- })
- .then(function() {
- // return an empty module in the module pipeline itself
- return '';
- });
- }
-```
-
-Each loader hook can either return directly or return a promise for the value.
-
-The other loader hooks are also treated otherwise identically to the specification.
diff --git a/thirdparty/systemjs/docs/es6-modules-overview.md b/thirdparty/systemjs/docs/es6-modules-overview.md
deleted file mode 100644
index 82f127548..000000000
--- a/thirdparty/systemjs/docs/es6-modules-overview.md
+++ /dev/null
@@ -1,108 +0,0 @@
-## Background
-
-### Modules and Module Loaders
-
-A module is simply a JavaScript file written with module syntax. Modules _export_ values, which can then be _imported_ by other modules.
-
-[CommonJS](http://wiki.commonjs.org/wiki/CommonJS) and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) JavaScript files are modules.
-
-A module loader provides the ability to dynamically load modules, and also keeps track of all loaded modules in a module registry.
-
-Typically, in production, the module registry would be populated by an initial compiled bundle of modules. Later in the page state, it may become necessary to dynamically
-load a new module. This module can then share dependencies with the initial page bundle without having to reload any dependencies.
-
-Module code is treated differently to scripts due to the nature of exports and imports.
-This is why the `<script type="module">` tag is introduced to distinguish script code from module code.
-
-### Module Naming
-
-Normalization rules allow module names to be converted into URLs.
-
-This allows module aliases like `import $ from 'jquery'` to be equivalent to writing `import $ from 'https://code.jquery.com/jquery.js'`
-
-Normalization rules are specific to the module loader implementation, with some certain standard conventions set down by the browser loader specification.
-
-## ES6 Module Syntax
-
-### Exporting
-
-ES6 module syntax is most similar to the `exports.method = function() {}` pattern in NodeJS of creating multiple named exports.
-
-In CommonJS one might write:
-
-```javascript
- exports.someMethod = function() {
-
- };
-
- exports.another = {};
-```
-
-In ES6, this same code would be written:
-
-exporter.js:
-```javascript
- export function someMethod() {
-
- }
-
- export var another = {};
-```
-
-Notice that the name of the function, class or variable gets used as the export name.
-
-### Importing
-
-When importing, we import any exports we need by name, and can also choose to rename them:
-
-importer.js:
-```javascript
- import { someMethod, another as newName } from './exporter';
-
- someMethod();
- typeof newName == 'object';
-```
-
-### Default Import and Export
-
-Sometimes one doesn't want to write an import name at all. For this we can use the default export:
-
-export-default.js:
-```javascript
- export default function foo() {
- console.log('foo');
- }
-```
-
-import-default.js:
-```javascript
- import customName from './export-default';
-
- customName(); // -> 'foo'
-```
-
-### All Supported Syntax
-
-There are a few other variations of module syntax, the full list of supported statements is listed below.
-
-```javascript
-import 'jquery'; // import a module without any import bindings
-import $ from 'jquery'; // import the default export of a module
-import { $ } from 'jquery'; // import a named export of a module
-import { $ as jQuery } from 'jquery'; // import a named export to a different name
-
-export var x = 42; // export a named variable
-export function foo() {}; // export a named function
-
-export default 42; // export the default export
-export default function foo() {}; // export the default export as a function
-
-export { encrypt }; // export an existing variable
-export { decrypt as dec }; // export a variable as a new name
-export { encrypt as en } from 'crypto'; // export an export from another module
-export * from 'crypto'; // export all exports from another module
- // (except the default export)
-import * as crypto from 'crypto'; // import an entire module instance object
-```
-
-Note that any valid declaration can be exported. In ES6, this includes `class` (as in the example above), `const`, and `let`. \ No newline at end of file
diff --git a/thirdparty/systemjs/docs/module-formats.md b/thirdparty/systemjs/docs/module-formats.md
deleted file mode 100644
index 3bafda590..000000000
--- a/thirdparty/systemjs/docs/module-formats.md
+++ /dev/null
@@ -1,228 +0,0 @@
-### Module Formats
-
-The following module formats are supported:
-
-* `esm`: ECMAScript Module (previously referred to as `es6`)
-* `cjs`: [CommonJS](#commonjs)
-* `amd`: [Asynchronous Module Definition](#amd)
-* `global`: [Global shim module format](#globals)
-* `register`: [System.register](system-api.md#systemregister-name-deps-declare) or [System.registerDynamic](system-api.md#systemregisterdynamic-name-deps-executingrequire-declare) compatibility module format
-
-The module format can be set via meta configuration:
-
-```javascript
-System.config({
- meta: {
- './module/path.js': {
- format: 'esm'
- }
- }
-});
-```
-
-#### Module format detection
-
-When the module format is not set, automatic regular-expression-based detection is used.
-This module format detection is never completely accurate, but caters well for the majority use cases.
-
-The module format detection happens in the following order:
-* _System.register / System.registerDynamic_
- If the source code starts with a number of comments, followed by `System.register` or `System.registerDynamic` as the first line of code.
-* _ES modules_
- The source is only detected as an ES module if it contains explicit module syntax - valid `import` or `export` statements.
-* _AMD modules_
- The presence of a valid AMD `define` statement in the code.
-* _CommonJS modules_
- The presence of `require(...)` or `exports` / `module.exports` assigments
-* _Global_
- This is the fallback module format after all the above fail.
-
-> Note that ES6 modules are detected via the presence of `import` and `export` module syntax and no other features at all. This is because the transpilation applies to the module format specifically, not the language.
-
-#### Inter-Format Dependencies
-
-Any module type can be loaded from any other type with full support thanks to [zebra-striping](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/circular-references-bindings.md#zebra-striping).
-
-When loading CommonJS, AMD or Global modules from within ES6, the full module is available at the `default` export which can be loaded with the default import syntax.
-
-For convenience, named exports are also auto-populated but may not be correctly bound as expected, so use these carefully.
-
-./app/es6-loading-commonjs:
-```javascript
-// entire underscore instance
-import _ from './underscore.js';
-
-// unbound named export
-import {map} from './underscore.js';
-```
-
-### ES6
-
-ES6 modules are automatically transpiled as they are loaded, using the loader [transpiler option](config-api.md#transpiler) set.
-
-Circular references and bindings are implemented to the ES6 specification.
-
-The `__moduleName` local variable is also available, pending clarification of the module meta in the WhatWG loader spec.
-
-This provides the fully normalized name of the current module which can be useful for dynamically loading modules relative to the current module via:
-
-```javascript
-System.import('./local-module', __moduleName);
-```
-
-In due course this will be entirely replaced by the contextual loader once this has been specified.
-
-_ES6 is loaded via XHR making it non-[CSP](http://www.html5rocks.com/en/tutorials/security/content-security-policy/) compatible. ES6 should always be built for production to avoid transpiler costs, making this a development-only feature._
-
-### CommonJS
-
-* The `module`, `exports`, `require`, `global`, `__dirname` and `__filename` variables are all provided.
-* `module.id` is set.
-
-When executing CommonJS any global `define` is temporarily removed.
-
-For comprehensive handling of NodeJS modules, a conversion process is needed to make them SystemJS-compatible, such as the one used by jspm.
-
-_CommonJS is loaded via XHR making it non-[CSP](http://www.html5rocks.com/en/tutorials/security/content-security-policy/) compatible._
-
-Note that CommonJS modules on npm, loaded as CommonJS may well not load correctly through SystemJS. This is because SystemJS
-does not implement the NodeJS loading algorithm.
-
-If you want to load NodeJS modules through SystemJS you can use `import nodeModule from '@node/node-module-name'`, but this should only
-be used when absolutely necessary as it stops code from being universal, and makes it only compatible with NodeJS.
-
-### AMD
-
-* AMD support includes all AMD structural variations including the [CommonJS wrapper form](http://requirejs.org/docs/api.html#cjsmodule).
-* The special `module`, `exports`, and `require` module names are handled at the AMD format level and are not defined in the primary loader registry. `module.uri` and `module.id` are provided with `module.config` as a no-op.
-* Named defines are supported and will write directly into the loader registry.
-* A single named define will write into the loader registry but also be treated as the value of the module loaded if the names do not match. This enables loading a module containing `define('jquery', ...`.
-* Contextual dynamic requires are fully supported (`define(function(require) { require(['./dynamic/require'], callback) })`)
-
-When executing AMD, the global `module`, `exports` are temporarily removed, and the global `define` and `require` are set to the SystemJS AMD functions.
-
-_By default AMD modules are loaded via `<script>` tag injection making them [CSP](http://www.html5rocks.com/en/tutorials/security/content-security-policy/)-compatible, provided that modules that are AMD are indicated [via meta](#module-formats) so that SystemJS knows to skip format detection and load them with script tags._
-
-#### RequireJS Support
-
-To use SystemJS side-by-side in a RequireJS project, make sure to include RequireJS after ES6 Module Loader but before SystemJS.
-
-Conversely, to have SystemJS provide a RequireJS-like API in an application set:
-
-```javascript
-window.define = System.amdDefine;
-window.require = window.requirejs = System.amdRequire;
-```
-
-### Globals
-
-The `global` format loads globals identically to if they were included via `<script>` tags
-but with some extra features including the ability to [shim dependencies](#shim-dependencies),
-set [custom globals](#custom-globals), and [define the exports](#exports) of the global module.
-
-By default, the exports of a global are calculated as the diff of the environment global from before to after execution.
-
-This provides a convenient mechanism for auto-conversion of globals into modules.
-
-For example:
-
-```javascript
-var MyGlobal = 42;
-```
-
-Will get converted into the module `Module({ default: 42 })`.
-
-While the script:
-
-```javascript
-(function(global) {
- global.globalA = 'global A';
- global.globalB = 'global B';
-})(typeof self != 'undefined' ? self : global);
-```
-
-Will get converted into the module `Module({ globalA: 'global A', globalB: 'global B' })`
-
-Globals are picked up by variable assignment and undeclared assignment:
-
-```javascript
-var x = 'global'; // detected as a global
-y = 'global'; // detected as a global
-```
-
-These two cases fail in IE8 and WebWorkers, so do need to have their [exports explicitly declared](#exports) if compatibility is desired.
-
-> Globals are not removed from the global object for shim compatibility, but this could become possible in future if all globals
-use the [globals](#globals) meta for shims instead of [deps](#shim-dependencies).
-
-#### Shim Dependencies
-
-When loading plugins of globals like Angular or jQuery plugins, we always need to shim the dependencies of the plugin
-to be dependent on the global it expects to find.
-
-We do this via deps metadata on the module:
-
-```javascript
-System.config({
- meta: {
- 'vendor/angular-ui-router.js': {
- deps: ['/vendor/angular.js']
- }
- }
-});
-System.import('vendor/angular-ui-router.js');
-```
-
-Note that deps is only supported for global modules.
-
-> It is always advisable to explicitly shim global modules as above for any globals they expect to be present.
- For example, the above module may work fine without the shim if Angular always happens to load first in the page,
- but this isn't always guaranteed, and problems will likely be hit later on when the load order happens to change.
-
-#### Custom Globals
-
-When shimming dependencies, the issue with this is that every dependency needs to be a global in order to be loadable by a global.
-
-This holds the entire ecosystem back as globals become the lowest common denominator.
-
-If we want to upgrade Angular to an ES6 version of Angular, while still supporting old Angular global modules, we can do this via custom globals:
-
-```javascript
-System.config({
- meta: {
- 'vendor/angular-ui-router.js': {
- globals: {
- angular: 'vendor/angular.js'
- }
- }
- }
-});
-System.import('vendor/angular-ui-router.js');
-```
-
-In the above scenario, a globally scoped `angular` will be set to the module value for the Angular ES6 module only for the duration of execution of the global plugin. They will be reverted to whatever they where before after execution, if they didn't exist they're removed. This doesn't influence the globals that might already be generated by the referenced package.
-
-> **The globals meta-configuration option is only available for the `global` and `cjs` module formats.** as these are the only formats that are source-code-transformation based.
-
-Referenced packages automatically becomes dependencies.
-
-#### Exports
-
-When automatic detection of exports is not enough, a custom exports meta value can be set.
-
-This is a member expression on the global object to be taken as the exports of the module.
-
-For example, `angular` or `jQuery.fn.pluginName`.
-
-> Globals can be loaded in a way that is CSP-compatible by setting their `format` and `exports` metadata when not setting any `globals` metadata. SystemJS then knows it can use script tag injection for this case. For example, Google Analytics can be loaded without requiring CORS or CSP via setting:
- ```javascript
- System.config({
- meta: {
- 'https://www.google-analytics.com/analytics.js': {
- exports: 'ga',
- format: 'global'
- }
- }
- });
- ```
-
diff --git a/thirdparty/systemjs/docs/overview.md b/thirdparty/systemjs/docs/overview.md
deleted file mode 100644
index a3899f297..000000000
--- a/thirdparty/systemjs/docs/overview.md
+++ /dev/null
@@ -1,166 +0,0 @@
-### Loading Modules
-
-Any URL can be loaded as a module with standard URL syntax:
-
-```html
-<script src="system.js"></script>
-<script>
- // loads relative to the current page URL
- System.import('./local-module.js');
-
- // load from an absolute URL directly
- System.import('https://code.jquery.com/jquery.js');
-</script>
-```
-
-Any type of module format can be loaded and it will be detected automatically by SystemJS.
-
-##### File access from files
-
-> _Note that when running locally, ensure you are running from a local server or a browser with local XHR requests enabled. If not you will get an error message._
-
-> _For Chrome on Mac, you can run it with: `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files &> /dev/null &`_
-
-> _In Firefox this requires navigating to `about:config`, entering `security.fileuri.strict_origin_policy` in the filter box and toggling the option to false._
-
-### Loading ES6
-
-app/es6-file.js:
-```javascript
- export class q {
- constructor() {
- this.es6 = 'yay';
- }
- }
-```
-
-```html
- <script>
- System.import('./app/es6-file.js').then(function(m) {
- console.log(new m.q().es6); // yay
- });
- </script>
-```
-
-ES6 modules define named exports, provided as getters on a special immutable `Module` object.
-
-* [Read more about ES6 modules and syntax](es6-modules-overview.md).
-* To build for production, see the [production workflows](production-workflows.md).
-* [Read more about SystemJS module format support](module-formats.md).
-
-### Loader Configuration
-
-Some of the standard configuration options and their use cases are described below.
-
-For a reference see the [Config API](config-api.md) page.
-
-#### baseURL
-
-The *baseURL* provides a special mechanism for loading modules relative to a standard reference URL.
-
-This can be useful for being able to refer to the same module from many different page URLs or environments:
-
-```javascript
-System.config({
- baseURL: '/modules'
-});
-
-
-// loads /modules/jquery.js
-System.import('jquery.js');
-```
-
-Module names of the above form are referred to as _plain names_ and are always loaded baseURL-relative instead of
-parentURL relative like one would expect with ordinary URLs.
-
-> Note we always run the `System.config` function instead of setting instance properties directly as this will set the correct normalized baseURL in the process.
-
-#### Map Config
-
-The baseURL is very useful for providing an absolute reference URL for loading all modules, but we don't necessarily want to
-have to locate every single shared dependency from within one folder.
-
-Sometimes we want to load things from different places.
-
-Map configuration is useful here to be able to specific exactly where to locate a given package:
-
-```javascript
-System.config({
- map: {
- jquery: 'https://code.jquery.com/jquery.js'
- }
-});
-```
-
-Map configuration can also be used to map subpaths:
-
-```javascript
-System.config({
- map: {
- app: '/app/'
- }
-});
-
-// will load /app/main.js
-System.import('app/main.js');
-```
-
-Map configuration is always applied before the baseURL rule in the loader.
-
-### Plugin Loaders
-
-Plugins handle alternative loading scenarios, including loading assets such as CSS or images, and providing custom transpilation scenarios.
-
-Plugins can also inline into bundles or remain separate requests when using [SystemJS Builder](https://github.com/systemjs/builder).
-
-To create a custom plugin, see the documentation on [creating plugins](creating-plugins.md).
-
-#### Basic Use
-
-> Note that if using the `defaultJSExtensions` compatibility feature, plugins for resources with custom extensions will only work by using the [package configuration](config-api.md#packages) `defaultExtension: false` option to override this for specific packages.
-
-To use a plugin, set up the plugin itself as a standard module, either locating it in the baseURL or providing map configuration for it.
-
-In this case, we're using the [text plugin](https://github.com/systemjs/plugin-text) as an example.
-
-Then configure a custom resource to be loaded via the plugin, we then use meta configuration:
-
-```javascript
-System.config({
- // locate the plugin via map configuration
- // (alternatively have it in the baseURL)
- map: {
- text: '/path/to/text-plugin.js'
- },
- // use meta configuration to reference which modules
- // should use the plugin loader
- meta: {
- 'templates/*.html': {
- loader: 'text'
- }
- }
-});
-```
-
-Now any code that loads from `[baseURL]/templates/*.html` will use the text loader plugin and return the loaded content:
-
-app.js
-```javascript
-import htmlSource from 'templates/tpl.html';
-
-document.querySelector('.container').innerHTML = htmlSource;
-```
-
-When we build app.js, the text plugin will then automatically inline the templates into the bundle during the build.
-
-#### Plugin Syntax
-
-It is also possible to use syntax to load via plugins instead of configuration:
-
-```javascript
-System.import('some/file.txt!text')
-```
-
-When no plugin is explicitly specified the extension is used as the plugin name itself.
-
-> Note it is usually advisable to use plugin loader configuration over plugin syntax.
diff --git a/thirdparty/systemjs/docs/production-workflows.md b/thirdparty/systemjs/docs/production-workflows.md
deleted file mode 100644
index 6af698915..000000000
--- a/thirdparty/systemjs/docs/production-workflows.md
+++ /dev/null
@@ -1,83 +0,0 @@
-### Compiling Modules into a Bundle
-
-[SystemJS builder](https://github.com/systemjs/builder) provides comprehensive support for compiling all
-module formats into a single bundle in a way that supports
-[circular references and zebra-striping](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/circular-references-bindings.md).
-
-It also offers the ability to [create self-executing bundles](https://github.com/systemjs/builder#self-executing-sfx-bundles)
-that can run without needing SystemJS present at all by embedding a micro-loader implementation.
-
-### DepCache
-
-An alternative to bundling into a single bundle is to leave files as separate for loading in production.
-
-The depcache extension allows specifying the dependencies of all modules upfront through configuration so that loads can
-happen in parallel.
-
-```javascript
-System.config({
- depCache: {
- 'moduleA': ['moduleB'], // moduleA depends on moduleB
- 'moduleB': ['moduleC'] // moduleB depends on moduleC
- }
-});
-
-// when we do this import, depCache knows we also need moduleB and moduleC,
-// it then directly requests those modules as well as soon as we request moduleA
-System.import('moduleA')
-```
-
-Over HTTP/2 this approach may be preferable as it allows files to be individually cached in the browser meaning bundle
-optimizations are no longer a concern.
-
-### Bundle Extension
-
-It can be useful to load bundles of code on-demand instead of having them all included in the HTML page blocking the
-initial load.
-
-The bundle extension will automatically download a bundle as soon as an attempt to import any module in that bundle is made.
-
-```javascript
- // the bundle at build/core.js contains these modules
- System.config({
- bundles: {
- 'build/core': ['jquery', 'app/app', 'app/dep', 'lib/third-party']
- }
- });
-
- // when we load 'app/app' the bundle extension interrupts the loading process
- // and ensures that build/core.js is loaded first
- System.import('app/app');
-
- // this way a request to any one of 'jquery', 'app/app', 'app/dep', 'lib/third-party'
- // will delegate to the bundle and only a single request is made
-```
-
-A built file must contain the exact named defines or named `System.register` statements for the modules
-it contains. Mismatched names will result in separate requests still being made.
-
-### CSP-Compatible Production
-
-SystemJS comes with a separate build for production only. This is fully [CSP](http://www.html5rocks.com/en/tutorials/security/content-security-policy/)-compatible using script tag injection to load scripts,
-while still remaining an extension of the ES6 Module Loader.
-
-Replace the `system.js` file with `dist/system-csp-production.js`.
-
-If we have compiled all our modules into a bundle we can then write:
-
-```html
- <script src="system-csp-production.js"></script>
- <script>
- System.config({
- bundles: {
- 'bundle': ['app/main']
- }
- });
- System.import('app/main').then(function(m) {
- // loads app/main from the app-built bundle
- });
- </script>
-```
-
-> Note the main build of SystemJS will also use script tag injection for AMD, register and global modules when it can for maximum CSP compatibility.
- It is typically just plugin loaders, CommonJS and custom global metadata options that cause XHR source-loading to be needed.
diff --git a/thirdparty/systemjs/docs/system-api.md b/thirdparty/systemjs/docs/system-api.md
deleted file mode 100644
index 803d688fc..000000000
--- a/thirdparty/systemjs/docs/system-api.md
+++ /dev/null
@@ -1,141 +0,0 @@
-## SystemJS API
-
-For setting SystemJS configuration see the [Configuration API](config-api.md) page.
-
-#### System.amdDefine
-Type: `Function`
-
-For backwards-compatibility with AMD environments, set `window.define = System.amdDefine`.
-
-#### System.amdRequire
-Type: `Function`
-
-For backwards-compatibility with AMD environments, set `window.require = System.amdRequire`.
-
-#### System.config
-Type: `Function`
-
-SystemJS configuration helper function. See the [Configuration API](config-api.md).
-
-#### System.constructor
-Type: `Function`
-
-This represents the System base class, which can be extended or reinstantiated to create a custom System instance.
-
-Example:
-
-```javascript
- var clonedSystem = new System.constructor();
- clonedSystem.baseURL = System.baseURL;
- clonedSystem.import('x'); // imports in a custom context
-```
-
-#### System.delete(moduleName)
-Type: `Function`
-
-Deletes a module from the registry by normalized name.
-
-```javascript
-System.delete('http://site.com/normalized/module/name.js');
-```
-
-#### System.get(moduleName) -> Module
-Type: `Function`
-
-Returns a module from the registry by normalized name.
-
-```javascript
-System.get('http://site.com/normalized/module/name.js').exportedFunction();
-```
-
-#### System.has(moduleName) -> Boolean
-Type: `Function`
-
-Returns whether a given module exists in the registry by normalized module name.
-
-```javascript
-if (System.has('http://site.com/normalized/module/name.js')) {
- // ...
-}
-```
-
-#### System.import(moduleName [, normalizedParentName]) -> Promise(Module)
-Type: `Function`
-
-Loads a module by name taking an optional normalized parent name argument.
-
-Promise resolves to the module value.
-
-For loading relative to the current module, ES Modules define a `__moduleName` binding, so that:
-
-```javascript
-System.import('./local', __moduleName);
-```
-
-In CommonJS modules the above would be `module.id` instead.
-
-This is non-standard, but coverse a use case that will be provided by the spec.
-
-#### System.newModule(Object) -> Module
-Type: `Function`
-
-Given a plain JavaScript object, return an equivalent `Module` object.
-
-Useful when writing a custom `instantiate` hook or using `System.set`.
-
-#### System.register([name ,] deps, declare)
-Type: `Function`
-
-Declaration function for defining modules of the `System.register` polyfill module format.
-
-[Read more on the format at the loader polyfill page](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/system-register.md)
-
-#### System.registerDynamic([name ,] deps, executingRequire, declare)
-Type: `Function`
-
-Companion module format to `System.register` for non-ES6 modules.
-
-Provides a `<script>`-injection-compatible module format that any CommonJS or Global module can be converted into for CSP compatibility.
-
-Output created by [SystemJS Builder](https://github.com/systemjs/builder) when creating bundles or self-executing bundles.
-
-For example, the following CommonJS module:
-
-```javascript
-module.exports = require('pkg/module');
-```
-
-Can be written:
-
-```javascript
-System.registerDynamic(['pkg/module'], true, function(require, exports, module) {
- module.exports = require('pkg/module');
-});
-```
-
-`executingRequire` indicates that the dependencies are executed synchronously only when using the `require` function, and not before execution.
-
-* `require` is a standard CommonJS-style require
-* `exports` the CommonJS exports object, which is assigned to the `default` export of the module, with its own properties available as named exports.
-* `module` represents the CommonJS module object, with `export`, `id` and `url` properties set.
-
-#### System.set(moduleName, Module)
-Type: `Function`
-
-Sets a module into the registry directly and synchronously.
-
-Typically used along with `System.newModule` to create a valid `Module` object:
-
-```javascript
-System.set('custom-module', System.newModule({ prop: 'value' }));
-```
-
-> Note SystemJS stores all module names in the registry as normalized URLs. To be able to properly use the registry with `System.set` it is usually necessary to run `System.set(System.normalizeSync('custom-module'), System.newModule({ prop: 'value' }));` to ensure that `System.import` behaves correctly.
-
-#### System._nodeRequire
-Type: `Function`
-
-In CommonJS environments, SystemJS will substitute the global `require` as needed by the module format being loaded to ensure
-the correct detection paths in loaded code.
-
-The CommonJS require can be recovered within these modules from `System._nodeRequire`.
diff --git a/thirdparty/systemjs/index.js b/thirdparty/systemjs/index.js
deleted file mode 100644
index 6a958ecff..000000000
--- a/thirdparty/systemjs/index.js
+++ /dev/null
@@ -1,48 +0,0 @@
-if (typeof Promise === 'undefined')
- require('when/es6-shim/Promise');
-
-var version = require('./package.json').version;
-
-var isWindows = typeof process.platform != 'undefined' && process.platform.match(/^win/);
-
-// set transpiler paths in Node
-var nodeResolver = typeof process != 'undefined' && typeof require != 'undefined' && require.resolve;
-function configNodePath(loader, module, nodeModule, wildcard) {
- if (loader.paths[module])
- return;
-
- var ext = wildcard ? '/package.json' : '';
- try {
- var match = nodeResolver(nodeModule + ext).replace(/\\/g, '/');
- }
- catch(e) {}
-
- if (match)
- loader.paths[module] = 'file://' + (isWindows ? '/' : '') + match.substr(0, match.length - ext.length) + (wildcard ? '/*.js' : '');
-}
-
-var SystemJSLoader = require('./dist/system.src').constructor;
-
-// standard class extend SystemJSLoader to SystemJSNodeLoader
-function SystemJSNodeLoader() {
- SystemJSLoader.call(this);
-
- if (nodeResolver) {
- configNodePath(this, 'traceur', 'traceur/bin/traceur.js');
- configNodePath(this, 'traceur-runtime', 'traceur/bin/traceur-runtime.js');
- configNodePath(this, 'babel', 'babel-core/browser.js');
- configNodePath(this, 'babel/external-helpers', 'babel-core/external-helpers.js');
- configNodePath(this, 'babel-runtime/*', 'babel-runtime', true);
- }
-}
-SystemJSNodeLoader.prototype = Object.create(SystemJSLoader.prototype);
-SystemJSNodeLoader.prototype.constructor = SystemJSNodeLoader;
-
-var System = new SystemJSNodeLoader();
-
-System.version = version + ' Node';
-
-if (typeof global != 'undefined')
- global.System = global.SystemJS = System;
-
-module.exports = System;
diff --git a/thirdparty/systemjs/lib/alias.js b/thirdparty/systemjs/lib/alias.js
deleted file mode 100644
index 1d37220b5..000000000
--- a/thirdparty/systemjs/lib/alias.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Alias Extension
- *
- * Allows a module to be a plain copy of another module by module name
- *
- * SystemJS.meta['mybootstrapalias'] = { alias: 'bootstrap' };
- *
- */
-(function() {
- // aliases
- hook('fetch', function(fetch) {
- return function(load) {
- var alias = load.metadata.alias;
- var aliasDeps = load.metadata.deps || [];
- if (alias) {
- load.metadata.format = 'defined';
- var entry = createEntry();
- this.defined[load.name] = entry;
- entry.declarative = true;
- entry.deps = aliasDeps.concat([alias]);
- entry.declare = function(_export) {
- return {
- setters: [function(module) {
- for (var p in module)
- _export(p, module[p]);
- if (module.__useDefault)
- entry.module.exports.__useDefault = true;
- }],
- execute: function() {}
- };
- };
- return '';
- }
-
- return fetch.call(this, load);
- };
- });
-})(); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/amd-helpers.js b/thirdparty/systemjs/lib/amd-helpers.js
deleted file mode 100644
index 8a5b410c1..000000000
--- a/thirdparty/systemjs/lib/amd-helpers.js
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * AMD Helper function module
- * Separated into its own file as this is the part needed for full AMD support in SFX builds
- * NB since implementations have now diverged this can be merged back with amd.js
- */
-
-hook('fetch', function(fetch) {
- return function(load) {
- // script load implies define global leak
- if (load.metadata.scriptLoad && isBrowser)
- __global.define = this.amdDefine;
- return fetch.call(this, load);
- };
-});
-
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(this);
-
- var commentRegEx = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
- var cjsRequirePre = "(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])";
- var cjsRequirePost = "\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)";
- var fnBracketRegEx = /\(([^\)]*)\)/;
- var wsRegEx = /^\s+|\s+$/g;
-
- var requireRegExs = {};
-
- function getCJSDeps(source, requireIndex) {
-
- // remove comments
- source = source.replace(commentRegEx, '');
-
- // determine the require alias
- var params = source.match(fnBracketRegEx);
- var requireAlias = (params[1].split(',')[requireIndex] || 'require').replace(wsRegEx, '');
-
- // find or generate the regex for this requireAlias
- var requireRegEx = requireRegExs[requireAlias] || (requireRegExs[requireAlias] = new RegExp(cjsRequirePre + requireAlias + cjsRequirePost, 'g'));
-
- requireRegEx.lastIndex = 0;
-
- var deps = [];
-
- var match;
- while (match = requireRegEx.exec(source))
- deps.push(match[2] || match[3]);
-
- return deps;
- }
-
- /*
- AMD-compatible require
- To copy RequireJS, set window.require = window.requirejs = loader.amdRequire
- */
- function require(names, callback, errback, referer) {
- // in amd, first arg can be a config object... we just ignore
- if (typeof names == 'object' && !(names instanceof Array))
- return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));
-
- // amd require
- if (typeof names == 'string' && typeof callback == 'function')
- names = [names];
- if (names instanceof Array) {
- var dynamicRequires = [];
- for (var i = 0; i < names.length; i++)
- dynamicRequires.push(loader['import'](names[i], referer));
- Promise.all(dynamicRequires).then(function(modules) {
- if (callback)
- callback.apply(null, modules);
- }, errback);
- }
-
- // commonjs require
- else if (typeof names == 'string') {
- var defaultJSExtension = loader.defaultJSExtensions && names.substr(names.length - 3, 3) != '.js';
- var normalized = loader.decanonicalize(names, referer);
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) == '.js')
- normalized = normalized.substr(0, normalized.length - 3);
- var module = loader.get(normalized);
- if (!module)
- throw new Error('Module not already loaded loading "' + names + '" as ' + normalized + (referer ? ' from "' + referer + '".' : '.'));
- return module.__useDefault ? module['default'] : module;
- }
-
- else
- throw new TypeError('Invalid require');
- }
-
- function define(name, deps, factory) {
- if (typeof name != 'string') {
- factory = deps;
- deps = name;
- name = null;
- }
- if (!(deps instanceof Array)) {
- factory = deps;
- deps = ['require', 'exports', 'module'].splice(0, factory.length);
- }
-
- if (typeof factory != 'function')
- factory = (function(factory) {
- return function() { return factory; }
- })(factory);
-
- // in IE8, a trailing comma becomes a trailing undefined entry
- if (deps[deps.length - 1] === undefined)
- deps.pop();
-
- // remove system dependencies
- var requireIndex, exportsIndex, moduleIndex;
-
- if ((requireIndex = indexOf.call(deps, 'require')) != -1) {
-
- deps.splice(requireIndex, 1);
-
- // only trace cjs requires for non-named
- // named defines assume the trace has already been done
- if (!name)
- deps = deps.concat(getCJSDeps(factory.toString(), requireIndex));
- }
-
- if ((exportsIndex = indexOf.call(deps, 'exports')) != -1)
- deps.splice(exportsIndex, 1);
-
- if ((moduleIndex = indexOf.call(deps, 'module')) != -1)
- deps.splice(moduleIndex, 1);
-
- function execute(req, exports, module) {
- var depValues = [];
- for (var i = 0; i < deps.length; i++)
- depValues.push(req(deps[i]));
-
- module.uri = module.id;
-
- module.config = function() {};
-
- // add back in system dependencies
- if (moduleIndex != -1)
- depValues.splice(moduleIndex, 0, module);
-
- if (exportsIndex != -1)
- depValues.splice(exportsIndex, 0, exports);
-
- if (requireIndex != -1) {
- function contextualRequire(names, callback, errback) {
- if (typeof names == 'string' && typeof callback != 'function')
- return req(names);
- return require.call(loader, names, callback, errback, module.id);
- }
- contextualRequire.toUrl = function(name) {
- // normalize without defaultJSExtensions
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
- var url = loader.decanonicalize(name, module.id);
- if (defaultJSExtension && url.substr(url.length - 3, 3) == '.js')
- url = url.substr(0, url.length - 3);
- return url;
- };
- depValues.splice(requireIndex, 0, contextualRequire);
- }
-
- // set global require to AMD require
- var curRequire = __global.require;
- __global.require = require;
-
- var output = factory.apply(exportsIndex == -1 ? __global : exports, depValues);
-
- __global.require = curRequire;
-
- if (typeof output == 'undefined' && module)
- output = module.exports;
-
- if (typeof output != 'undefined')
- return output;
- }
-
- var entry = createEntry();
- entry.name = name && (loader.decanonicalize || loader.normalize).call(loader, name);
- entry.deps = deps;
- entry.execute = execute;
-
- loader.pushRegister_({
- amd: true,
- entry: entry
- });
- }
- define.amd = {};
-
- // reduction function to attach defines to a load record
- hook('reduceRegister_', function(reduceRegister) {
- return function(load, register) {
- // only handle AMD registers here
- if (!register || !register.amd)
- return reduceRegister.call(this, load, register);
-
- var curMeta = load && load.metadata;
- var entry = register.entry;
-
- if (curMeta) {
- if (!curMeta.format || curMeta.format == 'detect')
- curMeta.format = 'amd';
- else if (!entry.name && curMeta.format != 'amd')
- throw new Error('AMD define called while executing ' + curMeta.format + ' module ' + load.name);
- }
-
- // anonymous define
- if (!entry.name) {
- if (!curMeta)
- throw new TypeError('Unexpected anonymous AMD define.');
-
- if (curMeta.entry && !curMeta.entry.name)
- throw new Error('Multiple anonymous defines in module ' + load.name);
-
- curMeta.entry = entry;
- }
- // named define
- else {
- // if we don't have any other defines,
- // then let this be an anonymous define
- // this is just to support single modules of the form:
- // define('jquery')
- // still loading anonymously
- // because it is done widely enough to be useful
- // as soon as there is more than one define, this gets removed though
- if (curMeta) {
- if (!curMeta.entry && !curMeta.bundle)
- curMeta.entry = entry;
- else if (curMeta.entry && curMeta.entry.name && curMeta.entry.name != load.name)
- curMeta.entry = undefined;
-
- // note this is now a bundle
- curMeta.bundle = true;
- }
-
- // define the module through the register registry
- if (!(entry.name in this.defined))
- this.defined[entry.name] = entry;
- }
- };
- });
-
- loader.amdDefine = define;
- loader.amdRequire = require;
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/amd.js b/thirdparty/systemjs/lib/amd.js
deleted file mode 100644
index 2e2d37948..000000000
--- a/thirdparty/systemjs/lib/amd.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- SystemJS AMD Format
-*/
-(function() {
- // AMD Module Format Detection RegEx
- // define([.., .., ..], ...)
- // define(varName); || define(function(require, exports) {}); || define({})
- var amdRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])define\s*\(\s*("[^"]+"\s*,\s*|'[^']+'\s*,\s*)?\s*(\[(\s*(("[^"]+"|'[^']+')\s*,|\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*(\s*("[^"]+"|'[^']+')\s*,?)?(\s*(\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*\s*\]|function\s*|{|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*\))/;
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
-
- if (load.metadata.format == 'amd' || !load.metadata.format && load.source.match(amdRegEx)) {
- load.metadata.format = 'amd';
-
- if (!loader.builder && loader.execute !== false) {
- var curDefine = __global.define;
- __global.define = this.amdDefine;
-
- try {
- __exec.call(loader, load);
- }
- finally {
- __global.define = curDefine;
- }
-
- if (!load.metadata.entry && !load.metadata.bundle)
- throw new TypeError('AMD module ' + load.name + ' did not define');
- }
- else {
- load.metadata.execute = function() {
- return load.metadata.builderExecute.apply(this, arguments);
- };
- }
- }
-
- return instantiate.call(loader, load);
- };
- });
-
-})();
diff --git a/thirdparty/systemjs/lib/bundles.js b/thirdparty/systemjs/lib/bundles.js
deleted file mode 100644
index c22a44986..000000000
--- a/thirdparty/systemjs/lib/bundles.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- System bundles
-
- Allows a bundle module to be specified which will be dynamically
- loaded before trying to load a given module.
-
- For example:
- SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
-
- Will result in a load to "mybundle" whenever a load to "jquery"
- or "bootstrap/js/bootstrap" is made.
-
- In this way, the bundle becomes the request that provides the module
-*/
-
-(function() {
- // bundles support (just like RequireJS)
- // bundle name is module name of bundle itself
- // bundle is array of modules defined by the bundle
- // when a module in the bundle is requested, the bundle is loaded instead
- // of the form SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.bundles = {};
- this._loader.loadedBundles = {};
- };
- });
-
- // assign bundle metadata for bundle loads
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- var matched = false;
-
- if (!(load.name in loader.defined))
- for (var b in loader.bundles) {
- for (var i = 0; i < loader.bundles[b].length; i++) {
- var curModule = loader.bundles[b][i];
-
- if (curModule == load.name) {
- matched = true;
- break;
- }
-
- // wildcard in bundles does not include / boundaries
- if (curModule.indexOf('*') != -1) {
- var parts = curModule.split('*');
- if (parts.length != 2) {
- loader.bundles[b].splice(i--, 1);
- continue;
- }
-
- if (load.name.substring(0, parts[0].length) == parts[0] &&
- load.name.substr(load.name.length - parts[1].length, parts[1].length) == parts[1] &&
- load.name.substr(parts[0].length, load.name.length - parts[1].length - parts[0].length).indexOf('/') == -1) {
- matched = true;
- break;
- }
- }
- }
-
- if (matched)
- return loader['import'](b)
- .then(function() {
- return locate.call(loader, load);
- });
- }
-
- return locate.call(loader, load);
- };
- });
-})();
diff --git a/thirdparty/systemjs/lib/cjs-helpers.js b/thirdparty/systemjs/lib/cjs-helpers.js
deleted file mode 100644
index 0ae08d612..000000000
--- a/thirdparty/systemjs/lib/cjs-helpers.js
+++ /dev/null
@@ -1,43 +0,0 @@
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(loader);
-
- if (typeof window != 'undefined' && typeof document != 'undefined' && window.location)
- var windowOrigin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
-
- function stripOrigin(path) {
- if (path.substr(0, 8) == 'file:///')
- return path.substr(7 + !!isWindows);
-
- if (windowOrigin && path.substr(0, windowOrigin.length) == windowOrigin)
- return path.substr(windowOrigin.length);
-
- return path;
- }
-
- loader.set('@@cjs-helpers', loader.newModule({
- requireResolve: function(request, parentId) {
- return stripOrigin(loader.normalizeSync(request, parentId));
- },
- getPathVars: function(moduleId) {
- // remove any plugin syntax
- var pluginIndex = moduleId.lastIndexOf('!');
- var filename;
- if (pluginIndex != -1)
- filename = moduleId.substr(0, pluginIndex);
- else
- filename = moduleId;
-
- var dirname = filename.split('/');
- dirname.pop();
- dirname = dirname.join('/');
-
- return {
- filename: stripOrigin(filename),
- dirname: stripOrigin(dirname)
- };
- }
- }))
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/cjs.js b/thirdparty/systemjs/lib/cjs.js
deleted file mode 100644
index c7327f181..000000000
--- a/thirdparty/systemjs/lib/cjs.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- SystemJS CommonJS Format
-*/
-(function() {
- // CJS Module Format
- // require('...') || exports[''] = ... || exports.asd = ... || module.exports = ...
- var cjsExportsRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/;
- // RegEx adjusted from https://github.com/jbrantly/yabble/blob/master/lib/yabble.js#L339
- var cjsRequireRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g;
- var commentRegEx = /(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
-
- var stringRegEx = /("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g;
-
- // used to support leading #!/usr/bin/env in scripts as supported in Node
- var hashBangRegEx = /^\#\!.*/;
-
- function getCJSDeps(source) {
- cjsRequireRegEx.lastIndex = commentRegEx.lastIndex = stringRegEx.lastIndex = 0;
-
- var deps = [];
-
- var match;
-
- // track string and comment locations for unminified source
- var stringLocations = [], commentLocations = [];
-
- function inLocation(locations, match) {
- for (var i = 0; i < locations.length; i++)
- if (locations[i][0] < match.index && locations[i][1] > match.index)
- return true;
- return false;
- }
-
- if (source.length / source.split('\n').length < 200) {
- while (match = stringRegEx.exec(source))
- stringLocations.push([match.index, match.index + match[0].length]);
-
- // TODO: track template literals here before comments
-
- while (match = commentRegEx.exec(source)) {
- // only track comments not starting in strings
- if (!inLocation(stringLocations, match))
- commentLocations.push([match.index + match[1].length, match.index + match[0].length - 1]);
- }
- }
-
- while (match = cjsRequireRegEx.exec(source)) {
- // ensure we're not within a string or comment location
- if (!inLocation(stringLocations, match) && !inLocation(commentLocations, match)) {
- var dep = match[1].substr(1, match[1].length - 2);
- // skip cases like require('" + file + "')
- if (dep.match(/"|'/))
- continue;
- // trailing slash requires are removed as they don't map mains in SystemJS
- if (dep[dep.length - 1] == '/')
- dep = dep.substr(0, dep.length - 1);
- deps.push(dep);
- }
- }
-
- return deps;
- }
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
- if (!load.metadata.format) {
- cjsExportsRegEx.lastIndex = 0;
- cjsRequireRegEx.lastIndex = 0;
- if (cjsRequireRegEx.exec(load.source) || cjsExportsRegEx.exec(load.source))
- load.metadata.format = 'cjs';
- }
-
- if (load.metadata.format == 'cjs') {
- var metaDeps = load.metadata.deps;
- var deps = load.metadata.cjsRequireDetection === false ? [] : getCJSDeps(load.source);
-
- for (var g in load.metadata.globals)
- if (load.metadata.globals[g])
- deps.push(load.metadata.globals[g]);
-
- var entry = createEntry();
-
- load.metadata.entry = entry;
-
- entry.deps = deps;
- entry.executingRequire = true;
- entry.execute = function(_require, exports, module) {
- function require(name) {
- if (name[name.length - 1] == '/')
- name = name.substr(0, name.length - 1);
- return _require.apply(this, arguments);
- }
- require.resolve = function(name) {
- return loader.get('@@cjs-helpers').requireResolve(name, module.id);
- };
- // support module.paths ish
- module.paths = [];
- module.require = _require;
-
- // ensure meta deps execute first
- if (!load.metadata.cjsDeferDepsExecute)
- for (var i = 0; i < metaDeps.length; i++)
- require(metaDeps[i]);
-
- var pathVars = loader.get('@@cjs-helpers').getPathVars(module.id);
- var __cjsWrapper = {
- exports: exports,
- args: [require, exports, module, pathVars.filename, pathVars.dirname, __global, __global]
- };
-
- var cjsWrapper = "(function(require, exports, module, __filename, __dirname, global, GLOBAL";
-
- // add metadata.globals to the wrapper arguments
- if (load.metadata.globals)
- for (var g in load.metadata.globals) {
- __cjsWrapper.args.push(require(load.metadata.globals[g]));
- cjsWrapper += ", " + g;
- }
-
- // disable AMD detection
- var define = __global.define;
- __global.define = undefined;
- __global.__cjsWrapper = __cjsWrapper;
-
- load.source = cjsWrapper + ") {" + load.source.replace(hashBangRegEx, '') + "\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);";
-
- __exec.call(loader, load);
-
- __global.__cjsWrapper = undefined;
- __global.define = define;
- };
- }
-
- return instantiate.call(loader, load);
- };
- });
-})();
diff --git a/thirdparty/systemjs/lib/conditionals.js b/thirdparty/systemjs/lib/conditionals.js
deleted file mode 100644
index d30a6f9ac..000000000
--- a/thirdparty/systemjs/lib/conditionals.js
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Conditions Extension
- *
- * Allows a condition module to alter the resolution of an import via syntax:
- *
- * import $ from 'jquery/#{browser}';
- *
- * Will first load the module 'browser' via `SystemJS.import('browser')` and
- * take the default export of that module.
- * If the default export is not a string, an error is thrown.
- *
- * We then substitute the string into the require to get the conditional resolution
- * enabling environment-specific variations like:
- *
- * import $ from 'jquery/ie'
- * import $ from 'jquery/firefox'
- * import $ from 'jquery/chrome'
- * import $ from 'jquery/safari'
- *
- * It can be useful for a condition module to define multiple conditions.
- * This can be done via the `|` modifier to specify an export member expression:
- *
- * import 'jquery/#{./browser.js|grade.version}'
- *
- * Where the `grade` export `version` member in the `browser.js` module is substituted.
- *
- *
- * Boolean Conditionals
- *
- * For polyfill modules, that are used as imports but have no module value,
- * a binary conditional allows a module not to be loaded at all if not needed:
- *
- * import 'es5-shim#?./conditions.js|needs-es5shim'
- *
- * These conditions can also be negated via:
- *
- * import 'es5-shim#?./conditions.js|~es6'
- *
- */
-
- var sysConditions = ['browser', 'node', 'dev', 'build', 'production', 'default'];
-
- function parseCondition(condition) {
- var conditionExport, conditionModule, negation;
-
- var negation = condition[0] == '~';
- var conditionExportIndex = condition.lastIndexOf('|');
- if (conditionExportIndex != -1) {
- conditionExport = condition.substr(conditionExportIndex + 1);
- conditionModule = condition.substr(negation, conditionExportIndex - negation);
-
- if (negation)
- warn.call(this, 'Condition negation form "' + condition + '" is deprecated for "' + conditionModule + '|~' + conditionExport + '"');
-
- if (conditionExport[0] == '~') {
- negation = true;
- conditionExport = conditionExport.substr(1);
- }
- }
- else {
- conditionExport = 'default';
- conditionModule = condition.substr(negation);
- if (sysConditions.indexOf(conditionModule) != -1) {
- conditionExport = conditionModule;
- conditionModule = null;
- }
- }
-
- return {
- module: conditionModule || '@system-env',
- prop: conditionExport,
- negate: negation
- };
- }
-
- function serializeCondition(conditionObj) {
- return conditionObj.module + '|' + (conditionObj.negate ? '~' : '') + conditionObj.prop;
- }
-
- function resolveCondition(conditionObj, parentName, bool) {
- var self = this;
- return this.normalize(conditionObj.module, parentName)
- .then(function(normalizedCondition) {
- return self.load(normalizedCondition)
- .then(function(q) {
- var m = readMemberExpression(conditionObj.prop, self.get(normalizedCondition));
-
- if (bool && typeof m != 'boolean')
- throw new TypeError('Condition ' + serializeCondition(conditionObj) + ' did not resolve to a boolean.');
-
- return conditionObj.negate ? !m : m;
- });
- });
- }
-
- var interpolationRegEx = /#\{[^\}]+\}/;
- function interpolateConditional(name, parentName) {
- // first we normalize the conditional
- var conditionalMatch = name.match(interpolationRegEx);
-
- if (!conditionalMatch)
- return Promise.resolve(name);
-
- var conditionObj = parseCondition.call(this, conditionalMatch[0].substr(2, conditionalMatch[0].length - 3));
-
- // in builds, return normalized conditional
- if (this.builder)
- return this['normalize'](conditionObj.module, parentName)
- .then(function(conditionModule) {
- conditionObj.module = conditionModule;
- return name.replace(interpolationRegEx, '#{' + serializeCondition(conditionObj) + '}');
- });
-
- return resolveCondition.call(this, conditionObj, parentName, false)
- .then(function(conditionValue) {
- if (typeof conditionValue !== 'string')
- throw new TypeError('The condition value for ' + name + ' doesn\'t resolve to a string.');
-
- if (conditionValue.indexOf('/') != -1)
- throw new TypeError('Unabled to interpolate conditional ' + name + (parentName ? ' in ' + parentName : '') + '\n\tThe condition value ' + conditionValue + ' cannot contain a "/" separator.');
-
- return name.replace(interpolationRegEx, conditionValue);
- });
- }
-
- function booleanConditional(name, parentName) {
- // first we normalize the conditional
- var booleanIndex = name.lastIndexOf('#?');
-
- if (booleanIndex == -1)
- return Promise.resolve(name);
-
- var conditionObj = parseCondition.call(this, name.substr(booleanIndex + 2));
-
- // in builds, return normalized conditional
- if (this.builder)
- return this['normalize'](conditionObj.module, parentName)
- .then(function(conditionModule) {
- conditionObj.module = conditionModule;
- return name.substr(0, booleanIndex) + '#?' + serializeCondition(conditionObj);
- });
-
- return resolveCondition.call(this, conditionObj, parentName, true)
- .then(function(conditionValue) {
- return conditionValue ? name.substr(0, booleanIndex) : '@empty';
- });
- }
-
- // normalizeSync does not parse conditionals at all although it could
- hook('normalize', function(normalize) {
- return function(name, parentName, skipExt) {
- var loader = this;
- return booleanConditional.call(loader, name, parentName)
- .then(function(name) {
- return normalize.call(loader, name, parentName, skipExt);
- })
- .then(function(normalized) {
- return interpolateConditional.call(loader, normalized, parentName);
- });
- };
- });
diff --git a/thirdparty/systemjs/lib/core.js b/thirdparty/systemjs/lib/core.js
deleted file mode 100644
index aef4315e8..000000000
--- a/thirdparty/systemjs/lib/core.js
+++ /dev/null
@@ -1,504 +0,0 @@
-function readMemberExpression(p, value) {
- var pParts = p.split('.');
- while (pParts.length)
- value = value[pParts.shift()];
- return value;
-}
-
-function getMapMatch(map, name) {
- var bestMatch, bestMatchLength = 0;
-
- for (var p in map) {
- if (name.substr(0, p.length) == p && (name.length == p.length || name[p.length] == '/')) {
- var curMatchLength = p.split('/').length;
- if (curMatchLength <= bestMatchLength)
- continue;
- bestMatch = p;
- bestMatchLength = curMatchLength;
- }
- }
-
- return bestMatch;
-}
-
-function prepareBaseURL(loader) {
- // ensure baseURl is fully normalized
- if (this._loader.baseURL !== this.baseURL) {
- if (this.baseURL[this.baseURL.length - 1] != '/')
- this.baseURL += '/';
-
- this._loader.baseURL = this.baseURL = new URL(this.baseURL, baseURIObj).href;
- }
-}
-
-var envModule;
-function setProduction(isProduction, isBuilder) {
- this.set('@system-env', envModule = this.newModule({
- browser: isBrowser,
- node: !!this._nodeRequire,
- production: !isBuilder && isProduction,
- dev: isBuilder || !isProduction,
- build: isBuilder,
- 'default': true
- }));
-}
-
-hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
-
- // support baseURL
- this.baseURL = baseURI;
-
- // support map and paths
- this.map = {};
-
- // make the location of the system.js script accessible
- if (typeof $__curScript != 'undefined')
- this.scriptSrc = $__curScript.src;
-
- // global behaviour flags
- this.warnings = false;
- this.defaultJSExtensions = false;
- this.pluginFirst = false;
- this.loaderErrorStack = false;
-
- // by default load ".json" files as json
- // leading * meta doesn't need normalization
- // NB add this in next breaking release
- // this.meta['*.json'] = { format: 'json' };
-
- // support the empty module, as a concept
- this.set('@empty', this.newModule({}));
-
- setProduction.call(this, false, false);
- };
-});
-
-// include the node require since we're overriding it
-if (typeof require != 'undefined' && typeof process != 'undefined' && !process.browser)
- SystemJSLoader.prototype._nodeRequire = require;
-
-/*
- Core SystemJS Normalization
-
- If a name is relative, we apply URL normalization to the page
- If a name is an absolute URL, we leave it as-is
-
- Plain names (neither of the above) run through the map and paths
- normalization phases.
-
- The paths normalization phase applies last (paths extension), which
- defines the `decanonicalize` function and normalizes everything into
- a URL.
- */
-
-var parentModuleContext;
-function getNodeModule(name, baseURL) {
- if (!isPlain(name))
- throw new Error('Node module ' + name + ' can\'t be loaded as it is not a package require.');
-
- if (!parentModuleContext) {
- var Module = this._nodeRequire('module');
- var base = baseURL.substr(isWindows ? 8 : 7);
- parentModuleContext = new Module(base);
- parentModuleContext.paths = Module._nodeModulePaths(base);
- }
- return parentModuleContext.require(name);
-}
-
-function coreResolve(name, parentName) {
- // standard URL resolution
- if (isRel(name))
- return urlResolve(name, parentName);
- else if (isAbsolute(name))
- return name;
-
- // plain names not starting with './', '://' and '/' go through custom resolution
- var mapMatch = getMapMatch(this.map, name);
-
- if (mapMatch) {
- name = this.map[mapMatch] + name.substr(mapMatch.length);
-
- if (isRel(name))
- return urlResolve(name);
- else if (isAbsolute(name))
- return name;
- }
-
- if (this.has(name))
- return name;
-
- // dynamically load node-core modules when requiring `@node/fs` for example
- if (name.substr(0, 6) == '@node/') {
- if (!this._nodeRequire)
- throw new TypeError('Error loading ' + name + '. Can only load node core modules in Node.');
- if (this.builder)
- this.set(name, this.newModule({}));
- else
- this.set(name, this.newModule(getESModule(getNodeModule.call(this, name.substr(6), this.baseURL))));
- return name;
- }
-
- // prepare the baseURL to ensure it is normalized
- prepareBaseURL.call(this);
-
- return applyPaths(this, name) || this.baseURL + name;
-}
-
-hook('normalize', function(normalize) {
- return function(name, parentName, skipExt) {
- var resolved = coreResolve.call(this, name, parentName);
- if (this.defaultJSExtensions && !skipExt && resolved.substr(resolved.length - 3, 3) != '.js' && !isPlain(resolved))
- resolved += '.js';
- return resolved;
- };
-});
-
-// percent encode just '#' in urls if using HTTP requests
-var httpRequest = typeof XMLHttpRequest != 'undefined';
-hook('locate', function(locate) {
- return function(load) {
- return Promise.resolve(locate.call(this, load))
- .then(function(address) {
- if (httpRequest)
- return address.replace(/#/g, '%23');
- return address;
- });
- };
-});
-
-/*
- * Fetch with authorization
- */
-hook('fetch', function() {
- return function(load) {
- return new Promise(function(resolve, reject) {
- fetchTextFromURL(load.address, load.metadata.authorization, resolve, reject);
- });
- };
-});
-
-/*
- __useDefault
-
- When a module object looks like:
- newModule(
- __useDefault: true,
- default: 'some-module'
- })
-
- Then importing that module provides the 'some-module'
- result directly instead of the full module.
-
- Useful for eg module.exports = function() {}
-*/
-hook('import', function(systemImport) {
- return function(name, parentName, parentAddress) {
- if (parentName && parentName.name)
- warn.call(this, 'SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing ' + name + ' from ' + parentName.name);
- return systemImport.call(this, name, parentName, parentAddress).then(function(module) {
- return module.__useDefault ? module['default'] : module;
- });
- };
-});
-
-/*
- * Allow format: 'detect' meta to enable format detection
- */
-hook('translate', function(systemTranslate) {
- return function(load) {
- if (load.metadata.format == 'detect')
- load.metadata.format = undefined;
- return systemTranslate.apply(this, arguments);
- };
-});
-
-
-/*
- * JSON format support
- *
- * Supports loading JSON files as a module format itself
- *
- * Usage:
- *
- * SystemJS.config({
- * meta: {
- * '*.json': { format: 'json' }
- * }
- * });
- *
- * Module is returned as if written:
- *
- * export default {JSON}
- *
- * No named exports are provided
- *
- * Files ending in ".json" are treated as json automatically by SystemJS
- */
-hook('instantiate', function(instantiate) {
- return function(load) {
- if (load.metadata.format == 'json' && !this.builder) {
- var entry = load.metadata.entry = createEntry();
- entry.deps = [];
- entry.execute = function() {
- try {
- return JSON.parse(load.source);
- }
- catch(e) {
- throw new Error("Invalid JSON file " + load.name);
- }
- };
- }
- };
-})
-
-/*
- Extend config merging one deep only
-
- loader.config({
- some: 'random',
- config: 'here',
- deep: {
- config: { too: 'too' }
- }
- });
-
- <=>
-
- loader.some = 'random';
- loader.config = 'here'
- loader.deep = loader.deep || {};
- loader.deep.config = { too: 'too' };
-
-
- Normalizes meta and package configs allowing for:
-
- SystemJS.config({
- meta: {
- './index.js': {}
- }
- });
-
- To become
-
- SystemJS.meta['https://thissite.com/index.js'] = {};
-
- For easy normalization canonicalization with latest URL support.
-
-*/
-function envSet(loader, cfg, envCallback) {
- if (envModule.browser && cfg.browserConfig)
- envCallback(cfg.browserConfig);
- if (envModule.node && cfg.nodeConfig)
- envCallback(cfg.nodeConfig);
- if (envModule.dev && cfg.devConfig)
- envCallback(cfg.devConfig);
- if (envModule.build && cfg.buildConfig)
- envCallback(cfg.buildConfig);
- if (envModule.production && cfg.productionConfig)
- envCallback(cfg.productionConfig);
-}
-
-SystemJSLoader.prototype.getConfig = function(name) {
- var cfg = {};
- var loader = this;
- for (var p in loader) {
- if (loader.hasOwnProperty && !loader.hasOwnProperty(p) || p in SystemJSLoader.prototype && p != 'transpiler')
- continue;
- if (indexOf.call(['_loader', 'amdDefine', 'amdRequire', 'defined', 'failed', 'version', 'loads'], p) == -1)
- cfg[p] = loader[p];
- }
- cfg.production = envModule.production;
- return cfg;
-};
-
-var curCurScript;
-SystemJSLoader.prototype.config = function(cfg, isEnvConfig) {
- var loader = this;
-
- if ('loaderErrorStack' in cfg) {
- curCurScript = $__curScript;
- if (cfg.loaderErrorStack)
- $__curScript = undefined;
- else
- $__curScript = curCurScript;
- }
-
- if ('warnings' in cfg)
- loader.warnings = cfg.warnings;
-
- // transpiler deprecation path
- if (cfg.transpilerRuntime === false)
- loader._loader.loadedTranspilerRuntime = true;
-
- if ('production' in cfg || 'build' in cfg)
- setProduction.call(loader, !!cfg.production, !!(cfg.build || envModule && envModule.build));
-
- if (!isEnvConfig) {
- // if using nodeConfig / browserConfig / productionConfig, take baseURL from there
- // these exceptions will be unnecessary when we can properly implement config queuings
- var baseURL;
- envSet(loader, cfg, function(cfg) {
- baseURL = baseURL || cfg.baseURL;
- });
- baseURL = baseURL || cfg.baseURL;
-
- // always configure baseURL first
- if (baseURL) {
- var hasConfig = false;
- function checkHasConfig(obj) {
- for (var p in obj)
- if (obj.hasOwnProperty(p))
- return true;
- }
- if (checkHasConfig(loader.packages) || checkHasConfig(loader.meta) || checkHasConfig(loader.depCache) || checkHasConfig(loader.bundles) || checkHasConfig(loader.packageConfigPaths))
- throw new TypeError('Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.');
-
- this.baseURL = baseURL;
- prepareBaseURL.call(this);
- }
-
- if (cfg.paths)
- extend(loader.paths, cfg.paths);
-
- envSet(loader, cfg, function(cfg) {
- if (cfg.paths)
- extend(loader.paths, cfg.paths);
- });
-
- // warn on wildcard path deprecations
- if (this.warnings) {
- for (var p in loader.paths)
- if (p.indexOf('*') != -1)
- warn.call(loader, 'Paths configuration "' + p + '" -> "' + loader.paths[p] + '" uses wildcards which are being deprecated for simpler trailing "/" folder paths.');
- }
- }
-
- if (cfg.defaultJSExtensions) {
- loader.defaultJSExtensions = cfg.defaultJSExtensions;
- warn.call(loader, 'The defaultJSExtensions configuration option is deprecated, use packages configuration instead.');
- }
-
- if (cfg.pluginFirst)
- loader.pluginFirst = cfg.pluginFirst;
-
- if (cfg.map) {
- var objMaps = '';
- for (var p in cfg.map) {
- var v = cfg.map[p];
-
- // object map backwards-compat into packages configuration
- if (typeof v !== 'string') {
- objMaps += (objMaps.length ? ', ' : '') + '"' + p + '"';
-
- var defaultJSExtension = loader.defaultJSExtensions && p.substr(p.length - 3, 3) != '.js';
- var prop = loader.decanonicalize(p);
- if (defaultJSExtension && prop.substr(prop.length - 3, 3) == '.js')
- prop = prop.substr(0, prop.length - 3);
-
- // if a package main, revert it
- var pkgMatch = '';
- for (var pkg in loader.packages) {
- if (prop.substr(0, pkg.length) == pkg
- && (!prop[pkg.length] || prop[pkg.length] == '/')
- && pkgMatch.split('/').length < pkg.split('/').length)
- pkgMatch = pkg;
- }
- if (pkgMatch && loader.packages[pkgMatch].main)
- prop = prop.substr(0, prop.length - loader.packages[pkgMatch].main.length - 1);
-
- var pkg = loader.packages[prop] = loader.packages[prop] || {};
- pkg.map = v;
- }
- else {
- loader.map[p] = v;
- }
- }
- if (objMaps)
- warn.call(loader, 'The map configuration for ' + objMaps + ' uses object submaps, which is deprecated in global map.\nUpdate this to use package contextual map with configs like SystemJS.config({ packages: { "' + p + '": { map: {...} } } }).');
- }
-
- if (cfg.packageConfigPaths) {
- var packageConfigPaths = [];
- for (var i = 0; i < cfg.packageConfigPaths.length; i++) {
- var path = cfg.packageConfigPaths[i];
- var packageLength = Math.max(path.lastIndexOf('*') + 1, path.lastIndexOf('/'));
- var normalized = coreResolve.call(loader, path.substr(0, packageLength));
- packageConfigPaths[i] = normalized + path.substr(packageLength);
- }
- loader.packageConfigPaths = packageConfigPaths;
- }
-
- if (cfg.bundles) {
- for (var p in cfg.bundles) {
- var bundle = [];
- for (var i = 0; i < cfg.bundles[p].length; i++) {
- var defaultJSExtension = loader.defaultJSExtensions && cfg.bundles[p][i].substr(cfg.bundles[p][i].length - 3, 3) != '.js';
- var normalizedBundleDep = loader.decanonicalize(cfg.bundles[p][i]);
- if (defaultJSExtension && normalizedBundleDep.substr(normalizedBundleDep.length - 3, 3) == '.js')
- normalizedBundleDep = normalizedBundleDep.substr(0, normalizedBundleDep.length - 3);
- bundle.push(normalizedBundleDep);
- }
- loader.bundles[p] = bundle;
- }
- }
-
- if (cfg.packages) {
- for (var p in cfg.packages) {
- if (p.match(/^([^\/]+:)?\/\/$/))
- throw new TypeError('"' + p + '" is not a valid package name.');
-
- var prop = coreResolve.call(loader, p);
-
- // allow trailing slash in packages
- if (prop[prop.length - 1] == '/')
- prop = prop.substr(0, prop.length - 1);
-
- setPkgConfig(loader, prop, cfg.packages[p], false);
- }
- }
-
- for (var c in cfg) {
- var v = cfg[c];
-
- if (indexOf.call(['baseURL', 'map', 'packages', 'bundles', 'paths', 'warnings', 'packageConfigPaths',
- 'loaderErrorStack', 'browserConfig', 'nodeConfig', 'devConfig', 'buildConfig', 'productionConfig'], c) != -1)
- continue;
-
- if (typeof v != 'object' || v instanceof Array) {
- loader[c] = v;
- }
- else {
- loader[c] = loader[c] || {};
-
- for (var p in v) {
- // base-level wildcard meta does not normalize to retain catch-all quality
- if (c == 'meta' && p[0] == '*') {
- extend(loader[c][p] = loader[c][p] || {}, v[p]);
- }
- else if (c == 'meta') {
- // meta can go through global map, with defaultJSExtensions adding
- var resolved = coreResolve.call(loader, p);
- if (loader.defaultJSExtensions && resolved.substr(resolved.length - 3, 3) != '.js' && !isPlain(resolved))
- resolved += '.js';
- extend(loader[c][resolved] = loader[c][resolved] || {}, v[p]);
- }
- else if (c == 'depCache') {
- var defaultJSExtension = loader.defaultJSExtensions && p.substr(p.length - 3, 3) != '.js';
- var prop = loader.decanonicalize(p);
- if (defaultJSExtension && prop.substr(prop.length - 3, 3) == '.js')
- prop = prop.substr(0, prop.length - 3);
- loader[c][prop] = [].concat(v[p]);
- }
- else {
- loader[c][p] = v[p];
- }
- }
- }
- }
-
- envSet(loader, cfg, function(cfg) {
- loader.config(cfg, true);
- });
-}; \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/createSystem.js b/thirdparty/systemjs/lib/createSystem.js
deleted file mode 100644
index 96fbf418c..000000000
--- a/thirdparty/systemjs/lib/createSystem.js
+++ /dev/null
@@ -1,3 +0,0 @@
-System = new SystemJSLoader();
-
-__global.SystemJS = System; \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/depCache.js b/thirdparty/systemjs/lib/depCache.js
deleted file mode 100644
index ced47a0e3..000000000
--- a/thirdparty/systemjs/lib/depCache.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Dependency Tree Cache
- *
- * Allows a build to pre-populate a dependency trace tree on the loader of
- * the expected dependency tree, to be loaded upfront when requesting the
- * module, avoinding the n round trips latency of module loading, where
- * n is the dependency tree depth.
- *
- * eg:
- * SystemJS.depCache = {
- * 'app': ['normalized', 'deps'],
- * 'normalized': ['another'],
- * 'deps': ['tree']
- * };
- *
- * SystemJS.import('app')
- * // simultaneously starts loading all of:
- * // 'normalized', 'deps', 'another', 'tree'
- * // before "app" source is even loaded
- *
- */
-
-(function() {
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.depCache = {};
- }
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- // load direct deps, in turn will pick up their trace trees
- var deps = loader.depCache[load.name];
- if (deps)
- for (var i = 0; i < deps.length; i++)
- loader['import'](deps[i], load.name);
-
- return locate.call(loader, load);
- };
- });
-})();
-
diff --git a/thirdparty/systemjs/lib/esm.js b/thirdparty/systemjs/lib/esm.js
deleted file mode 100644
index 84ac0f353..000000000
--- a/thirdparty/systemjs/lib/esm.js
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Extension to detect ES6 and auto-load Traceur or Babel for processing
- */
-(function() {
- // good enough ES6 module detection regex - format detections not designed to be accurate, but to handle the 99% use case
- var esmRegEx = /(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/;
-
- var traceurRuntimeRegEx = /\$traceurRuntime\s*\./;
- var babelHelpersRegEx = /babelHelpers\s*\./;
-
- hook('translate', function(translate) {
- return function(load) {
- var loader = this;
- var args = arguments;
- return translate.apply(loader, args)
- .then(function(source) {
- // detect & transpile ES6
- if (load.metadata.format == 'esm' || load.metadata.format == 'es6' || !load.metadata.format && source.match(esmRegEx)) {
- if (load.metadata.format == 'es6')
- warn.call(loader, 'Module ' + load.name + ' has metadata setting its format to "es6", which is deprecated.\nThis should be updated to "esm".');
-
- load.metadata.format = 'esm';
-
- if (load.metadata.deps) {
- var depInject = '';
- for (var i = 0; i < load.metadata.deps.length; i++)
- depInject += 'import "' + load.metadata.deps[i] + '"; ';
- load.source = depInject + source;
- }
-
- if (loader.transpiler === false) {
- // we accept translation to esm for builds though to enable eg rollup optimizations
- if (loader.builder)
- return source;
- throw new TypeError('Unable to dynamically transpile ES module as SystemJS.transpiler set to false.');
- }
-
- // setting _loader.loadedTranspiler = false tells the next block to
- // do checks for setting transpiler metadata
- loader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false;
- if (loader.pluginLoader)
- loader.pluginLoader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false;
-
- // do transpilation
- return (loader._loader.transpilerPromise || (
- loader._loader.transpilerPromise = Promise.resolve(
- __global[loader.transpiler == 'typescript' ? 'ts' : loader.transpiler] || (loader.pluginLoader || loader).normalize(loader.transpiler)
- .then(function(normalized) {
- loader._loader.transpilerNormalized = normalized;
- return (loader.pluginLoader || loader).load(normalized)
- .then(function() {
- return (loader.pluginLoader || loader).get(normalized);
- });
- })
- ))).then(function(transpiler) {
- loader._loader.loadedTranspilerRuntime = true;
-
- // translate hooks means this is a transpiler plugin instead of a raw implementation
- if (transpiler.translate) {
- // if transpiler is the same as the plugin loader, then don't run twice
- if (transpiler == load.metadata.loaderModule)
- return load.source;
- load.metadata.loaderModule = transpiler;
- load.metadata.loader = loader._loader.transpilerNormalized;
-
- // convert the source map into an object for transpilation chaining
- if (typeof load.metadata.sourceMap == 'string')
- load.metadata.sourceMap = JSON.parse(load.metadata.sourceMap);
-
- return Promise.resolve(transpiler.translate.apply(loader, args))
- .then(function(source) {
- // sanitize sourceMap if an object not a JSON string
- var sourceMap = load.metadata.sourceMap;
- if (sourceMap && typeof sourceMap == 'object') {
- var originalName = load.address.split('!')[0];
-
- // force set the filename of the original file
- if (!sourceMap.file || sourceMap.file == load.address)
- sourceMap.file = originalName + '!transpiled';
-
- // force set the sources list if only one source
- if (!sourceMap.sources || sourceMap.sources.length <= 1 && (!sourceMap.sources[0] || sourceMap.sources[0] == load.address))
- sourceMap.sources = [originalName];
- }
-
- if (load.metadata.format == 'esm' && !loader.builder && detectRegisterFormat(source))
- load.metadata.format = 'register';
- return source;
- });
- }
-
- // legacy builder support
- if (loader.builder)
- load.metadata.originalSource = load.source;
-
- // defined in es6-module-loader/src/transpile.js
- return transpile.call(loader, load)
- .then(function(source) {
- // clear sourceMap as transpiler embeds it
- load.metadata.sourceMap = undefined;
- return source;
- });
- }, function(err) {
- throw addToError(err, 'Unable to load transpiler to transpile ' + load.name);
- });
- }
-
- // skip transpiler and transpiler runtime loading when transpiler is disabled
- if (loader.transpiler === false)
- return source;
-
- // load the transpiler correctly
- if (loader._loader.loadedTranspiler === false && (loader.transpiler == 'traceur' || loader.transpiler == 'typescript' || loader.transpiler == 'babel')
- && load.name == loader.normalizeSync(loader.transpiler)) {
-
- // always load transpiler as a global
- if (source.length > 100 && !load.metadata.format) {
- load.metadata.format = 'global';
-
- if (loader.transpiler === 'traceur')
- load.metadata.exports = 'traceur';
- if (loader.transpiler === 'typescript')
- load.metadata.exports = 'ts';
- }
-
- loader._loader.loadedTranspiler = true;
- }
-
- // load the transpiler runtime correctly
- if (loader._loader.loadedTranspilerRuntime === false) {
- if (load.name == loader.normalizeSync('traceur-runtime')
- || load.name == loader.normalizeSync('babel/external-helpers*')) {
- if (source.length > 100)
- load.metadata.format = load.metadata.format || 'global';
-
- loader._loader.loadedTranspilerRuntime = true;
- }
- }
-
- // detect transpiler runtime usage to load runtimes
- if ((load.metadata.format == 'register' || load.metadata.bundle) && loader._loader.loadedTranspilerRuntime !== true) {
- if (loader.transpiler == 'traceur' && !__global.$traceurRuntime && load.source.match(traceurRuntimeRegEx)) {
- loader._loader.loadedTranspilerRuntime = loader._loader.loadedTranspilerRuntime || false;
- return loader['import']('traceur-runtime').then(function() {
- return source;
- });
- }
- if (loader.transpiler == 'babel' && !__global.babelHelpers && load.source.match(babelHelpersRegEx)) {
- loader._loader.loadedTranspilerRuntime = loader._loader.loadedTranspilerRuntime || false;
- return loader['import']('babel/external-helpers').then(function() {
- return source;
- });
- }
- }
-
- return source;
- });
- };
- });
-
-})();
diff --git a/thirdparty/systemjs/lib/global-eval.js b/thirdparty/systemjs/lib/global-eval.js
deleted file mode 100644
index f27efc222..000000000
--- a/thirdparty/systemjs/lib/global-eval.js
+++ /dev/null
@@ -1,142 +0,0 @@
-// we define a __exec for globally-scoped execution
-// used by module format implementations
-var __exec;
-
-(function() {
-
- var hasBuffer = typeof Buffer != 'undefined';
- try {
- if (hasBuffer && new Buffer('a').toString('base64') != 'YQ==')
- hasBuffer = false;
- }
- catch(e) {
- hasBuffer = false;
- }
-
- var sourceMapPrefix = '\n//# sourceMappingURL=data:application/json;base64,';
- function inlineSourceMap(sourceMapString) {
- if (hasBuffer)
- return sourceMapPrefix + new Buffer(sourceMapString).toString('base64');
- else if (typeof btoa != 'undefined')
- return sourceMapPrefix + btoa(unescape(encodeURIComponent(sourceMapString)));
- else
- return '';
- }
-
- function getSource(load, wrap) {
- var lastLineIndex = load.source.lastIndexOf('\n');
-
- // wrap ES formats with a System closure for System global encapsulation
- if (load.metadata.format == 'global')
- wrap = false;
-
- var sourceMap = load.metadata.sourceMap;
- if (sourceMap) {
- if (typeof sourceMap != 'object')
- throw new TypeError('load.metadata.sourceMap must be set to an object.');
-
- sourceMap = JSON.stringify(sourceMap);
- }
-
- return (wrap ? '(function(System, SystemJS) {' : '') + load.source + (wrap ? '\n})(System, System);' : '')
- // adds the sourceURL comment if not already present
- + (load.source.substr(lastLineIndex, 15) != '\n//# sourceURL='
- ? '\n//# sourceURL=' + load.address + (sourceMap ? '!transpiled' : '') : '')
- // add sourceMappingURL if load.metadata.sourceMap is set
- + (sourceMap && inlineSourceMap(sourceMap) || '');
- }
-
- var curLoad;
-
- // System.register, System.registerDynamic, AMD define pipeline
- // if currently evalling code here, immediately reduce the registered entry against the load record
- hook('pushRegister_', function() {
- return function(register) {
- if (!curLoad)
- return false;
-
- this.reduceRegister_(curLoad, register);
- return true;
- };
- });
-
- // System clobbering protection (mostly for Traceur)
- var curSystem;
- var callCounter = 0;
- function preExec(loader, load) {
- curLoad = load;
- if (callCounter++ == 0)
- curSystem = __global.System;
- __global.System = __global.SystemJS = loader;
- }
- function postExec() {
- if (--callCounter == 0)
- __global.System = __global.SystemJS = curSystem;
- curLoad = undefined;
- }
-
- var useVm;
- var vm;
- __exec = function(load) {
- if (!load.source)
- return;
- if ((load.metadata.integrity || load.metadata.nonce) && supportsScriptExec)
- return scriptExec.call(this, load);
- try {
- preExec(this, load);
- curLoad = load;
- // global scoped eval for node (avoids require scope leak)
- if (!vm && this._nodeRequire) {
- vm = this._nodeRequire('vm');
- useVm = vm.runInThisContext("typeof System !== 'undefined' && System") === this;
- }
- if (useVm)
- vm.runInThisContext(getSource(load, true), { filename: load.address + (load.metadata.sourceMap ? '!transpiled' : '') });
- else
- (0, eval)(getSource(load, true));
- postExec();
- }
- catch(e) {
- postExec();
- throw addToError(e, 'Evaluating ' + load.address);
- }
- };
-
- var supportsScriptExec = false;
- if (isBrowser && typeof document != 'undefined' && document.getElementsByTagName) {
- if (!(window.chrome && window.chrome.extension || navigator.userAgent.match(/^Node\.js/)))
- supportsScriptExec = true;
- }
-
- // script execution via injecting a script tag into the page
- // this allows CSP integrity and nonce to be set for CSP environments
- var head;
- function scriptExec(load) {
- if (!head)
- head = document.head || document.body || document.documentElement;
-
- var script = document.createElement('script');
- script.text = getSource(load, false);
- var onerror = window.onerror;
- var e;
- window.onerror = function(_e) {
- e = addToError(_e, 'Evaluating ' + load.address);
- if (onerror)
- onerror.apply(this, arguments);
- }
- preExec(this, load);
-
- if (load.metadata.integrity)
- script.setAttribute('integrity', load.metadata.integrity);
- if (load.metadata.nonce)
- script.setAttribute('nonce', load.metadata.nonce);
-
- head.appendChild(script);
- head.removeChild(script);
- postExec();
- window.onerror = onerror;
- if (e)
- throw e;
- }
-
-})();
diff --git a/thirdparty/systemjs/lib/global-helpers.js b/thirdparty/systemjs/lib/global-helpers.js
deleted file mode 100644
index 2e87f0882..000000000
--- a/thirdparty/systemjs/lib/global-helpers.js
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-function getGlobalValue(exports) {
- if (typeof exports == 'string')
- return readMemberExpression(exports, __global);
-
- if (!(exports instanceof Array))
- throw new Error('Global exports must be a string or array.');
-
- var globalValue = {};
- var first = true;
- for (var i = 0; i < exports.length; i++) {
- var val = readMemberExpression(exports[i], __global);
- if (first) {
- globalValue['default'] = val;
- first = false;
- }
- globalValue[exports[i].split('.').pop()] = val;
- }
- return globalValue;
-}
-
-hook('reduceRegister_', function(reduceRegister) {
- return function(load, register) {
- if (register || (!load.metadata.exports && !(isWorker && load.metadata.format == 'global')))
- return reduceRegister.call(this, load, register);
-
- load.metadata.format = 'global';
- var entry = load.metadata.entry = createEntry();
- entry.deps = load.metadata.deps;
- var globalValue = getGlobalValue(load.metadata.exports);
- entry.execute = function() {
- return globalValue;
- };
- };
-});
-
-hookConstructor(function(constructor) {
- return function() {
- var loader = this;
- constructor.call(loader);
-
- var hasOwnProperty = Object.prototype.hasOwnProperty;
-
- // bare minimum ignores
- var ignoredGlobalProps = ['_g', 'sessionStorage', 'localStorage', 'clipboardData', 'frames', 'frameElement', 'external',
- 'mozAnimationStartTime', 'webkitStorageInfo', 'webkitIndexedDB', 'mozInnerScreenY', 'mozInnerScreenX'];
-
- var globalSnapshot;
-
- function forEachGlobal(callback) {
- if (Object.keys)
- Object.keys(__global).forEach(callback);
- else
- for (var g in __global) {
- if (!hasOwnProperty.call(__global, g))
- continue;
- callback(g);
- }
- }
-
- function forEachGlobalValue(callback) {
- forEachGlobal(function(globalName) {
- if (indexOf.call(ignoredGlobalProps, globalName) != -1)
- return;
- try {
- var value = __global[globalName];
- }
- catch (e) {
- ignoredGlobalProps.push(globalName);
- }
- callback(globalName, value);
- });
- }
-
- loader.set('@@global-helpers', loader.newModule({
- prepareGlobal: function(moduleName, exports, globals, encapsulate) {
- // disable module detection
- var curDefine = __global.define;
-
- __global.define = undefined;
-
- // set globals
- var oldGlobals;
- if (globals) {
- oldGlobals = {};
- for (var g in globals) {
- oldGlobals[g] = __global[g];
- __global[g] = globals[g];
- }
- }
-
- // store a complete copy of the global object in order to detect changes
- if (!exports) {
- globalSnapshot = {};
-
- forEachGlobalValue(function(name, value) {
- globalSnapshot[name] = value;
- });
- }
-
- // return function to retrieve global
- return function() {
- var globalValue = exports ? getGlobalValue(exports) : {};
-
- var singleGlobal;
- var multipleExports = !!exports;
-
- if (!exports || encapsulate)
- forEachGlobalValue(function(name, value) {
- if (globalSnapshot[name] === value)
- return;
- if (typeof value == 'undefined')
- return;
-
- // allow global encapsulation where globals are removed
- if (encapsulate)
- __global[name] = undefined;
-
- if (!exports) {
- globalValue[name] = value;
-
- if (typeof singleGlobal != 'undefined') {
- if (!multipleExports && singleGlobal !== value)
- multipleExports = true;
- }
- else {
- singleGlobal = value;
- }
- }
- });
-
- globalValue = multipleExports ? globalValue : singleGlobal;
-
- // revert globals
- if (oldGlobals) {
- for (var g in oldGlobals)
- __global[g] = oldGlobals[g];
- }
- __global.define = curDefine;
-
- return globalValue;
- };
- }
- }));
- };
-});
diff --git a/thirdparty/systemjs/lib/global.js b/thirdparty/systemjs/lib/global.js
deleted file mode 100644
index b86a4d045..000000000
--- a/thirdparty/systemjs/lib/global.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- SystemJS Global Format
-
- Supports
- metadata.deps
- metadata.globals
- metadata.exports
-
- Without metadata.exports, detects writes to the global object.
-*/
-var __globalName = typeof self != 'undefined' ? 'self' : 'global';
-
-hook('fetch', function(fetch) {
- return function(load) {
- if (load.metadata.exports && !load.metadata.format)
- load.metadata.format = 'global';
- return fetch.call(this, load);
- };
-});
-
-// ideally we could support script loading for globals, but the issue with that is that
-// we can't do it with AMD support side-by-side since AMD support means defining the
-// global define, and global support means not definining it, yet we don't have any hook
-// into the "pre-execution" phase of a script tag being loaded to handle both cases
-hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
-
- if (!load.metadata.format)
- load.metadata.format = 'global';
-
- // global is a fallback module format
- if (load.metadata.format == 'global' && !load.metadata.entry) {
-
- var entry = createEntry();
-
- load.metadata.entry = entry;
-
- entry.deps = [];
-
- for (var g in load.metadata.globals) {
- var gl = load.metadata.globals[g];
- if (gl)
- entry.deps.push(gl);
- }
-
- entry.execute = function(require, exports, module) {
-
- var globals;
- if (load.metadata.globals) {
- globals = {};
- for (var g in load.metadata.globals)
- if (load.metadata.globals[g])
- globals[g] = require(load.metadata.globals[g]);
- }
-
- var exportName = load.metadata.exports;
-
- if (exportName)
- load.source += '\n' + __globalName + '["' + exportName + '"] = ' + exportName + ';';
-
- var retrieveGlobal = loader.get('@@global-helpers').prepareGlobal(module.id, exportName, globals, !!load.metadata.encapsulateGlobal);
- __exec.call(loader, load);
-
- return retrieveGlobal();
- }
- }
- return instantiate.call(this, load);
- };
-});
diff --git a/thirdparty/systemjs/lib/legacy-transpiler.js b/thirdparty/systemjs/lib/legacy-transpiler.js
deleted file mode 100644
index 79c3d9697..000000000
--- a/thirdparty/systemjs/lib/legacy-transpiler.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Traceur, Babel and TypeScript transpile hook for Loader
- */
-var transpile = (function() {
-
- // use Traceur by default
- Loader.prototype.transpiler = 'traceur';
-
- function transpile(load) {
- var self = this;
-
- return Promise.resolve(__global[self.transpiler == 'typescript' ? 'ts' : self.transpiler]
- || (self.pluginLoader || self)['import'](self.transpiler))
- .then(function(transpiler) {
- if (transpiler.__useDefault)
- transpiler = transpiler['default'];
-
- var transpileFunction;
- if (transpiler.Compiler)
- transpileFunction = traceurTranspile;
- else if (transpiler.createLanguageService)
- transpileFunction = typescriptTranspile;
- else
- transpileFunction = babelTranspile;
-
- // note __moduleName will be part of the transformer meta in future when we have the spec for this
- return '(function(__moduleName){' + transpileFunction.call(self, load, transpiler) + '\n})("' + load.name + '");\n//# sourceURL=' + load.address + '!transpiled';
- });
- };
-
- function traceurTranspile(load, traceur) {
- var options = this.traceurOptions || {};
- options.modules = 'instantiate';
- options.script = false;
- if (options.sourceMaps === undefined)
- options.sourceMaps = 'inline';
- options.filename = load.address;
- options.inputSourceMap = load.metadata.sourceMap;
- options.moduleName = false;
-
- var compiler = new traceur.Compiler(options);
-
- return doTraceurCompile(load.source, compiler, options.filename);
- }
- function doTraceurCompile(source, compiler, filename) {
- try {
- return compiler.compile(source, filename);
- }
- catch(e) {
- // on older versions of traceur (<0.9.3), an array of errors is thrown
- // rather than a single error.
- if (e.length) {
- throw e[0];
- }
- throw e;
- }
- }
-
- function babelTranspile(load, babel) {
- var options = this.babelOptions || {};
- options.modules = 'system';
- if (options.sourceMap === undefined)
- options.sourceMap = 'inline';
- options.inputSourceMap = load.metadata.sourceMap;
- options.filename = load.address;
- options.code = true;
- options.ast = false;
-
- return babel.transform(load.source, options).code;
- }
-
- function typescriptTranspile(load, ts) {
- var options = this.typescriptOptions || {};
- options.target = options.target || ts.ScriptTarget.ES5;
- if (options.sourceMap === undefined)
- options.sourceMap = true;
- if (options.sourceMap && options.inlineSourceMap !== false)
- options.inlineSourceMap = true;
-
- options.module = ts.ModuleKind.System;
-
- return ts.transpile(load.source, options, load.address);
- }
-
- return transpile;
-})();
diff --git a/thirdparty/systemjs/lib/loader-wrapper-end.js b/thirdparty/systemjs/lib/loader-wrapper-end.js
deleted file mode 100644
index d10bbad1f..000000000
--- a/thirdparty/systemjs/lib/loader-wrapper-end.js
+++ /dev/null
@@ -1,6 +0,0 @@
- if (typeof module == 'object' && module.exports && typeof exports == 'object')
- module.exports = System;
-
- __global.System = System;
-
-})(typeof self != 'undefined' ? self : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/loader-wrapper-start.js b/thirdparty/systemjs/lib/loader-wrapper-start.js
deleted file mode 100644
index 147820c09..000000000
--- a/thirdparty/systemjs/lib/loader-wrapper-start.js
+++ /dev/null
@@ -1,913 +0,0 @@
-(function(__global) {
-
- var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined';
- var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
- var isWindows = typeof process != 'undefined' && typeof process.platform != 'undefined' && !!process.platform.match(/^win/);
-
- if (!__global.console)
- __global.console = { assert: function() {} };
-
- // IE8 support
- var indexOf = Array.prototype.indexOf || function(item) {
- for (var i = 0, thisLen = this.length; i < thisLen; i++) {
- if (this[i] === item) {
- return i;
- }
- }
- return -1;
- };
-
- var defineProperty;
- (function () {
- try {
- if (!!Object.defineProperty({}, 'a', {}))
- defineProperty = Object.defineProperty;
- }
- catch (e) {
- defineProperty = function(obj, prop, opt) {
- try {
- obj[prop] = opt.value || opt.get.call(obj);
- }
- catch(e) {}
- }
- }
- })();
-
- var errArgs = new Error(0, '_').fileName == '_';
-
- function addToError(err, msg) {
- // parse the stack removing loader code lines for simplification
- if (!err.originalErr) {
- var stack = ((err.message || err) + (err.stack ? '\n' + err.stack : '')).toString().split('\n');
- var newStack = [];
- for (var i = 0; i < stack.length; i++) {
- if (typeof $__curScript == 'undefined' || stack[i].indexOf($__curScript.src) == -1)
- newStack.push(stack[i]);
- }
- }
-
- var newMsg = '(SystemJS) ' + (newStack ? newStack.join('\n\t') : err.message.substr(11)) + '\n\t' + msg;
-
- // Convert file:/// URLs to paths in Node
- if (!isBrowser)
- newMsg = newMsg.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, '');
-
- var newErr = errArgs ? new Error(newMsg, err.fileName, err.lineNumber) : new Error(newMsg);
-
- newErr.stack = newMsg;
-
- // track the original error
- newErr.originalErr = err.originalErr || err;
-
- return newErr;
- }
-
- function __eval(source, debugName, context) {
- try {
- new Function(source).call(context);
- }
- catch(e) {
- throw addToError(e, 'Evaluating ' + debugName);
- }
- }
-
- var baseURI;
-
- // environent baseURI detection
- if (typeof document != 'undefined' && document.getElementsByTagName) {
- baseURI = document.baseURI;
-
- if (!baseURI) {
- var bases = document.getElementsByTagName('base');
- baseURI = bases[0] && bases[0].href || window.location.href;
- }
- }
- else if (typeof location != 'undefined') {
- baseURI = __global.location.href;
- }
-
- // sanitize out the hash and querystring
- if (baseURI) {
- baseURI = baseURI.split('#')[0].split('?')[0];
- baseURI = baseURI.substr(0, baseURI.lastIndexOf('/') + 1);
- }
- else if (typeof process != 'undefined' && process.cwd) {
- baseURI = 'file://' + (isWindows ? '/' : '') + process.cwd() + '/';
- if (isWindows)
- baseURI = baseURI.replace(/\\/g, '/');
- }
- else {
- throw new TypeError('No environment baseURI');
- }
-
- try {
- var nativeURL = new __global.URL('test:///').protocol == 'test:';
- }
- catch(e) {}
-
- var URL = nativeURL ? __global.URL : __global.URLPolyfill;
-
-/*
-*********************************************************************************************
-
- Dynamic Module Loader Polyfill
-
- - Implemented exactly to the former 2014-08-24 ES6 Specification Draft Rev 27, Section 15
- http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#august_24_2014_draft_rev_27
-
- - Functions are commented with their spec numbers, with spec differences commented.
-
- - Spec bugs are commented in this code with links.
-
- - Abstract functions have been combined where possible, and their associated functions
- commented.
-
- - Realm implementation is entirely omitted.
-
-*********************************************************************************************
-*/
-
-function Module() {}
-// http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag
-defineProperty(Module.prototype, 'toString', {
- value: function() {
- return 'Module';
- }
-});
-function Loader(options) {
- this._loader = {
- loaderObj: this,
- loads: [],
- modules: {},
- importPromises: {},
- moduleRecords: {}
- };
-
- // 26.3.3.6
- defineProperty(this, 'global', {
- get: function() {
- return __global;
- }
- });
-
- // 26.3.3.13 realm not implemented
-}
-
-(function() {
-
-// Some Helpers
-
-// logs a linkset snapshot for debugging
-/* function snapshot(loader) {
- console.log('---Snapshot---');
- for (var i = 0; i < loader.loads.length; i++) {
- var load = loader.loads[i];
- var linkSetLog = ' ' + load.name + ' (' + load.status + '): ';
-
- for (var j = 0; j < load.linkSets.length; j++) {
- linkSetLog += '{' + logloads(load.linkSets[j].loads) + '} ';
- }
- console.log(linkSetLog);
- }
- console.log('');
-}
-function logloads(loads) {
- var log = '';
- for (var k = 0; k < loads.length; k++)
- log += loads[k].name + (k != loads.length - 1 ? ' ' : '');
- return log;
-} */
-
-
-/* function checkInvariants() {
- // see https://bugs.ecmascript.org/show_bug.cgi?id=2603#c1
-
- var loads = System._loader.loads;
- var linkSets = [];
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
- console.assert(load.status == 'loading' || load.status == 'loaded', 'Each load is loading or loaded');
-
- for (var j = 0; j < load.linkSets.length; j++) {
- var linkSet = load.linkSets[j];
-
- for (var k = 0; k < linkSet.loads.length; k++)
- console.assert(loads.indexOf(linkSet.loads[k]) != -1, 'linkSet loads are a subset of loader loads');
-
- if (linkSets.indexOf(linkSet) == -1)
- linkSets.push(linkSet);
- }
- }
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
- for (var j = 0; j < linkSets.length; j++) {
- var linkSet = linkSets[j];
-
- if (linkSet.loads.indexOf(load) != -1)
- console.assert(load.linkSets.indexOf(linkSet) != -1, 'linkSet contains load -> load contains linkSet');
-
- if (load.linkSets.indexOf(linkSet) != -1)
- console.assert(linkSet.loads.indexOf(load) != -1, 'load contains linkSet -> linkSet contains load');
- }
- }
-
- for (var i = 0; i < linkSets.length; i++) {
- var linkSet = linkSets[i];
- for (var j = 0; j < linkSet.loads.length; j++) {
- var load = linkSet.loads[j];
-
- for (var k = 0; k < load.dependencies.length; k++) {
- var depName = load.dependencies[k].value;
- var depLoad;
- for (var l = 0; l < loads.length; l++) {
- if (loads[l].name != depName)
- continue;
- depLoad = loads[l];
- break;
- }
-
- // loading records are allowed not to have their dependencies yet
- // if (load.status != 'loading')
- // console.assert(depLoad, 'depLoad found');
-
- // console.assert(linkSet.loads.indexOf(depLoad) != -1, 'linkset contains all dependencies');
- }
- }
- }
-} */
-
- // 15.2.3 - Runtime Semantics: Loader State
-
- // 15.2.3.11
- function createLoaderLoad(object) {
- return {
- // modules is an object for ES5 implementation
- modules: {},
- loads: [],
- loaderObj: object
- };
- }
-
- // 15.2.3.2 Load Records and LoadRequest Objects
-
- var anonCnt = 0;
-
- // 15.2.3.2.1
- function createLoad(name) {
- return {
- status: 'loading',
- name: name || '<Anonymous' + ++anonCnt + '>',
- linkSets: [],
- dependencies: [],
- metadata: {}
- };
- }
-
- // 15.2.3.2.2 createLoadRequestObject, absorbed into calling functions
-
- // 15.2.4
-
- // 15.2.4.1
- function loadModule(loader, name, options) {
- return new Promise(asyncStartLoadPartwayThrough({
- step: options.address ? 'fetch' : 'locate',
- loader: loader,
- moduleName: name,
- // allow metadata for import https://bugs.ecmascript.org/show_bug.cgi?id=3091
- moduleMetadata: options && options.metadata || {},
- moduleSource: options.source,
- moduleAddress: options.address
- }));
- }
-
- // 15.2.4.2
- function requestLoad(loader, request, refererName, refererAddress) {
- // 15.2.4.2.1 CallNormalize
- return new Promise(function(resolve, reject) {
- resolve(loader.loaderObj.normalize(request, refererName, refererAddress));
- })
- // 15.2.4.2.2 GetOrCreateLoad
- .then(function(name) {
- var load;
- if (loader.modules[name]) {
- load = createLoad(name);
- load.status = 'linked';
- // https://bugs.ecmascript.org/show_bug.cgi?id=2795
- load.module = loader.modules[name];
- return load;
- }
-
- for (var i = 0, l = loader.loads.length; i < l; i++) {
- load = loader.loads[i];
- if (load.name != name)
- continue;
- return load;
- }
-
- load = createLoad(name);
- loader.loads.push(load);
-
- proceedToLocate(loader, load);
-
- return load;
- });
- }
-
- // 15.2.4.3
- function proceedToLocate(loader, load) {
- proceedToFetch(loader, load,
- Promise.resolve()
- // 15.2.4.3.1 CallLocate
- .then(function() {
- return loader.loaderObj.locate({ name: load.name, metadata: load.metadata });
- })
- );
- }
-
- // 15.2.4.4
- function proceedToFetch(loader, load, p) {
- proceedToTranslate(loader, load,
- p
- // 15.2.4.4.1 CallFetch
- .then(function(address) {
- // adjusted, see https://bugs.ecmascript.org/show_bug.cgi?id=2602
- if (load.status != 'loading')
- return;
- load.address = address;
-
- return loader.loaderObj.fetch({ name: load.name, metadata: load.metadata, address: address });
- })
- );
- }
-
- // 15.2.4.5
- function proceedToTranslate(loader, load, p) {
- p
- // 15.2.4.5.1 CallTranslate
- .then(function(source) {
- if (load.status != 'loading')
- return;
-
- load.address = load.address || load.name;
-
- return Promise.resolve(loader.loaderObj.translate({ name: load.name, metadata: load.metadata, address: load.address, source: source }))
-
- // 15.2.4.5.2 CallInstantiate
- .then(function(source) {
- load.source = source;
- return loader.loaderObj.instantiate({ name: load.name, metadata: load.metadata, address: load.address, source: source });
- })
-
- // 15.2.4.5.3 InstantiateSucceeded
- .then(function(instantiateResult) {
- if (instantiateResult === undefined)
- throw new TypeError('Declarative modules unsupported in the polyfill.');
-
- if (typeof instantiateResult != 'object')
- throw new TypeError('Invalid instantiate return value');
-
- load.depsList = instantiateResult.deps || [];
- load.execute = instantiateResult.execute;
- })
- // 15.2.4.6 ProcessLoadDependencies
- .then(function() {
- load.dependencies = [];
- var depsList = load.depsList;
-
- var loadPromises = [];
- for (var i = 0, l = depsList.length; i < l; i++) (function(request, index) {
- loadPromises.push(
- requestLoad(loader, request, load.name, load.address)
-
- // 15.2.4.6.1 AddDependencyLoad (load is parentLoad)
- .then(function(depLoad) {
-
- // adjusted from spec to maintain dependency order
- // this is due to the System.register internal implementation needs
- load.dependencies[index] = {
- key: request,
- value: depLoad.name
- };
-
- if (depLoad.status != 'linked') {
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++)
- addLoadToLinkSet(linkSets[i], depLoad);
- }
-
- // console.log('AddDependencyLoad ' + depLoad.name + ' for ' + load.name);
- // snapshot(loader);
- })
- );
- })(depsList[i], i);
-
- return Promise.all(loadPromises);
- })
-
- // 15.2.4.6.2 LoadSucceeded
- .then(function() {
- // console.log('LoadSucceeded ' + load.name);
- // snapshot(loader);
-
- load.status = 'loaded';
-
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++)
- updateLinkSetOnLoad(linkSets[i], load);
- });
- })
- // 15.2.4.5.4 LoadFailed
- ['catch'](function(exc) {
- load.status = 'failed';
- load.exception = exc;
-
- var linkSets = load.linkSets.concat([]);
- for (var i = 0, l = linkSets.length; i < l; i++) {
- linkSetFailed(linkSets[i], load, exc);
- }
-
- console.assert(load.linkSets.length == 0, 'linkSets not removed');
- });
- }
-
- // 15.2.4.7 PromiseOfStartLoadPartwayThrough absorbed into calling functions
-
- // 15.2.4.7.1
- function asyncStartLoadPartwayThrough(stepState) {
- return function(resolve, reject) {
- var loader = stepState.loader;
- var name = stepState.moduleName;
- var step = stepState.step;
-
- if (loader.modules[name])
- throw new TypeError('"' + name + '" already exists in the module table');
-
- // adjusted to pick up existing loads
- var existingLoad;
- for (var i = 0, l = loader.loads.length; i < l; i++) {
- if (loader.loads[i].name == name) {
- existingLoad = loader.loads[i];
-
- if (step == 'translate' && !existingLoad.source) {
- existingLoad.address = stepState.moduleAddress;
- proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));
- }
-
- // a primary load -> use that existing linkset if it is for the direct load here
- // otherwise create a new linkset unit
- if (existingLoad.linkSets.length && existingLoad.linkSets[0].loads[0].name == existingLoad.name)
- return existingLoad.linkSets[0].done.then(function() {
- resolve(existingLoad);
- });
- }
- }
-
- var load = existingLoad || createLoad(name);
-
- load.metadata = stepState.moduleMetadata;
-
- var linkSet = createLinkSet(loader, load);
-
- loader.loads.push(load);
-
- resolve(linkSet.done);
-
- if (step == 'locate')
- proceedToLocate(loader, load);
-
- else if (step == 'fetch')
- proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));
-
- else {
- console.assert(step == 'translate', 'translate step');
- load.address = stepState.moduleAddress;
- proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));
- }
- }
- }
-
- // Declarative linking functions run through alternative implementation:
- // 15.2.5.1.1 CreateModuleLinkageRecord not implemented
- // 15.2.5.1.2 LookupExport not implemented
- // 15.2.5.1.3 LookupModuleDependency not implemented
-
- // 15.2.5.2.1
- function createLinkSet(loader, startingLoad) {
- var linkSet = {
- loader: loader,
- loads: [],
- startingLoad: startingLoad, // added see spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
- loadingCount: 0
- };
- linkSet.done = new Promise(function(resolve, reject) {
- linkSet.resolve = resolve;
- linkSet.reject = reject;
- });
- addLoadToLinkSet(linkSet, startingLoad);
- return linkSet;
- }
- // 15.2.5.2.2
- function addLoadToLinkSet(linkSet, load) {
- if (load.status == 'failed')
- return;
-
- for (var i = 0, l = linkSet.loads.length; i < l; i++)
- if (linkSet.loads[i] == load)
- return;
-
- linkSet.loads.push(load);
- load.linkSets.push(linkSet);
-
- // adjustment, see https://bugs.ecmascript.org/show_bug.cgi?id=2603
- if (load.status != 'loaded') {
- linkSet.loadingCount++;
- }
-
- var loader = linkSet.loader;
-
- for (var i = 0, l = load.dependencies.length; i < l; i++) {
- if (!load.dependencies[i])
- continue;
-
- var name = load.dependencies[i].value;
-
- if (loader.modules[name])
- continue;
-
- for (var j = 0, d = loader.loads.length; j < d; j++) {
- if (loader.loads[j].name != name)
- continue;
-
- addLoadToLinkSet(linkSet, loader.loads[j]);
- break;
- }
- }
- // console.log('add to linkset ' + load.name);
- // snapshot(linkSet.loader);
- }
-
- // linking errors can be generic or load-specific
- // this is necessary for debugging info
- function doLink(linkSet) {
- var error = false;
- try {
- link(linkSet, function(load, exc) {
- linkSetFailed(linkSet, load, exc);
- error = true;
- });
- }
- catch(e) {
- linkSetFailed(linkSet, null, e);
- error = true;
- }
- return error;
- }
-
- // 15.2.5.2.3
- function updateLinkSetOnLoad(linkSet, load) {
- // console.log('update linkset on load ' + load.name);
- // snapshot(linkSet.loader);
-
- console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
-
- linkSet.loadingCount--;
-
- if (linkSet.loadingCount > 0)
- return;
-
- // adjusted for spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
- var startingLoad = linkSet.startingLoad;
-
- // non-executing link variation for loader tracing
- // on the server. Not in spec.
- /***/
- if (linkSet.loader.loaderObj.execute === false) {
- var loads = [].concat(linkSet.loads);
- for (var i = 0, l = loads.length; i < l; i++) {
- var load = loads[i];
- load.module = {
- name: load.name,
- module: _newModule({}),
- evaluated: true
- };
- load.status = 'linked';
- finishLoad(linkSet.loader, load);
- }
- return linkSet.resolve(startingLoad);
- }
- /***/
-
- var abrupt = doLink(linkSet);
-
- if (abrupt)
- return;
-
- console.assert(linkSet.loads.length == 0, 'loads cleared');
-
- linkSet.resolve(startingLoad);
- }
-
- // 15.2.5.2.4
- function linkSetFailed(linkSet, load, exc) {
- var loader = linkSet.loader;
- var requests;
-
- checkError:
- if (load) {
- if (linkSet.loads[0].name == load.name) {
- exc = addToError(exc, 'Error loading ' + load.name);
- }
- else {
- for (var i = 0; i < linkSet.loads.length; i++) {
- var pLoad = linkSet.loads[i];
- for (var j = 0; j < pLoad.dependencies.length; j++) {
- var dep = pLoad.dependencies[j];
- if (dep.value == load.name) {
- exc = addToError(exc, 'Error loading ' + load.name + ' as "' + dep.key + '" from ' + pLoad.name);
- break checkError;
- }
- }
- }
- exc = addToError(exc, 'Error loading ' + load.name + ' from ' + linkSet.loads[0].name);
- }
- }
- else {
- exc = addToError(exc, 'Error linking ' + linkSet.loads[0].name);
- }
-
-
- var loads = linkSet.loads.concat([]);
- for (var i = 0, l = loads.length; i < l; i++) {
- var load = loads[i];
-
- // store all failed load records
- loader.loaderObj.failed = loader.loaderObj.failed || [];
- if (indexOf.call(loader.loaderObj.failed, load) == -1)
- loader.loaderObj.failed.push(load);
-
- var linkIndex = indexOf.call(load.linkSets, linkSet);
- console.assert(linkIndex != -1, 'link not present');
- load.linkSets.splice(linkIndex, 1);
- if (load.linkSets.length == 0) {
- var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
- if (globalLoadsIndex != -1)
- linkSet.loader.loads.splice(globalLoadsIndex, 1);
- }
- }
- linkSet.reject(exc);
- }
-
- // 15.2.5.2.5
- function finishLoad(loader, load) {
- // add to global trace if tracing
- if (loader.loaderObj.trace) {
- if (!loader.loaderObj.loads)
- loader.loaderObj.loads = {};
- var depMap = {};
- load.dependencies.forEach(function(dep) {
- depMap[dep.key] = dep.value;
- });
- loader.loaderObj.loads[load.name] = {
- name: load.name,
- deps: load.dependencies.map(function(dep){ return dep.key }),
- depMap: depMap,
- address: load.address,
- metadata: load.metadata,
- source: load.source
- };
- }
- // if not anonymous, add to the module table
- if (load.name) {
- console.assert(!loader.modules[load.name] || loader.modules[load.name].module === load.module.module, 'load not in module table');
- loader.modules[load.name] = load.module;
- }
- var loadIndex = indexOf.call(loader.loads, load);
- if (loadIndex != -1)
- loader.loads.splice(loadIndex, 1);
- for (var i = 0, l = load.linkSets.length; i < l; i++) {
- loadIndex = indexOf.call(load.linkSets[i].loads, load);
- if (loadIndex != -1)
- load.linkSets[i].loads.splice(loadIndex, 1);
- }
- load.linkSets.splice(0, load.linkSets.length);
- }
-
- function doDynamicExecute(linkSet, load, linkError) {
- try {
- var module = load.execute();
- }
- catch(e) {
- linkError(load, e);
- return;
- }
- if (!module || !(module instanceof Module))
- linkError(load, new TypeError('Execution must define a Module instance'));
- else
- return module;
- }
-
- // 26.3 Loader
-
- // 26.3.1.1
- // defined at top
-
- // importPromises adds ability to import a module twice without error - https://bugs.ecmascript.org/show_bug.cgi?id=2601
- function createImportPromise(loader, name, promise) {
- var importPromises = loader._loader.importPromises;
- return importPromises[name] = promise.then(function(m) {
- importPromises[name] = undefined;
- return m;
- }, function(e) {
- importPromises[name] = undefined;
- throw e;
- });
- }
-
- Loader.prototype = {
- // 26.3.3.1
- constructor: Loader,
- // 26.3.3.2
- define: function(name, source, options) {
- // check if already defined
- if (this._loader.importPromises[name])
- throw new TypeError('Module is already loading.');
- return createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
- step: 'translate',
- loader: this._loader,
- moduleName: name,
- moduleMetadata: options && options.metadata || {},
- moduleSource: source,
- moduleAddress: options && options.address
- })));
- },
- // 26.3.3.3
- 'delete': function(name) {
- var loader = this._loader;
- delete loader.importPromises[name];
- delete loader.moduleRecords[name];
- return loader.modules[name] ? delete loader.modules[name] : false;
- },
- // 26.3.3.4 entries not implemented
- // 26.3.3.5
- get: function(key) {
- if (!this._loader.modules[key])
- return;
- return this._loader.modules[key].module;
- },
- // 26.3.3.7
- has: function(name) {
- return !!this._loader.modules[name];
- },
- // 26.3.3.8
- 'import': function(name, parentName, parentAddress) {
- if (typeof parentName == 'object')
- parentName = parentName.name;
-
- // run normalize first
- var loaderObj = this;
-
- // added, see https://bugs.ecmascript.org/show_bug.cgi?id=2659
- return Promise.resolve(loaderObj.normalize(name, parentName))
- .then(function(name) {
- var loader = loaderObj._loader;
-
- if (loader.modules[name])
- return loader.modules[name].module;
-
- return loader.importPromises[name] || createImportPromise(loaderObj, name,
- loadModule(loader, name, {})
- .then(function(load) {
- delete loader.importPromises[name];
- return load.module.module;
- }));
- });
- },
- // 26.3.3.9 keys not implemented
- // 26.3.3.10
- load: function(name) {
- var loader = this._loader;
- if (loader.modules[name])
- return Promise.resolve();
- return loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
- step: 'locate',
- loader: loader,
- moduleName: name,
- moduleMetadata: {},
- moduleSource: undefined,
- moduleAddress: undefined
- }))
- .then(function() {
- delete loader.importPromises[name];
- }));
- },
- // 26.3.3.11
- module: function(source, options) {
- var load = createLoad();
- load.address = options && options.address;
- var linkSet = createLinkSet(this._loader, load);
- var sourcePromise = Promise.resolve(source);
- var loader = this._loader;
- var p = linkSet.done.then(function() {
- return load.module.module;
- });
- proceedToTranslate(loader, load, sourcePromise);
- return p;
- },
- // 26.3.3.12
- newModule: function (obj) {
- if (typeof obj != 'object')
- throw new TypeError('Expected object');
-
- var m = new Module();
-
- var pNames = [];
- if (Object.getOwnPropertyNames && obj != null)
- pNames = Object.getOwnPropertyNames(obj);
- else
- for (var key in obj)
- pNames.push(key);
-
- for (var i = 0; i < pNames.length; i++) (function(key) {
- defineProperty(m, key, {
- configurable: false,
- enumerable: true,
- get: function () {
- return obj[key];
- },
- set: function() {
- throw new Error('Module exports cannot be changed externally.');
- }
- });
- })(pNames[i]);
-
- if (Object.freeze)
- Object.freeze(m);
-
- return m;
- },
- // 26.3.3.14
- set: function(name, module) {
- if (!(module instanceof Module))
- throw new TypeError('Loader.set(' + name + ', module) must be a module');
- this._loader.modules[name] = {
- module: module
- };
- },
- // 26.3.3.15 values not implemented
- // 26.3.3.16 @@iterator not implemented
- // 26.3.3.17 @@toStringTag not implemented
-
- // 26.3.3.18.1
- normalize: function(name, referrerName, referrerAddress) {},
- // 26.3.3.18.2
- locate: function(load) {
- return load.name;
- },
- // 26.3.3.18.3
- fetch: function(load) {
- },
- // 26.3.3.18.4
- translate: function(load) {
- return load.source;
- },
- // 26.3.3.18.5
- instantiate: function(load) {
- }
- };
-
- var _newModule = Loader.prototype.newModule;
-
-/*
- * ES6 Module Declarative Linking Code
- */
- function link(linkSet, linkError) {
-
- var loader = linkSet.loader;
-
- if (!linkSet.loads.length)
- return;
-
- var loads = linkSet.loads.concat([]);
-
- for (var i = 0; i < loads.length; i++) {
- var load = loads[i];
-
- var module = doDynamicExecute(linkSet, load, linkError);
- if (!module)
- return;
- load.module = {
- name: load.name,
- module: module
- };
- load.status = 'linked';
-
- finishLoad(loader, load);
- }
- }
-
-})();
-
-var System;
-
diff --git a/thirdparty/systemjs/lib/meta.js b/thirdparty/systemjs/lib/meta.js
deleted file mode 100644
index 24e8b38ce..000000000
--- a/thirdparty/systemjs/lib/meta.js
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Meta Extension
- *
- * Sets default metadata on a load record (load.metadata) from
- * loader.metadata via SystemJS.meta function.
- *
- *
- * Also provides an inline meta syntax for module meta in source.
- *
- * Eg:
- *
- * loader.meta({
- * 'my/module': { deps: ['jquery'] }
- * 'my/*': { format: 'amd' }
- * });
- *
- * Which in turn populates loader.metadata.
- *
- * load.metadata.deps and load.metadata.format will then be set
- * for 'my/module'
- *
- * The same meta could be set with a my/module.js file containing:
- *
- * my/module.js
- * "format amd";
- * "deps[] jquery";
- * "globals.some value"
- * console.log('this is my/module');
- *
- * Configuration meta always takes preference to inline meta.
- *
- * Multiple matches in wildcards are supported and ammend the meta.
- *
- *
- * The benefits of the function form is that paths are URL-normalized
- * supporting say
- *
- * loader.meta({ './app': { format: 'cjs' } });
- *
- * Instead of needing to set against the absolute URL (https://site.com/app.js)
- *
- */
-
-(function() {
-
- hookConstructor(function(constructor) {
- return function() {
- this.meta = {};
- constructor.call(this);
- };
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var meta = this.meta;
- var name = load.name;
-
- // NB for perf, maybe introduce a fast-path wildcard lookup cache here
- // which is checked first
-
- // apply wildcard metas
- var bestDepth = 0;
- var wildcardIndex;
- for (var module in meta) {
- wildcardIndex = module.indexOf('*');
- if (wildcardIndex === -1)
- continue;
- if (module.substr(0, wildcardIndex) === name.substr(0, wildcardIndex)
- && module.substr(wildcardIndex + 1) === name.substr(name.length - module.length + wildcardIndex + 1)) {
- var depth = module.split('/').length;
- if (depth > bestDepth)
- bestDepth = depth;
- extendMeta(load.metadata, meta[module], bestDepth != depth);
- }
- }
-
- // apply exact meta
- if (meta[name])
- extendMeta(load.metadata, meta[name]);
-
- return locate.call(this, load);
- };
- });
-
- // detect any meta header syntax
- // only set if not already set
- var metaRegEx = /^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/;
- var metaPartRegEx = /\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;
-
- function setMetaProperty(target, p, value) {
- var pParts = p.split('.');
- var curPart;
- while (pParts.length > 1) {
- curPart = pParts.shift();
- target = target[curPart] = target[curPart] || {};
- }
- curPart = pParts.shift();
- if (!(curPart in target))
- target[curPart] = value;
- }
-
- hook('translate', function(translate) {
- return function(load) {
- // shortpath for bundled
- if (load.metadata.format == 'defined') {
- load.metadata.deps = load.metadata.deps || [];
- return Promise.resolve(load.source);
- }
-
- // NB meta will be post-translate pending transpiler conversion to plugins
- var meta = load.source.match(metaRegEx);
- if (meta) {
- var metaParts = meta[0].match(metaPartRegEx);
-
- for (var i = 0; i < metaParts.length; i++) {
- var curPart = metaParts[i];
- var len = curPart.length;
-
- var firstChar = curPart.substr(0, 1);
- if (curPart.substr(len - 1, 1) == ';')
- len--;
-
- if (firstChar != '"' && firstChar != "'")
- continue;
-
- var metaString = curPart.substr(1, curPart.length - 3);
- var metaName = metaString.substr(0, metaString.indexOf(' '));
-
- if (metaName) {
- var metaValue = metaString.substr(metaName.length + 1, metaString.length - metaName.length - 1);
-
- if (metaName.substr(metaName.length - 2, 2) == '[]') {
- metaName = metaName.substr(0, metaName.length - 2);
- load.metadata[metaName] = load.metadata[metaName] || [];
- load.metadata[metaName].push(metaValue);
- }
- else if (load.metadata[metaName] instanceof Array) {
- // temporary backwards compat for previous "deps" syntax
- warn.call(this, 'Module ' + load.name + ' contains deprecated "deps ' + metaValue + '" meta syntax.\nThis should be updated to "deps[] ' + metaValue + '" for pushing to array meta.');
- load.metadata[metaName].push(metaValue);
- }
- else {
- setMetaProperty(load.metadata, metaName, metaValue);
- }
- }
- else {
- load.metadata[metaString] = true;
- }
- }
- }
-
- return translate.apply(this, arguments);
- };
- });
-})();
diff --git a/thirdparty/systemjs/lib/package.js b/thirdparty/systemjs/lib/package.js
deleted file mode 100644
index cdd3815e9..000000000
--- a/thirdparty/systemjs/lib/package.js
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
- * Package Configuration Extension
- *
- * Example:
- *
- * SystemJS.packages = {
- * jquery: {
- * main: 'index.js', // when not set, package name is requested directly
- * format: 'amd',
- * defaultExtension: 'ts', // defaults to 'js', can be set to false
- * modules: {
- * '*.ts': {
- * loader: 'typescript'
- * },
- * 'vendor/sizzle.js': {
- * format: 'global'
- * }
- * },
- * map: {
- * // map internal require('sizzle') to local require('./vendor/sizzle')
- * sizzle: './vendor/sizzle.js',
- * // map any internal or external require of 'jquery/vendor/another' to 'another/index.js'
- * './vendor/another.js': './another/index.js',
- * // test.js / test -> lib/test.js
- * './test.js': './lib/test.js',
- *
- * // environment-specific map configurations
- * './index.js': {
- * '~browser': './index-node.js',
- * './custom-condition.js|~export': './index-custom.js'
- * }
- * },
- * // allows for setting package-prefixed depCache
- * // keys are normalized module names relative to the package itself
- * depCache: {
- * // import 'package/index.js' loads in parallel package/lib/test.js,package/vendor/sizzle.js
- * './index.js': ['./test'],
- * './test.js': ['external-dep'],
- * 'external-dep/path.js': ['./another.js']
- * }
- * }
- * };
- *
- * Then:
- * import 'jquery' -> jquery/index.js
- * import 'jquery/submodule' -> jquery/submodule.js
- * import 'jquery/submodule.ts' -> jquery/submodule.ts loaded as typescript
- * import 'jquery/vendor/another' -> another/index.js
- *
- * Detailed Behaviours
- * - main can have a leading "./" can be added optionally
- * - map and defaultExtension are applied to the main
- * - defaultExtension adds the extension only if the exact extension is not present
- * - defaultJSExtensions applies after map when defaultExtension is not set
- * - if a meta value is available for a module, map and defaultExtension are skipped
- * - like global map, package map also applies to subpaths (sizzle/x, ./vendor/another/sub)
- * - condition module map is '@env' module in package or '@system-env' globally
- * - map targets support conditional interpolation ('./x': './x.#{|env}.js')
- * - internal package map targets cannot use boolean conditionals
- *
- * Package Configuration Loading
- *
- * Not all packages may already have their configuration present in the System config
- * For these cases, a list of packageConfigPaths can be provided, which when matched against
- * a request, will first request a ".json" file by the package name to derive the package
- * configuration from. This allows dynamic loading of non-predetermined code, a key use
- * case in SystemJS.
- *
- * Example:
- *
- * SystemJS.packageConfigPaths = ['packages/test/package.json', 'packages/*.json'];
- *
- * // will first request 'packages/new-package/package.json' for the package config
- * // before completing the package request to 'packages/new-package/path'
- * SystemJS.import('packages/new-package/path');
- *
- * // will first request 'packages/test/package.json' before the main
- * SystemJS.import('packages/test');
- *
- * When a package matches packageConfigPaths, it will always send a config request for
- * the package configuration.
- * The package name itself is taken to be the match up to and including the last wildcard
- * or trailing slash.
- * The most specific package config path will be used.
- * Any existing package configurations for the package will deeply merge with the
- * package config, with the existing package configurations taking preference.
- * To opt-out of the package configuration request for a package that matches
- * packageConfigPaths, use the { configured: true } package config option.
- *
- */
-(function() {
-
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
- this.packages = {};
- this.packageConfigPaths = [];
- };
- });
-
- function getPackage(loader, normalized) {
- // use most specific package
- var curPkg, curPkgLen = 0, pkgLen;
- for (var p in loader.packages) {
- if (normalized.substr(0, p.length) === p && (normalized.length === p.length || normalized[p.length] === '/')) {
- pkgLen = p.split('/').length;
- if (pkgLen > curPkgLen) {
- curPkg = p;
- curPkgLen = pkgLen;
- }
- }
- }
- return curPkg;
- }
-
- function addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions) {
- // don't apply extensions to folders or if defaultExtension = false
- if (!subPath || subPath[subPath.length - 1] == '/' || skipExtensions || pkg.defaultExtension === false)
- return subPath;
-
- var metaMatch = false;
-
- // exact meta or meta with any content after the last wildcard skips extension
- if (pkg.meta)
- getMetaMatches(pkg.meta, subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1)
- return metaMatch = true;
- });
-
- // exact global meta or meta with any content after the last wildcard skips extension
- if (!metaMatch && loader.meta)
- getMetaMatches(loader.meta, pkgName + '/' + subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1)
- return metaMatch = true;
- });
-
- if (metaMatch)
- return subPath;
-
- // work out what the defaultExtension is and add if not there already
- // NB reconsider if default should really be ".js"?
- var defaultExtension = '.' + (pkg.defaultExtension || 'js');
- if (subPath.substr(subPath.length - defaultExtension.length) != defaultExtension)
- return subPath + defaultExtension;
- else
- return subPath;
- }
-
- function applyPackageConfigSync(loader, pkg, pkgName, subPath, skipExtensions) {
- // main
- if (!subPath) {
- if (pkg.main)
- subPath = pkg.main.substr(0, 2) == './' ? pkg.main.substr(2) : pkg.main;
- // also no submap if name is package itself (import 'pkg' -> 'path/to/pkg.js')
- else
- // NB can add a default package main convention here when defaultJSExtensions is deprecated
- // if it becomes internal to the package then it would no longer be an exit path
- return pkgName + (loader.defaultJSExtensions ? '.js' : '');
- }
-
- // map config checking without then with extensions
- if (pkg.map) {
- var mapPath = './' + subPath;
-
- var mapMatch = getMapMatch(pkg.map, mapPath);
-
- // we then check map with the default extension adding
- if (!mapMatch) {
- mapPath = './' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- if (mapPath != './' + subPath)
- mapMatch = getMapMatch(pkg.map, mapPath);
- }
- if (mapMatch) {
- var mapped = doMapSync(loader, pkg, pkgName, mapMatch, mapPath, skipExtensions);
- if (mapped)
- return mapped;
- }
- }
-
- // normal package resolution
- return pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- }
-
- function validMapping(mapMatch, mapped, pkgName, path) {
- // disallow internal to subpath maps
- if (mapMatch == '.')
- throw new Error('Package ' + pkgName + ' has a map entry for "." which is not permitted.');
-
- // allow internal ./x -> ./x/y or ./x/ -> ./x/y recursive maps
- // but only if the path is exactly ./x and not ./x/z
- if (mapped.substr(0, mapMatch.length) == mapMatch && path.length > mapMatch.length)
- return false;
-
- return true;
- }
-
- function doMapSync(loader, pkg, pkgName, mapMatch, path, skipExtensions) {
- if (path[path.length - 1] == '/')
- path = path.substr(0, path.length - 1);
- var mapped = pkg.map[mapMatch];
-
- if (typeof mapped == 'object')
- throw new Error('Synchronous conditional normalization not supported sync normalizing ' + mapMatch + ' in ' + pkgName);
-
- if (!validMapping(mapMatch, mapped, pkgName, path) || typeof mapped != 'string')
- return;
-
- // package map to main / base-level
- if (mapped == '.')
- mapped = pkgName;
-
- // internal package map
- else if (mapped.substr(0, 2) == './')
- return pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, mapped.substr(2) + path.substr(mapMatch.length), skipExtensions);
-
- // external map reference
- return loader.normalizeSync(mapped + path.substr(mapMatch.length), pkgName + '/');
- }
-
- function applyPackageConfig(loader, pkg, pkgName, subPath, skipExtensions) {
- // main
- if (!subPath) {
- if (pkg.main)
- subPath = pkg.main.substr(0, 2) == './' ? pkg.main.substr(2) : pkg.main;
- // also no submap if name is package itself (import 'pkg' -> 'path/to/pkg.js')
- else
- // NB can add a default package main convention here when defaultJSExtensions is deprecated
- // if it becomes internal to the package then it would no longer be an exit path
- return Promise.resolve(pkgName + (loader.defaultJSExtensions ? '.js' : ''));
- }
-
- // map config checking without then with extensions
- var mapPath, mapMatch;
-
- if (pkg.map) {
- mapPath = './' + subPath;
- mapMatch = getMapMatch(pkg.map, mapPath);
-
- // we then check map with the default extension adding
- if (!mapMatch) {
- mapPath = './' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions);
- if (mapPath != './' + subPath)
- mapMatch = getMapMatch(pkg.map, mapPath);
- }
- }
-
- return (mapMatch ? doMap(loader, pkg, pkgName, mapMatch, mapPath, skipExtensions) : Promise.resolve())
- .then(function(mapped) {
- if (mapped)
- return Promise.resolve(mapped);
-
- // normal package resolution / fallback resolution for no conditional match
- return Promise.resolve(pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, subPath, skipExtensions));
- });
- }
-
- function doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions) {
- // NB the interpolation cases should strictly skip subsequent interpolation
- // package map to main / base-level
- if (mapped == '.')
- mapped = pkgName;
-
- // internal package map
- else if (mapped.substr(0, 2) == './')
- return Promise.resolve(pkgName + '/' + addDefaultExtension(loader, pkg, pkgName, mapped.substr(2) + path.substr(mapMatch.length), skipExtensions))
- .then(function(name) {
- return interpolateConditional.call(loader, name, pkgName + '/');
- });
-
- // external map reference
- return loader.normalize(mapped + path.substr(mapMatch.length), pkgName + '/');
- }
-
- function doMap(loader, pkg, pkgName, mapMatch, path, skipExtensions) {
- if (path[path.length - 1] == '/')
- path = path.substr(0, path.length - 1);
-
- var mapped = pkg.map[mapMatch];
-
- if (typeof mapped == 'string') {
- if (!validMapping(mapMatch, mapped, pkgName, path))
- return Promise.resolve();
- return doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions);
- }
-
- // we use a special conditional syntax to allow the builder to handle conditional branch points further
- if (loader.builder)
- return Promise.resolve(pkgName + '/#:' + path);
-
- // we load all conditions upfront
- var conditionPromises = [];
- var conditions = [];
- for (var e in mapped) {
- var c = parseCondition(e);
- conditions.push({
- condition: c,
- map: mapped[e]
- });
- conditionPromises.push(loader['import'](c.module, pkgName));
- }
-
- // map object -> conditional map
- return Promise.all(conditionPromises)
- .then(function(conditionValues) {
- // first map condition to match is used
- for (var i = 0; i < conditions.length; i++) {
- var c = conditions[i].condition;
- var value = readMemberExpression(c.prop, conditionValues[i]);
- if (!c.negate && value || c.negate && !value)
- return conditions[i].map;
- }
- })
- .then(function(mapped) {
- if (mapped) {
- if (!validMapping(mapMatch, mapped, pkgName, path))
- return;
- return doStringMap(loader, pkg, pkgName, mapMatch, mapped, path, skipExtensions);
- }
-
- // no environment match -> fallback to original subPath by returning undefined
- });
- }
-
- // normalizeSync = decanonicalize + package resolution
- SystemJSLoader.prototype.normalizeSync = SystemJSLoader.prototype.decanonicalize = SystemJSLoader.prototype.normalize;
-
- // decanonicalize must JUST handle package defaultExtension: false case when defaultJSExtensions is set
- // to be deprecated!
- hook('decanonicalize', function(decanonicalize) {
- return function(name, parentName) {
- if (this.builder)
- return decanonicalize.call(this, name, parentName, true);
-
- var decanonicalized = decanonicalize.call(this, name, parentName, false);
-
- if (!this.defaultJSExtensions)
- return decanonicalized;
-
- var pkgName = getPackage(this, decanonicalized);
-
- var pkg = this.packages[pkgName];
- var defaultExtension = pkg && pkg.defaultExtension;
-
- if (defaultExtension == undefined && pkg && pkg.meta)
- getMetaMatches(pkg.meta, decanonicalized.substr(pkgName), function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1) {
- defaultExtension = false;
- return true;
- }
- });
-
- if ((defaultExtension === false || defaultExtension && defaultExtension != '.js') && name.substr(name.length - 3, 3) != '.js' && decanonicalized.substr(decanonicalized.length - 3, 3) == '.js')
- decanonicalized = decanonicalized.substr(0, decanonicalized.length - 3);
-
- return decanonicalized;
- };
- });
-
- hook('normalizeSync', function(normalizeSync) {
- return function(name, parentName, isPlugin) {
- var loader = this;
- isPlugin = isPlugin === true;
-
- // apply contextual package map first
- // (we assume the parent package config has already been loaded)
- if (parentName)
- var parentPackageName = getPackage(loader, parentName) ||
- loader.defaultJSExtensions && parentName.substr(parentName.length - 3, 3) == '.js' &&
- getPackage(loader, parentName.substr(0, parentName.length - 3));
-
- var parentPackage = parentPackageName && loader.packages[parentPackageName];
-
- // ignore . since internal maps handled by standard package resolution
- if (parentPackage && name[0] != '.') {
- var parentMap = parentPackage.map;
- var parentMapMatch = parentMap && getMapMatch(parentMap, name);
-
- if (parentMapMatch && typeof parentMap[parentMapMatch] == 'string') {
- var mapped = doMapSync(loader, parentPackage, parentPackageName, parentMapMatch, name, isPlugin);
- if (mapped)
- return mapped;
- }
- }
-
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
-
- // apply map, core, paths, contextual package map
- var normalized = normalizeSync.call(loader, name, parentName, false);
-
- // undo defaultJSExtension
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) != '.js')
- defaultJSExtension = false;
- if (defaultJSExtension)
- normalized = normalized.substr(0, normalized.length - 3);
-
- var pkgConfigMatch = getPackageConfigMatch(loader, normalized);
- var pkgName = pkgConfigMatch && pkgConfigMatch.packageName || getPackage(loader, normalized);
-
- if (!pkgName)
- return normalized + (defaultJSExtension ? '.js' : '');
-
- var subPath = normalized.substr(pkgName.length + 1);
-
- return applyPackageConfigSync(loader, loader.packages[pkgName] || {}, pkgName, subPath, isPlugin);
- };
- });
-
- hook('normalize', function(normalize) {
- return function(name, parentName, isPlugin) {
- var loader = this;
- isPlugin = isPlugin === true;
-
- return Promise.resolve()
- .then(function() {
- // apply contextual package map first
- // (we assume the parent package config has already been loaded)
- if (parentName)
- var parentPackageName = getPackage(loader, parentName) ||
- loader.defaultJSExtensions && parentName.substr(parentName.length - 3, 3) == '.js' &&
- getPackage(loader, parentName.substr(0, parentName.length - 3));
-
- var parentPackage = parentPackageName && loader.packages[parentPackageName];
-
- // ignore . since internal maps handled by standard package resolution
- if (parentPackage && name.substr(0, 2) != './') {
- var parentMap = parentPackage.map;
- var parentMapMatch = parentMap && getMapMatch(parentMap, name);
-
- if (parentMapMatch)
- return doMap(loader, parentPackage, parentPackageName, parentMapMatch, name, isPlugin);
- }
-
- return Promise.resolve();
- })
- .then(function(mapped) {
- if (mapped)
- return mapped;
-
- var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
-
- // apply map, core, paths, contextual package map
- var normalized = normalize.call(loader, name, parentName, false);
-
- // undo defaultJSExtension
- if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) != '.js')
- defaultJSExtension = false;
- if (defaultJSExtension)
- normalized = normalized.substr(0, normalized.length - 3);
-
- var pkgConfigMatch = getPackageConfigMatch(loader, normalized);
- var pkgName = pkgConfigMatch && pkgConfigMatch.packageName || getPackage(loader, normalized);
-
- if (!pkgName)
- return Promise.resolve(normalized + (defaultJSExtension ? '.js' : ''));
-
- var pkg = loader.packages[pkgName];
-
- // if package is already configured or not a dynamic config package, use existing package config
- var isConfigured = pkg && (pkg.configured || !pkgConfigMatch);
- return (isConfigured ? Promise.resolve(pkg) : loadPackageConfigPath(loader, pkgName, pkgConfigMatch.configPath))
- .then(function(pkg) {
- var subPath = normalized.substr(pkgName.length + 1);
-
- return applyPackageConfig(loader, pkg, pkgName, subPath, isPlugin);
- });
- });
- };
- });
-
- // check if the given normalized name matches a packageConfigPath
- // if so, loads the config
- var packageConfigPaths = {};
-
- // data object for quick checks against package paths
- function createPkgConfigPathObj(path) {
- var lastWildcard = path.lastIndexOf('*');
- var length = Math.max(lastWildcard + 1, path.lastIndexOf('/'));
- return {
- length: length,
- regEx: new RegExp('^(' + path.substr(0, length).replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '[^\\/]+') + ')(\\/|$)'),
- wildcard: lastWildcard != -1
- };
- }
-
- // most specific match wins
- function getPackageConfigMatch(loader, normalized) {
- var pkgName, exactMatch = false, configPath;
- for (var i = 0; i < loader.packageConfigPaths.length; i++) {
- var packageConfigPath = loader.packageConfigPaths[i];
- var p = packageConfigPaths[packageConfigPath] || (packageConfigPaths[packageConfigPath] = createPkgConfigPathObj(packageConfigPath));
- if (normalized.length < p.length)
- continue;
- var match = normalized.match(p.regEx);
- if (match && (!pkgName || (!(exactMatch && p.wildcard) && pkgName.length < match[1].length))) {
- pkgName = match[1];
- exactMatch = !p.wildcard;
- configPath = pkgName + packageConfigPath.substr(p.length);
- }
- }
-
- if (!pkgName)
- return;
-
- return {
- packageName: pkgName,
- configPath: configPath
- };
- }
-
- function loadPackageConfigPath(loader, pkgName, pkgConfigPath) {
- var configLoader = loader.pluginLoader || loader;
-
- // NB remove this when json is default
- (configLoader.meta[pkgConfigPath] = configLoader.meta[pkgConfigPath] || {}).format = 'json';
- configLoader.meta[pkgConfigPath].loader = null;
-
- return configLoader.load(pkgConfigPath)
- .then(function() {
- var cfg = configLoader.get(pkgConfigPath)['default'];
-
- // support "systemjs" prefixing
- if (cfg.systemjs)
- cfg = cfg.systemjs;
-
- // modules backwards compatibility
- if (cfg.modules) {
- cfg.meta = cfg.modules;
- warn.call(loader, 'Package config file ' + pkgConfigPath + ' is configured with "modules", which is deprecated as it has been renamed to "meta".');
- }
-
- return setPkgConfig(loader, pkgName, cfg, true);
- });
- }
-
- function getMetaMatches(pkgMeta, subPath, matchFn) {
- // wildcard meta
- var meta = {};
- var wildcardIndex;
- for (var module in pkgMeta) {
- // allow meta to start with ./ for flexibility
- var dotRel = module.substr(0, 2) == './' ? './' : '';
- if (dotRel)
- module = module.substr(2);
-
- wildcardIndex = module.indexOf('*');
- if (wildcardIndex === -1)
- continue;
-
- if (module.substr(0, wildcardIndex) == subPath.substr(0, wildcardIndex)
- && module.substr(wildcardIndex + 1) == subPath.substr(subPath.length - module.length + wildcardIndex + 1)) {
- // alow match function to return true for an exit path
- if (matchFn(module, pkgMeta[dotRel + module], module.split('/').length))
- return;
- }
- }
- // exact meta
- var exactMeta = pkgMeta[subPath] && pkgMeta.hasOwnProperty && pkgMeta.hasOwnProperty(subPath) ? pkgMeta[subPath] : pkgMeta['./' + subPath];
- if (exactMeta)
- matchFn(exactMeta, exactMeta, 0);
- }
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
- return Promise.resolve(locate.call(this, load))
- .then(function(address) {
- var pkgName = getPackage(loader, load.name);
- if (pkgName) {
- var pkg = loader.packages[pkgName];
- var subPath = load.name.substr(pkgName.length + 1);
-
- var meta = {};
- if (pkg.meta) {
- var bestDepth = 0;
-
- // NB support a main shorthand in meta here?
- getMetaMatches(pkg.meta, subPath, function(metaPattern, matchMeta, matchDepth) {
- if (matchDepth > bestDepth)
- bestDepth = matchDepth;
- extendMeta(meta, matchMeta, matchDepth && bestDepth > matchDepth);
- });
-
- extendMeta(load.metadata, meta);
- }
-
- // format
- if (pkg.format && !load.metadata.loader)
- load.metadata.format = load.metadata.format || pkg.format;
- }
-
- return address;
- });
- };
- });
-
-})();
diff --git a/thirdparty/systemjs/lib/paths.js b/thirdparty/systemjs/lib/paths.js
deleted file mode 100644
index 5208fe457..000000000
--- a/thirdparty/systemjs/lib/paths.js
+++ /dev/null
@@ -1,42 +0,0 @@
-function applyPaths(paths, name) {
- // most specific (most number of slashes in path) match wins
- var pathMatch = '', wildcard, maxWildcardPrefixLen = 0;
-
- // check to see if we have a paths entry
- for (var p in paths) {
- if (paths.hasOwnProperty && !paths.hasOwnProperty(p))
- continue;
-
- // exact path match
- if (p.indexOf('*') === -1) {
- if (name == p)
- return paths[p];
-
- // support trailing / in paths rules
- else if (name.substr(0, p.length - 1) == p.substr(0, p.length - 1) && (name.length < p.length || name[p.length - 1] == p[p.length - 1]) && (paths[p][paths[p].length - 1] == '/' || paths[p] == '')) {
- return paths[p].substr(0, paths[p].length - 1) + (name.length > p.length ? (paths[p] && '/' || '') + name.substr(p.length) : '');
- }
- }
- // wildcard path match
- else {
- var pathParts = p.split('*');
- if (pathParts.length > 2)
- throw new TypeError('Only one wildcard in a path is permitted');
-
- var wildcardPrefixLen = pathParts[0].length;
- if (wildcardPrefixLen >= maxWildcardPrefixLen &&
- name.substr(0, pathParts[0].length) == pathParts[0] &&
- name.substr(name.length - pathParts[1].length) == pathParts[1]) {
- maxWildcardPrefixLen = wildcardPrefixLen;
- pathMatch = p;
- wildcard = name.substr(pathParts[0].length, name.length - pathParts[1].length - pathParts[0].length);
- }
- }
- }
-
- var outPath = paths[pathMatch];
- if (typeof wildcard == 'string')
- outPath = outPath.replace('*', wildcard);
-
- return outPath;
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/perf.js b/thirdparty/systemjs/lib/perf.js
deleted file mode 100644
index 9f0a02fbc..000000000
--- a/thirdparty/systemjs/lib/perf.js
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * SystemJS performance measurement addon
- *
- */
-(function() {
-function perfEvent(eventName, eventItem) {
- var evt = new ProfileEvent(eventName, eventItem);
- events.push(evt);
- return evt;
-};
-
-// we extend the hook function itself to create performance instrumentation per extension
-var curHook = hook;
-
-var resolverHooks = ['import', 'normalizeSync', 'decanonicalize', 'normalize'];
-var pipelineHooks = ['locate', 'fetch', 'translate', 'instantiate'];
-hook = function(name, newHook) {
- // hook information
- var resolver = resolverHooks.indexOf(name) != -1;
- var pipeline = pipelineHooks.indexOf(name) != -1;
- var hookEvtName = name + ':' + newHook.toString().substr(0, 200);
-
- curHook(name, function(prevHook) {
- return function() {
- // this is called when the hook runs
- var hookItem = resolver ? arguments[0] + ' : ' + arguments[1] + ' : ' + !!arguments[2] : arguments[0] && arguments[0].name;
- var evt = perfEvent(hookEvtName, hookItem);
-
- // ignore time spent in the old hook
- var fn = newHook(function() {
- evt.pause();
- var output = prevHook.apply(this, arguments);
-
- if (output && output.toString && output.toString() == '[object Promise]') {
- return Promise.resolve(output)
- .then(function(output) {
- evt.resume();
- return output;
- })
- .catch(function(err) {
- evt.resume()
- throw err;
- });
- }
- else {
- evt.resume();
- return output;
- }
- });
-
- var output;
- try {
- output = fn.apply(this, arguments);
- }
- catch(e) {
- evt.cancel();
- throw e;
- }
-
- if (output && output.toString && output.toString() == '[object Promise]') {
- return Promise.resolve(output)
- .then(function(output) {
- evt.done();
- return output;
- })
- .catch(function(err) {
- evt.cancel();
- throw err;
- });
- }
- else {
- evt.done();
- return output;
- }
- };
- });
-};
-
-// profiling events
-var events = [];
-
-var perf = typeof performance != 'undefined' : performance : Date;
-
-// Performance Event class
-function ProfileEvent(name, item) {
- this.name = name;
- this.item = (typeof item == 'function' ? item() : item) || 'default';
- this.start = perf.now();
- this.stop = null;
- this.pauseTime = null;
- this.cancelled = false;
-}
-ProfileEvent.prototype.rename = function(name, item) {
- this.name = name;
- if (arguments.length > 1)
- this.item = item;
-};
-ProfileEvent.prototype.done = function() {
- if (this.stop)
- throw new TypeError('Event ' + this.name + ' (' + this.item + ') has already completed.');
- this.stop = perf.now();
-};
-ProfileEvent.prototype.cancel = function() {
- this.cancelled = true;
-};
-ProfileEvent.prototype.cancelIfNotDone = function() {
- if (!this.stop)
- this.cancelled = true;
-};
-ProfileEvent.prototype.pause = function() {
- if (this.stop)
- throw new TypeError('Event ' + this.name + ' (' + this.item + ') cannot be paused as it has finished.');
- if (!this.pauseTime)
- this.pauseTime = perf.now();
-};
-ProfileEvent.prototype.resume = function() {
- if (!this.pauseTime)
- throw new TypeError('Event ' + this.name + ' (' + this.item + ') is not already paused.');
- this.start += perf.now() - this.pauseTime;
- this.pauseTime = null;
-};
-
-var logged = false;
-SystemJSLoader.prototype.perfSummary = function(includeEvts) {
- logged = true;
- // create groupings of events by event name to time data
- // filtering out cancelled events
- var groupedEvents = {};
- events.forEach(function(evt) {
- if (includeEvts && !includeEvts(evt))
- return;
- if (evt.cancelled)
- return;
- if (!evt.stop) {
- console.warn('Event ' + evt.name + ' (' + evt.item + ') never completed.');
- return;
- }
-
- var evtTimes = groupedEvents[evt.name] = groupedEvents[evt.name] || [];
- evtTimes.push({
- time: evt.stop - evt.start,
- item: evt.item
- });
- });
-
- Object.keys(groupedEvents).forEach(function(evt) {
- var evtTimes = groupedEvents[evt];
-
- // only one event -> log as a single event
- if (evtTimes.length == 1) {
- console.log(toTitleCase(evt) + (evtTimes[0].item != 'default' ? ' (' + evtTimes[0].item + ')' : ''));
- logStat('Total Time', evtTimes[0].time);
- console.log('');
- return;
- }
-
- // multiple events, give some stats!
- var evtCount = evtTimes.length;
-
- console.log(toTitleCase(evt) + ' (' + evtCount + ' events)');
-
- var totalTime = evtTimes.reduce(function(curSum, evt) {
- return curSum + evt.time;
- }, 0);
- logStat('Cumulative Time', totalTime);
-
- var mean = totalTime / evtCount;
- logStat('Mean', mean);
-
- var stdDev = Math.sqrt(evtTimes.reduce(function(curSum, evt) {
- return curSum + Math.pow(evt.time - mean, 2);
- }, 0) / evtCount);
-
- logStat('Std Deviation', stdDev);
-
- var withoutOutliers = evtTimes.filter(function(evt) {
- return evt.time > mean - stdDev && evt.time < mean + stdDev;
- });
-
- logStat('Avg within 2σ', withoutOutliers.reduce(function(curSum, evt) {
- return curSum + evt.time;
- }, 0) / withoutOutliers.length);
-
- var sorted = evtTimes.sort(function(a, b) {
- return a.time > b.time ? 1 : -1;
- });
-
- var medianIndex = Math.round(evtCount / 2);
- logStat('Median', sorted[medianIndex].time, sorted[medianIndex].evt);
-
- logStat('Max', sorted[evtCount - 1].time, sorted[evtCount - 1].item);
-
- logStat('Min', sorted[0].time, sorted[0].item);
-
- var duplicates = evtTimes.filter(function(evt) {
- return evtTimes.some(function(dup) {
- return dup !== evt && dup.name == evt.name && dup.item == evt.item;
- });
- });
-
- logStat('Duplicate Events', duplicates.length, true);
-
- logStat('Total Duplicated Time', duplicates.reduce(function(duplicateTime, evt) {
- return duplicateTime + evt.time;
- }, 0));
-
- console.log('');
- });
-};
-
-function toTitleCase(title) {
- return title.split('-').map(function(part) {
- return part[0].toUpperCase() + part.substr(1);
- }).join(' ');
-}
-
-var titleLen = 25;
-function logStat(title, value, item, isNum) {
- if (item === true) {
- item = undefined;
- isNum = true;
- }
- var spaces = Array(titleLen - title.length + 1).join(' ');
- var value = isNum ? value : Math.round(value * 100) / 100 + 'ms';
- console.log(' ' + title + spaces + ': ' + value + (item ? ' (' + item + ')' : ''));
-}
-})(); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/plugins.js b/thirdparty/systemjs/lib/plugins.js
deleted file mode 100644
index 33e81824e..000000000
--- a/thirdparty/systemjs/lib/plugins.js
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- SystemJS Loader Plugin Support
-
- Supports plugin loader syntax with "!", or via metadata.loader
-
- The plugin name is loaded as a module itself, and can override standard loader hooks
- for the plugin resource. See the plugin section of the systemjs readme.
-*/
-
-(function() {
- function getParentName(loader, parentName) {
- // if parent is a plugin, normalize against the parent plugin argument only
- if (parentName) {
- var parentPluginIndex;
- if (loader.pluginFirst) {
- if ((parentPluginIndex = parentName.lastIndexOf('!')) != -1)
- return parentName.substr(parentPluginIndex + 1);
- }
- else {
- if ((parentPluginIndex = parentName.indexOf('!')) != -1)
- return parentName.substr(0, parentPluginIndex);
- }
-
- return parentName;
- }
- }
-
- function parsePlugin(loader, name) {
- var argumentName;
- var pluginName;
-
- var pluginIndex = name.lastIndexOf('!');
-
- if (pluginIndex == -1)
- return;
-
- if (loader.pluginFirst) {
- argumentName = name.substr(pluginIndex + 1);
- pluginName = name.substr(0, pluginIndex);
- }
- else {
- argumentName = name.substr(0, pluginIndex);
- pluginName = name.substr(pluginIndex + 1) || argumentName.substr(argumentName.lastIndexOf('.') + 1);
- }
-
- return {
- argument: argumentName,
- plugin: pluginName
- };
- }
-
- // put name back together after parts have been normalized
- function combinePluginParts(loader, argumentName, pluginName, defaultExtension) {
- if (defaultExtension && argumentName.substr(argumentName.length - 3, 3) == '.js')
- argumentName = argumentName.substr(0, argumentName.length - 3);
-
- if (loader.pluginFirst) {
- return pluginName + '!' + argumentName;
- }
- else {
- return argumentName + '!' + pluginName;
- }
- }
-
- // note if normalize will add a default js extension
- // if so, remove for backwards compat
- // this is strange and sucks, but will be deprecated
- function checkDefaultExtension(loader, arg) {
- return loader.defaultJSExtensions && arg.substr(arg.length - 3, 3) != '.js';
- }
-
- function createNormalizeSync(normalizeSync) {
- return function(name, parentName, isPlugin) {
- var loader = this;
-
- var parsed = parsePlugin(loader, name);
- parentName = getParentName(this, parentName);
-
- if (!parsed)
- return normalizeSync.call(this, name, parentName, isPlugin);
-
- // if this is a plugin, normalize the plugin name and the argument
- var argumentName = loader.normalizeSync(parsed.argument, parentName, true);
- var pluginName = loader.normalizeSync(parsed.plugin, parentName, true);
- return combinePluginParts(loader, argumentName, pluginName, checkDefaultExtension(loader, parsed.argument));
- };
- }
-
- hook('decanonicalize', createNormalizeSync);
- hook('normalizeSync', createNormalizeSync);
-
- hook('normalize', function(normalize) {
- return function(name, parentName, isPlugin) {
- var loader = this;
-
- parentName = getParentName(this, parentName);
-
- var parsed = parsePlugin(loader, name);
-
- if (!parsed)
- return normalize.call(loader, name, parentName, isPlugin);
-
- return Promise.all([
- loader.normalize(parsed.argument, parentName, true),
- loader.normalize(parsed.plugin, parentName, false)
- ])
- .then(function(normalized) {
- return combinePluginParts(loader, normalized[0], normalized[1], checkDefaultExtension(loader, parsed.argument));
- });
- }
- });
-
- hook('locate', function(locate) {
- return function(load) {
- var loader = this;
-
- var name = load.name;
-
- // plugin syntax
- var pluginSyntaxIndex;
- if (loader.pluginFirst) {
- if ((pluginSyntaxIndex = name.indexOf('!')) != -1) {
- load.metadata.loader = name.substr(0, pluginSyntaxIndex);
- load.name = name.substr(pluginSyntaxIndex + 1);
- }
- }
- else {
- if ((pluginSyntaxIndex = name.lastIndexOf('!')) != -1) {
- load.metadata.loader = name.substr(pluginSyntaxIndex + 1);
- load.name = name.substr(0, pluginSyntaxIndex);
- }
- }
-
- return locate.call(loader, load)
- .then(function(address) {
- if (pluginSyntaxIndex != -1 || !load.metadata.loader)
- return address;
-
- // normalize plugin relative to parent in locate here when
- // using plugin via loader metadata
- return (loader.pluginLoader || loader).normalize(load.metadata.loader, load.name)
- .then(function(loaderNormalized) {
- load.metadata.loader = loaderNormalized;
- return address;
- });
- })
- .then(function(address) {
- var plugin = load.metadata.loader;
-
- if (!plugin)
- return address;
-
- // don't allow a plugin to load itself
- if (load.name == plugin)
- throw new Error('Plugin ' + plugin + ' cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.');
-
- // only fetch the plugin itself if this name isn't defined
- if (loader.defined && loader.defined[name])
- return address;
-
- var pluginLoader = loader.pluginLoader || loader;
-
- // load the plugin module and run standard locate
- return pluginLoader['import'](plugin)
- .then(function(loaderModule) {
- // store the plugin module itself on the metadata
- load.metadata.loaderModule = loaderModule;
-
- load.address = address;
- if (loaderModule.locate)
- return loaderModule.locate.call(loader, load);
-
- return address;
- });
- });
- };
- });
-
- hook('fetch', function(fetch) {
- return function(load) {
- var loader = this;
- if (load.metadata.loaderModule && load.metadata.loaderModule.fetch && load.metadata.format != 'defined') {
- load.metadata.scriptLoad = false;
- return load.metadata.loaderModule.fetch.call(loader, load, function(load) {
- return fetch.call(loader, load);
- });
- }
- else {
- return fetch.call(loader, load);
- }
- };
- });
-
- hook('translate', function(translate) {
- return function(load) {
- var loader = this;
- var args = arguments;
- if (load.metadata.loaderModule && load.metadata.loaderModule.translate && load.metadata.format != 'defined') {
- return Promise.resolve(load.metadata.loaderModule.translate.apply(loader, args)).then(function(result) {
- var sourceMap = load.metadata.sourceMap;
-
- // sanitize sourceMap if an object not a JSON string
- if (sourceMap) {
- if (typeof sourceMap != 'object')
- throw new Error('load.metadata.sourceMap must be set to an object.');
-
- var originalName = load.address.split('!')[0];
-
- // force set the filename of the original file
- if (!sourceMap.file || sourceMap.file == load.address)
- sourceMap.file = originalName + '!transpiled';
-
- // force set the sources list if only one source
- if (!sourceMap.sources || sourceMap.sources.length <= 1 && (!sourceMap.sources[0] || sourceMap.sources[0] == load.address))
- sourceMap.sources = [originalName];
- }
-
- // if running on file:/// URLs, sourcesContent is necessary
- // load.metadata.sourceMap.sourcesContent = [load.source];
-
- if (typeof result == 'string')
- load.source = result;
- else
- warn.call(this, 'Plugin ' + load.metadata.loader + ' should return the source in translate, instead of setting load.source directly. This support will be deprecated.');
-
- return translate.apply(loader, args);
- });
- }
- else {
- return translate.apply(loader, args);
- }
- };
- });
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- var loader = this;
- var calledInstantiate = false;
-
- if (load.metadata.loaderModule && load.metadata.loaderModule.instantiate && !loader.builder && load.metadata.format != 'defined')
- return Promise.resolve(load.metadata.loaderModule.instantiate.call(loader, load, function(load) {
- if (calledInstantiate)
- throw new Error('Instantiate must only be called once.');
- calledInstantiate = true;
- return instantiate.call(loader, load);
- })).then(function(result) {
- if (calledInstantiate)
- return result;
-
- load.metadata.entry = createEntry();
- load.metadata.entry.execute = function() {
- return result;
- }
- load.metadata.entry.deps = load.metadata.deps;
- load.metadata.format = 'defined';
- return instantiate.call(loader, load);
- });
- else
- return instantiate.call(loader, load);
- };
- });
-
-})(); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/polyfills-bootstrap.js b/thirdparty/systemjs/lib/polyfills-bootstrap.js
deleted file mode 100644
index 27c806b6c..000000000
--- a/thirdparty/systemjs/lib/polyfills-bootstrap.js
+++ /dev/null
@@ -1,2 +0,0 @@
-if (typeof systemJSBootstrap !== 'undefined')
- systemJSBootstrap(); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/proto.js b/thirdparty/systemjs/lib/proto.js
deleted file mode 100644
index 08203cc49..000000000
--- a/thirdparty/systemjs/lib/proto.js
+++ /dev/null
@@ -1,268 +0,0 @@
-// SystemJS Loader Class and Extension helpers
-function SystemJSLoader() {
- Loader.call(this);
-
- this.paths = {};
- this._loader.paths = {};
-
- systemJSConstructor.call(this);
-}
-
-// inline Object.create-style class extension
-function SystemProto() {};
-SystemProto.prototype = Loader.prototype;
-SystemJSLoader.prototype = new SystemProto();
-SystemJSLoader.prototype.constructor = SystemJSLoader;
-
-var systemJSConstructor;
-
-function hook(name, hook) {
- SystemJSLoader.prototype[name] = hook(SystemJSLoader.prototype[name] || function() {});
-}
-function hookConstructor(hook) {
- systemJSConstructor = hook(systemJSConstructor || function() {});
-}
-
-
-var absURLRegEx = /^[^\/]+:\/\//;
-function isAbsolute(name) {
- return name.match(absURLRegEx);
-}
-function isRel(name) {
- return (name[0] == '.' && (!name[1] || name[1] == '/' || name[1] == '.')) || name[0] == '/';
-}
-function isPlain(name) {
- return !isRel(name) && !isAbsolute(name);
-}
-
-var baseURIObj = new URL(baseURI);
-
-function urlResolve(name, parent) {
- // url resolution shortpaths
- if (name[0] == '.') {
- // dot-relative url normalization
- if (name[1] == '/' && name[2] != '.')
- return (parent && parent.substr(0, parent.lastIndexOf('/') + 1) || baseURI) + name.substr(2);
- }
- else if (name[0] != '/' && name.indexOf(':') == -1) {
- // plain parent normalization
- return (parent && parent.substr(0, parent.lastIndexOf('/') + 1) || baseURI) + name;
- }
-
- return new URL(name, parent && parent.replace(/#/g, '%05') || baseURIObj).href.replace(/%05/g, '#');
-}
-
-// NB no specification provided for System.paths, used ideas discussed in https://github.com/jorendorff/js-loaders/issues/25
-function applyPaths(loader, name) {
- // most specific (most number of slashes in path) match wins
- var pathMatch = '', wildcard, maxWildcardPrefixLen = 0;
-
- var paths = loader.paths;
- var pathsCache = loader._loader.paths;
-
- // check to see if we have a paths entry
- for (var p in paths) {
- if (paths.hasOwnProperty && !paths.hasOwnProperty(p))
- continue;
-
- // paths sanitization
- var path = paths[p];
- if (path !== pathsCache[p])
- path = paths[p] = pathsCache[p] = urlResolve(paths[p], isRel(paths[p]) ? baseURI : loader.baseURL);
-
- // exact path match
- if (p.indexOf('*') === -1) {
- if (name == p)
- return paths[p];
-
- // support trailing / in paths rules
- else if (name.substr(0, p.length - 1) == p.substr(0, p.length - 1) && (name.length < p.length || name[p.length - 1] == p[p.length - 1]) && (paths[p][paths[p].length - 1] == '/' || paths[p] == '')) {
- return paths[p].substr(0, paths[p].length - 1) + (name.length > p.length ? (paths[p] && '/' || '') + name.substr(p.length) : '');
- }
- }
- // wildcard path match
- else {
- var pathParts = p.split('*');
- if (pathParts.length > 2)
- throw new TypeError('Only one wildcard in a path is permitted');
-
- var wildcardPrefixLen = pathParts[0].length;
- if (wildcardPrefixLen >= maxWildcardPrefixLen &&
- name.substr(0, pathParts[0].length) == pathParts[0] &&
- name.substr(name.length - pathParts[1].length) == pathParts[1]) {
- maxWildcardPrefixLen = wildcardPrefixLen;
- pathMatch = p;
- wildcard = name.substr(pathParts[0].length, name.length - pathParts[1].length - pathParts[0].length);
- }
- }
- }
-
- var outPath = paths[pathMatch];
- if (typeof wildcard == 'string')
- outPath = outPath.replace('*', wildcard);
-
- return outPath;
-}
-
-function dedupe(deps) {
- var newDeps = [];
- for (var i = 0, l = deps.length; i < l; i++)
- if (indexOf.call(newDeps, deps[i]) == -1)
- newDeps.push(deps[i])
- return newDeps;
-}
-
-function group(deps) {
- var names = [];
- var indices = [];
- for (var i = 0, l = deps.length; i < l; i++) {
- var index = indexOf.call(names, deps[i]);
- if (index === -1) {
- names.push(deps[i]);
- indices.push([i]);
- }
- else {
- indices[index].push(i);
- }
- }
- return { names: names, indices: indices };
-}
-
-var getOwnPropertyDescriptor = true;
-try {
- Object.getOwnPropertyDescriptor({ a: 0 }, 'a');
-}
-catch(e) {
- getOwnPropertyDescriptor = false;
-}
-
-// converts any module.exports object into an object ready for SystemJS.newModule
-function getESModule(exports) {
- var esModule = {};
- // don't trigger getters/setters in environments that support them
- if ((typeof exports == 'object' || typeof exports == 'function') && exports !== __global) {
- if (getOwnPropertyDescriptor) {
- for (var p in exports) {
- // The default property is copied to esModule later on
- if (p === 'default')
- continue;
- defineOrCopyProperty(esModule, exports, p);
- }
- }
- else {
- extend(esModule, exports);
- }
- }
- esModule['default'] = exports;
- defineProperty(esModule, '__useDefault', {
- value: true
- });
- return esModule;
-}
-
-function defineOrCopyProperty(targetObj, sourceObj, propName) {
- try {
- var d;
- if (d = Object.getOwnPropertyDescriptor(sourceObj, propName))
- defineProperty(targetObj, propName, d);
- }
- catch (ex) {
- // Object.getOwnPropertyDescriptor threw an exception, fall back to normal set property
- // we dont need hasOwnProperty here because getOwnPropertyDescriptor would have returned undefined above
- targetObj[propName] = sourceObj[propName];
- return false;
- }
-}
-
-function extend(a, b, prepend) {
- var hasOwnProperty = b && b.hasOwnProperty;
- for (var p in b) {
- if (hasOwnProperty && !b.hasOwnProperty(p))
- continue;
- if (!prepend || !(p in a))
- a[p] = b[p];
- }
- return a;
-}
-
-// meta first-level extends where:
-// array + array appends
-// object + object extends
-// other properties replace
-function extendMeta(a, b, prepend) {
- var hasOwnProperty = b && b.hasOwnProperty;
- for (var p in b) {
- if (hasOwnProperty && !b.hasOwnProperty(p))
- continue;
- var val = b[p];
- if (!(p in a))
- a[p] = val;
- else if (val instanceof Array && a[p] instanceof Array)
- a[p] = [].concat(prepend ? val : a[p]).concat(prepend ? a[p] : val);
- else if (typeof val == 'object' && val !== null && typeof a[p] == 'object')
- a[p] = extend(extend({}, a[p]), val, prepend);
- else if (!prepend)
- a[p] = val;
- }
-}
-
-function extendPkgConfig(pkgCfgA, pkgCfgB, pkgName, loader, warnInvalidProperties) {
- for (var prop in pkgCfgB) {
- if (indexOf.call(['main', 'format', 'defaultExtension', 'basePath'], prop) != -1) {
- pkgCfgA[prop] = pkgCfgB[prop];
- }
- else if (prop == 'map') {
- extend(pkgCfgA.map = pkgCfgA.map || {}, pkgCfgB.map);
- }
- else if (prop == 'meta') {
- extend(pkgCfgA.meta = pkgCfgA.meta || {}, pkgCfgB.meta);
- }
- else if (prop == 'depCache') {
- for (var d in pkgCfgB.depCache) {
- var dNormalized;
-
- if (d.substr(0, 2) == './')
- dNormalized = pkgName + '/' + d.substr(2);
- else
- dNormalized = coreResolve.call(loader, d);
- loader.depCache[dNormalized] = (loader.depCache[dNormalized] || []).concat(pkgCfgB.depCache[d]);
- }
- }
- else if (warnInvalidProperties && indexOf.call(['browserConfig', 'nodeConfig', 'devConfig', 'productionConfig'], prop) == -1 &&
- (!pkgCfgB.hasOwnProperty || pkgCfgB.hasOwnProperty(prop))) {
- warn.call(loader, '"' + prop + '" is not a valid package configuration option in package ' + pkgName);
- }
- }
-}
-
-// deeply-merge (to first level) config with any existing package config
-function setPkgConfig(loader, pkgName, cfg, prependConfig) {
- var pkg;
-
- // first package is config by reference for fast path, cloned after that
- if (!loader.packages[pkgName]) {
- pkg = loader.packages[pkgName] = cfg;
- }
- else {
- var basePkg = loader.packages[pkgName];
- pkg = loader.packages[pkgName] = {};
-
- extendPkgConfig(pkg, prependConfig ? cfg : basePkg, pkgName, loader, prependConfig);
- extendPkgConfig(pkg, prependConfig ? basePkg : cfg, pkgName, loader, !prependConfig);
- }
-
- // main object becomes main map
- if (typeof pkg.main == 'object') {
- pkg.map = pkg.map || {};
- pkg.map['./@main'] = pkg.main;
- pkg.main['default'] = pkg.main['default'] || './';
- pkg.main = '@main';
- }
-
- return pkg;
-}
-
-function warn(msg) {
- if (this.warnings && typeof console != 'undefined' && console.warn)
- console.warn(msg);
-}
diff --git a/thirdparty/systemjs/lib/register.js b/thirdparty/systemjs/lib/register.js
deleted file mode 100644
index 69568c9b9..000000000
--- a/thirdparty/systemjs/lib/register.js
+++ /dev/null
@@ -1,633 +0,0 @@
-/*
- * Instantiate registry extension
- *
- * Supports Traceur System.register 'instantiate' output for loading ES6 as ES5.
- *
- * - Creates the loader.register function
- * - Also supports metadata.format = 'register' in instantiate for anonymous register modules
- * - Also supports metadata.deps, metadata.execute and metadata.executingRequire
- * for handling dynamic modules alongside register-transformed ES6 modules
- *
- *
- * The code here replicates the ES6 linking groups algorithm to ensure that
- * circular ES6 compiled into System.register can work alongside circular AMD
- * and CommonJS, identically to the actual ES6 loader.
- *
- */
-
-
-/*
- * Registry side table entries in loader.defined
- * Registry Entry Contains:
- * - name
- * - deps
- * - declare for declarative modules
- * - execute for dynamic modules, different to declarative execute on module
- * - executingRequire indicates require drives execution for circularity of dynamic modules
- * - declarative optional boolean indicating which of the above
- *
- * Can preload modules directly on SystemJS.defined['my/module'] = { deps, execute, executingRequire }
- *
- * Then the entry gets populated with derived information during processing:
- * - normalizedDeps derived from deps, created in instantiate
- * - groupIndex used by group linking algorithm
- * - evaluated indicating whether evaluation has happend
- * - module the module record object, containing:
- * - exports actual module exports
- *
- * For dynamic we track the es module with:
- * - esModule actual es module value
- * - esmExports whether to extend the esModule with named exports
- *
- * Then for declarative only we track dynamic bindings with the 'module' records:
- * - name
- * - exports
- * - setters declarative setter functions
- * - dependencies, module records of dependencies
- * - importers, module records of dependents
- *
- * After linked and evaluated, entries are removed, declarative module records remain in separate
- * module binding table
- *
- */
-
-var leadingCommentAndMetaRegEx = /^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;
-function detectRegisterFormat(source) {
- var leadingCommentAndMeta = source.match(leadingCommentAndMetaRegEx);
- return leadingCommentAndMeta && source.substr(leadingCommentAndMeta[0].length, 15) == 'System.register';
-}
-
-function createEntry() {
- return {
- name: null,
- deps: null,
- originalIndices: null,
- declare: null,
- execute: null,
- executingRequire: false,
- declarative: false,
- normalizedDeps: null,
- groupIndex: null,
- evaluated: false,
- module: null,
- esModule: null,
- esmExports: false
- };
-}
-
-(function() {
-
- /*
- * There are two variations of System.register:
- * 1. System.register for ES6 conversion (2-3 params) - System.register([name, ]deps, declare)
- * see https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
- *
- * 2. System.registerDynamic for dynamic modules (3-4 params) - System.registerDynamic([name, ]deps, executingRequire, execute)
- * the true or false statement
- *
- * this extension implements the linking algorithm for the two variations identical to the spec
- * allowing compiled ES6 circular references to work alongside AMD and CJS circular references.
- *
- */
- SystemJSLoader.prototype.register = function(name, deps, declare) {
- if (typeof name != 'string') {
- declare = deps;
- deps = name;
- name = null;
- }
-
- // dynamic backwards-compatibility
- // can be deprecated eventually
- if (typeof declare == 'boolean')
- return this.registerDynamic.apply(this, arguments);
-
- var entry = createEntry();
- // ideally wouldn't apply map config to bundle names but
- // dependencies go through map regardless so we can't restrict
- // could reconsider in shift to new spec
- entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
- entry.declarative = true;
- entry.deps = deps;
- entry.declare = declare;
-
- this.pushRegister_({
- amd: false,
- entry: entry
- });
- };
- SystemJSLoader.prototype.registerDynamic = function(name, deps, declare, execute) {
- if (typeof name != 'string') {
- execute = declare;
- declare = deps;
- deps = name;
- name = null;
- }
-
- // dynamic
- var entry = createEntry();
- entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
- entry.deps = deps;
- entry.execute = execute;
- entry.executingRequire = declare;
-
- this.pushRegister_({
- amd: false,
- entry: entry
- });
- };
- hook('reduceRegister_', function() {
- return function(load, register) {
- if (!register)
- return;
-
- var entry = register.entry;
- var curMeta = load && load.metadata;
-
- // named register
- if (entry.name) {
- if (!(entry.name in this.defined))
- this.defined[entry.name] = entry;
-
- if (curMeta)
- curMeta.bundle = true;
- }
- // anonymous register
- if (!entry.name || load && !curMeta.entry && entry.name == load.name) {
- if (!curMeta)
- throw new TypeError('Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.');
- if (curMeta.entry) {
- if (curMeta.format == 'register')
- throw new Error('Multiple anonymous System.register calls in module ' + load.name + '. If loading a bundle, ensure all the System.register calls are named.');
- else
- throw new Error('Module ' + load.name + ' interpreted as ' + curMeta.format + ' module format, but called System.register.');
- }
- if (!curMeta.format)
- curMeta.format = 'register';
- curMeta.entry = entry;
- }
- };
- });
-
- hookConstructor(function(constructor) {
- return function() {
- constructor.call(this);
-
- this.defined = {};
- this._loader.moduleRecords = {};
- };
- });
-
- function buildGroups(entry, loader, groups) {
- groups[entry.groupIndex] = groups[entry.groupIndex] || [];
-
- if (indexOf.call(groups[entry.groupIndex], entry) != -1)
- return;
-
- groups[entry.groupIndex].push(entry);
-
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- var depEntry = loader.defined[depName];
-
- // not in the registry means already linked / ES6
- if (!depEntry || depEntry.evaluated)
- continue;
-
- // now we know the entry is in our unlinked linkage group
- var depGroupIndex = entry.groupIndex + (depEntry.declarative != entry.declarative);
-
- // the group index of an entry is always the maximum
- if (depEntry.groupIndex === null || depEntry.groupIndex < depGroupIndex) {
-
- // if already in a group, remove from the old group
- if (depEntry.groupIndex !== null) {
- groups[depEntry.groupIndex].splice(indexOf.call(groups[depEntry.groupIndex], depEntry), 1);
-
- // if the old group is empty, then we have a mixed depndency cycle
- if (groups[depEntry.groupIndex].length == 0)
- throw new Error("Mixed dependency cycle detected");
- }
-
- depEntry.groupIndex = depGroupIndex;
- }
-
- buildGroups(depEntry, loader, groups);
- }
- }
-
- function link(name, startEntry, loader) {
- // skip if already linked
- if (startEntry.module)
- return;
-
- startEntry.groupIndex = 0;
-
- var groups = [];
-
- buildGroups(startEntry, loader, groups);
-
- var curGroupDeclarative = !!startEntry.declarative == groups.length % 2;
- for (var i = groups.length - 1; i >= 0; i--) {
- var group = groups[i];
- for (var j = 0; j < group.length; j++) {
- var entry = group[j];
-
- // link each group
- if (curGroupDeclarative)
- linkDeclarativeModule(entry, loader);
- else
- linkDynamicModule(entry, loader);
- }
- curGroupDeclarative = !curGroupDeclarative;
- }
- }
-
- // module binding records
- function ModuleRecord() {}
- defineProperty(ModuleRecord, 'toString', {
- value: function() {
- return 'Module';
- }
- });
-
- function getOrCreateModuleRecord(name, moduleRecords) {
- return moduleRecords[name] || (moduleRecords[name] = {
- name: name,
- dependencies: [],
- exports: new ModuleRecord(), // start from an empty module and extend
- importers: []
- });
- }
-
- function linkDeclarativeModule(entry, loader) {
- // only link if already not already started linking (stops at circular)
- if (entry.module)
- return;
-
- var moduleRecords = loader._loader.moduleRecords;
- var module = entry.module = getOrCreateModuleRecord(entry.name, moduleRecords);
- var exports = entry.module.exports;
-
- var declaration = entry.declare.call(__global, function(name, value) {
- module.locked = true;
-
- if (typeof name == 'object') {
- for (var p in name)
- exports[p] = name[p];
- }
- else {
- exports[name] = value;
- }
-
- for (var i = 0, l = module.importers.length; i < l; i++) {
- var importerModule = module.importers[i];
- if (!importerModule.locked) {
- var importerIndex = indexOf.call(importerModule.dependencies, module);
- var setter = importerModule.setters[importerIndex];
- if (setter)
- setter(exports);
- }
- }
-
- module.locked = false;
- return value;
- }, { id: entry.name });
-
- if (typeof declaration == 'function')
- declaration = { setters: [], execute: declaration };
-
- // allowing undefined declaration was a mistake! To be deprecated.
- declaration = declaration || { setters: [], execute: function() {} };
-
- module.setters = declaration.setters;
- module.execute = declaration.execute;
-
- if (!module.setters || !module.execute) {
- throw new TypeError('Invalid System.register form for ' + entry.name);
- }
-
- // now link all the module dependencies
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- var depEntry = loader.defined[depName];
- var depModule = moduleRecords[depName];
-
- // work out how to set depExports based on scenarios...
- var depExports;
-
- if (depModule) {
- depExports = depModule.exports;
- }
- // dynamic, already linked in our registry
- else if (depEntry && !depEntry.declarative) {
- depExports = depEntry.esModule;
- }
- // in the loader registry
- else if (!depEntry) {
- depExports = loader.get(depName);
- }
- // we have an entry -> link
- else {
- linkDeclarativeModule(depEntry, loader);
- depModule = depEntry.module;
- depExports = depModule.exports;
- }
-
- // only declarative modules have dynamic bindings
- if (depModule && depModule.importers) {
- depModule.importers.push(module);
- module.dependencies.push(depModule);
- }
- else {
- module.dependencies.push(null);
- }
-
- // run setters for all entries with the matching dependency name
- var originalIndices = entry.originalIndices[i];
- for (var j = 0, len = originalIndices.length; j < len; ++j) {
- var index = originalIndices[j];
- if (module.setters[index]) {
- module.setters[index](depExports);
- }
- }
- }
- }
-
- // An analog to loader.get covering execution of all three layers (real declarative, simulated declarative, simulated dynamic)
- function getModule(name, loader) {
- var exports;
- var entry = loader.defined[name];
-
- if (!entry) {
- exports = loader.get(name);
- if (!exports)
- throw new Error('Unable to load dependency ' + name + '.');
- }
-
- else {
- if (entry.declarative)
- ensureEvaluated(name, entry, [], loader);
-
- else if (!entry.evaluated)
- linkDynamicModule(entry, loader);
-
- exports = entry.module.exports;
- }
-
- if ((!entry || entry.declarative) && exports && exports.__useDefault)
- return exports['default'];
-
- return exports;
- }
-
- function linkDynamicModule(entry, loader) {
- if (entry.module)
- return;
-
- var exports = {};
-
- var module = entry.module = { exports: exports, id: entry.name };
-
- // AMD requires execute the tree first
- if (!entry.executingRequire) {
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- // we know we only need to link dynamic due to linking algorithm
- var depEntry = loader.defined[depName];
- if (depEntry)
- linkDynamicModule(depEntry, loader);
- }
- }
-
- // now execute
- entry.evaluated = true;
- var output = entry.execute.call(__global, function(name) {
- for (var i = 0, l = entry.deps.length; i < l; i++) {
- if (entry.deps[i] != name)
- continue;
- return getModule(entry.normalizedDeps[i], loader);
- }
- // try and normalize the dependency to see if we have another form
- var nameNormalized = loader.normalizeSync(name, entry.name);
- if (indexOf.call(entry.normalizedDeps, nameNormalized) != -1)
- return getModule(nameNormalized, loader);
-
- throw new Error('Module ' + name + ' not declared as a dependency of ' + entry.name);
- }, exports, module);
-
- if (output !== undefined)
- module.exports = output;
-
- // create the esModule object, which allows ES6 named imports of dynamics
- exports = module.exports;
-
- // __esModule flag treats as already-named
- if (exports && (exports.__esModule || exports instanceof Module))
- entry.esModule = loader.newModule(exports);
- // set module as 'default' export, then fake named exports by iterating properties
- else if (entry.esmExports && exports !== __global)
- entry.esModule = loader.newModule(getESModule(exports));
- // just use the 'default' export
- else
- entry.esModule = loader.newModule({ 'default': exports, __useDefault: true });
- }
-
- /*
- * Given a module, and the list of modules for this current branch,
- * ensure that each of the dependencies of this module is evaluated
- * (unless one is a circular dependency already in the list of seen
- * modules, in which case we execute it)
- *
- * Then we evaluate the module itself depth-first left to right
- * execution to match ES6 modules
- */
- function ensureEvaluated(moduleName, entry, seen, loader) {
- // if already seen, that means it's an already-evaluated non circular dependency
- if (!entry || entry.evaluated || !entry.declarative)
- return;
-
- // this only applies to declarative modules which late-execute
-
- seen.push(moduleName);
-
- for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
- var depName = entry.normalizedDeps[i];
- if (indexOf.call(seen, depName) == -1) {
- if (!loader.defined[depName])
- loader.get(depName);
- else
- ensureEvaluated(depName, loader.defined[depName], seen, loader);
- }
- }
-
- if (entry.evaluated)
- return;
-
- entry.evaluated = true;
- entry.module.execute.call(__global);
- }
-
- // override the delete method to also clear the register caches
- hook('delete', function(del) {
- return function(name) {
- delete this._loader.moduleRecords[name];
- delete this.defined[name];
- return del.call(this, name);
- };
- });
-
- hook('fetch', function(fetch) {
- return function(load) {
- if (this.defined[load.name]) {
- load.metadata.format = 'defined';
- return '';
- }
-
- load.metadata.deps = load.metadata.deps || [];
-
- return fetch.call(this, load);
- };
- });
-
- hook('translate', function(translate) {
- // we run the meta detection here (register is after meta)
- return function(load) {
- load.metadata.deps = load.metadata.deps || [];
- return Promise.resolve(translate.apply(this, arguments)).then(function(source) {
- // run detection for register format
- if (load.metadata.format == 'register' || !load.metadata.format && detectRegisterFormat(load.source))
- load.metadata.format = 'register';
- return source;
- });
- };
- });
-
- // implement a perforance shortpath for System.load with no deps
- hook('load', function(doLoad) {
- return function(normalized) {
- var loader = this;
- var entry = loader.defined[normalized];
-
- if (!entry || entry.deps.length)
- return doLoad.apply(this, arguments);
-
- entry.originalIndices = entry.normalizedDeps = [];
-
- // recursively ensure that the module and all its
- // dependencies are linked (with dependency group handling)
- link(normalized, entry, loader);
-
- // now handle dependency execution in correct order
- ensureEvaluated(normalized, entry, [], loader);
- if (!entry.esModule)
- entry.esModule = loader.newModule(entry.module.exports);
-
- // remove from the registry
- if (!loader.trace)
- loader.defined[normalized] = undefined;
-
- // return the defined module object
- loader.set(normalized, entry.esModule);
-
- return Promise.resolve();
- };
- });
-
- hook('instantiate', function(instantiate) {
- return function(load) {
- if (load.metadata.format == 'detect')
- load.metadata.format = undefined;
-
- // assumes previous instantiate is sync
- // (core json support)
- instantiate.call(this, load);
-
- var loader = this;
-
- var entry;
-
- // first we check if this module has already been defined in the registry
- if (loader.defined[load.name]) {
- entry = loader.defined[load.name];
- // don't support deps for ES modules
- if (!entry.declarative)
- entry.deps = entry.deps.concat(load.metadata.deps);
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // picked up already by an anonymous System.register script injection
- // or via the dynamic formats
- else if (load.metadata.entry) {
- entry = load.metadata.entry;
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // Contains System.register calls
- // (dont run bundles in the builder)
- else if (!(loader.builder && load.metadata.bundle)
- && (load.metadata.format == 'register' || load.metadata.format == 'esm' || load.metadata.format == 'es6')) {
-
- if (typeof __exec != 'undefined')
- __exec.call(loader, load);
-
- if (!load.metadata.entry && !load.metadata.bundle)
- throw new Error(load.name + ' detected as ' + load.metadata.format + ' but didn\'t execute.');
-
- entry = load.metadata.entry;
-
- // support metadata deps for System.register
- if (entry && load.metadata.deps)
- entry.deps = entry.deps.concat(load.metadata.deps);
- }
-
- // named bundles are just an empty module
- if (!entry) {
- entry = createEntry();
- entry.deps = load.metadata.deps;
- entry.execute = function() {};
- }
-
- // place this module onto defined for circular references
- loader.defined[load.name] = entry;
-
- var grouped = group(entry.deps);
-
- entry.deps = grouped.names;
- entry.originalIndices = grouped.indices;
- entry.name = load.name;
- entry.esmExports = load.metadata.esmExports !== false;
-
- // first, normalize all dependencies
- var normalizePromises = [];
- for (var i = 0, l = entry.deps.length; i < l; i++)
- normalizePromises.push(Promise.resolve(loader.normalize(entry.deps[i], load.name)));
-
- return Promise.all(normalizePromises).then(function(normalizedDeps) {
-
- entry.normalizedDeps = normalizedDeps;
-
- return {
- deps: entry.deps,
- execute: function() {
- // recursively ensure that the module and all its
- // dependencies are linked (with dependency group handling)
- link(load.name, entry, loader);
-
- // now handle dependency execution in correct order
- ensureEvaluated(load.name, entry, [], loader);
-
- if (!entry.esModule)
- entry.esModule = loader.newModule(entry.module.exports);
-
- // remove from the registry
- if (!loader.trace)
- loader.defined[load.name] = undefined;
-
- // return the defined module object
- return entry.esModule;
- }
- };
- });
- };
- });
-})();
diff --git a/thirdparty/systemjs/lib/scriptLoader.js b/thirdparty/systemjs/lib/scriptLoader.js
deleted file mode 100644
index 8bd1d4b3e..000000000
--- a/thirdparty/systemjs/lib/scriptLoader.js
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Script tag fetch
- *
- * When load.metadata.scriptLoad is true, we load via script tag injection.
- */
-(function() {
-
- if (typeof document != 'undefined')
- var head = document.getElementsByTagName('head')[0];
-
- var curSystem;
- var curRequire;
-
- // if doing worker executing, this is set to the load record being executed
- var workerLoad = null;
-
- // interactive mode handling method courtesy RequireJS
- var ieEvents = head && (function() {
- var s = document.createElement('script');
- var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';
- return s.attachEvent && !(s.attachEvent.toString && s.attachEvent.toString().indexOf('[native code') < 0) && !isOpera;
- })();
-
- // IE interactive-only part
- // we store loading scripts array as { script: <script>, load: {...} }
- var interactiveLoadingScripts = [];
- var interactiveScript;
- function getInteractiveScriptLoad() {
- if (interactiveScript && interactiveScript.script.readyState === 'interactive')
- return interactiveScript.load;
-
- for (var i = 0; i < interactiveLoadingScripts.length; i++)
- if (interactiveLoadingScripts[i].script.readyState == 'interactive') {
- interactiveScript = interactiveLoadingScripts[i];
- return interactiveScript.load;
- }
- }
-
- // System.register, System.registerDynamic, AMD define pipeline
- // this is called by the above methods when they execute
- // we then run the reduceRegister_ collection function either immediately
- // if we are in IE and know the currently executing script (interactive)
- // or later if we need to wait for the synchronous load callback to know the script
- var loadingCnt = 0;
- var registerQueue = [];
- hook('pushRegister_', function(pushRegister) {
- return function(register) {
- // if using eval-execution then skip
- if (pushRegister.call(this, register))
- return false;
-
- // if using worker execution, then we're done
- if (workerLoad)
- this.reduceRegister_(workerLoad, register);
-
- // detect if we know the currently executing load (IE)
- // if so, immediately call reduceRegister
- else if (ieEvents)
- this.reduceRegister_(getInteractiveScriptLoad(), register);
-
- // otherwise, add to our execution queue
- // to call reduceRegister on sync script load event
- else if (loadingCnt)
- registerQueue.push(register);
-
- // if we're not currently loading anything though
- // then do the reduction against a null load
- // (out of band named define or named register)
- // note even in non-script environments, this catch is used
- else
- this.reduceRegister_(null, register);
-
- return true;
- };
- });
-
- function webWorkerImport(loader, load) {
- return new Promise(function(resolve, reject) {
- if (load.metadata.integrity)
- reject(new Error('Subresource integrity checking is not supported in web workers.'));
-
- workerLoad = load;
- try {
- importScripts(load.address);
- }
- catch(e) {
- workerLoad = null;
- reject(e);
- }
- workerLoad = null;
-
- // if nothing registered, then something went wrong
- if (!load.metadata.entry)
- reject(new Error(load.address + ' did not call System.register or AMD define. If loading a global, ensure the meta format is set to global.'));
-
- resolve('');
- });
- }
-
- // override fetch to use script injection
- hook('fetch', function(fetch) {
- return function(load) {
- var loader = this;
-
- if (load.metadata.format == 'json' || !load.metadata.scriptLoad || (!isBrowser && !isWorker))
- return fetch.call(this, load);
-
- if (isWorker)
- return webWorkerImport(loader, load);
-
- return new Promise(function(resolve, reject) {
- var s = document.createElement('script');
-
- s.async = true;
-
- if (load.metadata.crossOrigin)
- s.crossOrigin = load.metadata.crossOrigin;
-
- if (load.metadata.integrity)
- s.setAttribute('integrity', load.metadata.integrity);
-
- if (ieEvents) {
- s.attachEvent('onreadystatechange', complete);
- interactiveLoadingScripts.push({
- script: s,
- load: load
- });
- }
- else {
- s.addEventListener('load', complete, false);
- s.addEventListener('error', error, false);
- }
-
- loadingCnt++;
-
- curSystem = __global.System;
- curRequire = __global.require;
-
- s.src = load.address;
- head.appendChild(s);
-
- function complete(evt) {
- if (s.readyState && s.readyState != 'loaded' && s.readyState != 'complete')
- return;
-
- loadingCnt--;
-
- // complete call is sync on execution finish
- // (in ie already done reductions)
- if (!load.metadata.entry && !registerQueue.length) {
- loader.reduceRegister_(load);
- }
- else if (!ieEvents) {
- for (var i = 0; i < registerQueue.length; i++)
- loader.reduceRegister_(load, registerQueue[i]);
- registerQueue = [];
- }
-
- cleanup();
-
- // if nothing registered, then something went wrong
- if (!load.metadata.entry && !load.metadata.bundle)
- reject(new Error(load.name + ' did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.'));
-
- resolve('');
- }
-
- function error(evt) {
- cleanup();
- reject(new Error('Unable to load script ' + load.address));
- }
-
- function cleanup() {
- __global.System = curSystem;
- __global.require = curRequire;
-
- if (s.detachEvent) {
- s.detachEvent('onreadystatechange', complete);
- for (var i = 0; i < interactiveLoadingScripts.length; i++)
- if (interactiveLoadingScripts[i].script == s) {
- if (interactiveScript && interactiveScript.script == s)
- interactiveScript = null;
- interactiveLoadingScripts.splice(i, 1);
- }
- }
- else {
- s.removeEventListener('load', complete, false);
- s.removeEventListener('error', error, false);
- }
-
- head.removeChild(s);
- }
- });
- };
- });
-})();
diff --git a/thirdparty/systemjs/lib/scriptOnly.js b/thirdparty/systemjs/lib/scriptOnly.js
deleted file mode 100644
index f5654958b..000000000
--- a/thirdparty/systemjs/lib/scriptOnly.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Script-only addition used for production loader
- *
- */
-hookConstructor(function(constructor) {
- return function() {
- constructor.apply(this, arguments);
- __global.define = this.amdDefine;
- };
-});
-
-hook('fetch', function(fetch) {
- return function(load) {
- load.metadata.scriptLoad = true;
- return fetch.call(this, load);
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/system-fetch.js b/thirdparty/systemjs/lib/system-fetch.js
deleted file mode 100644
index fb642caac..000000000
--- a/thirdparty/systemjs/lib/system-fetch.js
+++ /dev/null
@@ -1,125 +0,0 @@
- var fetchTextFromURL;
- if (typeof XMLHttpRequest != 'undefined') {
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- var xhr = new XMLHttpRequest();
- var sameDomain = true;
- var doTimeout = false;
- if (!('withCredentials' in xhr)) {
- // check if same domain
- var domainCheck = /^(\w+:)?\/\/([^\/]+)/.exec(url);
- if (domainCheck) {
- sameDomain = domainCheck[2] === window.location.host;
- if (domainCheck[1])
- sameDomain &= domainCheck[1] === window.location.protocol;
- }
- }
- if (!sameDomain && typeof XDomainRequest != 'undefined') {
- xhr = new XDomainRequest();
- xhr.onload = load;
- xhr.onerror = error;
- xhr.ontimeout = error;
- xhr.onprogress = function() {};
- xhr.timeout = 0;
- doTimeout = true;
- }
- function load() {
- fulfill(xhr.responseText);
- }
- function error() {
- reject(new Error('XHR error' + (xhr.status ? ' (' + xhr.status + (xhr.statusText ? ' ' + xhr.statusText : '') + ')' : '') + ' loading ' + url));
- }
-
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4) {
- // in Chrome on file:/// URLs, status is 0
- if (xhr.status == 0) {
- if (xhr.responseText) {
- load();
- }
- else {
- // when responseText is empty, wait for load or error event
- // to inform if it is a 404 or empty file
- xhr.addEventListener('error', error);
- xhr.addEventListener('load', load);
- }
- }
- else if (xhr.status === 200) {
- load();
- }
- else {
- error();
- }
- }
- };
- xhr.open("GET", url, true);
-
- if (xhr.setRequestHeader) {
- xhr.setRequestHeader('Accept', 'application/x-es-module, */*');
- // can set "authorization: true" to enable withCredentials only
- if (authorization) {
- if (typeof authorization == 'string')
- xhr.setRequestHeader('Authorization', authorization);
- xhr.withCredentials = true;
- }
- }
-
- if (doTimeout) {
- setTimeout(function() {
- xhr.send();
- }, 0);
- } else {
- xhr.send(null);
- }
- };
- }
- else if (typeof require != 'undefined' && typeof process != 'undefined') {
- var fs;
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- if (url.substr(0, 8) != 'file:///')
- throw new Error('Unable to fetch "' + url + '". Only file URLs of the form file:/// allowed running in Node.');
- fs = fs || require('fs');
- if (isWindows)
- url = url.replace(/\//g, '\\').substr(8);
- else
- url = url.substr(7);
- return fs.readFile(url, function(err, data) {
- if (err) {
- return reject(err);
- }
- else {
- // Strip Byte Order Mark out if it's the leading char
- var dataString = data + '';
- if (dataString[0] === '\ufeff')
- dataString = dataString.substr(1);
-
- fulfill(dataString);
- }
- });
- };
- }
- else if (typeof self != 'undefined' && typeof self.fetch != 'undefined') {
- fetchTextFromURL = function(url, authorization, fulfill, reject) {
- var opts = {
- headers: {'Accept': 'application/x-es-module, */*'}
- };
-
- if (authorization) {
- if (typeof authorization == 'string')
- opts.headers['Authorization'] = authorization;
- opts.credentials = 'include';
- }
-
- fetch(url, opts)
- .then(function (r) {
- if (r.ok) {
- return r.text();
- } else {
- throw new Error('Fetch error: ' + r.status + ' ' + r.statusText);
- }
- })
- .then(fulfill, reject);
- }
- }
- else {
- throw new TypeError('No environment fetch API available.');
- }
diff --git a/thirdparty/systemjs/lib/system-only-resolve.js b/thirdparty/systemjs/lib/system-only-resolve.js
deleted file mode 100644
index e8618c844..000000000
--- a/thirdparty/systemjs/lib/system-only-resolve.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var absURLRegEx = /^([^\/]+:\/\/|\/)/;
-
-// Normalization with module names as absolute URLs
-SystemJSLoader.prototype.normalize = function(name, parentName, parentAddress) {
- // NB does `import 'file.js'` import relative to the parent name or baseURL?
- // have assumed that it is baseURL-relative here, but spec may well align with URLs to be the latter
- // safe option for users is to always use "./file.js" for relative
-
- // not absolute or relative -> apply paths (what will be sites)
- if (!name.match(absURLRegEx) && name[0] != '.')
- name = new URL(applyPaths(this, name) || name, baseURI).href;
- // apply parent-relative normalization, parentAddress is already normalized
- else
- name = new URL(name, parentName || baseURI).href;
-
- return name;
-};
-
-// default locate is this
-/*
-SystemJSLoader.prototype.locate = function(load) {
- return load.name;
-};
-*/ \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/url-polyfill.js b/thirdparty/systemjs/lib/url-polyfill.js
deleted file mode 100644
index b2a40198a..000000000
--- a/thirdparty/systemjs/lib/url-polyfill.js
+++ /dev/null
@@ -1,64 +0,0 @@
-// from https://gist.github.com/Yaffle/1088850
-(function(global) {
-function URLPolyfill(url, baseURL) {
- if (typeof url != 'string')
- throw new TypeError('URL must be a string');
- var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
- if (!m)
- throw new RangeError('Invalid URL format');
- var protocol = m[1] || "";
- var username = m[2] || "";
- var password = m[3] || "";
- var host = m[4] || "";
- var hostname = m[5] || "";
- var port = m[6] || "";
- var pathname = m[7] || "";
- var search = m[8] || "";
- var hash = m[9] || "";
- if (baseURL !== undefined) {
- var base = baseURL instanceof URLPolyfill ? baseURL : new URLPolyfill(baseURL);
- var flag = !protocol && !host && !username;
- if (flag && !pathname && !search)
- search = base.search;
- if (flag && pathname[0] !== "/")
- pathname = (pathname ? (((base.host || base.username) && !base.pathname ? "/" : "") + base.pathname.slice(0, base.pathname.lastIndexOf("/") + 1) + pathname) : base.pathname);
- // dot segments removal
- var output = [];
- pathname.replace(/^(\.\.?(\/|$))+/, "")
- .replace(/\/(\.(\/|$))+/g, "/")
- .replace(/\/\.\.$/, "/../")
- .replace(/\/?[^\/]*/g, function (p) {
- if (p === "/..")
- output.pop();
- else
- output.push(p);
- });
- pathname = output.join("").replace(/^\//, pathname[0] === "/" ? "/" : "");
- if (flag) {
- port = base.port;
- hostname = base.hostname;
- host = base.host;
- password = base.password;
- username = base.username;
- }
- if (!protocol)
- protocol = base.protocol;
- }
-
- // convert URLs to use / always
- pathname = pathname.replace(/\\/g, '/');
-
- this.origin = host ? protocol + (protocol !== "" || host !== "" ? "//" : "") + host : "";
- this.href = protocol + (protocol && host || protocol == "file:" ? "//" : "") + (username !== "" ? username + (password !== "" ? ":" + password : "") + "@" : "") + host + pathname + search + hash;
- this.protocol = protocol;
- this.username = username;
- this.password = password;
- this.host = host;
- this.hostname = hostname;
- this.port = port;
- this.pathname = pathname;
- this.search = search;
- this.hash = hash;
-}
-global.URLPolyfill = URLPolyfill;
-})(typeof self != 'undefined' ? self : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/lib/wrapper-end.js b/thirdparty/systemjs/lib/wrapper-end.js
deleted file mode 100644
index e668fd1b6..000000000
--- a/thirdparty/systemjs/lib/wrapper-end.js
+++ /dev/null
@@ -1,47 +0,0 @@
-}
-
-// auto-load Promise polyfill if needed in the browser
-var doPolyfill = typeof Promise === 'undefined';
-
-// document.write
-if (typeof document !== 'undefined') {
- var scripts = document.getElementsByTagName('script');
- $__curScript = scripts[scripts.length - 1];
- if (document.currentScript && ($__curScript.defer || $__curScript.async))
- $__curScript = document.currentScript;
- if (!$__curScript.src)
- $__curScript = undefined;
- if (doPolyfill) {
- var curPath = $__curScript.src;
- var basePath = curPath.substr(0, curPath.lastIndexOf('/') + 1);
- window.systemJSBootstrap = bootstrap;
- document.write(
- '<' + 'script type="text/javascript" src="' + basePath + 'system-polyfills.js">' + '<' + '/script>'
- );
- }
- else {
- bootstrap();
- }
-}
-// importScripts
-else if (typeof importScripts !== 'undefined') {
- var basePath = '';
- try {
- throw new Error('_');
- } catch (e) {
- e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/, function(m, url) {
- $__curScript = { src: url };
- basePath = url.replace(/\/[^\/]*$/, '/');
- });
- }
- if (doPolyfill)
- importScripts(basePath + 'system-polyfills.js');
- bootstrap();
-}
-else {
- $__curScript = typeof __filename != 'undefined' ? { src: __filename } : null;
- bootstrap();
-}
-
-
-})();
diff --git a/thirdparty/systemjs/lib/wrapper-start.js b/thirdparty/systemjs/lib/wrapper-start.js
deleted file mode 100644
index dda23f0f8..000000000
--- a/thirdparty/systemjs/lib/wrapper-start.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(function() {
-function bootstrap() { \ No newline at end of file
diff --git a/thirdparty/systemjs/package.json b/thirdparty/systemjs/package.json
deleted file mode 100644
index a8caf0f3f..000000000
--- a/thirdparty/systemjs/package.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "systemjs",
- "version": "0.19.39",
- "description": "Universal dynamic module loader",
- "repository": {
- "type": "git",
- "url": "git://github.com/systemjs/systemjs"
- },
- "author": "Guy Bedford",
- "license": "MIT",
- "files": [
- "index.js",
- "dist"
- ],
- "dependencies": {
- "when": "^3.7.5"
- },
- "devDependencies": {
- "babel-core": "^5.8.22",
- "qunit": "^0.6.2",
- "traceur": "0.0.105",
- "typescript": "^1.6.2",
- "uglify-js": "~2.4.23"
- },
- "scripts": {
- "test:browser": "make test",
- "perf": "node bench/normalize-perf.js",
- "build": "make",
- "test": "npm run test:babel && npm run test:traceur && npm run test:typescript",
- "test:babel": "qunit -c s:./index.js -t ./test/test-babel.js",
- "test:traceur": "qunit -c s:./index.js -t ./test/test-traceur.js",
- "test:typescript": "qunit -c s:./index.js -t ./test/test-typescript.js"
- }
-}
diff --git a/thirdparty/systemjs/test/test-babel-runtime.html b/thirdparty/systemjs/test/test-babel-runtime.html
deleted file mode 100644
index bb62e1e42..000000000
--- a/thirdparty/systemjs/test/test-babel-runtime.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <script src="../dist/system.src.js" type="text/javascript"></script>
-
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
-
- <script>
- QUnit.config.testTimeout = 2000;
-
- QUnit.module("SystemJS Runtime");
-
- function err(e) {
- setTimeout(function() {
- throw e.stack || e;
- start();
- });
- }
-
- System.transpiler = 'babel';
- System.paths['babel/external-helpers'] = '../node_modules/babel-core/external-helpers.js';
-
- asyncTest('Dynamicall loading modules with Traceur runtime', function() {
- System['import']('tests/with-runtime-babel.js').then(function(m) {
- ok(m.c);
- start();
- }, err);
- });
-
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-babel.html b/thirdparty/systemjs/test/test-babel.html
deleted file mode 100644
index 2cf3d1ea7..000000000
--- a/thirdparty/systemjs/test/test-babel.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <script src="../dist/system.src.js" type="text/javascript"></script>
- <script>
- System.paths.babel = '../node_modules/babel-core/browser.js';
- System.transpiler = 'babel';
- System['import']('test.js')['catch'](function(e) {
- setTimeout(function() {
- throw e.stack || e;
- })
- });
- </script>
-
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
- </body>
-</html> \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-babel.js b/thirdparty/systemjs/test/test-babel.js
deleted file mode 100644
index 062b6158e..000000000
--- a/thirdparty/systemjs/test/test-babel.js
+++ /dev/null
@@ -1,3 +0,0 @@
-System.transpiler = 'babel';
-System.baseURL = 'test/';
-require('./test'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-csp-inline.html b/thirdparty/systemjs/test/test-csp-inline.html
deleted file mode 100644
index 4f6dce16e..000000000
--- a/thirdparty/systemjs/test/test-csp-inline.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'nonce-abc';">
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <script src="../dist/system.src.js" type="text/javascript"></script>
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
-
- <script nonce='abc'>
- QUnit.config.testTimeout = 2000;
-
- QUnit.module("SystemJS nonce");
-
- function err(e) {
- setTimeout(function() {
- throw e.stack || e;
- start();
- });
- }
-
- asyncTest('Importing a script with a good nonce', function() {
- System.config({
- meta: {
- 'tests/csp/nonce.js': {
- nonce: 'abc'
- }
- }
- });
- System['import']('tests/csp/nonce.js').then(function(m) {
- ok(m.nonce === 'abc');
- start();
- });
- });
-
- asyncTest('Importing a script with a bad nonce', function() {
- System.config({
- meta: {
- 'tests/csp/nonce2.js': {
- nonce: 'asdf'
- }
- }
- });
- System['import']('tests/csp/nonce2.js').then(function(m) {
- ok(m.nonce !== 'ab');
- start();
- });
- });
- </script>
- </body>
-</html>
diff --git a/thirdparty/systemjs/test/test-csp.html b/thirdparty/systemjs/test/test-csp.html
deleted file mode 100644
index f488974f6..000000000
--- a/thirdparty/systemjs/test/test-csp.html
+++ /dev/null
@@ -1,280 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <script src="../dist/system-csp-production.src.js" type="text/javascript"></script>
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
-
- <script>
- QUnit.config.testTimeout = 2000;
-
- QUnit.module("SystemJS CSP");
-
- function err(e) {
- setTimeout(function() {
- throw e.stack || e;
- start();
- });
- }
-
- asyncTest('System version', function() {
- ok(System.version.match(/^\d+\.\d+\.\d+(-\w+)? CSP$/));
- start();
- });
-
- asyncTest('Loading an AMD module', function() {
- System['import']('tests/amd-module.js').then(function(m) {
- ok(m.amd == true);
- ok(m.dep.amd == 'dep');
- start();
- }, err);
- });
-
- System.config({
- bundles: {
- 'tests/amd-bundle.js': ['bundle-1', 'bundle-2']
- }
- });
- asyncTest('Loading an AMD bundle', function() {
- System['import']('bundle-1').then(function(m) {
- ok(m.defined == true);
- start();
- }, err);
-
- stop();
- System['import']('bundle-2').then(function(m) {
- ok(m.defined == true);
- start();
- }, err);
- });
-
- asyncTest('Loading an AMD named define', function() {
- System['import']('tests/nameddefine.js').then(function() {
- System['import']('another-define').then(function(m) {
- ok(m.named == 'define');
- start();
- }, err);
- }, err);
- });
-
- asyncTest('Global script with exports as an array', function() {
- System.config({
- meta: {
- 'tests/global-exports-array.js': {
- exports: ['A', 'B']
- }
- }
- });
-
- System['import']('tests/global-exports-array.js').then(function(m) {
- ok(m.A == 'A');
- ok(m.B == 'B');
- ok(!m.C);
- ok(m['default'] == 'A');
- start();
- }, err);
- });
-
- asyncTest('Loading a badly named AMD define', function() {
- System['import']('tests/jquery-named.js').then(function(jquery) {
- ok(jquery.is == 'jquery');
- start();
- }, err);
- });
-
-
- asyncTest('System.register Circular', function() {
- System['import']('tests/register-circular1.js').then(function(m) {
- ok(m.q == 3, 'Binding not allocated');
- ok(m.r == 5, 'Binding not updated');
- start();
- }, err);
- });
-
-
- asyncTest('Loading a UMD module', function() {
- System['import']('tests/umd.js').then(function(m) {
- ok(m.d == 'hi');
- start();
- }, err);
- });
-
- asyncTest('Loading a bundle', function() {
- System['import']('tests/bundle.js').then(function(m) {
- return System['import']('bundle-define1');
- })
- .then(function(m) {
- ok(m.name == 'bundle1');
-
- return System['import']('bundle-define2');
- })
- .then(function(m) {
- ok(m.name == 'bundle2');
-
- start();
- })
- ['catch'](err);
- });
-
- asyncTest('Loading a bundle on demand', function() {
-
- System.config({
- bundles: {
- 'tests/main-bundle.js': ['jquery']
- }
- });
- System['import']('jquery').then(function(m) {
- ok(m.name == 'jquery-bundled');
- start();
- }, err);
- });
-
- System.config({
- bundles: {
- 'tests/mixed-bundle.js': ['tree/third', 'tree/cjs', 'tree/jquery', 'tree/second', 'tree/global', 'tree/amd', 'tree/first']
- }
- });
- asyncTest('Loading AMD from a bundle', function() {
- System['import']('tree/amd').then(function(m) {
- ok(m.is == 'amd');
- start();
- }, err);
- });
-
- asyncTest('Loading CommonJS from a bundle', function() {
- System['import']('tree/cjs').then(function(m) {
- ok(m.cjs === true);
- start();
- }, err);
- });
-
- asyncTest('Loading a Global from a bundle', function() {
- System['import']('tree/global').then(function(m) {
- ok(m === 'output');
- start();
- }, err);
- });
-
- asyncTest('Loading named System.register', function() {
- System['import']('tree/third').then(function(m) {
- ok(m.some == 'exports');
- start();
- }, err);
- });
-
- asyncTest('Loading System.register from ES6', function() {
- System['import']('tree/first').then(function(m) {
- ok(m.p == 5);
- start();
- });
- });
-
- asyncTest('Running a simple non-fetch plugin', function() {
- System.set('tests/es6-plugin', System.newModule({
- fetch: function() {
- return '';
- },
- instantiate: function() {
- return "plugin";
- }
- }));
- System['import']('test/file!tests/es6-plugin').then(function(m) {
- ok(m == 'plugin');
- start();
- });
- });
-
- asyncTest('Loading a non-registering module', function() {
- System['import']('tests/global-dep.js')['catch'](function(e) {
- ok(e.toString().indexOf('did not call System.register or AMD define') != -1);
- start();
- });
- });
-
- asyncTest('Loading a global with exports defined', function() {
- System.config({
- meta: {
- 'tests/global-single.js': {
- exports: 'foo'
- }
- }
- });
- System['import']('tests/global-single.js').then(function(m) {
- ok(m == 'bar');
- start();
- });
- });
-
- asyncTest('Loading a precompiled global with exports still defined', function() {
- System.config({
- meta: {
- 'tests/global-single-compiled.js': {
- exports: 'foobar'
- }
- }
- });
- System['import']('tests/global-single-compiled.js').then(function(m) {
- ok(m == 'foo');
- start();
- });
- });
-
- asyncTest('Importing a script with wrong integrity fails', function() {
- System.config({
- meta: {
- 'tests/csp/integrity.js': {
- integrity: 'sha256-abc'
- }
- }
- });
- System['import']('tests/csp/integrity.js').then(err, function(e) {
- ok(typeof e !== 'undefined');
- start();
- });
- });
-
- asyncTest('Importing a script with correct integrity', function() {
- System.config({
- meta: {
- 'tests/csp/integrity.js': {
- integrity: 'sha256-_AfZ2eZSJyVU4HFktUpbsTEoSJF1hL5eGKjgdXZnNTw='
- }
- }
- });
- System['import']('tests/csp/integrity.js').then(function(m) {
- ok(m.integrity === 'integrity');
- start();
- }, err);
- });
-
- asyncTest('Importing jQuery from CDN', function() {
- System['import']('https://code.jquery.com/jquery-1.11.3.min.js').then(function($) {
- ok($.fn);
- start();
- });
- });
-
- asyncTest('Loading package configuration json', function() {
- System.config({
- packageConfigPaths: ['tests/testpkg*.json']
- });
- System.import('tests/testpkg2')
- .then(function(m) {
- ok(m.asdf == 'asdf');
- start();
- }, err);
- })
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-jsextensions.html b/thirdparty/systemjs/test/test-jsextensions.html
deleted file mode 100644
index bb64a8f73..000000000
--- a/thirdparty/systemjs/test/test-jsextensions.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <script>
- // test polyfill loading
- // window.URL = undefined;
- </script>
-
- <script src="../dist/system.src.js" type="text/javascript"></script>
- <script>
- System.traceurOptions = { asyncFunctions: true };
- System.paths.traceur = '../node_modules/traceur/bin/traceur.js';
-
- QUnit.config.testTimeout = 2000;
-
- QUnit.module("SystemJS JS Extensions");
-
- System.config({
- defaultJSExtensions: true
- });
-
- asyncTest('Error handling', function() {
- System['import']('tests/main').then(function(m) {
- ok(m.dep == 'value');
- start();
- });
- });
-
- asyncTest('Pathing extension handling', function() {
- System.config({
- paths: {
- 'path': 'tests/main'
- },
- packages: {
- 'tests/testpkg': {
- basePath: 'lib',
- defaultExtension: 'ts',
- map: {
- './asdf': './test.ts'
- }
- },
- 'tests/subcontextual-map': {
- main: 'submodule',
- map: {
- dep: 'path'
- }
- }
- }
- });
-
- Promise.all([
- System['import']('path'),
- System['import']('tests/testpkg/asdf'),
- System['import']('tests/subcontextual-map'),
- System['import']('tests/main-dep'),
- System['import']('tests/main-dep.js')
- ])
- .then(function(mods) {
- ok(mods[0].dep == 'value');
- ok(mods[1] == 'ts');
- ok(mods[2].dep == 'value');
- ok(mods[3] == mods[2]);
- ok(mods[3] == mods[4]);
- start();
- })
- });
-
- System.config({
- packages: {
- 'custom': {
- defaultExtension: 'ext'
- }
- }
- });
- asyncTest('Register extensions', function(err) {
- System['import']('tests/register-default-extension.js').then(function() {
- System['import']('custom/file.ext').then(function(m) {
- ok(m.custom == 'ext');
- start();
- }, err);
- }, err);
- });
-
- System.config({
- packages: {
- 'tests/no-default-ext': {
- defaultExtension: false
- }
- }
- });
- asyncTest('No default extension', function(err) {
- System['import']('tests/no-default-ext/file.ext').then(function(m) {
- ok(m.ext == 'ext');
- start();
- }, err);
- });
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-register-only.html b/thirdparty/systemjs/test/test-register-only.html
deleted file mode 100644
index 65ff64100..000000000
--- a/thirdparty/systemjs/test/test-register-only.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <script src="../dist/system-register-only.src.js" type="text/javascript"></script>
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
-
- <script>
- QUnit.config.testTimeout = 2000;
-
- QUnit.module("SystemJS CSP");
-
- function err(e) {
- setTimeout(function() {
- throw e.stack || e;
- start();
- });
- }
-
- asyncTest('System version', function() {
- ok(System.version.match(/^\d+\.\d+\.\d+(-\w+)? Register Only$/));
- start();
- });
-
- asyncTest('System.register Circular', function() {
- System['import']('tests/register-circular1.js').then(function(m) {
- ok(m.q == 3, 'Binding not allocated');
- ok(m.r == 5, 'Binding not updated');
- start();
- }, err);
- });
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-tracer.html b/thirdparty/systemjs/test/test-tracer.html
deleted file mode 100644
index 52075004f..000000000
--- a/thirdparty/systemjs/test/test-tracer.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <script src="../dist/system.src.js" type="text/javascript"></script>
-
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
-
- <script>
- System.paths.traceur = '../node_modules/traceur/bin/traceur.js';
-
- QUnit.config.testTimeout = 2000;
-
- QUnit.module("SystemJS Tracer");
-
- function err(e) {
- setTimeout(function() {
- throw e.stack || e;
- start();
- });
- }
-
- // enable tracing
- System.pluginLoader = new System.constructor();
- System.pluginLoader.paths = System.paths;
- System.pluginLoader.baseURL = System.baseURL;
- System.trace = true;
- // System.execute = false;
-
- asyncTest('ES6 Circular', function() {
- System['import']('tests/es6-circular1.js').then(function(m) {
- ok(System.loads[System.normalizeSync('tests/es6-circular1.js')].deps[0] == './es6-circular2.js');
- start();
- }, err);
- });
-
- asyncTest('AMD & CJS circular, ES6 Circular', function() {
- System['import']('tests/all-circular1.js').then(function(m) {
- ok(System.loads[System.normalizeSync('tests/all-circular1.js')].deps[0] == './all-circular2.js');
- start();
- }, err);
- });
-
- asyncTest('AMD -> System.register circular -> ES6', function() {
- System['import']('tests/all-layers1.js').then(function(m) {
- ok(System.loads[System.normalizeSync('tests/all-layers1.js')].deps[0] == './all-layers2.js');
- start();
- }, err);
- });
-
- asyncTest('Advanced compiler plugin', function() {
- System['import']('tests/compiler-test.coffee!tests/advanced-plugin.js').then(function(m) {
- ok(true);
- start();
- }, err);
- });
-
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-traceur.html b/thirdparty/systemjs/test/test-traceur.html
deleted file mode 100644
index 87f4cd23d..000000000
--- a/thirdparty/systemjs/test/test-traceur.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <script>
- // test polyfill loading
- // window.URL = undefined;
- </script>
-
- <script src="../dist/system.src.js" type="text/javascript"></script>
- <script>
- System.traceurOptions = { asyncFunctions: true };
- System.paths.traceur = '../node_modules/traceur/bin/traceur.js';
- System['import']('test.js')['catch'](function(e) {
- setTimeout(function() {
- throw e.stack || e;
- });
- });
- </script>
-
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
- </body>
-</html> \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-traceur.js b/thirdparty/systemjs/test/test-traceur.js
deleted file mode 100644
index 983f51b36..000000000
--- a/thirdparty/systemjs/test/test-traceur.js
+++ /dev/null
@@ -1,3 +0,0 @@
-System.transpiler = 'traceur';
-System.baseURL = 'test/';
-require('./test'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-typescript.html b/thirdparty/systemjs/test/test-typescript.html
deleted file mode 100644
index 4258164c9..000000000
--- a/thirdparty/systemjs/test/test-typescript.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <link rel="stylesheet" type="text/css" href="../bower_components/qunit/qunit/qunit.css"/>
- </head>
- <body>
-
- <h1 id="qunit-header">SystemJS Test Suite</h1>
-
- <h2 id="qunit-banner"></h2>
- <div id="qunit-testrunner-toolbar"></div>
- <h2 id="qunit-userAgent"></h2>
- <ol id="qunit-tests"></ol>
- <div id="qunit-test-area"></div>
-
- <!-- <script src="../bower_components/traceur/traceur.js"></script> -->
- <script src="../node_modules/es6-module-loader/dist/es6-module-loader.src.js"></script>
- <script src="../dist/system.src.js" type="text/javascript"></script>
- <script>
- System.paths['typescript'] = '../node_modules/typescript/lib/typescript.js';
- System.transpiler = 'typescript';
- System['import']('test.js')['catch'](function(e) {
- setTimeout(function() {
- throw e;
- })
- });
- </script>
-
- <script src="../bower_components/qunit/qunit/qunit.js"></script>
- </body>
-</html> \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test-typescript.js b/thirdparty/systemjs/test/test-typescript.js
deleted file mode 100644
index e7a858309..000000000
--- a/thirdparty/systemjs/test/test-typescript.js
+++ /dev/null
@@ -1,4 +0,0 @@
-global.ts = require('typescript');
-System.transpiler = 'typescript';
-System.baseURL = 'test/';
-require('./test'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/test.js b/thirdparty/systemjs/test/test.js
deleted file mode 100644
index 6d981d761..000000000
--- a/thirdparty/systemjs/test/test.js
+++ /dev/null
@@ -1,1462 +0,0 @@
-"format global";
-
-(function(global) {
-
-QUnit.config.testTimeout = 30000;
-
-QUnit.module("SystemJS");
-
-if (typeof window == 'undefined')
- System.baseURL = 'test';
-
-function err(e) {
- setTimeout(function() {
- if (typeof window == 'undefined')
- console.log(e && e.stack || e);
- else
- throw e;
- start();
- });
-}
-
-var ie8 = typeof navigator != 'undefined' && navigator.appVersion && navigator.appVersion.indexOf('MSIE 8') != -1;
-
-asyncTest('System version', function() {
- ok(System.version.match(/^\d+\.\d+\.\d+(-\w+)? (Standard|Node)$/));
- start();
-});
-
-asyncTest('new Module().toString() == "Module"', function() {
- System['import']('tests/global.js').then(function() {
- var m = System.get(System.normalizeSync('tests/global.js'));
- ok(m == 'Module');
- start();
- });
-});
-
-asyncTest('Error handling', function() {
- System['import']('tests/error-loader.js').then(err, function(e) {
- ok(true);
- start();
- });
-});
-
-asyncTest('Error handling2', function() {
- System['import']('tests/error-loader2.js').then(err, function(e) {
- if (typeof console != 'undefined' && console.error)
- console.error(e);
- ok(true);
- start();
- });
-});
-
-if (!ie8)
-asyncTest('Global script loading', function() {
- System['import']('tests/global.js').then(function(m) {
- ok(m.jjQuery && m.another, 'Global objects not defined');
- start();
- }, err);
-});
-
-if (!ie8)
-asyncTest('Global script with var syntax', function() {
- System['import']('tests/global-single.js').then(function(m) {
- ok(m == 'bar', 'Wrong global value');
- start();
- }, err);
-});
-
-asyncTest('Global script with multiple objects the same', function() {
- System['import']('tests/global-multi.js').then(function(m) {
- ok(m.jquery == 'here', 'Multi globals not detected');
- start();
- }, err);
-});
-
-if (!ie8)
-asyncTest('Global script multiple objects different', function() {
- System['import']('tests/global-multi-diff.js').then(function(m) {
- ok(m.foo == 'barz');
- ok(m.baz == 'chaz');
- ok(m.zed == 'ted');
- start();
- }, err);
-});
-
-asyncTest('Global script loading with inline shim', function() {
- System['import']('tests/global-inline-dep.js').then(function(m) {
- ok(m == '1.8.3', 'Global dependency not defined');
- start();
- }, err);
-});
-
-asyncTest('Global script with inline exports', function() {
- System['import']('tests/global-inline-export.js').then(function(m) {
- ok(m == 'r', 'Inline export not applied');
- start();
- }, err);
-});
-
-asyncTest('Global script with shim config', function() {
- System.config({
- meta: {
- 'tests/global-shim-config.js': {
- deps: ['./global-shim-config-dep.js']
- }
- }
- });
- // System. = { deps: ['./global-shim-config-dep.js'] };
- System['import']('tests/global-shim-config.js').then(function(m) {
- ok(m == 'shimmed', 'Not shimmed');
- start();
- }, err);
-});
-
-if (!ie8)
-asyncTest('Global script with inaccessible properties', function() {
- Object.defineProperty(System.global, 'errorOnAccess', {
- configurable: true,
- enumerable: true,
- get: function() { throw Error('This property is inaccessible'); },
- });
-
- System['import']('tests/global-inaccessible-props.js').then(function(m) {
- ok(m == 'result of global-inaccessible-props', 'Failed due to a inaccessible property');
-
- delete System.global.errorOnAccess;
- start();
- }, err);
-});
-
-asyncTest('Global script loading that detects as AMD with shim config', function() {
- System.config({
- meta: {
- 'tests/global-shim-amd.js': { format: 'global' }
- }
- });
-
- System['import']('tests/global-shim-amd.js').then(function(m) {
- ok(m == 'global', 'Not shimmed');
- start();
- }, err);
-});
-
-asyncTest('Global script with exports as an array', function() {
- System.config({
- meta: {
- 'tests/global-exports-array.js': {
- exports: ['A', 'B']
- }
- }
- });
-
- System['import']('tests/global-exports-array.js').then(function(m) {
- ok(m.A == 'A');
- ok(m.B == 'B');
- ok(!m.C);
- ok(m['default'] == 'A');
- start();
- }, err);
-});
-
-asyncTest('Global with encapsulated execution', function() {
- System.config({
- meta: {
- 'tests/global-encapsulation.js': {
- encapsulateGlobal: true
- }
- }
- });
-
- System['import']('tests/global-encapsulation.js').then(function(m) {
- ok(m == 'encapsulated global');
- ok(global.globalName === undefined);
- start();
- }, err);
-});
-
-if (!ie8)
-asyncTest('Meta should override meta syntax', function() {
- System.meta[System.normalizeSync('tests/meta-override.js')] = { format: 'esm' };
- System['import']('tests/meta-override.js').then(function(m) {
- ok(m.p == 'value', 'Not ES6');
- start();
- }, err);
-});
-
-asyncTest('Support the empty module', function() {
- System['import']('@empty').then(function(m) {
- ok(m, 'No empty module');
- start();
- }, err);
-});
-
-asyncTest('Global script with shim config exports', function() {
- System.meta[System.normalizeSync('tests/global-shim-config-exports.js')] = { exports: 'p' };
- System['import']('tests/global-shim-config-exports.js').then(function(m) {
- ok(m == 'export', 'Exports not shimmed');
- start();
- }, err);
-});
-
-asyncTest('Map configuration', function() {
- System.map['maptest'] = 'tests/map-test.js';
- System['import']('maptest').then(function(m) {
- ok(m.maptest == 'maptest', 'Mapped module not loaded');
- start();
- }, err);
-});
-
-asyncTest('Map configuration subpath', function() {
- System.map['maptest'] = 'tests/map-test';
- System['import']('maptest/sub.js').then(function(m) {
- ok(m.maptest == 'maptestsub', 'Mapped folder not loaded');
- start();
- }, err);
-});
-
-asyncTest('Contextual map configuration', function() {
- System.config({
- packages: {
- 'tests/contextual-test': {
- main: 'contextual-map.js'
- }
- },
- map: {
- 'tests/contextual-test': {
- maptest: '../contextual-map-dep.js'
- }
- }
- });
- System['import']('tests/contextual-test').then(function(m) {
- ok(m.mapdep == 'mapdep', 'Contextual map dep not loaded');
- start();
- }, err);
-});
-
-asyncTest('Contextual map configuration for a package that is a file', function() {
- System.config({
- packages: {
- 'tests/jquery.js': {
- meta: {
- '*': {
- deps: ['a']
- }
- },
- map: {
- 'a': 'tests/amd-dep-A.js'
- }
- }
- },
- map: {
- jquery: 'tests/jquery.js'
- }
- });
- System['import']('tests/jquery.js').then(function(m) {
- ok(m == 10);
- start();
- }, err);
-})
-
-asyncTest('Package map with shim', function() {
- System.config({
- packages: {
- 'tests/shim-package': {
- meta: {
- '*': {
- deps: ['shim-map-dep']
- }
- },
- map: {
- 'shim-map-dep': '../shim-map-test-dep.js'
- }
- }
- }
- });
- System['import']('tests/shim-package/shim-map-test.js').then(function(m) {
- ok(m == 'depvalue', 'shim dep not loaded');
- start();
- }, err);
-});
-
-asyncTest('Loading an AMD module', function() {
- System.config({
- meta: {
- 'tests/amd-module.js': {
- format: 'amd'
- }
- }
- });
- System['import']('tests/amd-module.js').then(function(m) {
- ok(m.amd == true, 'Incorrect module');
- ok(m.dep.amd == 'dep', 'Dependency not defined');
- start();
- }, err);
-});
-
-asyncTest('AMD detection test', function() {
- System['import']('tests/amd-module-2.js').then(function(m) {
- ok(m.amd);
- start();
- }, err);
-});
-
-asyncTest('AMD detection test with comments', function() {
- System['import']('tests/amd-module-3.js').then(function(m) {
- ok(m.amd);
- start();
- }, err);
-});
-
-asyncTest('AMD detection test with byte order mark (BOM)', function() {
- System['import']('tests/amd-module-bom.js').then(function(m) {
- ok(m.amd);
- start();
- }, err);
-});
-
-asyncTest('AMD with dynamic require callback', function() {
- System['import']('tests/amd-dynamic-require.js').then(function(m) {
- m.onCallback(function(m) {
- ok(m === 'dynamic');
- start();
- });
- });
-});
-
-asyncTest('Loading an AMD bundle', function() {
- System.config({
- bundles: {
- 'tests/amd-bundle.js': ['bundle-*']
- }
- });
- System['import']('bundle-1').then(function(m) {
- ok(m.defined == true);
- start();
- }, err);
-
- stop();
- System['import']('bundle-2').then(function(m) {
- ok(m.defined == true);
- start();
- }, err);
-});
-
-asyncTest('Loading an AMD named define', function() {
- System['import']('tests/nameddefine.js').then(function(m1) {
- ok(m1.converter, 'Showdown not loaded');
- System['import']('another-define').then(function(m2) {
- ok(m2.named === 'define', 'Another module is not defined');
- start();
- }, err);
- }, err);
-});
-
-asyncTest('Loading an AMD bundle with an anonymous define', function() {
- System['import']('tests/anon-named.js').then(function(m) {
- ok(m.anon == true);
- start();
- }, err);
-});
-
-asyncTest('Loading an AMD bundle with multiple anonymous defines', function() {
- System['import']('tests/multiple-anonymous.js').then(function(m) {
- ok(false);
- start();
- }, function(e) {
- ok(e.toString().indexOf('Multiple anonymous') != -1)
- start();
- });
-})
-
-asyncTest('Loading AMD CommonJS form', function() {
- System['import']('tests/amd-cjs-module.js').then(function(m) {
- ok(m.test == 'hi', 'Not defined');
- start();
- }, err);
-});
-
-asyncTest('AMD contextual require toUrl', function() {
- System['import']('tests/amd-contextual.js').then(function(m) {
- ok(m.name == System.baseURL + 'tests/amd-contextual.js');
- ok(m.rel == System.baseURL + 'rel-path.js');
- start();
- }, err);
-});
-
-// TODO: fix!
-/* asyncTest('AMD race condition test', function() {
- System.config({
- bundles: {
- "tests/out.js": ["tests/lib/modB.js"]
- }
- });
-
- var completed = 0;
- function completeImport() {
- if (++completed == 3) {
- ok(true);
- start();
- }
- }
-
- System.import('tests/modA.js').then(completeImport, err);
- setTimeout(function () {
- System.import('tests/modC.js').then(completeImport, err);
- System.import('tests/lib/modB.js').then(completeImport, err);
- }, 10);
-}); */
-
-asyncTest('Loading a CommonJS module', function() {
- System['import']('tests/common-js-module.js').then(function(m) {
- ok(m.hello == 'world', 'module value not defined');
- ok(m.first == 'this is a dep', 'dep value not defined');
- start();
- }, err);
-});
-
-asyncTest('Loading a CommonJS module with this', function() {
- System['import']('tests/cjs-this.js').then(function(m) {
- ok(m.asdf == 'module value');
- start();
- }, err);
-});
-
-asyncTest('CommonJS setting module.exports', function() {
- System['import']('tests/cjs-exports.js').then(function(m) {
- ok(m.e == 'export');
- start();
- }, err);
-});
-
-asyncTest('CommonJS detection variation 1', function() {
- System['import']('tests/commonjs-variation.js').then(function(m) {
- ok(m.e === System.get('@empty'));
- start();
- }, err);
-});
-
-if (!ie8)
-asyncTest('CommonJS detection variation 2', function() {
- System['import']('tests/commonjs-variation2.js').then(function(m) {
- ok(typeof m.OpaqueToken === 'function');
- start();
- }, err);
-});
-
-asyncTest('CommonJS detection test with byte order mark (BOM)', function() {
- System['import']('tests/cjs-exports-bom.js').then(function(m) {
- ok(m.foo == 'bar');
- start();
- }, err);
-});
-
-asyncTest('CommonJS module detection test with byte order mark (BOM)', function() {
- System['import']('tests/cjs-module-bom.js').then(function(m) {
- ok(m.foo == 'bar');
- start();
- }, err);
-});
-
-asyncTest('CommonJS require variations', function() {
- System['import']('tests/commonjs-requires.js').then(function(m) {
- ok(m.d1 == 'd');
- ok(m.d2 == 'd');
- ok(m.d3 == "require('not a dep')");
- ok(m.d4 == "text/* require('still not a dep') text");
- ok(m.d5 == 'text \'quote\' require("yet still not a dep")');
- ok(m.d6 == 'd6');
- ok(m.d7 == 'export');
- start();
- }, err);
-});
-
-asyncTest('CommonJS globals', function() {
- System.config({
- meta: {
- 'tests/commonjs-globals.js': {
- globals: {
- process: './cjs-process.js'
- }
- }
- }
- });
- System['import']('tests/commonjs-globals.js').then(function(m) {
- ok(m.process.env.NODE_ENV)
- start();
- }, err);
-});
-
-asyncTest('CommonJS require.resolve', function() {
- System['import']('tests/cjs-resolve.js').then(function(m) {
- ok(m.substr(m.length - 12, 12) == 'test/tests/a');
- start();
- }, err);
-})
-
-asyncTest('Loading a UMD module', function() {
- System['import']('tests/umd.js').then(function(m) {
- ok(m.d == 'hi', 'module value not defined');
- start();
- }, err);
-});
-
-asyncTest('Loading AMD with format hint', function() {
- System['import']('tests/amd-format.js').then(function(m) {
- ok(m.amd == 'amd', 'AMD not loaded');
- start();
- }, err);
-});
-
-asyncTest('Loading CJS with format hint', function() {
- System['import']('tests/cjs-format.js').then(function(m) {
- ok(m.cjs == 'cjs', 'CJS not loaded');
- start();
- }, err);
-});
-
-asyncTest('CommonJS globals', function() {
- System['import']('tests/cjs-globals.js').then(function(m) {
- ok(m.filename.match(/tests\/cjs-globals\.js$/));
- ok(m.dirname.match(/\/tests$/));
- ok(m.global == global);
- start();
- }, err);
-});
-
-asyncTest('Versions', function() {
- System['import']('tests/zero@0.js').then(function(m) {
- ok(m == '0');
- start()
- }, err);
-});
-
-asyncTest('Loading a module with # in the name', function() {
- System['import']('tests/#.js').then(function(m) {
- ok(m == '#');
- start();
- }, err);
-});
-
-asyncTest('Simple compiler Plugin', function() {
- System.map['coffee'] = 'tests/compiler-plugin.js';
- System['import']('tests/compiler-test.coffee!').then(function(m) {
- ok(m.output == 'plugin output', 'Plugin not working.');
- ok(m.extra == 'yay!', 'Compiler not working.');
- start();
- }, err);
-});
-
-asyncTest('Mapping a plugin argument', function() {
- System.map['bootstrap'] = 'tests/bootstrap@3.1.1';
- System.map['coffee'] = 'tests/compiler-plugin.js';
- System['import']('bootstrap/test.coffee!coffee').then(function(m) {
- ok(m.extra == 'yay!', 'not working');
- start();
- }, err);
-});
-
-asyncTest('Using pluginFirst config', function() {
- System.pluginFirst = true;
- System.map['bootstrap'] = 'tests/bootstrap@3.1.1';
- System.map['coffee'] = 'tests/compiler-plugin.js';
- System['import']('coffee!bootstrap/test.coffee').then(function(m) {
- ok(m.extra == 'yay!', 'not working');
- System.pluginFirst = false;
- start();
- }, err);
-});
-
-asyncTest('Advanced compiler plugin', function() {
- System['import']('tests/compiler-test.js!tests/advanced-plugin.js').then(function(m) {
- ok(m == 'custom fetch:' + System.baseURL + 'tests/compiler-test.js!' + System.baseURL + 'tests/advanced-plugin.js', m);
- start();
- }, err);
-});
-
-asyncTest('Plugin as a dependency', function() {
- System.map['css'] = 'tests/css.js';
- System['import']('tests/cjs-loading-plugin.js').then(function(m) {
- ok(m.pluginSource == 'this is css');
- start();
- }, err);
-});
-
-asyncTest('AMD Circular', function() {
- System['import']('tests/amd-circular1.js').then(function(m) {
- ok(m.outFunc() == 5, 'Expected execution');
- start();
- })['catch'](err);
-});
-
-asyncTest('CJS Circular', function() {
- System['import']('tests/cjs-circular1.js').then(function(m) {
- ok(m.first == 'second value');
- ok(m.firstWas == 'first value', 'Original value');
- start();
- }, err);
-});
-
-asyncTest('System.register Circular', function() {
- System.config({
- meta: {
- 'tests/register-circular1.js': {
- scriptLoad: true
- }
- }
- });
- System['import']('tests/register-circular1.js').then(function(m) {
- ok(m.q == 3, 'Binding not allocated');
- ok(m.r == 5, 'Binding not updated');
- start();
- }, err);
-});
-
-asyncTest('System.register regex test', function() {
- System['import']('tests/register-regex.js').then(function(m) {
- ok(m);
- start();
- }, err);
-});
-
-asyncTest('System.register regex test 2', function() {
- System['import']('tests/register-regex-2.js').then(function(m) {
- ok(m);
- start();
- }, err);
-});
-
-asyncTest('System.register module name arg', function() {
- System['import']('tests/module-name.js').then(function(m) {
- ok(m.name == System.baseURL + 'tests/module-name.js');
- start();
- }, err);
-});
-
-asyncTest('System.register group linking test', function() {
- System.config({
- bundles: {
- 'tests/group-test.js': ['group-a']
- }
- });
- System['import']('group-a').then(function(m) {
- ok(m);
- start();
- }, err);
-});
-
-System.config({
- bundles: {
- 'tests/mixed-bundle.js': ['tree/third', 'tree/cjs', 'tree/jquery', 'tree/second', 'tree/global', 'tree/amd', 'tree/first']
- }
-});
-
-asyncTest('Loading AMD from a bundle', function() {
- System['import']('tree/amd').then(function(m) {
- ok(m.is == 'amd');
- start();
- }, err);
-});
-
-asyncTest('Loading CommonJS from a bundle', function() {
- System['import']('tree/cjs').then(function(m) {
- ok(m.cjs === true);
- start();
- }, err);
-});
-
-asyncTest('Loading a Global from a bundle', function() {
- System['import']('tree/global').then(function(m) {
- ok(m === 'output');
- start();
- }, err);
-});
-
-asyncTest('Loading named System.register', function() {
- System['import']('tree/third').then(function(m) {
- ok(m.some == 'exports');
- start();
- }, err);
-});
-asyncTest('Loading System.register from ES6', function() {
- System.config({
- meta: {
- 'tree/first': {
- format: 'esm'
- }
- }
- });
- System['import']('tree/first').then(function(m) {
- ok(m.p == 5);
- start();
- }, err);
-});
-
-asyncTest('AMD simplified CommonJS wrapping with an aliased require', function() {
- System['import']('tests/amd-simplified-cjs-aliased-require1.js').then(function(m) {
- ok(m.require2,"got dependency from aliased require");
- ok(m.require2.amdCJS,"got dependency from aliased require listed as a dependency");
- start();
- }, err);
-});
-
-asyncTest('Loading dynamic modules with __esModule flag set', function() {
- System['import']('tests/es-module-flag.js').then(function() {
- m = System.get(System.normalizeSync('tests/es-module-flag.js'));
- ok(m.exportName == 'export');
- ok(m['default'] == 'default export');
- ok(m.__esModule === true);
- start();
- }, err);
-});
-
-if (!ie8) {
-asyncTest('ES6 named export loading of CJS', function() {
- System['import']('tests/es-named-import-cjs.js').then(function(m) {
- ok(m.cjsFuncValue === 'named export');
- start();
- });
-});
-
-// TypeScript does not support async functions yet
-if (System.transpiler !== 'typescript')
-asyncTest('Async functions', function() {
- System.babelOptions = { stage: 0 };
- System.traceurOptions = { asyncFunctions: true };
- System['import']('tests/async.js').then(function(m) {
- ok(true);
- start();
- });
-});
-
-if (System.transpiler !== 'typescript')
-asyncTest('Wrapper module support', function() {
- System['import']('tests/wrapper.js').then(function(m) {
- ok(m.d == 'default1', 'Wrapper module not defined.');
- start();
- }, err);
-});
-
-asyncTest('ES6 plugin', function() {
- System['import']('tests/blah.js!tests/es6-plugin.js').then(function(m) {
- ok(m == 'plugin');
- start();
- }, err);
-});
-
-asyncTest('ES6 detection', function() {
- System['import']('tests/es6-detection1.js').then(function(m) {
- ok(true);
- start();
- }, err);
-});
-
-asyncTest('Basic exporting & importing', function() {
- var m1, m2, m3, m4, err;
- var checkComplete = function() {
- if (m1 && m2 && m3 && m4 && err) {
- ok(m1['default'] == 'default1', 'Error defining default 1');
- ok(m2['default'] == 'default2', 'Error defining default 2');
- ok(m3['default'] == 'default3', 'Error defining default 3');
- ok(m4.test == 'default3', 'Error defining module');
- start();
- }
- };
- System['import']('tests/default1.js').then(function(_m1) {
- if (m1 === undefined)
- m1 = null;
- else
- m1 = _m1;
- checkComplete();
- })['catch'](err);
- System['import']('tests/default1.js').then(function(_m1) {
- if (m1 === undefined)
- m1 = null;
- else
- m1 = _m1;
- checkComplete();
- })['catch'](err);
- System['import']('tests/default2.js').then(function(_m2) {
- m2 = _m2;
- checkComplete();
- })['catch'](err);
- System['import']('tests/asdf.js').then(function() {
- }, function(_err) {
- err = _err;
- checkComplete();
- })['catch'](err);
- System['import']('tests/default3.js').then(function(_m3) {
- m3 = _m3;
- checkComplete();
- })['catch'](err);
- System['import']('tests/module.js').then(function(_m4) {
- m4 = _m4;
- checkComplete();
- })['catch'](err);
-});
-
-asyncTest('Export Star', function(assert) {
- System['import']('tests/export-star.js').then(function(m) {
- ok(m.foo == 'foo');
- ok(m.bar == 'bar');
- start();
- }, err);
-});
-
-asyncTest('Importing a mapped loaded module', function() {
- System.map['default1'] = 'tests/default1.js';
- System['import']('default1').then(function(m) {
- System['import']('default1').then(function(m) {
- ok(m, 'no module');
- start();
- }, err);
- }, err);
-});
-
-asyncTest('Loading empty ES6', function() {
- System['import']('tests/empty-es6.js').then(function(m) {
- ok(m && emptyES6);
- start();
- }, err);
-})
-
-asyncTest('Loading ES6 with format hint', function() {
- System['import']('tests/es6-format.js').then(function(m) {
- expect(0);
- start();
- }, err);
-});
-
-asyncTest('Loading ES6 loading AMD', function() {
- System['import']('tests/es6-loading-amd.js').then(function(m) {
- ok(m.amd == true);
- start();
- })
-});
-
-asyncTest('Loading AMD with import *', function() {
- System['import']('tests/es6-import-star-amd.js').then(function(m) {
- ok(m.g == true);
- start();
- }, err);
-});
-
-asyncTest('Loading ES6 and AMD', function() {
- System['import']('tests/es6-and-amd.js').then(function(m) {
- ok(m.amd_module == 'AMD Module');
- ok(m.es6_module == 'ES6 Module');
- start();
- }, err);
-});
-
-asyncTest('ES module deps support', function() {
- System.config({
- meta: {
- 'tests/esm-with-deps.js': {
- deps: ['tests/esm-dep.js']
- }
- }
- });
- System['import']('tests/esm-with-deps.js').then(function(m) {
- ok(m.p == 5);
- ok(global.esmDep == 'esm-dep');
- start();
- });
-});
-
-asyncTest('Module Name meta', function() {
- System['import']('tests/reflection.js').then(function(m) {
- ok(m.myname == System.normalizeSync('tests/reflection.js'), 'Module name not returned');
- start();
- }, err);
-});
-
-asyncTest('Relative dyanamic loading', function() {
- System['import']('tests/reldynamic.js').then(function(m) {
- return m.dynamicLoad();
- })
- .then(function(m) {
- ok(m.dynamic == 'module', 'Dynamic load failed');
- start();
- })
- ['catch'](err);
-});
-
-asyncTest('ES6 Circular', function() {
- System['import']('tests/es6-circular1.js').then(function(m) {
- ok(m.q == 3, 'Binding not allocated');
- if (System.transpiler != '6to5') ok(m.r == 3, 'Binding not updated');
- start();
- }, err);
-});
-
-asyncTest('AMD & CJS circular, ES6 Circular', function() {
- System['import']('tests/all-circular1.js').then(function(m) {
- if (System.transpiler != '6to5') ok(m.q == 4);
- ok(m.o.checkObj() == 'changed');
- start();
- }, err);
-});
-
-asyncTest('AMD -> System.register circular -> ES6', function() {
- System['import']('tests/all-layers1.js').then(function(m) {
- ok(m == true)
- start();
- }, err);
-});
-
-asyncTest('Metadata dependencies work for named defines', function() {
- System['import']('tests/meta-deps.js').then(function(m) {
- return System['import']('b');
- }).then(function(m) {
- ok(m.a === 'a');
- start();
- });
-});
-
-asyncTest('Loading an AMD module that requires another works', function() {
- expect(0);
- System['import']('tests/amd-require.js').then(function(){
- // Just getting this far means it is working.
- start();
- });
-});
-
-asyncTest('Loading a connected tree that connects ES and CJS modules', function(){
- System['import']('tests/connected-tree/a.js').then(function(a){
- ok(a.name === "a");
- start();
- });
-});
-
-asyncTest('Loading two bundles that have a shared dependency', function() {
- System.config({
- bundles: {
- "tests/shared-dep-bundles/a.js": ["lib/shared-dep", "lib/a"],
- "tests/shared-dep-bundles/b.js": ["lib/shared-dep", "lib/b"]
- }
- });
- expect(0);
- System['import']('lib/a').then(function() {
- System['import']('lib/b').then(function() {
- //If it gets here it's fine
- start();
- }, err);
- }, err);
-});
-}
-
-asyncTest("System clone", function() {
- var clonedSystem = new System.constructor();
-
- clonedSystem.baseURL = System.baseURL;
-
- System.map['maptest'] = 'tests/map-test.js';
- clonedSystem.map['maptest'] = 'tests/map-test-dep.js';
-
- Promise.all([System['import']('maptest'), clonedSystem['import']('maptest')]).then(function(modules) {
- var m = modules[0];
- var mClone = modules[1];
-
- ok(m.maptest == 'maptest', 'Mapped module not loaded');
- ok(mClone.dep == 'maptest', 'Mapped module not loaded');
- ok(mClone !== m, "different modules");
-
- start();
- }, err);
-});
-
-asyncTest('Custom loader instance System scoped', function() {
- var customSystem = new System.constructor();
-
- customSystem.baseURL = System.baseURL;
- customSystem.paths = System.paths;
- customSystem.transpiler = System.transpiler;
- customSystem['import']('tests/loader-scoping.js')
- .then(function(m) {
- ok(m.loader == customSystem);
- start();
- }, err);;
-});
-
-if(typeof window !== 'undefined' && window.Worker) {
- asyncTest('Using SystemJS in a Web Worker', function() {
- var worker = new Worker('./tests/worker-' + System.transpiler + '.js');
- worker.onmessage = function(e) {
- ok(e.data.amd === 'AMD Module');
- ok(e.data.es6 === 'ES6 Module');
- start();
- };
- });
-}
-
-asyncTest("Duplicate entries", function() {
- System["import"]('tests/duplicateDeps/m1.js').then(function(m) {
- var r = m.foo() + ":" + m.f3();
- ok(r === "3:3", "duplicate entries in dependency list not handled correctly");
- start();
- })
-});
-
-// new features!!
-if (!ie8)
-asyncTest('Named imports for non-es6', function() {
- System['import']('tests/es6-cjs-named-export.js').then(function(m) {
- ok(m.someExport == 'asdf');
- start();
- }, err);
-});
-
-asyncTest('Globals', function() {
- System.config({
- meta: {
- 'tests/with-global-deps.js': {
- globals: {
- '$$$': 'tests/dep.js'
- }
- }
- }
- });
- System['import']('tests/with-global-deps.js').then(function(m) {
- for (var p in m)
- ok(false);
- ok(!global.$$$);
- start();
- }, err);
-});
-
-asyncTest('Scriptload precompiled global with exports still defined', function() {
- System.config({
- meta: {
- 'tests/global-single-compiled.js': {
- scriptLoad: true,
- exports: 'foobar',
- format: typeof global != 'undefined' ? 'register' : 'global'
- }
- }
- });
- System['import']('tests/global-single-compiled.js').then(function(m) {
- ok(m == 'foo');
- start();
- }, err);
-});
-
-asyncTest('Multi-format deps meta', function() {
- System['import']('tests/amd-extra-deps.js').then(function(m) {
- ok(m.join(',') == '10,5');
- start();
- }, err);
-});
-
-
-asyncTest('Wildcard meta', function() {
- System.config({
- meta: {
- 'tests/cs/main.js': {
- deps: ['./dep.js']
- },
- 'tests/cs/*': {
- loader: 'tests/cs-loader.js'
- }
- }
- });
- System['import']('tests/cs/main.js').then(function(m) {
- ok(m == 'cs');
- start();
- });
-});
-
-asyncTest('Package configuration CommonJS config example', function() {
- System.config({
- map: {
- 'global-test': 'tests/testpkg/test.ts'
- },
- //packageConfigPaths: ['tests/testpk*.json'],
- packageConfigPaths: ['tests/testpkg/system.json'],
- packages: {
- 'tests/testpkg': {
- main: './noext',
- map: {
- "testpkg": "."
- },
- asdf: 'asdf'
- }
- }
- });
-
- Promise.all([
- System['import']('tests/testpkg'),
- System['import']('tests/testpkg/json'),
- System['import']('tests/testpkg/dir/test'),
- System['import']('tests/testpkg/dir2'),
- System['import']('tests/testpkg/dir/'),
- System['import']('tests/testpkg/env-module'),
- System['import']('tests/testpkg/self'),
- System['import']('tests/testpkg/conditional1'),
- System['import']('tests/testpkg/conditional2'),
- System['import']('tests/testpkg/self-load.js'),
- System['import']('tests/testpkg/dir/self-load.js')
- ]).then(function(m) {
- ok(m[0].prop == 'value');
- ok(m[1].prop == 'value');
- ok(m[2] == 'ts');
- ok(m[3].json == 'index');
- ok(m[4] == 'dirindex');
- ok(m[5] == (typeof window != 'undefined' ? 'browser' : 'not browser'));
- ok(m[6].prop == 'value');
- ok(m[7] == 'interpolated!');
- ok(m[8] == 'interpolated!');
- ok(m[9].a.prop == 'value' && m[9].b.prop == 'value');
- ok(m[10].a.prop == 'value' && m[10].b.prop == 'value');
- ok(global.depCacheTest == 'passed');
- start();
- }, err);
-});
-
-asyncTest('Package edge cases', function() {
-
- var clonedSystem = new System.constructor();
-
- var pkgCfg = { defaultExtension: 'asdf' };
-
- try {
- clonedSystem.config({
- packages: {
- '//': pkgCfg
- }
- });
- ok(false);
- }
- catch(e) {
- ok(e.toString().indexOf('not a valid package name') != -1);
- }
-
- try {
- clonedSystem.config({
- packages: {
- 'https://': pkgCfg
- }
- });
- ok(false);
- }
- catch(e) {
- ok(e.toString().indexOf('not a valid package name') != -1);
- }
-
- clonedSystem.config({
- packages: {
- 'https://cdn.jquery.com': pkgCfg,
- '//cdn.jquery.com': pkgCfg
- }
- });
-
- clonedSystem.config({
- packages: {
- // both equivalent:
- '.': pkgCfg,
- './': pkgCfg,
-
- '/': pkgCfg,
-
- // this is now a nested package
- // but our trailling / should avoid extension rules
- // both equivalent:
- '../': pkgCfg,
- '..': pkgCfg
- }
- });
-
- // ensure trailing "/" is equivalent to "tests/testpkg"
- clonedSystem.config({
- packageConfigPaths: ['tests/*.json'],
- packages: {
- 'tests/testpkg2/': {
- defaultExtension: 'js'
- }
- }
- });
-
- // we now have nested packages:
- // testpkg/ within test/ within / root://
- // we're testing that we always select the rules of the inner package
- clonedSystem['import']('tests/testpkg2/').then(function(m) {
- ok(m.asdf == 'asdf');
- start();
- }, err);
-});
-
-asyncTest('Package map circular cases', function() {
- System.config({
- map: {
- tp3: 'tests/testpkg3'
- },
- packages: {
- 'tests/testpkg3': {
- map: {
- './lib': './lib/asdf.js',
- './lib/': './lib/index.js',
- './lib/p': './lib/q.js',
- './src/': './src/index.js',
- './bin': './bin/index.js'
- }
- }
- }
- });
-
- Promise.all([
- System.normalize('tp3/lib'),
- System.normalize('tp3/lib/'),
- System.normalize('tp3/lib/q'),
- System.normalize('tp3/lib/p'),
-
- System.normalize('../lib', System.baseURL + 'tests/testpkg3/asdf/x.js'),
- System.normalize('../lib/', System.baseURL + 'tests/testpkg3/asdf/x.js'),
- System.normalize('../lib/x', System.baseURL + 'tests/testpkg3/asdf/x.js'),
-
- System.normalize('.', System.baseURL + 'tests/testpkg3/lib/a'),
- System.normalize('./', System.baseURL + 'tests/testpkg3/lib/x'),
- System.normalize('./p', System.baseURL + 'tests/testpkg3/lib/x'),
- System.normalize('./q', System.baseURL + 'tests/testpkg3/lib/x'),
-
- System.normalize('./lib', System.baseURL + 'tests/testpkg3/x.js'),
- System.normalize('./lib/', System.baseURL + 'tests/testpkg3/x.js'),
- System.normalize('./lib/p', System.baseURL + 'tests/testpkg3/x.js'),
- System.normalize('./lib/q', System.baseURL + 'tests/testpkg3/x.js'),
-
- System.normalize('../lib/', System.baseURL + 'tests/testpkg3/lib/x.js'),
- System.normalize('../lib/x', System.baseURL + 'tests/testpkg3/lib/x.js'),
- System.normalize('tp3/lib/q', System.baseURL + 'tests/testpkg3/lib/x.js'),
-
- System.normalize('./src', System.baseURL + 'tests/testpkg3/'),
- System.normalize('./src/', System.baseURL + 'tests/testpkg3/'),
- System.normalize('./src/x', System.baseURL + 'tests/testpkg3/'),
-
- System.normalize('tp3/src'),
- System.normalize('tp3/src/'),
- System.normalize('tp3/src/x'),
-
- System.normalize('./bin', System.baseURL + 'tests/testpkg3/'),
- System.normalize('./bin/', System.baseURL + 'tests/testpkg3/'),
- System.normalize('./bin/x', System.baseURL + 'tests/testpkg3/'),
-
- System.normalize('tp3/bin'),
- System.normalize('tp3/bin/'),
- System.normalize('tp3/bin/x'),
-
- System.normalize('.', System.baseURL + 'tests/testpkg3/bin/x')
- ])
- .then(function(n) {
- ok(n[0] == System.baseURL + 'tests/testpkg3/lib/asdf.js');
- ok(n[1] == System.baseURL + 'tests/testpkg3/lib/index.js');
- ok(n[2] == System.baseURL + 'tests/testpkg3/lib/q.js');
- ok(n[3] == System.baseURL + 'tests/testpkg3/lib/q.js');
-
- ok(n[4] == System.baseURL + 'tests/testpkg3/lib/asdf.js');
- ok(n[5] == System.baseURL + 'tests/testpkg3/lib/index.js');
- ok(n[6] == System.baseURL + 'tests/testpkg3/lib/x.js');
-
- ok(n[7] == System.baseURL + 'tests/testpkg3/lib/index.js');
- ok(n[8] == System.baseURL + 'tests/testpkg3/lib/index.js');
- ok(n[9] == System.baseURL + 'tests/testpkg3/lib/q.js');
- ok(n[10] == System.baseURL + 'tests/testpkg3/lib/q.js');
-
- ok(n[11] == System.baseURL + 'tests/testpkg3/lib/asdf.js');
- ok(n[12] == System.baseURL + 'tests/testpkg3/lib/index.js');
- ok(n[13] == System.baseURL + 'tests/testpkg3/lib/q.js');
- ok(n[14] == System.baseURL + 'tests/testpkg3/lib/q.js');
-
- ok(n[15] == System.baseURL + 'tests/testpkg3/lib/index.js');
- ok(n[16] == System.baseURL + 'tests/testpkg3/lib/x.js');
- ok(n[17] == System.baseURL + 'tests/testpkg3/lib/q.js');
-
- ok(n[18] == System.baseURL + 'tests/testpkg3/src.js');
- ok(n[19] == System.baseURL + 'tests/testpkg3/src/index.js');
- ok(n[20] == System.baseURL + 'tests/testpkg3/src/x.js');
-
- ok(n[21] == System.baseURL + 'tests/testpkg3/src.js');
- ok(n[22] == System.baseURL + 'tests/testpkg3/src/index.js');
- ok(n[23] == System.baseURL + 'tests/testpkg3/src/x.js');
-
- ok(n[24] == System.baseURL + 'tests/testpkg3/bin/index.js');
- ok(n[25] == System.baseURL + 'tests/testpkg3/bin/index.js');
- ok(n[26] == System.baseURL + 'tests/testpkg3/bin/x.js');
-
- ok(n[27] == System.baseURL + 'tests/testpkg3/bin/index.js');
- ok(n[28] == System.baseURL + 'tests/testpkg3/bin/index.js');
- ok(n[29] == System.baseURL + 'tests/testpkg3/bin/x.js');
-
- ok(n[30] == System.baseURL + 'tests/testpkg3/bin/index.js');
- start();
- }, err);
-
-});
-
-if (!ie8)
-asyncTest('Conditional loading', function() {
- System.set('env', System.newModule({ 'browser': 'ie' }));
-
- System['import']('tests/branch-#{env|browser}.js').then(function(m) {
- ok(m.branch == 'ie');
- start();
- }, err);
-});
-
-asyncTest('Boolean conditional false', function() {
- System.set('env', System.newModule({ 'js': { 'es5': true } }));
-
- System['import']('tests/branch-boolean.js#?~env|js.es5').then(function(m) {
- ok(m === System.get('@empty'));
- start();
- }, err);
-});
-
-if (!ie8)
-asyncTest('Boolean conditional true', function() {
- System.set('env', System.newModule({ 'js': { 'es5': true } }));
-
- System.config({
- paths: {
- 'branch-boolean.js': 'tests/branch-boolean.js'
- }
- });
-
- System['import']('branch-boolean.js#?env|js.es5').then(function(m) {
- ok(m['default'] === true);
- start();
- }, err);
-});
-
-asyncTest('Loading a System.registerdynamic module (not bundled)', function() {
- System['import']('tests/registerdynamic-main.js').then(function(m) {
- ok(typeof m.dependency === 'function');
- ok(m.dependency() === 'ok');
- start();
- }).then(null, err);
-});
-
-asyncTest('Importing a script with wrong integrity fails', function() {
- System.config({
- meta: {
- 'tests/csp/integrity.js': {
- format: 'amd',
- integrity: 'sha256-abc'
- }
- }
- });
- System['import']('tests/csp/integrity.js').then(function(m) {
- ok(m.integrity == 'integrity');
- start();
- }, function(e) {
- ok(typeof e !== 'undefined');
- console.log('SRI not supported in this browser');
- start();
- });
-});
-
-if (typeof process != 'undefined') {
- asyncTest('Loading Node core modules', function() {
- System['import']('@node/fs').then(function(m) {
- ok(m.writeFile);
- start();
- });
- });
-
-
- asyncTest('No global define leak in Node', function() {
- ok(typeof define == 'undefined');
- start();
- });
-}
-
-asyncTest('Package-local alias esm', function() {
- System.config({
- map: {
- 'package-local-alias-esm': 'tests/package-local-alias'
- },
- packages: {
- 'package-local-alias-esm': {
- main: 'index-esm.js',
- format: 'esm',
- meta: {
- './local-esm': {alias: './local/index-esm.js'}
- }
- }
- }
- });
- System['import']('package-local-alias-esm').then(function(m) {
- ok(m.q == 'q');
- ok(m.fromLocal == 'x');
- start();
- });
-});
-
-asyncTest('Package-local alias cjs', function() {
- System.config({
- map: {
- 'package-local-alias-cjs': 'tests/package-local-alias'
- },
- packages: {
- 'package-local-alias-cjs': {
- main: 'index-cjs.js',
- format: 'cjs',
- meta: {
- './local-cjs': {alias: './local/index-cjs.js'}
- }
- }
- }
- });
- System['import']('package-local-alias-cjs').then(function(m) {
- ok(m.q == 'q');
- ok(m.fromLocal == 'x');
- start();
- });
-});
-
-asyncTest('Package-local alias esm default export', function() {
- System.config({
- map: {
- 'package-local-alias-default-esm': 'tests/package-local-alias'
- },
- packages: {
- 'package-local-alias-default-esm': { // can't reuse package names from previous test
- main: 'index-default-esm.js', // because System.config() results persist across tests
- format: 'esm',
- meta: {
- './local-default-esm': {alias: './local/index-default-esm.js'}
- }
- }
- }
- });
- System['import']('package-local-alias-default-esm').then(function(m) {
- ok(m.q == 'q');
- ok(m.fromLocal == 'x');
- ok(m.fromLocalDirect == 'x');
- start();
- });
-});
-
-asyncTest('Package-local alias cjs default export', function() {
- System.config({
- map: {
- 'package-local-alias-default-cjs': 'tests/package-local-alias'
- },
- packages: {
- 'package-local-alias-default-cjs': {
- main: 'index-default-cjs.js',
- format: 'cjs',
- meta: {
- './local-default-cjs': {alias: './local/index-default-cjs.js'}
- }
- }
- }
- });
- System['import']('package-local-alias-default-cjs').then(function(m) {
- ok(m.q == 'q');
- ok(m.fromLocal == 'x');
- ok(m.fromLocalDirect == 'x');
- start();
- });
-});
-
-
-})(typeof window == 'undefined' ? global : window);
diff --git a/thirdparty/systemjs/test/tests/#.js b/thirdparty/systemjs/test/tests/#.js
deleted file mode 100644
index 0cf86a864..000000000
--- a/thirdparty/systemjs/test/tests/#.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = '#'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/advanced-plugin.js b/thirdparty/systemjs/test/tests/advanced-plugin.js
deleted file mode 100644
index 26c6a450c..000000000
--- a/thirdparty/systemjs/test/tests/advanced-plugin.js
+++ /dev/null
@@ -1,20 +0,0 @@
-
-exports.locate = function(load) {
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- resolve('custom fetch');
- }, 20);
- });
-}
-
-exports.fetch = function(load) {
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- resolve(load.address);
- }, 20);
- });
-}
-
-exports.translate = function(load) {
- load.source = '"deps ./plugin-dep.js"; (typeof window != "undefined" ? window : global).q = "' + load.source + ':' + load.name + '";';
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/all-circular1.js b/thirdparty/systemjs/test/tests/all-circular1.js
deleted file mode 100644
index 131dfecce..000000000
--- a/thirdparty/systemjs/test/tests/all-circular1.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import { a } from './all-circular2.js';
-export var q;
-export function p() {
- q = a;
-}
-
-import o from './all-circular3.js';
-
-export { o }; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/all-circular2.js b/thirdparty/systemjs/test/tests/all-circular2.js
deleted file mode 100644
index c88eceb9c..000000000
--- a/thirdparty/systemjs/test/tests/all-circular2.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { p } from './all-circular1.js';
-export var a = 4;
-p(); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/all-circular3.js b/thirdparty/systemjs/test/tests/all-circular3.js
deleted file mode 100644
index fea5e3f22..000000000
--- a/thirdparty/systemjs/test/tests/all-circular3.js
+++ /dev/null
@@ -1,10 +0,0 @@
-define(function(require, exports) {
- var obj = require('./all-circular4.js').obj;
- exports.checkObj = function() {
- return obj.circular;
- }
- exports.setObj = function() {
- obj.circular = 'changed';
- }
- require('./all-circular4.js').set();
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/all-circular4.js b/thirdparty/systemjs/test/tests/all-circular4.js
deleted file mode 100644
index 692445730..000000000
--- a/thirdparty/systemjs/test/tests/all-circular4.js
+++ /dev/null
@@ -1,5 +0,0 @@
-exports.obj = { circular: 'mess' };
-var setter = require('./all-circular3.js');
-exports.set = function() {
- setter.setObj();
-}
diff --git a/thirdparty/systemjs/test/tests/all-layers1.js b/thirdparty/systemjs/test/tests/all-layers1.js
deleted file mode 100644
index 2dea20d17..000000000
--- a/thirdparty/systemjs/test/tests/all-layers1.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define(['./all-layers2.js'], function(al2) {
- return al2.q == 10 && al2.r == 5;
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/all-layers2.js b/thirdparty/systemjs/test/tests/all-layers2.js
deleted file mode 100644
index a4a72e128..000000000
--- a/thirdparty/systemjs/test/tests/all-layers2.js
+++ /dev/null
@@ -1,20 +0,0 @@
-System.register(["./all-layers3.js"], function($__export) {
- "use strict";
- var q, r, c;
- function p() {
- if (q)
- r = $__export('r', c);
- else
- q = $__export('q', c);
- }
- $__export('p', p);
- return {
- setters: [function(m) {
- c = m.c;
- }],
- execute: function() {
- c = 5;
- p();
- }
- };
-});
diff --git a/thirdparty/systemjs/test/tests/all-layers3.js b/thirdparty/systemjs/test/tests/all-layers3.js
deleted file mode 100644
index ac519f19a..000000000
--- a/thirdparty/systemjs/test/tests/all-layers3.js
+++ /dev/null
@@ -1,17 +0,0 @@
-System.register(["./all-layers2.js", "./all-layers4.js"], function($__export) {
- "use strict";
- var c, p;
- return {
- setters: [
- function(m) {
- p = m.p;
- },
- function(m) {
- $__export('c', c = m.c);
- }
- ],
- execute: function() {
- p();
- }
- };
-});
diff --git a/thirdparty/systemjs/test/tests/all-layers4.js b/thirdparty/systemjs/test/tests/all-layers4.js
deleted file mode 100644
index 4a2d7bf8a..000000000
--- a/thirdparty/systemjs/test/tests/all-layers4.js
+++ /dev/null
@@ -1 +0,0 @@
-export var c = 10; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-bundle.js b/thirdparty/systemjs/test/tests/amd-bundle.js
deleted file mode 100644
index 8856e2db9..000000000
--- a/thirdparty/systemjs/test/tests/amd-bundle.js
+++ /dev/null
@@ -1,6 +0,0 @@
-define('bundle-1', function() {
- return { defined: true };
-});
-define('bundle-2', function() {
- return { defined: true };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-circular1.js b/thirdparty/systemjs/test/tests/amd-circular1.js
deleted file mode 100644
index 2533e9bfd..000000000
--- a/thirdparty/systemjs/test/tests/amd-circular1.js
+++ /dev/null
@@ -1,7 +0,0 @@
-define(function(require, exports) {
- var depFunc = require('./amd-circular2.js').fn;
- exports.val = 5;
- exports.outFunc = function() {
- return depFunc();
- }
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-circular2.js b/thirdparty/systemjs/test/tests/amd-circular2.js
deleted file mode 100644
index df9254d24..000000000
--- a/thirdparty/systemjs/test/tests/amd-circular2.js
+++ /dev/null
@@ -1,6 +0,0 @@
-define(function(require, exports) {
- var circular1 = require('./amd-circular1.js');
- exports.fn = function() {
- return circular1.val;
- }
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-cjs-module.js b/thirdparty/systemjs/test/tests/amd-cjs-module.js
deleted file mode 100644
index 1ac2c3e1a..000000000
--- a/thirdparty/systemjs/test/tests/amd-cjs-module.js
+++ /dev/null
@@ -1,4 +0,0 @@
-define(function(require, exports) {
- var p = require('./amd-dep.js');
- exports.test = 'hi';
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-contextual.js b/thirdparty/systemjs/test/tests/amd-contextual.js
deleted file mode 100644
index b5e886297..000000000
--- a/thirdparty/systemjs/test/tests/amd-contextual.js
+++ /dev/null
@@ -1,6 +0,0 @@
-define(['require', 'module'], function(require, module) {
- return {
- name: module.uri,
- rel: require.toUrl('../rel-path.js')
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-dep-A.js b/thirdparty/systemjs/test/tests/amd-dep-A.js
deleted file mode 100644
index c047cc49f..000000000
--- a/thirdparty/systemjs/test/tests/amd-dep-A.js
+++ /dev/null
@@ -1 +0,0 @@
-A = 10; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-dep-B.js b/thirdparty/systemjs/test/tests/amd-dep-B.js
deleted file mode 100644
index 6f5b4c6b0..000000000
--- a/thirdparty/systemjs/test/tests/amd-dep-B.js
+++ /dev/null
@@ -1 +0,0 @@
-B = 5; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-dep.js b/thirdparty/systemjs/test/tests/amd-dep.js
deleted file mode 100644
index 4ad8f7e5c..000000000
--- a/thirdparty/systemjs/test/tests/amd-dep.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define({
- amd: 'dep'
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-dynamic-require.js b/thirdparty/systemjs/test/tests/amd-dynamic-require.js
deleted file mode 100644
index 6b7315dc3..000000000
--- a/thirdparty/systemjs/test/tests/amd-dynamic-require.js
+++ /dev/null
@@ -1,19 +0,0 @@
-define(['require'], function(require) {
- var cb, module;
-
- require('./amd-dynamic.js', function(_module) {
- module = _module;
-
- if (cb)
- cb(module);
- });
-
- return {
- onCallback: function(_cb) {
- if (module)
- _cb(module);
- else
- cb = _cb;
- }
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-dynamic.js b/thirdparty/systemjs/test/tests/amd-dynamic.js
deleted file mode 100644
index 88692ae46..000000000
--- a/thirdparty/systemjs/test/tests/amd-dynamic.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define(function() {
- return 'dynamic';
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-extra-deps.js b/thirdparty/systemjs/test/tests/amd-extra-deps.js
deleted file mode 100644
index 86b8777ff..000000000
--- a/thirdparty/systemjs/test/tests/amd-extra-deps.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// NB update to "deps[]" when deps is deprecated
-"deps ./amd-dep-A.js";
-"deps ./amd-dep-B.js";
-
-define([], function() {
- return [A, B];
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-format.js b/thirdparty/systemjs/test/tests/amd-format.js
deleted file mode 100644
index 3bc01fe38..000000000
--- a/thirdparty/systemjs/test/tests/amd-format.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- this is AMD
-*/
-// works with comments!!!
-/*
- At least I hope so
-*/
-"amd";
-
-var m = {
- amd: 'amd'
-};
-define(m);
-
-// attempt to fool amd detection
-if (typeof module != 'undefined')
- module.exports = 'hello';
-
diff --git a/thirdparty/systemjs/test/tests/amd-module-2.js b/thirdparty/systemjs/test/tests/amd-module-2.js
deleted file mode 100644
index 5fdcb3e58..000000000
--- a/thirdparty/systemjs/test/tests/amd-module-2.js
+++ /dev/null
@@ -1,6 +0,0 @@
-define([
- './amd-module.js',
- '@empty',
-], function () {
- return { amd: true };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-module-3.js b/thirdparty/systemjs/test/tests/amd-module-3.js
deleted file mode 100644
index 6c9128051..000000000
--- a/thirdparty/systemjs/test/tests/amd-module-3.js
+++ /dev/null
@@ -1,13 +0,0 @@
-define([
- // with a single-line comment
- './amd-module.js',
- /* with a multi-line
- comment
- */
- './amd-module.js'
- // trailing single-line comment
- /* trailing multi-line
- comment */
-], function () {
- return { amd: true };
-});
diff --git a/thirdparty/systemjs/test/tests/amd-module-bom.js b/thirdparty/systemjs/test/tests/amd-module-bom.js
deleted file mode 100644
index 0f3de0b7f..000000000
--- a/thirdparty/systemjs/test/tests/amd-module-bom.js
+++ /dev/null
@@ -1,4 +0,0 @@
-define([], function () {
- // file starts with a byte order mark (BOM)
- return { amd: true };
-});
diff --git a/thirdparty/systemjs/test/tests/amd-module.js b/thirdparty/systemjs/test/tests/amd-module.js
deleted file mode 100644
index 3cb3d58cf..000000000
--- a/thirdparty/systemjs/test/tests/amd-module.js
+++ /dev/null
@@ -1,6 +0,0 @@
-define(['./amd-dep.js'], function(d) {
- return {
- dep: d,
- amd: true
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/amd-require.js b/thirdparty/systemjs/test/tests/amd-require.js
deleted file mode 100644
index 1db1c8a16..000000000
--- a/thirdparty/systemjs/test/tests/amd-require.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define(function(require) {
- require(["tests/amd-dep.js"]);
-});
diff --git a/thirdparty/systemjs/test/tests/amd-simplified-cjs-aliased-require1.js b/thirdparty/systemjs/test/tests/amd-simplified-cjs-aliased-require1.js
deleted file mode 100644
index 819ca44c1..000000000
--- a/thirdparty/systemjs/test/tests/amd-simplified-cjs-aliased-require1.js
+++ /dev/null
@@ -1,7 +0,0 @@
-define(function(req){
- var r2 = req("./amd-simplified-cjs-aliased-require2.js");
- return {
- name: "require1",
- require2: r2
- };
-});
diff --git a/thirdparty/systemjs/test/tests/amd-simplified-cjs-aliased-require2.js b/thirdparty/systemjs/test/tests/amd-simplified-cjs-aliased-require2.js
deleted file mode 100644
index be391226a..000000000
--- a/thirdparty/systemjs/test/tests/amd-simplified-cjs-aliased-require2.js
+++ /dev/null
@@ -1,8 +0,0 @@
-define(["./amd-dep.js","require"],function(amdDep, req){
- var amdCJS = req("./amd-cjs-module.js");
- return {
- name: "require2",
- amdCJS: amdCJS,
- amdDep: amdDep
- };
-});
diff --git a/thirdparty/systemjs/test/tests/anon-named.js b/thirdparty/systemjs/test/tests/anon-named.js
deleted file mode 100644
index 6d0a61315..000000000
--- a/thirdparty/systemjs/test/tests/anon-named.js
+++ /dev/null
@@ -1,10 +0,0 @@
-define('named-in-anon', function() {
- return 'named';
-});
-
-define(['named-in-anon'], function(named) {
- return {
- anon: true,
- named: named
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/async.js b/thirdparty/systemjs/test/tests/async.js
deleted file mode 100644
index f25bf5a81..000000000
--- a/thirdparty/systemjs/test/tests/async.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// will detect as CommonJS
-if (false) require('asdf');
-
-// should detect as ES6 first
-export async function p() {} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/bootstrap@3.1.1/test.coffee b/thirdparty/systemjs/test/tests/bootstrap@3.1.1/test.coffee
deleted file mode 100644
index fc0891795..000000000
--- a/thirdparty/systemjs/test/tests/bootstrap@3.1.1/test.coffee
+++ /dev/null
@@ -1 +0,0 @@
-exports.p = 4;
diff --git a/thirdparty/systemjs/test/tests/branch-boolean.js b/thirdparty/systemjs/test/tests/branch-boolean.js
deleted file mode 100644
index bc5b6ccdb..000000000
--- a/thirdparty/systemjs/test/tests/branch-boolean.js
+++ /dev/null
@@ -1 +0,0 @@
-export default true; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/branch-ie.js b/thirdparty/systemjs/test/tests/branch-ie.js
deleted file mode 100644
index ea184442e..000000000
--- a/thirdparty/systemjs/test/tests/branch-ie.js
+++ /dev/null
@@ -1 +0,0 @@
-export var branch = 'ie'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/bundle.js b/thirdparty/systemjs/test/tests/bundle.js
deleted file mode 100644
index d69e7ca69..000000000
--- a/thirdparty/systemjs/test/tests/bundle.js
+++ /dev/null
@@ -1,7 +0,0 @@
-define('bundle-define1', function() {
- return { name: 'bundle1' };
-});
-
-define('bundle-define2', function() {
- return { name: 'bundle2' };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-circular1.js b/thirdparty/systemjs/test/tests/cjs-circular1.js
deleted file mode 100644
index f2946cf87..000000000
--- a/thirdparty/systemjs/test/tests/cjs-circular1.js
+++ /dev/null
@@ -1,4 +0,0 @@
-exports.first = 'first value';
-var p = require('./cjs-circular2.js').p;
-exports.first = 'second value';
-exports.firstWas = p(); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-circular2.js b/thirdparty/systemjs/test/tests/cjs-circular2.js
deleted file mode 100644
index b6c8d87e4..000000000
--- a/thirdparty/systemjs/test/tests/cjs-circular2.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var first = require('./cjs-circular1.js').first;
-exports.p = function() {
- return first;
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-exports-bom.js b/thirdparty/systemjs/test/tests/cjs-exports-bom.js
deleted file mode 100644
index a3174cc3c..000000000
--- a/thirdparty/systemjs/test/tests/cjs-exports-bom.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.foo = "bar"; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-exports-dep.js b/thirdparty/systemjs/test/tests/cjs-exports-dep.js
deleted file mode 100644
index 326bed6cf..000000000
--- a/thirdparty/systemjs/test/tests/cjs-exports-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.e = require('./cjs-exports.js')(); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-exports.js b/thirdparty/systemjs/test/tests/cjs-exports.js
deleted file mode 100644
index fdd99ca92..000000000
--- a/thirdparty/systemjs/test/tests/cjs-exports.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = F;
-require('./cjs-exports-dep.js');
-function F() {
- return 'export';
-}
-module.exports = require('./cjs-exports-dep.js'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-format.js b/thirdparty/systemjs/test/tests/cjs-format.js
deleted file mode 100644
index 7ac68dc97..000000000
--- a/thirdparty/systemjs/test/tests/cjs-format.js
+++ /dev/null
@@ -1,4 +0,0 @@
-"format cjs";
-if (typeof define != 'undefined')
- define(function() {});
-exports.cjs = 'cjs';
diff --git a/thirdparty/systemjs/test/tests/cjs-globals.js b/thirdparty/systemjs/test/tests/cjs-globals.js
deleted file mode 100644
index d71e2ed57..000000000
--- a/thirdparty/systemjs/test/tests/cjs-globals.js
+++ /dev/null
@@ -1,3 +0,0 @@
-exports.dirname = __dirname;
-exports.filename = __filename;
-exports.global = global; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-loading-plugin.js b/thirdparty/systemjs/test/tests/cjs-loading-plugin.js
deleted file mode 100644
index 11dc2a5a4..000000000
--- a/thirdparty/systemjs/test/tests/cjs-loading-plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./test.css!'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-module-bom.js b/thirdparty/systemjs/test/tests/cjs-module-bom.js
deleted file mode 100644
index 2176395e8..000000000
--- a/thirdparty/systemjs/test/tests/cjs-module-bom.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports.foo = "bar"; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-named-export.js b/thirdparty/systemjs/test/tests/cjs-named-export.js
deleted file mode 100644
index 6609eeafc..000000000
--- a/thirdparty/systemjs/test/tests/cjs-named-export.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var p = module.exports = function() {
-
-}
-
-p.someExport = 'asdf'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-process.js b/thirdparty/systemjs/test/tests/cjs-process.js
deleted file mode 100644
index 7f750c112..000000000
--- a/thirdparty/systemjs/test/tests/cjs-process.js
+++ /dev/null
@@ -1,3 +0,0 @@
-exports.env = {
- NODE_ENV: 'dev'
-}; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-resolve.js b/thirdparty/systemjs/test/tests/cjs-resolve.js
deleted file mode 100644
index 8461373e9..000000000
--- a/thirdparty/systemjs/test/tests/cjs-resolve.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require.resolve('./a'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cjs-this.js b/thirdparty/systemjs/test/tests/cjs-this.js
deleted file mode 100644
index 79a4bb5db..000000000
--- a/thirdparty/systemjs/test/tests/cjs-this.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"format cjs";
-this.asdf = 'module value'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/common-js-dep.js b/thirdparty/systemjs/test/tests/common-js-dep.js
deleted file mode 100644
index 3543bf0bf..000000000
--- a/thirdparty/systemjs/test/tests/common-js-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.output = 'this is a dep'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/common-js-module.js b/thirdparty/systemjs/test/tests/common-js-module.js
deleted file mode 100644
index c7b6c12ee..000000000
--- a/thirdparty/systemjs/test/tests/common-js-module.js
+++ /dev/null
@@ -1,2 +0,0 @@
-exports.first = require('./common-js-dep.js').output;
-exports.hello = 'world';
diff --git a/thirdparty/systemjs/test/tests/commonjs-d.js b/thirdparty/systemjs/test/tests/commonjs-d.js
deleted file mode 100644
index b23a181b8..000000000
--- a/thirdparty/systemjs/test/tests/commonjs-d.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'd'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/commonjs-d2.js b/thirdparty/systemjs/test/tests/commonjs-d2.js
deleted file mode 100644
index 3b340b2e0..000000000
--- a/thirdparty/systemjs/test/tests/commonjs-d2.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'd6'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/commonjs-globals.js b/thirdparty/systemjs/test/tests/commonjs-globals.js
deleted file mode 100644
index 44194a0db..000000000
--- a/thirdparty/systemjs/test/tests/commonjs-globals.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.process = process; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/commonjs-requires.js b/thirdparty/systemjs/test/tests/commonjs-requires.js
deleted file mode 100644
index af80d8058..000000000
--- a/thirdparty/systemjs/test/tests/commonjs-requires.js
+++ /dev/null
@@ -1,40 +0,0 @@
-exports.d6 =
-/**/require('./commonjs-d2.js');
-
-exports.d1 = require(
- './commonjs-d.js'
-);
-
-exports.d2 = (require
-("./commonjs-d.js"));
-
-var regex = / \/* /;
-
-exports.d3 = "require('not a dep')";
-
-exports.d4 = "text/* require('still not a dep') text";
-
-exports.d5 = 'text \'quote\' require("yet still not a dep")';
-
-var regexWithString = /asdfasdf " /;
-
-var regexClose = /asdf " */;
-
-// This comment triggered SystemJS to do a require because of this -> require('')
-exports.d7 = 'export';
-
-var p = false && require('" + "test" + "');
-
-// this line shouldn't be detected
-" = require(", "),\n ";
-
-
-/*
-
-Unsolved breaking cases:
-
-var regex = / " /; var string = " /* " // one line;
-require('asdf') // <- this will now be skipped as it will be in the '/*' comment
-*//*
-
-*/ \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/commonjs-variation.js b/thirdparty/systemjs/test/tests/commonjs-variation.js
deleted file mode 100644
index bf8b8c27e..000000000
--- a/thirdparty/systemjs/test/tests/commonjs-variation.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = {
- e: (function p() {
- return require('@empty');
- })()
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/commonjs-variation2.js b/thirdparty/systemjs/test/tests/commonjs-variation2.js
deleted file mode 100644
index f7a25047b..000000000
--- a/thirdparty/systemjs/test/tests/commonjs-variation2.js
+++ /dev/null
@@ -1,8 +0,0 @@
-Object.defineProperties(module.exports, {
- OpaqueToken: {get: function() {
- return OpaqueToken;
- }},
- __esModule: {value: true}
-});
-
-function OpaqueToken() {} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/compiled.coffee b/thirdparty/systemjs/test/tests/compiled.coffee
deleted file mode 100644
index dd46ac6f7..000000000
--- a/thirdparty/systemjs/test/tests/compiled.coffee
+++ /dev/null
@@ -1 +0,0 @@
-var p = 4; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/compiler-plugin.js b/thirdparty/systemjs/test/tests/compiler-plugin.js
deleted file mode 100644
index e7068fae3..000000000
--- a/thirdparty/systemjs/test/tests/compiler-plugin.js
+++ /dev/null
@@ -1,4 +0,0 @@
-"format cjs";
-exports.translate = function(load) {
- return 'require("tests/global.js"); exports.extra = "yay!"; \n' + load.source;
-}
diff --git a/thirdparty/systemjs/test/tests/compiler-test.coffee b/thirdparty/systemjs/test/tests/compiler-test.coffee
deleted file mode 100644
index a79cb03b2..000000000
--- a/thirdparty/systemjs/test/tests/compiler-test.coffee
+++ /dev/null
@@ -1 +0,0 @@
-exports.output = "plugin output";
diff --git a/thirdparty/systemjs/test/tests/connected-tree/a.js b/thirdparty/systemjs/test/tests/connected-tree/a.js
deleted file mode 100644
index 2ffbcaa58..000000000
--- a/thirdparty/systemjs/test/tests/connected-tree/a.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// a.js
-var c = require("./c.js");
-var b = require('./b.js');
-
-module.exports = {
- name: "a",
- b: b,
- c: c
-};
diff --git a/thirdparty/systemjs/test/tests/connected-tree/b.js b/thirdparty/systemjs/test/tests/connected-tree/b.js
deleted file mode 100644
index 0e658df66..000000000
--- a/thirdparty/systemjs/test/tests/connected-tree/b.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import c from "./c.js";
-
-export default {
- name: "b",
- c: c
-};
diff --git a/thirdparty/systemjs/test/tests/connected-tree/c.js b/thirdparty/systemjs/test/tests/connected-tree/c.js
deleted file mode 100644
index e885e1138..000000000
--- a/thirdparty/systemjs/test/tests/connected-tree/c.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- name: "c"
-}; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/contextual-map-dep.js b/thirdparty/systemjs/test/tests/contextual-map-dep.js
deleted file mode 100644
index c2898baa8..000000000
--- a/thirdparty/systemjs/test/tests/contextual-map-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.mapdep = 'mapdep';
diff --git a/thirdparty/systemjs/test/tests/contextual-test/contextual-map.js b/thirdparty/systemjs/test/tests/contextual-test/contextual-map.js
deleted file mode 100644
index c3192b867..000000000
--- a/thirdparty/systemjs/test/tests/contextual-test/contextual-map.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('maptest');
diff --git a/thirdparty/systemjs/test/tests/cs-loader.js b/thirdparty/systemjs/test/tests/cs-loader.js
deleted file mode 100644
index cc24b3fe9..000000000
--- a/thirdparty/systemjs/test/tests/cs-loader.js
+++ /dev/null
@@ -1,3 +0,0 @@
-exports.translate = function translate(load) {
- return load.source.replace(/#/g, '');
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cs/dep.js b/thirdparty/systemjs/test/tests/cs/dep.js
deleted file mode 100644
index 168695856..000000000
--- a/thirdparty/systemjs/test/tests/cs/dep.js
+++ /dev/null
@@ -1 +0,0 @@
-# language_global = 'cs'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/cs/main.js b/thirdparty/systemjs/test/tests/cs/main.js
deleted file mode 100644
index e4960c7c9..000000000
--- a/thirdparty/systemjs/test/tests/cs/main.js
+++ /dev/null
@@ -1 +0,0 @@
-# module.exports = language_global; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/csp/integrity.js b/thirdparty/systemjs/test/tests/csp/integrity.js
deleted file mode 100644
index 0cd357c7a..000000000
--- a/thirdparty/systemjs/test/tests/csp/integrity.js
+++ /dev/null
@@ -1,5 +0,0 @@
-define(function () {
- return {
- integrity: 'integrity'
- }
-});
diff --git a/thirdparty/systemjs/test/tests/csp/nonce.js b/thirdparty/systemjs/test/tests/csp/nonce.js
deleted file mode 100644
index 35dee5ee5..000000000
--- a/thirdparty/systemjs/test/tests/csp/nonce.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- nonce: 'abc'
-};
diff --git a/thirdparty/systemjs/test/tests/csp/nonce2.js b/thirdparty/systemjs/test/tests/csp/nonce2.js
deleted file mode 100644
index 1c6556170..000000000
--- a/thirdparty/systemjs/test/tests/csp/nonce2.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
- nonce: 'ab'
-};
diff --git a/thirdparty/systemjs/test/tests/css.css b/thirdparty/systemjs/test/tests/css.css
deleted file mode 100644
index 287755162..000000000
--- a/thirdparty/systemjs/test/tests/css.css
+++ /dev/null
@@ -1,3 +0,0 @@
-body {
- background-color: #eee;
-}
diff --git a/thirdparty/systemjs/test/tests/css.js b/thirdparty/systemjs/test/tests/css.js
deleted file mode 100644
index c0a3875e2..000000000
--- a/thirdparty/systemjs/test/tests/css.js
+++ /dev/null
@@ -1,3 +0,0 @@
-exports.instantiate = function(load) {
- return { pluginSource: load.source };
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/deep/deep-dep.js b/thirdparty/systemjs/test/tests/deep/deep-dep.js
deleted file mode 100644
index f053ebf79..000000000
--- a/thirdparty/systemjs/test/tests/deep/deep-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = {};
diff --git a/thirdparty/systemjs/test/tests/deep/deep.js b/thirdparty/systemjs/test/tests/deep/deep.js
deleted file mode 100644
index cb3befa5f..000000000
--- a/thirdparty/systemjs/test/tests/deep/deep.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./deep-dep');
diff --git a/thirdparty/systemjs/test/tests/default1-dep.js b/thirdparty/systemjs/test/tests/default1-dep.js
deleted file mode 100644
index 8771ac87f..000000000
--- a/thirdparty/systemjs/test/tests/default1-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-export var q = 4;
diff --git a/thirdparty/systemjs/test/tests/default1.js b/thirdparty/systemjs/test/tests/default1.js
deleted file mode 100644
index 1ff5f0108..000000000
--- a/thirdparty/systemjs/test/tests/default1.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import q from './default1-dep.js';
-export default 'default1';
-export var d = 'default1'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/default2.js b/thirdparty/systemjs/test/tests/default2.js
deleted file mode 100644
index db40d327f..000000000
--- a/thirdparty/systemjs/test/tests/default2.js
+++ /dev/null
@@ -1 +0,0 @@
-export default 'default2'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/default3.js b/thirdparty/systemjs/test/tests/default3.js
deleted file mode 100644
index fd3505e99..000000000
--- a/thirdparty/systemjs/test/tests/default3.js
+++ /dev/null
@@ -1 +0,0 @@
-export default 'default3'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/dep.js b/thirdparty/systemjs/test/tests/dep.js
deleted file mode 100644
index 20e4f186b..000000000
--- a/thirdparty/systemjs/test/tests/dep.js
+++ /dev/null
@@ -1 +0,0 @@
-define({});
diff --git a/thirdparty/systemjs/test/tests/duplicateDeps/m1.js b/thirdparty/systemjs/test/tests/duplicateDeps/m1.js
deleted file mode 100644
index 77b7efb3b..000000000
--- a/thirdparty/systemjs/test/tests/duplicateDeps/m1.js
+++ /dev/null
@@ -1,23 +0,0 @@
-System.register(["tests/duplicateDeps/m2.js", "tests/duplicateDeps/m2.js", "tests/duplicateDeps/m2.js"], function(exports_1) {
- var m2_1, m2_2;
- function foo() {
- return m2_1.f1() + m2_2.f2();
- }
- exports_1("foo", foo);
- return {
- setters:[
- function (_m2_1) {
- m2_1 = _m2_1;
- },
- function (_m2_2) {
- m2_2 = _m2_2;
- },
- function (_m2_3) {
- var reexports_1 = {};
- reexports_1["f3"] = _m2_3["f3"];
- exports_1(reexports_1);
- }],
- execute: function() {
- }
- }
-});
diff --git a/thirdparty/systemjs/test/tests/duplicateDeps/m2.js b/thirdparty/systemjs/test/tests/duplicateDeps/m2.js
deleted file mode 100644
index 03f71ea8e..000000000
--- a/thirdparty/systemjs/test/tests/duplicateDeps/m2.js
+++ /dev/null
@@ -1,13 +0,0 @@
-System.register([], function(exports_1) {
- function f1() { return 1; }
- exports_1("f1", f1);
- function f2() { return 2; }
- exports_1("f2", f2);
- function f3() { return 3; }
- exports_1("f3", f3);
- return {
- setters:[],
- execute: function() {
- }
- }
-});
diff --git a/thirdparty/systemjs/test/tests/eaa-amd.js b/thirdparty/systemjs/test/tests/eaa-amd.js
deleted file mode 100644
index 65843b0f4..000000000
--- a/thirdparty/systemjs/test/tests/eaa-amd.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define([], function() {
- return 'AMD Module';
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/eaa-es6.js b/thirdparty/systemjs/test/tests/eaa-es6.js
deleted file mode 100644
index 1a2fd7edc..000000000
--- a/thirdparty/systemjs/test/tests/eaa-es6.js
+++ /dev/null
@@ -1 +0,0 @@
-export default 'ES6 Module'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/empty-es6.js b/thirdparty/systemjs/test/tests/empty-es6.js
deleted file mode 100644
index c6fa496fa..000000000
--- a/thirdparty/systemjs/test/tests/empty-es6.js
+++ /dev/null
@@ -1,3 +0,0 @@
-(function(global) {
- global.emptyES6 = true;
-})(typeof window == 'undefined' ? global : window); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/ep/some-repo/main.js b/thirdparty/systemjs/test/tests/ep/some-repo/main.js
deleted file mode 100644
index a6d27d510..000000000
--- a/thirdparty/systemjs/test/tests/ep/some-repo/main.js
+++ /dev/null
@@ -1 +0,0 @@
-export var main = 'here';
diff --git a/thirdparty/systemjs/test/tests/error-loader.js b/thirdparty/systemjs/test/tests/error-loader.js
deleted file mode 100644
index b6b07cd0c..000000000
--- a/thirdparty/systemjs/test/tests/error-loader.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./error.js'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/error-loader2.js b/thirdparty/systemjs/test/tests/error-loader2.js
deleted file mode 100644
index 69b15e06a..000000000
--- a/thirdparty/systemjs/test/tests/error-loader2.js
+++ /dev/null
@@ -1 +0,0 @@
-require('non-existent'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/error.js b/thirdparty/systemjs/test/tests/error.js
deleted file mode 100644
index ca248d227..000000000
--- a/thirdparty/systemjs/test/tests/error.js
+++ /dev/null
@@ -1 +0,0 @@
-foo / bar \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es-module-flag.js b/thirdparty/systemjs/test/tests/es-module-flag.js
deleted file mode 100644
index 0ed2e3149..000000000
--- a/thirdparty/systemjs/test/tests/es-module-flag.js
+++ /dev/null
@@ -1,3 +0,0 @@
-exports.exportName = 'export';
-exports['default'] = 'default export';
-exports.__esModule = true; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es-named-import-cjs-cjs.js b/thirdparty/systemjs/test/tests/es-named-import-cjs-cjs.js
deleted file mode 100644
index a7cc4cd32..000000000
--- a/thirdparty/systemjs/test/tests/es-named-import-cjs-cjs.js
+++ /dev/null
@@ -1,3 +0,0 @@
-exports.cjsFunc = function() {
- return 'named export';
-}; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es-named-import-cjs.js b/thirdparty/systemjs/test/tests/es-named-import-cjs.js
deleted file mode 100644
index f484570c9..000000000
--- a/thirdparty/systemjs/test/tests/es-named-import-cjs.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import {cjsFunc} from './es-named-import-cjs-cjs.js';
-export var cjsFuncValue = cjsFunc(); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es6-and-amd.js b/thirdparty/systemjs/test/tests/es6-and-amd.js
deleted file mode 100644
index 4c0a87465..000000000
--- a/thirdparty/systemjs/test/tests/es6-and-amd.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export {default as amd_module} from './eaa-amd.js';
-export {default as es6_module} from './eaa-es6.js'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es6-circular1.js b/thirdparty/systemjs/test/tests/es6-circular1.js
deleted file mode 100644
index 2cbd289ad..000000000
--- a/thirdparty/systemjs/test/tests/es6-circular1.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import {c} from './es6-circular2.js';
-export var q;
-export var r;
-export function p() {
- if (q)
- r = c;
- else
- q = c;
-}
-p();
diff --git a/thirdparty/systemjs/test/tests/es6-circular2.js b/thirdparty/systemjs/test/tests/es6-circular2.js
deleted file mode 100644
index 2a6f5c391..000000000
--- a/thirdparty/systemjs/test/tests/es6-circular2.js
+++ /dev/null
@@ -1,3 +0,0 @@
-export var c = 3;
-import { p } from './es6-circular1.js';
-p();
diff --git a/thirdparty/systemjs/test/tests/es6-cjs-named-export.js b/thirdparty/systemjs/test/tests/es6-cjs-named-export.js
deleted file mode 100644
index 378335ccf..000000000
--- a/thirdparty/systemjs/test/tests/es6-cjs-named-export.js
+++ /dev/null
@@ -1 +0,0 @@
-export {someExport} from './cjs-named-export.js'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es6-detection1.js b/thirdparty/systemjs/test/tests/es6-detection1.js
deleted file mode 100644
index 3fc252f50..000000000
--- a/thirdparty/systemjs/test/tests/es6-detection1.js
+++ /dev/null
@@ -1 +0,0 @@
-import {q} from './es6-format.js'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es6-format.js b/thirdparty/systemjs/test/tests/es6-format.js
deleted file mode 100644
index 47b28ed47..000000000
--- a/thirdparty/systemjs/test/tests/es6-format.js
+++ /dev/null
@@ -1,6 +0,0 @@
-"format es6";
-
-class q {
-}
-
-
diff --git a/thirdparty/systemjs/test/tests/es6-import-star-amd.js b/thirdparty/systemjs/test/tests/es6-import-star-amd.js
deleted file mode 100644
index 9cf2ff2c0..000000000
--- a/thirdparty/systemjs/test/tests/es6-import-star-amd.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import * as mod from './es6-loading-amd-dep.js';
-
-export var g = mod.default; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es6-loading-amd-dep.js b/thirdparty/systemjs/test/tests/es6-loading-amd-dep.js
deleted file mode 100644
index 78ecb1bf4..000000000
--- a/thirdparty/systemjs/test/tests/es6-loading-amd-dep.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define(function() {
- return true;
-}) \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/es6-loading-amd.js b/thirdparty/systemjs/test/tests/es6-loading-amd.js
deleted file mode 100644
index 565fdd416..000000000
--- a/thirdparty/systemjs/test/tests/es6-loading-amd.js
+++ /dev/null
@@ -1,9 +0,0 @@
-System.register(["./es6-loading-amd-dep.js"], function($__export) {
- "use strict";
- return {
- setters: [function(m) {
- $__export("amd", m.default);
- }],
- execute: function() {}
- };
-});
diff --git a/thirdparty/systemjs/test/tests/es6-plugin.js b/thirdparty/systemjs/test/tests/es6-plugin.js
deleted file mode 100644
index e37de9fce..000000000
--- a/thirdparty/systemjs/test/tests/es6-plugin.js
+++ /dev/null
@@ -1,3 +0,0 @@
-export function fetch() {
- return 'module.exports = "plugin";';
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/esm-dep.js b/thirdparty/systemjs/test/tests/esm-dep.js
deleted file mode 100644
index f700e4920..000000000
--- a/thirdparty/systemjs/test/tests/esm-dep.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export var esmDep = true;
-
-(function(g) {
- g.esmDep = 'esm-dep';
-})(typeof window != 'undefined' ? window : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/esm-with-deps.js b/thirdparty/systemjs/test/tests/esm-with-deps.js
deleted file mode 100644
index 55c925513..000000000
--- a/thirdparty/systemjs/test/tests/esm-with-deps.js
+++ /dev/null
@@ -1 +0,0 @@
-export var p = 5; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/export-star.js b/thirdparty/systemjs/test/tests/export-star.js
deleted file mode 100644
index 31cd2ebac..000000000
--- a/thirdparty/systemjs/test/tests/export-star.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './star-dep.js';
-export var bar = 'bar'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/foo.js b/thirdparty/systemjs/test/tests/foo.js
deleted file mode 100644
index 343cf430b..000000000
--- a/thirdparty/systemjs/test/tests/foo.js
+++ /dev/null
@@ -1,10 +0,0 @@
-System.register("tests/foo.js", [], function($__export) {
- "use strict";
- var __moduleName = "foo";
- return {
- setters: [],
- execute: function() {
- $__export('f', 'f');
- }
- };
-});
diff --git a/thirdparty/systemjs/test/tests/global-dep.js b/thirdparty/systemjs/test/tests/global-dep.js
deleted file mode 100644
index 3f6511023..000000000
--- a/thirdparty/systemjs/test/tests/global-dep.js
+++ /dev/null
@@ -1,5 +0,0 @@
-(function(window) {
- window.jjQuery = {
- v: '1.8.3'
- };
-})(typeof window != 'undefined' ? window : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-encapsulation.js b/thirdparty/systemjs/test/tests/global-encapsulation.js
deleted file mode 100644
index b480da8ae..000000000
--- a/thirdparty/systemjs/test/tests/global-encapsulation.js
+++ /dev/null
@@ -1,3 +0,0 @@
-(function(g) {
- g.globalName = 'encapsulated global';
-})(typeof window != 'undefined' ? window : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-exports-array.js b/thirdparty/systemjs/test/tests/global-exports-array.js
deleted file mode 100644
index ddfb91a37..000000000
--- a/thirdparty/systemjs/test/tests/global-exports-array.js
+++ /dev/null
@@ -1,5 +0,0 @@
-A = 'A';
-
-B = 'B';
-
-C = 'C'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-inaccessible-props.js b/thirdparty/systemjs/test/tests/global-inaccessible-props.js
deleted file mode 100644
index aee7ce02b..000000000
--- a/thirdparty/systemjs/test/tests/global-inaccessible-props.js
+++ /dev/null
@@ -1,8 +0,0 @@
-
-(function(window) {
- if (!('errorOnAccess' in window))
- throw Error();
-
- window.test = 'result of global-inaccessible-props';
-
-})(typeof window != 'undefined' ? window : global);
diff --git a/thirdparty/systemjs/test/tests/global-inline-dep.js b/thirdparty/systemjs/test/tests/global-inline-dep.js
deleted file mode 100644
index 6873a63b9..000000000
--- a/thirdparty/systemjs/test/tests/global-inline-dep.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'format global';
-'deps ./global-dep.js';
-
-
-(function(window) {
- window.newDep = jjQuery.v;
-})(typeof window != 'undefined' ? window : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-inline-export.js b/thirdparty/systemjs/test/tests/global-inline-export.js
deleted file mode 100644
index 0fc07aea5..000000000
--- a/thirdparty/systemjs/test/tests/global-inline-export.js
+++ /dev/null
@@ -1,9 +0,0 @@
-"format global";
-"exports p.r";
-
-(function(window) {
-
- window.p = {
- r: 'r'
- };
-})(typeof window != 'undefined' ? window : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-multi-diff.js b/thirdparty/systemjs/test/tests/global-multi-diff.js
deleted file mode 100644
index 2b58ae2b1..000000000
--- a/thirdparty/systemjs/test/tests/global-multi-diff.js
+++ /dev/null
@@ -1,3 +0,0 @@
-foo = "barz";
-baz = "chaz";
-this.zed = "ted"; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-multi.js b/thirdparty/systemjs/test/tests/global-multi.js
deleted file mode 100644
index e7f0b5cfc..000000000
--- a/thirdparty/systemjs/test/tests/global-multi.js
+++ /dev/null
@@ -1,6 +0,0 @@
-(function(window) {
- window.j$ = window.jjQuery = {
- jquery: 'here'
- };
-})(typeof window != 'undefined' ? window : global);
-
diff --git a/thirdparty/systemjs/test/tests/global-shim-amd.js b/thirdparty/systemjs/test/tests/global-shim-amd.js
deleted file mode 100644
index 9754587be..000000000
--- a/thirdparty/systemjs/test/tests/global-shim-amd.js
+++ /dev/null
@@ -1,6 +0,0 @@
-(function(window) {
- if (false)
- define(function() {
- });
- window.test = 'global';
-})(typeof window != 'undefined' ? window : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-shim-config-dep.js b/thirdparty/systemjs/test/tests/global-shim-config-dep.js
deleted file mode 100644
index a7ec1756b..000000000
--- a/thirdparty/systemjs/test/tests/global-shim-config-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-dep = 'shimmed'
diff --git a/thirdparty/systemjs/test/tests/global-shim-config-exports.js b/thirdparty/systemjs/test/tests/global-shim-config-exports.js
deleted file mode 100644
index 39553bca8..000000000
--- a/thirdparty/systemjs/test/tests/global-shim-config-exports.js
+++ /dev/null
@@ -1 +0,0 @@
-var p = 'export'
diff --git a/thirdparty/systemjs/test/tests/global-shim-config.js b/thirdparty/systemjs/test/tests/global-shim-config.js
deleted file mode 100644
index 62139f6e3..000000000
--- a/thirdparty/systemjs/test/tests/global-shim-config.js
+++ /dev/null
@@ -1,3 +0,0 @@
-(function(window) {
- window.ME = dep;
-})(typeof window != 'undefined' ? window : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-single-compiled.js b/thirdparty/systemjs/test/tests/global-single-compiled.js
deleted file mode 100644
index 1c55c7506..000000000
--- a/thirdparty/systemjs/test/tests/global-single-compiled.js
+++ /dev/null
@@ -1,9 +0,0 @@
-System.registerDynamic([], false, function($__require, $__exports, $__module) {
- var _retrieveGlobal = System.get("@@global-helpers").prepareGlobal($__module.id, null, null);
- (function() {
- var foo = this["foobar"];
- var foo = 'foo';
- this["foobar"] = foo;
- })();
- return _retrieveGlobal();
-}) \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-single.js b/thirdparty/systemjs/test/tests/global-single.js
deleted file mode 100644
index 9f6197b5f..000000000
--- a/thirdparty/systemjs/test/tests/global-single.js
+++ /dev/null
@@ -1 +0,0 @@
-var foo = 'bar'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global-with-export.js b/thirdparty/systemjs/test/tests/global-with-export.js
deleted file mode 100644
index 656ea6a19..000000000
--- a/thirdparty/systemjs/test/tests/global-with-export.js
+++ /dev/null
@@ -1,5 +0,0 @@
-(function(window) {
- window.q = {
- r: 'r'
- };
-})(typeof window != 'undefined' ? window : global); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/global.js b/thirdparty/systemjs/test/tests/global.js
deleted file mode 100644
index ae948f58c..000000000
--- a/thirdparty/systemjs/test/tests/global.js
+++ /dev/null
@@ -1,6 +0,0 @@
-jjQuery = {
- v: '2.0..0'
-};
-another = {
- some: 'thing'
-}; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/group-test.js b/thirdparty/systemjs/test/tests/group-test.js
deleted file mode 100644
index 61e4eea78..000000000
--- a/thirdparty/systemjs/test/tests/group-test.js
+++ /dev/null
@@ -1,34 +0,0 @@
-"format register";
-
-System.register("group-c", [], function($__export) {
- "use strict";
- var __moduleName = "group-c";
- return {
- setters: [],
- execute: function() {
- $__export('default', 'bar');
- }
- };
-});
-
-
-
-System.registerDynamic("group-b", ["group-c"], false, function(__require, __exports, __module) {
- var _retrieveGlobal = System.get("@@global-helpers").prepareGlobal(__module.id);
- (function() {
- this.foo = 'foo';
- }).call(System.global);
- return _retrieveGlobal();
-});
-
-System.register("group-a", ["./group-b"], function($__export) {
- "use strict";
- var __moduleName = "group-a";
- return {
- setters: [function(m) {}],
- execute: function() {}
- };
-});
-
-
-
diff --git a/thirdparty/systemjs/test/tests/hbs.hbs b/thirdparty/systemjs/test/tests/hbs.hbs
deleted file mode 100644
index 6213adcb4..000000000
--- a/thirdparty/systemjs/test/tests/hbs.hbs
+++ /dev/null
@@ -1 +0,0 @@
-<h1>{{title}}</h1>
diff --git a/thirdparty/systemjs/test/tests/inline-depends-dep.js b/thirdparty/systemjs/test/tests/inline-depends-dep.js
deleted file mode 100644
index 9310d31aa..000000000
--- a/thirdparty/systemjs/test/tests/inline-depends-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-window.depValue = 'dep'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/inline-depends.js b/thirdparty/systemjs/test/tests/inline-depends.js
deleted file mode 100644
index 61b318777..000000000
--- a/thirdparty/systemjs/test/tests/inline-depends.js
+++ /dev/null
@@ -1 +0,0 @@
-window.dep = window.depValue; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/jquery-named.js b/thirdparty/systemjs/test/tests/jquery-named.js
deleted file mode 100644
index e53799d35..000000000
--- a/thirdparty/systemjs/test/tests/jquery-named.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define('jquery-named', function() {
- return { is: 'jquery' };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/jquery.js b/thirdparty/systemjs/test/tests/jquery.js
deleted file mode 100644
index e0ec49a53..000000000
--- a/thirdparty/systemjs/test/tests/jquery.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var a = 'a';
-module.exports = require(a); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/legacy-plugin.js b/thirdparty/systemjs/test/tests/legacy-plugin.js
deleted file mode 100644
index 89fd23f8e..000000000
--- a/thirdparty/systemjs/test/tests/legacy-plugin.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = function(name, address, fetch, callback, errback) {
- fetch(address, function(source) {
- callback('exports.plugin = true; ' + source);
- });
-}
diff --git a/thirdparty/systemjs/test/tests/loader-scoping.js b/thirdparty/systemjs/test/tests/loader-scoping.js
deleted file mode 100644
index 656184c5f..000000000
--- a/thirdparty/systemjs/test/tests/loader-scoping.js
+++ /dev/null
@@ -1 +0,0 @@
-export let loader = System; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/main-bundle.js b/thirdparty/systemjs/test/tests/main-bundle.js
deleted file mode 100644
index 9bf9a306d..000000000
--- a/thirdparty/systemjs/test/tests/main-bundle.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define('jquery', function() {
- return { name: 'jquery-bundled' };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/main-dep.js b/thirdparty/systemjs/test/tests/main-dep.js
deleted file mode 100644
index 83e0e77d4..000000000
--- a/thirdparty/systemjs/test/tests/main-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.dep = 'value'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/main.js b/thirdparty/systemjs/test/tests/main.js
deleted file mode 100644
index 7e6f820a0..000000000
--- a/thirdparty/systemjs/test/tests/main.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./main-dep'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/map-test-dep.js b/thirdparty/systemjs/test/tests/map-test-dep.js
deleted file mode 100644
index 8085c9632..000000000
--- a/thirdparty/systemjs/test/tests/map-test-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.dep = 'maptest';
diff --git a/thirdparty/systemjs/test/tests/map-test.js b/thirdparty/systemjs/test/tests/map-test.js
deleted file mode 100644
index e87087e78..000000000
--- a/thirdparty/systemjs/test/tests/map-test.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.maptest = require('./map-test-dep.js').dep;
diff --git a/thirdparty/systemjs/test/tests/map-test/sub.js b/thirdparty/systemjs/test/tests/map-test/sub.js
deleted file mode 100644
index 64dcc8a01..000000000
--- a/thirdparty/systemjs/test/tests/map-test/sub.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.maptest = 'maptestsub';
diff --git a/thirdparty/systemjs/test/tests/map-version.js b/thirdparty/systemjs/test/tests/map-version.js
deleted file mode 100644
index 56ad56a96..000000000
--- a/thirdparty/systemjs/test/tests/map-version.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./mvd@1.js'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/meta-deps.js b/thirdparty/systemjs/test/tests/meta-deps.js
deleted file mode 100644
index 6bf3b4520..000000000
--- a/thirdparty/systemjs/test/tests/meta-deps.js
+++ /dev/null
@@ -1,21 +0,0 @@
-(function(global) {
-
-System.config({
- meta: {
- b: {
- deps: ['a']
- }
- }
-});
-
-define('a', [], function() {
- global.MODULEA = 'a';
-});
-
-define('b', [], function() {
- return {
- a: global.MODULEA
- };
-});
-
-})(typeof window == 'undefined' ? global : window); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/meta-override.js b/thirdparty/systemjs/test/tests/meta-override.js
deleted file mode 100644
index b820ec262..000000000
--- a/thirdparty/systemjs/test/tests/meta-override.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"format global";
-export var p = 'value'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/mixed-bundle.js b/thirdparty/systemjs/test/tests/mixed-bundle.js
deleted file mode 100644
index 58a25c355..000000000
--- a/thirdparty/systemjs/test/tests/mixed-bundle.js
+++ /dev/null
@@ -1,68 +0,0 @@
-System.register("tree/third", [], function($__export) {
- var some;
- return {
- setters: [],
- execute: function() {
- some = $__export('some', 'exports');
- }
- };
-});
-
-System.registerDynamic("tree/cjs", [], true, function(require, exports, __moduleName) {
- var global = System.global;
- var __define = global.define;
- global.define = undefined;
- var module = { exports: exports };
- var process = System.get("@@nodeProcess");
- exports.cjs = true;
- global.define = __define;
- return module.exports;
-});
-
-System.registerDynamic("tree/jquery", [], false, function(require, exports, __moduleName) {
- var _retrieveGlobal = System.get("@@global-helpers").prepareGlobal(__moduleName);
- this.jquery = {};
-
-
- return _retrieveGlobal();
-});
-
-System.register("tree/second", ["./third", "./cjs"], function($__export) {
- "use strict";
- var __moduleName = "tree/second";
- var q;
- return {
- setters: [function() {}, function() {}],
- execute: function() {
- q = $__export('q', 4);
- }
- };
-});
-
-System.registerDynamic("tree/global", ['./jquery'], false, function(__require, __exports, __moduleName) {
- var _retrieveGlobal = System.get("@@global-helpers").prepareGlobal(__moduleName, "jquery.test");
- "deps ./jquery";
- "exports jquery.test";
- this.jquery = this.jquery || {};
- this.jquery.test = 'output';
-
- this["jquery.test"] = jquery.test;
- return _retrieveGlobal();
-});
-
-System.registerDynamic("tree/amd", ['./global'], false, function() {
- return { is: 'amd' };
-});
-
-
-System.register("tree/first", ["./second", "./amd"], function($__export) {
- "use strict";
- var __moduleName = "tree/first";
- var p;
- return {
- setters: [function() {}, function() {}],
- execute: function() {
- p = $__export('p', 5);
- }
- };
-});
diff --git a/thirdparty/systemjs/test/tests/modA.js b/thirdparty/systemjs/test/tests/modA.js
deleted file mode 100644
index 5e9b95304..000000000
--- a/thirdparty/systemjs/test/tests/modA.js
+++ /dev/null
@@ -1,7 +0,0 @@
-define(function (require, exports, module) {
-'use strict';
-
- var B = require("tests/lib/modB.js");
- var C = require("./modC.js");
- exports.A = "A";
-});
diff --git a/thirdparty/systemjs/test/tests/modC.js b/thirdparty/systemjs/test/tests/modC.js
deleted file mode 100644
index 00f89c525..000000000
--- a/thirdparty/systemjs/test/tests/modC.js
+++ /dev/null
@@ -1,5 +0,0 @@
-define(function (require, exports, module) {
-'use strict';
-
-
-});
diff --git a/thirdparty/systemjs/test/tests/module-name.js b/thirdparty/systemjs/test/tests/module-name.js
deleted file mode 100644
index 4076c2b6e..000000000
--- a/thirdparty/systemjs/test/tests/module-name.js
+++ /dev/null
@@ -1,8 +0,0 @@
-System.register([], function(_export, _context) {
- return {
- setters: [],
- execute: function() {
- _export('name', _context.id);
- }
- };
-}) \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/module.js b/thirdparty/systemjs/test/tests/module.js
deleted file mode 100644
index 45cd96970..000000000
--- a/thirdparty/systemjs/test/tests/module.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import * as default3 from "./default3.js";
-
-export var test = default3.default; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/multiple-anonymous.js b/thirdparty/systemjs/test/tests/multiple-anonymous.js
deleted file mode 100644
index 5e4b93f98..000000000
--- a/thirdparty/systemjs/test/tests/multiple-anonymous.js
+++ /dev/null
@@ -1,14 +0,0 @@
-define('named-in-anon', function() {
- return 'named';
-});
-
-define(['named-in-anon'], function(named) {
- return {
- anon: true,
- named: named
- };
-});
-
-define([], function() {
-
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/mypackage/index.js b/thirdparty/systemjs/test/tests/mypackage/index.js
deleted file mode 100644
index 78b94fe65..000000000
--- a/thirdparty/systemjs/test/tests/mypackage/index.js
+++ /dev/null
@@ -1 +0,0 @@
-this.mapDep = 'bar';
diff --git a/thirdparty/systemjs/test/tests/mypackage/lib/bar.js b/thirdparty/systemjs/test/tests/mypackage/lib/bar.js
deleted file mode 100644
index e198b88a4..000000000
--- a/thirdparty/systemjs/test/tests/mypackage/lib/bar.js
+++ /dev/null
@@ -1,2 +0,0 @@
-bar = 'bar';
-exports = {};
diff --git a/thirdparty/systemjs/test/tests/mypackage/src/foo.js b/thirdparty/systemjs/test/tests/mypackage/src/foo.js
deleted file mode 100644
index 31e546b5a..000000000
--- a/thirdparty/systemjs/test/tests/mypackage/src/foo.js
+++ /dev/null
@@ -1,3 +0,0 @@
-file = 'foo'
-if (typeof define != 'undefined')
- define({});
diff --git a/thirdparty/systemjs/test/tests/nameddefine.js b/thirdparty/systemjs/test/tests/nameddefine.js
deleted file mode 100644
index f0a302971..000000000
--- a/thirdparty/systemjs/test/tests/nameddefine.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var Showdown = { converter: true };
-
-// export
-if (typeof module !== 'undefined') module.exports = Showdown;
-
-// stolen from AMD branch of underscore
-// AMD define happens at the end for compatibility with AMD loaders
-// that don't enforce next-turn semantics on modules.
-if (typeof define === 'function' && define.amd) {
- define('tests/nameddefine.js', function() {
- return Showdown;
- });
-}
-define('another-define', { named: 'define' });
diff --git a/thirdparty/systemjs/test/tests/no-default-ext/file.ext b/thirdparty/systemjs/test/tests/no-default-ext/file.ext
deleted file mode 100644
index 0194738d0..000000000
--- a/thirdparty/systemjs/test/tests/no-default-ext/file.ext
+++ /dev/null
@@ -1 +0,0 @@
-exports.ext = 'ext';
diff --git a/thirdparty/systemjs/test/tests/normalize-hook-test.js b/thirdparty/systemjs/test/tests/normalize-hook-test.js
deleted file mode 100644
index f4d3fb627..000000000
--- a/thirdparty/systemjs/test/tests/normalize-hook-test.js
+++ /dev/null
@@ -1 +0,0 @@
-"hello world"; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/out.js b/thirdparty/systemjs/test/tests/out.js
deleted file mode 100644
index 9eb31e4c1..000000000
--- a/thirdparty/systemjs/test/tests/out.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"bundle";
-(function() {
-var define = System.amdDefine;
-define("tests/lib/modD.js", ["require", "exports", "module"], function(require, exports, module) {
- 'use strict';
- exports.D = "D";
-});
-
-})();
-(function() {
-var define = System.amdDefine;
-define("tests/lib/modB.js", ["require", "exports", "module", "../modC.js", "./modD.js"], function(require, exports, module) {
- 'use strict';
- require('../modC.js');
- require('./modD.js');
- exports.B = "B";
-});
-
-})(); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/package-local-alias/index-cjs.js b/thirdparty/systemjs/test/tests/package-local-alias/index-cjs.js
deleted file mode 100644
index 0cd8dedcc..000000000
--- a/thirdparty/systemjs/test/tests/package-local-alias/index-cjs.js
+++ /dev/null
@@ -1,6 +0,0 @@
-
-var local = require('./local-cjs');
-
-exports.q = 'q';
-
-exports.fromLocal = local.x;
diff --git a/thirdparty/systemjs/test/tests/package-local-alias/index-default-cjs.js b/thirdparty/systemjs/test/tests/package-local-alias/index-default-cjs.js
deleted file mode 100644
index d0a59da14..000000000
--- a/thirdparty/systemjs/test/tests/package-local-alias/index-default-cjs.js
+++ /dev/null
@@ -1,10 +0,0 @@
-
-var local = require('./local-default-cjs');
-
-exports.q = 'q';
-
-exports.fromLocal = local;
-
-var localDirect = require('./local/index-default-cjs.js');
-
-exports.fromLocalDirect = localDirect;
diff --git a/thirdparty/systemjs/test/tests/package-local-alias/index-default-esm.js b/thirdparty/systemjs/test/tests/package-local-alias/index-default-esm.js
deleted file mode 100644
index aead1e036..000000000
--- a/thirdparty/systemjs/test/tests/package-local-alias/index-default-esm.js
+++ /dev/null
@@ -1,10 +0,0 @@
-
-import local from './local-default-esm';
-
-export var q = 'q';
-export var fromLocal = local;
-
-import localDirect from './local/index-default-esm.js';
-
-export var fromLocalDirect = localDirect;
-
diff --git a/thirdparty/systemjs/test/tests/package-local-alias/index-esm.js b/thirdparty/systemjs/test/tests/package-local-alias/index-esm.js
deleted file mode 100644
index 809c99695..000000000
--- a/thirdparty/systemjs/test/tests/package-local-alias/index-esm.js
+++ /dev/null
@@ -1,5 +0,0 @@
-
-import {x} from './local-esm';
-
-export var q = 'q';
-export var fromLocal = x; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/package-local-alias/local/index-cjs.js b/thirdparty/systemjs/test/tests/package-local-alias/local/index-cjs.js
deleted file mode 100644
index af02af190..000000000
--- a/thirdparty/systemjs/test/tests/package-local-alias/local/index-cjs.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.x = 'x';
diff --git a/thirdparty/systemjs/test/tests/package-local-alias/local/index-default-cjs.js b/thirdparty/systemjs/test/tests/package-local-alias/local/index-default-cjs.js
deleted file mode 100644
index ee03c3617..000000000
--- a/thirdparty/systemjs/test/tests/package-local-alias/local/index-default-cjs.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'x';
diff --git a/thirdparty/systemjs/test/tests/package-local-alias/local/index-default-esm.js b/thirdparty/systemjs/test/tests/package-local-alias/local/index-default-esm.js
deleted file mode 100644
index d35f42cc0..000000000
--- a/thirdparty/systemjs/test/tests/package-local-alias/local/index-default-esm.js
+++ /dev/null
@@ -1,2 +0,0 @@
-
-export default 'x';
diff --git a/thirdparty/systemjs/test/tests/package-local-alias/local/index-esm.js b/thirdparty/systemjs/test/tests/package-local-alias/local/index-esm.js
deleted file mode 100644
index 5039a381e..000000000
--- a/thirdparty/systemjs/test/tests/package-local-alias/local/index-esm.js
+++ /dev/null
@@ -1 +0,0 @@
-export var x = 'x';
diff --git a/thirdparty/systemjs/test/tests/path/deep.js b/thirdparty/systemjs/test/tests/path/deep.js
deleted file mode 100644
index e254c491a..000000000
--- a/thirdparty/systemjs/test/tests/path/deep.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'path';
diff --git a/thirdparty/systemjs/test/tests/plugin-dep.js b/thirdparty/systemjs/test/tests/plugin-dep.js
deleted file mode 100644
index 4485e45e4..000000000
--- a/thirdparty/systemjs/test/tests/plugin-dep.js
+++ /dev/null
@@ -1,8 +0,0 @@
-System.register([], function($__export) {
- return {
- setters: [],
- execute: function() {
- $__export('p', 5);
- }
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/plugin@1.2.3/plugin.js b/thirdparty/systemjs/test/tests/plugin@1.2.3/plugin.js
deleted file mode 100644
index 741d6e0f6..000000000
--- a/thirdparty/systemjs/test/tests/plugin@1.2.3/plugin.js
+++ /dev/null
@@ -1,3 +0,0 @@
-exports.translate = function(load) {
- load.source += '\nexports.versionedPlugin = true;';
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/reflection.js b/thirdparty/systemjs/test/tests/reflection.js
deleted file mode 100644
index 765dfe816..000000000
--- a/thirdparty/systemjs/test/tests/reflection.js
+++ /dev/null
@@ -1 +0,0 @@
-export var myname = __moduleName;
diff --git a/thirdparty/systemjs/test/tests/register-circular1.js b/thirdparty/systemjs/test/tests/register-circular1.js
deleted file mode 100644
index 178980f73..000000000
--- a/thirdparty/systemjs/test/tests/register-circular1.js
+++ /dev/null
@@ -1,24 +0,0 @@
-System.register(["./register-circular2.js"], function($__export) {
- "use strict";
- var c,
- q,
- r;
- function p() {
- if (q)
- $__export("r", r = c);
- else
- $__export("q", q = c);
- }
- $__export("p", p);
- return {
- setters: [function(m) {
- c = m.c;
- }],
- execute: function() {
- c = 5;
- q = $__export("q", q);
- r = $__export("r", r);
- p();
- }
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/register-circular2.js b/thirdparty/systemjs/test/tests/register-circular2.js
deleted file mode 100644
index 5b661b81d..000000000
--- a/thirdparty/systemjs/test/tests/register-circular2.js
+++ /dev/null
@@ -1,14 +0,0 @@
-System.register(["./register-circular1.js"], function($__export) {
- "use strict";
- var c,
- p;
- return {
- setters: [function(m) {
- p = m.p;
- }],
- execute: function() {
- c = $__export("c", 3);
- p();
- }
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/register-default-extension.js b/thirdparty/systemjs/test/tests/register-default-extension.js
deleted file mode 100644
index 0ab2b012a..000000000
--- a/thirdparty/systemjs/test/tests/register-default-extension.js
+++ /dev/null
@@ -1,8 +0,0 @@
-System.register('custom/file.ext', [], function(_export) {
- return {
- setters: [],
- execute: function() {
- _export('custom', 'ext');
- }
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/register-regex-2.js b/thirdparty/systemjs/test/tests/register-regex-2.js
deleted file mode 100644
index 3715b11e6..000000000
--- a/thirdparty/systemjs/test/tests/register-regex-2.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * @file file comment
- * ...
- */
-
-/**
- * module comment
- * ...
- */
-System.register([], function() {
- return {
- setters: [],
- execute: function() {}
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/register-regex.js b/thirdparty/systemjs/test/tests/register-regex.js
deleted file mode 100644
index 847e818fd..000000000
--- a/thirdparty/systemjs/test/tests/register-regex.js
+++ /dev/null
@@ -1,18 +0,0 @@
-//// /collection/
-//import 'test/background/collection/clientErrors.spec';
-//import 'test/background/collection/playlistItems.spec';
-//import 'test/background/collection/playlists.spec';
-//import 'test/background/collection/searchResults.spec';
-//import 'test/background/collection/videos.spec';
-//import 'test/background/collection/streamItems.spec';
-
-//// /model/
-//import 'test/background/model/activePlaylistManager.spec';
-//import 'test/background/model/clientErrorManager.spec';
-//import 'test/background/model/dataSource.spec';
-//import 'test/background/model/playlistItem.spec';
-//import 'test/background/model/playlistItems.spec';
-//import 'test/background/model/relatedVideosManager.spec';
-//import 'test/background/model/signInManager.spec';
-//import 'test/background/model/user.spec';
-//import 'test/background/model/youTubeV3API.spec'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/registerdynamic-main.js b/thirdparty/systemjs/test/tests/registerdynamic-main.js
deleted file mode 100644
index dbd630a1d..000000000
--- a/thirdparty/systemjs/test/tests/registerdynamic-main.js
+++ /dev/null
@@ -1,11 +0,0 @@
-System.register(["./registerdynamic-notbundled.js"], function(_export) {
- var dependency;
- return {
- setters: [function(_dependency) {
- dependency = _dependency['default'];
- }],
- execute: function() {
- _export("dependency", dependency);
- }
- }
-});
diff --git a/thirdparty/systemjs/test/tests/registerdynamic-notbundled.js b/thirdparty/systemjs/test/tests/registerdynamic-notbundled.js
deleted file mode 100644
index 3406df504..000000000
--- a/thirdparty/systemjs/test/tests/registerdynamic-notbundled.js
+++ /dev/null
@@ -1,5 +0,0 @@
-System.registerDynamic([], true, function(require, exports, module) {
- module.exports = function() {
- return 'ok';
- };
-});
diff --git a/thirdparty/systemjs/test/tests/reldynamic.js b/thirdparty/systemjs/test/tests/reldynamic.js
deleted file mode 100644
index 99b5202a8..000000000
--- a/thirdparty/systemjs/test/tests/reldynamic.js
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-export function dynamicLoad() {
- return System.import('./reldynamicdep.js', __moduleName);
-}
diff --git a/thirdparty/systemjs/test/tests/reldynamicdep.js b/thirdparty/systemjs/test/tests/reldynamicdep.js
deleted file mode 100644
index 96da4b8e9..000000000
--- a/thirdparty/systemjs/test/tests/reldynamicdep.js
+++ /dev/null
@@ -1 +0,0 @@
-export var dynamic = 'module';
diff --git a/thirdparty/systemjs/test/tests/shared-dep-bundles/a.js b/thirdparty/systemjs/test/tests/shared-dep-bundles/a.js
deleted file mode 100644
index 76aef0ec9..000000000
--- a/thirdparty/systemjs/test/tests/shared-dep-bundles/a.js
+++ /dev/null
@@ -1,33 +0,0 @@
-"format register";
-
-System.register("lib/shared-dep", [], function($__export) {
- "use strict";
- var __moduleName = "lib/shared-dep";
- function shared() {}
- $__export("default", shared);
- return {
- setters: [],
- execute: function() {
- ;
- }
- };
-});
-
-
-
-System.register("lib/a", ["./shared-dep"], function($__export) {
- "use strict";
- var __moduleName = "lib/a";
- var shared;
- return {
- setters: [function(m) {
- shared = m.default;
- }],
- execute: function() {
- }
- };
-});
-
-
-
-//# sourceMappingURL=a.js.map \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/shared-dep-bundles/b.js b/thirdparty/systemjs/test/tests/shared-dep-bundles/b.js
deleted file mode 100644
index eec0f0bf4..000000000
--- a/thirdparty/systemjs/test/tests/shared-dep-bundles/b.js
+++ /dev/null
@@ -1,33 +0,0 @@
-"format register";
-
-System.register("lib/shared-dep", [], function($__export) {
- "use strict";
- var __moduleName = "lib/shared-dep";
- function shared() {}
- $__export("default", shared);
- return {
- setters: [],
- execute: function() {
- ;
- }
- };
-});
-
-
-
-System.register("lib/b", ["./shared-dep"], function($__export) {
- "use strict";
- var __moduleName = "lib/b";
- var shared;
- return {
- setters: [function(m) {
- shared = m.default;
- }],
- execute: function() {
- }
- };
-});
-
-
-
-//# sourceMappingURL=b.js.map \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/shim-map-test-dep.js b/thirdparty/systemjs/test/tests/shim-map-test-dep.js
deleted file mode 100644
index 409cf392a..000000000
--- a/thirdparty/systemjs/test/tests/shim-map-test-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-shimmapdep = 'depvalue' \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/shim-package/shim-map-test.js b/thirdparty/systemjs/test/tests/shim-package/shim-map-test.js
deleted file mode 100644
index 3dc9d9e8a..000000000
--- a/thirdparty/systemjs/test/tests/shim-package/shim-map-test.js
+++ /dev/null
@@ -1 +0,0 @@
-(typeof window != 'undefined' ? window : global).shimdep = shimmapdep; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/some-json.json b/thirdparty/systemjs/test/tests/some-json.json
deleted file mode 100644
index ee68c7e15..000000000
--- a/thirdparty/systemjs/test/tests/some-json.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "some": "json"
-}
diff --git a/thirdparty/systemjs/test/tests/some-text.txt b/thirdparty/systemjs/test/tests/some-text.txt
deleted file mode 100644
index 9ce617009..000000000
--- a/thirdparty/systemjs/test/tests/some-text.txt
+++ /dev/null
@@ -1 +0,0 @@
-this is some text
diff --git a/thirdparty/systemjs/test/tests/star-dep.js b/thirdparty/systemjs/test/tests/star-dep.js
deleted file mode 100644
index 0b7981c28..000000000
--- a/thirdparty/systemjs/test/tests/star-dep.js
+++ /dev/null
@@ -1 +0,0 @@
-export var foo = 'foo'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/subcontextual-map/submodule.js b/thirdparty/systemjs/test/tests/subcontextual-map/submodule.js
deleted file mode 100644
index ffc2d7fe5..000000000
--- a/thirdparty/systemjs/test/tests/subcontextual-map/submodule.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define(['dep'], function(dep) {
- return dep;
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/subcontextual-mapdep.js b/thirdparty/systemjs/test/tests/subcontextual-mapdep.js
deleted file mode 100644
index ad8c9d6d6..000000000
--- a/thirdparty/systemjs/test/tests/subcontextual-mapdep.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'submapdep'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/test.css b/thirdparty/systemjs/test/tests/test.css
deleted file mode 100644
index e56b63dfe..000000000
--- a/thirdparty/systemjs/test/tests/test.css
+++ /dev/null
@@ -1 +0,0 @@
-this is css \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/depcache-test.js b/thirdparty/systemjs/test/tests/testpkg/depcache-test.js
deleted file mode 100644
index d88fb1bde..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/depcache-test.js
+++ /dev/null
@@ -1 +0,0 @@
-(typeof window != 'undefined' ? window : global).depCacheTest = 'passed';
diff --git a/thirdparty/systemjs/test/tests/testpkg/dir/index.js b/thirdparty/systemjs/test/tests/testpkg/dir/index.js
deleted file mode 100644
index cef6cd572..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/dir/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('./self-load.js');
-module.exports = 'dirindex'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/dir/self-load.js b/thirdparty/systemjs/test/tests/testpkg/dir/self-load.js
deleted file mode 100644
index c6a24bda6..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/dir/self-load.js
+++ /dev/null
@@ -1,2 +0,0 @@
-exports.a = require('..');
-exports.b = require('../'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/dir2/index.json b/thirdparty/systemjs/test/tests/testpkg/dir2/index.json
deleted file mode 100644
index 07bd1b14d..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/dir2/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "json": "index"
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/env-module-browser.js b/thirdparty/systemjs/test/tests/testpkg/env-module-browser.js
deleted file mode 100644
index e36fe2f1b..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/env-module-browser.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'browser'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/env-module.js b/thirdparty/systemjs/test/tests/testpkg/env-module.js
deleted file mode 100644
index 3b25aeee1..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/env-module.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'not browser'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/index.js b/thirdparty/systemjs/test/tests/testpkg/index.js
deleted file mode 100644
index 2fc521784..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/index.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.prop = 'value'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/interpolate.js b/thirdparty/systemjs/test/tests/testpkg/interpolate.js
deleted file mode 100644
index d93d44f21..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/interpolate.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'interpolated!'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/json.js b/thirdparty/systemjs/test/tests/testpkg/json.js
deleted file mode 100644
index 278833a81..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/json.js
+++ /dev/null
@@ -1,4 +0,0 @@
-exports.translate = function(load) {
- load.metadata.format = 'cjs';
- return 'module.exports = ' + load.source;
-}; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/json.json b/thirdparty/systemjs/test/tests/testpkg/json.json
deleted file mode 100644
index 0acdfb14b..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/json.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "prop": "value"
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/polate.js b/thirdparty/systemjs/test/tests/testpkg/polate.js
deleted file mode 100644
index af567b6bf..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/polate.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'polate'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/self-load.js b/thirdparty/systemjs/test/tests/testpkg/self-load.js
deleted file mode 100644
index 1c5617d42..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/self-load.js
+++ /dev/null
@@ -1,2 +0,0 @@
-exports.a = require('.');
-exports.b = require('./'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/self.js b/thirdparty/systemjs/test/tests/testpkg/self.js
deleted file mode 100644
index c543a0725..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/self.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('testpkg/json'); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/system.json b/thirdparty/systemjs/test/tests/testpkg/system.json
deleted file mode 100644
index b2092752c..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/system.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "README": "This is not encouraging a system.json, which is a bad idea.",
-
- "main": ["wrong-main"],
- "format": "cjs",
- "defaultExtension": "js",
- "meta": {
- "*.json": { "loader": "json" },
- "noext": { "alias": "./json.json" },
- "test.ts": true
- },
- "map": {
- "json": "./json.js",
- "./json": "./json.json",
- "./dir/": "./dir/index",
- "./dir2.js": "./dir2/index.json",
- "./dir/test": "global-test",
- "./env-module": {
- "browser": "./env-module-browser.js"
- },
- "p": "./polate.js",
- "./conditional1": "./interpolate.js",
- "./conditional2": "./inter#{p}.js"
- },
- "depCache": {
- "./dir2/index.json": ["../depcache-test"]
- }
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg/test.ts b/thirdparty/systemjs/test/tests/testpkg/test.ts
deleted file mode 100644
index 4edba8a31..000000000
--- a/thirdparty/systemjs/test/tests/testpkg/test.ts
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'ts'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg2.json b/thirdparty/systemjs/test/tests/testpkg2.json
deleted file mode 100644
index 1aae9f17b..000000000
--- a/thirdparty/systemjs/test/tests/testpkg2.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "main": {
- "browser": "./asdf.asdf",
- "~browser": "./asdf.asdf"
- }
-} \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/testpkg2/asdf.asdf.js b/thirdparty/systemjs/test/tests/testpkg2/asdf.asdf.js
deleted file mode 100644
index 93c2cdd62..000000000
--- a/thirdparty/systemjs/test/tests/testpkg2/asdf.asdf.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define({
- asdf: 'asdf'
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/typescript.ts b/thirdparty/systemjs/test/tests/typescript.ts
deleted file mode 100644
index 1cd9b2985..000000000
--- a/thirdparty/systemjs/test/tests/typescript.ts
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = 'typescript'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/umd-dep.js b/thirdparty/systemjs/test/tests/umd-dep.js
deleted file mode 100644
index 9a690b9c5..000000000
--- a/thirdparty/systemjs/test/tests/umd-dep.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define({
- dep: 'hi'
-}) \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/umd.js b/thirdparty/systemjs/test/tests/umd.js
deleted file mode 100644
index 7faad2ba9..000000000
--- a/thirdparty/systemjs/test/tests/umd.js
+++ /dev/null
@@ -1,10 +0,0 @@
-(function (root, factory) {
- if (typeof define === 'function' && define.amd)
- define(['./umd-dep.js'], function(dep) {
- return (root.amdWebGlobal = factory(dep));
- });
- else
- root.amdWebGlobal = factory(root.dep);
-}(this, function(dep) {
- return { d: dep.dep };
-}));
diff --git a/thirdparty/systemjs/test/tests/versioned@2.0.3.js b/thirdparty/systemjs/test/tests/versioned@2.0.3.js
deleted file mode 100644
index c5f522445..000000000
--- a/thirdparty/systemjs/test/tests/versioned@2.0.3.js
+++ /dev/null
@@ -1 +0,0 @@
-exports.version = '2.3.4';
diff --git a/thirdparty/systemjs/test/tests/wildcard-test/2.js b/thirdparty/systemjs/test/tests/wildcard-test/2.js
deleted file mode 100644
index 4d3891f0c..000000000
--- a/thirdparty/systemjs/test/tests/wildcard-test/2.js
+++ /dev/null
@@ -1 +0,0 @@
-export var q = {};
diff --git a/thirdparty/systemjs/test/tests/wildcard-test/2/sub.js b/thirdparty/systemjs/test/tests/wildcard-test/2/sub.js
deleted file mode 100644
index 05cded75a..000000000
--- a/thirdparty/systemjs/test/tests/wildcard-test/2/sub.js
+++ /dev/null
@@ -1 +0,0 @@
-export var sub = {};
diff --git a/thirdparty/systemjs/test/tests/wildcard-test/first.js b/thirdparty/systemjs/test/tests/wildcard-test/first.js
deleted file mode 100644
index f2ddf5c35..000000000
--- a/thirdparty/systemjs/test/tests/wildcard-test/first.js
+++ /dev/null
@@ -1 +0,0 @@
-export var p = {};
diff --git a/thirdparty/systemjs/test/tests/with-global-deps.js b/thirdparty/systemjs/test/tests/with-global-deps.js
deleted file mode 100644
index 4c5addac0..000000000
--- a/thirdparty/systemjs/test/tests/with-global-deps.js
+++ /dev/null
@@ -1 +0,0 @@
-var newGlobal = $$$; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/with-runtime-babel.js b/thirdparty/systemjs/test/tests/with-runtime-babel.js
deleted file mode 100644
index 4dca494cb..000000000
--- a/thirdparty/systemjs/test/tests/with-runtime-babel.js
+++ /dev/null
@@ -1,16 +0,0 @@
-System.register([], function (_export) {
- "use strict";
-
- var c;
- return {
- setters: [],
- execute: function () {
- c = _export("c", function c() {
- babelHelpers.classCallCheck(this, c);
-
- babelHelpers.get(Object.getPrototypeOf(c.prototype), "constructor", this).call(this);
- });
- new c();
- }
- };
-}); \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/with-runtime-traceur.js b/thirdparty/systemjs/test/tests/with-runtime-traceur.js
deleted file mode 100644
index d86a1dea7..000000000
--- a/thirdparty/systemjs/test/tests/with-runtime-traceur.js
+++ /dev/null
@@ -1,14 +0,0 @@
-System.register([], function($__export) {
- "use strict";
- var __moduleName = "test";
- var c;
- return {
- setters: [],
- execute: function() {
- c = $__export("c", (function() {
- var c = function c() {};
- return ($traceurRuntime.createClass)(c, {}, {});
- }()));
- }
- };
-});
diff --git a/thirdparty/systemjs/test/tests/worker-babel.js b/thirdparty/systemjs/test/tests/worker-babel.js
deleted file mode 100644
index 74c741309..000000000
--- a/thirdparty/systemjs/test/tests/worker-babel.js
+++ /dev/null
@@ -1,14 +0,0 @@
-importScripts('../../dist/system.src.js');
-
-System.paths['babel'] = '../../node_modules/babel-core/browser.js';
-
-System.transpiler = 'babel';
-
-System.import('es6-and-amd.js').then(function(m) {
- postMessage({
- amd: m.amd_module,
- es6: m.es6_module
- });
-}, function(err) {
- console.error(err);
-});
diff --git a/thirdparty/systemjs/test/tests/worker-traceur.js b/thirdparty/systemjs/test/tests/worker-traceur.js
deleted file mode 100644
index 30902cf40..000000000
--- a/thirdparty/systemjs/test/tests/worker-traceur.js
+++ /dev/null
@@ -1,12 +0,0 @@
-importScripts('../../dist/system.src.js');
-
-System.paths['traceur'] = '../../node_modules/traceur/bin/traceur.js';
-
-System.import('es6-and-amd.js').then(function(m) {
- postMessage({
- amd: m.amd_module,
- es6: m.es6_module
- });
-}, function(err) {
- console.error(err);
-});
diff --git a/thirdparty/systemjs/test/tests/worker-typescript.js b/thirdparty/systemjs/test/tests/worker-typescript.js
deleted file mode 100644
index 7bbf0c231..000000000
--- a/thirdparty/systemjs/test/tests/worker-typescript.js
+++ /dev/null
@@ -1,16 +0,0 @@
-importScripts('../../dist/system.src.js');
-
-System.paths['typescript'] = '../../node_modules/typescript/lib/typescript.js';
-System.meta['typescript'] = { format: 'global', exports: 'ts' };
-System.transpiler = 'typescript';
-
-System.normalizeSync('test');
-
-System.import('es6-and-amd.js').then(function(m) {
- postMessage({
- amd: m.amd_module,
- es6: m.es6_module
- });
-}, function(err) {
- console.error(err);
-});
diff --git a/thirdparty/systemjs/test/tests/wrapper.js b/thirdparty/systemjs/test/tests/wrapper.js
deleted file mode 100644
index 9a8eb0328..000000000
--- a/thirdparty/systemjs/test/tests/wrapper.js
+++ /dev/null
@@ -1 +0,0 @@
-export * from './default1.js'; \ No newline at end of file
diff --git a/thirdparty/systemjs/test/tests/zero@0.js b/thirdparty/systemjs/test/tests/zero@0.js
deleted file mode 100644
index 0050f500b..000000000
--- a/thirdparty/systemjs/test/tests/zero@0.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = '0'; \ No newline at end of file