From 6b228f2376db25ccd4535e62a8c1b4fea0e7ed7a Mon Sep 17 00:00:00 2001 From: Paul Rodwell Date: Tue, 26 Nov 2013 16:51:14 +0000 Subject: [PATCH 1/7] client removed - client is now over in wiki-client plugins removed - plugins now each have their own repo... --- client/ReadMe.md | 67 - client/client.coffee | 2 - client/images/crosses.png | Bin 116 -> 0 bytes client/images/email_sign_in_blue.png | Bin 3856 -> 0 bytes client/images/external-link-ltr-icon.png | Bin 982 -> 0 bytes client/images/noise.png | Bin 22763 -> 0 bytes client/images/oops.jpg | Bin 19586 -> 0 bytes client/js/d3/d3.behavior.js | 198 - client/js/d3/d3.chart.js | 984 - client/js/d3/d3.csv.js | 92 - client/js/d3/d3.geo.js | 566 - client/js/d3/d3.geom.js | 825 - client/js/d3/d3.js | 3597 ---- client/js/d3/d3.layout.js | 1923 -- client/js/d3/d3.time.js | 660 - .../js/images/ui-bg_glass_65_ffffff_1x400.png | Bin 259 -> 0 bytes .../js/images/ui-bg_glass_75_dadada_1x400.png | Bin 111 -> 0 bytes .../js/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 110 -> 0 bytes client/js/images/ui-icons_222222_256x240.png | Bin 6781 -> 0 bytes client/js/images/ui-icons_454545_256x240.png | Bin 4369 -> 0 bytes client/js/images/ui-icons_888888_256x240.png | Bin 4369 -> 0 bytes client/js/jquery-1.9.1.min.js | 5 - client/js/jquery-migrate-1.1.1.min.js | 3 - client/js/jquery-ui-1.10.1.custom.min.css | 5 - client/js/jquery-ui-1.10.1.custom.min.js | 6 - client/js/jquery.ie.cors.js | 310 - client/js/jquery.ui.touch-punch.min.js | 11 - client/js/modernizr.custom.63710.js | 824 - client/js/sockjs-0.3.min.js | 27 - client/js/underscore-min.js | 30 - client/plugins/ReadMe.md | 48 - client/plugins/activity/activity.coffee | 68 - .../activity/pages/about-activity-plugin | 121 - .../activity/pages/more-about-activity-plugin | 700 - client/plugins/activity/pages/recent-changes | 102 - client/plugins/bars/bars.coffee | 72 - client/plugins/bars/pages/d3-bars | 181 - client/plugins/bytebeat/bytebeat.coffee | 95 - client/plugins/bytebeat/factory.json | 1 - .../bytebeat/pages/about-bytebeat-plugin | 208 - .../plugins/bytebeat/pages/algorithmic-music | 939 - client/plugins/calculator/calculator.coffee | 27 - client/plugins/calculator/factory.json | 1 - .../calculator/pages/about-calculator-plugin | 116 - .../calculator/pages/expense-calculator | 391 - client/plugins/calendar/calendar.coffee | 86 - client/plugins/calendar/test.coffee | 59 - client/plugins/changes/changes.coffee | 68 - .../changes/pages/about-changes-plugin | 204 - client/plugins/changes/pages/local-changes | 82 - client/plugins/changes/pages/local-editing | 385 - .../plugins/changes/pages/recent-submissions | 340 - client/plugins/changes/pages/submit-changes | 303 - client/plugins/changes/test.coffee | 75 - client/plugins/chart/chart.coffee | 41 - client/plugins/chart/pages/air-temperature | 975 - client/plugins/code/code.coffee | 20 - client/plugins/code/factory.json | 1 - client/plugins/code/pages/about-code-plugin | 294 - client/plugins/code/prettify.css | 27 - client/plugins/code/prettify.js | 1 - client/plugins/data/data.coffee | 64 - client/plugins/data/pages/about-data-plugin | 925 - client/plugins/efficiency/efficiency.coffee | 187 - .../pages/full-material-pattern-photo | 93 - .../efficiency/pages/high-contrast-test-image | 99 - ...rast-test-image-white-area-25per-100px.png | Bin 425 -> 0 bytes ...rast-test-image-white-area-50per-100px.png | Bin 419 -> 0 bytes ...rast-test-image-white-area-50per-120px.png | Bin 989 -> 0 bytes ...rast-test-image-white-area-50per-140px.png | Bin 722 -> 0 bytes ...rast-test-image-white-area-50per-160px.png | Bin 667 -> 0 bytes ...rast-test-image-white-area-50per-200px.png | Bin 1467 -> 0 bytes ...rast-test-image-white-area-50per-600px.png | Bin 6326 -> 0 bytes ...rast-test-image-white-area-75per-100px.png | Bin 428 -> 0 bytes .../efficiency/pages/original-pattern-photo | 93 - .../pages/pattern-efficiency-calculator | 100 - .../pages/pattern-efficiency-estimation | 216 - .../pages/radial-gradient-test-image | 275 - .../pages/repeat-sensitive-pattern-photo | 109 - client/plugins/efficiency/test.coffee | 82 - client/plugins/factory/factory.coffee | 155 - .../factory/pages/about-factory-plugin | 384 - client/plugins/favicon.coffee | 57 - .../federatedWiki/federatedWiki.coffee | 21 - client/plugins/force/force.coffee | 103 - client/plugins/force/pages/about-force-plugin | 1617 -- .../plugins/future/pages/about-future-plugin | 377 - client/plugins/image/pages/about-image-plugin | 308 - client/plugins/line/line.coffee | 117 - client/plugins/line/pages/d3-line | 78 - client/plugins/linkmap/linkmap.coffee | 58 - client/plugins/linkmap/package.json | 16 - .../linkmap/pages/about-linkmap-plugin | 369 - .../linkmap/pages/linkmap-network-diagram | 87 - client/plugins/linkmap/server.coffee | 46 - client/plugins/logwatch/logwatch.coffee | 17 - .../logwatch/pages/about-logwatch-plugin | 279 - client/plugins/map/map.coffee | 36 - .../plugins/map/not-quite-ready-factory.json | 1 - client/plugins/map/pages/about-map-plugin | 104 - client/plugins/mathjax/factory.json | 1 - client/plugins/mathjax/mathjax.coffee | 14 - .../mathjax/pages/about-mathjax-plugin | 304 - client/plugins/metabolism/metabolism.coffee | 116 - .../metabolism/pages/metabolic-calculator | 1847 -- .../pages/metabolic-equivalent-of-task | 15302 ---------------- client/plugins/method/factory.json | 1 - client/plugins/method/method.coffee | 186 - .../plugins/method/pages/about-method-plugin | 669 - .../method/pages/bottles-of-beer-methods | 368 - client/plugins/pagefold/factory.json | 1 - client/plugins/pagefold/pagefold.coffee | 15 - .../pagefold/pages/about-pagefold-plugin | 380 - .../paragraph/pages/about-paragraph-plugin | 657 - client/plugins/parse/.gitignore | 2 - client/plugins/parse/package.json | 17 - client/plugins/parse/parse.coffee | 95 - client/plugins/parse/server.coffee | 43 - .../plugins/pushpin/factories-locations.json | 1064 -- client/plugins/pushpin/factories.json | 3978 ---- .../pushpin/pages/about-pushpin-plugin | 299 - .../pushpin/pages/more-about-pushpin-plugin | 234 - client/plugins/pushpin/pushpin.coffee | 113 - .../scripts/factories-geolocate.coffee | 33 - .../pushpin/scripts/factories-segments.coffee | 25 - client/plugins/pushpin/world-countries.json | 179 - client/plugins/radar/pages/about-radar-plugin | 914 - .../pages/discover-both-dimensions-and-limits | 150 - .../discover-dimensions-but-specify-limits | 72 - .../radar/pages/growth-beyond-requirements | 748 - .../radar/pages/radar-data-in-data-plugins | 880 - .../radar/pages/radar-data-in-method-plugins | 465 - .../radar/pages/radar-data-in-one-data-plugin | 414 - .../pages/specify-both-dimensions-and-limits | 105 - .../specify-dimensions-and-discover-limits | 98 - .../plugins/radar/pages/top-carbon-emitters | 240 - client/plugins/radar/radar.coffee | 236 - .../plugins/reduce/pages/about-reduce-plugin | 572 - .../reduce/pages/beer-drinking-scenarios | 1046 -- .../reduce/pages/drink-beer-in-proportion | 102 - .../plugins/reduce/pages/drink-beer-similarly | 112 - client/plugins/reduce/pages/drink-beer-slowly | 198 - .../reduce/pages/more-about-reduce-plugin | 175 - client/plugins/reduce/reduce.coffee | 173 - .../reference/pages/about-reference-plugin | 294 - client/plugins/reference/reference.coffee | 21 - .../plugins/report/pages/about-report-plugin | 799 - .../report/pages/about-report-plugin-scripts | 443 - client/plugins/report/post.coffee | 123 - client/plugins/report/report.coffee | 93 - client/plugins/report/test.coffee | 63 - .../plugins/rollup/pages/about-rollup-plugin | 672 - client/plugins/rollup/rollup.coffee | 120 - client/plugins/scatter/scatter.coffee | 93 - client/plugins/twadio/package.json | 17 - .../plugins/twadio/pages/about-twadio-plugin | 371 - .../pages/event-and-speaker-notes-template | 134 - .../twadio/pages/microhams-digital-conference | 243 - .../plugins/twadio/pages/scheduled-speakers | 525 - client/plugins/twadio/pages/sdr-control-panel | 382 - client/plugins/twadio/server.coffee | 61 - client/plugins/twadio/twadio.coffee | 84 - client/plugins/twadio/twadio.rb | 289 - client/plugins/txtzyme/package.json | 18 - .../txtzyme/pages/about-txtzyme-plugin | 931 - .../plugins/txtzyme/pages/more-about-txtzyme | 207 - .../txtzyme/pages/more-txtzyme-examples | 286 - client/plugins/txtzyme/pages/txtzyme-blink | 1408 -- .../txtzyme/pages/txtzyme-hdlx-2416-display | 2214 --- .../plugins/txtzyme/pages/txtzyme-morse-code | 677 - .../txtzyme/pages/txtzyme-oscilloscope | 1579 -- client/plugins/txtzyme/server.coffee | 63 - client/plugins/txtzyme/test.coffee | 75 - client/plugins/txtzyme/txtzyme.coffee | 152 - client/runtests.html | 26 - client/style.css | 349 - client/style/persona-buttons.css | 228 - client/test/mocha.css | 259 - client/test/mocha.js | 5471 ------ client/testclient.coffee | 18 - client/theme/granite.css | 59 - client/theme/stoneSeamless.jpg | Bin 96093 -> 0 bytes client/twitter-maintainance.jpg | Bin 129294 -> 0 bytes 183 files changed, 74129 deletions(-) delete mode 100644 client/ReadMe.md delete mode 100644 client/client.coffee delete mode 100644 client/images/crosses.png delete mode 100644 client/images/email_sign_in_blue.png delete mode 100644 client/images/external-link-ltr-icon.png delete mode 100755 client/images/noise.png delete mode 100644 client/images/oops.jpg delete mode 100755 client/js/d3/d3.behavior.js delete mode 100755 client/js/d3/d3.chart.js delete mode 100755 client/js/d3/d3.csv.js delete mode 100755 client/js/d3/d3.geo.js delete mode 100755 client/js/d3/d3.geom.js delete mode 100755 client/js/d3/d3.js delete mode 100755 client/js/d3/d3.layout.js delete mode 100755 client/js/d3/d3.time.js delete mode 100755 client/js/images/ui-bg_glass_65_ffffff_1x400.png delete mode 100644 client/js/images/ui-bg_glass_75_dadada_1x400.png delete mode 100644 client/js/images/ui-bg_glass_75_e6e6e6_1x400.png delete mode 100755 client/js/images/ui-icons_222222_256x240.png delete mode 100644 client/js/images/ui-icons_454545_256x240.png delete mode 100644 client/js/images/ui-icons_888888_256x240.png delete mode 100644 client/js/jquery-1.9.1.min.js delete mode 100644 client/js/jquery-migrate-1.1.1.min.js delete mode 100644 client/js/jquery-ui-1.10.1.custom.min.css delete mode 100644 client/js/jquery-ui-1.10.1.custom.min.js delete mode 100644 client/js/jquery.ie.cors.js delete mode 100644 client/js/jquery.ui.touch-punch.min.js delete mode 100644 client/js/modernizr.custom.63710.js delete mode 100644 client/js/sockjs-0.3.min.js delete mode 100644 client/js/underscore-min.js delete mode 100644 client/plugins/ReadMe.md delete mode 100644 client/plugins/activity/activity.coffee delete mode 100644 client/plugins/activity/pages/about-activity-plugin delete mode 100644 client/plugins/activity/pages/more-about-activity-plugin delete mode 100644 client/plugins/activity/pages/recent-changes delete mode 100644 client/plugins/bars/bars.coffee delete mode 100644 client/plugins/bars/pages/d3-bars delete mode 100644 client/plugins/bytebeat/bytebeat.coffee delete mode 100644 client/plugins/bytebeat/factory.json delete mode 100644 client/plugins/bytebeat/pages/about-bytebeat-plugin delete mode 100644 client/plugins/bytebeat/pages/algorithmic-music delete mode 100644 client/plugins/calculator/calculator.coffee delete mode 100644 client/plugins/calculator/factory.json delete mode 100644 client/plugins/calculator/pages/about-calculator-plugin delete mode 100644 client/plugins/calculator/pages/expense-calculator delete mode 100644 client/plugins/calendar/calendar.coffee delete mode 100644 client/plugins/calendar/test.coffee delete mode 100644 client/plugins/changes/changes.coffee delete mode 100644 client/plugins/changes/pages/about-changes-plugin delete mode 100644 client/plugins/changes/pages/local-changes delete mode 100644 client/plugins/changes/pages/local-editing delete mode 100644 client/plugins/changes/pages/recent-submissions delete mode 100644 client/plugins/changes/pages/submit-changes delete mode 100644 client/plugins/changes/test.coffee delete mode 100644 client/plugins/chart/chart.coffee delete mode 100644 client/plugins/chart/pages/air-temperature delete mode 100644 client/plugins/code/code.coffee delete mode 100644 client/plugins/code/factory.json delete mode 100644 client/plugins/code/pages/about-code-plugin delete mode 100644 client/plugins/code/prettify.css delete mode 100644 client/plugins/code/prettify.js delete mode 100644 client/plugins/data/data.coffee delete mode 100644 client/plugins/data/pages/about-data-plugin delete mode 100644 client/plugins/efficiency/efficiency.coffee delete mode 100644 client/plugins/efficiency/pages/full-material-pattern-photo delete mode 100644 client/plugins/efficiency/pages/high-contrast-test-image delete mode 100755 client/plugins/efficiency/pages/high-contrast-test-image-white-area-25per-100px.png delete mode 100755 client/plugins/efficiency/pages/high-contrast-test-image-white-area-50per-100px.png delete mode 100755 client/plugins/efficiency/pages/high-contrast-test-image-white-area-50per-120px.png delete mode 100755 client/plugins/efficiency/pages/high-contrast-test-image-white-area-50per-140px.png delete mode 100755 client/plugins/efficiency/pages/high-contrast-test-image-white-area-50per-160px.png delete mode 100755 client/plugins/efficiency/pages/high-contrast-test-image-white-area-50per-200px.png delete mode 100755 client/plugins/efficiency/pages/high-contrast-test-image-white-area-50per-600px.png delete mode 100755 client/plugins/efficiency/pages/high-contrast-test-image-white-area-75per-100px.png delete mode 100644 client/plugins/efficiency/pages/original-pattern-photo delete mode 100644 client/plugins/efficiency/pages/pattern-efficiency-calculator delete mode 100644 client/plugins/efficiency/pages/pattern-efficiency-estimation delete mode 100644 client/plugins/efficiency/pages/radial-gradient-test-image delete mode 100644 client/plugins/efficiency/pages/repeat-sensitive-pattern-photo delete mode 100644 client/plugins/efficiency/test.coffee delete mode 100644 client/plugins/factory/factory.coffee delete mode 100644 client/plugins/factory/pages/about-factory-plugin delete mode 100644 client/plugins/favicon.coffee delete mode 100644 client/plugins/federatedWiki/federatedWiki.coffee delete mode 100644 client/plugins/force/force.coffee delete mode 100644 client/plugins/force/pages/about-force-plugin delete mode 100644 client/plugins/future/pages/about-future-plugin delete mode 100644 client/plugins/image/pages/about-image-plugin delete mode 100644 client/plugins/line/line.coffee delete mode 100644 client/plugins/line/pages/d3-line delete mode 100644 client/plugins/linkmap/linkmap.coffee delete mode 100644 client/plugins/linkmap/package.json delete mode 100644 client/plugins/linkmap/pages/about-linkmap-plugin delete mode 100644 client/plugins/linkmap/pages/linkmap-network-diagram delete mode 100644 client/plugins/linkmap/server.coffee delete mode 100644 client/plugins/logwatch/logwatch.coffee delete mode 100644 client/plugins/logwatch/pages/about-logwatch-plugin delete mode 100644 client/plugins/map/map.coffee delete mode 100644 client/plugins/map/not-quite-ready-factory.json delete mode 100644 client/plugins/map/pages/about-map-plugin delete mode 100644 client/plugins/mathjax/factory.json delete mode 100644 client/plugins/mathjax/mathjax.coffee delete mode 100644 client/plugins/mathjax/pages/about-mathjax-plugin delete mode 100644 client/plugins/metabolism/metabolism.coffee delete mode 100644 client/plugins/metabolism/pages/metabolic-calculator delete mode 100644 client/plugins/metabolism/pages/metabolic-equivalent-of-task delete mode 100644 client/plugins/method/factory.json delete mode 100644 client/plugins/method/method.coffee delete mode 100644 client/plugins/method/pages/about-method-plugin delete mode 100644 client/plugins/method/pages/bottles-of-beer-methods delete mode 100644 client/plugins/pagefold/factory.json delete mode 100644 client/plugins/pagefold/pagefold.coffee delete mode 100644 client/plugins/pagefold/pages/about-pagefold-plugin delete mode 100644 client/plugins/paragraph/pages/about-paragraph-plugin delete mode 100644 client/plugins/parse/.gitignore delete mode 100644 client/plugins/parse/package.json delete mode 100644 client/plugins/parse/parse.coffee delete mode 100644 client/plugins/parse/server.coffee delete mode 100644 client/plugins/pushpin/factories-locations.json delete mode 100644 client/plugins/pushpin/factories.json delete mode 100644 client/plugins/pushpin/pages/about-pushpin-plugin delete mode 100644 client/plugins/pushpin/pages/more-about-pushpin-plugin delete mode 100644 client/plugins/pushpin/pushpin.coffee delete mode 100644 client/plugins/pushpin/scripts/factories-geolocate.coffee delete mode 100644 client/plugins/pushpin/scripts/factories-segments.coffee delete mode 100644 client/plugins/pushpin/world-countries.json delete mode 100644 client/plugins/radar/pages/about-radar-plugin delete mode 100644 client/plugins/radar/pages/discover-both-dimensions-and-limits delete mode 100644 client/plugins/radar/pages/discover-dimensions-but-specify-limits delete mode 100644 client/plugins/radar/pages/growth-beyond-requirements delete mode 100644 client/plugins/radar/pages/radar-data-in-data-plugins delete mode 100644 client/plugins/radar/pages/radar-data-in-method-plugins delete mode 100644 client/plugins/radar/pages/radar-data-in-one-data-plugin delete mode 100644 client/plugins/radar/pages/specify-both-dimensions-and-limits delete mode 100644 client/plugins/radar/pages/specify-dimensions-and-discover-limits delete mode 100644 client/plugins/radar/pages/top-carbon-emitters delete mode 100644 client/plugins/radar/radar.coffee delete mode 100644 client/plugins/reduce/pages/about-reduce-plugin delete mode 100644 client/plugins/reduce/pages/beer-drinking-scenarios delete mode 100644 client/plugins/reduce/pages/drink-beer-in-proportion delete mode 100644 client/plugins/reduce/pages/drink-beer-similarly delete mode 100644 client/plugins/reduce/pages/drink-beer-slowly delete mode 100644 client/plugins/reduce/pages/more-about-reduce-plugin delete mode 100644 client/plugins/reduce/reduce.coffee delete mode 100644 client/plugins/reference/pages/about-reference-plugin delete mode 100644 client/plugins/reference/reference.coffee delete mode 100644 client/plugins/report/pages/about-report-plugin delete mode 100644 client/plugins/report/pages/about-report-plugin-scripts delete mode 100644 client/plugins/report/post.coffee delete mode 100644 client/plugins/report/report.coffee delete mode 100644 client/plugins/report/test.coffee delete mode 100644 client/plugins/rollup/pages/about-rollup-plugin delete mode 100644 client/plugins/rollup/rollup.coffee delete mode 100644 client/plugins/scatter/scatter.coffee delete mode 100644 client/plugins/twadio/package.json delete mode 100644 client/plugins/twadio/pages/about-twadio-plugin delete mode 100644 client/plugins/twadio/pages/event-and-speaker-notes-template delete mode 100644 client/plugins/twadio/pages/microhams-digital-conference delete mode 100644 client/plugins/twadio/pages/scheduled-speakers delete mode 100644 client/plugins/twadio/pages/sdr-control-panel delete mode 100644 client/plugins/twadio/server.coffee delete mode 100644 client/plugins/twadio/twadio.coffee delete mode 100644 client/plugins/twadio/twadio.rb delete mode 100644 client/plugins/txtzyme/package.json delete mode 100644 client/plugins/txtzyme/pages/about-txtzyme-plugin delete mode 100644 client/plugins/txtzyme/pages/more-about-txtzyme delete mode 100644 client/plugins/txtzyme/pages/more-txtzyme-examples delete mode 100644 client/plugins/txtzyme/pages/txtzyme-blink delete mode 100644 client/plugins/txtzyme/pages/txtzyme-hdlx-2416-display delete mode 100644 client/plugins/txtzyme/pages/txtzyme-morse-code delete mode 100644 client/plugins/txtzyme/pages/txtzyme-oscilloscope delete mode 100644 client/plugins/txtzyme/server.coffee delete mode 100644 client/plugins/txtzyme/test.coffee delete mode 100644 client/plugins/txtzyme/txtzyme.coffee delete mode 100644 client/runtests.html delete mode 100644 client/style.css delete mode 100644 client/style/persona-buttons.css delete mode 100644 client/test/mocha.css delete mode 100644 client/test/mocha.js delete mode 100644 client/testclient.coffee delete mode 100644 client/theme/granite.css delete mode 100644 client/theme/stoneSeamless.jpg delete mode 100644 client/twitter-maintainance.jpg diff --git a/client/ReadMe.md b/client/ReadMe.md deleted file mode 100644 index 284d0e31..00000000 --- a/client/ReadMe.md +++ /dev/null @@ -1,67 +0,0 @@ -Client Goals -============ - -A server offers direct restful read/write access to pages it owns and proxy access to pages held elsewhere in federated space. -A page is owned if it was created with the server or has been cloned and edited such that it is believed to be the most authoritative copy of a page previously owned elsewhere. -A server operates as a proxy to the rest of the federated wiki. -In this role it reformats data and metadata providing a unified experience. -It is welcome to collect behavioral statistics in order to improve this experience by anticipating permitted peer-to-peer server operations. - -In summary, the server's client side exists to: - -* Offer to a user a browsing experience that is independent of any specific server. -* Support writing, editing and curating of one server in a way that offers suitable influence over others. - -Working with Browserify -======================= - -The client side is written in CoffeeScript, and built with Browserify. -If you are not checking in changes you need not concern yourself with this. -We've checked in the generated Javascript for the client application. - -If you do want to check in changes, install node v0.6.x - -* On Linux download the source from [GitHub](https://github.com/joyent/node) -* On Windows get the installer from the [main node.js site](http://nodejs.org). -* On Mac you should be able to choose either. - -Once node is installed come back to this directory and run: - -* `npm install` To install CoffeeScript, Browserify, and all their dependencies. - -You can now use: - -* `npm start` To build the main client. -* `npm test` To build the test client. - -These commands build client.js and test/testclient.js from client.coffee and -testclient.coffee respectively. They use their entry files to require the -rest of the coffee script they need from the source CS files in /lib. - -We also have a cool automated talking (Mac only) Perl build script that uses -a globally installed browserify via `npm install -g browserify`, it watches -for changes, builds the clients automatically, and gives a verbal report -when you have syntax errors. - -Testing -======= - -All the client tests can be run by visiting /runtests.html on your server -or by running the full ruby test suite. Information about the libraries we -are using for testing can be found at: - -* http://visionmedia.github.com/mocha/ -* https://github.com/LearnBoost/expect.js -* http://sinonjs.org/ - -CoffeeScript hints -================== - -We recommend taking time to learn the CoffeeScript syntax and the rationale for the Javascript idioms it employs. Start here: - - http://jashkenas.github.com/coffee-script/ - -We used a Javascript to Coffeescript converter to create the first draft of client.coffee. You may find this converter useful for importing sample codes. - - http://ricostacruz.com/js2coffee/ - diff --git a/client/client.coffee b/client/client.coffee deleted file mode 100644 index 8d1f797d..00000000 --- a/client/client.coffee +++ /dev/null @@ -1,2 +0,0 @@ -window.wiki = require('wiki-client') - diff --git a/client/images/crosses.png b/client/images/crosses.png deleted file mode 100644 index 78d745ff68418a143706f9aac52bb88cea248425..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 116 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2VGmzZ%#=aj&u?6^qxL&()@8idhxuVX1^@s6aL=(R000ixNkl9e32x!91d)geFQffN2JGjJrn6iUG+%L85{nK~PjgkxY|wYLF}_Vj3|_ zQb%WZC+z;Pck3(d>V9w9p?en2VbAnE=R1$ORk!ZFU)}rawT^@ADt}HRfmP}K9BZ<^ zG{T56jd6ww3VbB7Dy@%W&DBRn7%`S%ShIMRJ)@Dv%CuV?t1}-OVZ>O5{>`$pEZbN(tRV07|R&GS+*7rkv=dn zF`?PBXVaWHbMVAiFS}()-5jef-qRl!25H6l+q5jXm)Z8v^3*U zXhqr`tRFF~OdCL~eE;Ps>_)tB7y8kF-nl@J`K9r#hz&eI|Nj8+hxl=p5`bsqKgyiq z3=QG#x0_{4(GU#>$6Y}*Z{9qzw6r9JLV+j7T(6J4`?)TF5jQvt&>(ksqDQXWqyp7F zDrgy`)bc)BcdnH;j%P+E{q)Pf>Dh}P$c>Qzn~{P$Ys%`LA%dJy_A}D^p&u2jNFR{r zf}&zM_AsuxY5DovSjY68bnn?Kf)utr0te9lUjVs;=JrxZc83-^>DaYi6!fTb>KavR zD0lB~mdyoU(r}nLb0(Rao0FB5l>o-jV_qLDP3YiQo;L7)uqIh@_9j(zJ|ejw`NeUq zv@NNDe*EcY8hZXU*1~SYur#rY${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o_p*gW3k3%Dd9v|?z$wwEp4JbjhwM#!rpOV)g4O?IHuKzA8qHe6NWHQ4?5 zW?+>pP^lFuS83d>RC0Yby(58Yf7(5YU7B8Os@7T+7jCT7FHP^*tHQ2TvC67;&Z}|3 zd?p?hPl_?ILp%pbyd-vt7sYOxofiix8N;NaVZv3ip-`5AN%ERI{+SmG@2t6_p^q8N z(o~6`|AbY@XgUiV(SNxAbMSk`qp>3J!UhhXuG%(|?j0gDE>~^N72v`*x)0t~ZOwEZ z4m|-D&ZtGJ}8;WLk96sqPn3I;4%{fxLET5GkbR{t#`+_*~}`j zbQ|o?uZ?zcNJ#!X@s zLRhWx-c#502HXMUoXI)ky+>6M5yo*`C0FGgCDivl0H^cmn+Tw)T&|Y|nx=`Al6yX$ zq?8=0Y99^5U`^AQnc3{~sbw{Qh#(^W-uMPX2!ETUUO3uXM#m@vvj6}907*qoM6N<$ Eg5Fop3jhEB diff --git a/client/images/noise.png b/client/images/noise.png deleted file mode 100755 index f0b4de42197b1021e168a5898d9d19850ebd3955..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22763 zcmXt|NoVua+o4#6BYG#Ze&iA6cte^hp;)6p<;8KnK{MCvHIlHP$^Bt&A3HAi(y^ho$yG?8cPgdQ@Q8w18O9h(0Ig(41J$op;Cm9%C;1 z^OFS9-yOBkKYQ=@irpC@i}+w(~f0lJeUhpmU{;TS>XGHM&+^T;% zZvC&~bzT#D#)QnsZIlO&QNGfHZ$dGzM#Ek@S!b0;pquknlscLK8`jqo7EoDuKN*Ok(^@a_&OWD>wj%$t*rUw{5_sM zl*8h~2fDmx&+Dm$JzG#o&L(TKUi`Enh|GFC={b`BD)IctljqxKs2(19%^V$fb5~T0 zRkSGQ_W$JiNA4zXMR)%9KtI1xJa9YXcMo4?ZtK}X;kko4k7vH-Ha&4bu1maq_#q&; z@}NxHa1`@Pz@s88n19IGlptMk$Dr_3^8v*$92)rNd=4cmYryCZPP6c3)8aR;JN>tQ zTi&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^)PWDajmBix8WHaQ+X zlt$Oe!JBe+)Q^FxYSHo^QiAS-c!3g}>Hh!>#3a#hyj7v6qx(n3vp_@Y7izjeWB|6l zI^yCq2<`4WGg{CEI-s<=(^Z~L>CQXNPOxz5W?D9CS`YOahYBA-utg$jOW@=gT9D-I z8z&xnz}IlN@(wIz_90|=-w&k2T&>maxvpRpE7IJ+je;n$EVOIgb$MJA0s}xaKY>wQ z)|S1uZD0!oGP zP>Hc>l(MJIzllMG z99qlR(B=Fg#54|xT1JI7qe}8DoTeTl>iDnLvm>Qa!CYLQFe!*r6!4YiC!FJxb4MpI z!V_X}5!-eWQA#M&Nb0K?b69EUM9_$CH7&%qjE4~*cUIET(V@sg1*ek>|^r+VMfK1tar&sPEm8g{iB_qIG@P_0K#b>+QM~b*ZxC6{u{E$N`52yj}caJxS(Z%Kme*RR0@bCFd6`CVph-v z6bS2o-_#SZQN)U_P@7cWDK>&AMp6F&Ua(`DO9}uDHOY+{RjtBvlr!xdlB{Pg>ve{n zhDZ85&KFTQ5TXS&lXP?u?hAsTb~za!;EI)$2D>6SjfMITlH&{zC<1`~B}zTCNA>^^ zvovj_H1whmvZ2_K4G>jVE^hAu2Uyj^XvJWBiXg;*y{NhqXDJ%4E4%Ea>XKdrxX_Z; zas^fL^r9XeR8m?~!Ltn+D9Q&4Ytm-I7?XUC@5B#+haPV?U*=Klqdesk93TdON location - d3_behavior_zoomLast = 0, - d3_behavior_zoomXyz, - d3_behavior_zoomDispatch, - d3_behavior_zoomTarget, - d3_behavior_zoomArguments; - -function d3_behavior_zoomLocation(point) { - return [ - point[0] - d3_behavior_zoomXyz[0], - point[1] - d3_behavior_zoomXyz[1], - d3_behavior_zoomXyz[2] - ]; -} - -// detect the pixels that would be scrolled by this wheel event -function d3_behavior_zoomDelta() { - - // mousewheel events are totally broken! - // https://bugs.webkit.org/show_bug.cgi?id=40441 - // not only that, but Chrome and Safari differ in re. to acceleration! - if (!d3_behavior_zoomDiv) { - d3_behavior_zoomDiv = d3.select("body").append("div") - .style("visibility", "hidden") - .style("top", 0) - .style("height", 0) - .style("width", 0) - .style("overflow-y", "scroll") - .append("div") - .style("height", "2000px") - .node().parentNode; - } - - var e = d3.event, delta; - try { - d3_behavior_zoomDiv.scrollTop = 1000; - d3_behavior_zoomDiv.dispatchEvent(e); - delta = 1000 - d3_behavior_zoomDiv.scrollTop; - } catch (error) { - delta = e.wheelDelta || -e.detail; - } - - return delta * .005; -} - -// Note: Since we don't rotate, it's possible for the touches to become -// slightly detached from their original positions. Thus, we recompute the -// touch points on touchend as well as touchstart! -function d3_behavior_zoomTouchup() { - var touches = d3.svg.touches(d3_behavior_zoomTarget), - i = -1, - n = touches.length, - touch; - while (++i < n) d3_behavior_zoomLocations[(touch = touches[i]).identifier] = d3_behavior_zoomLocation(touch); - return touches; -} - -function d3_behavior_zoomTouchmove() { - var touches = d3.svg.touches(d3_behavior_zoomTarget); - switch (touches.length) { - - // single-touch pan - case 1: { - var touch = touches[0]; - d3_behavior_zoomTo(d3_behavior_zoomXyz[2], touch, d3_behavior_zoomLocations[touch.identifier]); - break; - } - - // double-touch pan + zoom - case 2: { - var p0 = touches[0], - p1 = touches[1], - p2 = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2], - l0 = d3_behavior_zoomLocations[p0.identifier], - l1 = d3_behavior_zoomLocations[p1.identifier], - l2 = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2, l0[2]]; - d3_behavior_zoomTo(Math.log(d3.event.scale) / Math.LN2 + l0[2], p2, l2); - break; - } - } -} - -function d3_behavior_zoomMousemove() { - d3_behavior_zoomZooming = null; - if (d3_behavior_zoomPanning) d3_behavior_zoomTo(d3_behavior_zoomXyz[2], d3.svg.mouse(d3_behavior_zoomTarget), d3_behavior_zoomPanning); -} - -function d3_behavior_zoomMouseup() { - if (d3_behavior_zoomPanning) { - d3_behavior_zoomMousemove(); - d3_behavior_zoomPanning = null; - } -} - -function d3_behavior_zoomTo(z, x0, x1) { - var K = Math.pow(2, (d3_behavior_zoomXyz[2] = z) - x1[2]), - x = d3_behavior_zoomXyz[0] = x0[0] - K * x1[0], - y = d3_behavior_zoomXyz[1] = x0[1] - K * x1[1], - o = d3.event, // Events can be reentrant (e.g., focus). - k = Math.pow(2, z); - - d3.event = { - scale: k, - translate: [x, y], - transform: function(sx, sy) { - if (sx) transform(sx, x); - if (sy) transform(sy, y); - } - }; - - function transform(scale, o) { - var domain = scale.__domain || (scale.__domain = scale.domain()), - range = scale.range().map(function(v) { return (v - o) / k; }); - scale.domain(domain).domain(range.map(scale.invert)); - } - - try { - d3_behavior_zoomDispatch.apply(d3_behavior_zoomTarget, d3_behavior_zoomArguments); - } finally { - d3.event = o; - } - - o.preventDefault(); -} -})(); diff --git a/client/js/d3/d3.chart.js b/client/js/d3/d3.chart.js deleted file mode 100755 index 281d0072..00000000 --- a/client/js/d3/d3.chart.js +++ /dev/null @@ -1,984 +0,0 @@ -(function(){d3.chart = {}; -// Inspired by http://informationandvisualization.de/blog/box-plot -d3.chart.box = function() { - var width = 1, - height = 1, - duration = 0, - domain = null, - value = Number, - whiskers = d3_chart_boxWhiskers, - quartiles = d3_chart_boxQuartiles, - tickFormat = null; - - // For each small multiple… - function box(g) { - g.each(function(d, i) { - d = d.map(value).sort(d3.ascending); - var g = d3.select(this), - n = d.length, - min = d[0], - max = d[n - 1]; - - // Compute quartiles. Must return exactly 3 elements. - var quartileData = d.quartiles = quartiles(d); - - // Compute whiskers. Must return exactly 2 elements, or null. - var whiskerIndices = whiskers && whiskers.call(this, d, i), - whiskerData = whiskerIndices && whiskerIndices.map(function(i) { return d[i]; }); - - // Compute outliers. If no whiskers are specified, all data are "outliers". - // We compute the outliers as indices, so that we can join across transitions! - var outlierIndices = whiskerIndices - ? d3.range(0, whiskerIndices[0]).concat(d3.range(whiskerIndices[1] + 1, n)) - : d3.range(n); - - // Compute the new x-scale. - var x1 = d3.scale.linear() - .domain(domain && domain.call(this, d, i) || [min, max]) - .range([height, 0]); - - // Retrieve the old x-scale, if this is an update. - var x0 = this.__chart__ || d3.scale.linear() - .domain([0, Infinity]) - .range(x1.range()); - - // Stash the new scale. - this.__chart__ = x1; - - // Note: the box, median, and box tick elements are fixed in number, - // so we only have to handle enter and update. In contrast, the outliers - // and other elements are variable, so we need to exit them! Variable - // elements also fade in and out. - - // Update center line: the vertical line spanning the whiskers. - var center = g.selectAll("line.center") - .data(whiskerData ? [whiskerData] : []); - - center.enter().insert("svg:line", "rect") - .attr("class", "center") - .attr("x1", width / 2) - .attr("y1", function(d) { return x0(d[0]); }) - .attr("x2", width / 2) - .attr("y2", function(d) { return x0(d[1]); }) - .style("opacity", 1e-6) - .transition() - .duration(duration) - .style("opacity", 1) - .attr("y1", function(d) { return x1(d[0]); }) - .attr("y2", function(d) { return x1(d[1]); }); - - center.transition() - .duration(duration) - .style("opacity", 1) - .attr("y1", function(d) { return x1(d[0]); }) - .attr("y2", function(d) { return x1(d[1]); }); - - center.exit().transition() - .duration(duration) - .style("opacity", 1e-6) - .attr("y1", function(d) { return x1(d[0]); }) - .attr("y2", function(d) { return x1(d[1]); }) - .remove(); - - // Update innerquartile box. - var box = g.selectAll("rect.box") - .data([quartileData]); - - box.enter().append("svg:rect") - .attr("class", "box") - .attr("x", 0) - .attr("y", function(d) { return x0(d[2]); }) - .attr("width", width) - .attr("height", function(d) { return x0(d[0]) - x0(d[2]); }) - .transition() - .duration(duration) - .attr("y", function(d) { return x1(d[2]); }) - .attr("height", function(d) { return x1(d[0]) - x1(d[2]); }); - - box.transition() - .duration(duration) - .attr("y", function(d) { return x1(d[2]); }) - .attr("height", function(d) { return x1(d[0]) - x1(d[2]); }); - - // Update median line. - var medianLine = g.selectAll("line.median") - .data([quartileData[1]]); - - medianLine.enter().append("svg:line") - .attr("class", "median") - .attr("x1", 0) - .attr("y1", x0) - .attr("x2", width) - .attr("y2", x0) - .transition() - .duration(duration) - .attr("y1", x1) - .attr("y2", x1); - - medianLine.transition() - .duration(duration) - .attr("y1", x1) - .attr("y2", x1); - - // Update whiskers. - var whisker = g.selectAll("line.whisker") - .data(whiskerData || []); - - whisker.enter().insert("svg:line", "circle, text") - .attr("class", "whisker") - .attr("x1", 0) - .attr("y1", x0) - .attr("x2", width) - .attr("y2", x0) - .style("opacity", 1e-6) - .transition() - .duration(duration) - .attr("y1", x1) - .attr("y2", x1) - .style("opacity", 1); - - whisker.transition() - .duration(duration) - .attr("y1", x1) - .attr("y2", x1) - .style("opacity", 1); - - whisker.exit().transition() - .duration(duration) - .attr("y1", x1) - .attr("y2", x1) - .style("opacity", 1e-6) - .remove(); - - // Update outliers. - var outlier = g.selectAll("circle.outlier") - .data(outlierIndices, Number); - - outlier.enter().insert("svg:circle", "text") - .attr("class", "outlier") - .attr("r", 5) - .attr("cx", width / 2) - .attr("cy", function(i) { return x0(d[i]); }) - .style("opacity", 1e-6) - .transition() - .duration(duration) - .attr("cy", function(i) { return x1(d[i]); }) - .style("opacity", 1); - - outlier.transition() - .duration(duration) - .attr("cy", function(i) { return x1(d[i]); }) - .style("opacity", 1); - - outlier.exit().transition() - .duration(duration) - .attr("cy", function(i) { return x1(d[i]); }) - .style("opacity", 1e-6) - .remove(); - - // Compute the tick format. - var format = tickFormat || x1.tickFormat(8); - - // Update box ticks. - var boxTick = g.selectAll("text.box") - .data(quartileData); - - boxTick.enter().append("svg:text") - .attr("class", "box") - .attr("dy", ".3em") - .attr("dx", function(d, i) { return i & 1 ? 6 : -6 }) - .attr("x", function(d, i) { return i & 1 ? width : 0 }) - .attr("y", x0) - .attr("text-anchor", function(d, i) { return i & 1 ? "start" : "end"; }) - .text(format) - .transition() - .duration(duration) - .attr("y", x1); - - boxTick.transition() - .duration(duration) - .text(format) - .attr("y", x1); - - // Update whisker ticks. These are handled separately from the box - // ticks because they may or may not exist, and we want don't want - // to join box ticks pre-transition with whisker ticks post-. - var whiskerTick = g.selectAll("text.whisker") - .data(whiskerData || []); - - whiskerTick.enter().append("svg:text") - .attr("class", "whisker") - .attr("dy", ".3em") - .attr("dx", 6) - .attr("x", width) - .attr("y", x0) - .text(format) - .style("opacity", 1e-6) - .transition() - .duration(duration) - .attr("y", x1) - .style("opacity", 1); - - whiskerTick.transition() - .duration(duration) - .text(format) - .attr("y", x1) - .style("opacity", 1); - - whiskerTick.exit().transition() - .duration(duration) - .attr("y", x1) - .style("opacity", 1e-6) - .remove(); - }); - d3.timer.flush(); - } - - box.width = function(x) { - if (!arguments.length) return width; - width = x; - return box; - }; - - box.height = function(x) { - if (!arguments.length) return height; - height = x; - return box; - }; - - box.tickFormat = function(x) { - if (!arguments.length) return tickFormat; - tickFormat = x; - return box; - }; - - box.duration = function(x) { - if (!arguments.length) return duration; - duration = x; - return box; - }; - - box.domain = function(x) { - if (!arguments.length) return domain; - domain = x == null ? x : d3.functor(x); - return box; - }; - - box.value = function(x) { - if (!arguments.length) return value; - value = x; - return box; - }; - - box.whiskers = function(x) { - if (!arguments.length) return whiskers; - whiskers = x; - return box; - }; - - box.quartiles = function(x) { - if (!arguments.length) return quartiles; - quartiles = x; - return box; - }; - - return box; -}; - -function d3_chart_boxWhiskers(d) { - return [0, d.length - 1]; -} - -function d3_chart_boxQuartiles(d) { - return [ - d3.quantile(d, .25), - d3.quantile(d, .5), - d3.quantile(d, .75) - ]; -} -// Chart design based on the recommendations of Stephen Few. Implementation -// based on the work of Clint Ivy, Jamie Love, and Jason Davies. -// http://projects.instantcognition.com/protovis/bulletchart/ -d3.chart.bullet = function() { - var orient = "left", // TODO top & bottom - reverse = false, - duration = 0, - ranges = d3_chart_bulletRanges, - markers = d3_chart_bulletMarkers, - measures = d3_chart_bulletMeasures, - width = 380, - height = 30, - tickFormat = null; - - // For each small multiple… - function bullet(g) { - g.each(function(d, i) { - var rangez = ranges.call(this, d, i).slice().sort(d3.descending), - markerz = markers.call(this, d, i).slice().sort(d3.descending), - measurez = measures.call(this, d, i).slice().sort(d3.descending), - g = d3.select(this); - - // Compute the new x-scale. - var x1 = d3.scale.linear() - .domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) - .range(reverse ? [width, 0] : [0, width]); - - // Retrieve the old x-scale, if this is an update. - var x0 = this.__chart__ || d3.scale.linear() - .domain([0, Infinity]) - .range(x1.range()); - - // Stash the new scale. - this.__chart__ = x1; - - // Derive width-scales from the x-scales. - var w0 = d3_chart_bulletWidth(x0), - w1 = d3_chart_bulletWidth(x1); - - // Update the range rects. - var range = g.selectAll("rect.range") - .data(rangez); - - range.enter().append("svg:rect") - .attr("class", function(d, i) { return "range s" + i; }) - .attr("width", w0) - .attr("height", height) - .attr("x", reverse ? x0 : 0) - .transition() - .duration(duration) - .attr("width", w1) - .attr("x", reverse ? x1 : 0); - - range.transition() - .duration(duration) - .attr("x", reverse ? x1 : 0) - .attr("width", w1) - .attr("height", height); - - // Update the measure rects. - var measure = g.selectAll("rect.measure") - .data(measurez); - - measure.enter().append("svg:rect") - .attr("class", function(d, i) { return "measure s" + i; }) - .attr("width", w0) - .attr("height", height / 3) - .attr("x", reverse ? x0 : 0) - .attr("y", height / 3) - .transition() - .duration(duration) - .attr("width", w1) - .attr("x", reverse ? x1 : 0); - - measure.transition() - .duration(duration) - .attr("width", w1) - .attr("height", height / 3) - .attr("x", reverse ? x1 : 0) - .attr("y", height / 3); - - // Update the marker lines. - var marker = g.selectAll("line.marker") - .data(markerz); - - marker.enter().append("svg:line") - .attr("class", "marker") - .attr("x1", x0) - .attr("x2", x0) - .attr("y1", height / 6) - .attr("y2", height * 5 / 6) - .transition() - .duration(duration) - .attr("x1", x1) - .attr("x2", x1); - - marker.transition() - .duration(duration) - .attr("x1", x1) - .attr("x2", x1) - .attr("y1", height / 6) - .attr("y2", height * 5 / 6); - - // Compute the tick format. - var format = tickFormat || x1.tickFormat(8); - - // Update the tick groups. - var tick = g.selectAll("g.tick") - .data(x1.ticks(8), function(d) { - return this.textContent || format(d); - }); - - // Initialize the ticks with the old scale, x0. - var tickEnter = tick.enter().append("svg:g") - .attr("class", "tick") - .attr("transform", d3_chart_bulletTranslate(x0)) - .style("opacity", 1e-6); - - tickEnter.append("svg:line") - .attr("y1", height) - .attr("y2", height * 7 / 6); - - tickEnter.append("svg:text") - .attr("text-anchor", "middle") - .attr("dy", "1em") - .attr("y", height * 7 / 6) - .text(format); - - // Transition the entering ticks to the new scale, x1. - tickEnter.transition() - .duration(duration) - .attr("transform", d3_chart_bulletTranslate(x1)) - .style("opacity", 1); - - // Transition the updating ticks to the new scale, x1. - var tickUpdate = tick.transition() - .duration(duration) - .attr("transform", d3_chart_bulletTranslate(x1)) - .style("opacity", 1); - - tickUpdate.select("line") - .attr("y1", height) - .attr("y2", height * 7 / 6); - - tickUpdate.select("text") - .attr("y", height * 7 / 6); - - // Transition the exiting ticks to the new scale, x1. - tick.exit().transition() - .duration(duration) - .attr("transform", d3_chart_bulletTranslate(x1)) - .style("opacity", 1e-6) - .remove(); - }); - d3.timer.flush(); - } - - // left, right, top, bottom - bullet.orient = function(x) { - if (!arguments.length) return orient; - orient = x; - reverse = orient == "right" || orient == "bottom"; - return bullet; - }; - - // ranges (bad, satisfactory, good) - bullet.ranges = function(x) { - if (!arguments.length) return ranges; - ranges = x; - return bullet; - }; - - // markers (previous, goal) - bullet.markers = function(x) { - if (!arguments.length) return markers; - markers = x; - return bullet; - }; - - // measures (actual, forecast) - bullet.measures = function(x) { - if (!arguments.length) return measures; - measures = x; - return bullet; - }; - - bullet.width = function(x) { - if (!arguments.length) return width; - width = x; - return bullet; - }; - - bullet.height = function(x) { - if (!arguments.length) return height; - height = x; - return bullet; - }; - - bullet.tickFormat = function(x) { - if (!arguments.length) return tickFormat; - tickFormat = x; - return bullet; - }; - - bullet.duration = function(x) { - if (!arguments.length) return duration; - duration = x; - return bullet; - }; - - return bullet; -}; - -function d3_chart_bulletRanges(d) { - return d.ranges; -} - -function d3_chart_bulletMarkers(d) { - return d.markers; -} - -function d3_chart_bulletMeasures(d) { - return d.measures; -} - -function d3_chart_bulletTranslate(x) { - return function(d) { - return "translate(" + x(d) + ",0)"; - }; -} - -function d3_chart_bulletWidth(x) { - var x0 = x(0); - return function(d) { - return Math.abs(x(d) - x0); - }; -} -// Implements a horizon layout, which is a variation of a single-series -// area chart where the area is folded into multiple bands. Color is used to -// encode band, allowing the size of the chart to be reduced significantly -// without impeding readability. This layout algorithm is based on the work of -// J. Heer, N. Kong and M. Agrawala in "Sizing the Horizon: The Effects of Chart -// Size and Layering on the Graphical Perception of Time Series Visualizations", -// CHI 2009. http://hci.stanford.edu/publications/2009/heer-horizon-chi09.pdf -d3.chart.horizon = function() { - var bands = 1, // between 1 and 5, typically - mode = "offset", // or mirror - interpolate = "linear", // or basis, monotone, step-before, etc. - x = d3_chart_horizonX, - y = d3_chart_horizonY, - w = 960, - h = 40, - duration = 0; - - var color = d3.scale.linear() - .domain([-1, 0, 1]) - .range(["#d62728", "#fff", "#1f77b4"]); - - // For each small multiple… - function horizon(g) { - g.each(function(d, i) { - var g = d3.select(this), - n = 2 * bands + 1, - xMin = Infinity, - xMax = -Infinity, - yMax = -Infinity, - x0, // old x-scale - y0, // old y-scale - id; // unique id for paths - - // Compute x- and y-values along with extents. - var data = d.map(function(d, i) { - var xv = x.call(this, d, i), - yv = y.call(this, d, i); - if (xv < xMin) xMin = xv; - if (xv > xMax) xMax = xv; - if (-yv > yMax) yMax = -yv; - if (yv > yMax) yMax = yv; - return [xv, yv]; - }); - - // Compute the new x- and y-scales. - var x1 = d3.scale.linear().domain([xMin, xMax]).range([0, w]), - y1 = d3.scale.linear().domain([0, yMax]).range([0, h * bands]); - - // Retrieve the old scales, if this is an update. - if (this.__chart__) { - x0 = this.__chart__.x; - y0 = this.__chart__.y; - id = this.__chart__.id; - } else { - x0 = d3.scale.linear().domain([0, Infinity]).range(x1.range()); - y0 = d3.scale.linear().domain([0, Infinity]).range(y1.range()); - id = ++d3_chart_horizonId; - } - - // We'll use a defs to store the area path and the clip path. - var defs = g.selectAll("defs") - .data([data]); - - var defsEnter = defs.enter().append("svg:defs"); - - // The clip path is a simple rect. - defsEnter.append("svg:clipPath") - .attr("id", "d3_chart_horizon_clip" + id) - .append("svg:rect") - .attr("width", w) - .attr("height", h); - - defs.select("rect").transition() - .duration(duration) - .attr("width", w) - .attr("height", h); - - // The area path is rendered with our resuable d3.svg.area. - defsEnter.append("svg:path") - .attr("id", "d3_chart_horizon_path" + id) - .attr("d", d3_chart_horizonArea - .interpolate(interpolate) - .x(function(d) { return x0(d[0]); }) - .y0(h * bands) - .y1(function(d) { return h * bands - y0(d[1]); })) - .transition() - .duration(duration) - .attr("d", d3_chart_horizonArea - .x(function(d) { return x1(d[0]); }) - .y1(function(d) { return h * bands - y1(d[1]); })); - - defs.select("path").transition() - .duration(duration) - .attr("d", d3_chart_horizonArea); - - // We'll use a container to clip all horizon layers at once. - g.selectAll("g") - .data([null]) - .enter().append("svg:g") - .attr("clip-path", "url(#d3_chart_horizon_clip" + id + ")"); - - // Define the transform function based on the mode. - var transform = mode == "offset" - ? function(d) { return "translate(0," + (d + (d < 0) - bands) * h + ")"; } - : function(d) { return (d < 0 ? "scale(1,-1)" : "") + "translate(0," + (d - bands) * h + ")"; }; - - // Instantiate each copy of the path with different transforms. - var u = g.select("g").selectAll("use") - .data(d3.range(-1, -bands - 1, -1).concat(d3.range(1, bands + 1)), Number); - - // TODO don't fudge the enter transition - u.enter().append("svg:use") - .attr("xlink:href", "#d3_chart_horizon_path" + id) - .attr("transform", function(d) { return transform(d + (d > 0 ? 1 : -1)); }) - .style("fill", color) - .transition() - .duration(duration) - .attr("transform", transform); - - u.transition() - .duration(duration) - .attr("transform", transform) - .style("fill", color); - - u.exit().transition() - .duration(duration) - .attr("transform", transform) - .remove(); - - // Stash the new scales. - this.__chart__ = {x: x1, y: y1, id: id}; - }); - d3.timer.flush(); - } - - horizon.duration = function(x) { - if (!arguments.length) return duration; - duration = +x; - return horizon; - }; - - horizon.bands = function(x) { - if (!arguments.length) return bands; - bands = +x; - color.domain([-bands, 0, bands]); - return horizon; - }; - - horizon.mode = function(x) { - if (!arguments.length) return mode; - mode = x + ""; - return horizon; - }; - - horizon.colors = function(x) { - if (!arguments.length) return color.range(); - color.range(x); - return horizon; - }; - - horizon.interpolate = function(x) { - if (!arguments.length) return interpolate; - interpolate = x + ""; - return horizon; - }; - - horizon.x = function(z) { - if (!arguments.length) return x; - x = z; - return horizon; - }; - - horizon.y = function(z) { - if (!arguments.length) return y; - y = z; - return horizon; - }; - - horizon.width = function(x) { - if (!arguments.length) return w; - w = +x; - return horizon; - }; - - horizon.height = function(x) { - if (!arguments.length) return h; - h = +x; - return horizon; - }; - - return horizon; -}; - -var d3_chart_horizonArea = d3.svg.area(), - d3_chart_horizonId = 0; - -function d3_chart_horizonX(d) { - return d[0]; -} - -function d3_chart_horizonY(d) { - return d[1]; -} -// Based on http://vis.stanford.edu/protovis/ex/qqplot.html -d3.chart.qq = function() { - var width = 1, - height = 1, - duration = 0, - domain = null, - tickFormat = null, - n = 100, - x = d3_chart_qqX, - y = d3_chart_qqY; - - // For each small multiple… - function qq(g) { - g.each(function(d, i) { - var g = d3.select(this), - qx = d3_chart_qqQuantiles(n, x.call(this, d, i)), - qy = d3_chart_qqQuantiles(n, y.call(this, d, i)), - xd = domain && domain.call(this, d, i) || [d3.min(qx), d3.max(qx)], // new x-domain - yd = domain && domain.call(this, d, i) || [d3.min(qy), d3.max(qy)], // new y-domain - x0, // old x-scale - y0; // old y-scale - - // Compute the new x-scale. - var x1 = d3.scale.linear() - .domain(xd) - .range([0, width]); - - // Compute the new y-scale. - var y1 = d3.scale.linear() - .domain(yd) - .range([height, 0]); - - // Retrieve the old scales, if this is an update. - if (this.__chart__) { - x0 = this.__chart__.x; - y0 = this.__chart__.y; - } else { - x0 = d3.scale.linear().domain([0, Infinity]).range(x1.range()); - y0 = d3.scale.linear().domain([0, Infinity]).range(y1.range()); - } - - // Stash the new scales. - this.__chart__ = {x: x1, y: y1}; - - // Update diagonal line. - var diagonal = g.selectAll("line.diagonal") - .data([null]); - - diagonal.enter().append("svg:line") - .attr("class", "diagonal") - .attr("x1", x1(yd[0])) - .attr("y1", y1(xd[0])) - .attr("x2", x1(yd[1])) - .attr("y2", y1(xd[1])); - - diagonal.transition() - .duration(duration) - .attr("x1", x1(yd[0])) - .attr("y1", y1(xd[0])) - .attr("x2", x1(yd[1])) - .attr("y2", y1(xd[1])); - - // Update quantile plots. - var circle = g.selectAll("circle") - .data(d3.range(n).map(function(i) { - return {x: qx[i], y: qy[i]}; - })); - - circle.enter().append("svg:circle") - .attr("class", "quantile") - .attr("r", 4.5) - .attr("cx", function(d) { return x0(d.x); }) - .attr("cy", function(d) { return y0(d.y); }) - .style("opacity", 1e-6) - .transition() - .duration(duration) - .attr("cx", function(d) { return x1(d.x); }) - .attr("cy", function(d) { return y1(d.y); }) - .style("opacity", 1); - - circle.transition() - .duration(duration) - .attr("cx", function(d) { return x1(d.x); }) - .attr("cy", function(d) { return y1(d.y); }) - .style("opacity", 1); - - circle.exit().transition() - .duration(duration) - .attr("cx", function(d) { return x1(d.x); }) - .attr("cy", function(d) { return y1(d.y); }) - .style("opacity", 1e-6) - .remove(); - - var xformat = tickFormat || x1.tickFormat(4), - yformat = tickFormat || y1.tickFormat(4), - tx = function(d) { return "translate(" + x1(d) + "," + height + ")"; }, - ty = function(d) { return "translate(0," + y1(d) + ")"; }; - - // Update x-ticks. - var xtick = g.selectAll("g.x.tick") - .data(x1.ticks(4), function(d) { - return this.textContent || xformat(d); - }); - - var xtickEnter = xtick.enter().append("svg:g") - .attr("class", "x tick") - .attr("transform", function(d) { return "translate(" + x0(d) + "," + height + ")"; }) - .style("opacity", 1e-6); - - xtickEnter.append("svg:line") - .attr("y1", 0) - .attr("y2", -6); - - xtickEnter.append("svg:text") - .attr("text-anchor", "middle") - .attr("dy", "1em") - .text(xformat); - - // Transition the entering ticks to the new scale, x1. - xtickEnter.transition() - .duration(duration) - .attr("transform", tx) - .style("opacity", 1); - - // Transition the updating ticks to the new scale, x1. - xtick.transition() - .duration(duration) - .attr("transform", tx) - .style("opacity", 1); - - // Transition the exiting ticks to the new scale, x1. - xtick.exit().transition() - .duration(duration) - .attr("transform", tx) - .style("opacity", 1e-6) - .remove(); - - // Update ticks. - var ytick = g.selectAll("g.y.tick") - .data(y1.ticks(4), function(d) { - return this.textContent || yformat(d); - }); - - var ytickEnter = ytick.enter().append("svg:g") - .attr("class", "y tick") - .attr("transform", function(d) { return "translate(0," + y0(d) + ")"; }) - .style("opacity", 1e-6); - - ytickEnter.append("svg:line") - .attr("x1", 0) - .attr("x2", 6); - - ytickEnter.append("svg:text") - .attr("text-anchor", "end") - .attr("dx", "-.5em") - .attr("dy", ".3em") - .text(yformat); - - // Transition the entering ticks to the new scale, y1. - ytickEnter.transition() - .duration(duration) - .attr("transform", ty) - .style("opacity", 1); - - // Transition the updating ticks to the new scale, y1. - ytick.transition() - .duration(duration) - .attr("transform", ty) - .style("opacity", 1); - - // Transition the exiting ticks to the new scale, y1. - ytick.exit().transition() - .duration(duration) - .attr("transform", ty) - .style("opacity", 1e-6) - .remove(); - }); - } - - qq.width = function(x) { - if (!arguments.length) return width; - width = x; - return qq; - }; - - qq.height = function(x) { - if (!arguments.length) return height; - height = x; - return qq; - }; - - qq.duration = function(x) { - if (!arguments.length) return duration; - duration = x; - return qq; - }; - - qq.domain = function(x) { - if (!arguments.length) return domain; - domain = x == null ? x : d3.functor(x); - return qq; - }; - - qq.count = function(z) { - if (!arguments.length) return n; - n = z; - return qq; - }; - - qq.x = function(z) { - if (!arguments.length) return x; - x = z; - return qq; - }; - - qq.y = function(z) { - if (!arguments.length) return y; - y = z; - return qq; - }; - - qq.tickFormat = function(x) { - if (!arguments.length) return tickFormat; - tickFormat = x; - return qq; - }; - - return qq; -}; - -function d3_chart_qqQuantiles(n, values) { - var m = values.length - 1; - values = values.slice().sort(d3.ascending); - return d3.range(n).map(function(i) { - return values[~~(i * m / n)]; - }); -} - -function d3_chart_qqX(d) { - return d.x; -} - -function d3_chart_qqY(d) { - return d.y; -} -})(); diff --git a/client/js/d3/d3.csv.js b/client/js/d3/d3.csv.js deleted file mode 100755 index 7565b83b..00000000 --- a/client/js/d3/d3.csv.js +++ /dev/null @@ -1,92 +0,0 @@ -(function(){d3.csv = function(url, callback) { - d3.text(url, "text/csv", function(text) { - callback(text && d3.csv.parse(text)); - }); -}; -d3.csv.parse = function(text) { - var header; - return d3.csv.parseRows(text, function(row, i) { - if (i) { - var o = {}, j = -1, m = header.length; - while (++j < m) o[header[j]] = row[j]; - return o; - } else { - header = row; - return null; - } - }); -}; - -d3.csv.parseRows = function(text, f) { - var EOL = {}, // sentinel value for end-of-line - EOF = {}, // sentinel value for end-of-file - rows = [], // output rows - re = /\r\n|[,\r\n]/g, // field separator regex - n = 0, // the current line number - t, // the current token - eol; // is the current token followed by EOL? - - re.lastIndex = 0; // work-around bug in FF 3.6 - - /** @private Returns the next token. */ - function token() { - if (re.lastIndex >= text.length) return EOF; // special case: end of file - if (eol) { eol = false; return EOL; } // special case: end of line - - // special case: quotes - var j = re.lastIndex; - if (text.charCodeAt(j) === 34) { - var i = j; - while (i++ < text.length) { - if (text.charCodeAt(i) === 34) { - if (text.charCodeAt(i + 1) !== 34) break; - i++; - } - } - re.lastIndex = i + 2; - var c = text.charCodeAt(i + 1); - if (c === 13) { - eol = true; - if (text.charCodeAt(i + 2) === 10) re.lastIndex++; - } else if (c === 10) { - eol = true; - } - return text.substring(j + 1, i).replace(/""/g, "\""); - } - - // common case - var m = re.exec(text); - if (m) { - eol = m[0].charCodeAt(0) !== 44; - return text.substring(j, m.index); - } - re.lastIndex = text.length; - return text.substring(j); - } - - while ((t = token()) !== EOF) { - var a = []; - while ((t !== EOL) && (t !== EOF)) { - a.push(t); - t = token(); - } - if (f && !(a = f(a, n++))) continue; - rows.push(a); - } - - return rows; -}; -d3.csv.format = function(rows) { - return rows.map(d3_csv_formatRow).join("\n"); -}; - -function d3_csv_formatRow(row) { - return row.map(d3_csv_formatValue).join(","); -} - -function d3_csv_formatValue(text) { - return /[",\n]/.test(text) - ? "\"" + text.replace(/\"/g, "\"\"") + "\"" - : text; -} -})(); diff --git a/client/js/d3/d3.geo.js b/client/js/d3/d3.geo.js deleted file mode 100755 index 253d6a3d..00000000 --- a/client/js/d3/d3.geo.js +++ /dev/null @@ -1,566 +0,0 @@ -(function(){d3.geo = {}; -// TODO clip input coordinates on opposite hemisphere -d3.geo.azimuthal = function() { - var mode = "orthographic", // or stereographic - origin, - scale = 200, - translate = [480, 250], - x0, - y0, - cy0, - sy0; - - function azimuthal(coordinates) { - var x1 = coordinates[0] * d3_radians - x0, - y1 = coordinates[1] * d3_radians, - cx1 = Math.cos(x1), - sx1 = Math.sin(x1), - cy1 = Math.cos(y1), - sy1 = Math.sin(y1), - k = mode == "stereographic" ? 1 / (1 + sy0 * sy1 + cy0 * cy1 * cx1) : 1, - x = k * cy1 * sx1, - y = k * (sy0 * cy1 * cx1 - cy0 * sy1); - return [ - scale * x + translate[0], - scale * y + translate[1] - ]; - } - - azimuthal.mode = function(x) { - if (!arguments.length) return mode; - mode = x; - return azimuthal; - }; - - azimuthal.origin = function(x) { - if (!arguments.length) return origin; - origin = x; - x0 = origin[0] * d3_radians; - y0 = origin[1] * d3_radians; - cy0 = Math.cos(y0); - sy0 = Math.sin(y0); - return azimuthal; - }; - - azimuthal.scale = function(x) { - if (!arguments.length) return scale; - scale = +x; - return azimuthal; - }; - - azimuthal.translate = function(x) { - if (!arguments.length) return translate; - translate = [+x[0], +x[1]]; - return azimuthal; - }; - - return azimuthal.origin([0, 0]); -}; -// Derived from Tom Carden's Albers implementation for Protovis. -// http://gist.github.com/476238 -// http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html - -d3.geo.albers = function() { - var origin = [-98, 38], - parallels = [29.5, 45.5], - scale = 1000, - translate = [480, 250], - lng0, // d3_radians * origin[0] - n, - C, - p0; - - function albers(coordinates) { - var t = n * (d3_radians * coordinates[0] - lng0), - p = Math.sqrt(C - 2 * n * Math.sin(d3_radians * coordinates[1])) / n; - return [ - scale * p * Math.sin(t) + translate[0], - scale * (p * Math.cos(t) - p0) + translate[1] - ]; - } - - function reload() { - var phi1 = d3_radians * parallels[0], - phi2 = d3_radians * parallels[1], - lat0 = d3_radians * origin[1], - s = Math.sin(phi1), - c = Math.cos(phi1); - lng0 = d3_radians * origin[0]; - n = .5 * (s + Math.sin(phi2)); - C = c * c + 2 * n * s; - p0 = Math.sqrt(C - 2 * n * Math.sin(lat0)) / n; - return albers; - } - - albers.origin = function(x) { - if (!arguments.length) return origin; - origin = [+x[0], +x[1]]; - return reload(); - }; - - albers.parallels = function(x) { - if (!arguments.length) return parallels; - parallels = [+x[0], +x[1]]; - return reload(); - }; - - albers.scale = function(x) { - if (!arguments.length) return scale; - scale = +x; - return albers; - }; - - albers.translate = function(x) { - if (!arguments.length) return translate; - translate = [+x[0], +x[1]]; - return albers; - }; - - return reload(); -}; - -// A composite projection for the United States, 960x500. The set of standard -// parallels for each region comes from USGS, which is published here: -// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers -// TODO allow the composite projection to be rescaled? -d3.geo.albersUsa = function() { - var lower48 = d3.geo.albers(); - - var alaska = d3.geo.albers() - .origin([-160, 60]) - .parallels([55, 65]); - - var hawaii = d3.geo.albers() - .origin([-160, 20]) - .parallels([8, 18]); - - var puertoRico = d3.geo.albers() - .origin([-60, 10]) - .parallels([8, 18]); - - function albersUsa(coordinates) { - var lon = coordinates[0], - lat = coordinates[1]; - return (lat < 25 - ? (lon < -100 ? hawaii : puertoRico) - : (lat > 50 ? alaska : lower48))(coordinates); - } - - albersUsa.scale = function(x) { - if (!arguments.length) return lower48.scale(); - lower48.scale(x); - alaska.scale(x * .6); - hawaii.scale(x); - puertoRico.scale(x * 1.5); - return albersUsa.translate(lower48.translate()); - }; - - albersUsa.translate = function(x) { - if (!arguments.length) return lower48.translate(); - var dz = lower48.scale() / 1000, - dx = x[0], - dy = x[1]; - lower48.translate(x); - alaska.translate([dx - 400 * dz, dy + 170 * dz]); - hawaii.translate([dx - 190 * dz, dy + 200 * dz]); - puertoRico.translate([dx + 580 * dz, dy + 430 * dz]); - return albersUsa; - }; - - return albersUsa.scale(lower48.scale()); -}; - -var d3_radians = Math.PI / 180; -d3.geo.mercator = function() { - var scale = 500, - translate = [480, 250]; - - function mercator(coordinates) { - var x = (coordinates[0]) / 360, - y = (-180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + coordinates[1] * Math.PI / 360))) / 360; - return [ - scale * x + translate[0], - scale * Math.max(-.5, Math.min(.5, y)) + translate[1] - ]; - } - - mercator.scale = function(x) { - if (!arguments.length) return scale; - scale = +x; - return mercator; - }; - - mercator.translate = function(x) { - if (!arguments.length) return translate; - translate = [+x[0], +x[1]]; - return mercator; - }; - - return mercator; -}; -/** - * Returns a function that, given a GeoJSON object (e.g., a feature), returns - * the corresponding SVG path. The function can be customized by overriding the - * projection. Point features are mapped to circles with a default radius of - * 4.5px; the radius can be specified either as a constant or a function that - * is evaluated per object. - */ -d3.geo.path = function() { - var pointRadius = 4.5, - pointCircle = d3_path_circle(pointRadius), - projection = d3.geo.albersUsa(); - - function path(d, i) { - if (typeof pointRadius === "function") { - pointCircle = d3_path_circle(pointRadius.apply(this, arguments)); - } - return d3_geo_pathType(pathTypes, d); - } - - function project(coordinates) { - return projection(coordinates).join(","); - } - - var pathTypes = { - - FeatureCollection: function(f) { - var path = [], - features = f.features, - i = -1, // features.index - n = features.length; - while (++i < n) path.push(d3_geo_pathType(pathTypes, features[i].geometry)); - return path.join(""); - }, - - Feature: function(f) { - return d3_geo_pathType(pathTypes, f.geometry); - }, - - Point: function(o) { - return "M" + project(o.coordinates) + pointCircle; - }, - - MultiPoint: function(o) { - var path = [], - coordinates = o.coordinates, - i = -1, // coordinates.index - n = coordinates.length; - while (++i < n) path.push("M", project(coordinates[i]), pointCircle); - return path.join(""); - }, - - LineString: function(o) { - var path = ["M"], - coordinates = o.coordinates, - i = -1, // coordinates.index - n = coordinates.length; - while (++i < n) path.push(project(coordinates[i]), "L"); - path.pop(); - return path.join(""); - }, - - MultiLineString: function(o) { - var path = [], - coordinates = o.coordinates, - i = -1, // coordinates.index - n = coordinates.length, - subcoordinates, // coordinates[i] - j, // subcoordinates.index - m; // subcoordinates.length - while (++i < n) { - subcoordinates = coordinates[i]; - j = -1; - m = subcoordinates.length; - path.push("M"); - while (++j < m) path.push(project(subcoordinates[j]), "L"); - path.pop(); - } - return path.join(""); - }, - - Polygon: function(o) { - var path = [], - coordinates = o.coordinates, - i = -1, // coordinates.index - n = coordinates.length, - subcoordinates, // coordinates[i] - j, // subcoordinates.index - m; // subcoordinates.length - while (++i < n) { - subcoordinates = coordinates[i]; - j = -1; - m = subcoordinates.length; - path.push("M"); - while (++j < m) path.push(project(subcoordinates[j]), "L"); - path[path.length - 1] = "Z"; - } - return path.join(""); - }, - - MultiPolygon: function(o) { - var path = [], - coordinates = o.coordinates, - i = -1, // coordinates index - n = coordinates.length, - subcoordinates, // coordinates[i] - j, // subcoordinates index - m, // subcoordinates.length - subsubcoordinates, // subcoordinates[j] - k, // subsubcoordinates index - p; // subsubcoordinates.length - while (++i < n) { - subcoordinates = coordinates[i]; - j = -1; - m = subcoordinates.length; - while (++j < m) { - subsubcoordinates = subcoordinates[j]; - k = -1; - p = subsubcoordinates.length - 1; - path.push("M"); - while (++k < p) path.push(project(subsubcoordinates[k]), "L"); - path[path.length - 1] = "Z"; - } - } - return path.join(""); - }, - - GeometryCollection: function(o) { - var path = [], - geometries = o.geometries, - i = -1, // geometries index - n = geometries.length; - while (++i < n) path.push(d3_geo_pathType(pathTypes, geometries[i])); - return path.join(""); - } - - }; - - var areaTypes = { - - FeatureCollection: function(f) { - var area = 0, - features = f.features, - i = -1, // features.index - n = features.length; - while (++i < n) area += d3_geo_pathType(areaTypes, features[i]); - return area; - }, - - Feature: function(f) { - return d3_geo_pathType(areaTypes, f.geometry); - }, - - Point: d3_geo_pathZero, - MultiPoint: d3_geo_pathZero, - LineString: d3_geo_pathZero, - MultiLineString: d3_geo_pathZero, - - Polygon: function(o) { - return polygonArea(o.coordinates); - }, - - MultiPolygon: function(o) { - var sum = 0, - coordinates = o.coordinates, - i = -1, // coordinates index - n = coordinates.length; - while (++i < n) sum += polygonArea(coordinates[i]); - return sum; - }, - - GeometryCollection: function(o) { - var sum = 0, - geometries = o.geometries, - i = -1, // geometries index - n = geometries.length; - while (++i < n) sum += d3_geo_pathType(areaTypes, geometries[i]); - return sum; - } - - }; - - function polygonArea(coordinates) { - var sum = area(coordinates[0]), // exterior ring - i = 0, // coordinates.index - n = coordinates.length; - while (++i < n) sum -= area(coordinates[i]); // holes - return sum; - } - - function polygonCentroid(coordinates) { - var polygon = d3.geom.polygon(coordinates[0].map(projection)), // exterior ring - centroid = polygon.centroid(1), - x = centroid[0], - y = centroid[1], - z = Math.abs(polygon.area()), - i = 0, // coordinates index - n = coordinates.length; - while (++i < n) { - polygon = d3.geom.polygon(coordinates[i].map(projection)); // holes - centroid = polygon.centroid(1); - x -= centroid[0]; - y -= centroid[1]; - z -= Math.abs(polygon.area()); - } - return [x, y, 6 * z]; // weighted centroid - } - - var centroidTypes = { - - // TODO FeatureCollection - // TODO Point - // TODO MultiPoint - // TODO LineString - // TODO MultiLineString - // TODO GeometryCollection - - Feature: function(f) { - return d3_geo_pathType(centroidTypes, f.geometry); - }, - - Polygon: function(o) { - var centroid = polygonCentroid(o.coordinates); - return [centroid[0] / centroid[2], centroid[1] / centroid[2]]; - }, - - MultiPolygon: function(o) { - var area = 0, - coordinates = o.coordinates, - centroid, - x = 0, - y = 0, - z = 0, - i = -1, // coordinates index - n = coordinates.length; - while (++i < n) { - centroid = polygonCentroid(coordinates[i]); - x += centroid[0]; - y += centroid[1]; - z += centroid[2]; - } - return [x / z, y / z]; - } - - }; - - - function area(coordinates) { - return Math.abs(d3.geom.polygon(coordinates.map(projection)).area()); - } - - path.projection = function(x) { - projection = x; - return path; - }; - - path.area = function(d) { - return d3_geo_pathType(areaTypes, d); - }; - - path.centroid = function(d) { - return d3_geo_pathType(centroidTypes, d); - }; - - path.pointRadius = function(x) { - if (typeof x === "function") pointRadius = x; - else { - pointRadius = +x; - pointCircle = d3_path_circle(pointRadius); - } - return path; - }; - - return path; -}; - -function d3_path_circle(radius) { - return "m0," + radius - + "a" + radius + "," + radius + " 0 1,1 0," + (-2 * radius) - + "a" + radius + "," + radius + " 0 1,1 0," + (+2 * radius) - + "z"; -} - -function d3_geo_pathZero() { - return 0; -} - -function d3_geo_pathType(types, o) { - return o && o.type in types ? types[o.type](o) : ""; -} -/** - * Given a GeoJSON object, returns the corresponding bounding box. The bounding - * box is represented by a two-dimensional array: [[left, bottom], [right, - * top]], where left is the minimum longitude, bottom is the minimum latitude, - * right is maximum longitude, and top is the maximum latitude. - */ -d3.geo.bounds = function(feature) { - var left = Infinity, - bottom = Infinity, - right = -Infinity, - top = -Infinity; - d3_geo_bounds(feature, function(x, y) { - if (x < left) left = x; - if (x > right) right = x; - if (y < bottom) bottom = y; - if (y > top) top = y; - }); - return [[left, bottom], [right, top]]; -}; - -function d3_geo_bounds(o, f) { - if (o.type in d3_geo_boundsTypes) d3_geo_boundsTypes[o.type](o, f); -} - -var d3_geo_boundsTypes = { - Feature: d3_geo_boundsFeature, - FeatureCollection: d3_geo_boundsFeatureCollection, - LineString: d3_geo_boundsLineString, - MultiLineString: d3_geo_boundsMultiLineString, - MultiPoint: d3_geo_boundsLineString, - MultiPolygon: d3_geo_boundsMultiPolygon, - Point: d3_geo_boundsPoint, - Polygon: d3_geo_boundsPolygon -}; - -function d3_geo_boundsFeature(o, f) { - d3_geo_bounds(o.geometry, f); -} - -function d3_geo_boundsFeatureCollection(o, f) { - for (var a = o.features, i = 0, n = a.length; i < n; i++) { - d3_geo_bounds(a[i].geometry, f); - } -} - -function d3_geo_boundsLineString(o, f) { - for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) { - f.apply(null, a[i]); - } -} - -function d3_geo_boundsMultiLineString(o, f) { - for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) { - for (var b = a[i], j = 0, m = b.length; j < m; j++) { - f.apply(null, b[j]); - } - } -} - -function d3_geo_boundsMultiPolygon(o, f) { - for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) { - for (var b = a[i][0], j = 0, m = b.length; j < m; j++) { - f.apply(null, b[j]); - } - } -} - -function d3_geo_boundsPoint(o, f) { - f.apply(null, o.coordinates); -} - -function d3_geo_boundsPolygon(o, f) { - for (var a = o.coordinates[0], i = 0, n = a.length; i < n; i++) { - f.apply(null, a[i]); - } -} -})(); diff --git a/client/js/d3/d3.geom.js b/client/js/d3/d3.geom.js deleted file mode 100755 index 9d8bc31a..00000000 --- a/client/js/d3/d3.geom.js +++ /dev/null @@ -1,825 +0,0 @@ -(function(){d3.geom = {}; -/** - * Computes a contour for a given input grid function using the marching - * squares algorithm. Returns the contour polygon as an array of points. - * - * @param grid a two-input function(x, y) that returns true for values - * inside the contour and false for values outside the contour. - * @param start an optional starting point [x, y] on the grid. - * @returns polygon [[x1, y1], [x2, y2], …] - */ -d3.geom.contour = function(grid, start) { - var s = start || d3_geom_contourStart(grid), // starting point - c = [], // contour polygon - x = s[0], // current x position - y = s[1], // current y position - dx = 0, // next x direction - dy = 0, // next y direction - pdx = NaN, // previous x direction - pdy = NaN, // previous y direction - i = 0; - - do { - // determine marching squares index - i = 0; - if (grid(x-1, y-1)) i += 1; - if (grid(x, y-1)) i += 2; - if (grid(x-1, y )) i += 4; - if (grid(x, y )) i += 8; - - // determine next direction - if (i === 6) { - dx = pdy === -1 ? -1 : 1; - dy = 0; - } else if (i === 9) { - dx = 0; - dy = pdx === 1 ? -1 : 1; - } else { - dx = d3_geom_contourDx[i]; - dy = d3_geom_contourDy[i]; - } - - // update contour polygon - if (dx != pdx && dy != pdy) { - c.push([x, y]); - pdx = dx; - pdy = dy; - } - - x += dx; - y += dy; - } while (s[0] != x || s[1] != y); - - return c; -}; - -// lookup tables for marching directions -var d3_geom_contourDx = [1, 0, 1, 1,-1, 0,-1, 1,0, 0,0,0,-1, 0,-1,NaN], - d3_geom_contourDy = [0,-1, 0, 0, 0,-1, 0, 0,1,-1,1,1, 0,-1, 0,NaN]; - -function d3_geom_contourStart(grid) { - var x = 0, - y = 0; - - // search for a starting point; begin at origin - // and proceed along outward-expanding diagonals - while (true) { - if (grid(x,y)) { - return [x,y]; - } - if (x === 0) { - x = y + 1; - y = 0; - } else { - x = x - 1; - y = y + 1; - } - } -} -/** - * Computes the 2D convex hull of a set of points using Graham's scanning - * algorithm. The algorithm has been implemented as described in Cormen, - * Leiserson, and Rivest's Introduction to Algorithms. The running time of - * this algorithm is O(n log n), where n is the number of input points. - * - * @param vertices [[x1, y1], [x2, y2], …] - * @returns polygon [[x1, y1], [x2, y2], …] - */ -d3.geom.hull = function(vertices) { - if (vertices.length < 3) return []; - - var len = vertices.length, - plen = len - 1, - points = [], - stack = [], - i, j, h = 0, x1, y1, x2, y2, u, v, a, sp; - - // find the starting ref point: leftmost point with the minimum y coord - for (i=1; i= (x2*x2 + y2*y2)) { - points[i].index = -1; - } else { - points[u].index = -1; - a = points[i].angle; - u = i; - v = j; - } - } else { - a = points[i].angle; - u = i; - v = j; - } - } - - // initialize the stack - stack.push(h); - for (i=0, j=0; i<2; ++j) { - if (points[j].index !== -1) { - stack.push(points[j].index); - i++; - } - } - sp = stack.length; - - // do graham's scan - for (; j 0; -} -// Note: requires coordinates to be counterclockwise and convex! -d3.geom.polygon = function(coordinates) { - - coordinates.area = function() { - var i = 0, - n = coordinates.length, - a = coordinates[n - 1][0] * coordinates[0][1], - b = coordinates[n - 1][1] * coordinates[0][0]; - while (++i < n) { - a += coordinates[i - 1][0] * coordinates[i][1]; - b += coordinates[i - 1][1] * coordinates[i][0]; - } - return (b - a) * .5; - }; - - coordinates.centroid = function(k) { - var i = -1, - n = coordinates.length - 1, - x = 0, - y = 0, - a, - b, - c; - if (!arguments.length) k = 1 / (6 * coordinates.area()); - while (++i < n) { - a = coordinates[i]; - b = coordinates[i + 1]; - c = a[0] * b[1] - b[0] * a[1]; - x += (a[0] + b[0]) * c; - y += (a[1] + b[1]) * c; - } - return [x * k, y * k]; - }; - - // The Sutherland-Hodgman clipping algorithm. - coordinates.clip = function(subject) { - var input, - i = -1, - n = coordinates.length, - j, - m, - a = coordinates[n - 1], - b, - c, - d; - while (++i < n) { - input = subject.slice(); - subject.length = 0; - b = coordinates[i]; - c = input[(m = input.length) - 1]; - j = -1; - while (++j < m) { - d = input[j]; - if (d3_geom_polygonInside(d, a, b)) { - if (!d3_geom_polygonInside(c, a, b)) { - subject.push(d3_geom_polygonIntersect(c, d, a, b)); - } - subject.push(d); - } else if (d3_geom_polygonInside(c, a, b)) { - subject.push(d3_geom_polygonIntersect(c, d, a, b)); - } - c = d; - } - a = b; - } - return subject; - }; - - return coordinates; -}; - -function d3_geom_polygonInside(p, a, b) { - return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]); -} - -// Intersect two infinite lines cd and ab. -function d3_geom_polygonIntersect(c, d, a, b) { - var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0], - y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1], - x13 = x1 - x3, - x21 = x2 - x1, - x43 = x4 - x3, - y13 = y1 - y3, - y21 = y2 - y1, - y43 = y4 - y3, - ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21); - return [x1 + ua * x21, y1 + ua * y21]; -} -// Adapted from Nicolas Garcia Belmonte's JIT implementation: -// http://blog.thejit.org/2010/02/12/voronoi-tessellation/ -// http://blog.thejit.org/assets/voronoijs/voronoi.js -// See lib/jit/LICENSE for details. - -/** - * @param vertices [[x1, y1], [x2, y2], …] - * @returns polygons [[[x1, y1], [x2, y2], …], …] - */ -d3.geom.voronoi = function(vertices) { - var polygons = vertices.map(function() { return []; }); - - // Note: we expect the caller to clip the polygons, if needed. - d3_voronoi_tessellate(vertices, function(e) { - var s1, - s2, - x1, - x2, - y1, - y2; - if (e.a === 1 && e.b >= 0) { - s1 = e.ep.r; - s2 = e.ep.l; - } else { - s1 = e.ep.l; - s2 = e.ep.r; - } - if (e.a === 1) { - y1 = s1 ? s1.y : -1e6; - x1 = e.c - e.b * y1; - y2 = s2 ? s2.y : 1e6; - x2 = e.c - e.b * y2; - } else { - x1 = s1 ? s1.x : -1e6; - y1 = e.c - e.a * x1; - x2 = s2 ? s2.x : 1e6; - y2 = e.c - e.a * x2; - } - var v1 = [x1, y1], - v2 = [x2, y2]; - polygons[e.region.l.index].push(v1, v2); - polygons[e.region.r.index].push(v1, v2); - }); - - // Reconnect the polygon segments into counterclockwise loops. - return polygons.map(function(polygon, i) { - var cx = vertices[i][0], - cy = vertices[i][1]; - polygon.forEach(function(v) { - v.angle = Math.atan2(v[0] - cx, v[1] - cy); - }); - return polygon.sort(function(a, b) { - return a.angle - b.angle; - }).filter(function(d, i) { - return !i || (d.angle - polygon[i - 1].angle > 1e-10); - }); - }); -}; - -var d3_voronoi_opposite = {"l": "r", "r": "l"}; - -function d3_voronoi_tessellate(vertices, callback) { - - var Sites = { - list: vertices - .map(function(v, i) { - return { - index: i, - x: v[0], - y: v[1] - }; - }) - .sort(function(a, b) { - return a.y < b.y ? -1 - : a.y > b.y ? 1 - : a.x < b.x ? -1 - : a.x > b.x ? 1 - : 0; - }), - bottomSite: null - }; - - var EdgeList = { - list: [], - leftEnd: null, - rightEnd: null, - - init: function() { - EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l"); - EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l"); - EdgeList.leftEnd.r = EdgeList.rightEnd; - EdgeList.rightEnd.l = EdgeList.leftEnd; - EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd); - }, - - createHalfEdge: function(edge, side) { - return { - edge: edge, - side: side, - vertex: null, - "l": null, - "r": null - }; - }, - - insert: function(lb, he) { - he.l = lb; - he.r = lb.r; - lb.r.l = he; - lb.r = he; - }, - - leftBound: function(p) { - var he = EdgeList.leftEnd; - do { - he = he.r; - } while (he != EdgeList.rightEnd && Geom.rightOf(he, p)); - he = he.l; - return he; - }, - - del: function(he) { - he.l.r = he.r; - he.r.l = he.l; - he.edge = null; - }, - - right: function(he) { - return he.r; - }, - - left: function(he) { - return he.l; - }, - - leftRegion: function(he) { - return he.edge == null - ? Sites.bottomSite - : he.edge.region[he.side]; - }, - - rightRegion: function(he) { - return he.edge == null - ? Sites.bottomSite - : he.edge.region[d3_voronoi_opposite[he.side]]; - } - }; - - var Geom = { - - bisect: function(s1, s2) { - var newEdge = { - region: {"l": s1, "r": s2}, - ep: {"l": null, "r": null} - }; - - var dx = s2.x - s1.x, - dy = s2.y - s1.y, - adx = dx > 0 ? dx : -dx, - ady = dy > 0 ? dy : -dy; - - newEdge.c = s1.x * dx + s1.y * dy - + (dx * dx + dy * dy) * .5; - - if (adx > ady) { - newEdge.a = 1; - newEdge.b = dy / dx; - newEdge.c /= dx; - } else { - newEdge.b = 1; - newEdge.a = dx / dy; - newEdge.c /= dy; - } - - return newEdge; - }, - - intersect: function(el1, el2) { - var e1 = el1.edge, - e2 = el2.edge; - if (!e1 || !e2 || (e1.region.r == e2.region.r)) { - return null; - } - var d = (e1.a * e2.b) - (e1.b * e2.a); - if (Math.abs(d) < 1e-10) { - return null; - } - var xint = (e1.c * e2.b - e2.c * e1.b) / d, - yint = (e2.c * e1.a - e1.c * e2.a) / d, - e1r = e1.region.r, - e2r = e2.region.r, - el, - e; - if ((e1r.y < e2r.y) || - (e1r.y == e2r.y && e1r.x < e2r.x)) { - el = el1; - e = e1; - } else { - el = el2; - e = e2; - } - var rightOfSite = (xint >= e.region.r.x); - if ((rightOfSite && (el.side === "l")) || - (!rightOfSite && (el.side === "r"))) { - return null; - } - return { - x: xint, - y: yint - }; - }, - - rightOf: function(he, p) { - var e = he.edge, - topsite = e.region.r, - rightOfSite = (p.x > topsite.x); - - if (rightOfSite && (he.side === "l")) { - return 1; - } - if (!rightOfSite && (he.side === "r")) { - return 0; - } - if (e.a === 1) { - var dyp = p.y - topsite.y, - dxp = p.x - topsite.x, - fast = 0, - above = 0; - - if ((!rightOfSite && (e.b < 0)) || - (rightOfSite && (e.b >= 0))) { - above = fast = (dyp >= e.b * dxp); - } else { - above = ((p.x + p.y * e.b) > e.c); - if (e.b < 0) { - above = !above; - } - if (!above) { - fast = 1; - } - } - if (!fast) { - var dxs = topsite.x - e.region.l.x; - above = (e.b * (dxp * dxp - dyp * dyp)) < - (dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b)); - - if (e.b < 0) { - above = !above; - } - } - } else /* e.b == 1 */ { - var yl = e.c - e.a * p.x, - t1 = p.y - yl, - t2 = p.x - topsite.x, - t3 = yl - topsite.y; - - above = (t1 * t1) > (t2 * t2 + t3 * t3); - } - return he.side === "l" ? above : !above; - }, - - endPoint: function(edge, side, site) { - edge.ep[side] = site; - if (!edge.ep[d3_voronoi_opposite[side]]) return; - callback(edge); - }, - - distance: function(s, t) { - var dx = s.x - t.x, - dy = s.y - t.y; - return Math.sqrt(dx * dx + dy * dy); - } - }; - - var EventQueue = { - list: [], - - insert: function(he, site, offset) { - he.vertex = site; - he.ystar = site.y + offset; - for (var i=0, list=EventQueue.list, l=list.length; i next.ystar || - (he.ystar == next.ystar && - site.x > next.vertex.x)) { - continue; - } else { - break; - } - } - list.splice(i, 0, he); - }, - - del: function(he) { - for (var i=0, ls=EventQueue.list, l=ls.length; i top.y) { - temp = bot; - bot = top; - top = temp; - pm = "r"; - } - e = Geom.bisect(bot, top); - bisector = EdgeList.createHalfEdge(e, pm); - EdgeList.insert(llbnd, bisector); - Geom.endPoint(e, d3_voronoi_opposite[pm], v); - p = Geom.intersect(llbnd, bisector); - if (p) { - EventQueue.del(llbnd); - EventQueue.insert(llbnd, p, Geom.distance(p, bot)); - } - p = Geom.intersect(bisector, rrbnd); - if (p) { - EventQueue.insert(bisector, p, Geom.distance(p, bot)); - } - } else { - break; - } - }//end while - - for (lbnd = EdgeList.right(EdgeList.leftEnd); - lbnd != EdgeList.rightEnd; - lbnd = EdgeList.right(lbnd)) { - callback(lbnd.edge); - } -} -/** -* @param vertices [[x1, y1], [x2, y2], …] -* @returns triangles [[[x1, y1], [x2, y2], [x3, y3]], …] - */ -d3.geom.delaunay = function(vertices) { - var edges = vertices.map(function() { return []; }), - triangles = []; - - // Use the Voronoi tessellation to determine Delaunay edges. - d3_voronoi_tessellate(vertices, function(e) { - edges[e.region.l.index].push(vertices[e.region.r.index]); - }); - - // Reconnect the edges into counterclockwise triangles. - edges.forEach(function(edge, i) { - var v = vertices[i], - cx = v[0], - cy = v[1]; - edge.forEach(function(v) { - v.angle = Math.atan2(v[0] - cx, v[1] - cy); - }); - edge.sort(function(a, b) { - return a.angle - b.angle; - }); - for (var j = 0, m = edge.length - 1; j < m; j++) { - triangles.push([v, edge[j], edge[j + 1]]); - } - }); - - return triangles; -}; -// Constructs a new quadtree for the specified array of points. A quadtree is a -// two-dimensional recursive spatial subdivision. This implementation uses -// square partitions, dividing each square into four equally-sized squares. Each -// point exists in a unique node; if multiple points are in the same position, -// some points may be stored on internal nodes rather than leaf nodes. Quadtrees -// can be used to accelerate various spatial operations, such as the Barnes-Hut -// approximation for computing n-body forces, or collision detection. -d3.geom.quadtree = function(points, x1, y1, x2, y2) { - var p, - i = -1, - n = points.length; - - // Type conversion for deprecated API. - if (n && isNaN(points[0].x)) points = points.map(d3_geom_quadtreePoint); - - // Allow bounds to be specified explicitly. - if (arguments.length < 5) { - if (arguments.length === 3) { - y2 = x2 = y1; - y1 = x1; - } else { - x1 = y1 = Infinity; - x2 = y2 = -Infinity; - - // Compute bounds. - while (++i < n) { - p = points[i]; - if (p.x < x1) x1 = p.x; - if (p.y < y1) y1 = p.y; - if (p.x > x2) x2 = p.x; - if (p.y > y2) y2 = p.y; - } - - // Squarify the bounds. - var dx = x2 - x1, - dy = y2 - y1; - if (dx > dy) y2 = y1 + dx; - else x2 = x1 + dy; - } - } - - // Recursively inserts the specified point p at the node n or one of its - // descendants. The bounds are defined by [x1, x2] and [y1, y2]. - function insert(n, p, x1, y1, x2, y2) { - if (isNaN(p.x) || isNaN(p.y)) return; // ignore invalid points - if (n.leaf) { - var v = n.point; - if (v) { - // If the point at this leaf node is at the same position as the new - // point we are adding, we leave the point associated with the - // internal node while adding the new point to a child node. This - // avoids infinite recursion. - if ((Math.abs(v.x - p.x) + Math.abs(v.y - p.y)) < .01) { - insertChild(n, p, x1, y1, x2, y2); - } else { - n.point = null; - insertChild(n, v, x1, y1, x2, y2); - insertChild(n, p, x1, y1, x2, y2); - } - } else { - n.point = p; - } - } else { - insertChild(n, p, x1, y1, x2, y2); - } - } - - // Recursively inserts the specified point p into a descendant of node n. The - // bounds are defined by [x1, x2] and [y1, y2]. - function insertChild(n, p, x1, y1, x2, y2) { - // Compute the split point, and the quadrant in which to insert p. - var sx = (x1 + x2) * .5, - sy = (y1 + y2) * .5, - right = p.x >= sx, - bottom = p.y >= sy, - i = (bottom << 1) + right; - - // Recursively insert into the child node. - n.leaf = false; - n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode()); - - // Update the bounds as we recurse. - if (right) x1 = sx; else x2 = sx; - if (bottom) y1 = sy; else y2 = sy; - insert(n, p, x1, y1, x2, y2); - } - - // Create the root node. - var root = d3_geom_quadtreeNode(); - - root.add = function(p) { - insert(root, p, x1, y1, x2, y2); - }; - - root.visit = function(f) { - d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2); - }; - - // Insert all points. - points.forEach(root.add); - return root; -}; - -function d3_geom_quadtreeNode() { - return { - leaf: true, - nodes: [], - point: null - }; -} - -function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) { - if (!f(node, x1, y1, x2, y2)) { - var sx = (x1 + x2) * .5, - sy = (y1 + y2) * .5, - children = node.nodes; - if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy); - if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy); - if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2); - if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2); - } -} - -function d3_geom_quadtreePoint(p) { - return { - x: p[0], - y: p[1] - }; -} -})(); diff --git a/client/js/d3/d3.js b/client/js/d3/d3.js deleted file mode 100755 index 1120591d..00000000 --- a/client/js/d3/d3.js +++ /dev/null @@ -1,3597 +0,0 @@ -(function(){d3 = {version: "1.29.4"}; // semver -if (!Date.now) Date.now = function() { - return +new Date; -}; -if (!Object.create) Object.create = function(o) { - /** @constructor */ function f() {} - f.prototype = o; - return new f; -}; -var d3_array = d3_arraySlice; // conversion for NodeLists - -function d3_arrayCopy(psuedoarray) { - var i = -1, n = psuedoarray.length, array = []; - while (++i < n) array.push(psuedoarray[i]); - return array; -} - -function d3_arraySlice(psuedoarray) { - return Array.prototype.slice.call(psuedoarray); -} - -try { - d3_array(document.documentElement.childNodes)[0].nodeType; -} catch(e) { - d3_array = d3_arrayCopy; -} -d3.functor = function(v) { - return typeof v === "function" ? v : function() { return v; }; -}; -// A getter-setter method that preserves the appropriate `this` context. -d3.rebind = function(object, method) { - return function() { - var x = method.apply(object, arguments); - return arguments.length ? object : x; - }; -}; -d3.ascending = function(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -}; -d3.descending = function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -}; -d3.min = function(array, f) { - var i = -1, - n = array.length, - a, - b; - if (arguments.length === 1) { - while (++i < n && ((a = array[i]) == null || a != a)) a = undefined; - while (++i < n) if ((b = array[i]) != null && a > b) a = b; - } else { - while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined; - while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b; - } - return a; -}; -d3.max = function(array, f) { - var i = -1, - n = array.length, - a, - b; - if (arguments.length === 1) { - while (++i < n && ((a = array[i]) == null || a != a)) a = undefined; - while (++i < n) if ((b = array[i]) != null && b > a) a = b; - } else { - while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined; - while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b; - } - return a; -}; -d3.sum = function(array, f) { - var s = 0, - n = array.length, - a, - i = -1; - - if (arguments.length === 1) { - while (++i < n) if (!isNaN(a = +array[i])) s += a; - } else { - while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a; - } - - return s; -}; -// R-7 per -d3.quantile = function(values, p) { - var H = (values.length - 1) * p + 1, - h = Math.floor(H), - v = values[h - 1], - e = H - h; - return e ? v + e * (values[h] - v) : v; -}; -d3.zip = function() { - if (!(n = arguments.length)) return []; - for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m;) { - for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n;) { - zip[j] = arguments[j][i]; - } - } - return zips; -}; - -function d3_zipLength(d) { - return d.length; -} -// Locate the insertion point for x in a to maintain sorted order. The -// arguments lo and hi may be used to specify a subset of the array which should -// be considered; by default the entire array is used. If x is already present -// in a, the insertion point will be before (to the left of) any existing -// entries. The return value is suitable for use as the first argument to -// `array.splice` assuming that a is already sorted. -// -// The returned insertion point i partitions the array a into two halves so that -// all v < x for v in a[lo:i] for the left side and all v >= x for v in a[i:hi] -// for the right side. -d3.bisectLeft = function(a, x, lo, hi) { - if (arguments.length < 3) lo = 0; - if (arguments.length < 4) hi = a.length; - while (lo < hi) { - var mid = (lo + hi) >> 1; - if (a[mid] < x) lo = mid + 1; - else hi = mid; - } - return lo; -}; - -// Similar to bisectLeft, but returns an insertion point which comes after (to -// the right of) any existing entries of x in a. -// -// The returned insertion point i partitions the array into two halves so that -// all v <= x for v in a[lo:i] for the left side and all v > x for v in a[i:hi] -// for the right side. -d3.bisect = -d3.bisectRight = function(a, x, lo, hi) { - if (arguments.length < 3) lo = 0; - if (arguments.length < 4) hi = a.length; - while (lo < hi) { - var mid = (lo + hi) >> 1; - if (x < a[mid]) hi = mid; - else lo = mid + 1; - } - return lo; -}; -d3.first = function(array, f) { - var i = 0, - n = array.length, - a = array[0], - b; - if (arguments.length === 1) f = d3.ascending; - while (++i < n) { - if (f.call(array, a, b = array[i]) > 0) { - a = b; - } - } - return a; -}; -d3.last = function(array, f) { - var i = 0, - n = array.length, - a = array[0], - b; - if (arguments.length === 1) f = d3.ascending; - while (++i < n) { - if (f.call(array, a, b = array[i]) <= 0) { - a = b; - } - } - return a; -}; -d3.nest = function() { - var nest = {}, - keys = [], - sortKeys = [], - sortValues, - rollup; - - function map(array, depth) { - if (depth >= keys.length) return rollup - ? rollup.call(nest, array) : (sortValues - ? array.sort(sortValues) - : array); - - var i = -1, - n = array.length, - key = keys[depth++], - keyValue, - object, - o = {}; - - while (++i < n) { - if ((keyValue = key(object = array[i])) in o) { - o[keyValue].push(object); - } else { - o[keyValue] = [object]; - } - } - - for (keyValue in o) { - o[keyValue] = map(o[keyValue], depth); - } - - return o; - } - - function entries(map, depth) { - if (depth >= keys.length) return map; - - var a = [], - sortKey = sortKeys[depth++], - key; - - for (key in map) { - a.push({key: key, values: entries(map[key], depth)}); - } - - if (sortKey) a.sort(function(a, b) { - return sortKey(a.key, b.key); - }); - - return a; - } - - nest.map = function(array) { - return map(array, 0); - }; - - nest.entries = function(array) { - return entries(map(array, 0), 0); - }; - - nest.key = function(d) { - keys.push(d); - return nest; - }; - - // Specifies the order for the most-recently specified key. - // Note: only applies to entries. Map keys are unordered! - nest.sortKeys = function(order) { - sortKeys[keys.length - 1] = order; - return nest; - }; - - // Specifies the order for leaf values. - // Applies to both maps and entries array. - nest.sortValues = function(order) { - sortValues = order; - return nest; - }; - - nest.rollup = function(f) { - rollup = f; - return nest; - }; - - return nest; -}; -d3.keys = function(map) { - var keys = []; - for (var key in map) keys.push(key); - return keys; -}; -d3.values = function(map) { - var values = []; - for (var key in map) values.push(map[key]); - return values; -}; -d3.entries = function(map) { - var entries = []; - for (var key in map) entries.push({key: key, value: map[key]}); - return entries; -}; -d3.permute = function(array, indexes) { - var permutes = [], - i = -1, - n = indexes.length; - while (++i < n) permutes[i] = array[indexes[i]]; - return permutes; -}; -d3.merge = function(arrays) { - return Array.prototype.concat.apply([], arrays); -}; -d3.split = function(array, f) { - var arrays = [], - values = [], - value, - i = -1, - n = array.length; - if (arguments.length < 2) f = d3_splitter; - while (++i < n) { - if (f.call(values, value = array[i], i)) { - values = []; - } else { - if (!values.length) arrays.push(values); - values.push(value); - } - } - return arrays; -}; - -function d3_splitter(d) { - return d == null; -} -function d3_collapse(s) { - return s.replace(/(^\s+)|(\s+$)/g, "").replace(/\s+/g, " "); -} -// -// Note: assigning to the arguments array simultaneously changes the value of -// the corresponding argument! -// -// TODO The `this` argument probably shouldn't be the first argument to the -// callback, anyway, since it's redundant. However, that will require a major -// version bump due to backwards compatibility, so I'm not changing it right -// away. -// -function d3_call(callback) { - callback.apply(this, (arguments[0] = this, arguments)); - return this; -} -/** - * @param {number} start - * @param {number=} stop - * @param {number=} step - */ -d3.range = function(start, stop, step) { - if (arguments.length < 3) { - step = 1; - if (arguments.length < 2) { - stop = start; - start = 0; - } - } - if ((stop - start) / step == Infinity) throw new Error("infinite range"); - var range = [], - i = -1, - j; - if (step < 0) while ((j = start + step * ++i) > stop) range.push(j); - else while ((j = start + step * ++i) < stop) range.push(j); - return range; -}; -d3.requote = function(s) { - return s.replace(d3_requote_re, "\\$&"); -}; - -var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g; -d3.round = function(x, n) { - return n - ? Math.round(x * Math.pow(10, n)) * Math.pow(10, -n) - : Math.round(x); -}; -d3.xhr = function(url, mime, callback) { - var req = new XMLHttpRequest; - if (arguments.length < 3) callback = mime; - else if (mime && req.overrideMimeType) req.overrideMimeType(mime); - req.open("GET", url, true); - req.onreadystatechange = function() { - if (req.readyState === 4) callback(req.status < 300 ? req : null); - }; - req.send(null); -}; -d3.text = function(url, mime, callback) { - function ready(req) { - callback(req && req.responseText); - } - if (arguments.length < 3) { - callback = mime; - mime = null; - } - d3.xhr(url, mime, ready); -}; -d3.json = function(url, callback) { - d3.text(url, "application/json", function(text) { - callback(text ? JSON.parse(text) : null); - }); -}; -d3.html = function(url, callback) { - d3.text(url, "text/html", function(text) { - if (text != null) { // Treat empty string as valid HTML. - var range = document.createRange(); - range.selectNode(document.body); - text = range.createContextualFragment(text); - } - callback(text); - }); -}; -d3.xml = function(url, mime, callback) { - function ready(req) { - callback(req && req.responseXML); - } - if (arguments.length < 3) { - callback = mime; - mime = null; - } - d3.xhr(url, mime, ready); -}; -d3.ns = { - - prefix: { - svg: "http://www.w3.org/2000/svg", - xhtml: "http://www.w3.org/1999/xhtml", - xlink: "http://www.w3.org/1999/xlink", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/" - }, - - qualify: function(name) { - var i = name.indexOf(":"); - return i < 0 ? name : { - space: d3.ns.prefix[name.substring(0, i)], - local: name.substring(i + 1) - }; - } - -}; -/** @param {...string} types */ -d3.dispatch = function(types) { - var dispatch = {}, - type; - for (var i = 0, n = arguments.length; i < n; i++) { - type = arguments[i]; - dispatch[type] = d3_dispatch(type); - } - return dispatch; -}; - -function d3_dispatch(type) { - var dispatch = {}, - listeners = []; - - dispatch.add = function(listener) { - for (var i = 0; i < listeners.length; i++) { - if (listeners[i].listener == listener) return dispatch; // already registered - } - listeners.push({listener: listener, on: true}); - return dispatch; - }; - - dispatch.remove = function(listener) { - for (var i = 0; i < listeners.length; i++) { - var l = listeners[i]; - if (l.listener == listener) { - l.on = false; - listeners = listeners.slice(0, i).concat(listeners.slice(i + 1)); - break; - } - } - return dispatch; - }; - - dispatch.dispatch = function() { - var ls = listeners; // defensive reference - for (var i = 0, n = ls.length; i < n; i++) { - var l = ls[i]; - if (l.on) l.listener.apply(this, arguments); - } - }; - - return dispatch; -}; -// TODO align -d3.format = function(specifier) { - var match = d3_format_re.exec(specifier), - fill = match[1] || " ", - sign = match[3] || "", - zfill = match[5], - width = +match[6], - comma = match[7], - precision = match[8], - type = match[9], - percentage = false, - integer = false; - - if (precision) precision = precision.substring(1); - - if (zfill) { - fill = "0"; // TODO align = "="; - if (comma) width -= Math.floor((width - 1) / 4); - } - - switch (type) { - case "n": comma = true; type = "g"; break; - case "%": percentage = true; type = "f"; break; - case "p": percentage = true; type = "r"; break; - case "d": integer = true; precision = "0"; break; - } - - type = d3_format_types[type] || d3_format_typeDefault; - - return function(value) { - var number = percentage ? value * 100 : +value, - negative = (number < 0) && (number = -number) ? "\u2212" : sign; - - // Return the empty string for floats formatted as ints. - if (integer && (number % 1)) return ""; - - // Convert the input value to the desired precision. - value = type(number, precision); - - // If the fill character is 0, the sign and group is applied after the fill. - if (zfill) { - var length = value.length + negative.length; - if (length < width) value = new Array(width - length + 1).join(fill) + value; - if (comma) value = d3_format_group(value); - value = negative + value; - } - - // Otherwise (e.g., space-filling), the sign and group is applied before. - else { - if (comma) value = d3_format_group(value); - value = negative + value; - var length = value.length; - if (length < width) value = new Array(width - length + 1).join(fill) + value; - } - if (percentage) value += "%"; - - return value; - }; -}; - -// [[fill]align][sign][#][0][width][,][.precision][type] -var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/; - -var d3_format_types = { - g: function(x, p) { return x.toPrecision(p); }, - e: function(x, p) { return x.toExponential(p); }, - f: function(x, p) { return x.toFixed(p); }, - r: function(x, p) { - var n = 1 + Math.floor(1e-15 + Math.log(x) / Math.LN10); - return d3.round(x, p - n).toFixed(Math.max(0, p - n)); - } -}; - -function d3_format_typeDefault(x) { - return x + ""; -} - -// Apply comma grouping for thousands. -function d3_format_group(value) { - var i = value.lastIndexOf("."), - f = i >= 0 ? value.substring(i) : (i = value.length, ""), - t = []; - while (i > 0) t.push(value.substring(i -= 3, i + 3)); - return t.reverse().join(",") + f; -} -/* - * TERMS OF USE - EASING EQUATIONS - * - * Open source under the BSD License. - * - * Copyright 2001 Robert Penner - * 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 the author nor the names of 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 THE COPYRIGHT OWNER OR CONTRIBUTORS 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 d3_ease_quad = d3_ease_poly(2), - d3_ease_cubic = d3_ease_poly(3); - -var d3_ease = { - linear: function() { return d3_ease_linear; }, - poly: d3_ease_poly, - quad: function() { return d3_ease_quad; }, - cubic: function() { return d3_ease_cubic; }, - sin: function() { return d3_ease_sin; }, - exp: function() { return d3_ease_exp; }, - circle: function() { return d3_ease_circle; }, - elastic: d3_ease_elastic, - back: d3_ease_back, - bounce: function() { return d3_ease_bounce; } -}; - -var d3_ease_mode = { - "in": function(f) { return f; }, - "out": d3_ease_reverse, - "in-out": d3_ease_reflect, - "out-in": function(f) { return d3_ease_reflect(d3_ease_reverse(f)); } -}; - -d3.ease = function(name) { - var i = name.indexOf("-"), - t = i >= 0 ? name.substring(0, i) : name, - m = i >= 0 ? name.substring(i + 1) : "in"; - return d3_ease_mode[m](d3_ease[t].apply(null, Array.prototype.slice.call(arguments, 1))); -}; - -function d3_ease_reverse(f) { - return function(t) { - return 1 - f(1 - t); - }; -} - -function d3_ease_reflect(f) { - return function(t) { - return .5 * (t < .5 ? f(2 * t) : (2 - f(2 - 2 * t))); - }; -} - -function d3_ease_linear(t) { - return t; -} - -function d3_ease_poly(e) { - return function(t) { - return Math.pow(t, e); - } -} - -function d3_ease_sin(t) { - return 1 - Math.cos(t * Math.PI / 2); -} - -function d3_ease_exp(t) { - return Math.pow(2, 10 * (t - 1)); -} - -function d3_ease_circle(t) { - return 1 - Math.sqrt(1 - t * t); -} - -function d3_ease_elastic(a, p) { - var s; - if (arguments.length < 2) p = 0.45; - if (arguments.length < 1) { a = 1; s = p / 4; } - else s = p / (2 * Math.PI) * Math.asin(1 / a); - return function(t) { - return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p); - }; -} - -function d3_ease_back(s) { - if (!s) s = 1.70158; - return function(t) { - return t * t * ((s + 1) * t - s); - }; -} - -function d3_ease_bounce(t) { - return t < 1 / 2.75 ? 7.5625 * t * t - : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 - : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 - : 7.5625 * (t -= 2.625 / 2.75) * t + .984375; -} -d3.event = null; -d3.interpolate = function(a, b) { - var i = d3.interpolators.length, f; - while (--i >= 0 && !(f = d3.interpolators[i](a, b))); - return f; -}; - -d3.interpolateNumber = function(a, b) { - b -= a; - return function(t) { return a + b * t; }; -}; - -d3.interpolateRound = function(a, b) { - b -= a; - return function(t) { return Math.round(a + b * t); }; -}; - -d3.interpolateString = function(a, b) { - var m, // current match - i, // current index - j, // current index (for coallescing) - s0 = 0, // start index of current string prefix - s1 = 0, // end index of current string prefix - s = [], // string constants and placeholders - q = [], // number interpolators - n, // q.length - o; - - // Reset our regular expression! - d3_interpolate_number.lastIndex = 0; - - // Find all numbers in b. - for (i = 0; m = d3_interpolate_number.exec(b); ++i) { - if (m.index) s.push(b.substring(s0, s1 = m.index)); - q.push({i: s.length, x: m[0]}); - s.push(null); - s0 = d3_interpolate_number.lastIndex; - } - if (s0 < b.length) s.push(b.substring(s0)); - - // Find all numbers in a. - for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) { - o = q[i]; - if (o.x == m[0]) { // The numbers match, so coallesce. - if (o.i) { - if (s[o.i + 1] == null) { // This match is followed by another number. - s[o.i - 1] += o.x; - s.splice(o.i, 1); - for (j = i + 1; j < n; ++j) q[j].i--; - } else { // This match is followed by a string, so coallesce twice. - s[o.i - 1] += o.x + s[o.i + 1]; - s.splice(o.i, 2); - for (j = i + 1; j < n; ++j) q[j].i -= 2; - } - } else { - if (s[o.i + 1] == null) { // This match is followed by another number. - s[o.i] = o.x; - } else { // This match is followed by a string, so coallesce twice. - s[o.i] = o.x + s[o.i + 1]; - s.splice(o.i + 1, 1); - for (j = i + 1; j < n; ++j) q[j].i--; - } - } - q.splice(i, 1); - n--; - i--; - } else { - o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x)); - } - } - - // Remove any numbers in b not found in a. - while (i < n) { - o = q.pop(); - if (s[o.i + 1] == null) { // This match is followed by another number. - s[o.i] = o.x; - } else { // This match is followed by a string, so coallesce twice. - s[o.i] = o.x + s[o.i + 1]; - s.splice(o.i + 1, 1); - } - n--; - } - - // Special optimization for only a single match. - if (s.length === 1) { - return s[0] == null ? q[0].x : function() { return b; }; - } - - // Otherwise, interpolate each of the numbers and rejoin the string. - return function(t) { - for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }; -}; - -d3.interpolateRgb = function(a, b) { - a = d3.rgb(a); - b = d3.rgb(b); - var ar = a.r, - ag = a.g, - ab = a.b, - br = b.r - ar, - bg = b.g - ag, - bb = b.b - ab; - return function(t) { - return "rgb(" + Math.round(ar + br * t) - + "," + Math.round(ag + bg * t) - + "," + Math.round(ab + bb * t) - + ")"; - }; -}; - -// interpolates HSL space, but outputs RGB string (for compatibility) -d3.interpolateHsl = function(a, b) { - a = d3.hsl(a); - b = d3.hsl(b); - var h0 = a.h, - s0 = a.s, - l0 = a.l, - h1 = b.h - h0, - s1 = b.s - s0, - l1 = b.l - l0; - return function(t) { - return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t).toString(); - }; -}; - -d3.interpolateArray = function(a, b) { - var x = [], - c = [], - na = a.length, - nb = b.length, - n0 = Math.min(a.length, b.length), - i; - for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i])); - for (; i < na; ++i) c[i] = a[i]; - for (; i < nb; ++i) c[i] = b[i]; - return function(t) { - for (i = 0; i < n0; ++i) c[i] = x[i](t); - return c; - }; -}; - -d3.interpolateObject = function(a, b) { - var i = {}, - c = {}, - k; - for (k in a) { - if (k in b) { - i[k] = d3_interpolateByName(k)(a[k], b[k]); - } else { - c[k] = a[k]; - } - } - for (k in b) { - if (!(k in a)) { - c[k] = b[k]; - } - } - return function(t) { - for (k in i) c[k] = i[k](t); - return c; - }; -} - -var d3_interpolate_number = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g, - d3_interpolate_rgb = {background: 1, fill: 1, stroke: 1}; - -function d3_interpolateByName(n) { - return n in d3_interpolate_rgb || /\bcolor\b/.test(n) - ? d3.interpolateRgb - : d3.interpolate; -} - -d3.interpolators = [ - d3.interpolateObject, - function(a, b) { return (b instanceof Array) && d3.interpolateArray(a, b); }, - function(a, b) { return (typeof b === "string") && d3.interpolateString(String(a), b); }, - function(a, b) { return (typeof b === "string" ? b in d3_rgb_names || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(String(a), b); }, - function(a, b) { return (typeof b === "number") && d3.interpolateNumber(+a, b); } -]; -function d3_uninterpolateNumber(a, b) { - b = 1 / (b - (a = +a)); - return function(x) { return (x - a) * b; }; -} - -function d3_uninterpolateClamp(a, b) { - b = 1 / (b - (a = +a)); - return function(x) { return Math.max(0, Math.min(1, (x - a) * b)); }; -} -d3.rgb = function(r, g, b) { - return arguments.length === 1 - ? d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) - : d3_rgb(~~r, ~~g, ~~b); -}; - -function d3_rgb(r, g, b) { - return new d3_Rgb(r, g, b); -} - -function d3_Rgb(r, g, b) { - this.r = r; - this.g = g; - this.b = b; -} - -d3_Rgb.prototype.brighter = function(k) { - k = Math.pow(0.7, arguments.length ? k : 1); - var r = this.r, - g = this.g, - b = this.b, - i = 30; - if (!r && !g && !b) return d3_rgb(i, i, i); - if (r && r < i) r = i; - if (g && g < i) g = i; - if (b && b < i) b = i; - return d3_rgb( - Math.min(255, Math.floor(r / k)), - Math.min(255, Math.floor(g / k)), - Math.min(255, Math.floor(b / k))); -}; - -d3_Rgb.prototype.darker = function(k) { - k = Math.pow(0.7, arguments.length ? k : 1); - return d3_rgb( - Math.max(0, Math.floor(k * this.r)), - Math.max(0, Math.floor(k * this.g)), - Math.max(0, Math.floor(k * this.b))); -}; - -d3_Rgb.prototype.hsl = function() { - return d3_rgb_hsl(this.r, this.g, this.b); -}; - -d3_Rgb.prototype.toString = function() { - return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b); -}; - -function d3_rgb_hex(v) { - return v < 0x10 ? "0" + v.toString(16) : v.toString(16); -} - -function d3_rgb_parse(format, rgb, hsl) { - var r = 0, // red channel; int in [0, 255] - g = 0, // green channel; int in [0, 255] - b = 0, // blue channel; int in [0, 255] - m1, // CSS color specification match - m2, // CSS color specification type (e.g., rgb) - name; - - /* Handle hsl, rgb. */ - m1 = /([a-z]+)\((.*)\)/i.exec(format); - if (m1) { - m2 = m1[2].split(","); - switch (m1[1]) { - case "hsl": { - return hsl( - parseFloat(m2[0]), // degrees - parseFloat(m2[1]) / 100, // percentage - parseFloat(m2[2]) / 100 // percentage - ); - } - case "rgb": { - return rgb( - d3_rgb_parseNumber(m2[0]), - d3_rgb_parseNumber(m2[1]), - d3_rgb_parseNumber(m2[2]) - ); - } - } - } - - /* Named colors. */ - if (name = d3_rgb_names[format]) return rgb(name.r, name.g, name.b); - - /* Hexadecimal colors: #rgb and #rrggbb. */ - if (format != null && format.charAt(0) === "#") { - if (format.length === 4) { - r = format.charAt(1); r += r; - g = format.charAt(2); g += g; - b = format.charAt(3); b += b; - } else if (format.length === 7) { - r = format.substring(1, 3); - g = format.substring(3, 5); - b = format.substring(5, 7); - } - r = parseInt(r, 16); - g = parseInt(g, 16); - b = parseInt(b, 16); - } - - return rgb(r, g, b); -} - -function d3_rgb_hsl(r, g, b) { - var min = Math.min(r /= 255, g /= 255, b /= 255), - max = Math.max(r, g, b), - d = max - min, - h, - s, - l = (max + min) / 2; - if (d) { - s = l < .5 ? d / (max + min) : d / (2 - max - min); - if (r == max) h = (g - b) / d + (g < b ? 6 : 0); - else if (g == max) h = (b - r) / d + 2; - else h = (r - g) / d + 4; - h *= 60; - } else { - s = h = 0; - } - return d3_hsl(h, s, l); -} - -function d3_rgb_parseNumber(c) { // either integer or percentage - var f = parseFloat(c); - return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f; -} - -var d3_rgb_names = { - aliceblue: "#f0f8ff", - antiquewhite: "#faebd7", - aqua: "#00ffff", - aquamarine: "#7fffd4", - azure: "#f0ffff", - beige: "#f5f5dc", - bisque: "#ffe4c4", - black: "#000000", - blanchedalmond: "#ffebcd", - blue: "#0000ff", - blueviolet: "#8a2be2", - brown: "#a52a2a", - burlywood: "#deb887", - cadetblue: "#5f9ea0", - chartreuse: "#7fff00", - chocolate: "#d2691e", - coral: "#ff7f50", - cornflowerblue: "#6495ed", - cornsilk: "#fff8dc", - crimson: "#dc143c", - cyan: "#00ffff", - darkblue: "#00008b", - darkcyan: "#008b8b", - darkgoldenrod: "#b8860b", - darkgray: "#a9a9a9", - darkgreen: "#006400", - darkgrey: "#a9a9a9", - darkkhaki: "#bdb76b", - darkmagenta: "#8b008b", - darkolivegreen: "#556b2f", - darkorange: "#ff8c00", - darkorchid: "#9932cc", - darkred: "#8b0000", - darksalmon: "#e9967a", - darkseagreen: "#8fbc8f", - darkslateblue: "#483d8b", - darkslategray: "#2f4f4f", - darkslategrey: "#2f4f4f", - darkturquoise: "#00ced1", - darkviolet: "#9400d3", - deeppink: "#ff1493", - deepskyblue: "#00bfff", - dimgray: "#696969", - dimgrey: "#696969", - dodgerblue: "#1e90ff", - firebrick: "#b22222", - floralwhite: "#fffaf0", - forestgreen: "#228b22", - fuchsia: "#ff00ff", - gainsboro: "#dcdcdc", - ghostwhite: "#f8f8ff", - gold: "#ffd700", - goldenrod: "#daa520", - gray: "#808080", - green: "#008000", - greenyellow: "#adff2f", - grey: "#808080", - honeydew: "#f0fff0", - hotpink: "#ff69b4", - indianred: "#cd5c5c", - indigo: "#4b0082", - ivory: "#fffff0", - khaki: "#f0e68c", - lavender: "#e6e6fa", - lavenderblush: "#fff0f5", - lawngreen: "#7cfc00", - lemonchiffon: "#fffacd", - lightblue: "#add8e6", - lightcoral: "#f08080", - lightcyan: "#e0ffff", - lightgoldenrodyellow: "#fafad2", - lightgray: "#d3d3d3", - lightgreen: "#90ee90", - lightgrey: "#d3d3d3", - lightpink: "#ffb6c1", - lightsalmon: "#ffa07a", - lightseagreen: "#20b2aa", - lightskyblue: "#87cefa", - lightslategray: "#778899", - lightslategrey: "#778899", - lightsteelblue: "#b0c4de", - lightyellow: "#ffffe0", - lime: "#00ff00", - limegreen: "#32cd32", - linen: "#faf0e6", - magenta: "#ff00ff", - maroon: "#800000", - mediumaquamarine: "#66cdaa", - mediumblue: "#0000cd", - mediumorchid: "#ba55d3", - mediumpurple: "#9370db", - mediumseagreen: "#3cb371", - mediumslateblue: "#7b68ee", - mediumspringgreen: "#00fa9a", - mediumturquoise: "#48d1cc", - mediumvioletred: "#c71585", - midnightblue: "#191970", - mintcream: "#f5fffa", - mistyrose: "#ffe4e1", - moccasin: "#ffe4b5", - navajowhite: "#ffdead", - navy: "#000080", - oldlace: "#fdf5e6", - olive: "#808000", - olivedrab: "#6b8e23", - orange: "#ffa500", - orangered: "#ff4500", - orchid: "#da70d6", - palegoldenrod: "#eee8aa", - palegreen: "#98fb98", - paleturquoise: "#afeeee", - palevioletred: "#db7093", - papayawhip: "#ffefd5", - peachpuff: "#ffdab9", - peru: "#cd853f", - pink: "#ffc0cb", - plum: "#dda0dd", - powderblue: "#b0e0e6", - purple: "#800080", - red: "#ff0000", - rosybrown: "#bc8f8f", - royalblue: "#4169e1", - saddlebrown: "#8b4513", - salmon: "#fa8072", - sandybrown: "#f4a460", - seagreen: "#2e8b57", - seashell: "#fff5ee", - sienna: "#a0522d", - silver: "#c0c0c0", - skyblue: "#87ceeb", - slateblue: "#6a5acd", - slategray: "#708090", - slategrey: "#708090", - snow: "#fffafa", - springgreen: "#00ff7f", - steelblue: "#4682b4", - tan: "#d2b48c", - teal: "#008080", - thistle: "#d8bfd8", - tomato: "#ff6347", - turquoise: "#40e0d0", - violet: "#ee82ee", - wheat: "#f5deb3", - white: "#ffffff", - whitesmoke: "#f5f5f5", - yellow: "#ffff00", - yellowgreen: "#9acd32" -}; - -for (var d3_rgb_name in d3_rgb_names) { - d3_rgb_names[d3_rgb_name] = d3_rgb_parse( - d3_rgb_names[d3_rgb_name], - d3_rgb, - d3_hsl_rgb); -} -d3.hsl = function(h, s, l) { - return arguments.length === 1 - ? d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) - : d3_hsl(+h, +s, +l); -}; - -function d3_hsl(h, s, l) { - return new d3_Hsl(h, s, l); -} - -function d3_Hsl(h, s, l) { - this.h = h; - this.s = s; - this.l = l; -} - -d3_Hsl.prototype.brighter = function(k) { - k = Math.pow(0.7, arguments.length ? k : 1); - return d3_hsl(this.h, this.s, this.l / k); -}; - -d3_Hsl.prototype.darker = function(k) { - k = Math.pow(0.7, arguments.length ? k : 1); - return d3_hsl(this.h, this.s, k * this.l); -}; - -d3_Hsl.prototype.rgb = function() { - return d3_hsl_rgb(this.h, this.s, this.l); -}; - -d3_Hsl.prototype.toString = function() { - return "hsl(" + this.h + "," + this.s * 100 + "%," + this.l * 100 + "%)"; -}; - -function d3_hsl_rgb(h, s, l) { - var m1, - m2; - - /* Some simple corrections for h, s and l. */ - h = h % 360; if (h < 0) h += 360; - s = s < 0 ? 0 : s > 1 ? 1 : s; - l = l < 0 ? 0 : l > 1 ? 1 : l; - - /* From FvD 13.37, CSS Color Module Level 3 */ - m2 = l <= .5 ? l * (1 + s) : l + s - l * s; - m1 = 2 * l - m2; - - function v(h) { - if (h > 360) h -= 360; - else if (h < 0) h += 360; - if (h < 60) return m1 + (m2 - m1) * h / 60; - if (h < 180) return m2; - if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60; - return m1; - } - - function vv(h) { - return Math.round(v(h) * 255); - } - - return d3_rgb(vv(h + 120), vv(h), vv(h - 120)); -} -var d3_select = function(s, n) { return n.querySelector(s); }, - d3_selectAll = function(s, n) { return d3_array(n.querySelectorAll(s)); }; - -// Use Sizzle, if available. -if (typeof Sizzle === "function") { - d3_select = function(s, n) { return Sizzle(s, n)[0]; }; - d3_selectAll = function(s, n) { return Sizzle.uniqueSort(Sizzle(s, n)); }; -} - -var d3_root = d3_selection([[document]]); -d3_root[0].parentNode = document.documentElement; - -// TODO fast singleton implementation! -d3.select = function(selector) { - return typeof selector === "string" - ? d3_root.select(selector) - : d3_selection([[selector]]); // assume node -}; - -d3.selectAll = function(selector) { - return typeof selector === "string" - ? d3_root.selectAll(selector) - : d3_selection([d3_array(selector)]); // assume node[] -}; - -function d3_selection(groups) { - - function select(select) { - var subgroups = [], - subgroup, - subnode, - group, - node; - for (var j = 0, m = groups.length; j < m; j++) { - group = groups[j]; - subgroups.push(subgroup = []); - subgroup.parentNode = group.parentNode; - for (var i = 0, n = group.length; i < n; i++) { - if (node = group[i]) { - subgroup.push(subnode = select(node)); - if (subnode && "__data__" in node) subnode.__data__ = node.__data__; - } else { - subgroup.push(null); - } - } - } - return d3_selection(subgroups); - } - - function selectAll(selectAll) { - var subgroups = [], - subgroup, - group, - node; - for (var j = 0, m = groups.length; j < m; j++) { - group = groups[j]; - for (var i = 0, n = group.length; i < n; i++) { - if (node = group[i]) { - subgroups.push(subgroup = selectAll(node)); - subgroup.parentNode = node; - } - } - } - return d3_selection(subgroups); - } - - // TODO select(function)? - groups.select = function(selector) { - return select(function(node) { - return d3_select(selector, node); - }); - }; - - // TODO selectAll(function)? - groups.selectAll = function(selector) { - return selectAll(function(node) { - return d3_selectAll(selector, node); - }); - }; - - // TODO preserve null elements to maintain index? - groups.filter = function(filter) { - var subgroups = [], - subgroup, - group, - node; - for (var j = 0, m = groups.length; j < m; j++) { - group = groups[j]; - subgroups.push(subgroup = []); - subgroup.parentNode = group.parentNode; - for (var i = 0, n = group.length; i < n; i++) { - if ((node = group[i]) && filter.call(node, node.__data__, i)) { - subgroup.push(node); - } - } - } - return d3_selection(subgroups); - }; - - groups.map = function(map) { - var group, - node; - for (var j = 0, m = groups.length; j < m; j++) { - group = groups[j]; - for (var i = 0, n = group.length; i < n; i++) { - if (node = group[i]) node.__data__ = map.call(node, node.__data__, i); - } - } - return groups; - }; - - // TODO data(null) for clearing data? - groups.data = function(data, join) { - var enter = [], - update = [], - exit = []; - - function bind(group, groupData) { - var i = 0, - n = group.length, - m = groupData.length, - n0 = Math.min(n, m), - n1 = Math.max(n, m), - updateNodes = [], - enterNodes = [], - exitNodes = [], - node, - nodeData; - - if (join) { - var nodeByKey = {}, - keys = [], - key, - j = groupData.length; - - for (i = 0; i < n; i++) { - key = join.call(node = group[i], node.__data__, i); - if (key in nodeByKey) { - exitNodes[j++] = node; // duplicate key - } else { - nodeByKey[key] = node; - } - keys.push(key); - } - - for (i = 0; i < m; i++) { - node = nodeByKey[key = join.call(groupData, nodeData = groupData[i], i)]; - if (node) { - node.__data__ = nodeData; - updateNodes[i] = node; - enterNodes[i] = exitNodes[i] = null; - } else { - enterNodes[i] = d3_selection_enterNode(nodeData); - updateNodes[i] = exitNodes[i] = null; - } - delete nodeByKey[key]; - } - - for (i = 0; i < n; i++) { - if (keys[i] in nodeByKey) { - exitNodes[i] = group[i]; - } - } - } else { - for (; i < n0; i++) { - node = group[i]; - nodeData = groupData[i]; - if (node) { - node.__data__ = nodeData; - updateNodes[i] = node; - enterNodes[i] = exitNodes[i] = null; - } else { - enterNodes[i] = d3_selection_enterNode(nodeData); - updateNodes[i] = exitNodes[i] = null; - } - } - for (; i < m; i++) { - enterNodes[i] = d3_selection_enterNode(groupData[i]); - updateNodes[i] = exitNodes[i] = null; - } - for (; i < n1; i++) { - exitNodes[i] = group[i]; - enterNodes[i] = updateNodes[i] = null; - } - } - - enterNodes.parentNode - = updateNodes.parentNode - = exitNodes.parentNode - = group.parentNode; - - enter.push(enterNodes); - update.push(updateNodes); - exit.push(exitNodes); - } - - var i = -1, - n = groups.length, - group; - if (typeof data === "function") { - while (++i < n) { - bind(group = groups[i], data.call(group, group.parentNode.__data__, i)); - } - } else { - while (++i < n) { - bind(group = groups[i], data); - } - } - - var selection = d3_selection(update); - selection.enter = function() { - return d3_selectionEnter(enter); - }; - selection.exit = function() { - return d3_selection(exit); - }; - return selection; - }; - - // TODO mask forEach? or rename for eachData? - // TODO offer the same semantics for map, reduce, etc.? - groups.each = function(callback) { - for (var j = 0, m = groups.length; j < m; j++) { - var group = groups[j]; - for (var i = 0, n = group.length; i < n; i++) { - var node = group[i]; - if (node) callback.call(node, node.__data__, i); - } - } - return groups; - }; - - function first(callback) { - for (var j = 0, m = groups.length; j < m; j++) { - var group = groups[j]; - for (var i = 0, n = group.length; i < n; i++) { - var node = group[i]; - if (node) return callback.call(node, node.__data__, i); - } - } - return null; - } - - groups.empty = function() { - return !first(function() { return true; }); - }; - - groups.node = function() { - return first(function() { return this; }); - }; - - groups.attr = function(name, value) { - name = d3.ns.qualify(name); - - // If no value is specified, return the first value. - if (arguments.length < 2) { - return first(name.local - ? function() { return this.getAttributeNS(name.space, name.local); } - : function() { return this.getAttribute(name); }); - } - - /** @this {Element} */ - function attrNull() { - this.removeAttribute(name); - } - - /** @this {Element} */ - function attrNullNS() { - this.removeAttributeNS(name.space, name.local); - } - - /** @this {Element} */ - function attrConstant() { - this.setAttribute(name, value); - } - - /** @this {Element} */ - function attrConstantNS() { - this.setAttributeNS(name.space, name.local, value); - } - - /** @this {Element} */ - function attrFunction() { - var x = value.apply(this, arguments); - if (x == null) this.removeAttribute(name); - else this.setAttribute(name, x); - } - - /** @this {Element} */ - function attrFunctionNS() { - var x = value.apply(this, arguments); - if (x == null) this.removeAttributeNS(name.space, name.local); - else this.setAttributeNS(name.space, name.local, x); - } - - return groups.each(value == null - ? (name.local ? attrNullNS : attrNull) : (typeof value === "function" - ? (name.local ? attrFunctionNS : attrFunction) - : (name.local ? attrConstantNS : attrConstant))); - }; - - groups.classed = function(name, value) { - var re = new RegExp("(^|\\s+)" + d3.requote(name) + "(\\s+|$)", "g"); - - // If no value is specified, return the first value. - if (arguments.length < 2) { - return first(function() { - if (c = this.classList) return c.contains(name); - var c = this.className; - re.lastIndex = 0; - return re.test(c.baseVal != null ? c.baseVal : c); - }); - } - - /** @this {Element} */ - function classedAdd() { - if (c = this.classList) return c.add(name); - var c = this.className, - cb = c.baseVal != null, - cv = cb ? c.baseVal : c; - re.lastIndex = 0; - if (!re.test(cv)) { - cv = d3_collapse(cv + " " + name); - if (cb) c.baseVal = cv; - else this.className = cv; - } - } - - /** @this {Element} */ - function classedRemove() { - if (c = this.classList) return c.remove(name); - var c = this.className, - cb = c.baseVal != null, - cv = cb ? c.baseVal : c; - cv = d3_collapse(cv.replace(re, " ")); - if (cb) c.baseVal = cv; - else this.className = cv; - } - - /** @this {Element} */ - function classedFunction() { - (value.apply(this, arguments) - ? classedAdd - : classedRemove).call(this); - } - - return groups.each(typeof value === "function" - ? classedFunction : value - ? classedAdd - : classedRemove); - }; - - groups.style = function(name, value, priority) { - if (arguments.length < 3) priority = ""; - - // If no value is specified, return the first value. - if (arguments.length < 2) { - return first(function() { - return window.getComputedStyle(this, null).getPropertyValue(name); - }); - } - - /** @this {Element} */ - function styleNull() { - this.style.removeProperty(name); - } - - /** @this {Element} */ - function styleConstant() { - this.style.setProperty(name, value, priority); - } - - /** @this {Element} */ - function styleFunction() { - var x = value.apply(this, arguments); - if (x == null) this.style.removeProperty(name); - else this.style.setProperty(name, x, priority); - } - - return groups.each(value == null - ? styleNull : (typeof value === "function" - ? styleFunction : styleConstant)); - }; - - groups.property = function(name, value) { - name = d3.ns.qualify(name); - - // If no value is specified, return the first value. - if (arguments.length < 2) { - return first(function() { - return this[name]; - }); - } - - /** @this {Element} */ - function propertyNull() { - delete this[name]; - } - - /** @this {Element} */ - function propertyConstant() { - this[name] = value; - } - - /** @this {Element} */ - function propertyFunction() { - var x = value.apply(this, arguments); - if (x == null) delete this[name]; - else this[name] = x; - } - - return groups.each(value == null - ? propertyNull : (typeof value === "function" - ? propertyFunction : propertyConstant)); - }; - - groups.text = function(value) { - - // If no value is specified, return the first value. - if (arguments.length < 1) { - return first(function() { - return this.textContent; - }); - } - - /** @this {Element} */ - function textConstant() { - this.textContent = value; - } - - /** @this {Element} */ - function textFunction() { - this.textContent = value.apply(this, arguments); - } - - return groups.each(typeof value === "function" - ? textFunction : textConstant); - }; - - groups.html = function(value) { - - // If no value is specified, return the first value. - if (arguments.length < 1) { - return first(function() { - return this.innerHTML; - }); - } - - /** @this {Element} */ - function htmlConstant() { - this.innerHTML = value; - } - - /** @this {Element} */ - function htmlFunction() { - this.innerHTML = value.apply(this, arguments); - } - - return groups.each(typeof value === "function" - ? htmlFunction : htmlConstant); - }; - - // TODO append(node)? - // TODO append(function)? - groups.append = function(name) { - name = d3.ns.qualify(name); - - function append(node) { - return node.appendChild(document.createElement(name)); - } - - function appendNS(node) { - return node.appendChild(document.createElementNS(name.space, name.local)); - } - - return select(name.local ? appendNS : append); - }; - - // TODO insert(node, function)? - // TODO insert(function, string)? - // TODO insert(function, function)? - groups.insert = function(name, before) { - name = d3.ns.qualify(name); - - function insert(node) { - return node.insertBefore( - document.createElement(name), - d3_select(before, node)); - } - - function insertNS(node) { - return node.insertBefore( - document.createElementNS(name.space, name.local), - d3_select(before, node)); - } - - return select(name.local ? insertNS : insert); - }; - - // TODO remove(selector)? - // TODO remove(node)? - // TODO remove(function)? - groups.remove = function() { - return groups.each(function() { - var parent = this.parentNode; - if (parent) parent.removeChild(this); - }); - }; - - groups.sort = function(comparator) { - comparator = d3_selection_comparator.apply(this, arguments); - for (var j = 0, m = groups.length; j < m; j++) { - var group = groups[j]; - group.sort(comparator); - for (var i = 1, n = group.length, prev = group[0]; i < n; i++) { - var node = group[i]; - if (node) { - if (prev) prev.parentNode.insertBefore(node, prev.nextSibling); - prev = node; - } - } - } - return groups; - }; - - // type can be namespaced, e.g., "click.foo" - // listener can be null for removal - groups.on = function(type, listener, capture) { - if (arguments.length < 3) capture = false; - - // parse the type specifier - var i = type.indexOf("."), - typo = i === -1 ? type : type.substring(0, i), - name = "__on" + type; - - // remove the old event listener, and add the new event listener - return groups.each(function(d, i) { - if (this[name]) this.removeEventListener(typo, this[name], capture); - if (listener) this.addEventListener(typo, this[name] = l, capture); - - // wrapped event listener that preserves i - var node = this; - function l(e) { - var o = d3.event; // Events can be reentrant (e.g., focus). - d3.event = e; - try { - listener.call(this, node.__data__, i); - } finally { - d3.event = o; - } - } - }); - }; - - // TODO slice? - - groups.transition = function() { - return d3_transition(groups); - }; - - groups.call = d3_call; - - return groups; -} - -function d3_selectionEnter(groups) { - - function select(select) { - var subgroups = [], - subgroup, - subnode, - group, - node; - for (var j = 0, m = groups.length; j < m; j++) { - group = groups[j]; - subgroups.push(subgroup = []); - subgroup.parentNode = group.parentNode; - for (var i = 0, n = group.length; i < n; i++) { - if (node = group[i]) { - subgroup.push(subnode = select(group.parentNode)); - subnode.__data__ = node.__data__; - } else { - subgroup.push(null); - } - } - } - return d3_selection(subgroups); - } - - // TODO append(node)? - // TODO append(function)? - groups.append = function(name) { - name = d3.ns.qualify(name); - - function append(node) { - return node.appendChild(document.createElement(name)); - } - - function appendNS(node) { - return node.appendChild(document.createElementNS(name.space, name.local)); - } - - return select(name.local ? appendNS : append); - }; - - // TODO insert(node, function)? - // TODO insert(function, string)? - // TODO insert(function, function)? - groups.insert = function(name, before) { - name = d3.ns.qualify(name); - - function insert(node) { - return node.insertBefore( - document.createElement(name), - d3_select(before, node)); - } - - function insertNS(node) { - return node.insertBefore( - document.createElementNS(name.space, name.local), - d3_select(before, node)); - } - - return select(name.local ? insertNS : insert); - }; - - return groups; -} - -function d3_selection_comparator(comparator) { - if (!arguments.length) comparator = d3.ascending; - return function(a, b) { - return comparator(a && a.__data__, b && b.__data__); - }; -} - -function d3_selection_enterNode(data) { - return {__data__: data}; -} -d3.transition = d3_root.transition; - -var d3_transitionId = 0, - d3_transitionInheritId = 0; - -function d3_transition(groups) { - var transition = {}, - transitionId = d3_transitionInheritId || ++d3_transitionId, - tweens = {}, - interpolators = [], - remove = false, - event = d3.dispatch("start", "end"), - stage = [], - delay = [], - duration = [], - durationMax, - ease = d3.ease("cubic-in-out"); - - // - // Be careful with concurrent transitions! - // - // Say transition A causes an exit. Before A finishes, a transition B is - // created, and believes it only needs to do an update, because the elements - // haven't been removed yet (which happens at the very end of the exit - // transition). - // - // Even worse, what if either transition A or B has a staggered delay? Then, - // some elements may be removed, while others remain. Transition B does not - // know to enter the elements because they were still present at the time - // the transition B was created (but not yet started). - // - // To prevent such confusion, we only trigger end events for transitions if - // the transition ending is the only one scheduled for the given element. - // Similarly, we only allow one transition to be active for any given - // element, so that concurrent transitions do not overwrite each other's - // properties. - // - // TODO Support transition namespaces, so that transitions can proceed - // concurrently on the same element if needed. Hopefully, this is rare! - // - - groups.each(function() { - (this.__transition__ || (this.__transition__ = {})).owner = transitionId; - }); - - function step(elapsed) { - var clear = true, - k = -1; - groups.each(function() { - if (stage[++k] === 2) return; // ended - var t = (elapsed - delay[k]) / duration[k], - tx = this.__transition__, - te, // ease(t) - tk, // tween key - ik = interpolators[k]; - - // Check if the (un-eased) time is outside the range [0,1]. - if (t < 1) { - clear = false; - if (t < 0) return; - } else { - t = 1; - } - - // Determine the stage of this transition. - // 0 - Not yet started. - // 1 - In progress. - // 2 - Ended. - if (stage[k]) { - if (!tx || tx.active !== transitionId) { - stage[k] = 2; - return; - } - } else if (!tx || tx.active > transitionId) { - stage[k] = 2; - return; - } else { - stage[k] = 1; - event.start.dispatch.apply(this, arguments); - ik = interpolators[k] = {}; - tx.active = transitionId; - for (tk in tweens) { - if (te = tweens[tk].apply(this, arguments)) { - ik[tk] = te; - } - } - } - - // Apply the interpolators! - te = ease(t); - for (tk in ik) ik[tk].call(this, te); - - // Handle ending transitions. - if (t === 1) { - stage[k] = 2; - if (tx.active === transitionId) { - var owner = tx.owner; - if (owner === transitionId) { - delete this.__transition__; - if (remove && this.parentNode) this.parentNode.removeChild(this); - } - d3_transitionInheritId = transitionId; - event.end.dispatch.apply(this, arguments); - d3_transitionInheritId = 0; - tx.owner = owner; - } - } - }); - return clear; - } - - transition.delay = function(value) { - var delayMin = Infinity, - k = -1; - if (typeof value === "function") { - groups.each(function(d, i) { - var x = delay[++k] = +value.apply(this, arguments); - if (x < delayMin) delayMin = x; - }); - } else { - delayMin = +value; - groups.each(function(d, i) { - delay[++k] = delayMin; - }); - } - d3_timer(step, delayMin); - return transition; - }; - - transition.duration = function(value) { - var k = -1; - if (typeof value === "function") { - durationMax = 0; - groups.each(function(d, i) { - var x = duration[++k] = +value.apply(this, arguments); - if (x > durationMax) durationMax = x; - }); - } else { - durationMax = +value; - groups.each(function(d, i) { - duration[++k] = durationMax; - }); - } - return transition; - }; - - transition.ease = function(value) { - ease = typeof value === "function" ? value : d3.ease.apply(d3, arguments); - return transition; - }; - - transition.attrTween = function(name, tween) { - - /** @this {Element} */ - function attrTween(d, i) { - var f = tween.call(this, d, i, this.getAttribute(name)); - return f && function(t) { - this.setAttribute(name, f(t)); - }; - } - - /** @this {Element} */ - function attrTweenNS(d, i) { - var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local)); - return f && function(t) { - this.setAttributeNS(name.space, name.local, f(t)); - }; - } - - tweens["attr." + name] = name.local ? attrTweenNS : attrTween; - return transition; - }; - - transition.attr = function(name, value) { - return transition.attrTween(name, d3_transitionTween(value)); - }; - - transition.styleTween = function(name, tween, priority) { - if (arguments.length < 3) priority = null; - - /** @this {Element} */ - function styleTween(d, i) { - var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name)); - return f && function(t) { - this.style.setProperty(name, f(t), priority); - }; - } - - tweens["style." + name] = styleTween; - return transition; - }; - - transition.style = function(name, value, priority) { - if (arguments.length < 3) priority = null; - return transition.styleTween(name, d3_transitionTween(value), priority); - }; - - transition.text = function(value) { - tweens.text = function(d, i) { - this.textContent = typeof value === "function" - ? value.call(this, d, i) - : value; - }; - return transition; - }; - - transition.select = function(query) { - var k, t = d3_transition(groups.select(query)).ease(ease); - k = -1; t.delay(function(d, i) { return delay[++k]; }); - k = -1; t.duration(function(d, i) { return duration[++k]; }); - return t; - }; - - transition.selectAll = function(query) { - var k, t = d3_transition(groups.selectAll(query)).ease(ease); - k = -1; t.delay(function(d, i) { return delay[i ? k : ++k]; }) - k = -1; t.duration(function(d, i) { return duration[i ? k : ++k]; }); - return t; - }; - - transition.remove = function() { - remove = true; - return transition; - }; - - transition.each = function(type, listener) { - event[type].add(listener); - return transition; - }; - - transition.call = d3_call; - - return transition.delay(0).duration(250); -} - -function d3_transitionTween(b) { - return typeof b === "function" - ? function(d, i, a) { var v = b.call(this, d, i) + ""; return a != v && d3.interpolate(a, v); } - : (b = b + "", function(d, i, a) { return a != b && d3.interpolate(a, b); }); -} -var d3_timer_queue = null, - d3_timer_interval, // is an interval (or frame) active? - d3_timer_timeout; // is a timeout active? - -// The timer will continue to fire until callback returns true. -d3.timer = function(callback) { - d3_timer(callback, 0); -}; - -function d3_timer(callback, delay) { - var now = Date.now(), - found = false, - t0, - t1 = d3_timer_queue; - - if (!isFinite(delay)) return; - - // See if the callback's already in the queue. - while (t1) { - if (t1.callback === callback) { - t1.then = now; - t1.delay = delay; - found = true; - break; - } - t0 = t1; - t1 = t1.next; - } - - // Otherwise, add the callback to the queue. - if (!found) d3_timer_queue = { - callback: callback, - then: now, - delay: delay, - next: d3_timer_queue - }; - - // Start animatin'! - if (!d3_timer_interval) { - d3_timer_timeout = clearTimeout(d3_timer_timeout); - d3_timer_interval = 1; - d3_timer_frame(d3_timer_step); - } -} - -function d3_timer_step() { - var elapsed, - now = Date.now(), - t1 = d3_timer_queue; - - while (t1) { - elapsed = now - t1.then; - if (elapsed > t1.delay) t1.flush = t1.callback(elapsed); - t1 = t1.next; - } - - var delay = d3_timer_flush() - now; - if (delay > 24) { - if (isFinite(delay)) { - clearTimeout(d3_timer_timeout); - d3_timer_timeout = setTimeout(d3_timer_step, delay); - } - d3_timer_interval = 0; - } else { - d3_timer_interval = 1; - d3_timer_frame(d3_timer_step); - } -} - -d3.timer.flush = function() { - var elapsed, - now = Date.now(), - t1 = d3_timer_queue; - - while (t1) { - elapsed = now - t1.then; - if (!t1.delay) t1.flush = t1.callback(elapsed); - t1 = t1.next; - } - - d3_timer_flush(); -}; - -// Flush after callbacks, to avoid concurrent queue modification. -function d3_timer_flush() { - var t0 = null, - t1 = d3_timer_queue, - then = Infinity; - while (t1) { - if (t1.flush) { - t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next; - } else { - then = Math.min(then, t1.then + t1.delay); - t1 = (t0 = t1).next; - } - } - return then; -} - -var d3_timer_frame = window.requestAnimationFrame - || window.webkitRequestAnimationFrame - || window.mozRequestAnimationFrame - || window.oRequestAnimationFrame - || window.msRequestAnimationFrame - || function(callback) { setTimeout(callback, 17); }; -function d3_noop() {} -d3.scale = {}; - -function d3_scaleExtent(domain) { - var start = domain[0], stop = domain[domain.length - 1]; - return start < stop ? [start, stop] : [stop, start]; -} -function d3_scale_nice(domain, nice) { - var i0 = 0, - i1 = domain.length - 1, - x0 = domain[i0], - x1 = domain[i1], - dx; - - if (x1 < x0) { - dx = i0; i0 = i1; i1 = dx; - dx = x0; x0 = x1; x1 = dx; - } - - nice = nice(x1 - x0); - domain[i0] = nice.floor(x0); - domain[i1] = nice.ceil(x1); - return domain; -} - -function d3_scale_niceDefault() { - return Math; -} -d3.scale.linear = function() { - var domain = [0, 1], - range = [0, 1], - interpolate = d3.interpolate, - clamp = false, - output, - input; - - function rescale() { - var linear = domain.length == 2 ? d3_scale_bilinear : d3_scale_polylinear, - uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber; - output = linear(domain, range, uninterpolate, interpolate); - input = linear(range, domain, uninterpolate, d3.interpolate); - return scale; - } - - function scale(x) { - return output(x); - } - - // Note: requires range is coercible to number! - scale.invert = function(y) { - return input(y); - }; - - scale.domain = function(x) { - if (!arguments.length) return domain; - domain = x.map(Number); - return rescale(); - }; - - scale.range = function(x) { - if (!arguments.length) return range; - range = x; - return rescale(); - }; - - scale.rangeRound = function(x) { - return scale.range(x).interpolate(d3.interpolateRound); - }; - - scale.clamp = function(x) { - if (!arguments.length) return clamp; - clamp = x; - return rescale(); - }; - - scale.interpolate = function(x) { - if (!arguments.length) return interpolate; - interpolate = x; - return rescale(); - }; - - scale.ticks = function(m) { - return d3_scale_linearTicks(domain, m); - }; - - scale.tickFormat = function(m) { - return d3_scale_linearTickFormat(domain, m); - }; - - scale.nice = function() { - d3_scale_nice(domain, d3_scale_linearNice); - return rescale(); - }; - - return rescale(); -}; - -function d3_scale_linearRebind(scale, linear) { - scale.range = d3.rebind(scale, linear.range); - scale.rangeRound = d3.rebind(scale, linear.rangeRound); - scale.interpolate = d3.rebind(scale, linear.interpolate); - scale.clamp = d3.rebind(scale, linear.clamp); - return scale; -} - -function d3_scale_linearNice(dx) { - dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1); - return { - floor: function(x) { return Math.floor(x / dx) * dx; }, - ceil: function(x) { return Math.ceil(x / dx) * dx; } - }; -} - -// TODO Dates? Ugh. -function d3_scale_linearTickRange(domain, m) { - var extent = d3_scaleExtent(domain), - span = extent[1] - extent[0], - step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), - err = m / span * step; - - // Filter ticks to get closer to the desired count. - if (err <= .15) step *= 10; - else if (err <= .35) step *= 5; - else if (err <= .75) step *= 2; - - // Round start and stop values to step interval. - extent[0] = Math.ceil(extent[0] / step) * step; - extent[1] = Math.floor(extent[1] / step) * step + step * .5; // inclusive - extent[2] = step; - return extent; -} - -function d3_scale_linearTicks(domain, m) { - return d3.range.apply(d3, d3_scale_linearTickRange(domain, m)); -} - -function d3_scale_linearTickFormat(domain, m) { - return d3.format(",." + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + "f"); -} -function d3_scale_bilinear(domain, range, uninterpolate, interpolate) { - var u = uninterpolate(domain[0], domain[1]), - i = interpolate(range[0], range[1]); - return function(x) { - return i(u(x)); - }; -} -function d3_scale_polylinear(domain, range, uninterpolate, interpolate) { - var u = [], - i = [], - j = 0, - n = domain.length; - - while (++j < n) { - u.push(uninterpolate(domain[j - 1], domain[j])); - i.push(interpolate(range[j - 1], range[j])); - } - - return function(x) { - var j = d3.bisect(domain, x, 1, domain.length - 1) - 1; - return i[j](u[j](x)); - }; -} -d3.scale.log = function() { - var linear = d3.scale.linear(), - log = d3_scale_log, - pow = log.pow; - - function scale(x) { - return linear(log(x)); - } - - scale.invert = function(x) { - return pow(linear.invert(x)); - }; - - scale.domain = function(x) { - if (!arguments.length) return linear.domain().map(pow); - log = x[0] < 0 ? d3_scale_logn : d3_scale_log; - pow = log.pow; - linear.domain(x.map(log)); - return scale; - }; - - scale.nice = function() { - linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault)); - return scale; - }; - - scale.ticks = function() { - var extent = d3_scaleExtent(linear.domain()), - ticks = []; - if (extent.every(isFinite)) { - var i = Math.floor(extent[0]), - j = Math.ceil(extent[1]), - u = pow(extent[0]), - v = pow(extent[1]); - if (log === d3_scale_logn) { - ticks.push(pow(i)); - for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k); - } else { - for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k); - ticks.push(pow(i)); - } - for (i = 0; ticks[i] < u; i++) {} // strip small values - for (j = ticks.length; ticks[j - 1] > v; j--) {} // strip big values - ticks = ticks.slice(i, j); - } - return ticks; - }; - - scale.tickFormat = function() { - return d3_scale_logTickFormat; - }; - - return d3_scale_linearRebind(scale, linear); -}; - -function d3_scale_log(x) { - return Math.log(x) / Math.LN10; -} - -function d3_scale_logn(x) { - return -Math.log(-x) / Math.LN10; -} - -d3_scale_log.pow = function(x) { - return Math.pow(10, x); -}; - -d3_scale_logn.pow = function(x) { - return -Math.pow(10, -x); -}; - -function d3_scale_logTickFormat(d) { - return d.toPrecision(1); -} -d3.scale.pow = function() { - var linear = d3.scale.linear(), - exponent = 1, - powp = Number, - powb = powp; - - function scale(x) { - return linear(powp(x)); - } - - scale.invert = function(x) { - return powb(linear.invert(x)); - }; - - scale.domain = function(x) { - if (!arguments.length) return linear.domain().map(powb); - powp = d3_scale_powPow(exponent); - powb = d3_scale_powPow(1 / exponent); - linear.domain(x.map(powp)); - return scale; - }; - - scale.ticks = function(m) { - return d3_scale_linearTicks(scale.domain(), m); - }; - - scale.tickFormat = function(m) { - return d3_scale_linearTickFormat(scale.domain(), m); - }; - - scale.nice = function() { - return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice)); - }; - - scale.exponent = function(x) { - if (!arguments.length) return exponent; - var domain = scale.domain(); - exponent = x; - return scale.domain(domain); - }; - - return d3_scale_linearRebind(scale, linear); -}; - -function d3_scale_powPow(e) { - return function(x) { - return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e); - }; -} -d3.scale.sqrt = function() { - return d3.scale.pow().exponent(.5); -}; -d3.scale.ordinal = function() { - var domain = [], - index = {}, - range = [], - rangeBand = 0, - rerange = d3_noop; - - function scale(x) { - var i = x in index ? index[x] : (index[x] = domain.push(x) - 1); - return range[i % range.length]; - } - - scale.domain = function(x) { - if (!arguments.length) return domain; - domain = x; - index = {}; - var i = -1, j = -1, n = domain.length; while (++i < n) { - x = domain[i]; - if (!(x in index)) index[x] = ++j; - } - rerange(); - return scale; - }; - - scale.range = function(x) { - if (!arguments.length) return range; - range = x; - rerange = d3_noop; - return scale; - }; - - scale.rangePoints = function(x, padding) { - if (arguments.length < 2) padding = 0; - (rerange = function() { - var start = x[0], - stop = x[1], - step = (stop - start) / (domain.length - 1 + padding); - range = domain.length == 1 - ? [(start + stop) / 2] - : d3.range(start + step * padding / 2, stop + step / 2, step); - rangeBand = 0; - })(); - return scale; - }; - - scale.rangeBands = function(x, padding) { - if (arguments.length < 2) padding = 0; - (rerange = function() { - var start = x[0], - stop = x[1], - step = (stop - start) / (domain.length + padding); - range = d3.range(start + step * padding, stop, step); - rangeBand = step * (1 - padding); - })(); - return scale; - }; - - scale.rangeRoundBands = function(x, padding) { - if (arguments.length < 2) padding = 0; - (rerange = function() { - var start = x[0], - stop = x[1], - diff = stop - start, - step = Math.floor(diff / (domain.length + padding)), - err = diff - (domain.length - padding) * step; - range = d3.range(start + Math.round(err / 2), stop, step); - rangeBand = Math.round(step * (1 - padding)); - })(); - return scale; - }; - - scale.rangeBand = function() { - return rangeBand; - }; - - return scale; -}; -/* - * This product includes color specifications and designs developed by Cynthia - * Brewer (http://colorbrewer.org/). See lib/colorbrewer for more information. - */ - -d3.scale.category10 = function() { - return d3.scale.ordinal().range(d3_category10); -}; - -d3.scale.category20 = function() { - return d3.scale.ordinal().range(d3_category20); -}; - -d3.scale.category20b = function() { - return d3.scale.ordinal().range(d3_category20b); -}; - -d3.scale.category20c = function() { - return d3.scale.ordinal().range(d3_category20c); -}; - -var d3_category10 = [ - "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", - "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" -]; - -var d3_category20 = [ - "#1f77b4", "#aec7e8", - "#ff7f0e", "#ffbb78", - "#2ca02c", "#98df8a", - "#d62728", "#ff9896", - "#9467bd", "#c5b0d5", - "#8c564b", "#c49c94", - "#e377c2", "#f7b6d2", - "#7f7f7f", "#c7c7c7", - "#bcbd22", "#dbdb8d", - "#17becf", "#9edae5" -]; - -var d3_category20b = [ - "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", - "#637939", "#8ca252", "#b5cf6b", "#cedb9c", - "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94", - "#843c39", "#ad494a", "#d6616b", "#e7969c", - "#7b4173", "#a55194", "#ce6dbd", "#de9ed6" -]; - -var d3_category20c = [ - "#3182bd", "#6baed6", "#9ecae1", "#c6dbef", - "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2", - "#31a354", "#74c476", "#a1d99b", "#c7e9c0", - "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb", - "#636363", "#969696", "#bdbdbd", "#d9d9d9" -]; -d3.scale.quantile = function() { - var domain = [], - range = [], - thresholds = []; - - function rescale() { - var k = 0, - n = domain.length, - q = range.length; - thresholds.length = Math.max(0, q - 1); - while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q); - } - - function scale(x) { - if (isNaN(x = +x)) return NaN; - return range[d3.bisect(thresholds, x)]; - } - - scale.domain = function(x) { - if (!arguments.length) return domain; - domain = x.filter(function(d) { return !isNaN(d); }).sort(d3.ascending); - rescale(); - return scale; - }; - - scale.range = function(x) { - if (!arguments.length) return range; - range = x; - rescale(); - return scale; - }; - - scale.quantiles = function() { - return thresholds; - }; - - return scale; -}; -d3.scale.quantize = function() { - var x0 = 0, - x1 = 1, - kx = 2, - i = 1, - range = [0, 1]; - - function scale(x) { - return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))]; - } - - scale.domain = function(x) { - if (!arguments.length) return [x0, x1]; - x0 = x[0]; - x1 = x[1]; - kx = range.length / (x1 - x0); - return scale; - }; - - scale.range = function(x) { - if (!arguments.length) return range; - range = x; - kx = range.length / (x1 - x0); - i = range.length - 1; - return scale; - }; - - return scale; -}; -d3.svg = {}; -d3.svg.arc = function() { - var innerRadius = d3_svg_arcInnerRadius, - outerRadius = d3_svg_arcOuterRadius, - startAngle = d3_svg_arcStartAngle, - endAngle = d3_svg_arcEndAngle; - - function arc() { - var r0 = innerRadius.apply(this, arguments), - r1 = outerRadius.apply(this, arguments), - a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, - a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, - da = a1 - a0, - df = da < Math.PI ? "0" : "1", - c0 = Math.cos(a0), - s0 = Math.sin(a0), - c1 = Math.cos(a1), - s1 = Math.sin(a1); - return da >= d3_svg_arcMax - ? (r0 - ? "M0," + r1 - + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1) - + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 - + "M0," + r0 - + "A" + r0 + "," + r0 + " 0 1,1 0," + (-r0) - + "A" + r0 + "," + r0 + " 0 1,1 0," + r0 - + "Z" - : "M0," + r1 - + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1) - + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 - + "Z") - : (r0 - ? "M" + r1 * c0 + "," + r1 * s0 - + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 - + "L" + r0 * c1 + "," + r0 * s1 - + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 - + "Z" - : "M" + r1 * c0 + "," + r1 * s0 - + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 - + "L0,0" - + "Z"); - } - - arc.innerRadius = function(v) { - if (!arguments.length) return innerRadius; - innerRadius = d3.functor(v); - return arc; - }; - - arc.outerRadius = function(v) { - if (!arguments.length) return outerRadius; - outerRadius = d3.functor(v); - return arc; - }; - - arc.startAngle = function(v) { - if (!arguments.length) return startAngle; - startAngle = d3.functor(v); - return arc; - }; - - arc.endAngle = function(v) { - if (!arguments.length) return endAngle; - endAngle = d3.functor(v); - return arc; - }; - - arc.centroid = function() { - var r = (innerRadius.apply(this, arguments) - + outerRadius.apply(this, arguments)) / 2, - a = (startAngle.apply(this, arguments) - + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset; - return [Math.cos(a) * r, Math.sin(a) * r]; - }; - - return arc; -}; - -var d3_svg_arcOffset = -Math.PI / 2, - d3_svg_arcMax = 2 * Math.PI - 1e-6; - -function d3_svg_arcInnerRadius(d) { - return d.innerRadius; -} - -function d3_svg_arcOuterRadius(d) { - return d.outerRadius; -} - -function d3_svg_arcStartAngle(d) { - return d.startAngle; -} - -function d3_svg_arcEndAngle(d) { - return d.endAngle; -} -function d3_svg_line(projection) { - var x = d3_svg_lineX, - y = d3_svg_lineY, - interpolate = "linear", - interpolator = d3_svg_lineInterpolators[interpolate], - tension = .7; - - function line(d) { - return d.length < 1 ? null : "M" + interpolator(projection(d3_svg_linePoints(this, d, x, y)), tension); - } - - line.x = function(v) { - if (!arguments.length) return x; - x = v; - return line; - }; - - line.y = function(v) { - if (!arguments.length) return y; - y = v; - return line; - }; - - line.interpolate = function(v) { - if (!arguments.length) return interpolate; - interpolator = d3_svg_lineInterpolators[interpolate = v]; - return line; - }; - - line.tension = function(v) { - if (!arguments.length) return tension; - tension = v; - return line; - }; - - return line; -} - -d3.svg.line = function() { - return d3_svg_line(Object); -}; - -// Converts the specified array of data into an array of points -// (x-y tuples), by evaluating the specified `x` and `y` functions on each -// data point. The `this` context of the evaluated functions is the specified -// "self" object; each function is passed the current datum and index. -function d3_svg_linePoints(self, d, x, y) { - var points = [], - i = -1, - n = d.length, - fx = typeof x === "function", - fy = typeof y === "function", - value; - if (fx && fy) { - while (++i < n) points.push([ - x.call(self, value = d[i], i), - y.call(self, value, i) - ]); - } else if (fx) { - while (++i < n) points.push([x.call(self, d[i], i), y]); - } else if (fy) { - while (++i < n) points.push([x, y.call(self, d[i], i)]); - } else { - while (++i < n) points.push([x, y]); - } - return points; -} - -// The default `x` property, which references d[0]. -function d3_svg_lineX(d) { - return d[0]; -} - -// The default `y` property, which references d[1]. -function d3_svg_lineY(d) { - return d[1]; -} - -// The various interpolators supported by the `line` class. -var d3_svg_lineInterpolators = { - "linear": d3_svg_lineLinear, - "step-before": d3_svg_lineStepBefore, - "step-after": d3_svg_lineStepAfter, - "basis": d3_svg_lineBasis, - "basis-open": d3_svg_lineBasisOpen, - "basis-closed": d3_svg_lineBasisClosed, - "bundle": d3_svg_lineBundle, - "cardinal": d3_svg_lineCardinal, - "cardinal-open": d3_svg_lineCardinalOpen, - "cardinal-closed": d3_svg_lineCardinalClosed, - "monotone": d3_svg_lineMonotone -}; - -// Linear interpolation; generates "L" commands. -function d3_svg_lineLinear(points) { - var path = [], - i = 0, - n = points.length, - p = points[0]; - path.push(p[0], ",", p[1]); - while (++i < n) path.push("L", (p = points[i])[0], ",", p[1]); - return path.join(""); -} - -// Step interpolation; generates "H" and "V" commands. -function d3_svg_lineStepBefore(points) { - var path = [], - i = 0, - n = points.length, - p = points[0]; - path.push(p[0], ",", p[1]); - while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]); - return path.join(""); -} - -// Step interpolation; generates "H" and "V" commands. -function d3_svg_lineStepAfter(points) { - var path = [], - i = 0, - n = points.length, - p = points[0]; - path.push(p[0], ",", p[1]); - while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]); - return path.join(""); -} - -// Open cardinal spline interpolation; generates "C" commands. -function d3_svg_lineCardinalOpen(points, tension) { - return points.length < 4 - ? d3_svg_lineLinear(points) - : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), - d3_svg_lineCardinalTangents(points, tension)); -} - -// Closed cardinal spline interpolation; generates "C" commands. -function d3_svg_lineCardinalClosed(points, tension) { - return points.length < 3 - ? d3_svg_lineLinear(points) - : points[0] + d3_svg_lineHermite((points.push(points[0]), points), - d3_svg_lineCardinalTangents([points[points.length - 2]] - .concat(points, [points[1]]), tension)); -} - -// Cardinal spline interpolation; generates "C" commands. -function d3_svg_lineCardinal(points, tension, closed) { - return points.length < 3 - ? d3_svg_lineLinear(points) - : points[0] + d3_svg_lineHermite(points, - d3_svg_lineCardinalTangents(points, tension)); -} - -// Hermite spline construction; generates "C" commands. -function d3_svg_lineHermite(points, tangents) { - if (tangents.length < 1 - || (points.length != tangents.length - && points.length != tangents.length + 2)) { - return d3_svg_lineLinear(points); - } - - var quad = points.length != tangents.length, - path = "", - p0 = points[0], - p = points[1], - t0 = tangents[0], - t = t0, - pi = 1; - - if (quad) { - path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) - + "," + p[0] + "," + p[1]; - p0 = points[1]; - pi = 2; - } - - if (tangents.length > 1) { - t = tangents[1]; - p = points[pi]; - pi++; - path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) - + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) - + "," + p[0] + "," + p[1]; - for (var i = 2; i < tangents.length; i++, pi++) { - p = points[pi]; - t = tangents[i]; - path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) - + "," + p[0] + "," + p[1]; - } - } - - if (quad) { - var lp = points[pi]; - path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) - + "," + lp[0] + "," + lp[1]; - } - - return path; -} - -// Generates tangents for a cardinal spline. -function d3_svg_lineCardinalTangents(points, tension) { - var tangents = [], - a = (1 - tension) / 2, - p0, - p1 = points[0], - p2 = points[1], - i = 1, - n = points.length; - while (++i < n) { - p0 = p1; - p1 = p2; - p2 = points[i]; - tangents.push([a * (p2[0] - p0[0]), a * (p2[1] - p0[1])]); - } - return tangents; -} - -// B-spline interpolation; generates "C" commands. -function d3_svg_lineBasis(points) { - if (points.length < 3) return d3_svg_lineLinear(points); - var path = [], - i = 1, - n = points.length, - pi = points[0], - x0 = pi[0], - y0 = pi[1], - px = [x0, x0, x0, (pi = points[1])[0]], - py = [y0, y0, y0, pi[1]]; - path.push(x0, ",", y0); - d3_svg_lineBasisBezier(path, px, py); - while (++i < n) { - pi = points[i]; - px.shift(); px.push(pi[0]); - py.shift(); py.push(pi[1]); - d3_svg_lineBasisBezier(path, px, py); - } - i = -1; - while (++i < 2) { - px.shift(); px.push(pi[0]); - py.shift(); py.push(pi[1]); - d3_svg_lineBasisBezier(path, px, py); - } - return path.join(""); -} - -// Open B-spline interpolation; generates "C" commands. -function d3_svg_lineBasisOpen(points) { - if (points.length < 4) return d3_svg_lineLinear(points); - var path = [], - i = -1, - n = points.length, - pi, - px = [0], - py = [0]; - while (++i < 3) { - pi = points[i]; - px.push(pi[0]); - py.push(pi[1]); - } - path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) - + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)); - --i; while (++i < n) { - pi = points[i]; - px.shift(); px.push(pi[0]); - py.shift(); py.push(pi[1]); - d3_svg_lineBasisBezier(path, px, py); - } - return path.join(""); -} - -// Closed B-spline interpolation; generates "C" commands. -function d3_svg_lineBasisClosed(points) { - var path, - i = -1, - n = points.length, - m = n + 4, - pi, - px = [], - py = []; - while (++i < 4) { - pi = points[i % n]; - px.push(pi[0]); - py.push(pi[1]); - } - path = [ - d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", - d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) - ]; - --i; while (++i < m) { - pi = points[i % n]; - px.shift(); px.push(pi[0]); - py.shift(); py.push(pi[1]); - d3_svg_lineBasisBezier(path, px, py); - } - return path.join(""); -} - -function d3_svg_lineBundle(points, tension) { - var n = points.length - 1, - x0 = points[0][0], - y0 = points[0][1], - dx = points[n][0] - x0, - dy = points[n][1] - y0, - i = -1, - p, - t; - while (++i <= n) { - p = points[i]; - t = i / n; - p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx); - p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy); - } - return d3_svg_lineBasis(points); -} - -// Returns the dot product of the given four-element vectors. -function d3_svg_lineDot4(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]; -} - -// Matrix to transform basis (b-spline) control points to bezier -// control points. Derived from FvD 11.2.8. -var d3_svg_lineBasisBezier1 = [0, 2/3, 1/3, 0], - d3_svg_lineBasisBezier2 = [0, 1/3, 2/3, 0], - d3_svg_lineBasisBezier3 = [0, 1/6, 2/3, 1/6]; - -// Pushes a "C" Bézier curve onto the specified path array, given the -// two specified four-element arrays which define the control points. -function d3_svg_lineBasisBezier(path, x, y) { - path.push( - "C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), - ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), - ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), - ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), - ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), - ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y)); -} - -// Computes the slope from points p0 to p1. -function d3_svg_lineSlope(p0, p1) { - return (p1[1] - p0[1]) / (p1[0] - p0[0]); -} - -// Compute three-point differences for the given points. -// http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Finite_difference -function d3_svg_lineFiniteDifferences(points) { - var i = 0, - j = points.length - 1, - m = [], - p0 = points[0], - p1 = points[1], - d = m[0] = d3_svg_lineSlope(p0, p1); - while (++i < j) { - m[i] = d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1])); - } - m[i] = d; - return m; -} - -// Interpolates the given points using Fritsch-Carlson Monotone cubic Hermite -// interpolation. Returns an array of tangent vectors. For details, see -// http://en.wikipedia.org/wiki/Monotone_cubic_interpolation -function d3_svg_lineMonotoneTangents(points) { - var tangents = [], - d, - a, - b, - s, - m = d3_svg_lineFiniteDifferences(points), - i = -1, - j = points.length - 1; - - // The first two steps are done by computing finite-differences: - // 1. Compute the slopes of the secant lines between successive points. - // 2. Initialize the tangents at every point as the average of the secants. - - // Then, for each segment… - while (++i < j) { - d = d3_svg_lineSlope(points[i], points[i + 1]); - - // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set - // mk = m{k + 1} = 0 as the spline connecting these points must be flat to - // preserve monotonicity. Ignore step 4 and 5 for those k. - - if (Math.abs(d) < 1e-6) { - m[i] = m[i + 1] = 0; - } else { - // 4. Let ak = mk / dk and bk = m{k + 1} / dk. - a = m[i] / d; - b = m[i + 1] / d; - - // 5. Prevent overshoot and ensure monotonicity by restricting the - // magnitude of vector to a circle of radius 3. - s = a * a + b * b; - if (s > 9) { - s = d * 3 / Math.sqrt(s); - m[i] = s * a; - m[i + 1] = s * b; - } - } - } - - // Compute the normalized tangent vector from the slopes. Note that if x is - // not monotonic, it's possible that the slope will be infinite, so we protect - // against NaN by setting the coordinate to zero. - i = -1; while (++i <= j) { - s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) - / (6 * (1 + m[i] * m[i])); - tangents.push([s || 0, m[i] * s || 0]); - } - - return tangents; -} - -function d3_svg_lineMonotone(points) { - return points.length < 3 - ? d3_svg_lineLinear(points) - : points[0] + - d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points)); -} -d3.svg.line.radial = function() { - var line = d3_svg_line(d3_svg_lineRadial); - line.radius = line.x, delete line.x; - line.angle = line.y, delete line.y; - return line; -}; - -function d3_svg_lineRadial(points) { - var point, - i = -1, - n = points.length, - r, - a; - while (++i < n) { - point = points[i]; - r = point[0]; - a = point[1] + d3_svg_arcOffset; - point[0] = r * Math.cos(a); - point[1] = r * Math.sin(a); - } - return points; -} -function d3_svg_area(projection) { - var x0 = d3_svg_lineX, - x1 = d3_svg_lineX, - y0 = 0, - y1 = d3_svg_lineY, - interpolate = "linear", - interpolator = d3_svg_lineInterpolators[interpolate], - tension = .7; - - function area(d) { - if (d.length < 1) return null; - var points0 = d3_svg_linePoints(this, d, x0, y0), - points1 = d3_svg_linePoints(this, d, x0 === x1 ? d3_svg_areaX(points0) : x1, y0 === y1 ? d3_svg_areaY(points0) : y1); - return "M" + interpolator(projection(points1), tension) - + "L" + interpolator(projection(points0.reverse()), tension) - + "Z"; - } - - area.x = function(x) { - if (!arguments.length) return x1; - x0 = x1 = x; - return area; - }; - - area.x0 = function(x) { - if (!arguments.length) return x0; - x0 = x; - return area; - }; - - area.x1 = function(x) { - if (!arguments.length) return x1; - x1 = x; - return area; - }; - - area.y = function(y) { - if (!arguments.length) return y1; - y0 = y1 = y; - return area; - }; - - area.y0 = function(y) { - if (!arguments.length) return y0; - y0 = y; - return area; - }; - - area.y1 = function(y) { - if (!arguments.length) return y1; - y1 = y; - return area; - }; - - area.interpolate = function(x) { - if (!arguments.length) return interpolate; - interpolator = d3_svg_lineInterpolators[interpolate = x]; - return area; - }; - - area.tension = function(x) { - if (!arguments.length) return tension; - tension = x; - return area; - }; - - return area; -} - -d3.svg.area = function() { - return d3_svg_area(Object); -}; - -function d3_svg_areaX(points) { - return function(d, i) { - return points[i][0]; - }; -} - -function d3_svg_areaY(points) { - return function(d, i) { - return points[i][1]; - }; -} -d3.svg.area.radial = function() { - var area = d3_svg_area(d3_svg_lineRadial); - area.radius = area.x, delete area.x; - area.innerRadius = area.x0, delete area.x0; - area.outerRadius = area.x1, delete area.x1; - area.angle = area.y, delete area.y; - area.startAngle = area.y0, delete area.y0; - area.endAngle = area.y1, delete area.y1; - return area; -}; -d3.svg.chord = function() { - var source = d3_svg_chordSource, - target = d3_svg_chordTarget, - radius = d3_svg_chordRadius, - startAngle = d3_svg_arcStartAngle, - endAngle = d3_svg_arcEndAngle; - - // TODO Allow control point to be customized. - - function chord(d, i) { - var s = subgroup(this, source, d, i), - t = subgroup(this, target, d, i); - return "M" + s.p0 - + arc(s.r, s.p1) + (equals(s, t) - ? curve(s.r, s.p1, s.r, s.p0) - : curve(s.r, s.p1, t.r, t.p0) - + arc(t.r, t.p1) - + curve(t.r, t.p1, s.r, s.p0)) - + "Z"; - } - - function subgroup(self, f, d, i) { - var subgroup = f.call(self, d, i), - r = radius.call(self, subgroup, i), - a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, - a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset; - return { - r: r, - a0: a0, - a1: a1, - p0: [r * Math.cos(a0), r * Math.sin(a0)], - p1: [r * Math.cos(a1), r * Math.sin(a1)] - }; - } - - function equals(a, b) { - return a.a0 == b.a0 && a.a1 == b.a1; - } - - function arc(r, p) { - return "A" + r + "," + r + " 0 0,1 " + p; - } - - function curve(r0, p0, r1, p1) { - return "Q 0,0 " + p1; - } - - chord.radius = function(v) { - if (!arguments.length) return radius; - radius = d3.functor(v); - return chord; - }; - - chord.source = function(v) { - if (!arguments.length) return source; - source = d3.functor(v); - return chord; - }; - - chord.target = function(v) { - if (!arguments.length) return target; - target = d3.functor(v); - return chord; - }; - - chord.startAngle = function(v) { - if (!arguments.length) return startAngle; - startAngle = d3.functor(v); - return chord; - }; - - chord.endAngle = function(v) { - if (!arguments.length) return endAngle; - endAngle = d3.functor(v); - return chord; - }; - - return chord; -}; - -function d3_svg_chordSource(d) { - return d.source; -} - -function d3_svg_chordTarget(d) { - return d.target; -} - -function d3_svg_chordRadius(d) { - return d.radius; -} - -function d3_svg_chordStartAngle(d) { - return d.startAngle; -} - -function d3_svg_chordEndAngle(d) { - return d.endAngle; -} -d3.svg.diagonal = function() { - var source = d3_svg_chordSource, - target = d3_svg_chordTarget, - projection = d3_svg_diagonalProjection; - - function diagonal(d, i) { - var p0 = source.call(this, d, i), - p3 = target.call(this, d, i), - m = (p0.y + p3.y) / 2, - p = [p0, {x: p0.x, y: m}, {x: p3.x, y: m}, p3]; - p = p.map(projection); - return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3]; - } - - diagonal.source = function(x) { - if (!arguments.length) return source; - source = d3.functor(x); - return diagonal; - }; - - diagonal.target = function(x) { - if (!arguments.length) return target; - target = d3.functor(x); - return diagonal; - }; - - diagonal.projection = function(x) { - if (!arguments.length) return projection; - projection = x; - return diagonal; - }; - - return diagonal; -}; - -function d3_svg_diagonalProjection(d) { - return [d.x, d.y]; -} -d3.svg.diagonal.radial = function() { - var diagonal = d3.svg.diagonal(), - projection = d3_svg_diagonalProjection, - projection_ = diagonal.projection; - - diagonal.projection = function(x) { - return arguments.length - ? projection_(d3_svg_diagonalRadialProjection(projection = x)) - : projection; - }; - - return diagonal; -}; - -function d3_svg_diagonalRadialProjection(projection) { - return function() { - var d = projection.apply(this, arguments), - r = d[0], - a = d[1] + d3_svg_arcOffset; - return [r * Math.cos(a), r * Math.sin(a)]; - }; -} -d3.svg.mouse = function(container) { - return d3_svg_mousePoint(container, d3.event); -}; - -// https://bugs.webkit.org/show_bug.cgi?id=44083 -var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0; - -function d3_svg_mousePoint(container, e) { - var point = (container.ownerSVGElement || container).createSVGPoint(); - if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) { - var svg = d3.select(document.body) - .append("svg:svg") - .style("position", "absolute") - .style("top", 0) - .style("left", 0); - var ctm = svg[0][0].getScreenCTM(); - d3_mouse_bug44083 = !(ctm.f || ctm.e); - svg.remove(); - } - if (d3_mouse_bug44083) { - point.x = e.pageX; - point.y = e.pageY; - } else { - point.x = e.clientX; - point.y = e.clientY; - } - point = point.matrixTransform(container.getScreenCTM().inverse()); - return [point.x, point.y]; -}; -d3.svg.touches = function(container) { - var touches = d3.event.touches; - return touches ? d3_array(touches).map(function(touch) { - var point = d3_svg_mousePoint(container, touch); - point.identifier = touch.identifier; - return point; - }) : []; -}; -d3.svg.symbol = function() { - var type = d3_svg_symbolType, - size = d3_svg_symbolSize; - - function symbol(d, i) { - return (d3_svg_symbols[type.call(this, d, i)] - || d3_svg_symbols.circle) - (size.call(this, d, i)); - } - - symbol.type = function(x) { - if (!arguments.length) return type; - type = d3.functor(x); - return symbol; - }; - - // size of symbol in square pixels - symbol.size = function(x) { - if (!arguments.length) return size; - size = d3.functor(x); - return symbol; - }; - - return symbol; -}; - -function d3_svg_symbolSize() { - return 64; -} - -function d3_svg_symbolType() { - return "circle"; -} - -// TODO cross-diagonal? -var d3_svg_symbols = { - "circle": function(size) { - var r = Math.sqrt(size / Math.PI); - return "M0," + r - + "A" + r + "," + r + " 0 1,1 0," + (-r) - + "A" + r + "," + r + " 0 1,1 0," + r - + "Z"; - }, - "cross": function(size) { - var r = Math.sqrt(size / 5) / 2; - return "M" + -3 * r + "," + -r - + "H" + -r - + "V" + -3 * r - + "H" + r - + "V" + -r - + "H" + 3 * r - + "V" + r - + "H" + r - + "V" + 3 * r - + "H" + -r - + "V" + r - + "H" + -3 * r - + "Z"; - }, - "diamond": function(size) { - var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), - rx = ry * d3_svg_symbolTan30; - return "M0," + -ry - + "L" + rx + ",0" - + " 0," + ry - + " " + -rx + ",0" - + "Z"; - }, - "square": function(size) { - var r = Math.sqrt(size) / 2; - return "M" + -r + "," + -r - + "L" + r + "," + -r - + " " + r + "," + r - + " " + -r + "," + r - + "Z"; - }, - "triangle-down": function(size) { - var rx = Math.sqrt(size / d3_svg_symbolSqrt3), - ry = rx * d3_svg_symbolSqrt3 / 2; - return "M0," + ry - + "L" + rx +"," + -ry - + " " + -rx + "," + -ry - + "Z"; - }, - "triangle-up": function(size) { - var rx = Math.sqrt(size / d3_svg_symbolSqrt3), - ry = rx * d3_svg_symbolSqrt3 / 2; - return "M0," + -ry - + "L" + rx +"," + ry - + " " + -rx + "," + ry - + "Z"; - } -}; - -d3.svg.symbolTypes = d3.keys(d3_svg_symbols); - -var d3_svg_symbolSqrt3 = Math.sqrt(3), - d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180); -})(); diff --git a/client/js/d3/d3.layout.js b/client/js/d3/d3.layout.js deleted file mode 100755 index 3d854ed6..00000000 --- a/client/js/d3/d3.layout.js +++ /dev/null @@ -1,1923 +0,0 @@ -(function(){d3.layout = {}; -// Implements hierarchical edge bundling using Holten's algorithm. For each -// input link, a path is computed that travels through the tree, up the parent -// hierarchy to the least common ancestor, and then back down to the destination -// node. Each path is simply an array of nodes. -d3.layout.bundle = function() { - return function(links) { - var paths = [], - i = -1, - n = links.length; - while (++i < n) paths.push(d3_layout_bundlePath(links[i])); - return paths; - }; -}; - -function d3_layout_bundlePath(link) { - var start = link.source, - end = link.target, - lca = d3_layout_bundleLeastCommonAncestor(start, end), - points = [start]; - while (start !== lca) { - start = start.parent; - points.push(start); - } - var k = points.length; - while (end !== lca) { - points.splice(k, 0, end); - end = end.parent; - } - return points; -} - -function d3_layout_bundleAncestors(node) { - var ancestors = [], - parent = node.parent; - while (parent != null) { - ancestors.push(node); - node = parent; - parent = parent.parent; - } - ancestors.push(node); - return ancestors; -} - -function d3_layout_bundleLeastCommonAncestor(a, b) { - if (a === b) return a; - var aNodes = d3_layout_bundleAncestors(a), - bNodes = d3_layout_bundleAncestors(b), - aNode = aNodes.pop(), - bNode = bNodes.pop(), - sharedNode = null; - while (aNode === bNode) { - sharedNode = aNode; - aNode = aNodes.pop(); - bNode = bNodes.pop(); - } - return sharedNode; -} -d3.layout.chord = function() { - var chord = {}, - chords, - groups, - matrix, - n, - padding = 0, - sortGroups, - sortSubgroups, - sortChords; - - function relayout() { - var subgroups = {}, - groupSums = [], - groupIndex = d3.range(n), - subgroupIndex = [], - k, - x, - x0, - i, - j; - - chords = []; - groups = []; - - // Compute the sum. - k = 0, i = -1; while (++i < n) { - x = 0, j = -1; while (++j < n) { - x += matrix[i][j]; - } - groupSums.push(x); - subgroupIndex.push(d3.range(n)); - k += x; - } - - // Sort groups… - if (sortGroups) { - groupIndex.sort(function(a, b) { - return sortGroups(groupSums[a], groupSums[b]); - }); - } - - // Sort subgroups… - if (sortSubgroups) { - subgroupIndex.forEach(function(d, i) { - d.sort(function(a, b) { - return sortSubgroups(matrix[i][a], matrix[i][b]); - }); - }); - } - - // Convert the sum to scaling factor for [0, 2pi]. - // TODO Allow start and end angle to be specified. - // TODO Allow padding to be specified as percentage? - k = (2 * Math.PI - padding * n) / k; - - // Compute the start and end angle for each group and subgroup. - x = 0, i = -1; while (++i < n) { - x0 = x, j = -1; while (++j < n) { - var di = groupIndex[i], - dj = subgroupIndex[i][j], - v = matrix[di][dj]; - subgroups[di + "-" + dj] = { - index: di, - subindex: dj, - startAngle: x, - endAngle: x += v * k, - value: v - }; - } - groups.push({ - index: di, - startAngle: x0, - endAngle: x, - value: (x - x0) / k - }); - x += padding; - } - - // Generate chords for each (non-empty) subgroup-subgroup link. - i = -1; while (++i < n) { - j = i - 1; while (++j < n) { - var source = subgroups[i + "-" + j], - target = subgroups[j + "-" + i]; - if (source.value || target.value) { - chords.push(source.value < target.value - ? {source: target, target: source} - : {source: source, target: target}) - } - } - } - - if (sortChords) resort(); - } - - function resort() { - chords.sort(function(a, b) { - return sortChords(a.target.value, b.target.value); - }); - } - - chord.matrix = function(x) { - if (!arguments.length) return matrix; - n = (matrix = x) && matrix.length; - chords = groups = null; - return chord; - }; - - chord.padding = function(x) { - if (!arguments.length) return padding; - padding = x; - chords = groups = null; - return chord; - }; - - chord.sortGroups = function(x) { - if (!arguments.length) return sortGroups; - sortGroups = x; - chords = groups = null; - return chord; - }; - - chord.sortSubgroups = function(x) { - if (!arguments.length) return sortSubgroups; - sortSubgroups = x; - chords = null; - return chord; - }; - - chord.sortChords = function(x) { - if (!arguments.length) return sortChords; - sortChords = x; - if (chords) resort(); - return chord; - }; - - chord.chords = function() { - if (!chords) relayout(); - return chords; - }; - - chord.groups = function() { - if (!groups) relayout(); - return groups; - }; - - return chord; -}; -// A rudimentary force layout using Gauss-Seidel. -d3.layout.force = function() { - var force = {}, - event = d3.dispatch("tick"), - size = [1, 1], - alpha, - friction = .9, - linkDistance = d3_layout_forceLinkDistance, - linkStrength = d3_layout_forceLinkStrength, - charge = -30, - gravity = .1, - theta = .8, - interval, - nodes = [], - links = [], - distances, - strengths; - - function repulse(node, kc) { - return function(quad, x1, y1, x2, y2) { - if (quad.point !== node) { - var dx = quad.cx - node.x, - dy = quad.cy - node.y, - dn = 1 / Math.sqrt(dx * dx + dy * dy); - - /* Barnes-Hut criterion. */ - if ((x2 - x1) * dn < theta) { - var k = kc * quad.count * dn * dn; - node.x += dx * k; - node.y += dy * k; - return true; - } - - if (quad.point && isFinite(dn)) { - var k = kc * dn * dn; - node.x += dx * k; - node.y += dy * k; - } - } - }; - } - - function tick() { - var n = nodes.length, - m = links.length, - q = d3.geom.quadtree(nodes), - i, // current index - o, // current object - s, // current source - t, // current target - l, // current distance - x, // x-distance - y; // y-distance - - // gauss-seidel relaxation for links - for (i = 0; i < m; ++i) { - o = links[i]; - s = o.source; - t = o.target; - x = t.x - s.x; - y = t.y - s.y; - if (l = (x * x + y * y)) { - l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l; - x *= l; - y *= l; - t.x -= x; - t.y -= y; - s.x += x; - s.y += y; - } - } - - // apply gravity forces - var kg = alpha * gravity; - x = size[0] / 2; - y = size[1] / 2; - i = -1; while (++i < n) { - o = nodes[i]; - o.x += (x - o.x) * kg; - o.y += (y - o.y) * kg; - } - - // compute quadtree center of mass - d3_layout_forceAccumulate(q); - - // apply charge forces - var kc = alpha * charge; - i = -1; while (++i < n) { - q.visit(repulse(nodes[i], kc)); - } - - // position verlet integration - i = -1; while (++i < n) { - o = nodes[i]; - if (o.fixed) { - o.x = o.px; - o.y = o.py; - } else { - o.x -= (o.px - (o.px = o.x)) * friction; - o.y -= (o.py - (o.py = o.y)) * friction; - } - } - - event.tick.dispatch({type: "tick", alpha: alpha}); - - // simulated annealing, basically - return (alpha *= .99) < .005; - } - - force.on = function(type, listener) { - event[type].add(listener); - return force; - }; - - force.nodes = function(x) { - if (!arguments.length) return nodes; - nodes = x; - return force; - }; - - force.links = function(x) { - if (!arguments.length) return links; - links = x; - return force; - }; - - force.size = function(x) { - if (!arguments.length) return size; - size = x; - return force; - }; - - force.linkDistance = function(x) { - if (!arguments.length) return linkDistance; - linkDistance = d3.functor(x); - return force; - }; - - // For backwards-compatibility. - force.distance = force.linkDistance; - - force.linkStrength = function(x) { - if (!arguments.length) return linkStrength; - linkStrength = d3.functor(x); - return force; - }; - - force.friction = function(x) { - if (!arguments.length) return friction; - friction = x; - return force; - }; - - force.charge = function(x) { - if (!arguments.length) return charge; - charge = x; - return force; - }; - - force.gravity = function(x) { - if (!arguments.length) return gravity; - gravity = x; - return force; - }; - - force.theta = function(x) { - if (!arguments.length) return theta; - theta = x; - return force; - }; - - force.start = function() { - var i, - j, - n = nodes.length, - m = links.length, - w = size[0], - h = size[1], - neighbors, - o; - - for (i = 0; i < n; ++i) { - (o = nodes[i]).index = i; - } - - distances = []; - strengths = []; - for (i = 0; i < m; ++i) { - o = links[i]; - if (typeof o.source == "number") o.source = nodes[o.source]; - if (typeof o.target == "number") o.target = nodes[o.target]; - distances[i] = linkDistance.call(this, o, i); - strengths[i] = linkStrength.call(this, o, i); - } - - for (i = 0; i < n; ++i) { - o = nodes[i]; - if (isNaN(o.x)) o.x = position("x", w); - if (isNaN(o.y)) o.y = position("y", h); - if (isNaN(o.px)) o.px = o.x; - if (isNaN(o.py)) o.py = o.y; - } - - // initialize node position based on first neighbor - function position(dimension, size) { - var neighbors = neighbor(i), - j = -1, - m = neighbors.length, - x; - while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x; - return Math.random() * size; - } - - // initialize neighbors lazily - function neighbor() { - if (!neighbors) { - neighbors = []; - for (j = 0; j < n; ++j) { - neighbors[j] = []; - } - for (j = 0; j < m; ++j) { - var o = links[j]; - neighbors[o.source.index].push(o.target); - neighbors[o.target.index].push(o.source); - } - } - return neighbors[i]; - } - - return force.resume(); - }; - - force.resume = function() { - alpha = .1; - d3.timer(tick); - return force; - }; - - force.stop = function() { - alpha = 0; - return force; - }; - - // use `node.call(force.drag)` to make nodes draggable - force.drag = function() { - - this - .on("mouseover.force", d3_layout_forceDragOver) - .on("mouseout.force", d3_layout_forceDragOut) - .on("mousedown.force", dragdown) - .on("touchstart.force", dragdown); - - d3.select(window) - .on("mousemove.force", d3_layout_forceDragMove) - .on("touchmove.force", d3_layout_forceDragMove) - .on("mouseup.force", d3_layout_forceDragUp, true) - .on("touchend.force", d3_layout_forceDragUp, true) - .on("click.force", d3_layout_forceDragClick, true); - - return force; - }; - - function dragdown(d, i) { - var m = d3_layout_forcePoint(this.parentNode); - (d3_layout_forceDragNode = d).fixed = true; - d3_layout_forceDragMoved = false; - d3_layout_forceDragElement = this; - d3_layout_forceDragForce = force; - d3_layout_forceDragOffset = [m[0] - d.x, m[1] - d.y]; - d3_layout_forceCancel(); - } - - return force; -}; - -var d3_layout_forceDragForce, - d3_layout_forceDragNode, - d3_layout_forceDragMoved, - d3_layout_forceDragOffset, - d3_layout_forceStopClick, - d3_layout_forceDragElement; - -function d3_layout_forceDragOver(d) { - d.fixed = true; -} - -function d3_layout_forceDragOut(d) { - if (d !== d3_layout_forceDragNode) { - d.fixed = false; - } -} - -function d3_layout_forcePoint(container) { - return d3.event.touches - ? d3.svg.touches(container)[0] - : d3.svg.mouse(container); -} - -function d3_layout_forceDragMove() { - if (!d3_layout_forceDragNode) return; - var parent = d3_layout_forceDragElement.parentNode; - - // O NOES! The drag element was removed from the DOM. - if (!parent) { - d3_layout_forceDragNode.fixed = false; - d3_layout_forceDragOffset = d3_layout_forceDragNode = d3_layout_forceDragElement = null; - return; - } - - var m = d3_layout_forcePoint(parent); - d3_layout_forceDragMoved = true; - d3_layout_forceDragNode.px = m[0] - d3_layout_forceDragOffset[0]; - d3_layout_forceDragNode.py = m[1] - d3_layout_forceDragOffset[1]; - d3_layout_forceCancel(); - d3_layout_forceDragForce.resume(); // restart annealing -} - -function d3_layout_forceDragUp() { - if (!d3_layout_forceDragNode) return; - - // If the node was moved, prevent the mouseup from propagating. - // Also prevent the subsequent click from propagating (e.g., for anchors). - if (d3_layout_forceDragMoved) { - d3_layout_forceStopClick = true; - d3_layout_forceCancel(); - } - - // Don't trigger this for touchend. - if (d3.event.type === "mouseup") { - d3_layout_forceDragMove(); - } - - d3_layout_forceDragNode.fixed = false; - d3_layout_forceDragForce = - d3_layout_forceDragOffset = - d3_layout_forceDragNode = - d3_layout_forceDragElement = null; -} - -function d3_layout_forceDragClick() { - if (d3_layout_forceStopClick) { - d3_layout_forceCancel(); - d3_layout_forceStopClick = false; - } -} - -function d3_layout_forceCancel() { - d3.event.stopPropagation(); - d3.event.preventDefault(); -} - -function d3_layout_forceAccumulate(quad) { - var cx = 0, - cy = 0; - quad.count = 0; - if (!quad.leaf) { - var nodes = quad.nodes, - n = nodes.length, - i = -1, - c; - while (++i < n) { - c = nodes[i]; - if (c == null) continue; - d3_layout_forceAccumulate(c); - quad.count += c.count; - cx += c.count * c.cx; - cy += c.count * c.cy; - } - } - if (quad.point) { - // jitter internal nodes that are coincident - if (!quad.leaf) { - quad.point.x += Math.random() - .5; - quad.point.y += Math.random() - .5; - } - quad.count++; - cx += quad.point.x; - cy += quad.point.y; - } - quad.cx = cx / quad.count; - quad.cy = cy / quad.count; -} - -function d3_layout_forceLinkDistance(link) { - return 20; -} - -function d3_layout_forceLinkStrength(link) { - return 1; -} -d3.layout.partition = function() { - var hierarchy = d3.layout.hierarchy(), - size = [1, 1]; // width, height - - function position(node, x, dx, dy) { - var children = node.children; - node.x = x; - node.y = node.depth * dy; - node.dx = dx; - node.dy = dy; - if (children) { - var i = -1, - n = children.length, - c, - d; - dx = node.value ? dx / node.value : 0; - while (++i < n) { - position(c = children[i], x, d = c.value * dx, dy); - x += d; - } - } - } - - function depth(node) { - var children = node.children, - d = 0; - if (children) { - var i = -1, - n = children.length; - while (++i < n) d = Math.max(d, depth(children[i])); - } - return 1 + d; - } - - function partition(d, i) { - var nodes = hierarchy.call(this, d, i); - position(nodes[0], 0, size[0], size[1] / depth(nodes[0])); - return nodes; - } - - partition.size = function(x) { - if (!arguments.length) return size; - size = x; - return partition; - }; - - return d3_layout_hierarchyRebind(partition, hierarchy); -}; -d3.layout.pie = function() { - var value = Number, - sort = null, - startAngle = 0, - endAngle = 2 * Math.PI; - - function pie(data, i) { - - // Compute the start angle. - var a = +(typeof startAngle === "function" - ? startAngle.apply(this, arguments) - : startAngle); - - // Compute the angular range (end - start). - var k = (typeof endAngle === "function" - ? endAngle.apply(this, arguments) - : endAngle) - startAngle; - - // Optionally sort the data. - var index = d3.range(data.length); - if (sort != null) index.sort(function(i, j) { - return sort(data[i], data[j]); - }); - - // Compute the numeric values for each data element. - var values = data.map(value); - - // Convert k into a scale factor from value to angle, using the sum. - k /= values.reduce(function(p, d) { return p + d; }, 0); - - // Compute the arcs! - var arcs = index.map(function(i) { - return { - data: data[i], - value: d = values[i], - startAngle: a, - endAngle: a += d * k - }; - }); - - // Return the arcs in the original data's order. - return data.map(function(d, i) { - return arcs[index[i]]; - }); - } - - /** - * Specifies the value function *x*, which returns a nonnegative numeric value - * for each datum. The default value function is `Number`. The value function - * is passed two arguments: the current datum and the current index. - */ - pie.value = function(x) { - if (!arguments.length) return value; - value = x; - return pie; - }; - - /** - * Specifies a sort comparison operator *x*. The comparator is passed two data - * elements from the data array, a and b; it returns a negative value if a is - * less than b, a positive value if a is greater than b, and zero if a equals - * b. - */ - pie.sort = function(x) { - if (!arguments.length) return sort; - sort = x; - return pie; - }; - - /** - * Specifies the overall start angle of the pie chart. Defaults to 0. The - * start angle can be specified either as a constant or as a function; in the - * case of a function, it is evaluated once per array (as opposed to per - * element). - */ - pie.startAngle = function(x) { - if (!arguments.length) return startAngle; - startAngle = x; - return pie; - }; - - /** - * Specifies the overall end angle of the pie chart. Defaults to 2π. The - * end angle can be specified either as a constant or as a function; in the - * case of a function, it is evaluated once per array (as opposed to per - * element). - */ - pie.endAngle = function(x) { - if (!arguments.length) return endAngle; - endAngle = x; - return pie; - }; - - return pie; -}; -// data is two-dimensional array of x,y; we populate y0 -d3.layout.stack = function() { - var values = Object, - order = d3_layout_stackOrders["default"], - offset = d3_layout_stackOffsets["zero"], - out = d3_layout_stackOut, - x = d3_layout_stackX, - y = d3_layout_stackY; - - function stack(data, index) { - - // Convert series to canonical two-dimensional representation. - var series = data.map(function(d, i) { - return values.call(stack, d, i); - }); - - // Convert each series to canonical [[x,y]] representation. - var points = series.map(function(d, i) { - return d.map(function(v, i) { - return [x.call(stack, v, i), y.call(stack, v, i)]; - }); - }); - - // Compute the order of series, and permute them. - var orders = order.call(stack, points, index); - series = d3.permute(series, orders); - points = d3.permute(points, orders); - - // Compute the baseline… - var offsets = offset.call(stack, points, index); - - // And propagate it to other series. - var n = series.length, - m = series[0].length, - i, - j, - o; - for (j = 0; j < m; ++j) { - out.call(stack, series[0][j], o = offsets[j], points[0][j][1]); - for (i = 1; i < n; ++i) { - out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]); - } - } - - return data; - } - - stack.values = function(x) { - if (!arguments.length) return values; - values = x; - return stack; - }; - - stack.order = function(x) { - if (!arguments.length) return order; - order = typeof x === "function" ? x : d3_layout_stackOrders[x]; - return stack; - }; - - stack.offset = function(x) { - if (!arguments.length) return offset; - offset = typeof x === "function" ? x : d3_layout_stackOffsets[x]; - return stack; - }; - - stack.x = function(z) { - if (!arguments.length) return x; - x = z; - return stack; - }; - - stack.y = function(z) { - if (!arguments.length) return y; - y = z; - return stack; - }; - - stack.out = function(z) { - if (!arguments.length) return out; - out = z; - return stack; - }; - - return stack; -} - -function d3_layout_stackX(d) { - return d.x; -} - -function d3_layout_stackY(d) { - return d.y; -} - -function d3_layout_stackOut(d, y0, y) { - d.y0 = y0; - d.y = y; -} - -var d3_layout_stackOrders = { - - "inside-out": function(data) { - var n = data.length, - i, - j, - max = data.map(d3_layout_stackMaxIndex), - sums = data.map(d3_layout_stackReduceSum), - index = d3.range(n).sort(function(a, b) { return max[a] - max[b]; }), - top = 0, - bottom = 0, - tops = [], - bottoms = []; - for (i = 0; i < n; ++i) { - j = index[i]; - if (top < bottom) { - top += sums[j]; - tops.push(j); - } else { - bottom += sums[j]; - bottoms.push(j); - } - } - return bottoms.reverse().concat(tops); - }, - - "reverse": function(data) { - return d3.range(data.length).reverse(); - }, - - "default": function(data) { - return d3.range(data.length); - } - -}; - -var d3_layout_stackOffsets = { - - "silhouette": function(data) { - var n = data.length, - m = data[0].length, - sums = [], - max = 0, - i, - j, - o, - y0 = []; - for (j = 0; j < m; ++j) { - for (i = 0, o = 0; i < n; i++) o += data[i][j][1]; - if (o > max) max = o; - sums.push(o); - } - for (j = 0; j < m; ++j) { - y0[j] = (max - sums[j]) / 2; - } - return y0; - }, - - "wiggle": function(data) { - var n = data.length, - x = data[0], - m = x.length, - max = 0, - i, - j, - k, - s1, - s2, - s3, - dx, - o, - o0, - y0 = []; - y0[0] = o = o0 = 0; - for (j = 1; j < m; ++j) { - for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1]; - for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) { - for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) { - s3 += (data[k][j][1] - data[k][j - 1][1]) / dx; - } - s2 += s3 * data[i][j][1]; - } - y0[j] = o -= s1 ? s2 / s1 * dx : 0; - if (o < o0) o0 = o; - } - for (j = 0; j < m; ++j) y0[j] -= o0; - return y0; - }, - - "expand": function(data) { - var n = data.length, - m = data[0].length, - k = 1 / n, - i, - j, - o, - y0 = []; - for (j = 0; j < m; ++j) { - for (i = 0, o = 0; i < n; i++) o += data[i][j][1]; - if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; - else for (i = 0; i < n; i++) data[i][j][1] = k; - } - for (j = 0; j < m; ++j) y0[j] = 0; - return y0; - }, - - "zero": function(data) { - var j = -1, - m = data[0].length, - y0 = []; - while (++j < m) y0[j] = 0; - return y0; - } - -}; - -function d3_layout_stackMaxIndex(array) { - var i = 1, - j = 0, - v = array[0][1], - k, - n = array.length; - for (; i < n; ++i) { - if ((k = array[i][1]) > v) { - j = i; - v = k; - } - } - return j; -} - -function d3_layout_stackReduceSum(d) { - return d.reduce(d3_layout_stackSum, 0); -} - -function d3_layout_stackSum(p, d) { - return p + d[1]; -} -d3.layout.histogram = function() { - var frequency = true, - valuer = Number, - ranger = d3_layout_histogramRange, - binner = d3_layout_histogramBinSturges; - - function histogram(data, i) { - var bins = [], - values = data.map(valuer, this), - range = ranger.call(this, values, i), - thresholds = binner.call(this, range, values, i), - bin, - i = -1, - n = values.length, - m = thresholds.length - 1, - k = frequency ? 1 : 1 / n, - x; - - // Initialize the bins. - while (++i < m) { - bin = bins[i] = []; - bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]); - bin.y = 0; - } - - // Fill the bins, ignoring values outside the range. - i = -1; while(++i < n) { - x = values[i]; - if ((x >= range[0]) && (x <= range[1])) { - bin = bins[d3.bisect(thresholds, x, 1, m) - 1]; - bin.y += k; - bin.push(data[i]); - } - } - - return bins; - } - - // Specifies how to extract a value from the associated data. The default - // value function is `Number`, which is equivalent to the identity function. - histogram.value = function(x) { - if (!arguments.length) return valuer; - valuer = x; - return histogram; - }; - - // Specifies the range of the histogram. Values outside the specified range - // will be ignored. The argument `x` may be specified either as a two-element - // array representing the minimum and maximum value of the range, or as a - // function that returns the range given the array of values and the current - // index `i`. The default range is the extent (minimum and maximum) of the - // values. - histogram.range = function(x) { - if (!arguments.length) return ranger; - ranger = d3.functor(x); - return histogram; - }; - - // Specifies how to bin values in the histogram. The argument `x` may be - // specified as a number, in which case the range of values will be split - // uniformly into the given number of bins. Or, `x` may be an array of - // threshold values, defining the bins; the specified array must contain the - // rightmost (upper) value, thus specifying n + 1 values for n bins. Or, `x` - // may be a function which is evaluated, being passed the range, the array of - // values, and the current index `i`, returning an array of thresholds. The - // default bin function will divide the values into uniform bins using - // Sturges' formula. - histogram.bins = function(x) { - if (!arguments.length) return binner; - binner = typeof x === "number" - ? function(range) { return d3_layout_histogramBinFixed(range, x); } - : d3.functor(x); - return histogram; - }; - - // Specifies whether the histogram's `y` value is a count (frequency) or a - // probability (density). The default value is true. - histogram.frequency = function(x) { - if (!arguments.length) return frequency; - frequency = !!x; - return histogram; - }; - - return histogram; -}; - -function d3_layout_histogramBinSturges(range, values) { - return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1)); -} - -function d3_layout_histogramBinFixed(range, n) { - var x = -1, - b = +range[0], - m = (range[1] - b) / n, - f = []; - while (++x <= n) f[x] = m * x + b; - return f; -} - -function d3_layout_histogramRange(values) { - return [d3.min(values), d3.max(values)]; -} -d3.layout.hierarchy = function() { - var sort = d3_layout_hierarchySort, - children = d3_layout_hierarchyChildren, - value = d3_layout_hierarchyValue; - - // Recursively compute the node depth and value. - // Also converts the data representation into a standard hierarchy structure. - function recurse(data, depth, nodes) { - var childs = children.call(hierarchy, data, depth), - node = d3_layout_hierarchyInline ? data : {data: data}; - node.depth = depth; - nodes.push(node); - if (childs) { - var i = -1, - n = childs.length, - c = node.children = [], - v = 0, - j = depth + 1; - while (++i < n) { - d = recurse(childs[i], j, nodes); - d.parent = node; - c.push(d); - v += d.value; - } - if (sort) c.sort(sort); - if (value) node.value = v; - } else if (value) { - node.value = +value.call(hierarchy, data, depth) || 0; - } - return node; - } - - // Recursively re-evaluates the node value. - function revalue(node, depth) { - var children = node.children, - v = 0; - if (children) { - var i = -1, - n = children.length, - j = depth + 1; - while (++i < n) v += revalue(children[i], j); - } else if (value) { - v = +value.call(hierarchy, d3_layout_hierarchyInline ? node : node.data, depth) || 0; - } - if (value) node.value = v; - return v; - } - - function hierarchy(d) { - var nodes = []; - recurse(d, 0, nodes); - return nodes; - } - - hierarchy.sort = function(x) { - if (!arguments.length) return sort; - sort = x; - return hierarchy; - }; - - hierarchy.children = function(x) { - if (!arguments.length) return children; - children = x; - return hierarchy; - }; - - hierarchy.value = function(x) { - if (!arguments.length) return value; - value = x; - return hierarchy; - }; - - // Re-evaluates the `value` property for the specified hierarchy. - hierarchy.revalue = function(root) { - revalue(root, 0); - return root; - }; - - return hierarchy; -}; - -// A method assignment helper for hierarchy subclasses. -function d3_layout_hierarchyRebind(object, hierarchy) { - object.sort = d3.rebind(object, hierarchy.sort); - object.children = d3.rebind(object, hierarchy.children); - object.links = d3_layout_hierarchyLinks; - object.value = d3.rebind(object, hierarchy.value); - - // If the new API is used, enabling inlining. - object.nodes = function(d) { - d3_layout_hierarchyInline = true; - return (object.nodes = object)(d); - }; - - return object; -} - -function d3_layout_hierarchyChildren(d) { - return d.children; -} - -function d3_layout_hierarchyValue(d) { - return d.value; -} - -function d3_layout_hierarchySort(a, b) { - return b.value - a.value; -} - -// Returns an array source+target objects for the specified nodes. -function d3_layout_hierarchyLinks(nodes) { - return d3.merge(nodes.map(function(parent) { - return (parent.children || []).map(function(child) { - return {source: parent, target: child}; - }); - })); -} - -// For backwards-compatibility, don't enable inlining by default. -var d3_layout_hierarchyInline = false; -d3.layout.pack = function() { - var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), - size = [1, 1]; - - function pack(d, i) { - var nodes = hierarchy.call(this, d, i), - root = nodes[0]; - - // Recursively compute the layout. - root.x = 0; - root.y = 0; - d3_layout_packTree(root); - - // Scale the layout to fit the requested size. - var w = size[0], - h = size[1], - k = 1 / Math.max(2 * root.r / w, 2 * root.r / h); - d3_layout_packTransform(root, w / 2, h / 2, k); - - return nodes; - } - - pack.size = function(x) { - if (!arguments.length) return size; - size = x; - return pack; - }; - - return d3_layout_hierarchyRebind(pack, hierarchy); -}; - -function d3_layout_packSort(a, b) { - return a.value - b.value; -} - -function d3_layout_packInsert(a, b) { - var c = a._pack_next; - a._pack_next = b; - b._pack_prev = a; - b._pack_next = c; - c._pack_prev = b; -} - -function d3_layout_packSplice(a, b) { - a._pack_next = b; - b._pack_prev = a; -} - -function d3_layout_packIntersects(a, b) { - var dx = b.x - a.x, - dy = b.y - a.y, - dr = a.r + b.r; - return (dr * dr - dx * dx - dy * dy) > .001; // within epsilon -} - -function d3_layout_packCircle(nodes) { - var xMin = Infinity, - xMax = -Infinity, - yMin = Infinity, - yMax = -Infinity, - n = nodes.length, - a, b, c, j, k; - - function bound(node) { - xMin = Math.min(node.x - node.r, xMin); - xMax = Math.max(node.x + node.r, xMax); - yMin = Math.min(node.y - node.r, yMin); - yMax = Math.max(node.y + node.r, yMax); - } - - // Create node links. - nodes.forEach(d3_layout_packLink); - - // Create first node. - a = nodes[0]; - a.x = -a.r; - a.y = 0; - bound(a); - - // Create second node. - if (n > 1) { - b = nodes[1]; - b.x = b.r; - b.y = 0; - bound(b); - - // Create third node and build chain. - if (n > 2) { - c = nodes[2]; - d3_layout_packPlace(a, b, c); - bound(c); - d3_layout_packInsert(a, c); - a._pack_prev = c; - d3_layout_packInsert(c, b); - b = a._pack_next; - - // Now iterate through the rest. - for (var i = 3; i < n; i++) { - d3_layout_packPlace(a, b, c = nodes[i]); - - // Search for the closest intersection. - var isect = 0, s1 = 1, s2 = 1; - for (j = b._pack_next; j !== b; j = j._pack_next, s1++) { - if (d3_layout_packIntersects(j, c)) { - isect = 1; - break; - } - } - if (isect == 1) { - for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) { - if (d3_layout_packIntersects(k, c)) { - if (s2 < s1) { - isect = -1; - j = k; - } - break; - } - } - } - - // Update node chain. - if (isect == 0) { - d3_layout_packInsert(a, c); - b = c; - bound(c); - } else if (isect > 0) { - d3_layout_packSplice(a, j); - b = j; - i--; - } else { // isect < 0 - d3_layout_packSplice(j, b); - a = j; - i--; - } - } - } - } - - // Re-center the circles and return the encompassing radius. - var cx = (xMin + xMax) / 2, - cy = (yMin + yMax) / 2, - cr = 0; - for (var i = 0; i < n; i++) { - var node = nodes[i]; - node.x -= cx; - node.y -= cy; - cr = Math.max(cr, node.r + Math.sqrt(node.x * node.x + node.y * node.y)); - } - - // Remove node links. - nodes.forEach(d3_layout_packUnlink); - - return cr; -} - -function d3_layout_packLink(node) { - node._pack_next = node._pack_prev = node; -} - -function d3_layout_packUnlink(node) { - delete node._pack_next; - delete node._pack_prev; -} - -function d3_layout_packTree(node) { - var children = node.children; - if (children) { - children.forEach(d3_layout_packTree); - node.r = d3_layout_packCircle(children); - } else { - node.r = Math.sqrt(node.value); - } -} - -function d3_layout_packTransform(node, x, y, k) { - var children = node.children; - node.x = (x += k * node.x); - node.y = (y += k * node.y); - node.r *= k; - if (children) { - var i = -1, n = children.length; - while (++i < n) d3_layout_packTransform(children[i], x, y, k); - } -} - -function d3_layout_packPlace(a, b, c) { - var da = b.r + c.r, - db = a.r + c.r, - dx = b.x - a.x, - dy = b.y - a.y, - dc = Math.sqrt(dx * dx + dy * dy), - cos = (db * db + dc * dc - da * da) / (2 * db * dc), - theta = Math.acos(cos), - x = cos * db, - h = Math.sin(theta) * db; - dx /= dc; - dy /= dc; - c.x = a.x + x * dx + h * dy; - c.y = a.y + x * dy - h * dx; -} -// Implements a hierarchical layout using the cluster (or dendogram) algorithm. -d3.layout.cluster = function() { - var hierarchy = d3.layout.hierarchy().sort(null).value(null), - separation = d3_layout_treeSeparation, - size = [1, 1]; // width, height - - function cluster(d, i) { - var nodes = hierarchy.call(this, d, i), - root = nodes[0], - previousNode, - x = 0, - kx, - ky; - - // First walk, computing the initial x & y values. - d3_layout_treeVisitAfter(root, function(node) { - if (node.children) { - node.x = d3_layout_clusterX(node.children); - node.y = d3_layout_clusterY(node.children); - } else { - node.x = previousNode ? x += separation(node, previousNode) : 0; - node.y = 0; - previousNode = node; - } - }); - - // Compute the left-most, right-most, and depth-most nodes for extents. - var left = d3_layout_clusterLeft(root), - right = d3_layout_clusterRight(root), - x0 = left.x - separation(left, right) / 2, - x1 = right.x + separation(right, left) / 2; - - // Second walk, normalizing x & y to the desired size. - d3_layout_treeVisitAfter(root, function(node) { - node.x = (node.x - x0) / (x1 - x0) * size[0]; - node.y = (1 - node.y / root.y) * size[1]; - }); - - return nodes; - } - - cluster.separation = function(x) { - if (!arguments.length) return separation; - separation = x; - return cluster; - }; - - cluster.size = function(x) { - if (!arguments.length) return size; - size = x; - return cluster; - }; - - return d3_layout_hierarchyRebind(cluster, hierarchy); -}; - -function d3_layout_clusterY(children) { - return 1 + d3.max(children, function(child) { - return child.y; - }); -} - -function d3_layout_clusterX(children) { - return children.reduce(function(x, child) { - return x + child.x; - }, 0) / children.length; -} - -function d3_layout_clusterLeft(node) { - var children = node.children; - return children ? d3_layout_clusterLeft(children[0]) : node; -} - -function d3_layout_clusterRight(node) { - var children = node.children; - return children ? d3_layout_clusterRight(children[children.length - 1]) : node; -} -// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm -d3.layout.tree = function() { - var hierarchy = d3.layout.hierarchy().sort(null).value(null), - separation = d3_layout_treeSeparation, - size = [1, 1]; // width, height - - function tree(d, i) { - var nodes = hierarchy.call(this, d, i), - root = nodes[0]; - - function firstWalk(node, previousSibling) { - var children = node.children, - layout = node._tree; - if (children) { - var n = children.length, - firstChild = children[0], - previousChild, - ancestor = firstChild, - child, - i = -1; - while (++i < n) { - child = children[i]; - firstWalk(child, previousChild); - ancestor = apportion(child, previousChild, ancestor); - previousChild = child; - } - d3_layout_treeShift(node); - var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim); - if (previousSibling) { - layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling); - layout.mod = layout.prelim - midpoint; - } else { - layout.prelim = midpoint; - } - } else { - if (previousSibling) { - layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling); - } - } - } - - function secondWalk(node, x) { - node.x = node._tree.prelim + x; - var children = node.children; - if (children) { - var i = -1, - n = children.length; - x += node._tree.mod; - while (++i < n) { - secondWalk(children[i], x); - } - } - } - - function apportion(node, previousSibling, ancestor) { - if (previousSibling) { - var vip = node, - vop = node, - vim = previousSibling, - vom = node.parent.children[0], - sip = vip._tree.mod, - sop = vop._tree.mod, - sim = vim._tree.mod, - som = vom._tree.mod, - shift; - while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) { - vom = d3_layout_treeLeft(vom); - vop = d3_layout_treeRight(vop); - vop._tree.ancestor = node; - shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip); - if (shift > 0) { - d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift); - sip += shift; - sop += shift; - } - sim += vim._tree.mod; - sip += vip._tree.mod; - som += vom._tree.mod; - sop += vop._tree.mod; - } - if (vim && !d3_layout_treeRight(vop)) { - vop._tree.thread = vim; - vop._tree.mod += sim - sop; - } - if (vip && !d3_layout_treeLeft(vom)) { - vom._tree.thread = vip; - vom._tree.mod += sip - som; - ancestor = node; - } - } - return ancestor; - } - - // Initialize temporary layout variables. - d3_layout_treeVisitAfter(root, function(node, previousSibling) { - node._tree = { - ancestor: node, - prelim: 0, - mod: 0, - change: 0, - shift: 0, - number: previousSibling ? previousSibling._tree.number + 1 : 0 - }; - }); - - // Compute the layout using Buchheim et al.'s algorithm. - firstWalk(root); - secondWalk(root, -root._tree.prelim); - - // Compute the left-most, right-most, and depth-most nodes for extents. - var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), - right = d3_layout_treeSearch(root, d3_layout_treeRightmost), - deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), - x0 = left.x - separation(left, right) / 2, - x1 = right.x + separation(right, left) / 2, - y1 = deep.depth || 1; - - // Clear temporary layout variables; transform x and y. - d3_layout_treeVisitAfter(root, function(node) { - node.x = (node.x - x0) / (x1 - x0) * size[0]; - node.y = node.depth / y1 * size[1]; - delete node._tree; - }); - - return nodes; - } - - tree.separation = function(x) { - if (!arguments.length) return separation; - separation = x; - return tree; - }; - - tree.size = function(x) { - if (!arguments.length) return size; - size = x; - return tree; - }; - - return d3_layout_hierarchyRebind(tree, hierarchy); -}; - -function d3_layout_treeSeparation(a, b) { - return a.parent == b.parent ? 1 : 2; -} - -// function d3_layout_treeSeparationRadial(a, b) { -// return (a.parent == b.parent ? 1 : 2) / a.depth; -// } - -function d3_layout_treeLeft(node) { - return node.children ? node.children[0] : node._tree.thread; -} - -function d3_layout_treeRight(node) { - return node.children ? node.children[node.children.length - 1] : node._tree.thread; -} - -function d3_layout_treeSearch(node, compare) { - var children = node.children; - if (children) { - var child, - n = children.length, - i = -1; - while (++i < n) { - if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) { - node = child; - } - } - } - return node; -} - -function d3_layout_treeRightmost(a, b) { - return a.x - b.x; -} - -function d3_layout_treeLeftmost(a, b) { - return b.x - a.x; -} - -function d3_layout_treeDeepest(a, b) { - return a.depth - b.depth; -} - -function d3_layout_treeVisitAfter(node, callback) { - function visit(node, previousSibling) { - var children = node.children; - if (children) { - var child, - previousChild = null, - i = -1, - n = children.length; - while (++i < n) { - child = children[i]; - visit(child, previousChild); - previousChild = child; - } - } - callback(node, previousSibling); - } - visit(node, null); -} - -function d3_layout_treeShift(node) { - var shift = 0, - change = 0, - children = node.children, - i = children.length, - child; - while (--i >= 0) { - child = children[i]._tree; - child.prelim += shift; - child.mod += shift; - shift += child.shift + (change += child.change); - } -} - -function d3_layout_treeMove(ancestor, node, shift) { - ancestor = ancestor._tree; - node = node._tree; - var change = shift / (node.number - ancestor.number); - ancestor.change += change; - node.change -= change; - node.shift += shift; - node.prelim += shift; - node.mod += shift; -} - -function d3_layout_treeAncestor(vim, node, ancestor) { - return vim._tree.ancestor.parent == node.parent - ? vim._tree.ancestor - : ancestor; -} -// Squarified Treemaps by Mark Bruls, Kees Huizing, and Jarke J. van Wijk -// Modified to support a target aspect ratio by Jeff Heer -d3.layout.treemap = function() { - var hierarchy = d3.layout.hierarchy(), - round = Math.round, - size = [1, 1], // width, height - padding = null, - pad = d3_layout_treemapPadNull, - sticky = false, - stickies, - ratio = 0.5 * (1 + Math.sqrt(5)); // golden ratio - - // Compute the area for each child based on value & scale. - function scale(children, k) { - var i = -1, - n = children.length, - child, - area; - while (++i < n) { - area = (child = children[i]).value * (k < 0 ? 0 : k); - child.area = isNaN(area) || area <= 0 ? 0 : area; - } - } - - // Recursively arranges the specified node's children into squarified rows. - function squarify(node) { - if (!node.children) return; - var rect = pad(node), - row = [], - children = node.children.slice(), // copy-on-write - child, - best = Infinity, // the best row score so far - score, // the current row score - u = Math.min(rect.dx, rect.dy), // initial orientation - n; - scale(children, rect.dx * rect.dy / node.value); - row.area = 0; - while ((n = children.length) > 0) { - row.push(child = children[n - 1]); - row.area += child.area; - if ((score = worst(row, u)) <= best) { // continue with this orientation - children.pop(); - best = score; - } else { // abort, and try a different orientation - row.area -= row.pop().area; - position(row, u, rect, false); - u = Math.min(rect.dx, rect.dy); - row.length = row.area = 0; - best = Infinity; - } - } - if (row.length) { - position(row, u, rect, true); - row.length = row.area = 0; - } - node.children.forEach(squarify); - } - - // Recursively resizes the specified node's children into existing rows. - // Preserves the existing layout! - function stickify(node) { - if (!node.children) return; - var rect = pad(node), - children = node.children.slice(), // copy-on-write - child, - row = []; - scale(children, rect.dx * rect.dy / node.value); - row.area = 0; - while (child = children.pop()) { - row.push(child); - row.area += child.area; - if (child.z != null) { - position(row, child.z ? rect.dx : rect.dy, rect, !children.length); - row.length = row.area = 0; - } - } - node.children.forEach(stickify); - } - - // Computes the score for the specified row, as the worst aspect ratio. - function worst(row, u) { - var s = row.area, - r, - rmax = 0, - rmin = Infinity, - i = -1, - n = row.length; - while (++i < n) { - if (!(r = row[i].area)) continue; - if (r < rmin) rmin = r; - if (r > rmax) rmax = r; - } - s *= s; - u *= u; - return s - ? Math.max((u * rmax * ratio) / s, s / (u * rmin * ratio)) - : Infinity; - } - - // Positions the specified row of nodes. Modifies `rect`. - function position(row, u, rect, flush) { - var i = -1, - n = row.length, - x = rect.x, - y = rect.y, - v = u ? round(row.area / u) : 0, - o; - if (u == rect.dx) { // horizontal subdivision - if (flush || v > rect.dy) v = rect.dy; // over+underflow - while (++i < n) { - o = row[i]; - o.x = x; - o.y = y; - o.dy = v; - x += o.dx = v ? round(o.area / v) : 0; - } - o.z = true; - o.dx += rect.x + rect.dx - x; // rounding error - rect.y += v; - rect.dy -= v; - } else { // vertical subdivision - if (flush || v > rect.dx) v = rect.dx; // over+underflow - while (++i < n) { - o = row[i]; - o.x = x; - o.y = y; - o.dx = v; - y += o.dy = v ? round(o.area / v) : 0; - } - o.z = false; - o.dy += rect.y + rect.dy - y; // rounding error - rect.x += v; - rect.dx -= v; - } - } - - function treemap(d) { - var nodes = stickies || hierarchy(d), - root = nodes[0]; - root.x = 0; - root.y = 0; - root.dx = size[0]; - root.dy = size[1]; - if (stickies) hierarchy.revalue(root); - scale([root], root.dx * root.dy / root.value); - (stickies ? stickify : squarify)(root); - if (sticky) stickies = nodes; - return nodes; - } - - treemap.size = function(x) { - if (!arguments.length) return size; - size = x; - return treemap; - }; - - treemap.padding = function(x) { - if (!arguments.length) return padding; - - function padFunction(node) { - var p = x.call(treemap, node, node.depth); - return p == null - ? d3_layout_treemapPadNull(node) - : d3_layout_treemapPad(node, typeof p === "number" ? [p, p, p, p] : p); - } - - function padConstant(node) { - return d3_layout_treemapPad(node, x); - } - - var type; - pad = (padding = x) == null ? d3_layout_treemapPadNull - : (type = typeof x) === "function" ? padFunction - : type === "number" ? (x = [x, x, x, x], padConstant) - : padConstant; - return treemap; - }; - - treemap.round = function(x) { - if (!arguments.length) return round != Number; - round = x ? Math.round : Number; - return treemap; - }; - - treemap.sticky = function(x) { - if (!arguments.length) return sticky; - sticky = x; - stickies = null; - return treemap; - }; - - treemap.ratio = function(x) { - if (!arguments.length) return ratio; - ratio = x; - return treemap; - }; - - return d3_layout_hierarchyRebind(treemap, hierarchy); -}; - -function d3_layout_treemapPadNull(node) { - return {x: node.x, y: node.y, dx: node.dx, dy: node.dy}; -} - -function d3_layout_treemapPad(node, padding) { - var x = node.x + padding[3], - y = node.y + padding[0], - dx = node.dx - padding[1] - padding[3], - dy = node.dy - padding[0] - padding[2]; - if (dx < 0) { x += dx / 2; dx = 0; } - if (dy < 0) { y += dy / 2; dy = 0; } - return {x: x, y: y, dx: dx, dy: dy}; -} -})(); diff --git a/client/js/d3/d3.time.js b/client/js/d3/d3.time.js deleted file mode 100755 index 3a3409fa..00000000 --- a/client/js/d3/d3.time.js +++ /dev/null @@ -1,660 +0,0 @@ -(function(){d3.time = {}; - -var d3_time = Date; -d3.time.format = function(template) { - var n = template.length; - - function format(date) { - var string = [], - i = -1, - j = 0, - c, - f; - while (++i < n) { - if (template.charCodeAt(i) == 37) { - string.push( - template.substring(j, i), - (f = d3_time_formats[c = template.charAt(++i)]) - ? f(date) : c); - j = i + 1; - } - } - string.push(template.substring(j, i)); - return string.join(""); - } - - format.parse = function(string) { - var date = new d3_time(1900, 0, 1), - i = d3_time_parse(date, template, string, 0); - if (i != string.length) return null; - if (date.hour12) { - var hours = date.getHours() % 12; - date.setHours(date.hour12pm ? hours + 12 : hours); - } - delete date.hour12; - delete date.hour12pm; - return date; - }; - - format.toString = function() { - return template; - }; - - return format; -}; - -function d3_time_parse(date, template, string, j) { - var c, - p, - i = 0, - n = template.length, - m = string.length; - while (i < n) { - if (j >= m) return -1; - c = template.charCodeAt(i++); - if (c == 37) { - p = d3_time_parsers[template.charAt(i++)]; - if (!p || ((j = p(date, string, j)) < 0)) return -1; - } else if (c != string.charCodeAt(j++)) { - return -1; - } - } - return j; -} - -var d3_time_zfill2 = d3.format("02d"), - d3_time_zfill3 = d3.format("03d"), - d3_time_zfill4 = d3.format("04d"), - d3_time_sfill2 = d3.format("2d"); - -var d3_time_formats = { - a: function(d) { return d3_time_weekdays[d.getDay()].substring(0, 3); }, - A: function(d) { return d3_time_weekdays[d.getDay()]; }, - b: function(d) { return d3_time_months[d.getMonth()].substring(0, 3); }, - B: function(d) { return d3_time_months[d.getMonth()]; }, - c: d3.time.format("%a %b %e %H:%M:%S %Y"), - d: function(d) { return d3_time_zfill2(d.getDate()); }, - e: function(d) { return d3_time_sfill2(d.getDate()); }, - H: function(d) { return d3_time_zfill2(d.getHours()); }, - I: function(d) { return d3_time_zfill2(d.getHours() % 12 || 12); }, - j: d3_time_dayOfYear, - m: function(d) { return d3_time_zfill2(d.getMonth() + 1); }, - M: function(d) { return d3_time_zfill2(d.getMinutes()); }, - p: function(d) { return d.getHours() >= 12 ? "PM" : "AM"; }, - S: function(d) { return d3_time_zfill2(d.getSeconds()); }, - U: d3_time_weekNumberSunday, - w: function(d) { return d.getDay(); }, - W: d3_time_weekNumberMonday, - x: d3.time.format("%m/%d/%y"), - X: d3.time.format("%H:%M:%S"), - y: function(d) { return d3_time_zfill2(d.getFullYear() % 100); }, - Y: function(d) { return d3_time_zfill4(d.getFullYear() % 10000); }, - Z: d3_time_zone, - "%": function(d) { return "%"; } -}; - -var d3_time_parsers = { - a: d3_time_parseWeekdayAbbrev, - A: d3_time_parseWeekday, - b: d3_time_parseMonthAbbrev, - B: d3_time_parseMonth, - c: d3_time_parseLocaleFull, - d: d3_time_parseDay, - e: d3_time_parseDay, - H: d3_time_parseHour24, - I: d3_time_parseHour12, - // j: function(d, s, i) { /*TODO day of year [001,366] */ return i; }, - m: d3_time_parseMonthNumber, - M: d3_time_parseMinutes, - p: d3_time_parseAmPm, - S: d3_time_parseSeconds, - // U: function(d, s, i) { /*TODO week number (sunday) [00,53] */ return i; }, - // w: function(d, s, i) { /*TODO weekday [0,6] */ return i; }, - // W: function(d, s, i) { /*TODO week number (monday) [00,53] */ return i; }, - x: d3_time_parseLocaleDate, - X: d3_time_parseLocaleTime, - y: d3_time_parseYear, - Y: d3_time_parseFullYear - // , - // Z: function(d, s, i) { /*TODO time zone */ return i; }, - // "%": function(d, s, i) { /*TODO literal % */ return i; } -}; - -// Note: weekday is validated, but does not set the date. -function d3_time_parseWeekdayAbbrev(date, string, i) { - return string.substring(i, i += 3).toLowerCase() in d3_time_weekdayAbbrevLookup ? i : -1; -} - -var d3_time_weekdayAbbrevLookup = { - sun: 3, - mon: 3, - tue: 3, - wed: 3, - thu: 3, - fri: 3, - sat: 3 -}; - -// Note: weekday is validated, but does not set the date. -function d3_time_parseWeekday(date, string, i) { - d3_time_weekdayRe.lastIndex = 0; - var n = d3_time_weekdayRe.exec(string.substring(i, i + 10)); - return n ? i += n[0].length : -1; -} - -var d3_time_weekdayRe = /^(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/ig; - -var d3_time_weekdays = [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -]; - -function d3_time_parseMonthAbbrev(date, string, i) { - var n = d3_time_monthAbbrevLookup[string.substring(i, i += 3).toLowerCase()]; - return n == null ? -1 : (date.setMonth(n), i); -} - -var d3_time_monthAbbrevLookup = { - jan: 0, - feb: 1, - mar: 2, - apr: 3, - may: 4, - jun: 5, - jul: 6, - aug: 7, - sep: 8, - oct: 9, - nov: 10, - dec: 11 -}; - -function d3_time_parseMonth(date, string, i) { - d3_time_monthRe.lastIndex = 0; - var n = d3_time_monthRe.exec(string.substring(i, i + 12)); - return n ? (date.setMonth(d3_time_monthLookup[n[0].toLowerCase()]), i += n[0].length) : -1; -} - -var d3_time_monthRe = /^(?:January|February|March|April|May|June|July|August|September|October|November|December)/ig; - -var d3_time_monthLookup = { - january: 0, - february: 1, - march: 2, - april: 3, - may: 4, - june: 5, - july: 6, - august: 7, - september: 8, - october: 9, - november: 10, - december: 11 -}; - -var d3_time_months = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -]; - -function d3_time_parseLocaleFull(date, string, i) { - return d3_time_parse(date, d3_time_formats.c.toString(), string, i); -} - -function d3_time_parseLocaleDate(date, string, i) { - return d3_time_parse(date, d3_time_formats.x.toString(), string, i); -} - -function d3_time_parseLocaleTime(date, string, i) { - return d3_time_parse(date, d3_time_formats.X.toString(), string, i); -} - -function d3_time_parseFullYear(date, string, i) { - d3_time_numberRe.lastIndex = 0; - var n = d3_time_numberRe.exec(string.substring(i, i + 4)); - return n ? (date.setFullYear(n[0]), i += n[0].length) : -1; -} - -function d3_time_parseYear(date, string, i) { - d3_time_numberRe.lastIndex = 0; - var n = d3_time_numberRe.exec(string.substring(i, i + 2)); - return n ? (date.setFullYear(d3_time_century() + +n[0]), i += n[0].length) : -1; -} - -function d3_time_century() { - return ~~(new Date().getFullYear() / 1000) * 1000; -} - -function d3_time_parseMonthNumber(date, string, i) { - d3_time_numberRe.lastIndex = 0; - var n = d3_time_numberRe.exec(string.substring(i, i + 2)); - return n ? (date.setMonth(n[0] - 1), i += n[0].length) : -1; -} - -function d3_time_parseDay(date, string, i) { - d3_time_numberRe.lastIndex = 0; - var n = d3_time_numberRe.exec(string.substring(i, i + 2)); - return n ? (date.setDate(+n[0]), i += n[0].length) : -1; -} - -// Note: we don't validate that the hour is in the range [0,23]. -function d3_time_parseHour24(date, string, i) { - d3_time_numberRe.lastIndex = 0; - var n = d3_time_numberRe.exec(string.substring(i, i + 2)); - return n ? (date.setHours(+n[0]), i += n[0].length) : -1; -} - -// Note: we don't validate that the hour is in the range [1,12]. -function d3_time_parseHour12(date, string, i) { - date.hour12 = true; - return d3_time_parseHour24(date, string, i); -} - -function d3_time_parseMinutes(date, string, i) { - d3_time_numberRe.lastIndex = 0; - var n = d3_time_numberRe.exec(string.substring(i, i + 2)); - return n ? (date.setMinutes(+n[0]), i += n[0].length) : -1; -} - -function d3_time_parseSeconds(date, string, i) { - d3_time_numberRe.lastIndex = 0; - var n = d3_time_numberRe.exec(string.substring(i, i + 2)); - return n ? (date.setSeconds(+n[0]), i += n[0].length) : -1; -} - -// Note: we don't look at the next directive. -var d3_time_numberRe = /\s*\d+/; - -function d3_time_parseAmPm(date, string, i) { - var n = d3_time_amPmLookup[string.substring(i, i += 2).toLowerCase()]; - return n == null ? -1 : (date.hour12pm = n, i); -} - -var d3_time_amPmLookup = { - am: 0, - pm: 1 -}; - -function d3_time_year(d) { - return new d3_time(d.getFullYear(), 0, 1); -} - -function d3_time_dayOfYear(d) { - return d3_time_zfill3(1 + ~~((d - d3_time_year(d)) / 864e5)); -} - -function d3_time_weekNumberSunday(d) { - var d0 = d3_time_year(d); - return d3_time_zfill2(~~(((d - d0) / 864e5 + d0.getDay()) / 7)); -} - -function d3_time_weekNumberMonday(d) { - var d0 = d3_time_year(d); - return d3_time_zfill2(~~(((d - d0) / 864e5 + (d0.getDay() + 6) % 7) / 7)); -} - -// TODO table of time zone offset names? -function d3_time_zone(d) { - var z = d.getTimezoneOffset(), - zs = z > 0 ? "-" : "+", - zh = ~~(Math.abs(z) / 60), - zm = Math.abs(z) % 60; - return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm); -} -d3.time.format.utc = function(template) { - var local = d3.time.format(template); - - function format(date) { - var utc = new d3_time_format_utc(); - utc._ = date; - return local(utc); - } - - format.parse = function(string) { - try { - d3_time = d3_time_format_utc; - var date = local.parse(string); - return date && date._; - } finally { - d3_time = Date; - } - }; - - format.toString = local.toString; - - return format; -}; - -function d3_time_format_utc() { - this._ = new Date(Date.UTC.apply(this, arguments)); -} - -d3_time_format_utc.prototype = { - getDate: function() { return this._.getUTCDate(); }, - getDay: function() { return this._.getUTCDay(); }, - getFullYear: function() { return this._.getUTCFullYear(); }, - getHours: function() { return this._.getUTCHours(); }, - getMilliseconds: function() { return this._.getUTCMilliseconds(); }, - getMinutes: function() { return this._.getUTCMinutes(); }, - getMonth: function() { return this._.getUTCMonth(); }, - getSeconds: function() { return this._.getUTCSeconds(); }, - getTimezoneOffset: function() { return 0; }, - valueOf: function() { return this._.getTime(); }, - setDate: function(x) { this._.setUTCDate(x); }, - setDay: function(x) { this._.setUTCDay(x); }, - setFullYear: function(x) { this._.setUTCFullYear(x); }, - setHours: function(x) { this._.setUTCHours(x); }, - setMilliseconds: function(x) { this._.setUTCMilliseconds(x); }, - setMinutes: function(x) { this._.setUTCMinutes(x); }, - setMonth: function(x) { this._.setUTCMonth(x); }, - setSeconds: function(x) { this._.setUTCSeconds(x); } -}; -d3.time.format.iso = d3.time.format.utc("%Y-%m-%dT%H:%M:%SZ"); -function d3_time_range(floor, step, number) { - return function(t0, t1, dt) { - var time = floor(t0), times = []; - if (time < t0) step(time); - if (dt > 1) { - while (time < t1) { - var date = new Date(+time); - if (!(number(date) % dt)) times.push(date); - step(time); - } - } else { - while (time < t1) times.push(new Date(+time)), step(time); - } - return times; - }; -} -d3.time.second = function(date) { - return new Date(~~(date / 1e3) * 1e3); -}; - -d3.time.second.utc = d3.time.second; -d3.time.seconds = d3_time_range(d3.time.second, function(date) { - date.setTime(date.getTime() + 1e3); -}, function(date) { - return date.getSeconds(); -}); - -d3.time.seconds.utc = d3.time.seconds; -d3.time.minute = function(date) { - return new Date(~~(date / 6e4) * 6e4); -}; - -d3.time.minute.utc = d3.time.minute;d3.time.minutes = d3_time_range(d3.time.minute, d3_time_minutesStep, function(date) { - return date.getMinutes(); -}); - -d3.time.minutes.utc = d3_time_range(d3.time.minute, d3_time_minutesStep, function(date) { - return date.getUTCMinutes(); -}); - -function d3_time_minutesStep(date) { - date.setTime(date.getTime() + 6e4); // assumes no leap seconds -} -d3.time.hour = function(date) { - var offset = date.getTimezoneOffset() / 60; - return new Date((~~(date / 36e5 - offset) + offset) * 36e5); -}; - -d3.time.hour.utc = function(date) { - return new Date(~~(date / 36e5) * 36e5); -}; -d3.time.hours = d3_time_range(d3.time.hour, d3_time_hoursStep, function(date) { - return date.getHours(); -}); - -d3.time.hours.utc = d3_time_range(d3.time.hour.utc, d3_time_hoursStep, function(date) { - return date.getUTCHours(); -}); - -function d3_time_hoursStep(date) { - date.setTime(date.getTime() + 36e5); -} -d3.time.day = function(date) { - return new Date(date.getFullYear(), date.getMonth(), date.getDate()); -}; - -d3.time.day.utc = function(date) { - return new Date(~~(date / 864e5) * 864e5); -}; -d3.time.days = d3_time_range(d3.time.day, function(date) { - date.setDate(date.getDate() + 1); -}, function(date) { - return date.getDate() - 1; -}); - -d3.time.days.utc = d3_time_range(d3.time.day.utc, function(date) { - date.setUTCDate(date.getUTCDate() + 1); -}, function(date) { - return date.getUTCDate() - 1; -}); -d3.time.week = function(date) { - (date = d3.time.day(date)).setDate(date.getDate() - date.getDay()); - return date; -}; - -d3.time.week.utc = function(date) { - (date = d3.time.day.utc(date)).setUTCDate(date.getUTCDate() - date.getUTCDay()); - return date; -}; -d3.time.weeks = d3_time_range(d3.time.week, function(date) { - date.setDate(date.getDate() + 7); -}, function(date) { - return ~~((date - new Date(date.getFullYear(), 0, 1)) / 6048e5); -}); - -d3.time.weeks.utc = d3_time_range(d3.time.week.utc, function(date) { - date.setUTCDate(date.getUTCDate() + 7); -}, function(date) { - return ~~((date - Date.UTC(date.getUTCFullYear(), 0, 1)) / 6048e5); -}); -d3.time.month = function(date) { - return new Date(date.getFullYear(), date.getMonth(), 1); -}; - -d3.time.month.utc = function(date) { - return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1)); -}; -d3.time.months = d3_time_range(d3.time.month, function(date) { - date.setMonth(date.getMonth() + 1); -}, function(date) { - return date.getMonth(); -}); - -d3.time.months.utc = d3_time_range(d3.time.month.utc, function(date) { - date.setUTCMonth(date.getUTCMonth() + 1); -}, function(date) { - return date.getUTCMonth(); -}); -d3.time.year = function(date) { - return new Date(date.getFullYear(), 0, 1); -}; - -d3.time.year.utc = function(date) { - return new Date(Date.UTC(date.getUTCFullYear(), 0, 1)); -}; -d3.time.years = d3_time_range(d3.time.year, function(date) { - date.setFullYear(date.getFullYear() + 1); -}, function(date) { - return date.getFullYear(); -}); - -d3.time.years.utc = d3_time_range(d3.time.year.utc, function(date) { - date.setUTCFullYear(date.getUTCFullYear() + 1); -}, function(date) { - return date.getUTCFullYear(); -}); -// TODO nice -function d3_time_scale(methods, format) { - var linear = d3.scale.linear(); - - function scale(x) { - return linear(x); - } - - scale.invert = function(x) { - return d3_time_scaleDate(linear.invert(x)); - }; - - scale.domain = function(x) { - if (!arguments.length) return linear.domain().map(d3_time_scaleDate); - linear.domain(x); - return scale; - }; - - scale.ticks = function(m, k) { - var extent = d3_time_scaleExtent(scale.domain()); - if (typeof m !== "function") { - var span = extent[1] - extent[0], - target = span / m, - i = d3.bisect(d3_time_scaleSteps, target, 1, d3_time_scaleSteps.length - 1); - if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i; - m = methods[i]; - k = m[1]; - m = m[0]; - } - return m(extent[0], extent[1], k); - }; - - scale.tickFormat = function() { - return format; - }; - - // TOOD expose d3_scale_linear_rebind? - scale.range = d3.rebind(scale, linear.range); - scale.rangeRound = d3.rebind(scale, linear.rangeRound); - scale.interpolate = d3.rebind(scale, linear.interpolate); - scale.clamp = d3.rebind(scale, linear.clamp); - - return scale; -} - -// TODO expose d3_scaleExtent? -function d3_time_scaleExtent(domain) { - var start = domain[0], stop = domain[domain.length - 1]; - return start < stop ? [start, stop] : [stop, start]; -} - -function d3_time_scaleDate(t) { - return new Date(t); -} - -function d3_time_scaleFormat(formats) { - return function(date) { - var i = formats.length - 1, f = formats[i]; - while (!f[1](date)) f = formats[--i]; - return f[0](date); - }; -} - -var d3_time_scaleSteps = [ - 1e3, // 1-second - 5e3, // 5-second - 15e3, // 15-second - 3e4, // 30-second - 6e4, // 1-minute - 3e5, // 5-minute - 9e5, // 15-minute - 18e5, // 30-minute - 36e5, // 1-hour - 108e5, // 3-hour - 216e5, // 6-hour - 432e5, // 12-hour - 864e5, // 1-day - 1728e5, // 2-day - 6048e5, // 1-week - 1728e6, // 1-month - 7776e6, // 3-month - 31536e6 // 1-year -]; - -var d3_time_scaleLocalMethods = [ - [d3.time.seconds, 1], - [d3.time.seconds, 5], - [d3.time.seconds, 15], - [d3.time.seconds, 30], - [d3.time.minutes, 1], - [d3.time.minutes, 5], - [d3.time.minutes, 15], - [d3.time.minutes, 30], - [d3.time.hours, 1], - [d3.time.hours, 3], - [d3.time.hours, 6], - [d3.time.hours, 12], - [d3.time.days, 1], - [d3.time.days, 2], - [d3.time.weeks, 1], - [d3.time.months, 1], - [d3.time.months, 3], - [d3.time.years, 1] -]; - -var d3_time_scaleLocalFormats = [ - [d3.time.format("%Y"), function(d) { return true; }], - [d3.time.format("%B"), function(d) { return d.getMonth(); }], - [d3.time.format("%b %d"), function(d) { return d.getDate() != 1; }], - [d3.time.format("%a %d"), function(d) { return d.getDay() && d.getDate() != 1; }], - [d3.time.format("%I %p"), function(d) { return d.getHours(); }], - [d3.time.format("%I:%M"), function(d) { return d.getMinutes(); }], - [d3.time.format(":%S"), function(d) { return d.getSeconds() || d.getMilliseconds(); }] -]; - -var d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats); - -d3.time.scale = function() { - return d3_time_scale(d3_time_scaleLocalMethods, d3_time_scaleLocalFormat); -}; -var d3_time_scaleUTCMethods = [ - [d3.time.seconds.utc, 1], - [d3.time.seconds.utc, 5], - [d3.time.seconds.utc, 15], - [d3.time.seconds.utc, 30], - [d3.time.minutes.utc, 1], - [d3.time.minutes.utc, 5], - [d3.time.minutes.utc, 15], - [d3.time.minutes.utc, 30], - [d3.time.hours.utc, 1], - [d3.time.hours.utc, 3], - [d3.time.hours.utc, 6], - [d3.time.hours.utc, 12], - [d3.time.days.utc, 1], - [d3.time.days.utc, 2], - [d3.time.weeks.utc, 1], - [d3.time.months.utc, 1], - [d3.time.months.utc, 3], - [d3.time.years.utc, 1] -]; - -var d3_time_scaleUTCFormats = [ - [d3.time.format.utc("%Y"), function(d) { return true; }], - [d3.time.format.utc("%B"), function(d) { return d.getUTCMonth(); }], - [d3.time.format.utc("%b %d"), function(d) { return d.getUTCDate() != 1; }], - [d3.time.format.utc("%a %d"), function(d) { return d.getUTCDay() && d.getUTCDate() != 1; }], - [d3.time.format.utc("%I %p"), function(d) { return d.getUTCHours(); }], - [d3.time.format.utc("%I:%M"), function(d) { return d.getUTCMinutes(); }], - [d3.time.format.utc(":%S"), function(d) { return d.getUTCSeconds() || d.getUTCMilliseconds(); }] -]; - -var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats); - -d3.time.scale.utc = function() { - return d3_time_scale(d3_time_scaleUTCMethods, d3_time_scaleUTCFormat); -}; -})(); diff --git a/client/js/images/ui-bg_glass_65_ffffff_1x400.png b/client/js/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100755 index 0dc2feb7b5ad5dc575c954e61910dbee3c5bd58c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^j6gI2NH8$CE1Q=ADVB6cUq=Rpjs4tz5?MhCii6yp z7}lMWc?skwBzpw;GB8xBF)%c=FfjZA3N^f7U???UV0e|lz+g3lfkC`r&aOZkpafHr zx4R1i*gQu&X J%Q~loCIA-LLXiLf diff --git a/client/js/images/ui-bg_glass_75_dadada_1x400.png b/client/js/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index 5a46b47cb16631068aee9e0bd61269fc4e95e5cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnouq|7{B978O6lPf+wIa#m9#>Unb zm^4K~wN3Zq+uP^LChjb$nl7n2<_r3R9 z>;2vP{d4xIXPtHS*?XV0pB<(7RtX=63I_lH;HxMrXafMizg@s77TVudF~?2ruRybX zrSS>?49^qTOELXBMzK&+QUEZ4jx6Q?fakd?3a@m(z>cy_V_5o)`(>pi{Uq)E=4IRu z(U?yVUW{I+q%WXxBqm}DD4c|2uia96zK3}9DJKy1lI-#1Gq`fg#W4V}n-gPL$rhA3 z+886VFt?N`>AtCFL8wkX++V`iaryl;VFG227Rp`A%+Pi5+Oy#I%$p(#uLu^@+!W z#T}R!)N=f(l_E{{Gb>!}9^JZL2Eq~3@MCFvs?~N@(#!_AT2NXPxMJ)16tVP?yC1sP zd;wazL0mUmm0b=62}w94A+$%!EmQO@t?v+f6ABq^(wCw7*jyqqpIu5(E=Cq-W$q=` zCcDj>7{gY7O;PDEZH}#pP zbnwjg#YWfiiJI(gcAD#IJ3jq&R=jj~EIE>d`970|t#oq`DbVGIbmF1~w16OZQ1p7} zJNs%MvBeCE%hKc<|2S5gt$uX{9R=W?SOLI;MhhSj#{r;KA_K=U|4TIwz#$)YdEz# zZ69^s0pXg{3jcdF2XA+QQjTS72UpKP4&-PNJ7U=MF6Ikr(gW~*6qgj}PW5z)cZTT_ zCHH>Wp$JLm!bo)heRYF*8VkfC1{zXC#ANV;z|8i?#h#?X56dRL{i9t@Ul&|&FkJ); ze)$)}!z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nFr2EQ3xs79!^sCldDJYE$m(qYv3q7>}1R7?iZW7>$~*%zKaC|=$N?M zE$>#+%T&MZC`dW1wUl6Z)JgxkeN920S>e@EK`q~>k| zuYcsgA>F%!@rFciD(>Iwzn8KT;2tb77bUPCmioh+rZBfIiM6f_P34cQ__o1GWqQp3 zVL~~pE5?qODf%iiQQ3f42YF@09tQ*$4v_EKUx;t1KCPCBtgqg@+Tn; zO)a0uky_%jm+WjNB?=~VyH>V#L!*=l*@OSMSVyt_UEH&NA=?V2stHPyKkVN!&jg<#cjros){#ji)dK%)We0 zL_478=HZ8-@xnwsKrWs8)x`MB;(Y`Cmu2c-&SH(vN-F(*e`l?c%+l$|y_AJJhcDGn zwLvN+bu;_sX|1AiePhx@u&%P$hf*xE+O=~D?_(_KGWQ!158YL-y9$*6mmPo;Rp*Dl5lm-mVM2i`h-M@nxv z590_tvMwPD_{l=b$iOm|+|S{D9&P%zeT$GgX6Akl-tfUF>tL@Ld!B&{pN39tH>3V> zqksMAYul+jb7UiouWVGPNsxX7Ueba+9|~dz?d*QM$ng0DZfO0`7fAy?2yMm|cnRzU zhZ&IcwgjH9cuU!w+VStYa{p*)4IgBf|E8)sqMYtB2KH_}SfsFq(c9i(Q6S3UBo%DI k*Kv;w;*%(i9W@fAqs5i2wiq diff --git a/client/js/images/ui-icons_888888_256x240.png b/client/js/images/ui-icons_888888_256x240.png deleted file mode 100644 index 5ba708c39172a69e069136bd1309c4322c61f571..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4369 zcmd^?`8yPD_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~GmI3`<(O3xvulR&VAkQJHZBho(m=l0{{SA7UpJl008iB z3RqU$@Wfh}nb?QCTyjovo2=)B^qQB=#XMCF_n=?1Jbh>5sptJM?}}{I zHzR=-V_TFXKM0P+&lrh3TPr)c<8EmLl3g~EY}W@od*0X6Ljv>L(67bjz58EDypsu&ddu2a@@x)`5aA^S^D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lH{X;+ONmr!LsJx(j*b2&WMpJ+s&cN;7Tyu8gf>RT2kOR+DBzZr7=m-v-UheM zgj$|(0HN;F)qrlz6$FyVsy6e02`M!$<1L&Bz z+b!=_(#ur8?I=h&thJP2c+^S%)lEi*8fSaPs>Or&i1kF^p9QX&8C;)E+S__7fCh{W zSpW930L|8eV$Pa=LO*oao@VWHUr>MSl`x%iydJaFA!rB6u0`Jo5337p0UZNmSb{=o z*%W(>6W|^!F&8DUAC~&Vo2D?gE{V0S3{B;atoXLUNo9J? z0AWHot1HHimnr%xGf~-qSOO6>z*MtHe(EIN3<7@k-U&gFD+Xq}Ua*o~(!1kApC zO+-7O=jP#uq4B~*JwPs<`_;tw%;J3m{g-9xU(RBU&q^x&eSc@Ik<8NR$i0+>JBKgT zPqjfRC3Q3V=4q|BVK-yVuyUMByvXqR1a4^k&=*MqJ_v2b7I+El z1&0}s^tJ?^uXsz@oZ9j4x^n+$X$>D_nE$4#I-;EJG6wc;Jy@i$hSA&JVNoE;;UpDo l!Q;r<<-MKrq~`aIaqoP9xRgPV&EKy+z~U_0tkM({{ePlYU?u)[^>]*|#([\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="
a",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>"!==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="
t
",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="
",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="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",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="
",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="",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="",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="",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&>(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=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},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>");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>")+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)?""!==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("