Created
March 27, 2013 19:47
-
-
Save tdhopper/5257425 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "metadata": { | |
| "name": "bokennotebook" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "collapsed": false, | |
| "input": "from bokeh.mpl import PlotClient\np = PlotClient(username='defaultuser', serverloc=\"http://portcon:5006\",userapikey=\"nokey\")\np.use_doc('example')\np.notebooksources()\n", | |
| "language": "python", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "output_type": "stream", | |
| "stream": "stdout", | |
| "text": "got read write apikey\n" | |
| }, | |
| { | |
| "html": "<div>\n \n <style>\n \n /* BEGIN /usr/lib64/python2.7/site-packages/bokeh/server/static/vendor/bokehjs/css/bokeh.css */\n svg {\n font: 12px sans-serif;\n margin: 0;\n}\n\n.ui-dialog-titlebar {\n height : 16px \n}\n\n.button_bar{\n width : 200px;\n overflow : hidden;\n}\n.button_bar > button{\n float : left;\n}\n\n.all_can_wrapper {position:relative; }\n.can_wrapper {position:absolute; }\n.main_ can_wrapper {}\n.main_can {}\n.x_can_wrapper { }\n.y_can_wrapper {}\n.y_can {}\n.shading {display:block; border:1px dashed green; position: absolute; z-index:100;}\n.gridplot_container {position: relative;}\n.gridplot_container .gp_plotwrapper { position:absolute; } \nbutton.active { border:1px solid blue }\n.table_wrap { }\n.table_wrap table { margin:5px; height:300px; display:block; overflow-y:scroll }\n/*\n .table_outer thead { fon t-size:15px; display:block; heig ht: 100px; overflow:auto; outline:1px solid green}\n\n .table_outer tbody { font -size:10px; display:table; height: 200px; overflow-y:scroll; outline:1px solid blue}\n .table_outer table td { border-left:1px solid black; border-right:1px solid black; }\n*/\n\n\n.plot_wrap .button_bar {height:30px}\n.plot_wrap .button_bar * {display:none}\n.plot_wrap:hover .button_bar * {display:inherit}\n\n.maximize {\n display : none;\n float : right;\n}\n\n.jsp:hover > .maximize{\n display : inline;\n float : right;\n vertical-align : top;\n}\n\n.plotclose {\n display : none;\n float : right;\n}\n\n.jsp:hover > .plotclose{\n display : inline;\n float : right;\n vertical-align : top;\n}\n\n.plottitle{\n height: 1em;\n border : none;\n resize : none;\n width : 200;\n overflow : hidden;\n}\n\n.plotsidebar{\n overflow-x : auto;\n width : 350;\n float : left;\n}\n\n.maxplot{\n float : left;\n}\n\n/* pandas */\n\n.bokehtable{ \n overflow : auto;\n}\n.pandassize{\n width : 40px;\n}\n.pandasoffset{\n width : 40px;\n}\n\n.hide{\n display : none; \n}\n.pandasicons {\n position:relative;\n top:5px;\n}\n.bokehdocheading{\n background-color : #ccc;\n}\n.bokehdoclabel{\n\n}\n.bokehdocheading:hover > .bokehdelete{\n display : none; \n float : right;\n}\n.bokehdelete{\n float : right;\n}\n.pandasgroup{\n width : auto;\n}\n.pandasagg{\n width : auto;\n}\n /* END /usr/lib64/python2.7/site-packages/bokeh/server/static/vendor/bokehjs/css/bokeh.css */\n \n /* BEGIN /usr/lib64/python2.7/site-packages/bokeh/server/static/vendor/bokehjs/css/continuum.css */\n .tableelem{\n padding-left : 10px;\n padding-right : 10px;\n padding-bottom : 2;\n padding-top : 2px;\n border-width : 2px;\n border-color : white;\n background-color : #E0E0E0; \n}\n.tableheader{\n background-color : #C0C0C0; \n}\n\n\n /* END /usr/lib64/python2.7/site-packages/bokeh/server/static/vendor/bokehjs/css/continuum.css */\n \n /* BEGIN /usr/lib64/python2.7/site-packages/bokeh/server/static/vendor/bokehjs/vendor/bootstrap/css/bootstrap.css */\n /*!\n * Bootstrap v2.2.2\n *\n * Copyright 2012 Twitter, Inc\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Designed and built with all the love in the world @twitter by @mdo and @fat.\n */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nnav,\nsection {\n display: block;\n}\n\naudio,\ncanvas,\nvideo {\n display: inline-block;\n *display: inline;\n *zoom: 1;\n}\n\naudio:not([controls]) {\n display: none;\n}\n\nhtml {\n font-size: 100%;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\n\na:focus {\n outline: thin dotted #333;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n\na:hover,\na:active {\n outline: 0;\n}\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nimg {\n width: auto\\9;\n height: auto;\n max-width: 100%;\n vertical-align: middle;\n border: 0;\n -ms-interpolation-mode: bicubic;\n}\n\n#map_canvas img,\n.google-maps img {\n max-width: none;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n margin: 0;\n font-size: 100%;\n vertical-align: middle;\n}\n\nbutton,\ninput {\n *overflow: visible;\n line-height: normal;\n}\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n padding: 0;\n border: 0;\n}\n\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n cursor: pointer;\n -webkit-appearance: button;\n}\n\nlabel,\nselect,\nbutton,\ninput[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"],\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n cursor: pointer;\n}\n\ninput[type=\"search\"] {\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n -webkit-appearance: textfield;\n}\n\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-cancel-button {\n -webkit-appearance: none;\n}\n\ntextarea {\n overflow: auto;\n vertical-align: top;\n}\n\n@media print {\n * {\n color: #000 !important;\n text-shadow: none !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n .ir a:after,\n a[href^=\"javascript:\"]:after,\n a[href^=\"#\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n @page {\n margin: 0.5cm;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n}\n\n.clearfix {\n *zoom: 1;\n}\n\n.clearfix:before,\n.clearfix:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.clearfix:after {\n clear: both;\n}\n\n.hide-text {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n\n.input-block-level {\n display: block;\n width: 100%;\n min-height: 30px;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\nbody {\n margin: 0;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 20px;\n color: #333333;\n background-color: #ffffff;\n}\n\na {\n color: #0088cc;\n text-decoration: none;\n}\n\na:hover {\n color: #005580;\n text-decoration: underline;\n}\n\n.img-rounded {\n -webkit-border-radius: 6px;\n -moz-border-radius: 6px;\n border-radius: 6px;\n}\n\n.img-polaroid {\n padding: 4px;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n.img-circle {\n -webkit-border-radius: 500px;\n -moz-border-radius: 500px;\n border-radius: 500px;\n}\n\n.row {\n margin-left: -20px;\n *zoom: 1;\n}\n\n.row:before,\n.row:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.row:after {\n clear: both;\n}\n\n[class*=\"span\"] {\n float: left;\n min-height: 1px;\n margin-left: 20px;\n}\n\n.container,\n.navbar-static-top .container,\n.navbar-fixed-top .container,\n.navbar-fixed-bottom .container {\n width: 940px;\n}\n\n.span12 {\n width: 940px;\n}\n\n.span11 {\n width: 860px;\n}\n\n.span10 {\n width: 780px;\n}\n\n.span9 {\n width: 700px;\n}\n\n.span8 {\n width: 620px;\n}\n\n.span7 {\n width: 540px;\n}\n\n.span6 {\n width: 460px;\n}\n\n.span5 {\n width: 380px;\n}\n\n.span4 {\n width: 300px;\n}\n\n.span3 {\n width: 220px;\n}\n\n.span2 {\n width: 140px;\n}\n\n.span1 {\n width: 60px;\n}\n\n.offset12 {\n margin-left: 980px;\n}\n\n.offset11 {\n margin-left: 900px;\n}\n\n.offset10 {\n margin-left: 820px;\n}\n\n.offset9 {\n margin-left: 740px;\n}\n\n.offset8 {\n margin-left: 660px;\n}\n\n.offset7 {\n margin-left: 580px;\n}\n\n.offset6 {\n margin-left: 500px;\n}\n\n.offset5 {\n margin-left: 420px;\n}\n\n.offset4 {\n margin-left: 340px;\n}\n\n.offset3 {\n margin-left: 260px;\n}\n\n.offset2 {\n margin-left: 180px;\n}\n\n.offset1 {\n margin-left: 100px;\n}\n\n.row-fluid {\n width: 100%;\n *zoom: 1;\n}\n\n.row-fluid:before,\n.row-fluid:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.row-fluid:after {\n clear: both;\n}\n\n.row-fluid [class*=\"span\"] {\n display: block;\n float: left;\n width: 100%;\n min-height: 30px;\n margin-left: 2.127659574468085%;\n *margin-left: 2.074468085106383%;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.row-fluid [class*=\"span\"]:first-child {\n margin-left: 0;\n}\n\n.row-fluid .controls-row [class*=\"span\"] + [class*=\"span\"] {\n margin-left: 2.127659574468085%;\n}\n\n.row-fluid .span12 {\n width: 100%;\n *width: 99.94680851063829%;\n}\n\n.row-fluid .span11 {\n width: 91.48936170212765%;\n *width: 91.43617021276594%;\n}\n\n.row-fluid .span10 {\n width: 82.97872340425532%;\n *width: 82.92553191489361%;\n}\n\n.row-fluid .span9 {\n width: 74.46808510638297%;\n *width: 74.41489361702126%;\n}\n\n.row-fluid .span8 {\n width: 65.95744680851064%;\n *width: 65.90425531914893%;\n}\n\n.row-fluid .span7 {\n width: 57.44680851063829%;\n *width: 57.39361702127659%;\n}\n\n.row-fluid .span6 {\n width: 48.93617021276595%;\n *width: 48.88297872340425%;\n}\n\n.row-fluid .span5 {\n width: 40.42553191489362%;\n *width: 40.37234042553192%;\n}\n\n.row-fluid .span4 {\n width: 31.914893617021278%;\n *width: 31.861702127659576%;\n}\n\n.row-fluid .span3 {\n width: 23.404255319148934%;\n *width: 23.351063829787233%;\n}\n\n.row-fluid .span2 {\n width: 14.893617021276595%;\n *width: 14.840425531914894%;\n}\n\n.row-fluid .span1 {\n width: 6.382978723404255%;\n *width: 6.329787234042553%;\n}\n\n.row-fluid .offset12 {\n margin-left: 104.25531914893617%;\n *margin-left: 104.14893617021275%;\n}\n\n.row-fluid .offset12:first-child {\n margin-left: 102.12765957446808%;\n *margin-left: 102.02127659574467%;\n}\n\n.row-fluid .offset11 {\n margin-left: 95.74468085106382%;\n *margin-left: 95.6382978723404%;\n}\n\n.row-fluid .offset11:first-child {\n margin-left: 93.61702127659574%;\n *margin-left: 93.51063829787232%;\n}\n\n.row-fluid .offset10 {\n margin-left: 87.23404255319149%;\n *margin-left: 87.12765957446807%;\n}\n\n.row-fluid .offset10:first-child {\n margin-left: 85.1063829787234%;\n *margin-left: 84.99999999999999%;\n}\n\n.row-fluid .offset9 {\n margin-left: 78.72340425531914%;\n *margin-left: 78.61702127659572%;\n}\n\n.row-fluid .offset9:first-child {\n margin-left: 76.59574468085106%;\n *margin-left: 76.48936170212764%;\n}\n\n.row-fluid .offset8 {\n margin-left: 70.2127659574468%;\n *margin-left: 70.10638297872339%;\n}\n\n.row-fluid .offset8:first-child {\n margin-left: 68.08510638297872%;\n *margin-left: 67.9787234042553%;\n}\n\n.row-fluid .offset7 {\n margin-left: 61.70212765957446%;\n *margin-left: 61.59574468085106%;\n}\n\n.row-fluid .offset7:first-child {\n margin-left: 59.574468085106375%;\n *margin-left: 59.46808510638297%;\n}\n\n.row-fluid .offset6 {\n margin-left: 53.191489361702125%;\n *margin-left: 53.085106382978715%;\n}\n\n.row-fluid .offset6:first-child {\n margin-left: 51.063829787234035%;\n *margin-left: 50.95744680851063%;\n}\n\n.row-fluid .offset5 {\n margin-left: 44.68085106382979%;\n *margin-left: 44.57446808510638%;\n}\n\n.row-fluid .offset5:first-child {\n margin-left: 42.5531914893617%;\n *margin-left: 42.4468085106383%;\n}\n\n.row-fluid .offset4 {\n margin-left: 36.170212765957444%;\n *margin-left: 36.06382978723405%;\n}\n\n.row-fluid .offset4:first-child {\n margin-left: 34.04255319148936%;\n *margin-left: 33.93617021276596%;\n}\n\n.row-fluid .offset3 {\n margin-left: 27.659574468085104%;\n *margin-left: 27.5531914893617%;\n}\n\n.row-fluid .offset3:first-child {\n margin-left: 25.53191489361702%;\n *margin-left: 25.425531914893618%;\n}\n\n.row-fluid .offset2 {\n margin-left: 19.148936170212764%;\n *margin-left: 19.04255319148936%;\n}\n\n.row-fluid .offset2:first-child {\n margin-left: 17.02127659574468%;\n *margin-left: 16.914893617021278%;\n}\n\n.row-fluid .offset1 {\n margin-left: 10.638297872340425%;\n *margin-left: 10.53191489361702%;\n}\n\n.row-fluid .offset1:first-child {\n margin-left: 8.51063829787234%;\n *margin-left: 8.404255319148938%;\n}\n\n[class*=\"span\"].hide,\n.row-fluid [class*=\"span\"].hide {\n display: none;\n}\n\n[class*=\"span\"].pull-right,\n.row-fluid [class*=\"span\"].pull-right {\n float: right;\n}\n\n.container {\n margin-right: auto;\n margin-left: auto;\n *zoom: 1;\n}\n\n.container:before,\n.container:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.container:after {\n clear: both;\n}\n\n.container-fluid {\n padding-right: 20px;\n padding-left: 20px;\n *zoom: 1;\n}\n\n.container-fluid:before,\n.container-fluid:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.container-fluid:after {\n clear: both;\n}\n\np {\n margin: 0 0 10px;\n}\n\n.lead {\n margin-bottom: 20px;\n font-size: 21px;\n font-weight: 200;\n line-height: 30px;\n}\n\nsmall {\n font-size: 85%;\n}\n\nstrong {\n font-weight: bold;\n}\n\nem {\n font-style: italic;\n}\n\ncite {\n font-style: normal;\n}\n\n.muted {\n color: #999999;\n}\n\na.muted:hover {\n color: #808080;\n}\n\n.text-warning {\n color: #c09853;\n}\n\na.text-warning:hover {\n color: #a47e3c;\n}\n\n.text-error {\n color: #b94a48;\n}\n\na.text-error:hover {\n color: #953b39;\n}\n\n.text-info {\n color: #3a87ad;\n}\n\na.text-info:hover {\n color: #2d6987;\n}\n\n.text-success {\n color: #468847;\n}\n\na.text-success:hover {\n color: #356635;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n margin: 10px 0;\n font-family: inherit;\n font-weight: bold;\n line-height: 20px;\n color: inherit;\n text-rendering: optimizelegibility;\n}\n\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small {\n font-weight: normal;\n line-height: 1;\n color: #999999;\n}\n\nh1,\nh2,\nh3 {\n line-height: 40px;\n}\n\nh1 {\n font-size: 38.5px;\n}\n\nh2 {\n font-size: 31.5px;\n}\n\nh3 {\n font-size: 24.5px;\n}\n\nh4 {\n font-size: 17.5px;\n}\n\nh5 {\n font-size: 14px;\n}\n\nh6 {\n font-size: 11.9px;\n}\n\nh1 small {\n font-size: 24.5px;\n}\n\nh2 small {\n font-size: 17.5px;\n}\n\nh3 small {\n font-size: 14px;\n}\n\nh4 small {\n font-size: 14px;\n}\n\n.page-header {\n padding-bottom: 9px;\n margin: 20px 0 30px;\n border-bottom: 1px solid #eeeeee;\n}\n\nul,\nol {\n padding: 0;\n margin: 0 0 10px 25px;\n}\n\nul ul,\nul ol,\nol ol,\nol ul {\n margin-bottom: 0;\n}\n\nli {\n line-height: 20px;\n}\n\nul.unstyled,\nol.unstyled {\n margin-left: 0;\n list-style: none;\n}\n\nul.inline,\nol.inline {\n margin-left: 0;\n list-style: none;\n}\n\nul.inline > li,\nol.inline > li {\n display: inline-block;\n padding-right: 5px;\n padding-left: 5px;\n}\n\ndl {\n margin-bottom: 20px;\n}\n\ndt,\ndd {\n line-height: 20px;\n}\n\ndt {\n font-weight: bold;\n}\n\ndd {\n margin-left: 10px;\n}\n\n.dl-horizontal {\n *zoom: 1;\n}\n\n.dl-horizontal:before,\n.dl-horizontal:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.dl-horizontal:after {\n clear: both;\n}\n\n.dl-horizontal dt {\n float: left;\n width: 160px;\n overflow: hidden;\n clear: left;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.dl-horizontal dd {\n margin-left: 180px;\n}\n\nhr {\n margin: 20px 0;\n border: 0;\n border-top: 1px solid #eeeeee;\n border-bottom: 1px solid #ffffff;\n}\n\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #999999;\n}\n\nabbr.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\n\nblockquote {\n padding: 0 0 0 15px;\n margin: 0 0 20px;\n border-left: 5px solid #eeeeee;\n}\n\nblockquote p {\n margin-bottom: 0;\n font-size: 16px;\n font-weight: 300;\n line-height: 25px;\n}\n\nblockquote small {\n display: block;\n line-height: 20px;\n color: #999999;\n}\n\nblockquote small:before {\n content: '\\2014 \\00A0';\n}\n\nblockquote.pull-right {\n float: right;\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n}\n\nblockquote.pull-right p,\nblockquote.pull-right small {\n text-align: right;\n}\n\nblockquote.pull-right small:before {\n content: '';\n}\n\nblockquote.pull-right small:after {\n content: '\\00A0 \\2014';\n}\n\nq:before,\nq:after,\nblockquote:before,\nblockquote:after {\n content: \"\";\n}\n\naddress {\n display: block;\n margin-bottom: 20px;\n font-style: normal;\n line-height: 20px;\n}\n\ncode,\npre {\n padding: 0 3px 2px;\n font-family: Monaco, Menlo, Consolas, \"Courier New\", monospace;\n font-size: 12px;\n color: #333333;\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n\ncode {\n padding: 2px 4px;\n color: #d14;\n white-space: nowrap;\n background-color: #f7f7f9;\n border: 1px solid #e1e1e8;\n}\n\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 20px;\n word-break: break-all;\n word-wrap: break-word;\n white-space: pre;\n white-space: pre-wrap;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n}\n\npre.prettyprint {\n margin-bottom: 20px;\n}\n\npre code {\n padding: 0;\n color: inherit;\n white-space: pre;\n white-space: pre-wrap;\n background-color: transparent;\n border: 0;\n}\n\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n\nform {\n margin: 0 0 20px;\n}\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: 40px;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\n\nlegend small {\n font-size: 15px;\n color: #999999;\n}\n\nlabel,\ninput,\nbutton,\nselect,\ntextarea {\n font-size: 14px;\n font-weight: normal;\n line-height: 20px;\n}\n\ninput,\nbutton,\nselect,\ntextarea {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n}\n\nlabel {\n display: block;\n margin-bottom: 5px;\n}\n\nselect,\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"],\n.uneditable-input {\n display: inline-block;\n height: 20px;\n padding: 4px 6px;\n margin-bottom: 10px;\n font-size: 14px;\n line-height: 20px;\n color: #555555;\n vertical-align: middle;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n}\n\ninput,\ntextarea,\n.uneditable-input {\n width: 206px;\n}\n\ntextarea {\n height: auto;\n}\n\ntextarea,\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"datetime\"],\ninput[type=\"datetime-local\"],\ninput[type=\"date\"],\ninput[type=\"month\"],\ninput[type=\"time\"],\ninput[type=\"week\"],\ninput[type=\"number\"],\ninput[type=\"email\"],\ninput[type=\"url\"],\ninput[type=\"search\"],\ninput[type=\"tel\"],\ninput[type=\"color\"],\n.uneditable-input {\n background-color: #ffffff;\n border: 1px solid #cccccc;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;\n -moz-transition: border linear 0.2s, box-shadow linear 0.2s;\n -o-transition: border linear 0.2s, box-shadow linear 0.2s;\n transition: border linear 0.2s, box-shadow linear 0.2s;\n}\n\ntextarea:focus,\ninput[type=\"text\"]:focus,\ninput[type=\"password\"]:focus,\ninput[type=\"datetime\"]:focus,\ninput[type=\"datetime-local\"]:focus,\ninput[type=\"date\"]:focus,\ninput[type=\"month\"]:focus,\ninput[type=\"time\"]:focus,\ninput[type=\"week\"]:focus,\ninput[type=\"number\"]:focus,\ninput[type=\"email\"]:focus,\ninput[type=\"url\"]:focus,\ninput[type=\"search\"]:focus,\ninput[type=\"tel\"]:focus,\ninput[type=\"color\"]:focus,\n.uneditable-input:focus {\n border-color: rgba(82, 168, 236, 0.8);\n outline: 0;\n outline: thin dotted \\9;\n /* IE6-9 */\n\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);\n}\n\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n *margin-top: 0;\n line-height: normal;\n}\n\ninput[type=\"file\"],\ninput[type=\"image\"],\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"],\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n width: auto;\n}\n\nselect,\ninput[type=\"file\"] {\n height: 30px;\n /* In IE7, the height of the select element cannot be changed by height, only font-size */\n\n *margin-top: 4px;\n /* For IE7, add top margin to align select with labels */\n\n line-height: 30px;\n}\n\nselect {\n width: 220px;\n background-color: #ffffff;\n border: 1px solid #cccccc;\n}\n\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\nselect:focus,\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: thin dotted #333;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n\n.uneditable-input,\n.uneditable-textarea {\n color: #999999;\n cursor: not-allowed;\n background-color: #fcfcfc;\n border-color: #cccccc;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\n -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);\n}\n\n.uneditable-input {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.uneditable-textarea {\n width: auto;\n height: auto;\n}\n\ninput:-moz-placeholder,\ntextarea:-moz-placeholder {\n color: #999999;\n}\n\ninput:-ms-input-placeholder,\ntextarea:-ms-input-placeholder {\n color: #999999;\n}\n\ninput::-webkit-input-placeholder,\ntextarea::-webkit-input-placeholder {\n color: #999999;\n}\n\n.radio,\n.checkbox {\n min-height: 20px;\n padding-left: 20px;\n}\n\n.radio input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"] {\n float: left;\n margin-left: -20px;\n}\n\n.controls > .radio:first-child,\n.controls > .checkbox:first-child {\n padding-top: 5px;\n}\n\n.radio.inline,\n.checkbox.inline {\n display: inline-block;\n padding-top: 5px;\n margin-bottom: 0;\n vertical-align: middle;\n}\n\n.radio.inline + .radio.inline,\n.checkbox.inline + .checkbox.inline {\n margin-left: 10px;\n}\n\n.input-mini {\n width: 60px;\n}\n\n.input-small {\n width: 90px;\n}\n\n.input-medium {\n width: 150px;\n}\n\n.input-large {\n width: 210px;\n}\n\n.input-xlarge {\n width: 270px;\n}\n\n.input-xxlarge {\n width: 530px;\n}\n\ninput[class*=\"span\"],\nselect[class*=\"span\"],\ntextarea[class*=\"span\"],\n.uneditable-input[class*=\"span\"],\n.row-fluid input[class*=\"span\"],\n.row-fluid select[class*=\"span\"],\n.row-fluid textarea[class*=\"span\"],\n.row-fluid .uneditable-input[class*=\"span\"] {\n float: none;\n margin-left: 0;\n}\n\n.input-append input[class*=\"span\"],\n.input-append .uneditable-input[class*=\"span\"],\n.input-prepend input[class*=\"span\"],\n.input-prepend .uneditable-input[class*=\"span\"],\n.row-fluid input[class*=\"span\"],\n.row-fluid select[class*=\"span\"],\n.row-fluid textarea[class*=\"span\"],\n.row-fluid .uneditable-input[class*=\"span\"],\n.row-fluid .input-prepend [class*=\"span\"],\n.row-fluid .input-append [class*=\"span\"] {\n display: inline-block;\n}\n\ninput,\ntextarea,\n.uneditable-input {\n margin-left: 0;\n}\n\n.controls-row [class*=\"span\"] + [class*=\"span\"] {\n margin-left: 20px;\n}\n\ninput.span12,\ntextarea.span12,\n.uneditable-input.span12 {\n width: 926px;\n}\n\ninput.span11,\ntextarea.span11,\n.uneditable-input.span11 {\n width: 846px;\n}\n\ninput.span10,\ntextarea.span10,\n.uneditable-input.span10 {\n width: 766px;\n}\n\ninput.span9,\ntextarea.span9,\n.uneditable-input.span9 {\n width: 686px;\n}\n\ninput.span8,\ntextarea.span8,\n.uneditable-input.span8 {\n width: 606px;\n}\n\ninput.span7,\ntextarea.span7,\n.uneditable-input.span7 {\n width: 526px;\n}\n\ninput.span6,\ntextarea.span6,\n.uneditable-input.span6 {\n width: 446px;\n}\n\ninput.span5,\ntextarea.span5,\n.uneditable-input.span5 {\n width: 366px;\n}\n\ninput.span4,\ntextarea.span4,\n.uneditable-input.span4 {\n width: 286px;\n}\n\ninput.span3,\ntextarea.span3,\n.uneditable-input.span3 {\n width: 206px;\n}\n\ninput.span2,\ntextarea.span2,\n.uneditable-input.span2 {\n width: 126px;\n}\n\ninput.span1,\ntextarea.span1,\n.uneditable-input.span1 {\n width: 46px;\n}\n\n.controls-row {\n *zoom: 1;\n}\n\n.controls-row:before,\n.controls-row:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.controls-row:after {\n clear: both;\n}\n\n.controls-row [class*=\"span\"],\n.row-fluid .controls-row [class*=\"span\"] {\n float: left;\n}\n\n.controls-row .checkbox[class*=\"span\"],\n.controls-row .radio[class*=\"span\"] {\n padding-top: 5px;\n}\n\ninput[disabled],\nselect[disabled],\ntextarea[disabled],\ninput[readonly],\nselect[readonly],\ntextarea[readonly] {\n cursor: not-allowed;\n background-color: #eeeeee;\n}\n\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"][readonly],\ninput[type=\"checkbox\"][readonly] {\n background-color: transparent;\n}\n\n.control-group.warning .control-label,\n.control-group.warning .help-block,\n.control-group.warning .help-inline {\n color: #c09853;\n}\n\n.control-group.warning .checkbox,\n.control-group.warning .radio,\n.control-group.warning input,\n.control-group.warning select,\n.control-group.warning textarea {\n color: #c09853;\n}\n\n.control-group.warning input,\n.control-group.warning select,\n.control-group.warning textarea {\n border-color: #c09853;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.control-group.warning input:focus,\n.control-group.warning select:focus,\n.control-group.warning textarea:focus {\n border-color: #a47e3c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;\n}\n\n.control-group.warning .input-prepend .add-on,\n.control-group.warning .input-append .add-on {\n color: #c09853;\n background-color: #fcf8e3;\n border-color: #c09853;\n}\n\n.control-group.error .control-label,\n.control-group.error .help-block,\n.control-group.error .help-inline {\n color: #b94a48;\n}\n\n.control-group.error .checkbox,\n.control-group.error .radio,\n.control-group.error input,\n.control-group.error select,\n.control-group.error textarea {\n color: #b94a48;\n}\n\n.control-group.error input,\n.control-group.error select,\n.control-group.error textarea {\n border-color: #b94a48;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.control-group.error input:focus,\n.control-group.error select:focus,\n.control-group.error textarea:focus {\n border-color: #953b39;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;\n}\n\n.control-group.error .input-prepend .add-on,\n.control-group.error .input-append .add-on {\n color: #b94a48;\n background-color: #f2dede;\n border-color: #b94a48;\n}\n\n.control-group.success .control-label,\n.control-group.success .help-block,\n.control-group.success .help-inline {\n color: #468847;\n}\n\n.control-group.success .checkbox,\n.control-group.success .radio,\n.control-group.success input,\n.control-group.success select,\n.control-group.success textarea {\n color: #468847;\n}\n\n.control-group.success input,\n.control-group.success select,\n.control-group.success textarea {\n border-color: #468847;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.control-group.success input:focus,\n.control-group.success select:focus,\n.control-group.success textarea:focus {\n border-color: #356635;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;\n}\n\n.control-group.success .input-prepend .add-on,\n.control-group.success .input-append .add-on {\n color: #468847;\n background-color: #dff0d8;\n border-color: #468847;\n}\n\n.control-group.info .control-label,\n.control-group.info .help-block,\n.control-group.info .help-inline {\n color: #3a87ad;\n}\n\n.control-group.info .checkbox,\n.control-group.info .radio,\n.control-group.info input,\n.control-group.info select,\n.control-group.info textarea {\n color: #3a87ad;\n}\n\n.control-group.info input,\n.control-group.info select,\n.control-group.info textarea {\n border-color: #3a87ad;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.control-group.info input:focus,\n.control-group.info select:focus,\n.control-group.info textarea:focus {\n border-color: #2d6987;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;\n}\n\n.control-group.info .input-prepend .add-on,\n.control-group.info .input-append .add-on {\n color: #3a87ad;\n background-color: #d9edf7;\n border-color: #3a87ad;\n}\n\ninput:focus:invalid,\ntextarea:focus:invalid,\nselect:focus:invalid {\n color: #b94a48;\n border-color: #ee5f5b;\n}\n\ninput:focus:invalid:focus,\ntextarea:focus:invalid:focus,\nselect:focus:invalid:focus {\n border-color: #e9322d;\n -webkit-box-shadow: 0 0 6px #f8b9b7;\n -moz-box-shadow: 0 0 6px #f8b9b7;\n box-shadow: 0 0 6px #f8b9b7;\n}\n\n.form-actions {\n padding: 19px 20px 20px;\n margin-top: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-top: 1px solid #e5e5e5;\n *zoom: 1;\n}\n\n.form-actions:before,\n.form-actions:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.form-actions:after {\n clear: both;\n}\n\n.help-block,\n.help-inline {\n color: #595959;\n}\n\n.help-block {\n display: block;\n margin-bottom: 10px;\n}\n\n.help-inline {\n display: inline-block;\n *display: inline;\n padding-left: 5px;\n vertical-align: middle;\n *zoom: 1;\n}\n\n.input-append,\n.input-prepend {\n margin-bottom: 5px;\n font-size: 0;\n white-space: nowrap;\n}\n\n.input-append input,\n.input-prepend input,\n.input-append select,\n.input-prepend select,\n.input-append .uneditable-input,\n.input-prepend .uneditable-input,\n.input-append .dropdown-menu,\n.input-prepend .dropdown-menu {\n font-size: 14px;\n}\n\n.input-append input,\n.input-prepend input,\n.input-append select,\n.input-prepend select,\n.input-append .uneditable-input,\n.input-prepend .uneditable-input {\n position: relative;\n margin-bottom: 0;\n *margin-left: 0;\n vertical-align: top;\n -webkit-border-radius: 0 4px 4px 0;\n -moz-border-radius: 0 4px 4px 0;\n border-radius: 0 4px 4px 0;\n}\n\n.input-append input:focus,\n.input-prepend input:focus,\n.input-append select:focus,\n.input-prepend select:focus,\n.input-append .uneditable-input:focus,\n.input-prepend .uneditable-input:focus {\n z-index: 2;\n}\n\n.input-append .add-on,\n.input-prepend .add-on {\n display: inline-block;\n width: auto;\n height: 20px;\n min-width: 16px;\n padding: 4px 5px;\n font-size: 14px;\n font-weight: normal;\n line-height: 20px;\n text-align: center;\n text-shadow: 0 1px 0 #ffffff;\n background-color: #eeeeee;\n border: 1px solid #ccc;\n}\n\n.input-append .add-on,\n.input-prepend .add-on,\n.input-append .btn,\n.input-prepend .btn,\n.input-append .btn-group > .dropdown-toggle,\n.input-prepend .btn-group > .dropdown-toggle {\n vertical-align: top;\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.input-append .active,\n.input-prepend .active {\n background-color: #a9dba9;\n border-color: #46a546;\n}\n\n.input-prepend .add-on,\n.input-prepend .btn {\n margin-right: -1px;\n}\n\n.input-prepend .add-on:first-child,\n.input-prepend .btn:first-child {\n -webkit-border-radius: 4px 0 0 4px;\n -moz-border-radius: 4px 0 0 4px;\n border-radius: 4px 0 0 4px;\n}\n\n.input-append input,\n.input-append select,\n.input-append .uneditable-input {\n -webkit-border-radius: 4px 0 0 4px;\n -moz-border-radius: 4px 0 0 4px;\n border-radius: 4px 0 0 4px;\n}\n\n.input-append input + .btn-group .btn:last-child,\n.input-append select + .btn-group .btn:last-child,\n.input-append .uneditable-input + .btn-group .btn:last-child {\n -webkit-border-radius: 0 4px 4px 0;\n -moz-border-radius: 0 4px 4px 0;\n border-radius: 0 4px 4px 0;\n}\n\n.input-append .add-on,\n.input-append .btn,\n.input-append .btn-group {\n margin-left: -1px;\n}\n\n.input-append .add-on:last-child,\n.input-append .btn:last-child,\n.input-append .btn-group:last-child > .dropdown-toggle {\n -webkit-border-radius: 0 4px 4px 0;\n -moz-border-radius: 0 4px 4px 0;\n border-radius: 0 4px 4px 0;\n}\n\n.input-prepend.input-append input,\n.input-prepend.input-append select,\n.input-prepend.input-append .uneditable-input {\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.input-prepend.input-append input + .btn-group .btn,\n.input-prepend.input-append select + .btn-group .btn,\n.input-prepend.input-append .uneditable-input + .btn-group .btn {\n -webkit-border-radius: 0 4px 4px 0;\n -moz-border-radius: 0 4px 4px 0;\n border-radius: 0 4px 4px 0;\n}\n\n.input-prepend.input-append .add-on:first-child,\n.input-prepend.input-append .btn:first-child {\n margin-right: -1px;\n -webkit-border-radius: 4px 0 0 4px;\n -moz-border-radius: 4px 0 0 4px;\n border-radius: 4px 0 0 4px;\n}\n\n.input-prepend.input-append .add-on:last-child,\n.input-prepend.input-append .btn:last-child {\n margin-left: -1px;\n -webkit-border-radius: 0 4px 4px 0;\n -moz-border-radius: 0 4px 4px 0;\n border-radius: 0 4px 4px 0;\n}\n\n.input-prepend.input-append .btn-group:first-child {\n margin-left: 0;\n}\n\ninput.search-query {\n padding-right: 14px;\n padding-right: 4px \\9;\n padding-left: 14px;\n padding-left: 4px \\9;\n /* IE7-8 doesn't have border-radius, so don't indent the padding */\n\n margin-bottom: 0;\n -webkit-border-radius: 15px;\n -moz-border-radius: 15px;\n border-radius: 15px;\n}\n\n/* Allow for input prepend/append in search forms */\n\n.form-search .input-append .search-query,\n.form-search .input-prepend .search-query {\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.form-search .input-append .search-query {\n -webkit-border-radius: 14px 0 0 14px;\n -moz-border-radius: 14px 0 0 14px;\n border-radius: 14px 0 0 14px;\n}\n\n.form-search .input-append .btn {\n -webkit-border-radius: 0 14px 14px 0;\n -moz-border-radius: 0 14px 14px 0;\n border-radius: 0 14px 14px 0;\n}\n\n.form-search .input-prepend .search-query {\n -webkit-border-radius: 0 14px 14px 0;\n -moz-border-radius: 0 14px 14px 0;\n border-radius: 0 14px 14px 0;\n}\n\n.form-search .input-prepend .btn {\n -webkit-border-radius: 14px 0 0 14px;\n -moz-border-radius: 14px 0 0 14px;\n border-radius: 14px 0 0 14px;\n}\n\n.form-search input,\n.form-inline input,\n.form-horizontal input,\n.form-search textarea,\n.form-inline textarea,\n.form-horizontal textarea,\n.form-search select,\n.form-inline select,\n.form-horizontal select,\n.form-search .help-inline,\n.form-inline .help-inline,\n.form-horizontal .help-inline,\n.form-search .uneditable-input,\n.form-inline .uneditable-input,\n.form-horizontal .uneditable-input,\n.form-search .input-prepend,\n.form-inline .input-prepend,\n.form-horizontal .input-prepend,\n.form-search .input-append,\n.form-inline .input-append,\n.form-horizontal .input-append {\n display: inline-block;\n *display: inline;\n margin-bottom: 0;\n vertical-align: middle;\n *zoom: 1;\n}\n\n.form-search .hide,\n.form-inline .hide,\n.form-horizontal .hide {\n display: none;\n}\n\n.form-search label,\n.form-inline label,\n.form-search .btn-group,\n.form-inline .btn-group {\n display: inline-block;\n}\n\n.form-search .input-append,\n.form-inline .input-append,\n.form-search .input-prepend,\n.form-inline .input-prepend {\n margin-bottom: 0;\n}\n\n.form-search .radio,\n.form-search .checkbox,\n.form-inline .radio,\n.form-inline .checkbox {\n padding-left: 0;\n margin-bottom: 0;\n vertical-align: middle;\n}\n\n.form-search .radio input[type=\"radio\"],\n.form-search .checkbox input[type=\"checkbox\"],\n.form-inline .radio input[type=\"radio\"],\n.form-inline .checkbox input[type=\"checkbox\"] {\n float: left;\n margin-right: 3px;\n margin-left: 0;\n}\n\n.control-group {\n margin-bottom: 10px;\n}\n\nlegend + .control-group {\n margin-top: 20px;\n -webkit-margin-top-collapse: separate;\n}\n\n.form-horizontal .control-group {\n margin-bottom: 20px;\n *zoom: 1;\n}\n\n.form-horizontal .control-group:before,\n.form-horizontal .control-group:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.form-horizontal .control-group:after {\n clear: both;\n}\n\n.form-horizontal .control-label {\n float: left;\n width: 160px;\n padding-top: 5px;\n text-align: right;\n}\n\n.form-horizontal .controls {\n *display: inline-block;\n *padding-left: 20px;\n margin-left: 180px;\n *margin-left: 0;\n}\n\n.form-horizontal .controls:first-child {\n *padding-left: 180px;\n}\n\n.form-horizontal .help-block {\n margin-bottom: 0;\n}\n\n.form-horizontal input + .help-block,\n.form-horizontal select + .help-block,\n.form-horizontal textarea + .help-block,\n.form-horizontal .uneditable-input + .help-block,\n.form-horizontal .input-prepend + .help-block,\n.form-horizontal .input-append + .help-block {\n margin-top: 10px;\n}\n\n.form-horizontal .form-actions {\n padding-left: 180px;\n}\n\ntable {\n max-width: 100%;\n background-color: transparent;\n border-collapse: collapse;\n border-spacing: 0;\n}\n\n.table {\n width: 100%;\n margin-bottom: 20px;\n}\n\n.table th,\n.table td {\n padding: 8px;\n line-height: 20px;\n text-align: left;\n vertical-align: top;\n border-top: 1px solid #dddddd;\n}\n\n.table th {\n font-weight: bold;\n}\n\n.table thead th {\n vertical-align: bottom;\n}\n\n.table caption + thead tr:first-child th,\n.table caption + thead tr:first-child td,\n.table colgroup + thead tr:first-child th,\n.table colgroup + thead tr:first-child td,\n.table thead:first-child tr:first-child th,\n.table thead:first-child tr:first-child td {\n border-top: 0;\n}\n\n.table tbody + tbody {\n border-top: 2px solid #dddddd;\n}\n\n.table .table {\n background-color: #ffffff;\n}\n\n.table-condensed th,\n.table-condensed td {\n padding: 4px 5px;\n}\n\n.table-bordered {\n border: 1px solid #dddddd;\n border-collapse: separate;\n *border-collapse: collapse;\n border-left: 0;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n}\n\n.table-bordered th,\n.table-bordered td {\n border-left: 1px solid #dddddd;\n}\n\n.table-bordered caption + thead tr:first-child th,\n.table-bordered caption + tbody tr:first-child th,\n.table-bordered caption + tbody tr:first-child td,\n.table-bordered colgroup + thead tr:first-child th,\n.table-bordered colgroup + tbody tr:first-child th,\n.table-bordered colgroup + tbody tr:first-child td,\n.table-bordered thead:first-child tr:first-child th,\n.table-bordered tbody:first-child tr:first-child th,\n.table-bordered tbody:first-child tr:first-child td {\n border-top: 0;\n}\n\n.table-bordered thead:first-child tr:first-child > th:first-child,\n.table-bordered tbody:first-child tr:first-child > td:first-child {\n -webkit-border-top-left-radius: 4px;\n border-top-left-radius: 4px;\n -moz-border-radius-topleft: 4px;\n}\n\n.table-bordered thead:first-child tr:first-child > th:last-child,\n.table-bordered tbody:first-child tr:first-child > td:last-child {\n -webkit-border-top-right-radius: 4px;\n border-top-right-radius: 4px;\n -moz-border-radius-topright: 4px;\n}\n\n.table-bordered thead:last-child tr:last-child > th:first-child,\n.table-bordered tbody:last-child tr:last-child > td:first-child,\n.table-bordered tfoot:last-child tr:last-child > td:first-child {\n -webkit-border-bottom-left-radius: 4px;\n border-bottom-left-radius: 4px;\n -moz-border-radius-bottomleft: 4px;\n}\n\n.table-bordered thead:last-child tr:last-child > th:last-child,\n.table-bordered tbody:last-child tr:last-child > td:last-child,\n.table-bordered tfoot:last-child tr:last-child > td:last-child {\n -webkit-border-bottom-right-radius: 4px;\n border-bottom-right-radius: 4px;\n -moz-border-radius-bottomright: 4px;\n}\n\n.table-bordered tfoot + tbody:last-child tr:last-child td:first-child {\n -webkit-border-bottom-left-radius: 0;\n border-bottom-left-radius: 0;\n -moz-border-radius-bottomleft: 0;\n}\n\n.table-bordered tfoot + tbody:last-child tr:last-child td:last-child {\n -webkit-border-bottom-right-radius: 0;\n border-bottom-right-radius: 0;\n -moz-border-radius-bottomright: 0;\n}\n\n.table-bordered caption + thead tr:first-child th:first-child,\n.table-bordered caption + tbody tr:first-child td:first-child,\n.table-bordered colgroup + thead tr:first-child th:first-child,\n.table-bordered colgroup + tbody tr:first-child td:first-child {\n -webkit-border-top-left-radius: 4px;\n border-top-left-radius: 4px;\n -moz-border-radius-topleft: 4px;\n}\n\n.table-bordered caption + thead tr:first-child th:last-child,\n.table-bordered caption + tbody tr:first-child td:last-child,\n.table-bordered colgroup + thead tr:first-child th:last-child,\n.table-bordered colgroup + tbody tr:first-child td:last-child {\n -webkit-border-top-right-radius: 4px;\n border-top-right-radius: 4px;\n -moz-border-radius-topright: 4px;\n}\n\n.table-striped tbody > tr:nth-child(odd) > td,\n.table-striped tbody > tr:nth-child(odd) > th {\n background-color: #f9f9f9;\n}\n\n.table-hover tbody tr:hover td,\n.table-hover tbody tr:hover th {\n background-color: #f5f5f5;\n}\n\ntable td[class*=\"span\"],\ntable th[class*=\"span\"],\n.row-fluid table td[class*=\"span\"],\n.row-fluid table th[class*=\"span\"] {\n display: table-cell;\n float: none;\n margin-left: 0;\n}\n\n.table td.span1,\n.table th.span1 {\n float: none;\n width: 44px;\n margin-left: 0;\n}\n\n.table td.span2,\n.table th.span2 {\n float: none;\n width: 124px;\n margin-left: 0;\n}\n\n.table td.span3,\n.table th.span3 {\n float: none;\n width: 204px;\n margin-left: 0;\n}\n\n.table td.span4,\n.table th.span4 {\n float: none;\n width: 284px;\n margin-left: 0;\n}\n\n.table td.span5,\n.table th.span5 {\n float: none;\n width: 364px;\n margin-left: 0;\n}\n\n.table td.span6,\n.table th.span6 {\n float: none;\n width: 444px;\n margin-left: 0;\n}\n\n.table td.span7,\n.table th.span7 {\n float: none;\n width: 524px;\n margin-left: 0;\n}\n\n.table td.span8,\n.table th.span8 {\n float: none;\n width: 604px;\n margin-left: 0;\n}\n\n.table td.span9,\n.table th.span9 {\n float: none;\n width: 684px;\n margin-left: 0;\n}\n\n.table td.span10,\n.table th.span10 {\n float: none;\n width: 764px;\n margin-left: 0;\n}\n\n.table td.span11,\n.table th.span11 {\n float: none;\n width: 844px;\n margin-left: 0;\n}\n\n.table td.span12,\n.table th.span12 {\n float: none;\n width: 924px;\n margin-left: 0;\n}\n\n.table tbody tr.success td {\n background-color: #dff0d8;\n}\n\n.table tbody tr.error td {\n background-color: #f2dede;\n}\n\n.table tbody tr.warning td {\n background-color: #fcf8e3;\n}\n\n.table tbody tr.info td {\n background-color: #d9edf7;\n}\n\n.table-hover tbody tr.success:hover td {\n background-color: #d0e9c6;\n}\n\n.table-hover tbody tr.error:hover td {\n background-color: #ebcccc;\n}\n\n.table-hover tbody tr.warning:hover td {\n background-color: #faf2cc;\n}\n\n.table-hover tbody tr.info:hover td {\n background-color: #c4e3f3;\n}\n[class^=\"icon-\"],\n[class*=\" icon-\"] {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-top: 1px;\n *margin-right: .3em;\n line-height: 14px;\n vertical-align: text-top;\n background-position: 14px 14px;\n background-repeat: no-repeat;\n background-image : url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdUAAACfCAQAAAAFBIvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/dpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjY1RTYzOTA2ODZDRjExREJBNkUyRDg4N0NFQUNCNDA3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkZGMjM5QjMzN0VCMTExRTE4MTlBQjZENkFGQkE4NDFGIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkZGMjM5QjMyN0VCMTExRTE4MTlBQjZENkFGQkE4NDFGIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzUgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RkM3RjExNzQwNzIwNjgxMTg4QzZCNDlBQkI4MTk1Q0EiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDM4MDExNzQw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\");\n}\n\n/* White icons with optional class, or on hover/active states of certain elements */\n\n.icon-white,\n.nav-pills > .active > a > [class^=\"icon-\"],\n.nav-pills > .active > a > [class*=\" icon-\"],\n.nav-list > .active > a > [class^=\"icon-\"],\n.nav-list > .active > a > [class*=\" icon-\"],\n.navbar-inverse .nav > .active > a > [class^=\"icon-\"],\n.navbar-inverse .nav > .active > a > [class*=\" icon-\"],\n.dropdown-menu > li > a:hover > [class^=\"icon-\"],\n.dropdown-menu > li > a:hover > [class*=\" icon-\"],\n.dropdown-menu > .active > a > [class^=\"icon-\"],\n.dropdown-menu > .active > a > [class*=\" icon-\"],\n.dropdown-submenu:hover > a > [class^=\"icon-\"],\n.dropdown-submenu:hover > a > [class*=\" icon-\"] {\n background-image : url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdUAAACfCAQAAAAFBIvCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/dpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjY1RTYzOTA2ODZDRjExREJBNkUyRDg4N0NFQUNCNDA3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkZGMjM5QjMzN0VCMTExRTE4MTlBQjZENkFGQkE4NDFGIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkZGMjM5QjMyN0VCMTExRTE4MTlBQjZENkFGQkE4NDFGIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzUgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RkM3RjExNzQwNzIwNjgxMTg4QzZCNDlBQkI4MTk1Q0EiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDM4MDExNzQwNzIwNjgxMThDMTRBNDlEMDJBQzk3NTUiLz4gPGRjOnRpdGxlPiA8cmRmOkFsdD4gPHJkZjpsaSB4bWw6bGFuZz0ieC1kZWZhdWx0Ij5nbHlwaGljb25zX3NtYWxsX2Rhcms8L3JkZjpsaT4gPC9yZGY6QWx0PiA8L2RjOnRpdGxlPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjUYa9IAADGhSURBVHja7X1vbFxFtqdXsrReyXqORCR8Xxx3J/5Dd+z+Rzse4zS2weTPPOMxy8bJBpx1mMSzjDZDgsgAIoHAIMbS5kUOyrwwCiI9GfGA9yzhtwoT7/vABJIFZjNv0gkwoGCNEgjg/fTsuPW+7Jfac2519b3dvrfqVKc7MUudq8Rt+3fr1q17flWnznX9qqrKmDFjS86sOmvOYvYx5/wwk/tR4ZEhFjhkTWAJClyvNWVdgYtPWb1LqkGmKoWHljljt+MZq8443g0/J03/0fc3axT+MfRj/KRdP6ZigI2K0b1/4LYEY314JJySL/T1zCRZ4dEzc6FPcVmboivYKhZiUThD3gxB1sbiLAH/B5mVVpSs2XVYAXgg0PdYE/D5oN0XTVkBUgPH2pg1pPFANPAN70XsloywhvfUj9nrIOADanQeHyj8SsYTruDRTaXlHRT8PsMRgM0oPULLf0rAQx2a4P6Sth83MVE3uiUVDOBXWX22+RylZGztFVAib/ek0/6supisSFRWLS9OUBSPzqysolZvEyD2jmMPcWhPZzascHe9rsOqa7zaBogE1Me60gpfk/CAGucpTdL6K8C+SX8gOvhIvu4RpnrMrC/JnnvGOfhPZG7BD1bjfJa7kYMVX6l4yhWKn0jDxTBruOj/BKx0GHwHEYiNsrCUTrr+o4uHbhXq0DMjCNczg3UrL1VhADmzAjwhAhSEOGtOXhofTYsP/qvqI9uQboJ4R7apiCoeaH9m7OiJnSwlq2jrO0m2+yVWb19p2fjuJGv5RFZy40mvrqPxpDc68Hg8j3M+JVjgcQKdvk6y9gV6Dxr5umeGiqc7edLuOe95yDn4T9QlF36W4xd/peF1qcrJlwQq+j2xqqrE50kb0XCRY+F5fa72HxxZKP6j62/WKBKVdQjCsQ4kq14YrGqfvgvurrvvAmVc9YlpWO3xHZysndnjO1gtpXKH9gDX46wB0bKKJr6BPro+f6Vl2BCyksOskKycqGGfc7oPF7sUP7oP+z8aMWGP26RekZu8+z0cN/7INjVen6o4hhZSlTaq0qgq+uTirzR8Ua9OJCo+tXNrVXFTlEUJ0y3uP5aNRLKq/Efg+aHGr/kgCc/VTbgj26ALn9aZpcqfgFUXse/y9NbTW/szSFZVd59kI78p/Od+QEBWvCCNqLaDLXN/J0EWhcddl+XOm2Rusgqi+p0z8IQ3VQee8HXF+lObi0Psnhm473oZvnt27Cg4bC3r2zvemZXhubmjlFs7qlZ+rgrpkil0PjdRZVOowimXarrF/ce5T6X/aOJjC51Z7vOiQ2K1ndnENzrjqewJWL0N7+HvJwdZDas5n8LPDe9ZMXmpPUcK/xU2YK09R6mlVtH/u0JbfxZcr9d5rFHWPau6+XVv88fJH+O6t/2bgtVjP1V89GdkRIIm6xiedNDDk6xDdt+IH3qrxQ6KrKEm9h//QY63z0nlZ5Qpyqi6ynXIR1X3OEcZ8yo9V7Vigfk2nHkGaETl+U0kED+6Lg/cJsNy/8EWwXZR+4/A80ON75rtWNSZdmST2XJR9YHUXX/E329s5XeOn+/6Y/emG6AqLY+1mJyYgpadN/YzcMR5TlYrELwE1HhVXvLgNAtZaRxZcUS10iw0OO1/hfOpxWPk+ZSq/s/c7+AfflR9v4j/mx3WmXu30/Dufp0yqhamlWSjqm4GuNJz1aZTCTuYXcmoRHVGXzFnlQWEwn9s4hH8R9ffev6UYIVjnBVLEOeTFKqyWj6SBt+302j2CHs+5Y5JbxJVgVKQEJfOlZYPTicwaZ6xMvxxhq7Lhn9O1LAdBmPoi/lBJCstnKLlr3k2F2a0s/g/JauLeBjvvlkFAa0aD+/1roj6wPu93srMVWkZ4ErPVT/s0m19Z/QVc1ZZxlXXf3Txo88m2eqz7p+shnF59Fmd8VTxBKr5DHUFwyywHfNVq8ouC1XhjeoVp9cPE+ZjLLR3HCf3GIqMpGEewALz/o3HiYqlIk35VySrrCkcstKIyrO/I2nWNXYUs8A6+IQCD33nRJC589LgNhP+48Z3fa6q3/rrTwmsOHP9qfL5j7a/1ffMRPAVSiwXI56JYEa4Xmc8VTEntuBM0/ozsQV1N1AWqq6ej7ucY3iyP7Pp3PEdiplbPczusG/uYkHMNduNF/B/61YcfIUVL7KFu1CJasU6v4WXTEE4s+HEztQXqjdvOviGq6FF9Q+xhqu3KgNc+fequq2PMRLH8jMxjiqf/+jjsQ4R1ohZ/blGFlH+AdBikqqYw1Is/tlAf6Y/89kA9N2pG6Cq+LuIJOEvU1JfIG7saK4SzXDpdmoyynkxlPpi9+1+D9LzFbDqYVZPDnbPQpatmlKHDXd9fJ+oM6u90PdQb/nwcc+MdJzJR9XCtNJ37b0qUm5wmkbU3DPu4Figa4fq2er5jz4e67B3vD/Tke2a3XQO/niiQ34f+lTlV3lm5+EttBbqzLZCic4/V9Sq8w4t1181VJVsrPbUZvpjJZdaA31oDbUG7qvDo6otH977b03827R0PC0DfHPeq0KbhMr9RMvlPxQ8jMMw2oEHtctfwjkvdRb/rzxvGXVIg5oUtn6q6lYZ0Kq6ypixm+Q/xt+MGTNmzJgxY8aMGTNmzJgxY8aMGTNmzJgxY8aMGTNmzJgxY8aWnpUiq2jMmLGbTdR0E0GI0UaWIjg5CsuMUJn1DKVDgIVkWP5BOPBrHb1WlamPHh6WCRbLWA1VpD5zcMaUrU2RJpcPeBTTpD1fqrho7jnx42BlhhGo+Rk4pr5rA4q7BWnisfxfXpeYFekM86VnYRJZ3astKHiuswqLarMd2Qij6Kyu/jGW3jvRO4FfV/+Y0iR0XT3d+ujio78uXpUiX4xean1QVqQN8XNhRi0f8StYlNGeL21ljVXX6sK1qhVxmb34HjvimPA+Rf3PNIFkLIpz2ve7xGTQ5arTyZz0tliB43znhxfCDWLVTsHKHWeNKIWs7sdHweOq//4MipCy1Imd/Rm1zmroUyx9y9iWMXu156flpapufXTxuAzdvS4CdA6+rlx9cDWm/L6L8ap2Kqy9yrWEXhCUD7q7NIka0JGebwVSN6JGxhkrE1bUPwLL+k9vxXqc3jqSjpB0emGReEaLcDaeJvbuxluBlVIp0mRuZLSFS/vc35VA1cLF3GryFa6YVOFRZxUkKuKsFqsIy8ni6Iyym7MCXNCDr91EQQ9KA1Kp6q4PiE8q6+PCT1gTBHwgbgtAO9YzE2f+KgRO+fidTn3wu5bXE6oxz4W36tR4x7ncwZp8abkQ0GPLqFRN5NfxRhS7M1gHowzWkAb5AkdYIxPcOx5VhtnWwUY7duCeo/YfgV/JiFtt5PCN85HhwenWr+R3i0vkkswhbIlUXay6oCKfm6rqZd+os3p4i6gE2uEtcp3VO/bx0g/t4b10kt2xr3xUddeH4+X1EXirN4QK/r0qPNa+UIAEBUranlTXBwLfGL0+OZqEVKtJ3Xh7Valy9alwJ/daVYks25xblCD3aU5VPj28Dl8DlYiCNaSsfnA6fE0+N+QhOR/xrNGVks7ejUdVk9Z3KHNPgd/2Wuh3Lzwg64qdlhGEtRTSAT5U9ZJHUZHVwVFSDo7OqqieSmc1dI2X/kDqgZxEZ+iaovkyllMjRdjjrg+vkbw+HA87jnxpz5u/tOoU+P+ZZD/6pfsnP/oliGB9qK5PFAPCg6r6JL8ReJo55VNNb1RNePhPgpWPqnH22Pbinz22PU5QyUDZmb3jTTC7hVG5hoKvqnr0ocgCNaZE/I+3tjGU5fUXC3WmE7av2ZMJWWfpS1XsZRc3tXyk1Ek5uHVWk3lay3RWrZiQPIFgsFaESXKJ40IhLnlTi/pYtjAVJ7asPhwP41GXXacuXKQsw+MOOiOb3T8Z2SzbucbdPvDIX1PVB5NDHiPbFd/wNLVYQwBVhMo1quomobyoKlPqTbKJxuKfTTTS6lNVdc9j+PWex6jUu2+gI6tD1fsG+N3cN+Db/n3ujC7v9mTDm3SuqtfQunhHZ1U8drnOKpf9FGN2Pq/4K9k1dIS4RH1wuwO+BYK8Pk79xZ3K8bbmK9adK9H2Wrb4qn8bOeV3z8LmIs2q8vsueOnW9r+vk0CR69zqjaqlUNWq688c2H9664H9XEbv2HZpkqva7dp2hqGaVh8rgCMqjqz+AXBhrdccW39Wh6prjm06Z8UwApQFzNyX3Xng5I1QVWT6yk1VXZ1VzJ/ynhbrw5V6YVT6Wj53WMH4pkYrlCG5qA+rHUmDXGitqj5O/cWdyvH5bYTG7bsZV7WRUz5IrS1Tl+/dng/vV77ZS9Pa/2aMqhCjxNlySBEtV8voFcuMOQ7sN4rhMZLmATDkjetZPfxfQ8ED9a7v2yH3/kJ85Ouxn7W8Dr5aS3lZI9q2pAC4OCFTfqrq6axaQyL87fkTH3PyIfAQrTY8GUWpDwx3QbXuqwtvb6ygwjvvF530g1R93Sm/mqJDq69by5WaX3iAjq/0qKozcx5Je1F1RPGWggVP7MQ8vMgbq64i8Kc2y3Xvi/FTDzyRaF949Be0lzVifBUh8RKjqp7Oatubosy7/ojf8/0+ZH9GUFyXoELtX1/3VQ/v7bqyGlW2PlgjfPeqg6/8XJVuqL68mKr4U8V5tbgRo8Z1bDxV89LBsxqgdz3lZQ1/r8ozwTJFSvFboYZYVYXDz02hqo7OavuCKHPoFfx+6BXxvZ+mvb6r6Oq+6uH1qVpqfTAh1Z9R4+FlR2rv+KZzdJ3bxX9W6F9/Z88755DvtqBHVffUo/jz0jA5vd2vZyw75qPtb+D8iSFmO3JjvTt2Jmm+9unvvUnVWXUpoAZ5n6rSQtVT0dWtjz5eV9f3BurThartBN3akI1v19G51dAlTnmgU/Lytcnguj51r9clQ+RC3eZlcJCVmJ3opsqYMWPGjBkzZsyYMWPGjBkzZsyYMWPGjBkzZsyYMWPGjBkzZsyYMWPGjBkzZqzAXH+UndbHW2mCBm0dCqrQdWX1NGhz56Tz6CsVaylUu41ptRCzJsilj+bOyKju1LuNZMqypbSosSVnuFJhcDqppQLs4Flo3duqsxouxhdQepIqVqm7cgfNWZETZ3SBSD0LX1OpUXDj4m2H9hzY3zMTIktYs/qxo0m26Zx86ZY1Ebbpr7N2R1PVtwRKl9IRgCxnyR2NEh/Q7ZwWCWNL77X4zAoNncX1T6L0ZKg/Q1cBLsSryRpl9mpJRhWr1KcqSpC4RNx26TUIsQmHkrDca811AulsiU1YQbH8AnRJ7X+mPqTOV5NMqUHQDCU3o2ApiLv0ifWPqMBbKGjqNh1scevTu3vds1hN6R2NCl9cNmVhJ3V5XTEqyXSppyrfa11TklMVNQUiGirAxXgVWb2arbxUbXvSjZYJl3IxTKugdEsph4kW+t3A6Z6ZBKNsxCDqjGLW8QUqVRN/8JL88nIqcPQOvoIxr7q4zH801sEWL4EjRgR9N34WtWwKXn+hphBSodVah6re3uzPF75nRfGGIjmqIvn0VICL8XKyVpaqSDQU9HSOH5yX9V3O+Nszw3UOR36jksPEcK2NvfDAtr9VdQRuqlqxxpOgCXyWSlVsVZWIW3HL6Sy0Jkqaa+5Yox2gBkoIaCseACcZNdIqRpVCVZT0ldXE3pTmWi7PY0vz2Ffh8066CrA3XkbWylLV1p39piBY+IYSUO0dnxycHNw7nszLL8vsjn0odfVLEBhtI8yF+VjdyLDJVSGtE8Tj1IJCuMpSVVfDQjdA9QpOb20AzOf+xVqElPrkST6h0z5ce1v2fJFjw68iUXETkMC8VWfjWUiPrH54f7JWnqrxgv4zTnj0PTMHOlaylexAh1AQVoS/1za9Y/XG1yO6+UWKu+P+KpgoavqYthlS/L8m2b3/49ZTVVfDQl/1Qj+grVwAjP4Cqb+0oySoU3veqlY6JBmJF3vzurdV4qL2HghBJGrUFkBvuJjDe5Fv3duSyvrg173tfVblqarfS3dd3tiKXze2dl0mBNm9ceiOUGAtmg9N1KQAiayG4ckoC7xAItLxJNtw9NZTtaRXZZpn6ASolQ2AkXDDkyzkDoBp9+pKA4WgBF96ewji2/yRhuJ18GIw0PRgNHeGa1efYvKBcJZ0HxovvJVe97b3WaVRtWfm9FbKiFcaVaOQJz699fTW8K4ooTsI/T3IcfbxncjsMbyXSooHIeEV+4hCpNhnuPdd5ahqjdrB1yiF0Lr5XN0zdALUygfAmFF3B8C0ey0YBZv12hP544+3Yg1XWyHiu+N/edbfTT4VUb3w/kQtjaq2Tn6N2OBCHWwWp7bVj76JBS4FLjWR9g8Ns13PCyfbdA720Pl7UlopYI22XE+yu39PoRJ2GQ/1Vo6qTbm71g+AK5EBXioBcHEGmC4CqJsB7gR1SX5w/vjjG3NTuIhfVyPIRyFqMV5GVG+qDk7Lbk5saCE2uCDQYs4V7ASSJDHMKIuS5DAxj3sg/3pj4O/subnkr5asPTyttBKIkSAmlvg5z/61EgebQztJDNpIyfFuF5OlQUoKOJca/oYzwNT6qKnqqDgCA+2jlLRe0VWQfFSiuvHWqIyofiGAP9698wwnq6opiv8EQlsMUyKHaR3EfF3jvFCz5/niwLx/jVoKNk6CPz9Q6rVbGX5Ow1VlmzdDizfrjJQi6eE+Qkzn1Vr5A9SllQEWVC2lPqWoGpeBqnbmKaRTLMeDxmyonCFV4RZRKFCtrEdtQfn15Wy6nBJxKr9VsVLptqAuXZSNFeCPFHJoSpv7B2PeeJ70cB+YSClnwLnU8Po+t/gcWn1KUTUuJQO/RJWA1X8GYEyrPZvVPzFmzJgxY8aMGTNmzJgxY8aMGTNmzJgxY8aMGTNmzJgxY8aMGTNm7NYYrJYLLIl6TJlnYcyYhKgNF8Ufp0txo9YU6L5MUWTBbPQZ6wqsfzlDw+NybpBGGSq5sxlaAi2ZpikrGzNWkpOvbeq6nJCuHOFu2AQqQxH416TUOETJ7iZcfZdNwP+Az1AkTJo+BmmUryhIawg6AeYIXmNns0qy/NuFP4OrSrXKn8NODNbo16mJGiYqK7u1ZbGt9LHqs/TwcL+9S8Yj895C85vFeL4kjnYWBetqzzRNjMdpdXrnDWXL7hedPHBpcrBnJvWFfIzEhWH9mZE0LrQOK1ZMokJMfwZEu1NinWjDRWVFD0ZtzaTAy2oircotxeXrXK26gdvWn+qZ8ZPpFPjO7NhRXDu4kll7KOXvHR+c7swe38FqrXSr8g641JWODLpo/yjTxVLO0sPHYTkRxEvkaZBYu1mqwIvsHPQW7rLOJ5ktxvMlcbSzKFinPcOkGrnbn9x5g/9I7pcXBlpAQNYLfbKC1nxgC3fjE21Hsq75QEbrKMfWOmvxogpyW72tOWRIGQQ3fwXyoOncUqGOgdsaLjZcPLcWlpVVK/Ap1gBhOQhgtaBb1inLh6V+uBSOk3D9KXlDo5BVTp8iRJFB54o6XPZKD0s7Sw+P12jDNbrEnQGctZulqiLKsMJlk4xCVi88Zb0qHetuzyiRrAIvVy1zjEul+ZTuFNZ1efft8oVoKCUx9Ar/jKoIESan9eEtxY9Irqa7+ksHuXpe3hQ44rGg+x66Lg/cpsajwmoT42MfuOVJJX7CDn1tosoW4EO5U2HmHv/C0q5AIJ32V7u5g6WdpYvnLZ8A2VUIwnpvNVWFyyZJ1PDC01qVinW3J42sDl5XY8WjdKcwtwaDn6HoiRD3in2E5/hjYwudWb4s2/2IEt/IxuE4w7FaOIxc8c9pWn4PWH8ZVQU+8EIEsHxDj8Hpc2sVo9hECPVYp8LK5m642JZT7E/mv7YpAmZbAeJilCzD5WApZ7kdi3YV5zlFMRROq0eyylKVuyyNGl54qrgZDetuT0qN9IkqIaseUauq1p/l22FAesXeEkMWDnbNdmQ9HlFWNg4PTuNYnRdguUafu3Giyogh8GsnT2+FMDnemd07DuFqtRz/zP2dkBRrE1pSkvB9/SkvuQ15wCwEJKlUjbrcRH1W40k9fDGVwkohmcpTtfCe/WMgbzxdh5CCLSSqOvsi2h9E3zU1Vrpni+5Xl6hVVft2cEW11pyq2vF7/bE9f0rkRcOcm+u7IAuvNxztnXCwcUahauDxaK7+8qRJfueWEKvBr6c2s3oZ9XJaULXHd2AswYkqUzPivaF7Oyd1b8rbnk5VB0s569xaPXwxlQanP77v1lPVfQ/+MZA3nk5VCjYvr+M+OtTtH2d6L++sdLzwfvnrGR2i4gZFw5NOM0PSpcYfO/oszDfPFj+i0Wdl4XX7nw+vc5QFkySqdh/eO87rH1U++oJ7qcEXTwRqA1m5JlGTokZC5VWcqQ57ECmEVClO5WApZwndR/pVkq59fUDGLaTyispTFX0zSRpOvPBUqtKwurv6OO0fZjova8LF9xt4nL+eoRMV7d2EeOSQ3Q1KHbe+Z8YOlmPuvksmVbb+bJSt+m3fBYGW7+SCQQJmKmFSVc+qUZccQw01Pp8EAkVCGh4k0JrV5XOy4l5eublqWh322ONvNUX1uBhLO0sXLwRX4XVWB0XGrdJU5b5JG0688NRYhY7VU0TUJ6sHUWFm+Kl4PaMjP8aqj2zDca979nxKhcVqRnCH1Tmn75LhT27ozIbzgsWdWZE/9gnGn8QNokTftsLeLGrfk7cOX5gUoCUSckE2QfV4MZZ2lh4er7HpHEwNGpbCyxrhrrS4zwtPoR8dW4qioENWnZc1BfdrBXCGt+1vVa9nPC4OAWH37LHt6vNQHnTveH+mI9s9u+kcJHE65OewmlOb8c8NuKuDw9RK0csP7OfTb6G8e2A/W37r8G6yUjN++SBbqXrshaWcJVD2a34l3lYvbpdNa7yc1/lKw9McXbirVUeL+xyU80lNPx1sacZbXedlTdH97r7dzoM2lCLoCQFhl5xG7jAYZtUpwLdTVHphY6ZQTlo7pHYYthzKdSvvLr+1eKe5qRk/x1nVqsdeWIpWMkfx56zC09SLb46560zxUgfl+qQe9TSwN0JWnZc1RR0TNEBNlTFjxm5Gt1NdObQxY8aMGTNmzJgxY8aMGTNmzJgxY8aMGTNmzJgxY8aMGTNmzJgxY8aMldl0dXq/b3j7HLLs5NKsf8V9KAA1ium0psVuQq3SuleyYtbEUqVpTqc3zmg6vd83vDiLy4jR2zOZ7cjq1KdS+JtlgUsgYXmJWhfqgrmCO8/o7/vwwgN6V7JigXnQyZy4lV0N398iJ9gacLVosVaMSqe3NDxf1Ib/V6b8ZF7UrNzlc3HmFTZ2xZxat9/RPWapEzv7M5T6lIrfO07TVbYfeUbbZTSoYU1ElbpHN0rVKAqeau2bgMSjXwlGYMAnwEufub8S9acSle9vYQ8Nscb5vAwa6vTyywo9ILlOr4N3O7sK3zPzyUZcv/nJRlxgSy9fCEGp8bCKFETNTuyk1592v2iNJ9sXkBRJ9sjLIHYq1zDO6R5vuAu/23AXiyP55PUROsn2wkINvBVruU6pPwqPN85HtR2LTg1rKJQXTaOF5LqubvVae1C/chWjh6eCeCd2Dk5T8GEQQEA8CrPfOqqubYov4P4WWD7WP76wtsn+Ber0OpdV6/Q6ePchx3dmce0drt/ENXs4stLK75n5+D5OERUeJGCWW3usGKvla+0p5QsBUJUusVUXZrtfYvU2vRseebnluqyhue4x9IYoypmG/2OHt6jqI3Qu+NYKVLxwRGwhua6yNbEKXFDfsajUsAKr552n1nKdMhbruDooY84FQVo9L+NOHO1bfyWIR1/iD6J+OyirsCtHVVaDknuJnLSuXX++UDW2IEYYG5Ybafx1eh28ONT4hCssajyZIJSP8lv9GST4WD9SW4WHcYWFrnVvsuqijFJ/cQdqXWIUaUnijJAd2nNojwUOk5DOUrjuMasdnMY9a2DVP3yGhv9Gjofr7LECuLVC40kiPkdUeJD1MjwGviFX56SS7XJjqNQIXEq4um0YES6V09Vx45FEURTXeJXk9M3DkzTiuevU8rp6jmoVtShlXksTTUN0o+t+Eyh1xPFds8VNJtfpLQ3vKMpw1RgVfnKQLYMgr5o7pBqftBWP2LLGkyqdYYG3CqIIf7zjIFCjZWo1IKF7zO+T33dHVlYfxFt7WthKFs0JSRLwDlFr5fjGq1Et2S4vrIoaXG7T1QV2KGbAha4u3+qqN7yoPj0zx7bTsrismUJUkSXODT4hNZ11RND0tKS8r2D/oudPoskE/+U6vQ7e3b/I8Z1ZR7n13FocJVXlB+xMYp6oSjweEKqxsFJn2MG7m8Ufz/o+G7Bnwn2WPbKi6pNM1IPrHlsxHFFxZMXPCWl9ED8VxsCdq+kQ8KNuosrxx7Y7irilUlVNDZ1xcnLQLRzbmZ0clAax72DGYngSYxqhSwytVFuOLG4pWeLKU5X1ndjptFD3LCQQubehTu9i1/XX6XXw7kOOT9hi/jh3w+xWglC+Lf/fK4hKq487oFXjRcCv1iVm1YPTmExC3Nqfti/sfknW0Fz3mNVCA8PcHP6vXX1WVR/AwxzedkEQ6VDjmwqSH3I8q8WS3UG/XHiseGpDoYYeVVnNU087nvPU03LJoDbUme6C0dGOaVR7IehlcUvJEhe2DVGvUEvf0Arw+vOOLI4bsPDpB+r0FqdZZDq9Dt7d66rwUXjNgXO3FXNRYvm4W0pCqz569XfHBHJdYowEBk435VImmGCSPpac7rHIAONWIar6ID50J7ogjMEEPNYE6mGPqCq8rZ8V2juOj14/raSmRimzT7ZcSL6DCLpCVA6IGsxHFDM4My9fFreULHHl00q7b099gfXnKa7ObOqL3bfnfuUortN0ekvDi4xWpcqvHJ47O4bBSfbJRrXioqN7bM01sgipPrp4O9FFxHOCH9+hFiBdFGwTqFGa87JmHvCzZiUy6L5z6ksUejJJN0t8EzLAEGGhpK49atee2uxSLhQ6vZ1Und7vGV6cxdXpKUihe9ylVZ9K4Z1AWNdpaIFvac57ZFv3rHyW6nXn5cni3kiWuPJUFTqiOW3lmqK71tPp/f7hxYyDjF2K9a/WdxktdJ9WC6GKdAWEbSlZ3GKy6hNV926NGTNmzJgxY8aMGTNmzJgxY8aMGTNmzJgxY8aMGTNmzJgxY8aMGTNmzFgZDJbN7TGtYMxYIS00dGVB6QYlPHrtz732mv6DGlfqhfPPqGUZcWVr9+GK3/eUxahymFDrM1plZ1QKB3kk8/6sca10GdvkeTy8v/tO+nbs5igOq5/RDT8lXV3c2Ec9M/GFIKyytyaCoKfWMxP7iHSVUXTeIGtld/9evSYh8HKU/XirRgcwhVSC/3t18O3/9+6rtD9Kt0Yj0Dp0aUsrwMU21TS1ClQ1kiXpy4LaxJT3U4Pul3kcc/5l9RzBw/u776K1PYm6HVLPnFO3Sul4QVRcr32DZNXVxY2wXc/j6kcUIMSVfruej6gdMtZwtYnx62w61/dPaqquAdnMdQ/ZY1mdsummgqyNIZXaoCvwc1ov/J3s/jcKRJF9z+EynqAGQRyDWQ1tmZSuAIhwEq5jDyPGHCd4m89TS3iWn2DlpipXWyxlfJGPNuK3Qv9IKeO2qGtqkcjZcJm7RL5VKDJxeniHqDnp1dLJKnRxYZkvLOoRCgwSHVpbv68RMM8989wzqKfWlBcV83+Mgfl4Tilm7/jD+8NAcdWoh83R9mZV1d2/l3ccGCi3FbhhG8uLHBPwDz/adFSGF2N8AtR3+zOgxvcytWVpVF0s5iFfXJVXBQQZD0d7Co/1p+hdgaxe0NsFnQXdhd/JWjXM1O24eHyRjzbOb1lIyM7I6993YfG9Dr2i2/7+T0C/Pe2rhLjEC215XmFr5L8TurjxBfwuvqDSxXX0i+556J6HHF0j2aW5oGhnduwo6+o81CSVHeM2Fsn1QRPr3o1K58IN70VhnBbi3lwLCOKC96j411b3pGV4PnahPOcbP3zjh7bUJmlfFr5xhnrrDM/wlMldC2WyUl/E1wupEXwmIGMaKo9rFdaANGbU8cgsSiCrVZf43BlfxGiT+FwxFkGkhO7u6Br5lb/p9cX3umVMt/0tiUxc96xe5+p+EtRQuWhyw8kqdHFhMK+DZlTq4joP301V+cXbF3DUPrV5ZLN1pVXZz1lD1kERPoYYjoDha/4pLhQs+bAryaYeQALaYh332mpFByn41Few4r7ZH88NhcZG0itB/nMkjaJlFKI2XOS1UTlvSX00yHg895NVLtVCP6KWQtXC36vrI4iaJJEV5Uh47AYueCUslcxhIa5SCFRod2cUZDV68MnF9/pEQrf9ZYqOj/4Csi5MNwNApSrvngoVQXNkdXR0A48HHlfr4lZVYeCLB1JVfJaPSQl4GEe2Bd+HJFSu/MPr/PEtn6ydxBvrmREjX5z5SUb3TsCM9l9YdX9m1W/32cJRsElEzbp/SbLeCT9812WOv//lJNt8HH/qjxcJpe7ZaXucn450z0bU207EuNwbd94Vc7JxGB1x8T/VA+3u5EQd371tjX0Hb5cvYNOjqkNUsWkJnazxPFH9UntceVnH6cf6i+8URsGa8lEVSqtv/cr7nG2v3ThVczrZRYf9fB1d3Jb8VgPyABUpWnxI3WpTZ3bX84H5SL50pJM/Pmr3t0jBffkeMr7eb17Vn8ER8Xyq438H7ZLPp3DkhCsE/fAQUKcRj+M75pittD9eJJRe/Cmr3nRu0zlW/eJP7a0e6mRExcBUjPGbztnzypj/A+RZ38J/qq4gkCNq08eNdtn+GeDKUtUhKozrXXw2qd7uyiGrnKh+Di6rEe5NUHin/e/rRzX+5cOY2hv3OUc2AFGpyufkhRKvuZhJV0e3qmoV4wdSVHyWXnxZ34Uml7R/Z/Z8SnVL2Bh3/54td5Tt/dDnUz0zrSzwApyCNxYPPN4Kj9//CoiHBMh7b/wQnYUtsw6GpXhMKAFF4foP7394P94Nkk+231lgviMLEt/tuZq3H9jfkQ3Ml2tUxZBIyGeORXAjokZpBrjYccUz8L8C308PMq69kF9O8+7Gn3TrT+WIGnJSP94JLi+yqoi62MExE5wTh/VJRYHmlMvRO7MDf1dOqsKY+o73GdAGNeWYq2Irur/PT250dXR156r41jZSkPQBgU7pwxHj0b4dfOM6PEf+0Deda4VxGN/zWldawLFkj5+LY0fsbSfu+bMVaGVCKts7E40vpE5uwM9NkOvGryc3dGZhFPN9f7v+LEhDLhd1hy2vlp/avP5suUZVQTVbDtPeiEieAUbH5c/0swGXC0s6S955hyHx25jbrQC7KJljOTPlwu9UZJW1vPt+8/M2VyaYdhWcfMnfzutS1Qq0+Zzx2HbpKydFB1PYpj7f6eri6lG14WLX5dNbQZ0O8paYq1QLQJ/cgMQG0cxlLa/z+jjbaHg/dNYOm1G9n/hD4g/97x/aU5iC8MRDuuI+SOpvPbSxFfCSGjV9jAm3lfluDL+utCOEpo99y2/H3lUotuN4CgKR7eUaVQXV8ps8pgqCJJ9rqEcv97jBx1XXdKVe8SIi5Ped6jmo6+SuifPaRna38BIrT+5GOGuisZxUbTrqjYfhbZkqrKV2MLIm09LF1aNq12VwkpqcW5FEHFnNx/cBuetxBtYzQ9O5hW0S2iEEjsP/y0jXWLYRuoGfbQASLZP1yVHm9yijipc2XfZeIyd2ds2qXFF/rrrYpK5bp0NUPkkYnhQbMQxPyqcrlbailyIhdXcAz7TP2emP9dG8mUrVNde98bueV4e1N0hU0ZPSdWXzzXYbHMq3SnpOku88anJX6qDr3Gpeo5kpBamhc+mTHNKzoS1rudqtliv2laYvK3Xdapqod8EZzbkZXwo+VVd950y0oLoldf8EonAm7DrUvAmVgagVbbTv4IM2ZsyYMWPGjBkzZsyYMWPGjBkzZsyYMWPGjBkzZsyYMWPGjBkzZsyYsf9/DVcFWROmHYzJnCRQLDtBVZ7TukqdXXadhuuCgIyO89r6xHPf1acQAgmZkK/axaJ7JWvl5fCo8zxH03leovgp6MquwP+jWj53xm6jg2X1ZC0trPxZGRuZoZW++Gr2N5HhYuHJpge1iL4Hya5AgYQJli0XL8k3cABdt+Fiw8UQs69A0cGrC10fO5pgGo8xk2uGgxqdwRzZteb0HATWgNTgPyqaqsPk6DwniDrPSxHf+lXfPw2/uu/J+36rxjvW8B6ulIZljkFJ6do6yaUtr4jaa32iBLHZwvLECiFeyK8XLfD6NdHZoW9cycJf7b5d5TDBLxO5biB4SVXu2iZYH5rBZWa4BM3KrGRrm9S1CbzQkf1lV5IkkW29gmqu60+xvueeGZ5sJY1loIlw5c5/furpJlJn0MSeevrOf4ZRoJdOVdDV+dZeIE+ozchvnEPpsJo6z6Xie2aENG35ywfBnFDso+ivI19TBGGEf6JE0NBbuMzRn9wJ5m5LPJAasi4fZPqKiT2k7gqSrECcfU7mB3z8taPKDB9Rc34d+6yYqrHPCI6bXrHQ+mXi/3T9a5yxapWmXdy9zlPRJ7KanpmoCw+LdpVjjRVrZY+8jPEBZTxaf1Qosm7YMvKTu/8SfF9Z/tSq+X1Psva2N2WKFI4NTre9ydr3Pblq3poijMAMhVGqqvY98Z/Sd34AHdUZVW1amThC1+VxitB55gub889gVI13dHcp+M7skW1HtvFVrrTyHYEgFb4zi8vD3/jhsd5j21F2IMoosc3AbVzzEhUwV/hSozPrtCU/kBwyQRu2XOiUCPUsttwfrSuZnmTcR7suD9w2cFvXZR43iVHVY9m0xK3smW2Qtc/+4F/j9uYZrqJ8rPVed+mt9yrmqKy414UrTshHyeCXoFXQgPGButeC/v+IqO+rgXseeuTF2L/5b2Rll/Z8GwOZmeXWqC0gzY8Jv9rjYeNG2fJPNrbB2fLZTMv1A/tRp66q6rXgzwf+22M//4V8twKrN7LgiK8MnPbXbUITOs82OUJ7xzmZ1nwgx3dmYUl/yDlThU+y3S+hdMDul6h4/gTU5bdDh7H+LC6lZDUbW4X0ezuhw2w8ycteBfTzX+Dvs/5Uupz+wy5HJqcz+2EXdapC0m6C4Bfjk6g9AYzasUpu3a3V61WQX+DWxIRCb9wlbKaiauLpgh7laRn23UShfAwPrd5NyEfJOEOtAnu5eN/kCKr+06jKqn8eGfgvD/5jixJvO0u9eJSnt0a+9kJHvnYpGNVj+fxsWftsey30OySRvaS79vLtT3TIW3P1l0897awCZiH5/JzrPIsZFavHLUwgblqQ4XtmQLmp3pknqfC2EIm9tJrV8xFHhS+mqj8+8U2S/eA8/9z8IkWnOteh5eS+ueTMse3lm6vicxrfLcoe311elQm0C30oohS1I0r8LJxr3KugyLh3IT0zQjW+8LLyS6/51I1e86k8bOGDvvvAYIBCJbvp/0N8c+SVpJJ6Igxn/35L78hPkkRqW39lDVp/QX2lobe80ENvrcAH/RdA/ZU4X0VVFkx8Yw0JFQH277AzlKW2+t/H8T33XbW1St72HdnCq2+4C9u3IyvDd13ecFdhC8jxtuoR4zEIFwlT4SFo7ONjCA+z/fGd3yZxW68ApPSutP85P5Z9SyPq4PSJnSD+E/dX7HDPVZ1RVZWeZMuGJ7H84UmVQJDjxXgFGlWd0JeHwaKX+8iLqn57u6H0hy5VrYOLAlpJbhR3gFsckPvvFFNIJRhz1t21Z82/jR2V4dcd65nBrS/s1zsglbVKMjcpLD+UjB3u/NZ+nM2e7WOP653fxg6HklSqVlW9+FP3tlVWWjZTgjz3z6w0Jreg24iv/FF4u7xsvoeLSPhbo4H5qFTnGfFRVC4eFS8Kkkr84lFShW/LzTZxSiHH97+Pv2+82jvx6C+iRG1fh6gwVa2VZzrcc1VnVFXtqYTRH17h3YQKJ0Ttn3tm686tO53v5Ik0EfryMFg4V9wzVo/Lbi7JDuwfnnQCVRlVrdHWRdRrlaQF0NmLFRT9iOEx6tV3bb3js9QXrEGaal99ZFtswdqzZQy385PPTdzlW9XJ4cQH3uNp4dia+CA5bFVTqcqWrT+7Iu8m7QvHd/hjd7+0ivGZbfMDof9+x/urIbyTle3oPANhp4Qes7/OM8cn8CXKlHOmCl9MVTUeZM9jVqzlugr/8H4+3WqFM0bSrO+zgb3jcrlTN1HVM9pS5qo8CLYnFko5IqGUXXzIX+yI0JeHwSXH6tgv3v8joFTH6a1jR3FuIqPqW61jR1EN0ZmG92fGjr7VKmnqAFbUIWpU+jIlH9CiyHR1aGPklSg7sk3Z0LWPvHzH9ScSCVLGuOdIZxZlLYOrU7va2THlC5hjve0stSu4mo+QaqqiIKkThv3nEzKBNXu+HLKpenXNtY2vY3gnLbneacs2gs6zg29zd5YEPE1HWuDxtV3wUkKj/AQbeAIp0j4tw+sRtbS5quMZNJSWzrBnBtieXhQnkzGNIEvL8L22+FwWZBwbQOMQZh0jaf/eBzCghvjZwKE9h/ZA0iUF3zXIeqPdt4P7dYj3dNgh7L5d4orYBwaxt018/tfwIQRbQFFETKfCHdk79hE3VQwe39G+gDPU1YpNPMTrpv7Mals9GEdIrJ36Jbn7dQHtLSy8JOuCDlNZG12d55uFj7KoZvmtX8GLl8ydn8vwekRd/F6VNlflz4Dy4k53dwN8snYdYKppa03avmP7aXFRlp3elr5XwvlYsDg1og4YVs2vmqfoF3Jp0eFJDACGJ+0OgXZWRy54CVIeEave9loLYU4iRuF8oBQn4eOF0tp6vS8Fjek9Yt3zOs8Y0ah1lZcmftO57tnOb0O/2/W8HI/hsY7ebvF7VepcVa69XHqAnfT8w0L7WZcaq+sbXEmjVNSfRT3aqoqZPdrdUjnqRaM3+c/UhicbrmI3Ri6d6zxjRFP/HcW3QwxB0KnmEwQtryzR/yuj6lvsAaUqQxtbKsRuxuDXtMP3x/4fRZt8AbWN8fwAAAAASUVORK5CYII=\"); \n}\n\n.icon-glass {\n background-position: 0 0;\n}\n\n.icon-music {\n background-position: -24px 0;\n}\n\n.icon-search {\n background-position: -48px 0;\n}\n\n.icon-envelope {\n background-position: -72px 0;\n}\n\n.icon-heart {\n background-position: -96px 0;\n}\n\n.icon-star {\n background-position: -120px 0;\n}\n\n.icon-star-empty {\n background-position: -144px 0;\n}\n\n.icon-user {\n background-position: -168px 0;\n}\n\n.icon-film {\n background-position: -192px 0;\n}\n\n.icon-th-large {\n background-position: -216px 0;\n}\n\n.icon-th {\n background-position: -240px 0;\n}\n\n.icon-th-list {\n background-position: -264px 0;\n}\n\n.icon-ok {\n background-position: -288px 0;\n}\n\n.icon-remove {\n background-position: -312px 0;\n}\n\n.icon-zoom-in {\n background-position: -336px 0;\n}\n\n.icon-zoom-out {\n background-position: -360px 0;\n}\n\n.icon-off {\n background-position: -384px 0;\n}\n\n.icon-signal {\n background-position: -408px 0;\n}\n\n.icon-cog {\n background-position: -432px 0;\n}\n\n.icon-trash {\n background-position: -456px 0;\n}\n\n.icon-home {\n background-position: 0 -24px;\n}\n\n.icon-file {\n background-position: -24px -24px;\n}\n\n.icon-time {\n background-position: -48px -24px;\n}\n\n.icon-road {\n background-position: -72px -24px;\n}\n\n.icon-download-alt {\n background-position: -96px -24px;\n}\n\n.icon-download {\n background-position: -120px -24px;\n}\n\n.icon-upload {\n background-position: -144px -24px;\n}\n\n.icon-inbox {\n background-position: -168px -24px;\n}\n\n.icon-play-circle {\n background-position: -192px -24px;\n}\n\n.icon-repeat {\n background-position: -216px -24px;\n}\n\n.icon-refresh {\n background-position: -240px -24px;\n}\n\n.icon-list-alt {\n background-position: -264px -24px;\n}\n\n.icon-lock {\n background-position: -287px -24px;\n}\n\n.icon-flag {\n background-position: -312px -24px;\n}\n\n.icon-headphones {\n background-position: -336px -24px;\n}\n\n.icon-volume-off {\n background-position: -360px -24px;\n}\n\n.icon-volume-down {\n background-position: -384px -24px;\n}\n\n.icon-volume-up {\n background-position: -408px -24px;\n}\n\n.icon-qrcode {\n background-position: -432px -24px;\n}\n\n.icon-barcode {\n background-position: -456px -24px;\n}\n\n.icon-tag {\n background-position: 0 -48px;\n}\n\n.icon-tags {\n background-position: -25px -48px;\n}\n\n.icon-book {\n background-position: -48px -48px;\n}\n\n.icon-bookmark {\n background-position: -72px -48px;\n}\n\n.icon-print {\n background-position: -96px -48px;\n}\n\n.icon-camera {\n background-position: -120px -48px;\n}\n\n.icon-font {\n background-position: -144px -48px;\n}\n\n.icon-bold {\n background-position: -167px -48px;\n}\n\n.icon-italic {\n background-position: -192px -48px;\n}\n\n.icon-text-height {\n background-position: -216px -48px;\n}\n\n.icon-text-width {\n background-position: -240px -48px;\n}\n\n.icon-align-left {\n background-position: -264px -48px;\n}\n\n.icon-align-center {\n background-position: -288px -48px;\n}\n\n.icon-align-right {\n background-position: -312px -48px;\n}\n\n.icon-align-justify {\n background-position: -336px -48px;\n}\n\n.icon-list {\n background-position: -360px -48px;\n}\n\n.icon-indent-left {\n background-position: -384px -48px;\n}\n\n.icon-indent-right {\n background-position: -408px -48px;\n}\n\n.icon-facetime-video {\n background-position: -432px -48px;\n}\n\n.icon-picture {\n background-position: -456px -48px;\n}\n\n.icon-pencil {\n background-position: 0 -72px;\n}\n\n.icon-map-marker {\n background-position: -24px -72px;\n}\n\n.icon-adjust {\n background-position: -48px -72px;\n}\n\n.icon-tint {\n background-position: -72px -72px;\n}\n\n.icon-edit {\n background-position: -96px -72px;\n}\n\n.icon-share {\n background-position: -120px -72px;\n}\n\n.icon-check {\n background-position: -144px -72px;\n}\n\n.icon-move {\n background-position: -168px -72px;\n}\n\n.icon-step-backward {\n background-position: -192px -72px;\n}\n\n.icon-fast-backward {\n background-position: -216px -72px;\n}\n\n.icon-backward {\n background-position: -240px -72px;\n}\n\n.icon-play {\n background-position: -264px -72px;\n}\n\n.icon-pause {\n background-position: -288px -72px;\n}\n\n.icon-stop {\n background-position: -312px -72px;\n}\n\n.icon-forward {\n background-position: -336px -72px;\n}\n\n.icon-fast-forward {\n background-position: -360px -72px;\n}\n\n.icon-step-forward {\n background-position: -384px -72px;\n}\n\n.icon-eject {\n background-position: -408px -72px;\n}\n\n.icon-chevron-left {\n background-position: -432px -72px;\n}\n\n.icon-chevron-right {\n background-position: -456px -72px;\n}\n\n.icon-plus-sign {\n background-position: 0 -96px;\n}\n\n.icon-minus-sign {\n background-position: -24px -96px;\n}\n\n.icon-remove-sign {\n background-position: -48px -96px;\n}\n\n.icon-ok-sign {\n background-position: -72px -96px;\n}\n\n.icon-question-sign {\n background-position: -96px -96px;\n}\n\n.icon-info-sign {\n background-position: -120px -96px;\n}\n\n.icon-screenshot {\n background-position: -144px -96px;\n}\n\n.icon-remove-circle {\n background-position: -168px -96px;\n}\n\n.icon-ok-circle {\n background-position: -192px -96px;\n}\n\n.icon-ban-circle {\n background-position: -216px -96px;\n}\n\n.icon-arrow-left {\n background-position: -240px -96px;\n}\n\n.icon-arrow-right {\n background-position: -264px -96px;\n}\n\n.icon-arrow-up {\n background-position: -289px -96px;\n}\n\n.icon-arrow-down {\n background-position: -312px -96px;\n}\n\n.icon-share-alt {\n background-position: -336px -96px;\n}\n\n.icon-resize-full {\n background-position: -360px -96px;\n}\n\n.icon-resize-small {\n background-position: -384px -96px;\n}\n\n.icon-plus {\n background-position: -408px -96px;\n}\n\n.icon-minus {\n background-position: -433px -96px;\n}\n\n.icon-asterisk {\n background-position: -456px -96px;\n}\n\n.icon-exclamation-sign {\n background-position: 0 -120px;\n}\n\n.icon-gift {\n background-position: -24px -120px;\n}\n\n.icon-leaf {\n background-position: -48px -120px;\n}\n\n.icon-fire {\n background-position: -72px -120px;\n}\n\n.icon-eye-open {\n background-position: -96px -120px;\n}\n\n.icon-eye-close {\n background-position: -120px -120px;\n}\n\n.icon-warning-sign {\n background-position: -144px -120px;\n}\n\n.icon-plane {\n background-position: -168px -120px;\n}\n\n.icon-calendar {\n background-position: -192px -120px;\n}\n\n.icon-random {\n width: 16px;\n background-position: -216px -120px;\n}\n\n.icon-comment {\n background-position: -240px -120px;\n}\n\n.icon-magnet {\n background-position: -264px -120px;\n}\n\n.icon-chevron-up {\n background-position: -288px -120px;\n}\n\n.icon-chevron-down {\n background-position: -313px -119px;\n}\n\n.icon-retweet {\n background-position: -336px -120px;\n}\n\n.icon-shopping-cart {\n background-position: -360px -120px;\n}\n\n.icon-folder-close {\n background-position: -384px -120px;\n}\n\n.icon-folder-open {\n width: 16px;\n background-position: -408px -120px;\n}\n\n.icon-resize-vertical {\n background-position: -432px -119px;\n}\n\n.icon-resize-horizontal {\n background-position: -456px -118px;\n}\n\n.icon-hdd {\n background-position: 0 -144px;\n}\n\n.icon-bullhorn {\n background-position: -24px -144px;\n}\n\n.icon-bell {\n background-position: -48px -144px;\n}\n\n.icon-certificate {\n background-position: -72px -144px;\n}\n\n.icon-thumbs-up {\n background-position: -96px -144px;\n}\n\n.icon-thumbs-down {\n background-position: -120px -144px;\n}\n\n.icon-hand-right {\n background-position: -144px -144px;\n}\n\n.icon-hand-left {\n background-position: -168px -144px;\n}\n\n.icon-hand-up {\n background-position: -192px -144px;\n}\n\n.icon-hand-down {\n background-position: -216px -144px;\n}\n\n.icon-circle-arrow-right {\n background-position: -240px -144px;\n}\n\n.icon-circle-arrow-left {\n background-position: -264px -144px;\n}\n\n.icon-circle-arrow-up {\n background-position: -288px -144px;\n}\n\n.icon-circle-arrow-down {\n background-position: -312px -144px;\n}\n\n.icon-globe {\n background-position: -336px -144px;\n}\n\n.icon-wrench {\n background-position: -360px -144px;\n}\n\n.icon-tasks {\n background-position: -384px -144px;\n}\n\n.icon-filter {\n background-position: -408px -144px;\n}\n\n.icon-briefcase {\n background-position: -432px -144px;\n}\n\n.icon-fullscreen {\n background-position: -456px -144px;\n}\n\n.dropup,\n.dropdown {\n position: relative;\n}\n\n.dropdown-toggle {\n *margin-bottom: -3px;\n}\n\n.dropdown-toggle:active,\n.open .dropdown-toggle {\n outline: 0;\n}\n\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n vertical-align: top;\n border-top: 4px solid #000000;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n content: \"\";\n}\n\n.dropdown .caret {\n margin-top: 8px;\n margin-left: 2px;\n}\n\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n background-color: #ffffff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n *border-right-width: 2px;\n *border-bottom-width: 2px;\n -webkit-border-radius: 6px;\n -moz-border-radius: 6px;\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n -webkit-background-clip: padding-box;\n -moz-background-clip: padding;\n background-clip: padding-box;\n}\n\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n\n.dropdown-menu .divider {\n *width: 100%;\n height: 1px;\n margin: 9px 1px;\n *margin: -5px 0 5px;\n overflow: hidden;\n background-color: #e5e5e5;\n border-bottom: 1px solid #ffffff;\n}\n\n.dropdown-menu li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 20px;\n color: #333333;\n white-space: nowrap;\n}\n\n.dropdown-menu li > a:hover,\n.dropdown-menu li > a:focus,\n.dropdown-submenu:hover > a {\n color: #ffffff;\n text-decoration: none;\n background-color: #0081c2;\n background-image: -moz-linear-gradient(top, #0088cc, #0077b3);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));\n background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);\n background-image: -o-linear-gradient(top, #0088cc, #0077b3);\n background-image: linear-gradient(to bottom, #0088cc, #0077b3);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);\n}\n\n.dropdown-menu .active > a,\n.dropdown-menu .active > a:hover {\n color: #ffffff;\n text-decoration: none;\n background-color: #0081c2;\n background-image: -moz-linear-gradient(top, #0088cc, #0077b3);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));\n background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);\n background-image: -o-linear-gradient(top, #0088cc, #0077b3);\n background-image: linear-gradient(to bottom, #0088cc, #0077b3);\n background-repeat: repeat-x;\n outline: 0;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);\n}\n\n.dropdown-menu .disabled > a,\n.dropdown-menu .disabled > a:hover {\n color: #999999;\n}\n\n.dropdown-menu .disabled > a:hover {\n text-decoration: none;\n cursor: default;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.open {\n *z-index: 1000;\n}\n\n.open > .dropdown-menu {\n display: block;\n}\n\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px solid #000000;\n content: \"\";\n}\n\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 1px;\n}\n\n.dropdown-submenu {\n position: relative;\n}\n\n.dropdown-submenu > .dropdown-menu {\n top: 0;\n left: 100%;\n margin-top: -6px;\n margin-left: -1px;\n -webkit-border-radius: 0 6px 6px 6px;\n -moz-border-radius: 0 6px 6px 6px;\n border-radius: 0 6px 6px 6px;\n}\n\n.dropdown-submenu:hover > .dropdown-menu {\n display: block;\n}\n\n.dropup .dropdown-submenu > .dropdown-menu {\n top: auto;\n bottom: 0;\n margin-top: 0;\n margin-bottom: -2px;\n -webkit-border-radius: 5px 5px 5px 0;\n -moz-border-radius: 5px 5px 5px 0;\n border-radius: 5px 5px 5px 0;\n}\n\n.dropdown-submenu > a:after {\n display: block;\n float: right;\n width: 0;\n height: 0;\n margin-top: 5px;\n margin-right: -10px;\n border-color: transparent;\n border-left-color: #cccccc;\n border-style: solid;\n border-width: 5px 0 5px 5px;\n content: \" \";\n}\n\n.dropdown-submenu:hover > a:after {\n border-left-color: #ffffff;\n}\n\n.dropdown-submenu.pull-left {\n float: none;\n}\n\n.dropdown-submenu.pull-left > .dropdown-menu {\n left: -100%;\n margin-left: 10px;\n -webkit-border-radius: 6px 0 6px 6px;\n -moz-border-radius: 6px 0 6px 6px;\n border-radius: 6px 0 6px 6px;\n}\n\n.dropdown .dropdown-menu .nav-header {\n padding-right: 20px;\n padding-left: 20px;\n}\n\n.typeahead {\n z-index: 1051;\n margin-top: 2px;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n}\n\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n\n.well-large {\n padding: 24px;\n -webkit-border-radius: 6px;\n -moz-border-radius: 6px;\n border-radius: 6px;\n}\n\n.well-small {\n padding: 9px;\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -moz-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n\n.fade.in {\n opacity: 1;\n}\n\n.collapse {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition: height 0.35s ease;\n -moz-transition: height 0.35s ease;\n -o-transition: height 0.35s ease;\n transition: height 0.35s ease;\n}\n\n.collapse.in {\n height: auto;\n}\n\n.close {\n float: right;\n font-size: 20px;\n font-weight: bold;\n line-height: 20px;\n color: #000000;\n text-shadow: 0 1px 0 #ffffff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n\n.close:hover {\n color: #000000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.4;\n filter: alpha(opacity=40);\n}\n\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n\n.btn {\n display: inline-block;\n *display: inline;\n padding: 4px 12px;\n margin-bottom: 0;\n *margin-left: .3em;\n font-size: 14px;\n line-height: 20px;\n color: #333333;\n text-align: center;\n text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);\n vertical-align: middle;\n cursor: pointer;\n background-color: #f5f5f5;\n *background-color: #e6e6e6;\n background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));\n background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);\n background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);\n background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);\n background-repeat: repeat-x;\n border: 1px solid #bbbbbb;\n *border: 0;\n border-color: #e6e6e6 #e6e6e6 #bfbfbf;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n border-bottom-color: #a2a2a2;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n *zoom: 1;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n.btn:hover,\n.btn:active,\n.btn.active,\n.btn.disabled,\n.btn[disabled] {\n color: #333333;\n background-color: #e6e6e6;\n *background-color: #d9d9d9;\n}\n\n.btn:active,\n.btn.active {\n background-color: #cccccc \\9;\n}\n\n.btn:first-child {\n *margin-left: 0;\n}\n\n.btn:hover {\n color: #333333;\n text-decoration: none;\n background-position: 0 -15px;\n -webkit-transition: background-position 0.1s linear;\n -moz-transition: background-position 0.1s linear;\n -o-transition: background-position 0.1s linear;\n transition: background-position 0.1s linear;\n}\n\n.btn:focus {\n outline: thin dotted #333;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n\n.btn.active,\n.btn:active {\n background-image: none;\n outline: 0;\n -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n.btn.disabled,\n.btn[disabled] {\n cursor: default;\n background-image: none;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n\n.btn-large {\n padding: 11px 19px;\n font-size: 17.5px;\n -webkit-border-radius: 6px;\n -moz-border-radius: 6px;\n border-radius: 6px;\n}\n\n.btn-large [class^=\"icon-\"],\n.btn-large [class*=\" icon-\"] {\n margin-top: 4px;\n}\n\n.btn-small {\n padding: 2px 10px;\n font-size: 11.9px;\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n\n.btn-small [class^=\"icon-\"],\n.btn-small [class*=\" icon-\"] {\n margin-top: 0;\n}\n\n.btn-mini [class^=\"icon-\"],\n.btn-mini [class*=\" icon-\"] {\n margin-top: -1px;\n}\n\n.btn-mini {\n padding: 0 6px;\n font-size: 10.5px;\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n\n.btn-block {\n display: block;\n width: 100%;\n padding-right: 0;\n padding-left: 0;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n\n.btn-primary.active,\n.btn-warning.active,\n.btn-danger.active,\n.btn-success.active,\n.btn-info.active,\n.btn-inverse.active {\n color: rgba(255, 255, 255, 0.75);\n}\n\n.btn {\n border-color: #c5c5c5;\n border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);\n}\n\n.btn-primary {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #006dcc;\n *background-color: #0044cc;\n background-image: -moz-linear-gradient(top, #0088cc, #0044cc);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));\n background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);\n background-image: -o-linear-gradient(top, #0088cc, #0044cc);\n background-image: linear-gradient(to bottom, #0088cc, #0044cc);\n background-repeat: repeat-x;\n border-color: #0044cc #0044cc #002a80;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-primary:hover,\n.btn-primary:active,\n.btn-primary.active,\n.btn-primary.disabled,\n.btn-primary[disabled] {\n color: #ffffff;\n background-color: #0044cc;\n *background-color: #003bb3;\n}\n\n.btn-primary:active,\n.btn-primary.active {\n background-color: #003399 \\9;\n}\n\n.btn-warning {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #faa732;\n *background-color: #f89406;\n background-image: -moz-linear-gradient(top, #fbb450, #f89406);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));\n background-image: -webkit-linear-gradient(top, #fbb450, #f89406);\n background-image: -o-linear-gradient(top, #fbb450, #f89406);\n background-image: linear-gradient(to bottom, #fbb450, #f89406);\n background-repeat: repeat-x;\n border-color: #f89406 #f89406 #ad6704;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-warning:hover,\n.btn-warning:active,\n.btn-warning.active,\n.btn-warning.disabled,\n.btn-warning[disabled] {\n color: #ffffff;\n background-color: #f89406;\n *background-color: #df8505;\n}\n\n.btn-warning:active,\n.btn-warning.active {\n background-color: #c67605 \\9;\n}\n\n.btn-danger {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #da4f49;\n *background-color: #bd362f;\n background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));\n background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);\n background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);\n background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);\n background-repeat: repeat-x;\n border-color: #bd362f #bd362f #802420;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-danger:hover,\n.btn-danger:active,\n.btn-danger.active,\n.btn-danger.disabled,\n.btn-danger[disabled] {\n color: #ffffff;\n background-color: #bd362f;\n *background-color: #a9302a;\n}\n\n.btn-danger:active,\n.btn-danger.active {\n background-color: #942a25 \\9;\n}\n\n.btn-success {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #5bb75b;\n *background-color: #51a351;\n background-image: -moz-linear-gradient(top, #62c462, #51a351);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));\n background-image: -webkit-linear-gradient(top, #62c462, #51a351);\n background-image: -o-linear-gradient(top, #62c462, #51a351);\n background-image: linear-gradient(to bottom, #62c462, #51a351);\n background-repeat: repeat-x;\n border-color: #51a351 #51a351 #387038;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-success:hover,\n.btn-success:active,\n.btn-success.active,\n.btn-success.disabled,\n.btn-success[disabled] {\n color: #ffffff;\n background-color: #51a351;\n *background-color: #499249;\n}\n\n.btn-success:active,\n.btn-success.active {\n background-color: #408140 \\9;\n}\n\n.btn-info {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #49afcd;\n *background-color: #2f96b4;\n background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));\n background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);\n background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);\n background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);\n background-repeat: repeat-x;\n border-color: #2f96b4 #2f96b4 #1f6377;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-info:hover,\n.btn-info:active,\n.btn-info.active,\n.btn-info.disabled,\n.btn-info[disabled] {\n color: #ffffff;\n background-color: #2f96b4;\n *background-color: #2a85a0;\n}\n\n.btn-info:active,\n.btn-info.active {\n background-color: #24748c \\9;\n}\n\n.btn-inverse {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #363636;\n *background-color: #222222;\n background-image: -moz-linear-gradient(top, #444444, #222222);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));\n background-image: -webkit-linear-gradient(top, #444444, #222222);\n background-image: -o-linear-gradient(top, #444444, #222222);\n background-image: linear-gradient(to bottom, #444444, #222222);\n background-repeat: repeat-x;\n border-color: #222222 #222222 #000000;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.btn-inverse:hover,\n.btn-inverse:active,\n.btn-inverse.active,\n.btn-inverse.disabled,\n.btn-inverse[disabled] {\n color: #ffffff;\n background-color: #222222;\n *background-color: #151515;\n}\n\n.btn-inverse:active,\n.btn-inverse.active {\n background-color: #080808 \\9;\n}\n\nbutton.btn,\ninput[type=\"submit\"].btn {\n *padding-top: 3px;\n *padding-bottom: 3px;\n}\n\nbutton.btn::-moz-focus-inner,\ninput[type=\"submit\"].btn::-moz-focus-inner {\n padding: 0;\n border: 0;\n}\n\nbutton.btn.btn-large,\ninput[type=\"submit\"].btn.btn-large {\n *padding-top: 7px;\n *padding-bottom: 7px;\n}\n\nbutton.btn.btn-small,\ninput[type=\"submit\"].btn.btn-small {\n *padding-top: 3px;\n *padding-bottom: 3px;\n}\n\nbutton.btn.btn-mini,\ninput[type=\"submit\"].btn.btn-mini {\n *padding-top: 1px;\n *padding-bottom: 1px;\n}\n\n.btn-link,\n.btn-link:active,\n.btn-link[disabled] {\n background-color: transparent;\n background-image: none;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n\n.btn-link {\n color: #0088cc;\n cursor: pointer;\n border-color: transparent;\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.btn-link:hover {\n color: #005580;\n text-decoration: underline;\n background-color: transparent;\n}\n\n.btn-link[disabled]:hover {\n color: #333333;\n text-decoration: none;\n}\n\n.btn-group {\n position: relative;\n display: inline-block;\n *display: inline;\n *margin-left: .3em;\n font-size: 0;\n white-space: nowrap;\n vertical-align: middle;\n *zoom: 1;\n}\n\n.btn-group:first-child {\n *margin-left: 0;\n}\n\n.btn-group + .btn-group {\n margin-left: 5px;\n}\n\n.btn-toolbar {\n margin-top: 10px;\n margin-bottom: 10px;\n font-size: 0;\n}\n\n.btn-toolbar > .btn + .btn,\n.btn-toolbar > .btn-group + .btn,\n.btn-toolbar > .btn + .btn-group {\n margin-left: 5px;\n}\n\n.btn-group > .btn {\n position: relative;\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.btn-group > .btn + .btn {\n margin-left: -1px;\n}\n\n.btn-group > .btn,\n.btn-group > .dropdown-menu,\n.btn-group > .popover {\n font-size: 14px;\n}\n\n.btn-group > .btn-mini {\n font-size: 10.5px;\n}\n\n.btn-group > .btn-small {\n font-size: 11.9px;\n}\n\n.btn-group > .btn-large {\n font-size: 17.5px;\n}\n\n.btn-group > .btn:first-child {\n margin-left: 0;\n -webkit-border-bottom-left-radius: 4px;\n border-bottom-left-radius: 4px;\n -webkit-border-top-left-radius: 4px;\n border-top-left-radius: 4px;\n -moz-border-radius-bottomleft: 4px;\n -moz-border-radius-topleft: 4px;\n}\n\n.btn-group > .btn:last-child,\n.btn-group > .dropdown-toggle {\n -webkit-border-top-right-radius: 4px;\n border-top-right-radius: 4px;\n -webkit-border-bottom-right-radius: 4px;\n border-bottom-right-radius: 4px;\n -moz-border-radius-topright: 4px;\n -moz-border-radius-bottomright: 4px;\n}\n\n.btn-group > .btn.large:first-child {\n margin-left: 0;\n -webkit-border-bottom-left-radius: 6px;\n border-bottom-left-radius: 6px;\n -webkit-border-top-left-radius: 6px;\n border-top-left-radius: 6px;\n -moz-border-radius-bottomleft: 6px;\n -moz-border-radius-topleft: 6px;\n}\n\n.btn-group > .btn.large:last-child,\n.btn-group > .large.dropdown-toggle {\n -webkit-border-top-right-radius: 6px;\n border-top-right-radius: 6px;\n -webkit-border-bottom-right-radius: 6px;\n border-bottom-right-radius: 6px;\n -moz-border-radius-topright: 6px;\n -moz-border-radius-bottomright: 6px;\n}\n\n.btn-group > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group > .btn:active,\n.btn-group > .btn.active {\n z-index: 2;\n}\n\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n.btn-group > .btn + .dropdown-toggle {\n *padding-top: 5px;\n padding-right: 8px;\n *padding-bottom: 5px;\n padding-left: 8px;\n -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n.btn-group > .btn-mini + .dropdown-toggle {\n *padding-top: 2px;\n padding-right: 5px;\n *padding-bottom: 2px;\n padding-left: 5px;\n}\n\n.btn-group > .btn-small + .dropdown-toggle {\n *padding-top: 5px;\n *padding-bottom: 4px;\n}\n\n.btn-group > .btn-large + .dropdown-toggle {\n *padding-top: 7px;\n padding-right: 12px;\n *padding-bottom: 7px;\n padding-left: 12px;\n}\n\n.btn-group.open .dropdown-toggle {\n background-image: none;\n -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n.btn-group.open .btn.dropdown-toggle {\n background-color: #e6e6e6;\n}\n\n.btn-group.open .btn-primary.dropdown-toggle {\n background-color: #0044cc;\n}\n\n.btn-group.open .btn-warning.dropdown-toggle {\n background-color: #f89406;\n}\n\n.btn-group.open .btn-danger.dropdown-toggle {\n background-color: #bd362f;\n}\n\n.btn-group.open .btn-success.dropdown-toggle {\n background-color: #51a351;\n}\n\n.btn-group.open .btn-info.dropdown-toggle {\n background-color: #2f96b4;\n}\n\n.btn-group.open .btn-inverse.dropdown-toggle {\n background-color: #222222;\n}\n\n.btn .caret {\n margin-top: 8px;\n margin-left: 0;\n}\n\n.btn-mini .caret,\n.btn-small .caret,\n.btn-large .caret {\n margin-top: 6px;\n}\n\n.btn-large .caret {\n border-top-width: 5px;\n border-right-width: 5px;\n border-left-width: 5px;\n}\n\n.dropup .btn-large .caret {\n border-bottom-width: 5px;\n}\n\n.btn-primary .caret,\n.btn-warning .caret,\n.btn-danger .caret,\n.btn-info .caret,\n.btn-success .caret,\n.btn-inverse .caret {\n border-top-color: #ffffff;\n border-bottom-color: #ffffff;\n}\n\n.btn-group-vertical {\n display: inline-block;\n *display: inline;\n /* IE7 inline-block hack */\n\n *zoom: 1;\n}\n\n.btn-group-vertical > .btn {\n display: block;\n float: none;\n max-width: 100%;\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.btn-group-vertical > .btn + .btn {\n margin-top: -1px;\n margin-left: 0;\n}\n\n.btn-group-vertical > .btn:first-child {\n -webkit-border-radius: 4px 4px 0 0;\n -moz-border-radius: 4px 4px 0 0;\n border-radius: 4px 4px 0 0;\n}\n\n.btn-group-vertical > .btn:last-child {\n -webkit-border-radius: 0 0 4px 4px;\n -moz-border-radius: 0 0 4px 4px;\n border-radius: 0 0 4px 4px;\n}\n\n.btn-group-vertical > .btn-large:first-child {\n -webkit-border-radius: 6px 6px 0 0;\n -moz-border-radius: 6px 6px 0 0;\n border-radius: 6px 6px 0 0;\n}\n\n.btn-group-vertical > .btn-large:last-child {\n -webkit-border-radius: 0 0 6px 6px;\n -moz-border-radius: 0 0 6px 6px;\n border-radius: 0 0 6px 6px;\n}\n\n.alert {\n padding: 8px 35px 8px 14px;\n margin-bottom: 20px;\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\n background-color: #fcf8e3;\n border: 1px solid #fbeed5;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n}\n\n.alert,\n.alert h4 {\n color: #c09853;\n}\n\n.alert h4 {\n margin: 0;\n}\n\n.alert .close {\n position: relative;\n top: -2px;\n right: -21px;\n line-height: 20px;\n}\n\n.alert-success {\n color: #468847;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n\n.alert-success h4 {\n color: #468847;\n}\n\n.alert-danger,\n.alert-error {\n color: #b94a48;\n background-color: #f2dede;\n border-color: #eed3d7;\n}\n\n.alert-danger h4,\n.alert-error h4 {\n color: #b94a48;\n}\n\n.alert-info {\n color: #3a87ad;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n\n.alert-info h4 {\n color: #3a87ad;\n}\n\n.alert-block {\n padding-top: 14px;\n padding-bottom: 14px;\n}\n\n.alert-block > p,\n.alert-block > ul {\n margin-bottom: 0;\n}\n\n.alert-block p + p {\n margin-top: 5px;\n}\n\n.nav {\n margin-bottom: 20px;\n margin-left: 0;\n list-style: none;\n}\n\n.nav > li > a {\n display: block;\n}\n\n.nav > li > a:hover {\n text-decoration: none;\n background-color: #eeeeee;\n}\n\n.nav > li > a > img {\n max-width: none;\n}\n\n.nav > .pull-right {\n float: right;\n}\n\n.nav-header {\n display: block;\n padding: 3px 15px;\n font-size: 11px;\n font-weight: bold;\n line-height: 20px;\n color: #999999;\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\n text-transform: uppercase;\n}\n\n.nav li + .nav-header {\n margin-top: 9px;\n}\n\n.nav-list {\n padding-right: 15px;\n padding-left: 15px;\n margin-bottom: 0;\n}\n\n.nav-list > li > a,\n.nav-list .nav-header {\n margin-right: -15px;\n margin-left: -15px;\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);\n}\n\n.nav-list > li > a {\n padding: 3px 15px;\n}\n\n.nav-list > .active > a,\n.nav-list > .active > a:hover {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n background-color: #0088cc;\n}\n\n.nav-list [class^=\"icon-\"],\n.nav-list [class*=\" icon-\"] {\n margin-right: 2px;\n}\n\n.nav-list .divider {\n *width: 100%;\n height: 1px;\n margin: 9px 1px;\n *margin: -5px 0 5px;\n overflow: hidden;\n background-color: #e5e5e5;\n border-bottom: 1px solid #ffffff;\n}\n\n.nav-tabs,\n.nav-pills {\n *zoom: 1;\n}\n\n.nav-tabs:before,\n.nav-pills:before,\n.nav-tabs:after,\n.nav-pills:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.nav-tabs:after,\n.nav-pills:after {\n clear: both;\n}\n\n.nav-tabs > li,\n.nav-pills > li {\n float: left;\n}\n\n.nav-tabs > li > a,\n.nav-pills > li > a {\n padding-right: 12px;\n padding-left: 12px;\n margin-right: 2px;\n line-height: 14px;\n}\n\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n\n.nav-tabs > li {\n margin-bottom: -1px;\n}\n\n.nav-tabs > li > a {\n padding-top: 8px;\n padding-bottom: 8px;\n line-height: 20px;\n border: 1px solid transparent;\n -webkit-border-radius: 4px 4px 0 0;\n -moz-border-radius: 4px 4px 0 0;\n border-radius: 4px 4px 0 0;\n}\n\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #dddddd;\n}\n\n.nav-tabs > .active > a,\n.nav-tabs > .active > a:hover {\n color: #555555;\n cursor: default;\n background-color: #ffffff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n}\n\n.nav-pills > li > a {\n padding-top: 8px;\n padding-bottom: 8px;\n margin-top: 2px;\n margin-bottom: 2px;\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n}\n\n.nav-pills > .active > a,\n.nav-pills > .active > a:hover {\n color: #ffffff;\n background-color: #0088cc;\n}\n\n.nav-stacked > li {\n float: none;\n}\n\n.nav-stacked > li > a {\n margin-right: 0;\n}\n\n.nav-tabs.nav-stacked {\n border-bottom: 0;\n}\n\n.nav-tabs.nav-stacked > li > a {\n border: 1px solid #ddd;\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.nav-tabs.nav-stacked > li:first-child > a {\n -webkit-border-top-right-radius: 4px;\n border-top-right-radius: 4px;\n -webkit-border-top-left-radius: 4px;\n border-top-left-radius: 4px;\n -moz-border-radius-topright: 4px;\n -moz-border-radius-topleft: 4px;\n}\n\n.nav-tabs.nav-stacked > li:last-child > a {\n -webkit-border-bottom-right-radius: 4px;\n border-bottom-right-radius: 4px;\n -webkit-border-bottom-left-radius: 4px;\n border-bottom-left-radius: 4px;\n -moz-border-radius-bottomright: 4px;\n -moz-border-radius-bottomleft: 4px;\n}\n\n.nav-tabs.nav-stacked > li > a:hover {\n z-index: 2;\n border-color: #ddd;\n}\n\n.nav-pills.nav-stacked > li > a {\n margin-bottom: 3px;\n}\n\n.nav-pills.nav-stacked > li:last-child > a {\n margin-bottom: 1px;\n}\n\n.nav-tabs .dropdown-menu {\n -webkit-border-radius: 0 0 6px 6px;\n -moz-border-radius: 0 0 6px 6px;\n border-radius: 0 0 6px 6px;\n}\n\n.nav-pills .dropdown-menu {\n -webkit-border-radius: 6px;\n -moz-border-radius: 6px;\n border-radius: 6px;\n}\n\n.nav .dropdown-toggle .caret {\n margin-top: 6px;\n border-top-color: #0088cc;\n border-bottom-color: #0088cc;\n}\n\n.nav .dropdown-toggle:hover .caret {\n border-top-color: #005580;\n border-bottom-color: #005580;\n}\n\n/* move down carets for tabs */\n\n.nav-tabs .dropdown-toggle .caret {\n margin-top: 8px;\n}\n\n.nav .active .dropdown-toggle .caret {\n border-top-color: #fff;\n border-bottom-color: #fff;\n}\n\n.nav-tabs .active .dropdown-toggle .caret {\n border-top-color: #555555;\n border-bottom-color: #555555;\n}\n\n.nav > .dropdown.active > a:hover {\n cursor: pointer;\n}\n\n.nav-tabs .open .dropdown-toggle,\n.nav-pills .open .dropdown-toggle,\n.nav > li.dropdown.open.active > a:hover {\n color: #ffffff;\n background-color: #999999;\n border-color: #999999;\n}\n\n.nav li.dropdown.open .caret,\n.nav li.dropdown.open.active .caret,\n.nav li.dropdown.open a:hover .caret {\n border-top-color: #ffffff;\n border-bottom-color: #ffffff;\n opacity: 1;\n filter: alpha(opacity=100);\n}\n\n.tabs-stacked .open > a:hover {\n border-color: #999999;\n}\n\n.tabbable {\n *zoom: 1;\n}\n\n.tabbable:before,\n.tabbable:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.tabbable:after {\n clear: both;\n}\n\n.tab-content {\n overflow: auto;\n}\n\n.tabs-below > .nav-tabs,\n.tabs-right > .nav-tabs,\n.tabs-left > .nav-tabs {\n border-bottom: 0;\n}\n\n.tab-content > .tab-pane,\n.pill-content > .pill-pane {\n display: none;\n}\n\n.tab-content > .active,\n.pill-content > .active {\n display: block;\n}\n\n.tabs-below > .nav-tabs {\n border-top: 1px solid #ddd;\n}\n\n.tabs-below > .nav-tabs > li {\n margin-top: -1px;\n margin-bottom: 0;\n}\n\n.tabs-below > .nav-tabs > li > a {\n -webkit-border-radius: 0 0 4px 4px;\n -moz-border-radius: 0 0 4px 4px;\n border-radius: 0 0 4px 4px;\n}\n\n.tabs-below > .nav-tabs > li > a:hover {\n border-top-color: #ddd;\n border-bottom-color: transparent;\n}\n\n.tabs-below > .nav-tabs > .active > a,\n.tabs-below > .nav-tabs > .active > a:hover {\n border-color: transparent #ddd #ddd #ddd;\n}\n\n.tabs-left > .nav-tabs > li,\n.tabs-right > .nav-tabs > li {\n float: none;\n}\n\n.tabs-left > .nav-tabs > li > a,\n.tabs-right > .nav-tabs > li > a {\n min-width: 74px;\n margin-right: 0;\n margin-bottom: 3px;\n}\n\n.tabs-left > .nav-tabs {\n float: left;\n margin-right: 19px;\n border-right: 1px solid #ddd;\n}\n\n.tabs-left > .nav-tabs > li > a {\n margin-right: -1px;\n -webkit-border-radius: 4px 0 0 4px;\n -moz-border-radius: 4px 0 0 4px;\n border-radius: 4px 0 0 4px;\n}\n\n.tabs-left > .nav-tabs > li > a:hover {\n border-color: #eeeeee #dddddd #eeeeee #eeeeee;\n}\n\n.tabs-left > .nav-tabs .active > a,\n.tabs-left > .nav-tabs .active > a:hover {\n border-color: #ddd transparent #ddd #ddd;\n *border-right-color: #ffffff;\n}\n\n.tabs-right > .nav-tabs {\n float: right;\n margin-left: 19px;\n border-left: 1px solid #ddd;\n}\n\n.tabs-right > .nav-tabs > li > a {\n margin-left: -1px;\n -webkit-border-radius: 0 4px 4px 0;\n -moz-border-radius: 0 4px 4px 0;\n border-radius: 0 4px 4px 0;\n}\n\n.tabs-right > .nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #eeeeee #dddddd;\n}\n\n.tabs-right > .nav-tabs .active > a,\n.tabs-right > .nav-tabs .active > a:hover {\n border-color: #ddd #ddd #ddd transparent;\n *border-left-color: #ffffff;\n}\n\n.nav > .disabled > a {\n color: #999999;\n}\n\n.nav > .disabled > a:hover {\n text-decoration: none;\n cursor: default;\n background-color: transparent;\n}\n\n.navbar {\n *position: relative;\n *z-index: 2;\n margin-bottom: 20px;\n overflow: visible;\n}\n\n.navbar-inner {\n min-height: 40px;\n padding-right: 20px;\n padding-left: 20px;\n background-color: #fafafa;\n background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));\n background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);\n background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);\n background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);\n background-repeat: repeat-x;\n border: 1px solid #d4d4d4;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);\n *zoom: 1;\n -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\n -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);\n}\n\n.navbar-inner:before,\n.navbar-inner:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.navbar-inner:after {\n clear: both;\n}\n\n.navbar .container {\n width: auto;\n}\n\n.nav-collapse.collapse {\n height: auto;\n overflow: visible;\n}\n\n.navbar .brand {\n display: block;\n float: left;\n padding: 10px 20px 10px;\n margin-left: -20px;\n font-size: 20px;\n font-weight: 200;\n color: #777777;\n text-shadow: 0 1px 0 #ffffff;\n}\n\n.navbar .brand:hover {\n text-decoration: none;\n}\n\n.navbar-text {\n margin-bottom: 0;\n line-height: 40px;\n color: #777777;\n}\n\n.navbar-link {\n color: #777777;\n}\n\n.navbar-link:hover {\n color: #333333;\n}\n\n.navbar .divider-vertical {\n height: 40px;\n margin: 0 9px;\n border-right: 1px solid #ffffff;\n border-left: 1px solid #f2f2f2;\n}\n\n.navbar .btn,\n.navbar .btn-group {\n margin-top: 5px;\n}\n\n.navbar .btn-group .btn,\n.navbar .input-prepend .btn,\n.navbar .input-append .btn {\n margin-top: 0;\n}\n\n.navbar-form {\n margin-bottom: 0;\n *zoom: 1;\n}\n\n.navbar-form:before,\n.navbar-form:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.navbar-form:after {\n clear: both;\n}\n\n.navbar-form input,\n.navbar-form select,\n.navbar-form .radio,\n.navbar-form .checkbox {\n margin-top: 5px;\n}\n\n.navbar-form input,\n.navbar-form select,\n.navbar-form .btn {\n display: inline-block;\n margin-bottom: 0;\n}\n\n.navbar-form input[type=\"image\"],\n.navbar-form input[type=\"checkbox\"],\n.navbar-form input[type=\"radio\"] {\n margin-top: 3px;\n}\n\n.navbar-form .input-append,\n.navbar-form .input-prepend {\n margin-top: 5px;\n white-space: nowrap;\n}\n\n.navbar-form .input-append input,\n.navbar-form .input-prepend input {\n margin-top: 0;\n}\n\n.navbar-search {\n position: relative;\n float: left;\n margin-top: 5px;\n margin-bottom: 0;\n}\n\n.navbar-search .search-query {\n padding: 4px 14px;\n margin-bottom: 0;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 13px;\n font-weight: normal;\n line-height: 1;\n -webkit-border-radius: 15px;\n -moz-border-radius: 15px;\n border-radius: 15px;\n}\n\n.navbar-static-top {\n position: static;\n margin-bottom: 0;\n}\n\n.navbar-static-top .navbar-inner {\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n margin-bottom: 0;\n}\n\n.navbar-fixed-top .navbar-inner,\n.navbar-static-top .navbar-inner {\n border-width: 0 0 1px;\n}\n\n.navbar-fixed-bottom .navbar-inner {\n border-width: 1px 0 0;\n}\n\n.navbar-fixed-top .navbar-inner,\n.navbar-fixed-bottom .navbar-inner {\n padding-right: 0;\n padding-left: 0;\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n}\n\n.navbar-static-top .container,\n.navbar-fixed-top .container,\n.navbar-fixed-bottom .container {\n width: 940px;\n}\n\n.navbar-fixed-top {\n top: 0;\n}\n\n.navbar-fixed-top .navbar-inner,\n.navbar-static-top .navbar-inner {\n -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);\n -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);\n}\n\n.navbar-fixed-bottom {\n bottom: 0;\n}\n\n.navbar-fixed-bottom .navbar-inner {\n -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);\n -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);\n box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);\n}\n\n.navbar .nav {\n position: relative;\n left: 0;\n display: block;\n float: left;\n margin: 0 10px 0 0;\n}\n\n.navbar .nav.pull-right {\n float: right;\n margin-right: 0;\n}\n\n.navbar .nav > li {\n float: left;\n}\n\n.navbar .nav > li > a {\n float: none;\n padding: 10px 15px 10px;\n color: #777777;\n text-decoration: none;\n text-shadow: 0 1px 0 #ffffff;\n}\n\n.navbar .nav .dropdown-toggle .caret {\n margin-top: 8px;\n}\n\n.navbar .nav > li > a:focus,\n.navbar .nav > li > a:hover {\n color: #333333;\n text-decoration: none;\n background-color: transparent;\n}\n\n.navbar .nav > .active > a,\n.navbar .nav > .active > a:hover,\n.navbar .nav > .active > a:focus {\n color: #555555;\n text-decoration: none;\n background-color: #e5e5e5;\n -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\n -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);\n}\n\n.navbar .btn-navbar {\n display: none;\n float: right;\n padding: 7px 10px;\n margin-right: 5px;\n margin-left: 5px;\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #ededed;\n *background-color: #e5e5e5;\n background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));\n background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);\n background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);\n background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);\n background-repeat: repeat-x;\n border-color: #e5e5e5 #e5e5e5 #bfbfbf;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);\n -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);\n}\n\n.navbar .btn-navbar:hover,\n.navbar .btn-navbar:active,\n.navbar .btn-navbar.active,\n.navbar .btn-navbar.disabled,\n.navbar .btn-navbar[disabled] {\n color: #ffffff;\n background-color: #e5e5e5;\n *background-color: #d9d9d9;\n}\n\n.navbar .btn-navbar:active,\n.navbar .btn-navbar.active {\n background-color: #cccccc \\9;\n}\n\n.navbar .btn-navbar .icon-bar {\n display: block;\n width: 18px;\n height: 2px;\n background-color: #f5f5f5;\n -webkit-border-radius: 1px;\n -moz-border-radius: 1px;\n border-radius: 1px;\n -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\n -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);\n}\n\n.btn-navbar .icon-bar + .icon-bar {\n margin-top: 3px;\n}\n\n.navbar .nav > li > .dropdown-menu:before {\n position: absolute;\n top: -7px;\n left: 9px;\n display: inline-block;\n border-right: 7px solid transparent;\n border-bottom: 7px solid #ccc;\n border-left: 7px solid transparent;\n border-bottom-color: rgba(0, 0, 0, 0.2);\n content: '';\n}\n\n.navbar .nav > li > .dropdown-menu:after {\n position: absolute;\n top: -6px;\n left: 10px;\n display: inline-block;\n border-right: 6px solid transparent;\n border-bottom: 6px solid #ffffff;\n border-left: 6px solid transparent;\n content: '';\n}\n\n.navbar-fixed-bottom .nav > li > .dropdown-menu:before {\n top: auto;\n bottom: -7px;\n border-top: 7px solid #ccc;\n border-bottom: 0;\n border-top-color: rgba(0, 0, 0, 0.2);\n}\n\n.navbar-fixed-bottom .nav > li > .dropdown-menu:after {\n top: auto;\n bottom: -6px;\n border-top: 6px solid #ffffff;\n border-bottom: 0;\n}\n\n.navbar .nav li.dropdown > a:hover .caret {\n border-top-color: #555555;\n border-bottom-color: #555555;\n}\n\n.navbar .nav li.dropdown.open > .dropdown-toggle,\n.navbar .nav li.dropdown.active > .dropdown-toggle,\n.navbar .nav li.dropdown.open.active > .dropdown-toggle {\n color: #555555;\n background-color: #e5e5e5;\n}\n\n.navbar .nav li.dropdown > .dropdown-toggle .caret {\n border-top-color: #777777;\n border-bottom-color: #777777;\n}\n\n.navbar .nav li.dropdown.open > .dropdown-toggle .caret,\n.navbar .nav li.dropdown.active > .dropdown-toggle .caret,\n.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {\n border-top-color: #555555;\n border-bottom-color: #555555;\n}\n\n.navbar .pull-right > li > .dropdown-menu,\n.navbar .nav > li > .dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n\n.navbar .pull-right > li > .dropdown-menu:before,\n.navbar .nav > li > .dropdown-menu.pull-right:before {\n right: 12px;\n left: auto;\n}\n\n.navbar .pull-right > li > .dropdown-menu:after,\n.navbar .nav > li > .dropdown-menu.pull-right:after {\n right: 13px;\n left: auto;\n}\n\n.navbar .pull-right > li > .dropdown-menu .dropdown-menu,\n.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {\n right: 100%;\n left: auto;\n margin-right: -1px;\n margin-left: 0;\n -webkit-border-radius: 6px 0 6px 6px;\n -moz-border-radius: 6px 0 6px 6px;\n border-radius: 6px 0 6px 6px;\n}\n\n.navbar-inverse .navbar-inner {\n background-color: #1b1b1b;\n background-image: -moz-linear-gradient(top, #222222, #111111);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));\n background-image: -webkit-linear-gradient(top, #222222, #111111);\n background-image: -o-linear-gradient(top, #222222, #111111);\n background-image: linear-gradient(to bottom, #222222, #111111);\n background-repeat: repeat-x;\n border-color: #252525;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);\n}\n\n.navbar-inverse .brand,\n.navbar-inverse .nav > li > a {\n color: #999999;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n\n.navbar-inverse .brand:hover,\n.navbar-inverse .nav > li > a:hover {\n color: #ffffff;\n}\n\n.navbar-inverse .brand {\n color: #999999;\n}\n\n.navbar-inverse .navbar-text {\n color: #999999;\n}\n\n.navbar-inverse .nav > li > a:focus,\n.navbar-inverse .nav > li > a:hover {\n color: #ffffff;\n background-color: transparent;\n}\n\n.navbar-inverse .nav .active > a,\n.navbar-inverse .nav .active > a:hover,\n.navbar-inverse .nav .active > a:focus {\n color: #ffffff;\n background-color: #111111;\n}\n\n.navbar-inverse .navbar-link {\n color: #999999;\n}\n\n.navbar-inverse .navbar-link:hover {\n color: #ffffff;\n}\n\n.navbar-inverse .divider-vertical {\n border-right-color: #222222;\n border-left-color: #111111;\n}\n\n.navbar-inverse .nav li.dropdown.open > .dropdown-toggle,\n.navbar-inverse .nav li.dropdown.active > .dropdown-toggle,\n.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {\n color: #ffffff;\n background-color: #111111;\n}\n\n.navbar-inverse .nav li.dropdown > a:hover .caret {\n border-top-color: #ffffff;\n border-bottom-color: #ffffff;\n}\n\n.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {\n border-top-color: #999999;\n border-bottom-color: #999999;\n}\n\n.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret,\n.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret,\n.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {\n border-top-color: #ffffff;\n border-bottom-color: #ffffff;\n}\n\n.navbar-inverse .navbar-search .search-query {\n color: #ffffff;\n background-color: #515151;\n border-color: #111111;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);\n -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);\n -webkit-transition: none;\n -moz-transition: none;\n -o-transition: none;\n transition: none;\n}\n\n.navbar-inverse .navbar-search .search-query:-moz-placeholder {\n color: #cccccc;\n}\n\n.navbar-inverse .navbar-search .search-query:-ms-input-placeholder {\n color: #cccccc;\n}\n\n.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {\n color: #cccccc;\n}\n\n.navbar-inverse .navbar-search .search-query:focus,\n.navbar-inverse .navbar-search .search-query.focused {\n padding: 5px 15px;\n color: #333333;\n text-shadow: 0 1px 0 #ffffff;\n background-color: #ffffff;\n border: 0;\n outline: 0;\n -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\n -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);\n}\n\n.navbar-inverse .btn-navbar {\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #0e0e0e;\n *background-color: #040404;\n background-image: -moz-linear-gradient(top, #151515, #040404);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));\n background-image: -webkit-linear-gradient(top, #151515, #040404);\n background-image: -o-linear-gradient(top, #151515, #040404);\n background-image: linear-gradient(to bottom, #151515, #040404);\n background-repeat: repeat-x;\n border-color: #040404 #040404 #000000;\n border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\n}\n\n.navbar-inverse .btn-navbar:hover,\n.navbar-inverse .btn-navbar:active,\n.navbar-inverse .btn-navbar.active,\n.navbar-inverse .btn-navbar.disabled,\n.navbar-inverse .btn-navbar[disabled] {\n color: #ffffff;\n background-color: #040404;\n *background-color: #000000;\n}\n\n.navbar-inverse .btn-navbar:active,\n.navbar-inverse .btn-navbar.active {\n background-color: #000000 \\9;\n}\n\n.breadcrumb {\n padding: 8px 15px;\n margin: 0 0 20px;\n list-style: none;\n background-color: #f5f5f5;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n}\n\n.breadcrumb > li {\n display: inline-block;\n *display: inline;\n text-shadow: 0 1px 0 #ffffff;\n *zoom: 1;\n}\n\n.breadcrumb > li > .divider {\n padding: 0 5px;\n color: #ccc;\n}\n\n.breadcrumb > .active {\n color: #999999;\n}\n\n.pagination {\n margin: 20px 0;\n}\n\n.pagination ul {\n display: inline-block;\n *display: inline;\n margin-bottom: 0;\n margin-left: 0;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n *zoom: 1;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n\n.pagination ul > li {\n display: inline;\n}\n\n.pagination ul > li > a,\n.pagination ul > li > span {\n float: left;\n padding: 4px 12px;\n line-height: 20px;\n text-decoration: none;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-left-width: 0;\n}\n\n.pagination ul > li > a:hover,\n.pagination ul > .active > a,\n.pagination ul > .active > span {\n background-color: #f5f5f5;\n}\n\n.pagination ul > .active > a,\n.pagination ul > .active > span {\n color: #999999;\n cursor: default;\n}\n\n.pagination ul > .disabled > span,\n.pagination ul > .disabled > a,\n.pagination ul > .disabled > a:hover {\n color: #999999;\n cursor: default;\n background-color: transparent;\n}\n\n.pagination ul > li:first-child > a,\n.pagination ul > li:first-child > span {\n border-left-width: 1px;\n -webkit-border-bottom-left-radius: 4px;\n border-bottom-left-radius: 4px;\n -webkit-border-top-left-radius: 4px;\n border-top-left-radius: 4px;\n -moz-border-radius-bottomleft: 4px;\n -moz-border-radius-topleft: 4px;\n}\n\n.pagination ul > li:last-child > a,\n.pagination ul > li:last-child > span {\n -webkit-border-top-right-radius: 4px;\n border-top-right-radius: 4px;\n -webkit-border-bottom-right-radius: 4px;\n border-bottom-right-radius: 4px;\n -moz-border-radius-topright: 4px;\n -moz-border-radius-bottomright: 4px;\n}\n\n.pagination-centered {\n text-align: center;\n}\n\n.pagination-right {\n text-align: right;\n}\n\n.pagination-large ul > li > a,\n.pagination-large ul > li > span {\n padding: 11px 19px;\n font-size: 17.5px;\n}\n\n.pagination-large ul > li:first-child > a,\n.pagination-large ul > li:first-child > span {\n -webkit-border-bottom-left-radius: 6px;\n border-bottom-left-radius: 6px;\n -webkit-border-top-left-radius: 6px;\n border-top-left-radius: 6px;\n -moz-border-radius-bottomleft: 6px;\n -moz-border-radius-topleft: 6px;\n}\n\n.pagination-large ul > li:last-child > a,\n.pagination-large ul > li:last-child > span {\n -webkit-border-top-right-radius: 6px;\n border-top-right-radius: 6px;\n -webkit-border-bottom-right-radius: 6px;\n border-bottom-right-radius: 6px;\n -moz-border-radius-topright: 6px;\n -moz-border-radius-bottomright: 6px;\n}\n\n.pagination-mini ul > li:first-child > a,\n.pagination-small ul > li:first-child > a,\n.pagination-mini ul > li:first-child > span,\n.pagination-small ul > li:first-child > span {\n -webkit-border-bottom-left-radius: 3px;\n border-bottom-left-radius: 3px;\n -webkit-border-top-left-radius: 3px;\n border-top-left-radius: 3px;\n -moz-border-radius-bottomleft: 3px;\n -moz-border-radius-topleft: 3px;\n}\n\n.pagination-mini ul > li:last-child > a,\n.pagination-small ul > li:last-child > a,\n.pagination-mini ul > li:last-child > span,\n.pagination-small ul > li:last-child > span {\n -webkit-border-top-right-radius: 3px;\n border-top-right-radius: 3px;\n -webkit-border-bottom-right-radius: 3px;\n border-bottom-right-radius: 3px;\n -moz-border-radius-topright: 3px;\n -moz-border-radius-bottomright: 3px;\n}\n\n.pagination-small ul > li > a,\n.pagination-small ul > li > span {\n padding: 2px 10px;\n font-size: 11.9px;\n}\n\n.pagination-mini ul > li > a,\n.pagination-mini ul > li > span {\n padding: 0 6px;\n font-size: 10.5px;\n}\n\n.pager {\n margin: 20px 0;\n text-align: center;\n list-style: none;\n *zoom: 1;\n}\n\n.pager:before,\n.pager:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.pager:after {\n clear: both;\n}\n\n.pager li {\n display: inline;\n}\n\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n -webkit-border-radius: 15px;\n -moz-border-radius: 15px;\n border-radius: 15px;\n}\n\n.pager li > a:hover {\n text-decoration: none;\n background-color: #f5f5f5;\n}\n\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > span {\n color: #999999;\n cursor: default;\n background-color: #fff;\n}\n\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000000;\n}\n\n.modal-backdrop.fade {\n opacity: 0;\n}\n\n.modal-backdrop,\n.modal-backdrop.fade.in {\n opacity: 0.8;\n filter: alpha(opacity=80);\n}\n\n.modal {\n position: fixed;\n top: 10%;\n left: 50%;\n z-index: 1050;\n width: 560px;\n margin-left: -280px;\n background-color: #ffffff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.3);\n *border: 1px solid #999;\n -webkit-border-radius: 6px;\n -moz-border-radius: 6px;\n border-radius: 6px;\n outline: none;\n -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);\n -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);\n box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);\n -webkit-background-clip: padding-box;\n -moz-background-clip: padding-box;\n background-clip: padding-box;\n}\n\n.modal.fade {\n top: -25%;\n -webkit-transition: opacity 0.3s linear, top 0.3s ease-out;\n -moz-transition: opacity 0.3s linear, top 0.3s ease-out;\n -o-transition: opacity 0.3s linear, top 0.3s ease-out;\n transition: opacity 0.3s linear, top 0.3s ease-out;\n}\n\n.modal.fade.in {\n top: 10%;\n}\n\n.modal-header {\n padding: 9px 15px;\n border-bottom: 1px solid #eee;\n}\n\n.modal-header .close {\n margin-top: 2px;\n}\n\n.modal-header h3 {\n margin: 0;\n line-height: 30px;\n}\n\n.modal-body {\n position: relative;\n max-height: 400px;\n padding: 15px;\n overflow-y: auto;\n}\n\n.modal-form {\n margin-bottom: 0;\n}\n\n.modal-footer {\n padding: 14px 15px 15px;\n margin-bottom: 0;\n text-align: right;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n -webkit-border-radius: 0 0 6px 6px;\n -moz-border-radius: 0 0 6px 6px;\n border-radius: 0 0 6px 6px;\n *zoom: 1;\n -webkit-box-shadow: inset 0 1px 0 #ffffff;\n -moz-box-shadow: inset 0 1px 0 #ffffff;\n box-shadow: inset 0 1px 0 #ffffff;\n}\n\n.modal-footer:before,\n.modal-footer:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.modal-footer:after {\n clear: both;\n}\n\n.modal-footer .btn + .btn {\n margin-bottom: 0;\n margin-left: 5px;\n}\n\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n\n.tooltip {\n position: absolute;\n z-index: 1030;\n display: block;\n padding: 5px;\n font-size: 11px;\n opacity: 0;\n filter: alpha(opacity=0);\n visibility: visible;\n}\n\n.tooltip.in {\n opacity: 0.8;\n filter: alpha(opacity=80);\n}\n\n.tooltip.top {\n margin-top: -3px;\n}\n\n.tooltip.right {\n margin-left: 3px;\n}\n\n.tooltip.bottom {\n margin-top: 3px;\n}\n\n.tooltip.left {\n margin-left: -3px;\n}\n\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #ffffff;\n text-align: center;\n text-decoration: none;\n background-color: #000000;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n}\n\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-top-color: #000000;\n border-width: 5px 5px 0;\n}\n\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-right-color: #000000;\n border-width: 5px 5px 5px 0;\n}\n\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-left-color: #000000;\n border-width: 5px 0 5px 5px;\n}\n\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-bottom-color: #000000;\n border-width: 0 5px 5px;\n}\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1010;\n display: none;\n width: 236px;\n padding: 1px;\n text-align: left;\n white-space: normal;\n background-color: #ffffff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n -webkit-border-radius: 6px;\n -moz-border-radius: 6px;\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n -webkit-background-clip: padding-box;\n -moz-background-clip: padding;\n background-clip: padding-box;\n}\n\n.popover.top {\n margin-top: -10px;\n}\n\n.popover.right {\n margin-left: 10px;\n}\n\n.popover.bottom {\n margin-top: 10px;\n}\n\n.popover.left {\n margin-left: -10px;\n}\n\n.popover-title {\n padding: 8px 14px;\n margin: 0;\n font-size: 14px;\n font-weight: normal;\n line-height: 18px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n -webkit-border-radius: 5px 5px 0 0;\n -moz-border-radius: 5px 5px 0 0;\n border-radius: 5px 5px 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n.popover .arrow,\n.popover .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n\n.popover .arrow {\n border-width: 11px;\n}\n\n.popover .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n\n.popover.top .arrow {\n bottom: -11px;\n left: 50%;\n margin-left: -11px;\n border-top-color: #999;\n border-top-color: rgba(0, 0, 0, 0.25);\n border-bottom-width: 0;\n}\n\n.popover.top .arrow:after {\n bottom: 1px;\n margin-left: -10px;\n border-top-color: #ffffff;\n border-bottom-width: 0;\n}\n\n.popover.right .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-right-color: #999;\n border-right-color: rgba(0, 0, 0, 0.25);\n border-left-width: 0;\n}\n\n.popover.right .arrow:after {\n bottom: -10px;\n left: 1px;\n border-right-color: #ffffff;\n border-left-width: 0;\n}\n\n.popover.bottom .arrow {\n top: -11px;\n left: 50%;\n margin-left: -11px;\n border-bottom-color: #999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n border-top-width: 0;\n}\n\n.popover.bottom .arrow:after {\n top: 1px;\n margin-left: -10px;\n border-bottom-color: #ffffff;\n border-top-width: 0;\n}\n\n.popover.left .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-left-color: #999;\n border-left-color: rgba(0, 0, 0, 0.25);\n border-right-width: 0;\n}\n\n.popover.left .arrow:after {\n right: 1px;\n bottom: -10px;\n border-left-color: #ffffff;\n border-right-width: 0;\n}\n\n.thumbnails {\n margin-left: -20px;\n list-style: none;\n *zoom: 1;\n}\n\n.thumbnails:before,\n.thumbnails:after {\n display: table;\n line-height: 0;\n content: \"\";\n}\n\n.thumbnails:after {\n clear: both;\n}\n\n.row-fluid .thumbnails {\n margin-left: 0;\n}\n\n.thumbnails > li {\n float: left;\n margin-bottom: 20px;\n margin-left: 20px;\n}\n\n.thumbnail {\n display: block;\n padding: 4px;\n line-height: 20px;\n border: 1px solid #ddd;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);\n -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);\n -webkit-transition: all 0.2s ease-in-out;\n -moz-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n}\n\na.thumbnail:hover {\n border-color: #0088cc;\n -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);\n -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);\n box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);\n}\n\n.thumbnail > img {\n display: block;\n max-width: 100%;\n margin-right: auto;\n margin-left: auto;\n}\n\n.thumbnail .caption {\n padding: 9px;\n color: #555555;\n}\n\n.media,\n.media-body {\n overflow: hidden;\n *overflow: visible;\n zoom: 1;\n}\n\n.media,\n.media .media {\n margin-top: 15px;\n}\n\n.media:first-child {\n margin-top: 0;\n}\n\n.media-object {\n display: block;\n}\n\n.media-heading {\n margin: 0 0 5px;\n}\n\n.media .pull-left {\n margin-right: 10px;\n}\n\n.media .pull-right {\n margin-left: 10px;\n}\n\n.media-list {\n margin-left: 0;\n list-style: none;\n}\n\n.label,\n.badge {\n display: inline-block;\n padding: 2px 4px;\n font-size: 11.844px;\n font-weight: bold;\n line-height: 14px;\n color: #ffffff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n white-space: nowrap;\n vertical-align: baseline;\n background-color: #999999;\n}\n\n.label {\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n\n.badge {\n padding-right: 9px;\n padding-left: 9px;\n -webkit-border-radius: 9px;\n -moz-border-radius: 9px;\n border-radius: 9px;\n}\n\n.label:empty,\n.badge:empty {\n display: none;\n}\n\na.label:hover,\na.badge:hover {\n color: #ffffff;\n text-decoration: none;\n cursor: pointer;\n}\n\n.label-important,\n.badge-important {\n background-color: #b94a48;\n}\n\n.label-important[href],\n.badge-important[href] {\n background-color: #953b39;\n}\n\n.label-warning,\n.badge-warning {\n background-color: #f89406;\n}\n\n.label-warning[href],\n.badge-warning[href] {\n background-color: #c67605;\n}\n\n.label-success,\n.badge-success {\n background-color: #468847;\n}\n\n.label-success[href],\n.badge-success[href] {\n background-color: #356635;\n}\n\n.label-info,\n.badge-info {\n background-color: #3a87ad;\n}\n\n.label-info[href],\n.badge-info[href] {\n background-color: #2d6987;\n}\n\n.label-inverse,\n.badge-inverse {\n background-color: #333333;\n}\n\n.label-inverse[href],\n.badge-inverse[href] {\n background-color: #1a1a1a;\n}\n\n.btn .label,\n.btn .badge {\n position: relative;\n top: -1px;\n}\n\n.btn-mini .label,\n.btn-mini .badge {\n top: 0;\n}\n\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n\n@-moz-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n\n@-ms-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n\n@-o-keyframes progress-bar-stripes {\n from {\n background-position: 0 0;\n }\n to {\n background-position: 40px 0;\n }\n}\n\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n\n.progress {\n height: 20px;\n margin-bottom: 20px;\n overflow: hidden;\n background-color: #f7f7f7;\n background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));\n background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);\n background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);\n background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9);\n background-repeat: repeat-x;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n\n.progress .bar {\n float: left;\n width: 0;\n height: 100%;\n font-size: 12px;\n color: #ffffff;\n text-align: center;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n background-color: #0e90d2;\n background-image: -moz-linear-gradient(top, #149bdf, #0480be);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));\n background-image: -webkit-linear-gradient(top, #149bdf, #0480be);\n background-image: -o-linear-gradient(top, #149bdf, #0480be);\n background-image: linear-gradient(to bottom, #149bdf, #0480be);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-transition: width 0.6s ease;\n -moz-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n\n.progress .bar + .bar {\n -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n}\n\n.progress-striped .bar {\n background-color: #149bdf;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n -webkit-background-size: 40px 40px;\n -moz-background-size: 40px 40px;\n -o-background-size: 40px 40px;\n background-size: 40px 40px;\n}\n\n.progress.active .bar {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -moz-animation: progress-bar-stripes 2s linear infinite;\n -ms-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n\n.progress-danger .bar,\n.progress .bar-danger {\n background-color: #dd514c;\n background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));\n background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);\n background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);\n background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);\n}\n\n.progress-danger.progress-striped .bar,\n.progress-striped .bar-danger {\n background-color: #ee5f5b;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n\n.progress-success .bar,\n.progress .bar-success {\n background-color: #5eb95e;\n background-image: -moz-linear-gradient(top, #62c462, #57a957);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));\n background-image: -webkit-linear-gradient(top, #62c462, #57a957);\n background-image: -o-linear-gradient(top, #62c462, #57a957);\n background-image: linear-gradient(to bottom, #62c462, #57a957);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);\n}\n\n.progress-success.progress-striped .bar,\n.progress-striped .bar-success {\n background-color: #62c462;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n\n.progress-info .bar,\n.progress .bar-info {\n background-color: #4bb1cf;\n background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));\n background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);\n background-image: -o-linear-gradient(top, #5bc0de, #339bb9);\n background-image: linear-gradient(to bottom, #5bc0de, #339bb9);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);\n}\n\n.progress-info.progress-striped .bar,\n.progress-striped .bar-info {\n background-color: #5bc0de;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n\n.progress-warning .bar,\n.progress .bar-warning {\n background-color: #faa732;\n background-image: -moz-linear-gradient(top, #fbb450, #f89406);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));\n background-image: -webkit-linear-gradient(top, #fbb450, #f89406);\n background-image: -o-linear-gradient(top, #fbb450, #f89406);\n background-image: linear-gradient(to bottom, #fbb450, #f89406);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);\n}\n\n.progress-warning.progress-striped .bar,\n.progress-striped .bar-warning {\n background-color: #fbb450;\n background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n\n.accordion {\n margin-bottom: 20px;\n}\n\n.accordion-group {\n margin-bottom: 2px;\n border: 1px solid #e5e5e5;\n -webkit-border-radius: 4px;\n -moz-border-radius: 4px;\n border-radius: 4px;\n}\n\n.accordion-heading {\n border-bottom: 0;\n}\n\n.accordion-heading .accordion-toggle {\n display: block;\n padding: 8px 15px;\n}\n\n.accordion-toggle {\n cursor: pointer;\n}\n\n.accordion-inner {\n padding: 9px 15px;\n border-top: 1px solid #e5e5e5;\n}\n\n.carousel {\n position: relative;\n margin-bottom: 20px;\n line-height: 1;\n}\n\n.carousel-inner {\n position: relative;\n width: 100%;\n overflow: hidden;\n}\n\n.carousel-inner > .item {\n position: relative;\n display: none;\n -webkit-transition: 0.6s ease-in-out left;\n -moz-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n\n.carousel-inner > .item > img {\n display: block;\n line-height: 1;\n}\n\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n\n.carousel-inner > .active {\n left: 0;\n}\n\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n\n.carousel-inner > .next {\n left: 100%;\n}\n\n.carousel-inner > .prev {\n left: -100%;\n}\n\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n\n.carousel-inner > .active.left {\n left: -100%;\n}\n\n.carousel-inner > .active.right {\n left: 100%;\n}\n\n.carousel-control {\n position: absolute;\n top: 40%;\n left: 15px;\n width: 40px;\n height: 40px;\n margin-top: -20px;\n font-size: 60px;\n font-weight: 100;\n line-height: 30px;\n color: #ffffff;\n text-align: center;\n background: #222222;\n border: 3px solid #ffffff;\n -webkit-border-radius: 23px;\n -moz-border-radius: 23px;\n border-radius: 23px;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n\n.carousel-control.right {\n right: 15px;\n left: auto;\n}\n\n.carousel-control:hover {\n color: #ffffff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n\n.carousel-caption {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n padding: 15px;\n background: #333333;\n background: rgba(0, 0, 0, 0.75);\n}\n\n.carousel-caption h4,\n.carousel-caption p {\n line-height: 20px;\n color: #ffffff;\n}\n\n.carousel-caption h4 {\n margin: 0 0 5px;\n}\n\n.carousel-caption p {\n margin-bottom: 0;\n}\n\n.hero-unit {\n padding: 60px;\n margin-bottom: 30px;\n font-size: 18px;\n font-weight: 200;\n line-height: 30px;\n color: inherit;\n background-color: #eeeeee;\n -webkit-border-radius: 6px;\n -moz-border-radius: 6px;\n border-radius: 6px;\n}\n\n.hero-unit h1 {\n margin-bottom: 0;\n font-size: 60px;\n line-height: 1;\n letter-spacing: -1px;\n color: inherit;\n}\n\n.hero-unit li {\n line-height: 30px;\n}\n\n.pull-right {\n float: right;\n}\n\n.pull-left {\n float: left;\n}\n\n.hide {\n display: none;\n}\n\n.show {\n display: block;\n}\n\n.invisible {\n visibility: hidden;\n}\n\n.affix {\n position: fixed;\n}\n\n /* END /usr/lib64/python2.7/site-packages/bokeh/server/static/vendor/bokehjs/vendor/bootstrap/css/bootstrap.css */\n \n </style>\n \n \n <script type=\"text/javascript\">\n \n // BEGIN /usr/lib64/python2.7/site-packages/bokeh/server/static/js/application.js\n (function(){if (!Date.now) Date.now = function() {\n return +new Date;\n};\ntry {\n document.createElement(\"div\").style.setProperty(\"opacity\", 0, \"\");\n} catch (error) {\n var d3_style_prototype = CSSStyleDeclaration.prototype,\n d3_style_setProperty = d3_style_prototype.setProperty;\n d3_style_prototype.setProperty = function(name, value, priority) {\n d3_style_setProperty.call(this, name, value + \"\", priority);\n };\n}\nd3 = {version: \"2.8.1\"}; // semver\nfunction d3_class(ctor, properties) {\n try {\n for (var key in properties) {\n Object.defineProperty(ctor.prototype, key, {\n value: properties[key],\n enumerable: false\n });\n }\n } catch (e) {\n ctor.prototype = properties;\n }\n}\nvar d3_array = d3_arraySlice; // conversion for NodeLists\n\nfunction d3_arrayCopy(pseudoarray) {\n var i = -1, n = pseudoarray.length, array = [];\n while (++i < n) array.push(pseudoarray[i]);\n return array;\n}\n\nfunction d3_arraySlice(pseudoarray) {\n return Array.prototype.slice.call(pseudoarray);\n}\n\ntry {\n d3_array(document.documentElement.childNodes)[0].nodeType;\n} catch(e) {\n d3_array = d3_arrayCopy;\n}\n\nvar d3_arraySubclass = [].__proto__?\n\n// Until ECMAScript supports array subclassing, prototype injection works well.\nfunction(array, prototype) {\n array.__proto__ = prototype;\n}:\n\n// And if your browser doesn't support __proto__, we'll use direct extension.\nfunction(array, prototype) {\n for (var property in prototype) array[property] = prototype[property];\n};\nd3.map = function(object) {\n var map = new d3_Map;\n for (var key in object) map.set(key, object[key]);\n return map;\n};\n\nfunction d3_Map() {}\n\nd3_class(d3_Map, {\n has: function(key) {\n return d3_map_prefix + key in this;\n },\n get: function(key) {\n return this[d3_map_prefix + key];\n },\n set: function(key, value) {\n return this[d3_map_prefix + key] = value;\n },\n remove: function(key) {\n key = d3_map_prefix + key;\n return key in this && delete this[key];\n },\n keys: function() {\n var keys = [];\n this.forEach(function(key) { keys.push(key); });\n return keys;\n },\n values: function() {\n var values = [];\n this.forEach(function(key, value) { values.push(value); });\n return values;\n },\n entries: function() {\n var entries = [];\n this.forEach(function(key, value) { entries.push({key: key, value: value}); });\n return entries;\n },\n forEach: function(f) {\n for (var key in this) {\n if (key.charCodeAt(0) === d3_map_prefixCode) {\n f.call(this, key.substring(1), this[key]);\n }\n }\n }\n});\n\nvar d3_map_prefix = \"\\0\", // prevent collision with built-ins\n d3_map_prefixCode = d3_map_prefix.charCodeAt(0);\nfunction d3_this() {\n return this;\n}\nd3.functor = function(v) {\n return typeof v === \"function\" ? v : function() { return v; };\n};\n// Copies a variable number of methods from source to target.\nd3.rebind = function(target, source) {\n var i = 1, n = arguments.length, method;\n while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);\n return target;\n};\n\n// Method is assumed to be a standard D3 getter-setter:\n// If passed with no arguments, gets the value.\n// If passed with arguments, sets the value and returns the target.\nfunction d3_rebind(target, source, method) {\n return function() {\n var value = method.apply(source, arguments);\n return arguments.length ? target : value;\n };\n}\nd3.ascending = function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n};\nd3.descending = function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n};\nd3.mean = function(array, f) {\n var n = array.length,\n a,\n m = 0,\n i = -1,\n j = 0;\n if (arguments.length === 1) {\n while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j;\n } else {\n while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j;\n }\n return j ? m : undefined;\n};\nd3.median = function(array, f) {\n if (arguments.length > 1) array = array.map(f);\n array = array.filter(d3_number);\n return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined;\n};\nd3.min = function(array, f) {\n var i = -1,\n n = array.length,\n a,\n b;\n if (arguments.length === 1) {\n while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;\n while (++i < n) if ((b = array[i]) != null && a > b) a = b;\n } else {\n while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;\n }\n return a;\n};\nd3.max = function(array, f) {\n var i = -1,\n n = array.length,\n a,\n b;\n if (arguments.length === 1) {\n while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;\n while (++i < n) if ((b = array[i]) != null && b > a) a = b;\n } else {\n while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;\n while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;\n }\n return a;\n};\nd3.extent = function(array, f) {\n var i = -1,\n n = array.length,\n a,\n b,\n c;\n if (arguments.length === 1) {\n while (++i < n && ((a = c = array[i]) == null || a != a)) a = c = undefined;\n while (++i < n) if ((b = array[i]) != null) {\n if (a > b) a = b;\n if (c < b) c = b;\n }\n } else {\n while (++i < n && ((a = c = f.call(array, array[i], i)) == null || a != a)) a = undefined;\n while (++i < n) if ((b = f.call(array, array[i], i)) != null) {\n if (a > b) a = b;\n if (c < b) c = b;\n }\n }\n return [a, c];\n};\nd3.random = {\n normal: function(mean, deviation) {\n if (arguments.length < 2) deviation = 1;\n if (arguments.length < 1) mean = 0;\n return function() {\n var x, y, r;\n do {\n x = Math.random() * 2 - 1;\n y = Math.random() * 2 - 1;\n r = x * x + y * y;\n } while (!r || r > 1);\n return mean + deviation * x * Math.sqrt(-2 * Math.log(r) / r);\n };\n }\n};\nfunction d3_number(x) {\n return x != null && !isNaN(x);\n}\nd3.sum = function(array, f) {\n var s = 0,\n n = array.length,\n a,\n i = -1;\n\n if (arguments.length === 1) {\n while (++i < n) if (!isNaN(a = +array[i])) s += a;\n } else {\n while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;\n }\n\n return s;\n};\n// R-7 per <http://en.wikipedia.org/wiki/Quantile>\nd3.quantile = function(values, p) {\n var H = (values.length - 1) * p + 1,\n h = Math.floor(H),\n v = values[h - 1],\n e = H - h;\n return e ? v + e * (values[h] - v) : v;\n};\nd3.transpose = function(matrix) {\n return d3.zip.apply(d3, matrix);\n};\nd3.zip = function() {\n if (!(n = arguments.length)) return [];\n for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m;) {\n for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n;) {\n zip[j] = arguments[j][i];\n }\n }\n return zips;\n};\n\nfunction d3_zipLength(d) {\n return d.length;\n}\nd3.bisector = function(f) {\n return {\n left: function(a, x, lo, hi) {\n if (arguments.length < 3) lo = 0;\n if (arguments.length < 4) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >> 1;\n if (f.call(a, a[mid], mid) < x) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n },\n right: function(a, x, lo, hi) {\n if (arguments.length < 3) lo = 0;\n if (arguments.length < 4) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >> 1;\n if (x < f.call(a, a[mid], mid)) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n };\n};\n\nvar d3_bisector = d3.bisector(function(d) { return d; });\nd3.bisectLeft = d3_bisector.left;\nd3.bisect = d3.bisectRight = d3_bisector.right;\nd3.first = function(array, f) {\n var i = 0,\n n = array.length,\n a = array[0],\n b;\n if (arguments.length === 1) f = d3.ascending;\n while (++i < n) {\n if (f.call(array, a, b = array[i]) > 0) {\n a = b;\n }\n }\n return a;\n};\nd3.last = function(array, f) {\n var i = 0,\n n = array.length,\n a = array[0],\n b;\n if (arguments.length === 1) f = d3.ascending;\n while (++i < n) {\n if (f.call(array, a, b = array[i]) <= 0) {\n a = b;\n }\n }\n return a;\n};\nd3.nest = function() {\n var nest = {},\n keys = [],\n sortKeys = [],\n sortValues,\n rollup;\n\n function map(array, depth) {\n if (depth >= keys.length) return rollup\n ? rollup.call(nest, array) : (sortValues\n ? array.sort(sortValues)\n : array);\n\n var i = -1,\n n = array.length,\n key = keys[depth++],\n keyValue,\n object,\n valuesByKey = new d3_Map,\n values,\n o = {};\n\n while (++i < n) {\n if (values = valuesByKey.get(keyValue = key(object = array[i]))) {\n values.push(object);\n } else {\n valuesByKey.set(keyValue, [object]);\n }\n }\n\n valuesByKey.forEach(function(keyValue) {\n o[keyValue] = map(valuesByKey.get(keyValue), depth);\n });\n\n return o;\n }\n\n function entries(map, depth) {\n if (depth >= keys.length) return map;\n\n var a = [],\n sortKey = sortKeys[depth++],\n key;\n\n for (key in map) {\n a.push({key: key, values: entries(map[key], depth)});\n }\n\n if (sortKey) a.sort(function(a, b) {\n return sortKey(a.key, b.key);\n });\n\n return a;\n }\n\n nest.map = function(array) {\n return map(array, 0);\n };\n\n nest.entries = function(array) {\n return entries(map(array, 0), 0);\n };\n\n nest.key = function(d) {\n keys.push(d);\n return nest;\n };\n\n // Specifies the order for the most-recently specified key.\n // Note: only applies to entries. Map keys are unordered!\n nest.sortKeys = function(order) {\n sortKeys[keys.length - 1] = order;\n return nest;\n };\n\n // Specifies the order for leaf values.\n // Applies to both maps and entries array.\n nest.sortValues = function(order) {\n sortValues = order;\n return nest;\n };\n\n nest.rollup = function(f) {\n rollup = f;\n return nest;\n };\n\n return nest;\n};\nd3.keys = function(map) {\n var keys = [];\n for (var key in map) keys.push(key);\n return keys;\n};\nd3.values = function(map) {\n var values = [];\n for (var key in map) values.push(map[key]);\n return values;\n};\nd3.entries = function(map) {\n var entries = [];\n for (var key in map) entries.push({key: key, value: map[key]});\n return entries;\n};\nd3.permute = function(array, indexes) {\n var permutes = [],\n i = -1,\n n = indexes.length;\n while (++i < n) permutes[i] = array[indexes[i]];\n return permutes;\n};\nd3.merge = function(arrays) {\n return Array.prototype.concat.apply([], arrays);\n};\nd3.split = function(array, f) {\n var arrays = [],\n values = [],\n value,\n i = -1,\n n = array.length;\n if (arguments.length < 2) f = d3_splitter;\n while (++i < n) {\n if (f.call(values, value = array[i], i)) {\n values = [];\n } else {\n if (!values.length) arrays.push(values);\n values.push(value);\n }\n }\n return arrays;\n};\n\nfunction d3_splitter(d) {\n return d == null;\n}\nfunction d3_collapse(s) {\n return s.replace(/(^\\s+)|(\\s+$)/g, \"\").replace(/\\s+/g, \" \");\n}\nd3.range = function(start, stop, step) {\n if (arguments.length < 3) {\n step = 1;\n if (arguments.length < 2) {\n stop = start;\n start = 0;\n }\n }\n if ((stop - start) / step === Infinity) throw new Error(\"infinite range\");\n var range = [],\n k = d3_range_integerScale(Math.abs(step)),\n i = -1,\n j;\n start *= k, stop *= k, step *= k;\n if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k);\n else while ((j = start + step * ++i) < stop) range.push(j / k);\n return range;\n};\n\nfunction d3_range_integerScale(x) {\n var k = 1;\n while (x * k % 1) k *= 10;\n return k;\n}\nd3.requote = function(s) {\n return s.replace(d3_requote_re, \"\\\\$&\");\n};\n\nvar d3_requote_re = /[\\\\\\^\\$\\*\\+\\?\\|\\[\\]\\(\\)\\.\\{\\}]/g;\nd3.round = function(x, n) {\n return n\n ? Math.round(x * (n = Math.pow(10, n))) / n\n : Math.round(x);\n};\nd3.xhr = function(url, mime, callback) {\n var req = new XMLHttpRequest;\n if (arguments.length < 3) callback = mime, mime = null;\n else if (mime && req.overrideMimeType) req.overrideMimeType(mime);\n req.open(\"GET\", url, true);\n if (mime) req.setRequestHeader(\"Accept\", mime);\n req.onreadystatechange = function() {\n if (req.readyState === 4) callback(req.status < 300 ? req : null);\n };\n req.send(null);\n};\nd3.text = function(url, mime, callback) {\n function ready(req) {\n callback(req && req.responseText);\n }\n if (arguments.length < 3) {\n callback = mime;\n mime = null;\n }\n d3.xhr(url, mime, ready);\n};\nd3.json = function(url, callback) {\n d3.text(url, \"application/json\", function(text) {\n callback(text ? JSON.parse(text) : null);\n });\n};\nd3.html = function(url, callback) {\n d3.text(url, \"text/html\", function(text) {\n if (text != null) { // Treat empty string as valid HTML.\n var range = document.createRange();\n range.selectNode(document.body);\n text = range.createContextualFragment(text);\n }\n callback(text);\n });\n};\nd3.xml = function(url, mime, callback) {\n function ready(req) {\n callback(req && req.responseXML);\n }\n if (arguments.length < 3) {\n callback = mime;\n mime = null;\n }\n d3.xhr(url, mime, ready);\n};\nvar d3_nsPrefix = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: \"http://www.w3.org/1999/xhtml\",\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n\nd3.ns = {\n prefix: d3_nsPrefix,\n qualify: function(name) {\n var i = name.indexOf(\":\"),\n prefix = name;\n if (i >= 0) {\n prefix = name.substring(0, i);\n name = name.substring(i + 1);\n }\n return d3_nsPrefix.hasOwnProperty(prefix)\n ? {space: d3_nsPrefix[prefix], local: name}\n : name;\n }\n};\nd3.dispatch = function() {\n var dispatch = new d3_dispatch,\n i = -1,\n n = arguments.length;\n while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n return dispatch;\n};\n\nfunction d3_dispatch() {}\n\nd3_dispatch.prototype.on = function(type, listener) {\n var i = type.indexOf(\".\"),\n name = \"\";\n\n // Extract optional namespace, e.g., \"click.foo\"\n if (i > 0) {\n name = type.substring(i + 1);\n type = type.substring(0, i);\n }\n\n return arguments.length < 2\n ? this[type].on(name)\n : this[type].on(name, listener);\n};\n\nfunction d3_dispatch_event(dispatch) {\n var listeners = [],\n listenerByName = new d3_Map;\n\n function event() {\n var z = listeners, // defensive reference\n i = -1,\n n = z.length,\n l;\n while (++i < n) if (l = z[i].on) l.apply(this, arguments);\n return dispatch;\n }\n\n event.on = function(name, listener) {\n var l = listenerByName.get(name),\n i;\n\n // return the current listener, if any\n if (arguments.length < 2) return l && l.on;\n\n // remove the old listener, if any (with copy-on-write)\n if (l) {\n l.on = null;\n listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));\n listenerByName.remove(name);\n }\n\n // add the new listener, if any\n if (listener) listeners.push(listenerByName.set(name, {on: listener}));\n\n return dispatch;\n };\n\n return event;\n}\n// TODO align\nd3.format = function(specifier) {\n var match = d3_format_re.exec(specifier),\n fill = match[1] || \" \",\n sign = match[3] || \"\",\n zfill = match[5],\n width = +match[6],\n comma = match[7],\n precision = match[8],\n type = match[9],\n scale = 1,\n suffix = \"\",\n integer = false;\n\n if (precision) precision = +precision.substring(1);\n\n if (zfill) {\n fill = \"0\"; // TODO align = \"=\";\n if (comma) width -= Math.floor((width - 1) / 4);\n }\n\n switch (type) {\n case \"n\": comma = true; type = \"g\"; break;\n case \"%\": scale = 100; suffix = \"%\"; type = \"f\"; break;\n case \"p\": scale = 100; suffix = \"%\"; type = \"r\"; break;\n case \"d\": integer = true; precision = 0; break;\n case \"s\": scale = -1; type = \"r\"; break;\n }\n\n // If no precision is specified for r, fallback to general notation.\n if (type == \"r\" && !precision) type = \"g\";\n\n type = d3_format_types.get(type) || d3_format_typeDefault;\n\n return function(value) {\n\n // Return the empty string for floats formatted as ints.\n if (integer && (value % 1)) return \"\";\n\n // Convert negative to positive, and record the sign prefix.\n var negative = (value < 0) && (value = -value) ? \"\\u2212\" : sign;\n\n // Apply the scale, computing it from the value's exponent for si format.\n if (scale < 0) {\n var prefix = d3.formatPrefix(value, precision);\n value *= prefix.scale;\n suffix = prefix.symbol;\n } else {\n value *= scale;\n }\n\n // Convert to the desired precision.\n value = type(value, precision);\n\n // If the fill character is 0, the sign and group is applied after the fill.\n if (zfill) {\n var length = value.length + negative.length;\n if (length < width) value = new Array(width - length + 1).join(fill) + value;\n if (comma) value = d3_format_group(value);\n value = negative + value;\n }\n\n // Otherwise (e.g., space-filling), the sign and group is applied before.\n else {\n if (comma) value = d3_format_group(value);\n value = negative + value;\n var length = value.length;\n if (length < width) value = new Array(width - length + 1).join(fill) + value;\n }\n\n return value + suffix;\n };\n};\n\n// [[fill]align][sign][#][0][width][,][.precision][type]\nvar d3_format_re = /(?:([^{])?([<>=^]))?([+\\- ])?(#)?(0)?([0-9]+)?(,)?(\\.[0-9]+)?([a-zA-Z%])?/;\n\nvar d3_format_types = d3.map({\n g: function(x, p) { return x.toPrecision(p); },\n e: function(x, p) { return x.toExponential(p); },\n f: function(x, p) { return x.toFixed(p); },\n r: function(x, p) { return d3.round(x, p = d3_format_precision(x, p)).toFixed(Math.max(0, Math.min(20, p))); }\n});\n\nfunction d3_format_precision(x, p) {\n return p - (x ? 1 + Math.floor(Math.log(x + Math.pow(10, 1 + Math.floor(Math.log(x) / Math.LN10) - p)) / Math.LN10) : 1);\n}\n\nfunction d3_format_typeDefault(x) {\n return x + \"\";\n}\n\n// Apply comma grouping for thousands.\nfunction d3_format_group(value) {\n var i = value.lastIndexOf(\".\"),\n f = i >= 0 ? value.substring(i) : (i = value.length, \"\"),\n t = [];\n while (i > 0) t.push(value.substring(i -= 3, i + 3));\n return t.reverse().join(\",\") + f;\n}\nvar d3_formatPrefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u03bc\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"].map(d3_formatPrefix);\n\nd3.formatPrefix = function(value, precision) {\n var i = 0;\n if (value) {\n if (value < 0) value *= -1;\n if (precision) value = d3.round(value, d3_format_precision(value, precision));\n i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);\n i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3));\n }\n return d3_formatPrefixes[8 + i / 3];\n};\n\nfunction d3_formatPrefix(d, i) {\n return {\n scale: Math.pow(10, (8 - i) * 3),\n symbol: d\n };\n}\n\n/*\n * TERMS OF USE - EASING EQUATIONS\n *\n * Open source under the BSD License.\n *\n * Copyright 2001 Robert Penner\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * - Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * - Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * - Neither the name of the author nor the names of contributors may be used to\n * endorse or promote products derived from this software without specific\n * prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar d3_ease_quad = d3_ease_poly(2),\n d3_ease_cubic = d3_ease_poly(3),\n d3_ease_default = function() { return d3_ease_identity; };\n\nvar d3_ease = d3.map({\n linear: d3_ease_default,\n poly: d3_ease_poly,\n quad: function() { return d3_ease_quad; },\n cubic: function() { return d3_ease_cubic; },\n sin: function() { return d3_ease_sin; },\n exp: function() { return d3_ease_exp; },\n circle: function() { return d3_ease_circle; },\n elastic: d3_ease_elastic,\n back: d3_ease_back,\n bounce: function() { return d3_ease_bounce; }\n});\n\nvar d3_ease_mode = d3.map({\n \"in\": d3_ease_identity,\n \"out\": d3_ease_reverse,\n \"in-out\": d3_ease_reflect,\n \"out-in\": function(f) { return d3_ease_reflect(d3_ease_reverse(f)); }\n});\n\nd3.ease = function(name) {\n var i = name.indexOf(\"-\"),\n t = i >= 0 ? name.substring(0, i) : name,\n m = i >= 0 ? name.substring(i + 1) : \"in\";\n t = d3_ease.get(t) || d3_ease_default;\n m = d3_ease_mode.get(m) || d3_ease_identity;\n return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1))));\n};\n\nfunction d3_ease_clamp(f) {\n return function(t) {\n return t <= 0 ? 0 : t >= 1 ? 1 : f(t);\n };\n}\n\nfunction d3_ease_reverse(f) {\n return function(t) {\n return 1 - f(1 - t);\n };\n}\n\nfunction d3_ease_reflect(f) {\n return function(t) {\n return .5 * (t < .5 ? f(2 * t) : (2 - f(2 - 2 * t)));\n };\n}\n\nfunction d3_ease_identity(t) {\n return t;\n}\n\nfunction d3_ease_poly(e) {\n return function(t) {\n return Math.pow(t, e);\n };\n}\n\nfunction d3_ease_sin(t) {\n return 1 - Math.cos(t * Math.PI / 2);\n}\n\nfunction d3_ease_exp(t) {\n return Math.pow(2, 10 * (t - 1));\n}\n\nfunction d3_ease_circle(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\n\nfunction d3_ease_elastic(a, p) {\n var s;\n if (arguments.length < 2) p = 0.45;\n if (arguments.length < 1) { a = 1; s = p / 4; }\n else s = p / (2 * Math.PI) * Math.asin(1 / a);\n return function(t) {\n return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);\n };\n}\n\nfunction d3_ease_back(s) {\n if (!s) s = 1.70158;\n return function(t) {\n return t * t * ((s + 1) * t - s);\n };\n}\n\nfunction d3_ease_bounce(t) {\n return t < 1 / 2.75 ? 7.5625 * t * t\n : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75\n : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375\n : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;\n}\nd3.event = null;\n\nfunction d3_eventCancel() {\n d3.event.stopPropagation();\n d3.event.preventDefault();\n}\n\nfunction d3_eventSource() {\n var e = d3.event, s;\n while (s = e.sourceEvent) e = s;\n return e;\n}\n\n// Like d3.dispatch, but for custom events abstracting native UI events. These\n// events have a target component (such as a brush), a target element (such as\n// the svg:g element containing the brush) and the standard arguments `d` (the\n// target element's data) and `i` (the selection index of the target element).\nfunction d3_eventDispatch(target) {\n var dispatch = new d3_dispatch,\n i = 0,\n n = arguments.length;\n\n while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);\n\n // Creates a dispatch context for the specified `thiz` (typically, the target\n // DOM element that received the source event) and `argumentz` (typically, the\n // data `d` and index `i` of the target element). The returned function can be\n // used to dispatch an event to any registered listeners; the function takes a\n // single argument as input, being the event to dispatch. The event must have\n // a \"type\" attribute which corresponds to a type registered in the\n // constructor. This context will automatically populate the \"sourceEvent\" and\n // \"target\" attributes of the event, as well as setting the `d3.event` global\n // for the duration of the notification.\n dispatch.of = function(thiz, argumentz) {\n return function(e1) {\n try {\n var e0 =\n e1.sourceEvent = d3.event;\n e1.target = target;\n d3.event = e1;\n dispatch[e1.type].apply(thiz, argumentz);\n } finally {\n d3.event = e0;\n }\n };\n };\n\n return dispatch;\n}\nd3.interpolate = function(a, b) {\n var i = d3.interpolators.length, f;\n while (--i >= 0 && !(f = d3.interpolators[i](a, b)));\n return f;\n};\n\nd3.interpolateNumber = function(a, b) {\n b -= a;\n return function(t) { return a + b * t; };\n};\n\nd3.interpolateRound = function(a, b) {\n b -= a;\n return function(t) { return Math.round(a + b * t); };\n};\n\nd3.interpolateString = function(a, b) {\n var m, // current match\n i, // current index\n j, // current index (for coallescing)\n s0 = 0, // start index of current string prefix\n s1 = 0, // end index of current string prefix\n s = [], // string constants and placeholders\n q = [], // number interpolators\n n, // q.length\n o;\n\n // Reset our regular expression!\n d3_interpolate_number.lastIndex = 0;\n\n // Find all numbers in b.\n for (i = 0; m = d3_interpolate_number.exec(b); ++i) {\n if (m.index) s.push(b.substring(s0, s1 = m.index));\n q.push({i: s.length, x: m[0]});\n s.push(null);\n s0 = d3_interpolate_number.lastIndex;\n }\n if (s0 < b.length) s.push(b.substring(s0));\n\n // Find all numbers in a.\n for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {\n o = q[i];\n if (o.x == m[0]) { // The numbers match, so coallesce.\n if (o.i) {\n if (s[o.i + 1] == null) { // This match is followed by another number.\n s[o.i - 1] += o.x;\n s.splice(o.i, 1);\n for (j = i + 1; j < n; ++j) q[j].i--;\n } else { // This match is followed by a string, so coallesce twice.\n s[o.i - 1] += o.x + s[o.i + 1];\n s.splice(o.i, 2);\n for (j = i + 1; j < n; ++j) q[j].i -= 2;\n }\n } else {\n if (s[o.i + 1] == null) { // This match is followed by another number.\n s[o.i] = o.x;\n } else { // This match is followed by a string, so coallesce twice.\n s[o.i] = o.x + s[o.i + 1];\n s.splice(o.i + 1, 1);\n for (j = i + 1; j < n; ++j) q[j].i--;\n }\n }\n q.splice(i, 1);\n n--;\n i--;\n } else {\n o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));\n }\n }\n\n // Remove any numbers in b not found in a.\n while (i < n) {\n o = q.pop();\n if (s[o.i + 1] == null) { // This match is followed by another number.\n s[o.i] = o.x;\n } else { // This match is followed by a string, so coallesce twice.\n s[o.i] = o.x + s[o.i + 1];\n s.splice(o.i + 1, 1);\n }\n n--;\n }\n\n // Special optimization for only a single match.\n if (s.length === 1) {\n return s[0] == null ? q[0].x : function() { return b; };\n }\n\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return function(t) {\n for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n};\n\nd3.interpolateTransform = function(a, b) {\n var s = [], // string constants and placeholders\n q = [], // number interpolators\n n,\n A = d3.transform(a),\n B = d3.transform(b),\n ta = A.translate,\n tb = B.translate,\n ra = A.rotate,\n rb = B.rotate,\n wa = A.skew,\n wb = B.skew,\n ka = A.scale,\n kb = B.scale;\n\n if (ta[0] != tb[0] || ta[1] != tb[1]) {\n s.push(\"translate(\", null, \",\", null, \")\");\n q.push({i: 1, x: d3.interpolateNumber(ta[0], tb[0])}, {i: 3, x: d3.interpolateNumber(ta[1], tb[1])});\n } else if (tb[0] || tb[1]) {\n s.push(\"translate(\" + tb + \")\");\n } else {\n s.push(\"\");\n }\n\n if (ra != rb) {\n q.push({i: s.push(s.pop() + \"rotate(\", null, \")\") - 2, x: d3.interpolateNumber(ra, rb)});\n } else if (rb) {\n s.push(s.pop() + \"rotate(\" + rb + \")\");\n }\n\n if (wa != wb) {\n q.push({i: s.push(s.pop() + \"skewX(\", null, \")\") - 2, x: d3.interpolateNumber(wa, wb)});\n } else if (wb) {\n s.push(s.pop() + \"skewX(\" + wb + \")\");\n }\n\n if (ka[0] != kb[0] || ka[1] != kb[1]) {\n n = s.push(s.pop() + \"scale(\", null, \",\", null, \")\");\n q.push({i: n - 4, x: d3.interpolateNumber(ka[0], kb[0])}, {i: n - 2, x: d3.interpolateNumber(ka[1], kb[1])});\n } else if (kb[0] != 1 || kb[1] != 1) {\n s.push(s.pop() + \"scale(\" + kb + \")\");\n }\n\n n = q.length;\n return function(t) {\n var i = -1, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n};\n\nd3.interpolateRgb = function(a, b) {\n a = d3.rgb(a);\n b = d3.rgb(b);\n var ar = a.r,\n ag = a.g,\n ab = a.b,\n br = b.r - ar,\n bg = b.g - ag,\n bb = b.b - ab;\n return function(t) {\n return \"#\"\n + d3_rgb_hex(Math.round(ar + br * t))\n + d3_rgb_hex(Math.round(ag + bg * t))\n + d3_rgb_hex(Math.round(ab + bb * t));\n };\n};\n\n// interpolates HSL space, but outputs RGB string (for compatibility)\nd3.interpolateHsl = function(a, b) {\n a = d3.hsl(a);\n b = d3.hsl(b);\n var h0 = a.h,\n s0 = a.s,\n l0 = a.l,\n h1 = b.h - h0,\n s1 = b.s - s0,\n l1 = b.l - l0;\n return function(t) {\n return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t).toString();\n };\n};\n\nd3.interpolateArray = function(a, b) {\n var x = [],\n c = [],\n na = a.length,\n nb = b.length,\n n0 = Math.min(a.length, b.length),\n i;\n for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));\n for (; i < na; ++i) c[i] = a[i];\n for (; i < nb; ++i) c[i] = b[i];\n return function(t) {\n for (i = 0; i < n0; ++i) c[i] = x[i](t);\n return c;\n };\n};\n\nd3.interpolateObject = function(a, b) {\n var i = {},\n c = {},\n k;\n for (k in a) {\n if (k in b) {\n i[k] = d3_interpolateByName(k)(a[k], b[k]);\n } else {\n c[k] = a[k];\n }\n }\n for (k in b) {\n if (!(k in a)) {\n c[k] = b[k];\n }\n }\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n\nvar d3_interpolate_number = /[-+]?(?:\\d*\\.?\\d+)(?:[eE][-+]?\\d+)?/g;\n\nfunction d3_interpolateByName(n) {\n return n == \"transform\"\n ? d3.interpolateTransform\n : d3.interpolate;\n}\n\nd3.interpolators = [\n d3.interpolateObject,\n function(a, b) { return (b instanceof Array) && d3.interpolateArray(a, b); },\n function(a, b) { return (typeof a === \"string\" || typeof b === \"string\") && d3.interpolateString(a + \"\", b + \"\"); },\n function(a, b) { return (typeof b === \"string\" ? d3_rgb_names.has(b) || /^(#|rgb\\(|hsl\\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a, b); },\n function(a, b) { return !isNaN(a = +a) && !isNaN(b = +b) && d3.interpolateNumber(a, b); }\n];\nfunction d3_uninterpolateNumber(a, b) {\n b = b - (a = +a) ? 1 / (b - a) : 0;\n return function(x) { return (x - a) * b; };\n}\n\nfunction d3_uninterpolateClamp(a, b) {\n b = b - (a = +a) ? 1 / (b - a) : 0;\n return function(x) { return Math.max(0, Math.min(1, (x - a) * b)); };\n}\nd3.rgb = function(r, g, b) {\n return arguments.length === 1\n ? (r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b)\n : d3_rgb_parse(\"\" + r, d3_rgb, d3_hsl_rgb))\n : d3_rgb(~~r, ~~g, ~~b);\n};\n\nfunction d3_rgb(r, g, b) {\n return new d3_Rgb(r, g, b);\n}\n\nfunction d3_Rgb(r, g, b) {\n this.r = r;\n this.g = g;\n this.b = b;\n}\n\nd3_Rgb.prototype.brighter = function(k) {\n k = Math.pow(0.7, arguments.length ? k : 1);\n var r = this.r,\n g = this.g,\n b = this.b,\n i = 30;\n if (!r && !g && !b) return d3_rgb(i, i, i);\n if (r && r < i) r = i;\n if (g && g < i) g = i;\n if (b && b < i) b = i;\n return d3_rgb(\n Math.min(255, Math.floor(r / k)),\n Math.min(255, Math.floor(g / k)),\n Math.min(255, Math.floor(b / k)));\n};\n\nd3_Rgb.prototype.darker = function(k) {\n k = Math.pow(0.7, arguments.length ? k : 1);\n return d3_rgb(\n Math.floor(k * this.r),\n Math.floor(k * this.g),\n Math.floor(k * this.b));\n};\n\nd3_Rgb.prototype.hsl = function() {\n return d3_rgb_hsl(this.r, this.g, this.b);\n};\n\nd3_Rgb.prototype.toString = function() {\n return \"#\" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);\n};\n\nfunction d3_rgb_hex(v) {\n return v < 0x10\n ? \"0\" + Math.max(0, v).toString(16)\n : Math.min(255, v).toString(16);\n}\n\nfunction d3_rgb_parse(format, rgb, hsl) {\n var r = 0, // red channel; int in [0, 255]\n g = 0, // green channel; int in [0, 255]\n b = 0, // blue channel; int in [0, 255]\n m1, // CSS color specification match\n m2, // CSS color specification type (e.g., rgb)\n name;\n\n /* Handle hsl, rgb. */\n m1 = /([a-z]+)\\((.*)\\)/i.exec(format);\n if (m1) {\n m2 = m1[2].split(\",\");\n switch (m1[1]) {\n case \"hsl\": {\n return hsl(\n parseFloat(m2[0]), // degrees\n parseFloat(m2[1]) / 100, // percentage\n parseFloat(m2[2]) / 100 // percentage\n );\n }\n case \"rgb\": {\n return rgb(\n d3_rgb_parseNumber(m2[0]),\n d3_rgb_parseNumber(m2[1]),\n d3_rgb_parseNumber(m2[2])\n );\n }\n }\n }\n\n /* Named colors. */\n if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b);\n\n /* Hexadecimal colors: #rgb and #rrggbb. */\n if (format != null && format.charAt(0) === \"#\") {\n if (format.length === 4) {\n r = format.charAt(1); r += r;\n g = format.charAt(2); g += g;\n b = format.charAt(3); b += b;\n } else if (format.length === 7) {\n r = format.substring(1, 3);\n g = format.substring(3, 5);\n b = format.substring(5, 7);\n }\n r = parseInt(r, 16);\n g = parseInt(g, 16);\n b = parseInt(b, 16);\n }\n\n return rgb(r, g, b);\n}\n\nfunction d3_rgb_hsl(r, g, b) {\n var min = Math.min(r /= 255, g /= 255, b /= 255),\n max = Math.max(r, g, b),\n d = max - min,\n h,\n s,\n l = (max + min) / 2;\n if (d) {\n s = l < .5 ? d / (max + min) : d / (2 - max - min);\n if (r == max) h = (g - b) / d + (g < b ? 6 : 0);\n else if (g == max) h = (b - r) / d + 2;\n else h = (r - g) / d + 4;\n h *= 60;\n } else {\n s = h = 0;\n }\n return d3_hsl(h, s, l);\n}\n\nfunction d3_rgb_parseNumber(c) { // either integer or percentage\n var f = parseFloat(c);\n return c.charAt(c.length - 1) === \"%\" ? Math.round(f * 2.55) : f;\n}\n\nvar d3_rgb_names = d3.map({\n aliceblue: \"#f0f8ff\",\n antiquewhite: \"#faebd7\",\n aqua: \"#00ffff\",\n aquamarine: \"#7fffd4\",\n azure: \"#f0ffff\",\n beige: \"#f5f5dc\",\n bisque: \"#ffe4c4\",\n black: \"#000000\",\n blanchedalmond: \"#ffebcd\",\n blue: \"#0000ff\",\n blueviolet: \"#8a2be2\",\n brown: \"#a52a2a\",\n burlywood: \"#deb887\",\n cadetblue: \"#5f9ea0\",\n chartreuse: \"#7fff00\",\n chocolate: \"#d2691e\",\n coral: \"#ff7f50\",\n cornflowerblue: \"#6495ed\",\n cornsilk: \"#fff8dc\",\n crimson: \"#dc143c\",\n cyan: \"#00ffff\",\n darkblue: \"#00008b\",\n darkcyan: \"#008b8b\",\n darkgoldenrod: \"#b8860b\",\n darkgray: \"#a9a9a9\",\n darkgreen: \"#006400\",\n darkgrey: \"#a9a9a9\",\n darkkhaki: \"#bdb76b\",\n darkmagenta: \"#8b008b\",\n darkolivegreen: \"#556b2f\",\n darkorange: \"#ff8c00\",\n darkorchid: \"#9932cc\",\n darkred: \"#8b0000\",\n darksalmon: \"#e9967a\",\n darkseagreen: \"#8fbc8f\",\n darkslateblue: \"#483d8b\",\n darkslategray: \"#2f4f4f\",\n darkslategrey: \"#2f4f4f\",\n darkturquoise: \"#00ced1\",\n darkviolet: \"#9400d3\",\n deeppink: \"#ff1493\",\n deepskyblue: \"#00bfff\",\n dimgray: \"#696969\",\n dimgrey: \"#696969\",\n dodgerblue: \"#1e90ff\",\n firebrick: \"#b22222\",\n floralwhite: \"#fffaf0\",\n forestgreen: \"#228b22\",\n fuchsia: \"#ff00ff\",\n gainsboro: \"#dcdcdc\",\n ghostwhite: \"#f8f8ff\",\n gold: \"#ffd700\",\n goldenrod: \"#daa520\",\n gray: \"#808080\",\n green: \"#008000\",\n greenyellow: \"#adff2f\",\n grey: \"#808080\",\n honeydew: \"#f0fff0\",\n hotpink: \"#ff69b4\",\n indianred: \"#cd5c5c\",\n indigo: \"#4b0082\",\n ivory: \"#fffff0\",\n khaki: \"#f0e68c\",\n lavender: \"#e6e6fa\",\n lavenderblush: \"#fff0f5\",\n lawngreen: \"#7cfc00\",\n lemonchiffon: \"#fffacd\",\n lightblue: \"#add8e6\",\n lightcoral: \"#f08080\",\n lightcyan: \"#e0ffff\",\n lightgoldenrodyellow: \"#fafad2\",\n lightgray: \"#d3d3d3\",\n lightgreen: \"#90ee90\",\n lightgrey: \"#d3d3d3\",\n lightpink: \"#ffb6c1\",\n lightsalmon: \"#ffa07a\",\n lightseagreen: \"#20b2aa\",\n lightskyblue: \"#87cefa\",\n lightslategray: \"#778899\",\n lightslategrey: \"#778899\",\n lightsteelblue: \"#b0c4de\",\n lightyellow: \"#ffffe0\",\n lime: \"#00ff00\",\n limegreen: \"#32cd32\",\n linen: \"#faf0e6\",\n magenta: \"#ff00ff\",\n maroon: \"#800000\",\n mediumaquamarine: \"#66cdaa\",\n mediumblue: \"#0000cd\",\n mediumorchid: \"#ba55d3\",\n mediumpurple: \"#9370db\",\n mediumseagreen: \"#3cb371\",\n mediumslateblue: \"#7b68ee\",\n mediumspringgreen: \"#00fa9a\",\n mediumturquoise: \"#48d1cc\",\n mediumvioletred: \"#c71585\",\n midnightblue: \"#191970\",\n mintcream: \"#f5fffa\",\n mistyrose: \"#ffe4e1\",\n moccasin: \"#ffe4b5\",\n navajowhite: \"#ffdead\",\n navy: \"#000080\",\n oldlace: \"#fdf5e6\",\n olive: \"#808000\",\n olivedrab: \"#6b8e23\",\n orange: \"#ffa500\",\n orangered: \"#ff4500\",\n orchid: \"#da70d6\",\n palegoldenrod: \"#eee8aa\",\n palegreen: \"#98fb98\",\n paleturquoise: \"#afeeee\",\n palevioletred: \"#db7093\",\n papayawhip: \"#ffefd5\",\n peachpuff: \"#ffdab9\",\n peru: \"#cd853f\",\n pink: \"#ffc0cb\",\n plum: \"#dda0dd\",\n powderblue: \"#b0e0e6\",\n purple: \"#800080\",\n red: \"#ff0000\",\n rosybrown: \"#bc8f8f\",\n royalblue: \"#4169e1\",\n saddlebrown: \"#8b4513\",\n salmon: \"#fa8072\",\n sandybrown: \"#f4a460\",\n seagreen: \"#2e8b57\",\n seashell: \"#fff5ee\",\n sienna: \"#a0522d\",\n silver: \"#c0c0c0\",\n skyblue: \"#87ceeb\",\n slateblue: \"#6a5acd\",\n slategray: \"#708090\",\n slategrey: \"#708090\",\n snow: \"#fffafa\",\n springgreen: \"#00ff7f\",\n steelblue: \"#4682b4\",\n tan: \"#d2b48c\",\n teal: \"#008080\",\n thistle: \"#d8bfd8\",\n tomato: \"#ff6347\",\n turquoise: \"#40e0d0\",\n violet: \"#ee82ee\",\n wheat: \"#f5deb3\",\n white: \"#ffffff\",\n whitesmoke: \"#f5f5f5\",\n yellow: \"#ffff00\",\n yellowgreen: \"#9acd32\"\n});\n\nd3_rgb_names.forEach(function(key, value) {\n d3_rgb_names.set(key, d3_rgb_parse(value, d3_rgb, d3_hsl_rgb));\n});\nd3.hsl = function(h, s, l) {\n return arguments.length === 1\n ? (h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l)\n : d3_rgb_parse(\"\" + h, d3_rgb_hsl, d3_hsl))\n : d3_hsl(+h, +s, +l);\n};\n\nfunction d3_hsl(h, s, l) {\n return new d3_Hsl(h, s, l);\n}\n\nfunction d3_Hsl(h, s, l) {\n this.h = h;\n this.s = s;\n this.l = l;\n}\n\nd3_Hsl.prototype.brighter = function(k) {\n k = Math.pow(0.7, arguments.length ? k : 1);\n return d3_hsl(this.h, this.s, this.l / k);\n};\n\nd3_Hsl.prototype.darker = function(k) {\n k = Math.pow(0.7, arguments.length ? k : 1);\n return d3_hsl(this.h, this.s, k * this.l);\n};\n\nd3_Hsl.prototype.rgb = function() {\n return d3_hsl_rgb(this.h, this.s, this.l);\n};\n\nd3_Hsl.prototype.toString = function() {\n return this.rgb().toString();\n};\n\nfunction d3_hsl_rgb(h, s, l) {\n var m1,\n m2;\n\n /* Some simple corrections for h, s and l. */\n h = h % 360; if (h < 0) h += 360;\n s = s < 0 ? 0 : s > 1 ? 1 : s;\n l = l < 0 ? 0 : l > 1 ? 1 : l;\n\n /* From FvD 13.37, CSS Color Module Level 3 */\n m2 = l <= .5 ? l * (1 + s) : l + s - l * s;\n m1 = 2 * l - m2;\n\n function v(h) {\n if (h > 360) h -= 360;\n else if (h < 0) h += 360;\n if (h < 60) return m1 + (m2 - m1) * h / 60;\n if (h < 180) return m2;\n if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;\n return m1;\n }\n\n function vv(h) {\n return Math.round(v(h) * 255);\n }\n\n return d3_rgb(vv(h + 120), vv(h), vv(h - 120));\n}\nfunction d3_selection(groups) {\n d3_arraySubclass(groups, d3_selectionPrototype);\n return groups;\n}\n\nvar d3_select = function(s, n) { return n.querySelector(s); },\n d3_selectAll = function(s, n) { return n.querySelectorAll(s); },\n d3_selectRoot = document.documentElement,\n d3_selectMatcher = d3_selectRoot.matchesSelector || d3_selectRoot.webkitMatchesSelector || d3_selectRoot.mozMatchesSelector || d3_selectRoot.msMatchesSelector || d3_selectRoot.oMatchesSelector,\n d3_selectMatches = function(n, s) { return d3_selectMatcher.call(n, s); };\n\n// Prefer Sizzle, if available.\nif (typeof Sizzle === \"function\") {\n d3_select = function(s, n) { return Sizzle(s, n)[0]; };\n d3_selectAll = function(s, n) { return Sizzle.uniqueSort(Sizzle(s, n)); };\n d3_selectMatches = Sizzle.matchesSelector;\n}\n\nvar d3_selectionPrototype = [];\n\nd3.selection = function() {\n return d3_selectionRoot;\n};\n\nd3.selection.prototype = d3_selectionPrototype;\nd3_selectionPrototype.select = function(selector) {\n var subgroups = [],\n subgroup,\n subnode,\n group,\n node;\n\n if (typeof selector !== \"function\") selector = d3_selection_selector(selector);\n\n for (var j = -1, m = this.length; ++j < m;) {\n subgroups.push(subgroup = []);\n subgroup.parentNode = (group = this[j]).parentNode;\n for (var i = -1, n = group.length; ++i < n;) {\n if (node = group[i]) {\n subgroup.push(subnode = selector.call(node, node.__data__, i));\n if (subnode && \"__data__\" in node) subnode.__data__ = node.__data__;\n } else {\n subgroup.push(null);\n }\n }\n }\n\n return d3_selection(subgroups);\n};\n\nfunction d3_selection_selector(selector) {\n return function() {\n return d3_select(selector, this);\n };\n}\nd3_selectionPrototype.selectAll = function(selector) {\n var subgroups = [],\n subgroup,\n node;\n\n if (typeof selector !== \"function\") selector = d3_selection_selectorAll(selector);\n\n for (var j = -1, m = this.length; ++j < m;) {\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n if (node = group[i]) {\n subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i)));\n subgroup.parentNode = node;\n }\n }\n }\n\n return d3_selection(subgroups);\n};\n\nfunction d3_selection_selectorAll(selector) {\n return function() {\n return d3_selectAll(selector, this);\n };\n}\nd3_selectionPrototype.attr = function(name, value) {\n name = d3.ns.qualify(name);\n\n // If no value is specified, return the first value.\n if (arguments.length < 2) {\n var node = this.node();\n return name.local\n ? node.getAttributeNS(name.space, name.local)\n : node.getAttribute(name);\n }\n\n function attrNull() {\n this.removeAttribute(name);\n }\n\n function attrNullNS() {\n this.removeAttributeNS(name.space, name.local);\n }\n\n function attrConstant() {\n this.setAttribute(name, value);\n }\n\n function attrConstantNS() {\n this.setAttributeNS(name.space, name.local, value);\n }\n\n function attrFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttribute(name);\n else this.setAttribute(name, x);\n }\n\n function attrFunctionNS() {\n var x = value.apply(this, arguments);\n if (x == null) this.removeAttributeNS(name.space, name.local);\n else this.setAttributeNS(name.space, name.local, x);\n }\n\n return this.each(value == null\n ? (name.local ? attrNullNS : attrNull) : (typeof value === \"function\"\n ? (name.local ? attrFunctionNS : attrFunction)\n : (name.local ? attrConstantNS : attrConstant)));\n};\nd3_selectionPrototype.classed = function(name, value) {\n var names = name.split(d3_selection_classedWhitespace),\n n = names.length,\n i = -1;\n if (arguments.length > 1) {\n while (++i < n) d3_selection_classed.call(this, names[i], value);\n return this;\n } else {\n while (++i < n) if (!d3_selection_classed.call(this, names[i])) return false;\n return true;\n }\n};\n\nvar d3_selection_classedWhitespace = /\\s+/g;\n\nfunction d3_selection_classed(name, value) {\n var re = new RegExp(\"(^|\\\\s+)\" + d3.requote(name) + \"(\\\\s+|$)\", \"g\");\n\n // If no value is specified, return the first value.\n if (arguments.length < 2) {\n var node = this.node();\n if (c = node.classList) return c.contains(name);\n var c = node.className;\n re.lastIndex = 0;\n return re.test(c.baseVal != null ? c.baseVal : c);\n }\n\n function classedAdd() {\n if (c = this.classList) return c.add(name);\n var c = this.className,\n cb = c.baseVal != null,\n cv = cb ? c.baseVal : c;\n re.lastIndex = 0;\n if (!re.test(cv)) {\n cv = d3_collapse(cv + \" \" + name);\n if (cb) c.baseVal = cv;\n else this.className = cv;\n }\n }\n\n function classedRemove() {\n if (c = this.classList) return c.remove(name);\n var c = this.className,\n cb = c.baseVal != null,\n cv = cb ? c.baseVal : c;\n cv = d3_collapse(cv.replace(re, \" \"));\n if (cb) c.baseVal = cv;\n else this.className = cv;\n }\n\n function classedFunction() {\n (value.apply(this, arguments)\n ? classedAdd\n : classedRemove).call(this);\n }\n\n return this.each(typeof value === \"function\"\n ? classedFunction : value\n ? classedAdd\n : classedRemove);\n}\nd3_selectionPrototype.style = function(name, value, priority) {\n if (arguments.length < 3) priority = \"\";\n\n // If no value is specified, return the first value.\n if (arguments.length < 2) return window\n .getComputedStyle(this.node(), null)\n .getPropertyValue(name);\n\n function styleNull() {\n this.style.removeProperty(name);\n }\n\n function styleConstant() {\n this.style.setProperty(name, value, priority);\n }\n\n function styleFunction() {\n var x = value.apply(this, arguments);\n if (x == null) this.style.removeProperty(name);\n else this.style.setProperty(name, x, priority);\n }\n\n return this.each(value == null\n ? styleNull : (typeof value === \"function\"\n ? styleFunction : styleConstant));\n};\nd3_selectionPrototype.property = function(name, value) {\n\n // If no value is specified, return the first value.\n if (arguments.length < 2) return this.node()[name];\n\n function propertyNull() {\n delete this[name];\n }\n\n function propertyConstant() {\n this[name] = value;\n }\n\n function propertyFunction() {\n var x = value.apply(this, arguments);\n if (x == null) delete this[name];\n else this[name] = x;\n }\n\n return this.each(value == null\n ? propertyNull : (typeof value === \"function\"\n ? propertyFunction : propertyConstant));\n};\nd3_selectionPrototype.text = function(value) {\n return arguments.length < 1\n ? this.node().textContent : this.each(typeof value === \"function\"\n ? function() { var v = value.apply(this, arguments); this.textContent = v == null ? \"\" : v; } : value == null\n ? function() { this.textContent = \"\"; }\n : function() { this.textContent = value; });\n};\nd3_selectionPrototype.html = function(value) {\n return arguments.length < 1\n ? this.node().innerHTML : this.each(typeof value === \"function\"\n ? function() { var v = value.apply(this, arguments); this.innerHTML = v == null ? \"\" : v; } : value == null\n ? function() { this.innerHTML = \"\"; }\n : function() { this.innerHTML = value; });\n};\n// TODO append(node)?\n// TODO append(function)?\nd3_selectionPrototype.append = function(name) {\n name = d3.ns.qualify(name);\n\n function append() {\n return this.appendChild(document.createElementNS(this.namespaceURI, name));\n }\n\n function appendNS() {\n return this.appendChild(document.createElementNS(name.space, name.local));\n }\n\n return this.select(name.local ? appendNS : append);\n};\n// TODO insert(node, function)?\n// TODO insert(function, string)?\n// TODO insert(function, function)?\nd3_selectionPrototype.insert = function(name, before) {\n name = d3.ns.qualify(name);\n\n function insert() {\n return this.insertBefore(\n document.createElementNS(this.namespaceURI, name),\n d3_select(before, this));\n }\n\n function insertNS() {\n return this.insertBefore(\n document.createElementNS(name.space, name.local),\n d3_select(before, this));\n }\n\n return this.select(name.local ? insertNS : insert);\n};\n// TODO remove(selector)?\n// TODO remove(node)?\n// TODO remove(function)?\nd3_selectionPrototype.remove = function() {\n return this.each(function() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n });\n};\nd3_selectionPrototype.data = function(value, key) {\n var i = -1,\n n = this.length,\n group,\n node;\n\n // If no value is specified, return the first value.\n if (!arguments.length) {\n value = new Array(n = (group = this[0]).length);\n while (++i < n) {\n if (node = group[i]) {\n value[i] = node.__data__;\n }\n }\n return value;\n }\n\n function bind(group, groupData) {\n var i,\n n = group.length,\n m = groupData.length,\n n0 = Math.min(n, m),\n n1 = Math.max(n, m),\n updateNodes = [],\n enterNodes = [],\n exitNodes = [],\n node,\n nodeData;\n\n if (key) {\n var nodeByKeyValue = new d3_Map,\n keyValues = [],\n keyValue,\n j = groupData.length;\n\n for (i = -1; ++i < n;) {\n keyValue = key.call(node = group[i], node.__data__, i);\n if (nodeByKeyValue.has(keyValue)) {\n exitNodes[j++] = node; // duplicate key\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n keyValues.push(keyValue);\n }\n\n for (i = -1; ++i < m;) {\n keyValue = key.call(groupData, nodeData = groupData[i], i)\n if (nodeByKeyValue.has(keyValue)) {\n updateNodes[i] = node = nodeByKeyValue.get(keyValue);\n node.__data__ = nodeData;\n enterNodes[i] = exitNodes[i] = null;\n } else {\n enterNodes[i] = d3_selection_dataNode(nodeData);\n updateNodes[i] = exitNodes[i] = null;\n }\n nodeByKeyValue.remove(keyValue);\n }\n\n for (i = -1; ++i < n;) {\n if (nodeByKeyValue.has(keyValues[i])) {\n exitNodes[i] = group[i];\n }\n }\n } else {\n for (i = -1; ++i < n0;) {\n node = group[i];\n nodeData = groupData[i];\n if (node) {\n node.__data__ = nodeData;\n updateNodes[i] = node;\n enterNodes[i] = exitNodes[i] = null;\n } else {\n enterNodes[i] = d3_selection_dataNode(nodeData);\n updateNodes[i] = exitNodes[i] = null;\n }\n }\n for (; i < m; ++i) {\n enterNodes[i] = d3_selection_dataNode(groupData[i]);\n updateNodes[i] = exitNodes[i] = null;\n }\n for (; i < n1; ++i) {\n exitNodes[i] = group[i];\n enterNodes[i] = updateNodes[i] = null;\n }\n }\n\n enterNodes.update\n = updateNodes;\n\n enterNodes.parentNode\n = updateNodes.parentNode\n = exitNodes.parentNode\n = group.parentNode;\n\n enter.push(enterNodes);\n update.push(updateNodes);\n exit.push(exitNodes);\n }\n\n var enter = d3_selection_enter([]),\n update = d3_selection([]),\n exit = d3_selection([]);\n\n if (typeof value === \"function\") {\n while (++i < n) {\n bind(group = this[i], value.call(group, group.parentNode.__data__, i));\n }\n } else {\n while (++i < n) {\n bind(group = this[i], value);\n }\n }\n\n update.enter = function() { return enter; };\n update.exit = function() { return exit; };\n return update;\n};\n\nfunction d3_selection_dataNode(data) {\n return {__data__: data};\n}\nd3_selectionPrototype.datum =\nd3_selectionPrototype.map = function(value) {\n return arguments.length < 1\n ? this.property(\"__data__\")\n : this.property(\"__data__\", value);\n};\nd3_selectionPrototype.filter = function(filter) {\n var subgroups = [],\n subgroup,\n group,\n node;\n\n if (typeof filter !== \"function\") filter = d3_selection_filter(filter);\n\n for (var j = 0, m = this.length; j < m; j++) {\n subgroups.push(subgroup = []);\n subgroup.parentNode = (group = this[j]).parentNode;\n for (var i = 0, n = group.length; i < n; i++) {\n if ((node = group[i]) && filter.call(node, node.__data__, i)) {\n subgroup.push(node);\n }\n }\n }\n\n return d3_selection(subgroups);\n};\n\nfunction d3_selection_filter(selector) {\n return function() {\n return d3_selectMatches(this, selector);\n };\n}\nd3_selectionPrototype.order = function() {\n for (var j = -1, m = this.length; ++j < m;) {\n for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n return this;\n};\nd3_selectionPrototype.sort = function(comparator) {\n comparator = d3_selection_sortComparator.apply(this, arguments);\n for (var j = -1, m = this.length; ++j < m;) this[j].sort(comparator);\n return this.order();\n};\n\nfunction d3_selection_sortComparator(comparator) {\n if (!arguments.length) comparator = d3.ascending;\n return function(a, b) {\n return comparator(a && a.__data__, b && b.__data__);\n };\n}\n// type can be namespaced, e.g., \"click.foo\"\n// listener can be null for removal\nd3_selectionPrototype.on = function(type, listener, capture) {\n if (arguments.length < 3) capture = false;\n\n // parse the type specifier\n var name = \"__on\" + type, i = type.indexOf(\".\");\n if (i > 0) type = type.substring(0, i);\n\n // if called with only one argument, return the current listener\n if (arguments.length < 2) return (i = this.node()[name]) && i._;\n\n // remove the old event listener, and add the new event listener\n return this.each(function(d, i) {\n var node = this,\n o = node[name];\n\n // remove the old listener, if any (using the previously-set capture)\n if (o) {\n node.removeEventListener(type, o, o.$);\n delete node[name];\n }\n\n // add the new listener, if any (remembering the capture flag)\n if (listener) {\n node.addEventListener(type, node[name] = l, l.$ = capture);\n l._ = listener; // stash the unwrapped listener for get\n }\n\n // wrapped event listener that preserves i\n function l(e) {\n var o = d3.event; // Events can be reentrant (e.g., focus).\n d3.event = e;\n try {\n listener.call(node, node.__data__, i);\n } finally {\n d3.event = o;\n }\n }\n });\n};\nd3_selectionPrototype.each = function(callback) {\n for (var j = -1, m = this.length; ++j < m;) {\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n var node = group[i];\n if (node) callback.call(node, node.__data__, i, j);\n }\n }\n return this;\n};\n//\n// Note: assigning to the arguments array simultaneously changes the value of\n// the corresponding argument!\n//\n// TODO The `this` argument probably shouldn't be the first argument to the\n// callback, anyway, since it's redundant. However, that will require a major\n// version bump due to backwards compatibility, so I'm not changing it right\n// away.\n//\nd3_selectionPrototype.call = function(callback) {\n callback.apply(this, (arguments[0] = this, arguments));\n return this;\n};\nd3_selectionPrototype.empty = function() {\n return !this.node();\n};\nd3_selectionPrototype.node = function(callback) {\n for (var j = 0, m = this.length; j < m; j++) {\n for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n var node = group[i];\n if (node) return node;\n }\n }\n return null;\n};\nd3_selectionPrototype.transition = function() {\n var subgroups = [],\n subgroup,\n node;\n\n for (var j = -1, m = this.length; ++j < m;) {\n subgroups.push(subgroup = []);\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n subgroup.push((node = group[i]) ? {node: node, delay: d3_transitionDelay, duration: d3_transitionDuration} : null);\n }\n }\n\n return d3_transition(subgroups, d3_transitionId || ++d3_transitionNextId, Date.now());\n};\nvar d3_selectionRoot = d3_selection([[document]]);\n\nd3_selectionRoot[0].parentNode = d3_selectRoot;\n\n// TODO fast singleton implementation!\n// TODO select(function)\nd3.select = function(selector) {\n return typeof selector === \"string\"\n ? d3_selectionRoot.select(selector)\n : d3_selection([[selector]]); // assume node\n};\n\n// TODO selectAll(function)\nd3.selectAll = function(selector) {\n return typeof selector === \"string\"\n ? d3_selectionRoot.selectAll(selector)\n : d3_selection([d3_array(selector)]); // assume node[]\n};\nfunction d3_selection_enter(selection) {\n d3_arraySubclass(selection, d3_selection_enterPrototype);\n return selection;\n}\n\nvar d3_selection_enterPrototype = [];\n\nd3.selection.enter = d3_selection_enter;\nd3.selection.enter.prototype = d3_selection_enterPrototype;\n\nd3_selection_enterPrototype.append = d3_selectionPrototype.append;\nd3_selection_enterPrototype.insert = d3_selectionPrototype.insert;\nd3_selection_enterPrototype.empty = d3_selectionPrototype.empty;\nd3_selection_enterPrototype.node = d3_selectionPrototype.node;\nd3_selection_enterPrototype.select = function(selector) {\n var subgroups = [],\n subgroup,\n subnode,\n upgroup,\n group,\n node;\n\n for (var j = -1, m = this.length; ++j < m;) {\n upgroup = (group = this[j]).update;\n subgroups.push(subgroup = []);\n subgroup.parentNode = group.parentNode;\n for (var i = -1, n = group.length; ++i < n;) {\n if (node = group[i]) {\n subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i));\n subnode.__data__ = node.__data__;\n } else {\n subgroup.push(null);\n }\n }\n }\n\n return d3_selection(subgroups);\n};\nfunction d3_transition(groups, id, time) {\n d3_arraySubclass(groups, d3_transitionPrototype);\n\n var tweens = new d3_Map,\n event = d3.dispatch(\"start\", \"end\"),\n ease = d3_transitionEase;\n\n groups.id = id;\n\n groups.time = time;\n\n groups.tween = function(name, tween) {\n if (arguments.length < 2) return tweens.get(name);\n if (tween == null) tweens.remove(name);\n else tweens.set(name, tween);\n return groups;\n };\n\n groups.ease = function(value) {\n if (!arguments.length) return ease;\n ease = typeof value === \"function\" ? value : d3.ease.apply(d3, arguments);\n return groups;\n };\n\n groups.each = function(type, listener) {\n if (arguments.length < 2) return d3_transition_each.call(groups, type);\n event.on(type, listener);\n return groups;\n };\n\n d3.timer(function(elapsed) {\n groups.each(function(d, i, j) {\n var tweened = [],\n node = this,\n delay = groups[j][i].delay,\n duration = groups[j][i].duration,\n lock = node.__transition__ || (node.__transition__ = {active: 0, count: 0});\n\n ++lock.count;\n\n delay <= elapsed ? start(elapsed) : d3.timer(start, delay, time);\n\n function start(elapsed) {\n if (lock.active > id) return stop();\n lock.active = id;\n\n tweens.forEach(function(key, value) {\n if (tween = value.call(node, d, i)) {\n tweened.push(tween);\n }\n });\n\n event.start.call(node, d, i);\n if (!tick(elapsed)) d3.timer(tick, 0, time);\n return 1;\n }\n\n function tick(elapsed) {\n if (lock.active !== id) return stop();\n\n var t = (elapsed - delay) / duration,\n e = ease(t),\n n = tweened.length;\n\n while (n > 0) {\n tweened[--n].call(node, e);\n }\n\n if (t >= 1) {\n stop();\n d3_transitionId = id;\n event.end.call(node, d, i);\n d3_transitionId = 0;\n return 1;\n }\n }\n\n function stop() {\n if (!--lock.count) delete node.__transition__;\n return 1;\n }\n });\n return 1;\n }, 0, time);\n\n return groups;\n}\n\nvar d3_transitionRemove = {};\n\nfunction d3_transitionNull(d, i, a) {\n return a != \"\" && d3_transitionRemove;\n}\n\nfunction d3_transitionTween(name, b) {\n var interpolate = d3_interpolateByName(name);\n\n function transitionFunction(d, i, a) {\n var v = b.call(this, d, i);\n return v == null\n ? a != \"\" && d3_transitionRemove\n : a != v && interpolate(a, v);\n }\n\n function transitionString(d, i, a) {\n return a != b && interpolate(a, b);\n }\n\n return typeof b === \"function\" ? transitionFunction\n : b == null ? d3_transitionNull\n : (b += \"\", transitionString);\n}\n\nvar d3_transitionPrototype = [],\n d3_transitionNextId = 0,\n d3_transitionId = 0,\n d3_transitionDefaultDelay = 0,\n d3_transitionDefaultDuration = 250,\n d3_transitionDefaultEase = d3.ease(\"cubic-in-out\"),\n d3_transitionDelay = d3_transitionDefaultDelay,\n d3_transitionDuration = d3_transitionDefaultDuration,\n d3_transitionEase = d3_transitionDefaultEase;\n\nd3_transitionPrototype.call = d3_selectionPrototype.call;\n\nd3.transition = function(selection) {\n return arguments.length\n ? (d3_transitionId ? selection.transition() : selection)\n : d3_selectionRoot.transition();\n};\n\nd3.transition.prototype = d3_transitionPrototype;\nd3_transitionPrototype.select = function(selector) {\n var subgroups = [],\n subgroup,\n subnode,\n node;\n\n if (typeof selector !== \"function\") selector = d3_selection_selector(selector);\n\n for (var j = -1, m = this.length; ++j < m;) {\n subgroups.push(subgroup = []);\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n if ((node = group[i]) && (subnode = selector.call(node.node, node.node.__data__, i))) {\n if (\"__data__\" in node.node) subnode.__data__ = node.node.__data__;\n subgroup.push({node: subnode, delay: node.delay, duration: node.duration});\n } else {\n subgroup.push(null);\n }\n }\n }\n\n return d3_transition(subgroups, this.id, this.time).ease(this.ease());\n};\nd3_transitionPrototype.selectAll = function(selector) {\n var subgroups = [],\n subgroup,\n subnodes,\n node;\n\n if (typeof selector !== \"function\") selector = d3_selection_selectorAll(selector);\n\n for (var j = -1, m = this.length; ++j < m;) {\n for (var group = this[j], i = -1, n = group.length; ++i < n;) {\n if (node = group[i]) {\n subnodes = selector.call(node.node, node.node.__data__, i);\n subgroups.push(subgroup = []);\n for (var k = -1, o = subnodes.length; ++k < o;) {\n subgroup.push({node: subnodes[k], delay: node.delay, duration: node.duration});\n }\n }\n }\n }\n\n return d3_transition(subgroups, this.id, this.time).ease(this.ease());\n};\nd3_transitionPrototype.attr = function(name, value) {\n return this.attrTween(name, d3_transitionTween(name, value));\n};\n\nd3_transitionPrototype.attrTween = function(nameNS, tween) {\n var name = d3.ns.qualify(nameNS);\n\n function attrTween(d, i) {\n var f = tween.call(this, d, i, this.getAttribute(name));\n return f === d3_transitionRemove\n ? (this.removeAttribute(name), null)\n : f && function(t) { this.setAttribute(name, f(t)); };\n }\n\n function attrTweenNS(d, i) {\n var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));\n return f === d3_transitionRemove\n ? (this.removeAttributeNS(name.space, name.local), null)\n : f && function(t) { this.setAttributeNS(name.space, name.local, f(t)); };\n }\n\n return this.tween(\"attr.\" + nameNS, name.local ? attrTweenNS : attrTween);\n};\nd3_transitionPrototype.style = function(name, value, priority) {\n if (arguments.length < 3) priority = \"\";\n return this.styleTween(name, d3_transitionTween(name, value), priority);\n};\n\nd3_transitionPrototype.styleTween = function(name, tween, priority) {\n if (arguments.length < 3) priority = \"\";\n return this.tween(\"style.\" + name, function(d, i) {\n var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));\n return f === d3_transitionRemove\n ? (this.style.removeProperty(name), null)\n : f && function(t) { this.style.setProperty(name, f(t), priority); };\n });\n};\nd3_transitionPrototype.text = function(value) {\n return this.tween(\"text\", function(d, i) {\n this.textContent = typeof value === \"function\"\n ? value.call(this, d, i)\n : value;\n });\n};\nd3_transitionPrototype.remove = function() {\n return this.each(\"end.transition\", function() {\n var p;\n if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this);\n });\n};\nd3_transitionPrototype.delay = function(value) {\n var groups = this;\n return groups.each(typeof value === \"function\"\n ? function(d, i, j) { groups[j][i].delay = value.apply(this, arguments) | 0; }\n : (value = value | 0, function(d, i, j) { groups[j][i].delay = value; }));\n};\nd3_transitionPrototype.duration = function(value) {\n var groups = this;\n return groups.each(typeof value === \"function\"\n ? function(d, i, j) { groups[j][i].duration = Math.max(1, value.apply(this, arguments) | 0); }\n : (value = Math.max(1, value | 0), function(d, i, j) { groups[j][i].duration = value; }));\n};\nfunction d3_transition_each(callback) {\n var id = d3_transitionId,\n ease = d3_transitionEase,\n delay = d3_transitionDelay,\n duration = d3_transitionDuration;\n\n d3_transitionId = this.id;\n d3_transitionEase = this.ease();\n for (var j = 0, m = this.length; j < m; j++) {\n for (var group = this[j], i = 0, n = group.length; i < n; i++) {\n var node = group[i];\n if (node) {\n d3_transitionDelay = this[j][i].delay;\n d3_transitionDuration = this[j][i].duration;\n callback.call(node = node.node, node.__data__, i, j);\n }\n }\n }\n\n d3_transitionId = id;\n d3_transitionEase = ease;\n d3_transitionDelay = delay;\n d3_transitionDuration = duration;\n return this;\n}\nd3_transitionPrototype.transition = function() {\n return this.select(d3_this);\n};\nvar d3_timer_queue = null,\n d3_timer_interval, // is an interval (or frame) active?\n d3_timer_timeout; // is a timeout active?\n\n// The timer will continue to fire until callback returns true.\nd3.timer = function(callback, delay, then) {\n var found = false,\n t0,\n t1 = d3_timer_queue;\n\n if (arguments.length < 3) {\n if (arguments.length < 2) delay = 0;\n else if (!isFinite(delay)) return;\n then = Date.now();\n }\n\n // See if the callback's already in the queue.\n while (t1) {\n if (t1.callback === callback) {\n t1.then = then;\n t1.delay = delay;\n found = true;\n break;\n }\n t0 = t1;\n t1 = t1.next;\n }\n\n // Otherwise, add the callback to the queue.\n if (!found) d3_timer_queue = {\n callback: callback,\n then: then,\n delay: delay,\n next: d3_timer_queue\n };\n\n // Start animatin'!\n if (!d3_timer_interval) {\n d3_timer_timeout = clearTimeout(d3_timer_timeout);\n d3_timer_interval = 1;\n d3_timer_frame(d3_timer_step);\n }\n}\n\nfunction d3_timer_step() {\n var elapsed,\n now = Date.now(),\n t1 = d3_timer_queue;\n\n while (t1) {\n elapsed = now - t1.then;\n if (elapsed >= t1.delay) t1.flush = t1.callback(elapsed);\n t1 = t1.next;\n }\n\n var delay = d3_timer_flush() - now;\n if (delay > 24) {\n if (isFinite(delay)) {\n clearTimeout(d3_timer_timeout);\n d3_timer_timeout = setTimeout(d3_timer_step, delay);\n }\n d3_timer_interval = 0;\n } else {\n d3_timer_interval = 1;\n d3_timer_frame(d3_timer_step);\n }\n}\n\nd3.timer.flush = function() {\n var elapsed,\n now = Date.now(),\n t1 = d3_timer_queue;\n\n while (t1) {\n elapsed = now - t1.then;\n if (!t1.delay) t1.flush = t1.callback(elapsed);\n t1 = t1.next;\n }\n\n d3_timer_flush();\n};\n\n// Flush after callbacks, to avoid concurrent queue modification.\nfunction d3_timer_flush() {\n var t0 = null,\n t1 = d3_timer_queue,\n then = Infinity;\n while (t1) {\n if (t1.flush) {\n t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;\n } else {\n then = Math.min(then, t1.then + t1.delay);\n t1 = (t0 = t1).next;\n }\n }\n return then;\n}\n\nvar d3_timer_frame = window.requestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.oRequestAnimationFrame\n || window.msRequestAnimationFrame\n || function(callback) { setTimeout(callback, 17); };\nd3.transform = function(string) {\n var g = document.createElementNS(d3.ns.prefix.svg, \"g\"),\n identity = {a: 1, b: 0, c: 0, d: 1, e: 0, f: 0};\n return (d3.transform = function(string) {\n g.setAttribute(\"transform\", string);\n var t = g.transform.baseVal.consolidate();\n return new d3_transform(t ? t.matrix : identity);\n })(string);\n};\n\n// Compute x-scale and normalize the first row.\n// Compute shear and make second row orthogonal to first.\n// Compute y-scale and normalize the second row.\n// Finally, compute the rotation.\nfunction d3_transform(m) {\n var r0 = [m.a, m.b],\n r1 = [m.c, m.d],\n kx = d3_transformNormalize(r0),\n kz = d3_transformDot(r0, r1),\n ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;\n if (r0[0] * r1[1] < r1[0] * r0[1]) {\n r0[0] *= -1;\n r0[1] *= -1;\n kx *= -1;\n kz *= -1;\n }\n this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_transformDegrees;\n this.translate = [m.e, m.f];\n this.scale = [kx, ky];\n this.skew = ky ? Math.atan2(kz, ky) * d3_transformDegrees : 0;\n};\n\nd3_transform.prototype.toString = function() {\n return \"translate(\" + this.translate\n + \")rotate(\" + this.rotate\n + \")skewX(\" + this.skew\n + \")scale(\" + this.scale\n + \")\";\n};\n\nfunction d3_transformDot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n\nfunction d3_transformNormalize(a) {\n var k = Math.sqrt(d3_transformDot(a, a));\n if (k) {\n a[0] /= k;\n a[1] /= k;\n }\n return k;\n}\n\nfunction d3_transformCombine(a, b, k) {\n a[0] += k * b[0];\n a[1] += k * b[1];\n return a;\n}\n\nvar d3_transformDegrees = 180 / Math.PI;\nd3.mouse = function(container) {\n return d3_mousePoint(container, d3_eventSource());\n};\n\n// https://bugs.webkit.org/show_bug.cgi?id=44083\nvar d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;\n\nfunction d3_mousePoint(container, e) {\n var svg = container.ownerSVGElement || container;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {\n svg = d3.select(document.body)\n .append(\"svg\")\n .style(\"position\", \"absolute\")\n .style(\"top\", 0)\n .style(\"left\", 0);\n var ctm = svg[0][0].getScreenCTM();\n d3_mouse_bug44083 = !(ctm.f || ctm.e);\n svg.remove();\n }\n if (d3_mouse_bug44083) {\n point.x = e.pageX;\n point.y = e.pageY;\n } else {\n point.x = e.clientX;\n point.y = e.clientY;\n }\n point = point.matrixTransform(container.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n var rect = container.getBoundingClientRect();\n return [e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop];\n};\nd3.touches = function(container, touches) {\n if (arguments.length < 2) touches = d3_eventSource().touches;\n return touches ? d3_array(touches).map(function(touch) {\n var point = d3_mousePoint(container, touch);\n point.identifier = touch.identifier;\n return point;\n }) : [];\n};\nfunction d3_noop() {}\nd3.scale = {};\n\nfunction d3_scaleExtent(domain) {\n var start = domain[0], stop = domain[domain.length - 1];\n return start < stop ? [start, stop] : [stop, start];\n}\n\nfunction d3_scaleRange(scale) {\n return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());\n}\nfunction d3_scale_nice(domain, nice) {\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n dx;\n\n if (x1 < x0) {\n dx = i0; i0 = i1; i1 = dx;\n dx = x0; x0 = x1; x1 = dx;\n }\n\n if (dx = x1 - x0) {\n nice = nice(dx);\n domain[i0] = nice.floor(x0);\n domain[i1] = nice.ceil(x1);\n }\n\n return domain;\n}\n\nfunction d3_scale_niceDefault() {\n return Math;\n}\nd3.scale.linear = function() {\n return d3_scale_linear([0, 1], [0, 1], d3.interpolate, false);\n};\n\nfunction d3_scale_linear(domain, range, interpolate, clamp) {\n var output,\n input;\n\n function rescale() {\n var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear,\n uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;\n output = linear(domain, range, uninterpolate, interpolate);\n input = linear(range, domain, uninterpolate, d3.interpolate);\n return scale;\n }\n\n function scale(x) {\n return output(x);\n }\n\n // Note: requires range is coercible to number!\n scale.invert = function(y) {\n return input(y);\n };\n\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = x.map(Number);\n return rescale();\n };\n\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n\n scale.rangeRound = function(x) {\n return scale.range(x).interpolate(d3.interpolateRound);\n };\n\n scale.clamp = function(x) {\n if (!arguments.length) return clamp;\n clamp = x;\n return rescale();\n };\n\n scale.interpolate = function(x) {\n if (!arguments.length) return interpolate;\n interpolate = x;\n return rescale();\n };\n\n scale.ticks = function(m) {\n return d3_scale_linearTicks(domain, m);\n };\n\n scale.tickFormat = function(m) {\n return d3_scale_linearTickFormat(domain, m);\n };\n\n scale.nice = function() {\n d3_scale_nice(domain, d3_scale_linearNice);\n return rescale();\n };\n\n scale.copy = function() {\n return d3_scale_linear(domain, range, interpolate, clamp);\n };\n\n return rescale();\n}\n\nfunction d3_scale_linearRebind(scale, linear) {\n return d3.rebind(scale, linear, \"range\", \"rangeRound\", \"interpolate\", \"clamp\");\n}\n\nfunction d3_scale_linearNice(dx) {\n dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);\n return {\n floor: function(x) { return Math.floor(x / dx) * dx; },\n ceil: function(x) { return Math.ceil(x / dx) * dx; }\n };\n}\n\nfunction d3_scale_linearTickRange(domain, m) {\n var extent = d3_scaleExtent(domain),\n span = extent[1] - extent[0],\n step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),\n err = m / span * step;\n\n // Filter ticks to get closer to the desired count.\n if (err <= .15) step *= 10;\n else if (err <= .35) step *= 5;\n else if (err <= .75) step *= 2;\n\n // Round start and stop values to step interval.\n extent[0] = Math.ceil(extent[0] / step) * step;\n extent[1] = Math.floor(extent[1] / step) * step + step * .5; // inclusive\n extent[2] = step;\n return extent;\n}\n\nfunction d3_scale_linearTicks(domain, m) {\n return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));\n}\n\nfunction d3_scale_linearTickFormat(domain, m) {\n return d3.format(\",.\" + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + \"f\");\n}\nfunction d3_scale_bilinear(domain, range, uninterpolate, interpolate) {\n var u = uninterpolate(domain[0], domain[1]),\n i = interpolate(range[0], range[1]);\n return function(x) {\n return i(u(x));\n };\n}\nfunction d3_scale_polylinear(domain, range, uninterpolate, interpolate) {\n var u = [],\n i = [],\n j = 0,\n k = Math.min(domain.length, range.length) - 1;\n\n // Handle descending domains.\n if (domain[k] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++j <= k) {\n u.push(uninterpolate(domain[j - 1], domain[j]));\n i.push(interpolate(range[j - 1], range[j]));\n }\n\n return function(x) {\n var j = d3.bisect(domain, x, 1, k) - 1;\n return i[j](u[j](x));\n };\n}\nd3.scale.log = function() {\n return d3_scale_log(d3.scale.linear(), d3_scale_logp);\n};\n\nfunction d3_scale_log(linear, log) {\n var pow = log.pow;\n\n function scale(x) {\n return linear(log(x));\n }\n\n scale.invert = function(x) {\n return pow(linear.invert(x));\n };\n\n scale.domain = function(x) {\n if (!arguments.length) return linear.domain().map(pow);\n log = x[0] < 0 ? d3_scale_logn : d3_scale_logp;\n pow = log.pow;\n linear.domain(x.map(log));\n return scale;\n };\n\n scale.nice = function() {\n linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault));\n return scale;\n };\n\n scale.ticks = function() {\n var extent = d3_scaleExtent(linear.domain()),\n ticks = [];\n if (extent.every(isFinite)) {\n var i = Math.floor(extent[0]),\n j = Math.ceil(extent[1]),\n u = pow(extent[0]),\n v = pow(extent[1]);\n if (log === d3_scale_logn) {\n ticks.push(pow(i));\n for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);\n } else {\n for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);\n ticks.push(pow(i));\n }\n for (i = 0; ticks[i] < u; i++) {} // strip small values\n for (j = ticks.length; ticks[j - 1] > v; j--) {} // strip big values\n ticks = ticks.slice(i, j);\n }\n return ticks;\n };\n\n scale.tickFormat = function(n, format) {\n if (arguments.length < 2) format = d3_scale_logFormat;\n if (arguments.length < 1) return format;\n var k = n / scale.ticks().length,\n f = log === d3_scale_logn ? (e = -1e-12, Math.floor) : (e = 1e-12, Math.ceil),\n e;\n return function(d) {\n return d / pow(f(log(d) + e)) < k ? format(d) : \"\";\n };\n };\n\n scale.copy = function() {\n return d3_scale_log(linear.copy(), log);\n };\n\n return d3_scale_linearRebind(scale, linear);\n}\n\nvar d3_scale_logFormat = d3.format(\".0e\");\n\nfunction d3_scale_logp(x) {\n return Math.log(x < 0 ? 0 : x) / Math.LN10;\n}\n\nfunction d3_scale_logn(x) {\n return -Math.log(x > 0 ? 0 : -x) / Math.LN10;\n}\n\nd3_scale_logp.pow = function(x) {\n return Math.pow(10, x);\n};\n\nd3_scale_logn.pow = function(x) {\n return -Math.pow(10, -x);\n};\nd3.scale.pow = function() {\n return d3_scale_pow(d3.scale.linear(), 1);\n};\n\nfunction d3_scale_pow(linear, exponent) {\n var powp = d3_scale_powPow(exponent),\n powb = d3_scale_powPow(1 / exponent);\n\n function scale(x) {\n return linear(powp(x));\n }\n\n scale.invert = function(x) {\n return powb(linear.invert(x));\n };\n\n scale.domain = function(x) {\n if (!arguments.length) return linear.domain().map(powb);\n linear.domain(x.map(powp));\n return scale;\n };\n\n scale.ticks = function(m) {\n return d3_scale_linearTicks(scale.domain(), m);\n };\n\n scale.tickFormat = function(m) {\n return d3_scale_linearTickFormat(scale.domain(), m);\n };\n\n scale.nice = function() {\n return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));\n };\n\n scale.exponent = function(x) {\n if (!arguments.length) return exponent;\n var domain = scale.domain();\n powp = d3_scale_powPow(exponent = x);\n powb = d3_scale_powPow(1 / exponent);\n return scale.domain(domain);\n };\n\n scale.copy = function() {\n return d3_scale_pow(linear.copy(), exponent);\n };\n\n return d3_scale_linearRebind(scale, linear);\n}\n\nfunction d3_scale_powPow(e) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);\n };\n}\nd3.scale.sqrt = function() {\n return d3.scale.pow().exponent(.5);\n};\nd3.scale.ordinal = function() {\n return d3_scale_ordinal([], {t: \"range\", x: []});\n};\n\nfunction d3_scale_ordinal(domain, ranger) {\n var index,\n range,\n rangeBand;\n\n function scale(x) {\n return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length];\n }\n\n function steps(start, step) {\n return d3.range(domain.length).map(function(i) { return start + step * i; });\n }\n\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = [];\n index = new d3_Map;\n var i = -1, n = x.length, xi;\n while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));\n return scale[ranger.t](ranger.x, ranger.p);\n };\n\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n rangeBand = 0;\n ranger = {t: \"range\", x: x};\n return scale;\n };\n\n scale.rangePoints = function(x, padding) {\n if (arguments.length < 2) padding = 0;\n var start = x[0],\n stop = x[1],\n step = (stop - start) / (domain.length - 1 + padding);\n range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step);\n rangeBand = 0;\n ranger = {t: \"rangePoints\", x: x, p: padding};\n return scale;\n };\n\n scale.rangeBands = function(x, padding) {\n if (arguments.length < 2) padding = 0;\n var reverse = x[1] < x[0],\n start = x[reverse - 0],\n stop = x[1 - reverse],\n step = (stop - start) / (domain.length + padding);\n range = steps(start + step * padding, step);\n if (reverse) range.reverse();\n rangeBand = step * (1 - padding);\n ranger = {t: \"rangeBands\", x: x, p: padding};\n return scale;\n };\n\n scale.rangeRoundBands = function(x, padding) {\n if (arguments.length < 2) padding = 0;\n var reverse = x[1] < x[0],\n start = x[reverse - 0],\n stop = x[1 - reverse],\n step = Math.floor((stop - start) / (domain.length + padding)),\n error = stop - start - (domain.length - padding) * step;\n range = steps(start + Math.round(error / 2), step);\n if (reverse) range.reverse();\n rangeBand = Math.round(step * (1 - padding));\n ranger = {t: \"rangeRoundBands\", x: x, p: padding};\n return scale;\n };\n\n scale.rangeBand = function() {\n return rangeBand;\n };\n\n scale.rangeExtent = function() {\n return d3_scaleExtent(ranger.x);\n };\n\n scale.copy = function() {\n return d3_scale_ordinal(domain, ranger);\n };\n\n return scale.domain(domain);\n}\n/*\n * This product includes color specifications and designs developed by Cynthia\n * Brewer (http://colorbrewer.org/). See lib/colorbrewer for more information.\n */\n\nd3.scale.category10 = function() {\n return d3.scale.ordinal().range(d3_category10);\n};\n\nd3.scale.category20 = function() {\n return d3.scale.ordinal().range(d3_category20);\n};\n\nd3.scale.category20b = function() {\n return d3.scale.ordinal().range(d3_category20b);\n};\n\nd3.scale.category20c = function() {\n return d3.scale.ordinal().range(d3_category20c);\n};\n\nvar d3_category10 = [\n \"#1f77b4\", \"#ff7f0e\", \"#2ca02c\", \"#d62728\", \"#9467bd\",\n \"#8c564b\", \"#e377c2\", \"#7f7f7f\", \"#bcbd22\", \"#17becf\"\n];\n\nvar d3_category20 = [\n \"#1f77b4\", \"#aec7e8\",\n \"#ff7f0e\", \"#ffbb78\",\n \"#2ca02c\", \"#98df8a\",\n \"#d62728\", \"#ff9896\",\n \"#9467bd\", \"#c5b0d5\",\n \"#8c564b\", \"#c49c94\",\n \"#e377c2\", \"#f7b6d2\",\n \"#7f7f7f\", \"#c7c7c7\",\n \"#bcbd22\", \"#dbdb8d\",\n \"#17becf\", \"#9edae5\"\n];\n\nvar d3_category20b = [\n \"#393b79\", \"#5254a3\", \"#6b6ecf\", \"#9c9ede\",\n \"#637939\", \"#8ca252\", \"#b5cf6b\", \"#cedb9c\",\n \"#8c6d31\", \"#bd9e39\", \"#e7ba52\", \"#e7cb94\",\n \"#843c39\", \"#ad494a\", \"#d6616b\", \"#e7969c\",\n \"#7b4173\", \"#a55194\", \"#ce6dbd\", \"#de9ed6\"\n];\n\nvar d3_category20c = [\n \"#3182bd\", \"#6baed6\", \"#9ecae1\", \"#c6dbef\",\n \"#e6550d\", \"#fd8d3c\", \"#fdae6b\", \"#fdd0a2\",\n \"#31a354\", \"#74c476\", \"#a1d99b\", \"#c7e9c0\",\n \"#756bb1\", \"#9e9ac8\", \"#bcbddc\", \"#dadaeb\",\n \"#636363\", \"#969696\", \"#bdbdbd\", \"#d9d9d9\"\n];\nd3.scale.quantile = function() {\n return d3_scale_quantile([], []);\n};\n\nfunction d3_scale_quantile(domain, range) {\n var thresholds;\n\n function rescale() {\n var k = 0,\n n = domain.length,\n q = range.length;\n thresholds = [];\n while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);\n return scale;\n }\n\n function scale(x) {\n if (isNaN(x = +x)) return NaN;\n return range[d3.bisect(thresholds, x)];\n }\n\n scale.domain = function(x) {\n if (!arguments.length) return domain;\n domain = x.filter(function(d) { return !isNaN(d); }).sort(d3.ascending);\n return rescale();\n };\n\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n\n scale.quantiles = function() {\n return thresholds;\n };\n\n scale.copy = function() {\n return d3_scale_quantile(domain, range); // copy on write!\n };\n\n return rescale();\n}\nd3.scale.quantize = function() {\n return d3_scale_quantize(0, 1, [0, 1]);\n};\n\nfunction d3_scale_quantize(x0, x1, range) {\n var kx, i;\n\n function scale(x) {\n return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];\n }\n\n function rescale() {\n kx = range.length / (x1 - x0);\n i = range.length - 1;\n return scale;\n }\n\n scale.domain = function(x) {\n if (!arguments.length) return [x0, x1];\n x0 = +x[0];\n x1 = +x[x.length - 1];\n return rescale();\n };\n\n scale.range = function(x) {\n if (!arguments.length) return range;\n range = x;\n return rescale();\n };\n\n scale.copy = function() {\n return d3_scale_quantize(x0, x1, range); // copy on write\n };\n\n return rescale();\n}\nd3.scale.identity = function() {\n return d3_scale_identity([0, 1]);\n};\n\nfunction d3_scale_identity(domain) {\n\n function identity(x) { return +x; }\n\n identity.invert = identity;\n\n identity.domain = identity.range = function(x) {\n if (!arguments.length) return domain;\n domain = x.map(identity);\n return identity;\n };\n\n identity.ticks = function(m) {\n return d3_scale_linearTicks(domain, m);\n };\n\n identity.tickFormat = function(m) {\n return d3_scale_linearTickFormat(domain, m);\n };\n\n identity.copy = function() {\n return d3_scale_identity(domain);\n };\n\n return identity;\n}\nd3.svg = {};\nd3.svg.arc = function() {\n var innerRadius = d3_svg_arcInnerRadius,\n outerRadius = d3_svg_arcOuterRadius,\n startAngle = d3_svg_arcStartAngle,\n endAngle = d3_svg_arcEndAngle;\n\n function arc() {\n var r0 = innerRadius.apply(this, arguments),\n r1 = outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset,\n a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset,\n da = (a1 < a0 && (da = a0, a0 = a1, a1 = da), a1 - a0),\n df = da < Math.PI ? \"0\" : \"1\",\n c0 = Math.cos(a0),\n s0 = Math.sin(a0),\n c1 = Math.cos(a1),\n s1 = Math.sin(a1);\n return da >= d3_svg_arcMax\n ? (r0\n ? \"M0,\" + r1\n + \"A\" + r1 + \",\" + r1 + \" 0 1,1 0,\" + (-r1)\n + \"A\" + r1 + \",\" + r1 + \" 0 1,1 0,\" + r1\n + \"M0,\" + r0\n + \"A\" + r0 + \",\" + r0 + \" 0 1,0 0,\" + (-r0)\n + \"A\" + r0 + \",\" + r0 + \" 0 1,0 0,\" + r0\n + \"Z\"\n : \"M0,\" + r1\n + \"A\" + r1 + \",\" + r1 + \" 0 1,1 0,\" + (-r1)\n + \"A\" + r1 + \",\" + r1 + \" 0 1,1 0,\" + r1\n + \"Z\")\n : (r0\n ? \"M\" + r1 * c0 + \",\" + r1 * s0\n + \"A\" + r1 + \",\" + r1 + \" 0 \" + df + \",1 \" + r1 * c1 + \",\" + r1 * s1\n + \"L\" + r0 * c1 + \",\" + r0 * s1\n + \"A\" + r0 + \",\" + r0 + \" 0 \" + df + \",0 \" + r0 * c0 + \",\" + r0 * s0\n + \"Z\"\n : \"M\" + r1 * c0 + \",\" + r1 * s0\n + \"A\" + r1 + \",\" + r1 + \" 0 \" + df + \",1 \" + r1 * c1 + \",\" + r1 * s1\n + \"L0,0\"\n + \"Z\");\n }\n\n arc.innerRadius = function(v) {\n if (!arguments.length) return innerRadius;\n innerRadius = d3.functor(v);\n return arc;\n };\n\n arc.outerRadius = function(v) {\n if (!arguments.length) return outerRadius;\n outerRadius = d3.functor(v);\n return arc;\n };\n\n arc.startAngle = function(v) {\n if (!arguments.length) return startAngle;\n startAngle = d3.functor(v);\n return arc;\n };\n\n arc.endAngle = function(v) {\n if (!arguments.length) return endAngle;\n endAngle = d3.functor(v);\n return arc;\n };\n\n arc.centroid = function() {\n var r = (innerRadius.apply(this, arguments)\n + outerRadius.apply(this, arguments)) / 2,\n a = (startAngle.apply(this, arguments)\n + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;\n return [Math.cos(a) * r, Math.sin(a) * r];\n };\n\n return arc;\n};\n\nvar d3_svg_arcOffset = -Math.PI / 2,\n d3_svg_arcMax = 2 * Math.PI - 1e-6;\n\nfunction d3_svg_arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction d3_svg_arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction d3_svg_arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction d3_svg_arcEndAngle(d) {\n return d.endAngle;\n}\nfunction d3_svg_line(projection) {\n var x = d3_svg_lineX,\n y = d3_svg_lineY,\n interpolate = d3_svg_lineInterpolatorDefault,\n interpolator = d3_svg_lineInterpolators.get(interpolate),\n tension = .7;\n\n function line(d) {\n return d.length < 1 ? null : \"M\" + interpolator(projection(d3_svg_linePoints(this, d, x, y)), tension);\n }\n\n line.x = function(v) {\n if (!arguments.length) return x;\n x = v;\n return line;\n };\n\n line.y = function(v) {\n if (!arguments.length) return y;\n y = v;\n return line;\n };\n\n line.interpolate = function(v) {\n if (!arguments.length) return interpolate;\n if (!d3_svg_lineInterpolators.has(v += \"\")) v = d3_svg_lineInterpolatorDefault;\n interpolator = d3_svg_lineInterpolators.get(interpolate = v);\n return line;\n };\n\n line.tension = function(v) {\n if (!arguments.length) return tension;\n tension = v;\n return line;\n };\n\n return line;\n}\n\nd3.svg.line = function() {\n return d3_svg_line(Object);\n};\n\n// Converts the specified array of data into an array of points\n// (x-y tuples), by evaluating the specified `x` and `y` functions on each\n// data point. The `this` context of the evaluated functions is the specified\n// \"self\" object; each function is passed the current datum and index.\nfunction d3_svg_linePoints(self, d, x, y) {\n var points = [],\n i = -1,\n n = d.length,\n fx = typeof x === \"function\",\n fy = typeof y === \"function\",\n value;\n if (fx && fy) {\n while (++i < n) points.push([\n x.call(self, value = d[i], i),\n y.call(self, value, i)\n ]);\n } else if (fx) {\n while (++i < n) points.push([x.call(self, d[i], i), y]);\n } else if (fy) {\n while (++i < n) points.push([x, y.call(self, d[i], i)]);\n } else {\n while (++i < n) points.push([x, y]);\n }\n return points;\n}\n\n// The default `x` property, which references d[0].\nfunction d3_svg_lineX(d) {\n return d[0];\n}\n\n// The default `y` property, which references d[1].\nfunction d3_svg_lineY(d) {\n return d[1];\n}\n\nvar d3_svg_lineInterpolatorDefault = \"linear\";\n\n// The various interpolators supported by the `line` class.\nvar d3_svg_lineInterpolators = d3.map({\n \"linear\": d3_svg_lineLinear,\n \"step-before\": d3_svg_lineStepBefore,\n \"step-after\": d3_svg_lineStepAfter,\n \"basis\": d3_svg_lineBasis,\n \"basis-open\": d3_svg_lineBasisOpen,\n \"basis-closed\": d3_svg_lineBasisClosed,\n \"bundle\": d3_svg_lineBundle,\n \"cardinal\": d3_svg_lineCardinal,\n \"cardinal-open\": d3_svg_lineCardinalOpen,\n \"cardinal-closed\": d3_svg_lineCardinalClosed,\n \"monotone\": d3_svg_lineMonotone\n});\n\n// Linear interpolation; generates \"L\" commands.\nfunction d3_svg_lineLinear(points) {\n var i = 0,\n n = points.length,\n p = points[0],\n path = [p[0], \",\", p[1]];\n while (++i < n) path.push(\"L\", (p = points[i])[0], \",\", p[1]);\n return path.join(\"\");\n}\n\n// Step interpolation; generates \"H\" and \"V\" commands.\nfunction d3_svg_lineStepBefore(points) {\n var i = 0,\n n = points.length,\n p = points[0],\n path = [p[0], \",\", p[1]];\n while (++i < n) path.push(\"V\", (p = points[i])[1], \"H\", p[0]);\n return path.join(\"\");\n}\n\n// Step interpolation; generates \"H\" and \"V\" commands.\nfunction d3_svg_lineStepAfter(points) {\n var i = 0,\n n = points.length,\n p = points[0],\n path = [p[0], \",\", p[1]];\n while (++i < n) path.push(\"H\", (p = points[i])[0], \"V\", p[1]);\n return path.join(\"\");\n}\n\n// Open cardinal spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineCardinalOpen(points, tension) {\n return points.length < 4\n ? d3_svg_lineLinear(points)\n : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1),\n d3_svg_lineCardinalTangents(points, tension));\n}\n\n// Closed cardinal spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineCardinalClosed(points, tension) {\n return points.length < 3\n ? d3_svg_lineLinear(points)\n : points[0] + d3_svg_lineHermite((points.push(points[0]), points),\n d3_svg_lineCardinalTangents([points[points.length - 2]]\n .concat(points, [points[1]]), tension));\n}\n\n// Cardinal spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineCardinal(points, tension, closed) {\n return points.length < 3\n ? d3_svg_lineLinear(points)\n : points[0] + d3_svg_lineHermite(points,\n d3_svg_lineCardinalTangents(points, tension));\n}\n\n// Hermite spline construction; generates \"C\" commands.\nfunction d3_svg_lineHermite(points, tangents) {\n if (tangents.length < 1\n || (points.length != tangents.length\n && points.length != tangents.length + 2)) {\n return d3_svg_lineLinear(points);\n }\n\n var quad = points.length != tangents.length,\n path = \"\",\n p0 = points[0],\n p = points[1],\n t0 = tangents[0],\n t = t0,\n pi = 1;\n\n if (quad) {\n path += \"Q\" + (p[0] - t0[0] * 2 / 3) + \",\" + (p[1] - t0[1] * 2 / 3)\n + \",\" + p[0] + \",\" + p[1];\n p0 = points[1];\n pi = 2;\n }\n\n if (tangents.length > 1) {\n t = tangents[1];\n p = points[pi];\n pi++;\n path += \"C\" + (p0[0] + t0[0]) + \",\" + (p0[1] + t0[1])\n + \",\" + (p[0] - t[0]) + \",\" + (p[1] - t[1])\n + \",\" + p[0] + \",\" + p[1];\n for (var i = 2; i < tangents.length; i++, pi++) {\n p = points[pi];\n t = tangents[i];\n path += \"S\" + (p[0] - t[0]) + \",\" + (p[1] - t[1])\n + \",\" + p[0] + \",\" + p[1];\n }\n }\n\n if (quad) {\n var lp = points[pi];\n path += \"Q\" + (p[0] + t[0] * 2 / 3) + \",\" + (p[1] + t[1] * 2 / 3)\n + \",\" + lp[0] + \",\" + lp[1];\n }\n\n return path;\n}\n\n// Generates tangents for a cardinal spline.\nfunction d3_svg_lineCardinalTangents(points, tension) {\n var tangents = [],\n a = (1 - tension) / 2,\n p0,\n p1 = points[0],\n p2 = points[1],\n i = 1,\n n = points.length;\n while (++i < n) {\n p0 = p1;\n p1 = p2;\n p2 = points[i];\n tangents.push([a * (p2[0] - p0[0]), a * (p2[1] - p0[1])]);\n }\n return tangents;\n}\n\n// B-spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineBasis(points) {\n if (points.length < 3) return d3_svg_lineLinear(points);\n var i = 1,\n n = points.length,\n pi = points[0],\n x0 = pi[0],\n y0 = pi[1],\n px = [x0, x0, x0, (pi = points[1])[0]],\n py = [y0, y0, y0, pi[1]],\n path = [x0, \",\", y0];\n d3_svg_lineBasisBezier(path, px, py);\n while (++i < n) {\n pi = points[i];\n px.shift(); px.push(pi[0]);\n py.shift(); py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n i = -1;\n while (++i < 2) {\n px.shift(); px.push(pi[0]);\n py.shift(); py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n return path.join(\"\");\n}\n\n// Open B-spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineBasisOpen(points) {\n if (points.length < 4) return d3_svg_lineLinear(points);\n var path = [],\n i = -1,\n n = points.length,\n pi,\n px = [0],\n py = [0];\n while (++i < 3) {\n pi = points[i];\n px.push(pi[0]);\n py.push(pi[1]);\n }\n path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px)\n + \",\" + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));\n --i; while (++i < n) {\n pi = points[i];\n px.shift(); px.push(pi[0]);\n py.shift(); py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n return path.join(\"\");\n}\n\n// Closed B-spline interpolation; generates \"C\" commands.\nfunction d3_svg_lineBasisClosed(points) {\n var path,\n i = -1,\n n = points.length,\n m = n + 4,\n pi,\n px = [],\n py = [];\n while (++i < 4) {\n pi = points[i % n];\n px.push(pi[0]);\n py.push(pi[1]);\n }\n path = [\n d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), \",\",\n d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)\n ];\n --i; while (++i < m) {\n pi = points[i % n];\n px.shift(); px.push(pi[0]);\n py.shift(); py.push(pi[1]);\n d3_svg_lineBasisBezier(path, px, py);\n }\n return path.join(\"\");\n}\n\nfunction d3_svg_lineBundle(points, tension) {\n var n = points.length - 1,\n x0 = points[0][0],\n y0 = points[0][1],\n dx = points[n][0] - x0,\n dy = points[n][1] - y0,\n i = -1,\n p,\n t;\n while (++i <= n) {\n p = points[i];\n t = i / n;\n p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);\n p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);\n }\n return d3_svg_lineBasis(points);\n}\n\n// Returns the dot product of the given four-element vectors.\nfunction d3_svg_lineDot4(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n\n// Matrix to transform basis (b-spline) control points to bezier\n// control points. Derived from FvD 11.2.8.\nvar d3_svg_lineBasisBezier1 = [0, 2/3, 1/3, 0],\n d3_svg_lineBasisBezier2 = [0, 1/3, 2/3, 0],\n d3_svg_lineBasisBezier3 = [0, 1/6, 2/3, 1/6];\n\n// Pushes a \"C\" B\u00e9zier curve onto the specified path array, given the\n// two specified four-element arrays which define the control points.\nfunction d3_svg_lineBasisBezier(path, x, y) {\n path.push(\n \"C\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x),\n \",\", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));\n}\n\n// Computes the slope from points p0 to p1.\nfunction d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}\n\n// Compute three-point differences for the given points.\n// http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Finite_difference\nfunction d3_svg_lineFiniteDifferences(points) {\n var i = 0,\n j = points.length - 1,\n m = [],\n p0 = points[0],\n p1 = points[1],\n d = m[0] = d3_svg_lineSlope(p0, p1);\n while (++i < j) {\n m[i] = d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]));\n }\n m[i] = d;\n return m;\n}\n\n// Interpolates the given points using Fritsch-Carlson Monotone cubic Hermite\n// interpolation. Returns an array of tangent vectors. For details, see\n// http://en.wikipedia.org/wiki/Monotone_cubic_interpolation\nfunction d3_svg_lineMonotoneTangents(points) {\n var tangents = [],\n d,\n a,\n b,\n s,\n m = d3_svg_lineFiniteDifferences(points),\n i = -1,\n j = points.length - 1;\n\n // The first two steps are done by computing finite-differences:\n // 1. Compute the slopes of the secant lines between successive points.\n // 2. Initialize the tangents at every point as the average of the secants.\n\n // Then, for each segment\u2026\n while (++i < j) {\n d = d3_svg_lineSlope(points[i], points[i + 1]);\n\n // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set\n // mk = m{k + 1} = 0 as the spline connecting these points must be flat to\n // preserve monotonicity. Ignore step 4 and 5 for those k.\n\n if (Math.abs(d) < 1e-6) {\n m[i] = m[i + 1] = 0;\n } else {\n // 4. Let ak = mk / dk and bk = m{k + 1} / dk.\n a = m[i] / d;\n b = m[i + 1] / d;\n\n // 5. Prevent overshoot and ensure monotonicity by restricting the\n // magnitude of vector <ak, bk> to a circle of radius 3.\n s = a * a + b * b;\n if (s > 9) {\n s = d * 3 / Math.sqrt(s);\n m[i] = s * a;\n m[i + 1] = s * b;\n }\n }\n }\n\n // Compute the normalized tangent vector from the slopes. Note that if x is\n // not monotonic, it's possible that the slope will be infinite, so we protect\n // against NaN by setting the coordinate to zero.\n i = -1; while (++i <= j) {\n s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0])\n / (6 * (1 + m[i] * m[i]));\n tangents.push([s || 0, m[i] * s || 0]);\n }\n\n return tangents;\n}\n\nfunction d3_svg_lineMonotone(points) {\n return points.length < 3\n ? d3_svg_lineLinear(points)\n : points[0] +\n d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));\n}\nd3.svg.line.radial = function() {\n var line = d3_svg_line(d3_svg_lineRadial);\n line.radius = line.x, delete line.x;\n line.angle = line.y, delete line.y;\n return line;\n};\n\nfunction d3_svg_lineRadial(points) {\n var point,\n i = -1,\n n = points.length,\n r,\n a;\n while (++i < n) {\n point = points[i];\n r = point[0];\n a = point[1] + d3_svg_arcOffset;\n point[0] = r * Math.cos(a);\n point[1] = r * Math.sin(a);\n }\n return points;\n}\nfunction d3_svg_area(projection) {\n var x0 = d3_svg_lineX,\n x1 = d3_svg_lineX,\n y0 = 0,\n y1 = d3_svg_lineY,\n interpolate,\n i0,\n i1,\n tension = .7;\n\n function area(d) {\n if (d.length < 1) return null;\n var points0 = d3_svg_linePoints(this, d, x0, y0),\n points1 = d3_svg_linePoints(this, d, x0 === x1 ? d3_svg_areaX(points0) : x1, y0 === y1 ? d3_svg_areaY(points0) : y1);\n return \"M\" + i0(projection(points1), tension)\n + \"L\" + i1(projection(points0.reverse()), tension)\n + \"Z\";\n }\n\n area.x = function(x) {\n if (!arguments.length) return x1;\n x0 = x1 = x;\n return area;\n };\n\n area.x0 = function(x) {\n if (!arguments.length) return x0;\n x0 = x;\n return area;\n };\n\n area.x1 = function(x) {\n if (!arguments.length) return x1;\n x1 = x;\n return area;\n };\n\n area.y = function(y) {\n if (!arguments.length) return y1;\n y0 = y1 = y;\n return area;\n };\n\n area.y0 = function(y) {\n if (!arguments.length) return y0;\n y0 = y;\n return area;\n };\n\n area.y1 = function(y) {\n if (!arguments.length) return y1;\n y1 = y;\n return area;\n };\n\n area.interpolate = function(x) {\n if (!arguments.length) return interpolate;\n if (!d3_svg_lineInterpolators.has(x += \"\")) x = d3_svg_lineInterpolatorDefault;\n i0 = d3_svg_lineInterpolators.get(interpolate = x);\n i1 = i0.reverse || i0;\n return area;\n };\n\n area.tension = function(x) {\n if (!arguments.length) return tension;\n tension = x;\n return area;\n };\n\n return area.interpolate(\"linear\");\n}\n\nd3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;\nd3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;\n\nd3.svg.area = function() {\n return d3_svg_area(Object);\n};\n\nfunction d3_svg_areaX(points) {\n return function(d, i) {\n return points[i][0];\n };\n}\n\nfunction d3_svg_areaY(points) {\n return function(d, i) {\n return points[i][1];\n };\n}\nd3.svg.area.radial = function() {\n var area = d3_svg_area(d3_svg_lineRadial);\n area.radius = area.x, delete area.x;\n area.innerRadius = area.x0, delete area.x0;\n area.outerRadius = area.x1, delete area.x1;\n area.angle = area.y, delete area.y;\n area.startAngle = area.y0, delete area.y0;\n area.endAngle = area.y1, delete area.y1;\n return area;\n};\nd3.svg.chord = function() {\n var source = d3_svg_chordSource,\n target = d3_svg_chordTarget,\n radius = d3_svg_chordRadius,\n startAngle = d3_svg_arcStartAngle,\n endAngle = d3_svg_arcEndAngle;\n\n // TODO Allow control point to be customized.\n\n function chord(d, i) {\n var s = subgroup(this, source, d, i),\n t = subgroup(this, target, d, i);\n return \"M\" + s.p0\n + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t)\n ? curve(s.r, s.p1, s.r, s.p0)\n : curve(s.r, s.p1, t.r, t.p0)\n + arc(t.r, t.p1, t.a1 - t.a0)\n + curve(t.r, t.p1, s.r, s.p0))\n + \"Z\";\n }\n\n function subgroup(self, f, d, i) {\n var subgroup = f.call(self, d, i),\n r = radius.call(self, subgroup, i),\n a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset,\n a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;\n return {\n r: r,\n a0: a0,\n a1: a1,\n p0: [r * Math.cos(a0), r * Math.sin(a0)],\n p1: [r * Math.cos(a1), r * Math.sin(a1)]\n };\n }\n\n function equals(a, b) {\n return a.a0 == b.a0 && a.a1 == b.a1;\n }\n\n function arc(r, p, a) {\n return \"A\" + r + \",\" + r + \" 0 \" + +(a > Math.PI) + \",1 \" + p;\n }\n\n function curve(r0, p0, r1, p1) {\n return \"Q 0,0 \" + p1;\n }\n\n chord.radius = function(v) {\n if (!arguments.length) return radius;\n radius = d3.functor(v);\n return chord;\n };\n\n chord.source = function(v) {\n if (!arguments.length) return source;\n source = d3.functor(v);\n return chord;\n };\n\n chord.target = function(v) {\n if (!arguments.length) return target;\n target = d3.functor(v);\n return chord;\n };\n\n chord.startAngle = function(v) {\n if (!arguments.length) return startAngle;\n startAngle = d3.functor(v);\n return chord;\n };\n\n chord.endAngle = function(v) {\n if (!arguments.length) return endAngle;\n endAngle = d3.functor(v);\n return chord;\n };\n\n return chord;\n};\n\nfunction d3_svg_chordSource(d) {\n return d.source;\n}\n\nfunction d3_svg_chordTarget(d) {\n return d.target;\n}\n\nfunction d3_svg_chordRadius(d) {\n return d.radius;\n}\n\nfunction d3_svg_chordStartAngle(d) {\n return d.startAngle;\n}\n\nfunction d3_svg_chordEndAngle(d) {\n return d.endAngle;\n}\nd3.svg.diagonal = function() {\n var source = d3_svg_chordSource,\n target = d3_svg_chordTarget,\n projection = d3_svg_diagonalProjection;\n\n function diagonal(d, i) {\n var p0 = source.call(this, d, i),\n p3 = target.call(this, d, i),\n m = (p0.y + p3.y) / 2,\n p = [p0, {x: p0.x, y: m}, {x: p3.x, y: m}, p3];\n p = p.map(projection);\n return \"M\" + p[0] + \"C\" + p[1] + \" \" + p[2] + \" \" + p[3];\n }\n\n diagonal.source = function(x) {\n if (!arguments.length) return source;\n source = d3.functor(x);\n return diagonal;\n };\n\n diagonal.target = function(x) {\n if (!arguments.length) return target;\n target = d3.functor(x);\n return diagonal;\n };\n\n diagonal.projection = function(x) {\n if (!arguments.length) return projection;\n projection = x;\n return diagonal;\n };\n\n return diagonal;\n};\n\nfunction d3_svg_diagonalProjection(d) {\n return [d.x, d.y];\n}\nd3.svg.diagonal.radial = function() {\n var diagonal = d3.svg.diagonal(),\n projection = d3_svg_diagonalProjection,\n projection_ = diagonal.projection;\n\n diagonal.projection = function(x) {\n return arguments.length\n ? projection_(d3_svg_diagonalRadialProjection(projection = x))\n : projection;\n };\n\n return diagonal;\n};\n\nfunction d3_svg_diagonalRadialProjection(projection) {\n return function() {\n var d = projection.apply(this, arguments),\n r = d[0],\n a = d[1] + d3_svg_arcOffset;\n return [r * Math.cos(a), r * Math.sin(a)];\n };\n}\nd3.svg.mouse = d3.mouse;\nd3.svg.touches = d3.touches;\nd3.svg.symbol = function() {\n var type = d3_svg_symbolType,\n size = d3_svg_symbolSize;\n\n function symbol(d, i) {\n return (d3_svg_symbols.get(type.call(this, d, i))\n || d3_svg_symbolCircle)\n (size.call(this, d, i));\n }\n\n symbol.type = function(x) {\n if (!arguments.length) return type;\n type = d3.functor(x);\n return symbol;\n };\n\n // size of symbol in square pixels\n symbol.size = function(x) {\n if (!arguments.length) return size;\n size = d3.functor(x);\n return symbol;\n };\n\n return symbol;\n};\n\nfunction d3_svg_symbolSize() {\n return 64;\n}\n\nfunction d3_svg_symbolType() {\n return \"circle\";\n}\n\nfunction d3_svg_symbolCircle(size) {\n var r = Math.sqrt(size / Math.PI);\n return \"M0,\" + r\n + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + (-r)\n + \"A\" + r + \",\" + r + \" 0 1,1 0,\" + r\n + \"Z\";\n}\n\n// TODO cross-diagonal?\nvar d3_svg_symbols = d3.map({\n \"circle\": d3_svg_symbolCircle,\n \"cross\": function(size) {\n var r = Math.sqrt(size / 5) / 2;\n return \"M\" + -3 * r + \",\" + -r\n + \"H\" + -r\n + \"V\" + -3 * r\n + \"H\" + r\n + \"V\" + -r\n + \"H\" + 3 * r\n + \"V\" + r\n + \"H\" + r\n + \"V\" + 3 * r\n + \"H\" + -r\n + \"V\" + r\n + \"H\" + -3 * r\n + \"Z\";\n },\n \"diamond\": function(size) {\n var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)),\n rx = ry * d3_svg_symbolTan30;\n return \"M0,\" + -ry\n + \"L\" + rx + \",0\"\n + \" 0,\" + ry\n + \" \" + -rx + \",0\"\n + \"Z\";\n },\n \"square\": function(size) {\n var r = Math.sqrt(size) / 2;\n return \"M\" + -r + \",\" + -r\n + \"L\" + r + \",\" + -r\n + \" \" + r + \",\" + r\n + \" \" + -r + \",\" + r\n + \"Z\";\n },\n \"triangle-down\": function(size) {\n var rx = Math.sqrt(size / d3_svg_symbolSqrt3),\n ry = rx * d3_svg_symbolSqrt3 / 2;\n return \"M0,\" + ry\n + \"L\" + rx +\",\" + -ry\n + \" \" + -rx + \",\" + -ry\n + \"Z\";\n },\n \"triangle-up\": function(size) {\n var rx = Math.sqrt(size / d3_svg_symbolSqrt3),\n ry = rx * d3_svg_symbolSqrt3 / 2;\n return \"M0,\" + -ry\n + \"L\" + rx +\",\" + ry\n + \" \" + -rx + \",\" + ry\n + \"Z\";\n }\n});\n\nd3.svg.symbolTypes = d3_svg_symbols.keys();\n\nvar d3_svg_symbolSqrt3 = Math.sqrt(3),\n d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);\nd3.svg.axis = function() {\n var scale = d3.scale.linear(),\n orient = \"bottom\",\n tickMajorSize = 6,\n tickMinorSize = 6,\n tickEndSize = 6,\n tickPadding = 3,\n tickArguments_ = [10],\n tickValues = null,\n tickFormat_,\n tickSubdivide = 0;\n\n function axis(g) {\n g.each(function() {\n var g = d3.select(this);\n\n // Ticks, or domain values for ordinal scales.\n var ticks = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain()) : tickValues,\n tickFormat = tickFormat_ == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String) : tickFormat_;\n\n // Minor ticks.\n var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide),\n subtick = g.selectAll(\".minor\").data(subticks, String),\n subtickEnter = subtick.enter().insert(\"line\", \"g\").attr(\"class\", \"tick minor\").style(\"opacity\", 1e-6),\n subtickExit = d3.transition(subtick.exit()).style(\"opacity\", 1e-6).remove(),\n subtickUpdate = d3.transition(subtick).style(\"opacity\", 1);\n\n // Major ticks.\n var tick = g.selectAll(\"g\").data(ticks, String),\n tickEnter = tick.enter().insert(\"g\", \"path\").style(\"opacity\", 1e-6),\n tickExit = d3.transition(tick.exit()).style(\"opacity\", 1e-6).remove(),\n tickUpdate = d3.transition(tick).style(\"opacity\", 1),\n tickTransform;\n\n // Domain.\n var range = d3_scaleRange(scale),\n path = g.selectAll(\".domain\").data([0]),\n pathEnter = path.enter().append(\"path\").attr(\"class\", \"domain\"),\n pathUpdate = d3.transition(path);\n\n // Stash a snapshot of the new scale, and retrieve the old snapshot.\n var scale1 = scale.copy(),\n scale0 = this.__chart__ || scale1;\n this.__chart__ = scale1;\n\n tickEnter.append(\"line\").attr(\"class\", \"tick\");\n tickEnter.append(\"text\");\n tickUpdate.select(\"text\").text(tickFormat);\n\n switch (orient) {\n case \"bottom\": {\n tickTransform = d3_svg_axisX;\n subtickEnter.attr(\"y2\", tickMinorSize);\n subtickUpdate.attr(\"x2\", 0).attr(\"y2\", tickMinorSize);\n tickEnter.select(\"line\").attr(\"y2\", tickMajorSize);\n tickEnter.select(\"text\").attr(\"y\", Math.max(tickMajorSize, 0) + tickPadding);\n tickUpdate.select(\"line\").attr(\"x2\", 0).attr(\"y2\", tickMajorSize);\n tickUpdate.select(\"text\").attr(\"x\", 0).attr(\"y\", Math.max(tickMajorSize, 0) + tickPadding).attr(\"dy\", \".71em\").attr(\"text-anchor\", \"middle\");\n pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + tickEndSize + \"V0H\" + range[1] + \"V\" + tickEndSize);\n break;\n }\n case \"top\": {\n tickTransform = d3_svg_axisX;\n subtickEnter.attr(\"y2\", -tickMinorSize);\n subtickUpdate.attr(\"x2\", 0).attr(\"y2\", -tickMinorSize);\n tickEnter.select(\"line\").attr(\"y2\", -tickMajorSize);\n tickEnter.select(\"text\").attr(\"y\", -(Math.max(tickMajorSize, 0) + tickPadding));\n tickUpdate.select(\"line\").attr(\"x2\", 0).attr(\"y2\", -tickMajorSize);\n tickUpdate.select(\"text\").attr(\"x\", 0).attr(\"y\", -(Math.max(tickMajorSize, 0) + tickPadding)).attr(\"dy\", \"0em\").attr(\"text-anchor\", \"middle\");\n pathUpdate.attr(\"d\", \"M\" + range[0] + \",\" + -tickEndSize + \"V0H\" + range[1] + \"V\" + -tickEndSize);\n break;\n }\n case \"left\": {\n tickTransform = d3_svg_axisY;\n subtickEnter.attr(\"x2\", -tickMinorSize);\n subtickUpdate.attr(\"x2\", -tickMinorSize).attr(\"y2\", 0);\n tickEnter.select(\"line\").attr(\"x2\", -tickMajorSize);\n tickEnter.select(\"text\").attr(\"x\", -(Math.max(tickMajorSize, 0) + tickPadding));\n tickUpdate.select(\"line\").attr(\"x2\", -tickMajorSize).attr(\"y2\", 0);\n tickUpdate.select(\"text\").attr(\"x\", -(Math.max(tickMajorSize, 0) + tickPadding)).attr(\"y\", 0).attr(\"dy\", \".32em\").attr(\"text-anchor\", \"end\");\n pathUpdate.attr(\"d\", \"M\" + -tickEndSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + -tickEndSize);\n break;\n }\n case \"right\": {\n tickTransform = d3_svg_axisY;\n subtickEnter.attr(\"x2\", tickMinorSize);\n subtickUpdate.attr(\"x2\", tickMinorSize).attr(\"y2\", 0);\n tickEnter.select(\"line\").attr(\"x2\", tickMajorSize);\n tickEnter.select(\"text\").attr(\"x\", Math.max(tickMajorSize, 0) + tickPadding);\n tickUpdate.select(\"line\").attr(\"x2\", tickMajorSize).attr(\"y2\", 0);\n tickUpdate.select(\"text\").attr(\"x\", Math.max(tickMajorSize, 0) + tickPadding).attr(\"y\", 0).attr(\"dy\", \".32em\").attr(\"text-anchor\", \"start\");\n pathUpdate.attr(\"d\", \"M\" + tickEndSize + \",\" + range[0] + \"H0V\" + range[1] + \"H\" + tickEndSize);\n break;\n }\n }\n\n // For quantitative scales:\n // - enter new ticks from the old scale\n // - exit old ticks to the new scale\n if (scale.ticks) {\n tickEnter.call(tickTransform, scale0);\n tickUpdate.call(tickTransform, scale1);\n tickExit.call(tickTransform, scale1);\n subtickEnter.call(tickTransform, scale0);\n subtickUpdate.call(tickTransform, scale1);\n subtickExit.call(tickTransform, scale1);\n }\n\n // For ordinal scales:\n // - any entering ticks are undefined in the old scale\n // - any exiting ticks are undefined in the new scale\n // Therefore, we only need to transition updating ticks.\n else {\n var dx = scale1.rangeBand() / 2, x = function(d) { return scale1(d) + dx; };\n tickEnter.call(tickTransform, x);\n tickUpdate.call(tickTransform, x);\n }\n });\n }\n\n axis.scale = function(x) {\n if (!arguments.length) return scale;\n scale = x;\n return axis;\n };\n\n axis.orient = function(x) {\n if (!arguments.length) return orient;\n orient = x;\n return axis;\n };\n\n axis.ticks = function() {\n if (!arguments.length) return tickArguments_;\n tickArguments_ = arguments;\n return axis;\n };\n\n axis.tickValues = function(x) {\n if (!arguments.length) return tickValues;\n tickValues = x;\n return axis;\n };\n\n axis.tickFormat = function(x) {\n if (!arguments.length) return tickFormat_;\n tickFormat_ = x;\n return axis;\n };\n\n axis.tickSize = function(x, y, z) {\n if (!arguments.length) return tickMajorSize;\n var n = arguments.length - 1;\n tickMajorSize = +x;\n tickMinorSize = n > 1 ? +y : tickMajorSize;\n tickEndSize = n > 0 ? +arguments[n] : tickMajorSize;\n return axis;\n };\n\n axis.tickPadding = function(x) {\n if (!arguments.length) return tickPadding;\n tickPadding = +x;\n return axis;\n };\n\n axis.tickSubdivide = function(x) {\n if (!arguments.length) return tickSubdivide;\n tickSubdivide = +x;\n return axis;\n };\n\n return axis;\n};\n\nfunction d3_svg_axisX(selection, x) {\n selection.attr(\"transform\", function(d) { return \"translate(\" + x(d) + \",0)\"; });\n}\n\nfunction d3_svg_axisY(selection, y) {\n selection.attr(\"transform\", function(d) { return \"translate(0,\" + y(d) + \")\"; });\n}\n\nfunction d3_svg_axisSubdivide(scale, ticks, m) {\n subticks = [];\n if (m && ticks.length > 1) {\n var extent = d3_scaleExtent(scale.domain()),\n subticks,\n i = -1,\n n = ticks.length,\n d = (ticks[1] - ticks[0]) / ++m,\n j,\n v;\n while (++i < n) {\n for (j = m; --j > 0;) {\n if ((v = +ticks[i] - j * d) >= extent[0]) {\n subticks.push(v);\n }\n }\n }\n for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1];) {\n subticks.push(v);\n }\n }\n return subticks;\n}\nd3.svg.brush = function() {\n var event = d3_eventDispatch(brush, \"brushstart\", \"brush\", \"brushend\"),\n x = null, // x-scale, optional\n y = null, // y-scale, optional\n resizes = d3_svg_brushResizes[0],\n extent = [[0, 0], [0, 0]], // [x0, y0], [x1, y1], in pixels (integers)\n extentDomain; // the extent in data space, lazily created\n\n function brush(g) {\n g.each(function() {\n var g = d3.select(this),\n bg = g.selectAll(\".background\").data([0]),\n fg = g.selectAll(\".extent\").data([0]),\n tz = g.selectAll(\".resize\").data(resizes, String),\n e;\n\n // Prepare the brush container for events.\n g\n .style(\"pointer-events\", \"all\")\n .on(\"mousedown.brush\", brushstart)\n .on(\"touchstart.brush\", brushstart);\n\n // An invisible, mouseable area for starting a new brush.\n bg.enter().append(\"rect\")\n .attr(\"class\", \"background\")\n .style(\"visibility\", \"hidden\")\n .style(\"cursor\", \"crosshair\");\n\n // The visible brush extent; style this as you like!\n fg.enter().append(\"rect\")\n .attr(\"class\", \"extent\")\n .style(\"cursor\", \"move\");\n\n // More invisible rects for resizing the extent.\n tz.enter().append(\"g\")\n .attr(\"class\", function(d) { return \"resize \" + d; })\n .style(\"cursor\", function(d) { return d3_svg_brushCursor[d]; })\n .append(\"rect\")\n .attr(\"x\", function(d) { return /[ew]$/.test(d) ? -3 : null; })\n .attr(\"y\", function(d) { return /^[ns]/.test(d) ? -3 : null; })\n .attr(\"width\", 6)\n .attr(\"height\", 6)\n .style(\"visibility\", \"hidden\");\n\n // Show or hide the resizers.\n tz.style(\"display\", brush.empty() ? \"none\" : null);\n\n // Remove any superfluous resizers.\n tz.exit().remove();\n\n // Initialize the background to fill the defined range.\n // If the range isn't defined, you can post-process.\n if (x) {\n e = d3_scaleRange(x);\n bg.attr(\"x\", e[0]).attr(\"width\", e[1] - e[0]);\n redrawX(g);\n }\n if (y) {\n e = d3_scaleRange(y);\n bg.attr(\"y\", e[0]).attr(\"height\", e[1] - e[0]);\n redrawY(g);\n }\n redraw(g);\n });\n }\n\n function redraw(g) {\n g.selectAll(\".resize\").attr(\"transform\", function(d) {\n return \"translate(\" + extent[+/e$/.test(d)][0] + \",\" + extent[+/^s/.test(d)][1] + \")\";\n });\n }\n\n function redrawX(g) {\n g.select(\".extent\").attr(\"x\", extent[0][0]);\n g.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\", extent[1][0] - extent[0][0]);\n }\n\n function redrawY(g) {\n g.select(\".extent\").attr(\"y\", extent[0][1]);\n g.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\", extent[1][1] - extent[0][1]);\n }\n\n function brushstart() {\n var target = this,\n eventTarget = d3.select(d3.event.target),\n event_ = event.of(target, arguments),\n g = d3.select(target),\n resizing = eventTarget.datum(),\n resizingX = !/^(n|s)$/.test(resizing) && x,\n resizingY = !/^(e|w)$/.test(resizing) && y,\n dragging = eventTarget.classed(\"extent\"),\n center,\n origin = mouse(),\n offset;\n\n var w = d3.select(window)\n .on(\"mousemove.brush\", brushmove)\n .on(\"mouseup.brush\", brushend)\n .on(\"touchmove.brush\", brushmove)\n .on(\"touchend.brush\", brushend)\n .on(\"keydown.brush\", keydown)\n .on(\"keyup.brush\", keyup);\n\n // If the extent was clicked on, drag rather than brush;\n // store the point between the mouse and extent origin instead.\n if (dragging) {\n origin[0] = extent[0][0] - origin[0];\n origin[1] = extent[0][1] - origin[1];\n }\n\n // If a resizer was clicked on, record which side is to be resized.\n // Also, set the origin to the opposite side.\n else if (resizing) {\n var ex = +/w$/.test(resizing),\n ey = +/^n/.test(resizing);\n offset = [extent[1 - ex][0] - origin[0], extent[1 - ey][1] - origin[1]];\n origin[0] = extent[ex][0];\n origin[1] = extent[ey][1];\n }\n\n // If the ALT key is down when starting a brush, the center is at the mouse.\n else if (d3.event.altKey) center = origin.slice();\n\n // Propagate the active cursor to the body for the drag duration.\n g.style(\"pointer-events\", \"none\").selectAll(\".resize\").style(\"display\", null);\n d3.select(\"body\").style(\"cursor\", eventTarget.style(\"cursor\"));\n\n // Notify listeners.\n event_({type: \"brushstart\"});\n brushmove();\n d3_eventCancel();\n\n function mouse() {\n var touches = d3.event.changedTouches;\n return touches ? d3.touches(target, touches)[0] : d3.mouse(target);\n }\n\n function keydown() {\n if (d3.event.keyCode == 32) {\n if (!dragging) {\n center = null;\n origin[0] -= extent[1][0];\n origin[1] -= extent[1][1];\n dragging = 2;\n }\n d3_eventCancel();\n }\n }\n\n function keyup() {\n if (d3.event.keyCode == 32 && dragging == 2) {\n origin[0] += extent[1][0];\n origin[1] += extent[1][1];\n dragging = 0;\n d3_eventCancel();\n }\n }\n\n function brushmove() {\n var point = mouse(),\n moved = false;\n\n // Preserve the offset for thick resizers.\n if (offset) {\n point[0] += offset[0];\n point[1] += offset[1];\n }\n\n if (!dragging) {\n\n // If needed, determine the center from the current extent.\n if (d3.event.altKey) {\n if (!center) center = [(extent[0][0] + extent[1][0]) / 2, (extent[0][1] + extent[1][1]) / 2];\n\n // Update the origin, for when the ALT key is released.\n origin[0] = extent[+(point[0] < center[0])][0];\n origin[1] = extent[+(point[1] < center[1])][1];\n }\n\n // When the ALT key is released, we clear the center.\n else center = null;\n }\n\n // Update the brush extent for each dimension.\n if (resizingX && move1(point, x, 0)) {\n redrawX(g);\n moved = true;\n }\n if (resizingY && move1(point, y, 1)) {\n redrawY(g);\n moved = true;\n }\n\n // Final redraw and notify listeners.\n if (moved) {\n redraw(g);\n event_({type: \"brush\", mode: dragging ? \"move\" : \"resize\"});\n }\n }\n\n function move1(point, scale, i) {\n var range = d3_scaleRange(scale),\n r0 = range[0],\n r1 = range[1],\n position = origin[i],\n size = extent[1][i] - extent[0][i],\n min,\n max;\n\n // When dragging, reduce the range by the extent size and position.\n if (dragging) {\n r0 -= position;\n r1 -= size + position;\n }\n\n // Clamp the point so that the extent fits within the range extent.\n min = Math.max(r0, Math.min(r1, point[i]));\n\n // Compute the new extent bounds.\n if (dragging) {\n max = (min += position) + size;\n } else {\n\n // If the ALT key is pressed, then preserve the center of the extent.\n if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));\n\n // Compute the min and max of the position and point.\n if (position < min) {\n max = min;\n min = position;\n } else {\n max = position;\n }\n }\n\n // Update the stored bounds.\n if (extent[0][i] !== min || extent[1][i] !== max) {\n extentDomain = null;\n extent[0][i] = min;\n extent[1][i] = max;\n return true;\n }\n }\n\n function brushend() {\n brushmove();\n\n // reset the cursor styles\n g.style(\"pointer-events\", \"all\").selectAll(\".resize\").style(\"display\", brush.empty() ? \"none\" : null);\n d3.select(\"body\").style(\"cursor\", null);\n\n w .on(\"mousemove.brush\", null)\n .on(\"mouseup.brush\", null)\n .on(\"touchmove.brush\", null)\n .on(\"touchend.brush\", null)\n .on(\"keydown.brush\", null)\n .on(\"keyup.brush\", null);\n\n event_({type: \"brushend\"});\n d3_eventCancel();\n }\n }\n\n brush.x = function(z) {\n if (!arguments.length) return x;\n x = z;\n resizes = d3_svg_brushResizes[!x << 1 | !y]; // fore!\n return brush;\n };\n\n brush.y = function(z) {\n if (!arguments.length) return y;\n y = z;\n resizes = d3_svg_brushResizes[!x << 1 | !y]; // fore!\n return brush;\n };\n\n brush.extent = function(z) {\n var x0, x1, y0, y1, t;\n\n // Invert the pixel extent to data-space.\n if (!arguments.length) {\n z = extentDomain || extent;\n if (x) {\n x0 = z[0][0], x1 = z[1][0];\n if (!extentDomain) {\n x0 = extent[0][0], x1 = extent[1][0];\n if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);\n if (x1 < x0) t = x0, x0 = x1, x1 = t;\n }\n }\n if (y) {\n y0 = z[0][1], y1 = z[1][1];\n if (!extentDomain) {\n y0 = extent[0][1], y1 = extent[1][1];\n if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);\n if (y1 < y0) t = y0, y0 = y1, y1 = t;\n }\n }\n return x && y ? [[x0, y0], [x1, y1]] : x ? [x0, x1] : y && [y0, y1];\n }\n\n // Scale the data-space extent to pixels.\n extentDomain = [[0, 0], [0, 0]];\n if (x) {\n x0 = z[0], x1 = z[1];\n if (y) x0 = x0[0], x1 = x1[0];\n extentDomain[0][0] = x0, extentDomain[1][0] = x1;\n if (x.invert) x0 = x(x0), x1 = x(x1);\n if (x1 < x0) t = x0, x0 = x1, x1 = t;\n extent[0][0] = x0 | 0, extent[1][0] = x1 | 0;\n }\n if (y) {\n y0 = z[0], y1 = z[1];\n if (x) y0 = y0[1], y1 = y1[1];\n extentDomain[0][1] = y0, extentDomain[1][1] = y1;\n if (y.invert) y0 = y(y0), y1 = y(y1);\n if (y1 < y0) t = y0, y0 = y1, y1 = t;\n extent[0][1] = y0 | 0, extent[1][1] = y1 | 0;\n }\n\n return brush;\n };\n\n brush.clear = function() {\n extentDomain = null;\n extent[0][0] =\n extent[0][1] =\n extent[1][0] =\n extent[1][1] = 0;\n return brush;\n };\n\n brush.empty = function() {\n return (x && extent[0][0] === extent[1][0])\n || (y && extent[0][1] === extent[1][1]);\n };\n\n return d3.rebind(brush, event, \"on\");\n};\n\nvar d3_svg_brushCursor = {\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\n\nvar d3_svg_brushResizes = [\n [\"n\", \"e\", \"s\", \"w\", \"nw\", \"ne\", \"se\", \"sw\"],\n [\"e\", \"w\"],\n [\"n\", \"s\"],\n []\n];\nd3.behavior = {};\n// TODO Track touch points by identifier.\n\nd3.behavior.drag = function() {\n var event = d3_eventDispatch(drag, \"drag\", \"dragstart\", \"dragend\"),\n origin = null;\n\n function drag() {\n this.on(\"mousedown.drag\", mousedown)\n .on(\"touchstart.drag\", mousedown);\n }\n\n function mousedown() {\n var target = this,\n event_ = event.of(target, arguments),\n eventTarget = d3.event.target,\n offset,\n origin_ = point(),\n moved = 0;\n\n var w = d3.select(window)\n .on(\"mousemove.drag\", dragmove)\n .on(\"touchmove.drag\", dragmove)\n .on(\"mouseup.drag\", dragend, true)\n .on(\"touchend.drag\", dragend, true);\n\n if (origin) {\n offset = origin.apply(target, arguments);\n offset = [offset.x - origin_[0], offset.y - origin_[1]];\n } else {\n offset = [0, 0];\n }\n\n event_({type: \"dragstart\"});\n\n function point() {\n var p = target.parentNode,\n t = d3.event.changedTouches;\n return t ? d3.touches(p, t)[0] : d3.mouse(p);\n }\n\n function dragmove() {\n if (!target.parentNode) return dragend(); // target removed from DOM\n\n var p = point(),\n dx = p[0] - origin_[0],\n dy = p[1] - origin_[1];\n\n moved |= dx | dy;\n origin_ = p;\n d3_eventCancel();\n\n event_({type: \"drag\", x: p[0] + offset[0], y: p[1] + offset[1], dx: dx, dy: dy});\n }\n\n function dragend() {\n event_({type: \"dragend\"});\n\n // if moved, prevent the mouseup (and possibly click) from propagating\n if (moved) {\n d3_eventCancel();\n if (d3.event.target === eventTarget) w.on(\"click.drag\", click, true);\n }\n\n w .on(\"mousemove.drag\", null)\n .on(\"touchmove.drag\", null)\n .on(\"mouseup.drag\", null)\n .on(\"touchend.drag\", null);\n }\n\n // prevent the subsequent click from propagating (e.g., for anchors)\n function click() {\n d3_eventCancel();\n w.on(\"click.drag\", null);\n }\n }\n\n drag.origin = function(x) {\n if (!arguments.length) return origin;\n origin = x;\n return drag;\n };\n\n return d3.rebind(drag, event, \"on\");\n};\nd3.behavior.zoom = function() {\n var translate = [0, 0],\n translate0, // translate when we started zooming (to avoid drift)\n scale = 1,\n scale0, // scale when we started touching\n scaleExtent = d3_behavior_zoomInfinity,\n event = d3_eventDispatch(zoom, \"zoom\"),\n x0,\n x1,\n y0,\n y1,\n touchtime; // time of last touchstart (to detect double-tap)\n\n function zoom() {\n this\n .on(\"mousedown.zoom\", mousedown)\n .on(\"mousewheel.zoom\", mousewheel)\n .on(\"mousemove.zoom\", mousemove)\n .on(\"DOMMouseScroll.zoom\", mousewheel)\n .on(\"dblclick.zoom\", dblclick)\n .on(\"touchstart.zoom\", touchstart)\n .on(\"touchmove.zoom\", touchmove)\n .on(\"touchend.zoom\", touchstart);\n }\n\n zoom.translate = function(x) {\n if (!arguments.length) return translate;\n translate = x.map(Number);\n return zoom;\n };\n\n zoom.scale = function(x) {\n if (!arguments.length) return scale;\n scale = +x;\n return zoom;\n };\n\n zoom.scaleExtent = function(x) {\n if (!arguments.length) return scaleExtent;\n scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number);\n return zoom;\n };\n\n zoom.x = function(z) {\n if (!arguments.length) return x1;\n x1 = z;\n x0 = z.copy();\n return zoom;\n };\n\n zoom.y = function(z) {\n if (!arguments.length) return y1;\n y1 = z;\n y0 = z.copy();\n return zoom;\n };\n\n function location(p) {\n return [(p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale];\n }\n\n function point(l) {\n return [l[0] * scale + translate[0], l[1] * scale + translate[1]];\n }\n\n function scaleTo(s) {\n scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));\n }\n\n function translateTo(p, l) {\n l = point(l);\n translate[0] += p[0] - l[0];\n translate[1] += p[1] - l[1];\n }\n\n function dispatch(event) {\n if (x1) x1.domain(x0.range().map(function(x) { return (x - translate[0]) / scale; }).map(x0.invert));\n if (y1) y1.domain(y0.range().map(function(y) { return (y - translate[1]) / scale; }).map(y0.invert));\n d3.event.preventDefault();\n event({type: \"zoom\", scale: scale, translate: translate});\n }\n\n function mousedown() {\n var target = this,\n event_ = event.of(target, arguments),\n eventTarget = d3.event.target,\n moved = 0,\n w = d3.select(window).on(\"mousemove.zoom\", mousemove).on(\"mouseup.zoom\", mouseup),\n l = location(d3.mouse(target));\n\n window.focus();\n d3_eventCancel();\n\n function mousemove() {\n moved = 1;\n translateTo(d3.mouse(target), l);\n dispatch(event_);\n }\n\n function mouseup() {\n if (moved) d3_eventCancel();\n w.on(\"mousemove.zoom\", null).on(\"mouseup.zoom\", null);\n if (moved && d3.event.target === eventTarget) w.on(\"click.zoom\", click);\n }\n\n function click() {\n d3_eventCancel();\n w.on(\"click.zoom\", null);\n }\n }\n\n function mousewheel() {\n if (!translate0) translate0 = location(d3.mouse(this));\n scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale);\n translateTo(d3.mouse(this), translate0);\n dispatch(event.of(this, arguments));\n }\n\n function mousemove() {\n translate0 = null;\n }\n\n function dblclick() {\n var p = d3.mouse(this), l = location(p);\n scaleTo(d3.event.shiftKey ? scale / 2 : scale * 2);\n translateTo(p, l);\n dispatch(event.of(this, arguments));\n }\n\n function touchstart() {\n var touches = d3.touches(this),\n now = Date.now();\n\n scale0 = scale;\n translate0 = {};\n touches.forEach(function(t) { translate0[t.identifier] = location(t); });\n d3_eventCancel();\n\n if ((touches.length === 1) && (now - touchtime < 500)) { // dbltap\n var p = touches[0], l = location(touches[0]);\n scaleTo(scale * 2);\n translateTo(p, l);\n dispatch(event.of(this, arguments));\n }\n touchtime = now;\n }\n\n function touchmove() {\n var touches = d3.touches(this),\n p0 = touches[0],\n l0 = translate0[p0.identifier];\n if (p1 = touches[1]) {\n var p1, l1 = translate0[p1.identifier];\n p0 = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l0 = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n scaleTo(d3.event.scale * scale0);\n }\n translateTo(p0, l0);\n dispatch(event.of(this, arguments));\n }\n\n return d3.rebind(zoom, event, \"on\");\n};\n\nvar d3_behavior_zoomDiv, // for interpreting mousewheel events\n d3_behavior_zoomInfinity = [0, Infinity]; // default scale extent\n\nfunction d3_behavior_zoomDelta() {\n\n // mousewheel events are totally broken!\n // https://bugs.webkit.org/show_bug.cgi?id=40441\n // not only that, but Chrome and Safari differ in re. to acceleration!\n if (!d3_behavior_zoomDiv) {\n d3_behavior_zoomDiv = d3.select(\"body\").append(\"div\")\n .style(\"visibility\", \"hidden\")\n .style(\"top\", 0)\n .style(\"height\", 0)\n .style(\"width\", 0)\n .style(\"overflow-y\", \"scroll\")\n .append(\"div\")\n .style(\"height\", \"2000px\")\n .node().parentNode;\n }\n\n var e = d3.event, delta;\n try {\n d3_behavior_zoomDiv.scrollTop = 1000;\n d3_behavior_zoomDiv.dispatchEvent(e);\n delta = 1000 - d3_behavior_zoomDiv.scrollTop;\n } catch (error) {\n delta = e.wheelDelta || (-e.detail * 5);\n }\n\n return delta;\n}\nd3.layout = {};\n// Implements hierarchical edge bundling using Holten's algorithm. For each\n// input link, a path is computed that travels through the tree, up the parent\n// hierarchy to the least common ancestor, and then back down to the destination\n// node. Each path is simply an array of nodes.\nd3.layout.bundle = function() {\n return function(links) {\n var paths = [],\n i = -1,\n n = links.length;\n while (++i < n) paths.push(d3_layout_bundlePath(links[i]));\n return paths;\n };\n};\n\nfunction d3_layout_bundlePath(link) {\n var start = link.source,\n end = link.target,\n lca = d3_layout_bundleLeastCommonAncestor(start, end),\n points = [start];\n while (start !== lca) {\n start = start.parent;\n points.push(start);\n }\n var k = points.length;\n while (end !== lca) {\n points.splice(k, 0, end);\n end = end.parent;\n }\n return points;\n}\n\nfunction d3_layout_bundleAncestors(node) {\n var ancestors = [],\n parent = node.parent;\n while (parent != null) {\n ancestors.push(node);\n node = parent;\n parent = parent.parent;\n }\n ancestors.push(node);\n return ancestors;\n}\n\nfunction d3_layout_bundleLeastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = d3_layout_bundleAncestors(a),\n bNodes = d3_layout_bundleAncestors(b),\n aNode = aNodes.pop(),\n bNode = bNodes.pop(),\n sharedNode = null;\n while (aNode === bNode) {\n sharedNode = aNode;\n aNode = aNodes.pop();\n bNode = bNodes.pop();\n }\n return sharedNode;\n}\nd3.layout.chord = function() {\n var chord = {},\n chords,\n groups,\n matrix,\n n,\n padding = 0,\n sortGroups,\n sortSubgroups,\n sortChords;\n\n function relayout() {\n var subgroups = {},\n groupSums = [],\n groupIndex = d3.range(n),\n subgroupIndex = [],\n k,\n x,\n x0,\n i,\n j;\n\n chords = [];\n groups = [];\n\n // Compute the sum.\n k = 0, i = -1; while (++i < n) {\n x = 0, j = -1; while (++j < n) {\n x += matrix[i][j];\n }\n groupSums.push(x);\n subgroupIndex.push(d3.range(n));\n k += x;\n }\n\n // Sort groups\u2026\n if (sortGroups) {\n groupIndex.sort(function(a, b) {\n return sortGroups(groupSums[a], groupSums[b]);\n });\n }\n\n // Sort subgroups\u2026\n if (sortSubgroups) {\n subgroupIndex.forEach(function(d, i) {\n d.sort(function(a, b) {\n return sortSubgroups(matrix[i][a], matrix[i][b]);\n });\n });\n }\n\n // Convert the sum to scaling factor for [0, 2pi].\n // TODO Allow start and end angle to be specified.\n // TODO Allow padding to be specified as percentage?\n k = (2 * Math.PI - padding * n) / k;\n\n // Compute the start and end angle for each group and subgroup.\n // Note: Opera has a bug reordering object literal properties!\n x = 0, i = -1; while (++i < n) {\n x0 = x, j = -1; while (++j < n) {\n var di = groupIndex[i],\n dj = subgroupIndex[di][j],\n v = matrix[di][dj],\n a0 = x,\n a1 = x += v * k;\n subgroups[di + \"-\" + dj] = {\n index: di,\n subindex: dj,\n startAngle: a0,\n endAngle: a1,\n value: v\n };\n }\n groups.push({\n index: di,\n startAngle: x0,\n endAngle: x,\n value: (x - x0) / k\n });\n x += padding;\n }\n\n // Generate chords for each (non-empty) subgroup-subgroup link.\n i = -1; while (++i < n) {\n j = i - 1; while (++j < n) {\n var source = subgroups[i + \"-\" + j],\n target = subgroups[j + \"-\" + i];\n if (source.value || target.value) {\n chords.push(source.value < target.value\n ? {source: target, target: source}\n : {source: source, target: target});\n }\n }\n }\n\n if (sortChords) resort();\n }\n\n function resort() {\n chords.sort(function(a, b) {\n return sortChords(\n (a.source.value + a.target.value) / 2,\n (b.source.value + b.target.value) / 2);\n });\n }\n\n chord.matrix = function(x) {\n if (!arguments.length) return matrix;\n n = (matrix = x) && matrix.length;\n chords = groups = null;\n return chord;\n };\n\n chord.padding = function(x) {\n if (!arguments.length) return padding;\n padding = x;\n chords = groups = null;\n return chord;\n };\n\n chord.sortGroups = function(x) {\n if (!arguments.length) return sortGroups;\n sortGroups = x;\n chords = groups = null;\n return chord;\n };\n\n chord.sortSubgroups = function(x) {\n if (!arguments.length) return sortSubgroups;\n sortSubgroups = x;\n chords = null;\n return chord;\n };\n\n chord.sortChords = function(x) {\n if (!arguments.length) return sortChords;\n sortChords = x;\n if (chords) resort();\n return chord;\n };\n\n chord.chords = function() {\n if (!chords) relayout();\n return chords;\n };\n\n chord.groups = function() {\n if (!groups) relayout();\n return groups;\n };\n\n return chord;\n};\n// A rudimentary force layout using Gauss-Seidel.\nd3.layout.force = function() {\n var force = {},\n event = d3.dispatch(\"start\", \"tick\", \"end\"),\n size = [1, 1],\n drag,\n alpha,\n friction = .9,\n linkDistance = d3_layout_forceLinkDistance,\n linkStrength = d3_layout_forceLinkStrength,\n charge = -30,\n gravity = .1,\n theta = .8,\n interval,\n nodes = [],\n links = [],\n distances,\n strengths,\n charges;\n\n function repulse(node) {\n return function(quad, x1, y1, x2, y2) {\n if (quad.point !== node) {\n var dx = quad.cx - node.x,\n dy = quad.cy - node.y,\n dn = 1 / Math.sqrt(dx * dx + dy * dy);\n\n /* Barnes-Hut criterion. */\n if ((x2 - x1) * dn < theta) {\n var k = quad.charge * dn * dn;\n node.px -= dx * k;\n node.py -= dy * k;\n return true;\n }\n\n if (quad.point && isFinite(dn)) {\n var k = quad.pointCharge * dn * dn;\n node.px -= dx * k;\n node.py -= dy * k;\n }\n }\n return !quad.charge;\n };\n }\n\n force.tick = function() {\n // simulated annealing, basically\n if ((alpha *= .99) < .005) {\n event.end({type: \"end\", alpha: alpha = 0});\n return true;\n }\n\n var n = nodes.length,\n m = links.length,\n q,\n i, // current index\n o, // current object\n s, // current source\n t, // current target\n l, // current distance\n k, // current force\n x, // x-distance\n y; // y-distance\n\n // gauss-seidel relaxation for links\n for (i = 0; i < m; ++i) {\n o = links[i];\n s = o.source;\n t = o.target;\n x = t.x - s.x;\n y = t.y - s.y;\n if (l = (x * x + y * y)) {\n l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;\n x *= l;\n y *= l;\n t.x -= x * (k = s.weight / (t.weight + s.weight));\n t.y -= y * k;\n s.x += x * (k = 1 - k);\n s.y += y * k;\n }\n }\n\n // apply gravity forces\n if (k = alpha * gravity) {\n x = size[0] / 2;\n y = size[1] / 2;\n i = -1; if (k) while (++i < n) {\n o = nodes[i];\n o.x += (x - o.x) * k;\n o.y += (y - o.y) * k;\n }\n }\n\n // compute quadtree center of mass and apply charge forces\n if (charge) {\n d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);\n i = -1; while (++i < n) {\n if (!(o = nodes[i]).fixed) {\n q.visit(repulse(o));\n }\n }\n }\n\n // position verlet integration\n i = -1; while (++i < n) {\n o = nodes[i];\n if (o.fixed) {\n o.x = o.px;\n o.y = o.py;\n } else {\n o.x -= (o.px - (o.px = o.x)) * friction;\n o.y -= (o.py - (o.py = o.y)) * friction;\n }\n }\n\n event.tick({type: \"tick\", alpha: alpha});\n };\n\n force.nodes = function(x) {\n if (!arguments.length) return nodes;\n nodes = x;\n return force;\n };\n\n force.links = function(x) {\n if (!arguments.length) return links;\n links = x;\n return force;\n };\n\n force.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return force;\n };\n\n force.linkDistance = function(x) {\n if (!arguments.length) return linkDistance;\n linkDistance = d3.functor(x);\n return force;\n };\n\n // For backwards-compatibility.\n force.distance = force.linkDistance;\n\n force.linkStrength = function(x) {\n if (!arguments.length) return linkStrength;\n linkStrength = d3.functor(x);\n return force;\n };\n\n force.friction = function(x) {\n if (!arguments.length) return friction;\n friction = x;\n return force;\n };\n\n force.charge = function(x) {\n if (!arguments.length) return charge;\n charge = typeof x === \"function\" ? x : +x;\n return force;\n };\n\n force.gravity = function(x) {\n if (!arguments.length) return gravity;\n gravity = x;\n return force;\n };\n\n force.theta = function(x) {\n if (!arguments.length) return theta;\n theta = x;\n return force;\n };\n\n force.alpha = function(x) {\n if (!arguments.length) return alpha;\n\n if (alpha) { // if we're already running\n if (x > 0) alpha = x; // we might keep it hot\n else alpha = 0; // or, next tick will dispatch \"end\"\n } else if (x > 0) { // otherwise, fire it up!\n event.start({type: \"start\", alpha: alpha = x});\n d3.timer(force.tick);\n }\n\n return force;\n };\n\n force.start = function() {\n var i,\n j,\n n = nodes.length,\n m = links.length,\n w = size[0],\n h = size[1],\n neighbors,\n o;\n\n for (i = 0; i < n; ++i) {\n (o = nodes[i]).index = i;\n o.weight = 0;\n }\n\n distances = [];\n strengths = [];\n for (i = 0; i < m; ++i) {\n o = links[i];\n if (typeof o.source == \"number\") o.source = nodes[o.source];\n if (typeof o.target == \"number\") o.target = nodes[o.target];\n distances[i] = linkDistance.call(this, o, i);\n strengths[i] = linkStrength.call(this, o, i);\n ++o.source.weight;\n ++o.target.weight;\n }\n\n for (i = 0; i < n; ++i) {\n o = nodes[i];\n if (isNaN(o.x)) o.x = position(\"x\", w);\n if (isNaN(o.y)) o.y = position(\"y\", h);\n if (isNaN(o.px)) o.px = o.x;\n if (isNaN(o.py)) o.py = o.y;\n }\n\n charges = [];\n if (typeof charge === \"function\") {\n for (i = 0; i < n; ++i) {\n charges[i] = +charge.call(this, nodes[i], i);\n }\n } else {\n for (i = 0; i < n; ++i) {\n charges[i] = charge;\n }\n }\n\n // initialize node position based on first neighbor\n function position(dimension, size) {\n var neighbors = neighbor(i),\n j = -1,\n m = neighbors.length,\n x;\n while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;\n return Math.random() * size;\n }\n\n // initialize neighbors lazily\n function neighbor() {\n if (!neighbors) {\n neighbors = [];\n for (j = 0; j < n; ++j) {\n neighbors[j] = [];\n }\n for (j = 0; j < m; ++j) {\n var o = links[j];\n neighbors[o.source.index].push(o.target);\n neighbors[o.target.index].push(o.source);\n }\n }\n return neighbors[i];\n }\n\n return force.resume();\n };\n\n force.resume = function() {\n return force.alpha(.1);\n };\n\n force.stop = function() {\n return force.alpha(0);\n };\n\n // use `node.call(force.drag)` to make nodes draggable\n force.drag = function() {\n if (!drag) drag = d3.behavior.drag()\n .origin(Object)\n .on(\"dragstart\", dragstart)\n .on(\"drag\", d3_layout_forceDrag)\n .on(\"dragend\", d3_layout_forceDragEnd);\n\n this.on(\"mouseover.force\", d3_layout_forceDragOver)\n .on(\"mouseout.force\", d3_layout_forceDragOut)\n .call(drag);\n };\n\n function dragstart(d) {\n d3_layout_forceDragOver(d3_layout_forceDragNode = d);\n d3_layout_forceDragForce = force;\n }\n\n return d3.rebind(force, event, \"on\");\n};\n\nvar d3_layout_forceDragForce,\n d3_layout_forceDragNode;\n\nfunction d3_layout_forceDragOver(d) {\n d.fixed |= 2;\n}\n\nfunction d3_layout_forceDragOut(d) {\n if (d !== d3_layout_forceDragNode) d.fixed &= 1;\n}\n\nfunction d3_layout_forceDragEnd() {\n d3_layout_forceDragNode.fixed &= 1;\n d3_layout_forceDragForce = d3_layout_forceDragNode = null;\n}\n\nfunction d3_layout_forceDrag() {\n d3_layout_forceDragNode.px = d3.event.x;\n d3_layout_forceDragNode.py = d3.event.y;\n d3_layout_forceDragForce.resume(); // restart annealing\n}\n\nfunction d3_layout_forceAccumulate(quad, alpha, charges) {\n var cx = 0,\n cy = 0;\n quad.charge = 0;\n if (!quad.leaf) {\n var nodes = quad.nodes,\n n = nodes.length,\n i = -1,\n c;\n while (++i < n) {\n c = nodes[i];\n if (c == null) continue;\n d3_layout_forceAccumulate(c, alpha, charges);\n quad.charge += c.charge;\n cx += c.charge * c.cx;\n cy += c.charge * c.cy;\n }\n }\n if (quad.point) {\n // jitter internal nodes that are coincident\n if (!quad.leaf) {\n quad.point.x += Math.random() - .5;\n quad.point.y += Math.random() - .5;\n }\n var k = alpha * charges[quad.point.index];\n quad.charge += quad.pointCharge = k;\n cx += k * quad.point.x;\n cy += k * quad.point.y;\n }\n quad.cx = cx / quad.charge;\n quad.cy = cy / quad.charge;\n}\n\nfunction d3_layout_forceLinkDistance(link) {\n return 20;\n}\n\nfunction d3_layout_forceLinkStrength(link) {\n return 1;\n}\nd3.layout.partition = function() {\n var hierarchy = d3.layout.hierarchy(),\n size = [1, 1]; // width, height\n\n function position(node, x, dx, dy) {\n var children = node.children;\n node.x = x;\n node.y = node.depth * dy;\n node.dx = dx;\n node.dy = dy;\n if (children && (n = children.length)) {\n var i = -1,\n n,\n c,\n d;\n dx = node.value ? dx / node.value : 0;\n while (++i < n) {\n position(c = children[i], x, d = c.value * dx, dy);\n x += d;\n }\n }\n }\n\n function depth(node) {\n var children = node.children,\n d = 0;\n if (children && (n = children.length)) {\n var i = -1,\n n;\n while (++i < n) d = Math.max(d, depth(children[i]));\n }\n return 1 + d;\n }\n\n function partition(d, i) {\n var nodes = hierarchy.call(this, d, i);\n position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));\n return nodes;\n }\n\n partition.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return partition;\n };\n\n return d3_layout_hierarchyRebind(partition, hierarchy);\n};\nd3.layout.pie = function() {\n var value = Number,\n sort = d3_layout_pieSortByValue,\n startAngle = 0,\n endAngle = 2 * Math.PI;\n\n function pie(data, i) {\n\n // Compute the numeric values for each data element.\n var values = data.map(function(d, i) { return +value.call(pie, d, i); });\n\n // Compute the start angle.\n var a = +(typeof startAngle === \"function\"\n ? startAngle.apply(this, arguments)\n : startAngle);\n\n // Compute the angular scale factor: from value to radians.\n var k = ((typeof endAngle === \"function\"\n ? endAngle.apply(this, arguments)\n : endAngle) - startAngle)\n / d3.sum(values);\n\n // Optionally sort the data.\n var index = d3.range(data.length);\n if (sort != null) index.sort(sort === d3_layout_pieSortByValue\n ? function(i, j) { return values[j] - values[i]; }\n : function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs!\n // They are stored in the original data's order.\n var arcs = [];\n index.forEach(function(i) {\n arcs[i] = {\n data: data[i],\n value: d = values[i],\n startAngle: a,\n endAngle: a += d * k\n };\n });\n return arcs;\n }\n\n /**\n * Specifies the value function *x*, which returns a nonnegative numeric value\n * for each datum. The default value function is `Number`. The value function\n * is passed two arguments: the current datum and the current index.\n */\n pie.value = function(x) {\n if (!arguments.length) return value;\n value = x;\n return pie;\n };\n\n /**\n * Specifies a sort comparison operator *x*. The comparator is passed two data\n * elements from the data array, a and b; it returns a negative value if a is\n * less than b, a positive value if a is greater than b, and zero if a equals\n * b.\n */\n pie.sort = function(x) {\n if (!arguments.length) return sort;\n sort = x;\n return pie;\n };\n\n /**\n * Specifies the overall start angle of the pie chart. Defaults to 0. The\n * start angle can be specified either as a constant or as a function; in the\n * case of a function, it is evaluated once per array (as opposed to per\n * element).\n */\n pie.startAngle = function(x) {\n if (!arguments.length) return startAngle;\n startAngle = x;\n return pie;\n };\n\n /**\n * Specifies the overall end angle of the pie chart. Defaults to 2\u03c0. The\n * end angle can be specified either as a constant or as a function; in the\n * case of a function, it is evaluated once per array (as opposed to per\n * element).\n */\n pie.endAngle = function(x) {\n if (!arguments.length) return endAngle;\n endAngle = x;\n return pie;\n };\n\n return pie;\n};\n\nvar d3_layout_pieSortByValue = {};\n// data is two-dimensional array of x,y; we populate y0\nd3.layout.stack = function() {\n var values = Object,\n order = d3_layout_stackOrderDefault,\n offset = d3_layout_stackOffsetZero,\n out = d3_layout_stackOut,\n x = d3_layout_stackX,\n y = d3_layout_stackY;\n\n function stack(data, index) {\n\n // Convert series to canonical two-dimensional representation.\n var series = data.map(function(d, i) {\n return values.call(stack, d, i);\n });\n\n // Convert each series to canonical [[x,y]] representation.\n var points = series.map(function(d, i) {\n return d.map(function(v, i) {\n return [x.call(stack, v, i), y.call(stack, v, i)];\n });\n });\n\n // Compute the order of series, and permute them.\n var orders = order.call(stack, points, index);\n series = d3.permute(series, orders);\n points = d3.permute(points, orders);\n\n // Compute the baseline\u2026\n var offsets = offset.call(stack, points, index);\n\n // And propagate it to other series.\n var n = series.length,\n m = series[0].length,\n i,\n j,\n o;\n for (j = 0; j < m; ++j) {\n out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);\n for (i = 1; i < n; ++i) {\n out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);\n }\n }\n\n return data;\n }\n\n stack.values = function(x) {\n if (!arguments.length) return values;\n values = x;\n return stack;\n };\n\n stack.order = function(x) {\n if (!arguments.length) return order;\n order = typeof x === \"function\" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;\n return stack;\n };\n\n stack.offset = function(x) {\n if (!arguments.length) return offset;\n offset = typeof x === \"function\" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;\n return stack;\n };\n\n stack.x = function(z) {\n if (!arguments.length) return x;\n x = z;\n return stack;\n };\n\n stack.y = function(z) {\n if (!arguments.length) return y;\n y = z;\n return stack;\n };\n\n stack.out = function(z) {\n if (!arguments.length) return out;\n out = z;\n return stack;\n };\n\n return stack;\n}\n\nfunction d3_layout_stackX(d) {\n return d.x;\n}\n\nfunction d3_layout_stackY(d) {\n return d.y;\n}\n\nfunction d3_layout_stackOut(d, y0, y) {\n d.y0 = y0;\n d.y = y;\n}\n\nvar d3_layout_stackOrders = d3.map({\n\n \"inside-out\": function(data) {\n var n = data.length,\n i,\n j,\n max = data.map(d3_layout_stackMaxIndex),\n sums = data.map(d3_layout_stackReduceSum),\n index = d3.range(n).sort(function(a, b) { return max[a] - max[b]; }),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n for (i = 0; i < n; ++i) {\n j = index[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n return bottoms.reverse().concat(tops);\n },\n\n \"reverse\": function(data) {\n return d3.range(data.length).reverse();\n },\n\n \"default\": d3_layout_stackOrderDefault\n\n});\n\nvar d3_layout_stackOffsets = d3.map({\n\n \"silhouette\": function(data) {\n var n = data.length,\n m = data[0].length,\n sums = [],\n max = 0,\n i,\n j,\n o,\n y0 = [];\n for (j = 0; j < m; ++j) {\n for (i = 0, o = 0; i < n; i++) o += data[i][j][1];\n if (o > max) max = o;\n sums.push(o);\n }\n for (j = 0; j < m; ++j) {\n y0[j] = (max - sums[j]) / 2;\n }\n return y0;\n },\n\n \"wiggle\": function(data) {\n var n = data.length,\n x = data[0],\n m = x.length,\n max = 0,\n i,\n j,\n k,\n s1,\n s2,\n s3,\n dx,\n o,\n o0,\n y0 = [];\n y0[0] = o = o0 = 0;\n for (j = 1; j < m; ++j) {\n for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];\n for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {\n for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {\n s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;\n }\n s2 += s3 * data[i][j][1];\n }\n y0[j] = o -= s1 ? s2 / s1 * dx : 0;\n if (o < o0) o0 = o;\n }\n for (j = 0; j < m; ++j) y0[j] -= o0;\n return y0;\n },\n\n \"expand\": function(data) {\n var n = data.length,\n m = data[0].length,\n k = 1 / n,\n i,\n j,\n o,\n y0 = [];\n for (j = 0; j < m; ++j) {\n for (i = 0, o = 0; i < n; i++) o += data[i][j][1];\n if (o) for (i = 0; i < n; i++) data[i][j][1] /= o;\n else for (i = 0; i < n; i++) data[i][j][1] = k;\n }\n for (j = 0; j < m; ++j) y0[j] = 0;\n return y0;\n },\n\n \"zero\": d3_layout_stackOffsetZero\n\n});\n\nfunction d3_layout_stackOrderDefault(data) {\n return d3.range(data.length);\n}\n\nfunction d3_layout_stackOffsetZero(data) {\n var j = -1,\n m = data[0].length,\n y0 = [];\n while (++j < m) y0[j] = 0;\n return y0;\n}\n\nfunction d3_layout_stackMaxIndex(array) {\n var i = 1,\n j = 0,\n v = array[0][1],\n k,\n n = array.length;\n for (; i < n; ++i) {\n if ((k = array[i][1]) > v) {\n j = i;\n v = k;\n }\n }\n return j;\n}\n\nfunction d3_layout_stackReduceSum(d) {\n return d.reduce(d3_layout_stackSum, 0);\n}\n\nfunction d3_layout_stackSum(p, d) {\n return p + d[1];\n}\nd3.layout.histogram = function() {\n var frequency = true,\n valuer = Number,\n ranger = d3_layout_histogramRange,\n binner = d3_layout_histogramBinSturges;\n\n function histogram(data, i) {\n var bins = [],\n values = data.map(valuer, this),\n range = ranger.call(this, values, i),\n thresholds = binner.call(this, range, values, i),\n bin,\n i = -1,\n n = values.length,\n m = thresholds.length - 1,\n k = frequency ? 1 : 1 / n,\n x;\n\n // Initialize the bins.\n while (++i < m) {\n bin = bins[i] = [];\n bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);\n bin.y = 0;\n }\n\n // Fill the bins, ignoring values outside the range.\n i = -1; while(++i < n) {\n x = values[i];\n if ((x >= range[0]) && (x <= range[1])) {\n bin = bins[d3.bisect(thresholds, x, 1, m) - 1];\n bin.y += k;\n bin.push(data[i]);\n }\n }\n\n return bins;\n }\n\n // Specifies how to extract a value from the associated data. The default\n // value function is `Number`, which is equivalent to the identity function.\n histogram.value = function(x) {\n if (!arguments.length) return valuer;\n valuer = x;\n return histogram;\n };\n\n // Specifies the range of the histogram. Values outside the specified range\n // will be ignored. The argument `x` may be specified either as a two-element\n // array representing the minimum and maximum value of the range, or as a\n // function that returns the range given the array of values and the current\n // index `i`. The default range is the extent (minimum and maximum) of the\n // values.\n histogram.range = function(x) {\n if (!arguments.length) return ranger;\n ranger = d3.functor(x);\n return histogram;\n };\n\n // Specifies how to bin values in the histogram. The argument `x` may be\n // specified as a number, in which case the range of values will be split\n // uniformly into the given number of bins. Or, `x` may be an array of\n // threshold values, defining the bins; the specified array must contain the\n // rightmost (upper) value, thus specifying n + 1 values for n bins. Or, `x`\n // may be a function which is evaluated, being passed the range, the array of\n // values, and the current index `i`, returning an array of thresholds. The\n // default bin function will divide the values into uniform bins using\n // Sturges' formula.\n histogram.bins = function(x) {\n if (!arguments.length) return binner;\n binner = typeof x === \"number\"\n ? function(range) { return d3_layout_histogramBinFixed(range, x); }\n : d3.functor(x);\n return histogram;\n };\n\n // Specifies whether the histogram's `y` value is a count (frequency) or a\n // probability (density). The default value is true.\n histogram.frequency = function(x) {\n if (!arguments.length) return frequency;\n frequency = !!x;\n return histogram;\n };\n\n return histogram;\n};\n\nfunction d3_layout_histogramBinSturges(range, values) {\n return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));\n}\n\nfunction d3_layout_histogramBinFixed(range, n) {\n var x = -1,\n b = +range[0],\n m = (range[1] - b) / n,\n f = [];\n while (++x <= n) f[x] = m * x + b;\n return f;\n}\n\nfunction d3_layout_histogramRange(values) {\n return [d3.min(values), d3.max(values)];\n}\nd3.layout.hierarchy = function() {\n var sort = d3_layout_hierarchySort,\n children = d3_layout_hierarchyChildren,\n value = d3_layout_hierarchyValue;\n\n // Recursively compute the node depth and value.\n // Also converts the data representation into a standard hierarchy structure.\n function recurse(data, depth, nodes) {\n var childs = children.call(hierarchy, data, depth),\n node = d3_layout_hierarchyInline ? data : {data: data};\n node.depth = depth;\n nodes.push(node);\n if (childs && (n = childs.length)) {\n var i = -1,\n n,\n c = node.children = [],\n v = 0,\n j = depth + 1;\n while (++i < n) {\n d = recurse(childs[i], j, nodes);\n d.parent = node;\n c.push(d);\n v += d.value;\n }\n if (sort) c.sort(sort);\n if (value) node.value = v;\n } else if (value) {\n node.value = +value.call(hierarchy, data, depth) || 0;\n }\n return node;\n }\n\n // Recursively re-evaluates the node value.\n function revalue(node, depth) {\n var children = node.children,\n v = 0;\n if (children && (n = children.length)) {\n var i = -1,\n n,\n j = depth + 1;\n while (++i < n) v += revalue(children[i], j);\n } else if (value) {\n v = +value.call(hierarchy, d3_layout_hierarchyInline ? node : node.data, depth) || 0;\n }\n if (value) node.value = v;\n return v;\n }\n\n function hierarchy(d) {\n var nodes = [];\n recurse(d, 0, nodes);\n return nodes;\n }\n\n hierarchy.sort = function(x) {\n if (!arguments.length) return sort;\n sort = x;\n return hierarchy;\n };\n\n hierarchy.children = function(x) {\n if (!arguments.length) return children;\n children = x;\n return hierarchy;\n };\n\n hierarchy.value = function(x) {\n if (!arguments.length) return value;\n value = x;\n return hierarchy;\n };\n\n // Re-evaluates the `value` property for the specified hierarchy.\n hierarchy.revalue = function(root) {\n revalue(root, 0);\n return root;\n };\n\n return hierarchy;\n};\n\n// A method assignment helper for hierarchy subclasses.\nfunction d3_layout_hierarchyRebind(object, hierarchy) {\n d3.rebind(object, hierarchy, \"sort\", \"children\", \"value\");\n\n // Add an alias for links, for convenience.\n object.links = d3_layout_hierarchyLinks;\n\n // If the new API is used, enabling inlining.\n object.nodes = function(d) {\n d3_layout_hierarchyInline = true;\n return (object.nodes = object)(d);\n };\n\n return object;\n}\n\nfunction d3_layout_hierarchyChildren(d) {\n return d.children;\n}\n\nfunction d3_layout_hierarchyValue(d) {\n return d.value;\n}\n\nfunction d3_layout_hierarchySort(a, b) {\n return b.value - a.value;\n}\n\n// Returns an array source+target objects for the specified nodes.\nfunction d3_layout_hierarchyLinks(nodes) {\n return d3.merge(nodes.map(function(parent) {\n return (parent.children || []).map(function(child) {\n return {source: parent, target: child};\n });\n }));\n}\n\n// For backwards-compatibility, don't enable inlining by default.\nvar d3_layout_hierarchyInline = false;\nd3.layout.pack = function() {\n var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort),\n size = [1, 1];\n\n function pack(d, i) {\n var nodes = hierarchy.call(this, d, i),\n root = nodes[0];\n\n // Recursively compute the layout.\n root.x = 0;\n root.y = 0;\n d3_layout_packTree(root);\n\n // Scale the layout to fit the requested size.\n var w = size[0],\n h = size[1],\n k = 1 / Math.max(2 * root.r / w, 2 * root.r / h);\n d3_layout_packTransform(root, w / 2, h / 2, k);\n\n return nodes;\n }\n\n pack.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return pack;\n };\n\n return d3_layout_hierarchyRebind(pack, hierarchy);\n};\n\nfunction d3_layout_packSort(a, b) {\n return a.value - b.value;\n}\n\nfunction d3_layout_packInsert(a, b) {\n var c = a._pack_next;\n a._pack_next = b;\n b._pack_prev = a;\n b._pack_next = c;\n c._pack_prev = b;\n}\n\nfunction d3_layout_packSplice(a, b) {\n a._pack_next = b;\n b._pack_prev = a;\n}\n\nfunction d3_layout_packIntersects(a, b) {\n var dx = b.x - a.x,\n dy = b.y - a.y,\n dr = a.r + b.r;\n return dr * dr - dx * dx - dy * dy > .001; // within epsilon\n}\n\nfunction d3_layout_packCircle(nodes) {\n var xMin = Infinity,\n xMax = -Infinity,\n yMin = Infinity,\n yMax = -Infinity,\n n = nodes.length,\n a, b, c, j, k;\n\n function bound(node) {\n xMin = Math.min(node.x - node.r, xMin);\n xMax = Math.max(node.x + node.r, xMax);\n yMin = Math.min(node.y - node.r, yMin);\n yMax = Math.max(node.y + node.r, yMax);\n }\n\n // Create node links.\n nodes.forEach(d3_layout_packLink);\n\n // Create first node.\n a = nodes[0];\n a.x = -a.r;\n a.y = 0;\n bound(a);\n\n // Create second node.\n if (n > 1) {\n b = nodes[1];\n b.x = b.r;\n b.y = 0;\n bound(b);\n\n // Create third node and build chain.\n if (n > 2) {\n c = nodes[2];\n d3_layout_packPlace(a, b, c);\n bound(c);\n d3_layout_packInsert(a, c);\n a._pack_prev = c;\n d3_layout_packInsert(c, b);\n b = a._pack_next;\n\n // Now iterate through the rest.\n for (var i = 3; i < n; i++) {\n d3_layout_packPlace(a, b, c = nodes[i]);\n\n // Search for the closest intersection.\n var isect = 0, s1 = 1, s2 = 1;\n for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {\n if (d3_layout_packIntersects(j, c)) {\n isect = 1;\n break;\n }\n }\n if (isect == 1) {\n for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {\n if (d3_layout_packIntersects(k, c)) {\n break;\n }\n }\n }\n\n // Update node chain.\n if (isect) {\n if (s1 < s2 || (s1 == s2 && b.r < a.r)) d3_layout_packSplice(a, b = j);\n else d3_layout_packSplice(a = k, b);\n i--;\n } else {\n d3_layout_packInsert(a, c);\n b = c;\n bound(c);\n }\n }\n }\n }\n\n // Re-center the circles and return the encompassing radius.\n var cx = (xMin + xMax) / 2,\n cy = (yMin + yMax) / 2,\n cr = 0;\n for (var i = 0; i < n; i++) {\n var node = nodes[i];\n node.x -= cx;\n node.y -= cy;\n cr = Math.max(cr, node.r + Math.sqrt(node.x * node.x + node.y * node.y));\n }\n\n // Remove node links.\n nodes.forEach(d3_layout_packUnlink);\n\n return cr;\n}\n\nfunction d3_layout_packLink(node) {\n node._pack_next = node._pack_prev = node;\n}\n\nfunction d3_layout_packUnlink(node) {\n delete node._pack_next;\n delete node._pack_prev;\n}\n\nfunction d3_layout_packTree(node) {\n var children = node.children;\n if (children && children.length) {\n children.forEach(d3_layout_packTree);\n node.r = d3_layout_packCircle(children);\n } else {\n node.r = Math.sqrt(node.value);\n }\n}\n\nfunction d3_layout_packTransform(node, x, y, k) {\n var children = node.children;\n node.x = (x += k * node.x);\n node.y = (y += k * node.y);\n node.r *= k;\n if (children) {\n var i = -1, n = children.length;\n while (++i < n) d3_layout_packTransform(children[i], x, y, k);\n }\n}\n\nfunction d3_layout_packPlace(a, b, c) {\n var db = a.r + c.r,\n dx = b.x - a.x,\n dy = b.y - a.y;\n if (db && (dx || dy)) {\n var da = b.r + c.r,\n dc = Math.sqrt(dx * dx + dy * dy),\n cos = Math.max(-1, Math.min(1, (db * db + dc * dc - da * da) / (2 * db * dc))),\n theta = Math.acos(cos),\n x = cos * (db /= dc),\n y = Math.sin(theta) * db;\n c.x = a.x + x * dx + y * dy;\n c.y = a.y + x * dy - y * dx;\n } else {\n c.x = a.x + db;\n c.y = a.y;\n }\n}\n// Implements a hierarchical layout using the cluster (or dendrogram)\n// algorithm.\nd3.layout.cluster = function() {\n var hierarchy = d3.layout.hierarchy().sort(null).value(null),\n separation = d3_layout_treeSeparation,\n size = [1, 1]; // width, height\n\n function cluster(d, i) {\n var nodes = hierarchy.call(this, d, i),\n root = nodes[0],\n previousNode,\n x = 0,\n kx,\n ky;\n\n // First walk, computing the initial x & y values.\n d3_layout_treeVisitAfter(root, function(node) {\n var children = node.children;\n if (children && children.length) {\n node.x = d3_layout_clusterX(children);\n node.y = d3_layout_clusterY(children);\n } else {\n node.x = previousNode ? x += separation(node, previousNode) : 0;\n node.y = 0;\n previousNode = node;\n }\n });\n\n // Compute the left-most, right-most, and depth-most nodes for extents.\n var left = d3_layout_clusterLeft(root),\n right = d3_layout_clusterRight(root),\n x0 = left.x - separation(left, right) / 2,\n x1 = right.x + separation(right, left) / 2;\n\n // Second walk, normalizing x & y to the desired size.\n d3_layout_treeVisitAfter(root, function(node) {\n node.x = (node.x - x0) / (x1 - x0) * size[0];\n node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];\n });\n\n return nodes;\n }\n\n cluster.separation = function(x) {\n if (!arguments.length) return separation;\n separation = x;\n return cluster;\n };\n\n cluster.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return cluster;\n };\n\n return d3_layout_hierarchyRebind(cluster, hierarchy);\n};\n\nfunction d3_layout_clusterY(children) {\n return 1 + d3.max(children, function(child) {\n return child.y;\n });\n}\n\nfunction d3_layout_clusterX(children) {\n return children.reduce(function(x, child) {\n return x + child.x;\n }, 0) / children.length;\n}\n\nfunction d3_layout_clusterLeft(node) {\n var children = node.children;\n return children && children.length ? d3_layout_clusterLeft(children[0]) : node;\n}\n\nfunction d3_layout_clusterRight(node) {\n var children = node.children, n;\n return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;\n}\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nd3.layout.tree = function() {\n var hierarchy = d3.layout.hierarchy().sort(null).value(null),\n separation = d3_layout_treeSeparation,\n size = [1, 1]; // width, height\n\n function tree(d, i) {\n var nodes = hierarchy.call(this, d, i),\n root = nodes[0];\n\n function firstWalk(node, previousSibling) {\n var children = node.children,\n layout = node._tree;\n if (children && (n = children.length)) {\n var n,\n firstChild = children[0],\n previousChild,\n ancestor = firstChild,\n child,\n i = -1;\n while (++i < n) {\n child = children[i];\n firstWalk(child, previousChild);\n ancestor = apportion(child, previousChild, ancestor);\n previousChild = child;\n }\n d3_layout_treeShift(node);\n var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);\n if (previousSibling) {\n layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);\n layout.mod = layout.prelim - midpoint;\n } else {\n layout.prelim = midpoint;\n }\n } else {\n if (previousSibling) {\n layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);\n }\n }\n }\n\n function secondWalk(node, x) {\n node.x = node._tree.prelim + x;\n var children = node.children;\n if (children && (n = children.length)) {\n var i = -1,\n n;\n x += node._tree.mod;\n while (++i < n) {\n secondWalk(children[i], x);\n }\n }\n }\n\n function apportion(node, previousSibling, ancestor) {\n if (previousSibling) {\n var vip = node,\n vop = node,\n vim = previousSibling,\n vom = node.parent.children[0],\n sip = vip._tree.mod,\n sop = vop._tree.mod,\n sim = vim._tree.mod,\n som = vom._tree.mod,\n shift;\n while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {\n vom = d3_layout_treeLeft(vom);\n vop = d3_layout_treeRight(vop);\n vop._tree.ancestor = node;\n shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);\n if (shift > 0) {\n d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim._tree.mod;\n sip += vip._tree.mod;\n som += vom._tree.mod;\n sop += vop._tree.mod;\n }\n if (vim && !d3_layout_treeRight(vop)) {\n vop._tree.thread = vim;\n vop._tree.mod += sim - sop;\n }\n if (vip && !d3_layout_treeLeft(vom)) {\n vom._tree.thread = vip;\n vom._tree.mod += sip - som;\n ancestor = node;\n }\n }\n return ancestor;\n }\n\n // Initialize temporary layout variables.\n d3_layout_treeVisitAfter(root, function(node, previousSibling) {\n node._tree = {\n ancestor: node,\n prelim: 0,\n mod: 0,\n change: 0,\n shift: 0,\n number: previousSibling ? previousSibling._tree.number + 1 : 0\n };\n });\n\n // Compute the layout using Buchheim et al.'s algorithm.\n firstWalk(root);\n secondWalk(root, -root._tree.prelim);\n\n // Compute the left-most, right-most, and depth-most nodes for extents.\n var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost),\n right = d3_layout_treeSearch(root, d3_layout_treeRightmost),\n deep = d3_layout_treeSearch(root, d3_layout_treeDeepest),\n x0 = left.x - separation(left, right) / 2,\n x1 = right.x + separation(right, left) / 2,\n y1 = deep.depth || 1;\n\n // Clear temporary layout variables; transform x and y.\n d3_layout_treeVisitAfter(root, function(node) {\n node.x = (node.x - x0) / (x1 - x0) * size[0];\n node.y = node.depth / y1 * size[1];\n delete node._tree;\n });\n\n return nodes;\n }\n\n tree.separation = function(x) {\n if (!arguments.length) return separation;\n separation = x;\n return tree;\n };\n\n tree.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return tree;\n };\n\n return d3_layout_hierarchyRebind(tree, hierarchy);\n};\n\nfunction d3_layout_treeSeparation(a, b) {\n return a.parent == b.parent ? 1 : 2;\n}\n\n// function d3_layout_treeSeparationRadial(a, b) {\n// return (a.parent == b.parent ? 1 : 2) / a.depth;\n// }\n\nfunction d3_layout_treeLeft(node) {\n var children = node.children;\n return children && children.length ? children[0] : node._tree.thread;\n}\n\nfunction d3_layout_treeRight(node) {\n var children = node.children,\n n;\n return children && (n = children.length) ? children[n - 1] : node._tree.thread;\n}\n\nfunction d3_layout_treeSearch(node, compare) {\n var children = node.children;\n if (children && (n = children.length)) {\n var child,\n n,\n i = -1;\n while (++i < n) {\n if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {\n node = child;\n }\n }\n }\n return node;\n}\n\nfunction d3_layout_treeRightmost(a, b) {\n return a.x - b.x;\n}\n\nfunction d3_layout_treeLeftmost(a, b) {\n return b.x - a.x;\n}\n\nfunction d3_layout_treeDeepest(a, b) {\n return a.depth - b.depth;\n}\n\nfunction d3_layout_treeVisitAfter(node, callback) {\n function visit(node, previousSibling) {\n var children = node.children;\n if (children && (n = children.length)) {\n var child,\n previousChild = null,\n i = -1,\n n;\n while (++i < n) {\n child = children[i];\n visit(child, previousChild);\n previousChild = child;\n }\n }\n callback(node, previousSibling);\n }\n visit(node, null);\n}\n\nfunction d3_layout_treeShift(node) {\n var shift = 0,\n change = 0,\n children = node.children,\n i = children.length,\n child;\n while (--i >= 0) {\n child = children[i]._tree;\n child.prelim += shift;\n child.mod += shift;\n shift += child.shift + (change += child.change);\n }\n}\n\nfunction d3_layout_treeMove(ancestor, node, shift) {\n ancestor = ancestor._tree;\n node = node._tree;\n var change = shift / (node.number - ancestor.number);\n ancestor.change += change;\n node.change -= change;\n node.shift += shift;\n node.prelim += shift;\n node.mod += shift;\n}\n\nfunction d3_layout_treeAncestor(vim, node, ancestor) {\n return vim._tree.ancestor.parent == node.parent\n ? vim._tree.ancestor\n : ancestor;\n}\n// Squarified Treemaps by Mark Bruls, Kees Huizing, and Jarke J. van Wijk\n// Modified to support a target aspect ratio by Jeff Heer\nd3.layout.treemap = function() {\n var hierarchy = d3.layout.hierarchy(),\n round = Math.round,\n size = [1, 1], // width, height\n padding = null,\n pad = d3_layout_treemapPadNull,\n sticky = false,\n stickies,\n ratio = 0.5 * (1 + Math.sqrt(5)); // golden ratio\n\n // Compute the area for each child based on value & scale.\n function scale(children, k) {\n var i = -1,\n n = children.length,\n child,\n area;\n while (++i < n) {\n area = (child = children[i]).value * (k < 0 ? 0 : k);\n child.area = isNaN(area) || area <= 0 ? 0 : area;\n }\n }\n\n // Recursively arranges the specified node's children into squarified rows.\n function squarify(node) {\n var children = node.children;\n if (children && children.length) {\n var rect = pad(node),\n row = [],\n remaining = children.slice(), // copy-on-write\n child,\n best = Infinity, // the best row score so far\n score, // the current row score\n u = Math.min(rect.dx, rect.dy), // initial orientation\n n;\n scale(remaining, rect.dx * rect.dy / node.value);\n row.area = 0;\n while ((n = remaining.length) > 0) {\n row.push(child = remaining[n - 1]);\n row.area += child.area;\n if ((score = worst(row, u)) <= best) { // continue with this orientation\n remaining.pop();\n best = score;\n } else { // abort, and try a different orientation\n row.area -= row.pop().area;\n position(row, u, rect, false);\n u = Math.min(rect.dx, rect.dy);\n row.length = row.area = 0;\n best = Infinity;\n }\n }\n if (row.length) {\n position(row, u, rect, true);\n row.length = row.area = 0;\n }\n children.forEach(squarify);\n }\n }\n\n // Recursively resizes the specified node's children into existing rows.\n // Preserves the existing layout!\n function stickify(node) {\n var children = node.children;\n if (children && children.length) {\n var rect = pad(node),\n remaining = children.slice(), // copy-on-write\n child,\n row = [];\n scale(remaining, rect.dx * rect.dy / node.value);\n row.area = 0;\n while (child = remaining.pop()) {\n row.push(child);\n row.area += child.area;\n if (child.z != null) {\n position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);\n row.length = row.area = 0;\n }\n }\n children.forEach(stickify);\n }\n }\n\n // Computes the score for the specified row, as the worst aspect ratio.\n function worst(row, u) {\n var s = row.area,\n r,\n rmax = 0,\n rmin = Infinity,\n i = -1,\n n = row.length;\n while (++i < n) {\n if (!(r = row[i].area)) continue;\n if (r < rmin) rmin = r;\n if (r > rmax) rmax = r;\n }\n s *= s;\n u *= u;\n return s\n ? Math.max((u * rmax * ratio) / s, s / (u * rmin * ratio))\n : Infinity;\n }\n\n // Positions the specified row of nodes. Modifies `rect`.\n function position(row, u, rect, flush) {\n var i = -1,\n n = row.length,\n x = rect.x,\n y = rect.y,\n v = u ? round(row.area / u) : 0,\n o;\n if (u == rect.dx) { // horizontal subdivision\n if (flush || v > rect.dy) v = rect.dy; // over+underflow\n while (++i < n) {\n o = row[i];\n o.x = x;\n o.y = y;\n o.dy = v;\n x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);\n }\n o.z = true;\n o.dx += rect.x + rect.dx - x; // rounding error\n rect.y += v;\n rect.dy -= v;\n } else { // vertical subdivision\n if (flush || v > rect.dx) v = rect.dx; // over+underflow\n while (++i < n) {\n o = row[i];\n o.x = x;\n o.y = y;\n o.dx = v;\n y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);\n }\n o.z = false;\n o.dy += rect.y + rect.dy - y; // rounding error\n rect.x += v;\n rect.dx -= v;\n }\n }\n\n function treemap(d) {\n var nodes = stickies || hierarchy(d),\n root = nodes[0];\n root.x = 0;\n root.y = 0;\n root.dx = size[0];\n root.dy = size[1];\n if (stickies) hierarchy.revalue(root);\n scale([root], root.dx * root.dy / root.value);\n (stickies ? stickify : squarify)(root);\n if (sticky) stickies = nodes;\n return nodes;\n }\n\n treemap.size = function(x) {\n if (!arguments.length) return size;\n size = x;\n return treemap;\n };\n\n treemap.padding = function(x) {\n if (!arguments.length) return padding;\n\n function padFunction(node) {\n var p = x.call(treemap, node, node.depth);\n return p == null\n ? d3_layout_treemapPadNull(node)\n : d3_layout_treemapPad(node, typeof p === \"number\" ? [p, p, p, p] : p);\n }\n\n function padConstant(node) {\n return d3_layout_treemapPad(node, x);\n }\n\n var type;\n pad = (padding = x) == null ? d3_layout_treemapPadNull\n : (type = typeof x) === \"function\" ? padFunction\n : type === \"number\" ? (x = [x, x, x, x], padConstant)\n : padConstant;\n return treemap;\n };\n\n treemap.round = function(x) {\n if (!arguments.length) return round != Number;\n round = x ? Math.round : Number;\n return treemap;\n };\n\n treemap.sticky = function(x) {\n if (!arguments.length) return sticky;\n sticky = x;\n stickies = null;\n return treemap;\n };\n\n treemap.ratio = function(x) {\n if (!arguments.length) return ratio;\n ratio = x;\n return treemap;\n };\n\n return d3_layout_hierarchyRebind(treemap, hierarchy);\n};\n\nfunction d3_layout_treemapPadNull(node) {\n return {x: node.x, y: node.y, dx: node.dx, dy: node.dy};\n}\n\nfunction d3_layout_treemapPad(node, padding) {\n var x = node.x + padding[3],\n y = node.y + padding[0],\n dx = node.dx - padding[1] - padding[3],\n dy = node.dy - padding[0] - padding[2];\n if (dx < 0) { x += dx / 2; dx = 0; }\n if (dy < 0) { y += dy / 2; dy = 0; }\n return {x: x, y: y, dx: dx, dy: dy};\n}\nd3.csv = function(url, callback) {\n d3.text(url, \"text/csv\", function(text) {\n callback(text && d3.csv.parse(text));\n });\n};\nd3.csv.parse = function(text) {\n var header;\n return d3.csv.parseRows(text, function(row, i) {\n if (i) {\n var o = {}, j = -1, m = header.length;\n while (++j < m) o[header[j]] = row[j];\n return o;\n } else {\n header = row;\n return null;\n }\n });\n};\n\nd3.csv.parseRows = function(text, f) {\n var EOL = {}, // sentinel value for end-of-line\n EOF = {}, // sentinel value for end-of-file\n rows = [], // output rows\n re = /\\r\\n|[,\\r\\n]/g, // field separator regex\n n = 0, // the current line number\n t, // the current token\n eol; // is the current token followed by EOL?\n\n re.lastIndex = 0; // work-around bug in FF 3.6\n\n /** @private Returns the next token. */\n function token() {\n if (re.lastIndex >= text.length) return EOF; // special case: end of file\n if (eol) { eol = false; return EOL; } // special case: end of line\n\n // special case: quotes\n var j = re.lastIndex;\n if (text.charCodeAt(j) === 34) {\n var i = j;\n while (i++ < text.length) {\n if (text.charCodeAt(i) === 34) {\n if (text.charCodeAt(i + 1) !== 34) break;\n i++;\n }\n }\n re.lastIndex = i + 2;\n var c = text.charCodeAt(i + 1);\n if (c === 13) {\n eol = true;\n if (text.charCodeAt(i + 2) === 10) re.lastIndex++;\n } else if (c === 10) {\n eol = true;\n }\n return text.substring(j + 1, i).replace(/\"\"/g, \"\\\"\");\n }\n\n // common case\n var m = re.exec(text);\n if (m) {\n eol = m[0].charCodeAt(0) !== 44;\n return text.substring(j, m.index);\n }\n re.lastIndex = text.length;\n return text.substring(j);\n }\n\n while ((t = token()) !== EOF) {\n var a = [];\n while ((t !== EOL) && (t !== EOF)) {\n a.push(t);\n t = token();\n }\n if (f && !(a = f(a, n++))) continue;\n rows.push(a);\n }\n\n return rows;\n};\nd3.csv.format = function(rows) {\n return rows.map(d3_csv_formatRow).join(\"\\n\");\n};\n\nfunction d3_csv_formatRow(row) {\n return row.map(d3_csv_formatValue).join(\",\");\n}\n\nfunction d3_csv_formatValue(text) {\n return /[\",\\n]/.test(text)\n ? \"\\\"\" + text.replace(/\\\"/g, \"\\\"\\\"\") + \"\\\"\"\n : text;\n}\nd3.geo = {};\n\nvar d3_geo_radians = Math.PI / 180;\n// TODO clip input coordinates on opposite hemisphere\nd3.geo.azimuthal = function() {\n var mode = \"orthographic\", // or stereographic, gnomonic, equidistant or equalarea\n origin,\n scale = 200,\n translate = [480, 250],\n x0,\n y0,\n cy0,\n sy0;\n\n function azimuthal(coordinates) {\n var x1 = coordinates[0] * d3_geo_radians - x0,\n y1 = coordinates[1] * d3_geo_radians,\n cx1 = Math.cos(x1),\n sx1 = Math.sin(x1),\n cy1 = Math.cos(y1),\n sy1 = Math.sin(y1),\n cc = mode !== \"orthographic\" ? sy0 * sy1 + cy0 * cy1 * cx1 : null,\n c,\n k = mode === \"stereographic\" ? 1 / (1 + cc)\n : mode === \"gnomonic\" ? 1 / cc\n : mode === \"equidistant\" ? (c = Math.acos(cc), c ? c / Math.sin(c) : 0)\n : mode === \"equalarea\" ? Math.sqrt(2 / (1 + cc))\n : 1,\n x = k * cy1 * sx1,\n y = k * (sy0 * cy1 * cx1 - cy0 * sy1);\n return [\n scale * x + translate[0],\n scale * y + translate[1]\n ];\n }\n\n azimuthal.invert = function(coordinates) {\n var x = (coordinates[0] - translate[0]) / scale,\n y = (coordinates[1] - translate[1]) / scale,\n p = Math.sqrt(x * x + y * y),\n c = mode === \"stereographic\" ? 2 * Math.atan(p)\n : mode === \"gnomonic\" ? Math.atan(p)\n : mode === \"equidistant\" ? p\n : mode === \"equalarea\" ? 2 * Math.asin(.5 * p)\n : Math.asin(p),\n sc = Math.sin(c),\n cc = Math.cos(c);\n return [\n (x0 + Math.atan2(x * sc, p * cy0 * cc + y * sy0 * sc)) / d3_geo_radians,\n Math.asin(cc * sy0 - (p ? (y * sc * cy0) / p : 0)) / d3_geo_radians\n ];\n };\n\n azimuthal.mode = function(x) {\n if (!arguments.length) return mode;\n mode = x + \"\";\n return azimuthal;\n };\n\n azimuthal.origin = function(x) {\n if (!arguments.length) return origin;\n origin = x;\n x0 = origin[0] * d3_geo_radians;\n y0 = origin[1] * d3_geo_radians;\n cy0 = Math.cos(y0);\n sy0 = Math.sin(y0);\n return azimuthal;\n };\n\n azimuthal.scale = function(x) {\n if (!arguments.length) return scale;\n scale = +x;\n return azimuthal;\n };\n\n azimuthal.translate = function(x) {\n if (!arguments.length) return translate;\n translate = [+x[0], +x[1]];\n return azimuthal;\n };\n\n return azimuthal.origin([0, 0]);\n};\n// Derived from Tom Carden's Albers implementation for Protovis.\n// http://gist.github.com/476238\n// http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html\n\nd3.geo.albers = function() {\n var origin = [-98, 38],\n parallels = [29.5, 45.5],\n scale = 1000,\n translate = [480, 250],\n lng0, // d3_geo_radians * origin[0]\n n,\n C,\n p0;\n\n function albers(coordinates) {\n var t = n * (d3_geo_radians * coordinates[0] - lng0),\n p = Math.sqrt(C - 2 * n * Math.sin(d3_geo_radians * coordinates[1])) / n;\n return [\n scale * p * Math.sin(t) + translate[0],\n scale * (p * Math.cos(t) - p0) + translate[1]\n ];\n }\n\n albers.invert = function(coordinates) {\n var x = (coordinates[0] - translate[0]) / scale,\n y = (coordinates[1] - translate[1]) / scale,\n p0y = p0 + y,\n t = Math.atan2(x, p0y),\n p = Math.sqrt(x * x + p0y * p0y);\n return [\n (lng0 + t / n) / d3_geo_radians,\n Math.asin((C - p * p * n * n) / (2 * n)) / d3_geo_radians\n ];\n };\n\n function reload() {\n var phi1 = d3_geo_radians * parallels[0],\n phi2 = d3_geo_radians * parallels[1],\n lat0 = d3_geo_radians * origin[1],\n s = Math.sin(phi1),\n c = Math.cos(phi1);\n lng0 = d3_geo_radians * origin[0];\n n = .5 * (s + Math.sin(phi2));\n C = c * c + 2 * n * s;\n p0 = Math.sqrt(C - 2 * n * Math.sin(lat0)) / n;\n return albers;\n }\n\n albers.origin = function(x) {\n if (!arguments.length) return origin;\n origin = [+x[0], +x[1]];\n return reload();\n };\n\n albers.parallels = function(x) {\n if (!arguments.length) return parallels;\n parallels = [+x[0], +x[1]];\n return reload();\n };\n\n albers.scale = function(x) {\n if (!arguments.length) return scale;\n scale = +x;\n return albers;\n };\n\n albers.translate = function(x) {\n if (!arguments.length) return translate;\n translate = [+x[0], +x[1]];\n return albers;\n };\n\n return reload();\n};\n\n// A composite projection for the United States, 960x500. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\n// TODO allow the composite projection to be rescaled?\nd3.geo.albersUsa = function() {\n var lower48 = d3.geo.albers();\n\n var alaska = d3.geo.albers()\n .origin([-160, 60])\n .parallels([55, 65]);\n\n var hawaii = d3.geo.albers()\n .origin([-160, 20])\n .parallels([8, 18]);\n\n var puertoRico = d3.geo.albers()\n .origin([-60, 10])\n .parallels([8, 18]);\n\n function albersUsa(coordinates) {\n var lon = coordinates[0],\n lat = coordinates[1];\n return (lat > 50 ? alaska\n : lon < -140 ? hawaii\n : lat < 21 ? puertoRico\n : lower48)(coordinates);\n }\n\n albersUsa.scale = function(x) {\n if (!arguments.length) return lower48.scale();\n lower48.scale(x);\n alaska.scale(x * .6);\n hawaii.scale(x);\n puertoRico.scale(x * 1.5);\n return albersUsa.translate(lower48.translate());\n };\n\n albersUsa.translate = function(x) {\n if (!arguments.length) return lower48.translate();\n var dz = lower48.scale() / 1000,\n dx = x[0],\n dy = x[1];\n lower48.translate(x);\n alaska.translate([dx - 400 * dz, dy + 170 * dz]);\n hawaii.translate([dx - 190 * dz, dy + 200 * dz]);\n puertoRico.translate([dx + 580 * dz, dy + 430 * dz]);\n return albersUsa;\n };\n\n return albersUsa.scale(lower48.scale());\n};\nd3.geo.bonne = function() {\n var scale = 200,\n translate = [480, 250],\n x0, // origin longitude in radians\n y0, // origin latitude in radians\n y1, // parallel latitude in radians\n c1; // cot(y1)\n\n function bonne(coordinates) {\n var x = coordinates[0] * d3_geo_radians - x0,\n y = coordinates[1] * d3_geo_radians - y0;\n if (y1) {\n var p = c1 + y1 - y, E = x * Math.cos(y) / p;\n x = p * Math.sin(E);\n y = p * Math.cos(E) - c1;\n } else {\n x *= Math.cos(y);\n y *= -1;\n }\n return [\n scale * x + translate[0],\n scale * y + translate[1]\n ];\n }\n\n bonne.invert = function(coordinates) {\n var x = (coordinates[0] - translate[0]) / scale,\n y = (coordinates[1] - translate[1]) / scale;\n if (y1) {\n var c = c1 + y, p = Math.sqrt(x * x + c * c);\n y = c1 + y1 - p;\n x = x0 + p * Math.atan2(x, c) / Math.cos(y);\n } else {\n y *= -1;\n x /= Math.cos(y);\n }\n return [\n x / d3_geo_radians,\n y / d3_geo_radians\n ];\n };\n\n // 90\u00b0 for Werner, 0\u00b0 for Sinusoidal\n bonne.parallel = function(x) {\n if (!arguments.length) return y1 / d3_geo_radians;\n c1 = 1 / Math.tan(y1 = x * d3_geo_radians);\n return bonne;\n };\n\n bonne.origin = function(x) {\n if (!arguments.length) return [x0 / d3_geo_radians, y0 / d3_geo_radians];\n x0 = x[0] * d3_geo_radians;\n y0 = x[1] * d3_geo_radians;\n return bonne;\n };\n\n bonne.scale = function(x) {\n if (!arguments.length) return scale;\n scale = +x;\n return bonne;\n };\n\n bonne.translate = function(x) {\n if (!arguments.length) return translate;\n translate = [+x[0], +x[1]];\n return bonne;\n };\n\n return bonne.origin([0, 0]).parallel(45);\n};\nd3.geo.equirectangular = function() {\n var scale = 500,\n translate = [480, 250];\n\n function equirectangular(coordinates) {\n var x = coordinates[0] / 360,\n y = -coordinates[1] / 360;\n return [\n scale * x + translate[0],\n scale * y + translate[1]\n ];\n }\n\n equirectangular.invert = function(coordinates) {\n var x = (coordinates[0] - translate[0]) / scale,\n y = (coordinates[1] - translate[1]) / scale;\n return [\n 360 * x,\n -360 * y\n ];\n };\n\n equirectangular.scale = function(x) {\n if (!arguments.length) return scale;\n scale = +x;\n return equirectangular;\n };\n\n equirectangular.translate = function(x) {\n if (!arguments.length) return translate;\n translate = [+x[0], +x[1]];\n return equirectangular;\n };\n\n return equirectangular;\n};\nd3.geo.mercator = function() {\n var scale = 500,\n translate = [480, 250];\n\n function mercator(coordinates) {\n var x = coordinates[0] / 360,\n y = -(Math.log(Math.tan(Math.PI / 4 + coordinates[1] * d3_geo_radians / 2)) / d3_geo_radians) / 360;\n return [\n scale * x + translate[0],\n scale * Math.max(-.5, Math.min(.5, y)) + translate[1]\n ];\n }\n\n mercator.invert = function(coordinates) {\n var x = (coordinates[0] - translate[0]) / scale,\n y = (coordinates[1] - translate[1]) / scale;\n return [\n 360 * x,\n 2 * Math.atan(Math.exp(-360 * y * d3_geo_radians)) / d3_geo_radians - 90\n ];\n };\n\n mercator.scale = function(x) {\n if (!arguments.length) return scale;\n scale = +x;\n return mercator;\n };\n\n mercator.translate = function(x) {\n if (!arguments.length) return translate;\n translate = [+x[0], +x[1]];\n return mercator;\n };\n\n return mercator;\n};\nfunction d3_geo_type(types, defaultValue) {\n return function(object) {\n return object && types.hasOwnProperty(object.type) ? types[object.type](object) : defaultValue;\n };\n}\n/**\n * Returns a function that, given a GeoJSON object (e.g., a feature), returns\n * the corresponding SVG path. The function can be customized by overriding the\n * projection. Point features are mapped to circles with a default radius of\n * 4.5px; the radius can be specified either as a constant or a function that\n * is evaluated per object.\n */\nd3.geo.path = function() {\n var pointRadius = 4.5,\n pointCircle = d3_path_circle(pointRadius),\n projection = d3.geo.albersUsa();\n\n function path(d, i) {\n if (typeof pointRadius === \"function\") {\n pointCircle = d3_path_circle(pointRadius.apply(this, arguments));\n }\n return pathType(d) || null;\n }\n\n function project(coordinates) {\n return projection(coordinates).join(\",\");\n }\n\n var pathType = d3_geo_type({\n\n FeatureCollection: function(o) {\n var path = [],\n features = o.features,\n i = -1, // features.index\n n = features.length;\n while (++i < n) path.push(pathType(features[i].geometry));\n return path.join(\"\");\n },\n\n Feature: function(o) {\n return pathType(o.geometry);\n },\n\n Point: function(o) {\n return \"M\" + project(o.coordinates) + pointCircle;\n },\n\n MultiPoint: function(o) {\n var path = [],\n coordinates = o.coordinates,\n i = -1, // coordinates.index\n n = coordinates.length;\n while (++i < n) path.push(\"M\", project(coordinates[i]), pointCircle);\n return path.join(\"\");\n },\n\n LineString: function(o) {\n var path = [\"M\"],\n coordinates = o.coordinates,\n i = -1, // coordinates.index\n n = coordinates.length;\n while (++i < n) path.push(project(coordinates[i]), \"L\");\n path.pop();\n return path.join(\"\");\n },\n\n MultiLineString: function(o) {\n var path = [],\n coordinates = o.coordinates,\n i = -1, // coordinates.index\n n = coordinates.length,\n subcoordinates, // coordinates[i]\n j, // subcoordinates.index\n m; // subcoordinates.length\n while (++i < n) {\n subcoordinates = coordinates[i];\n j = -1;\n m = subcoordinates.length;\n path.push(\"M\");\n while (++j < m) path.push(project(subcoordinates[j]), \"L\");\n path.pop();\n }\n return path.join(\"\");\n },\n\n Polygon: function(o) {\n var path = [],\n coordinates = o.coordinates,\n i = -1, // coordinates.index\n n = coordinates.length,\n subcoordinates, // coordinates[i]\n j, // subcoordinates.index\n m; // subcoordinates.length\n while (++i < n) {\n subcoordinates = coordinates[i];\n j = -1;\n if ((m = subcoordinates.length - 1) > 0) {\n path.push(\"M\");\n while (++j < m) path.push(project(subcoordinates[j]), \"L\");\n path[path.length - 1] = \"Z\";\n }\n }\n return path.join(\"\");\n },\n\n MultiPolygon: function(o) {\n var path = [],\n coordinates = o.coordinates,\n i = -1, // coordinates index\n n = coordinates.length,\n subcoordinates, // coordinates[i]\n j, // subcoordinates index\n m, // subcoordinates.length\n subsubcoordinates, // subcoordinates[j]\n k, // subsubcoordinates index\n p; // subsubcoordinates.length\n while (++i < n) {\n subcoordinates = coordinates[i];\n j = -1;\n m = subcoordinates.length;\n while (++j < m) {\n subsubcoordinates = subcoordinates[j];\n k = -1;\n if ((p = subsubcoordinates.length - 1) > 0) {\n path.push(\"M\");\n while (++k < p) path.push(project(subsubcoordinates[k]), \"L\");\n path[path.length - 1] = \"Z\";\n }\n }\n }\n return path.join(\"\");\n },\n\n GeometryCollection: function(o) {\n var path = [],\n geometries = o.geometries,\n i = -1, // geometries index\n n = geometries.length;\n while (++i < n) path.push(pathType(geometries[i]));\n return path.join(\"\");\n }\n\n });\n\n var areaType = path.area = d3_geo_type({\n\n FeatureCollection: function(o) {\n var area = 0,\n features = o.features,\n i = -1, // features.index\n n = features.length;\n while (++i < n) area += areaType(features[i]);\n return area;\n },\n\n Feature: function(o) {\n return areaType(o.geometry);\n },\n\n Polygon: function(o) {\n return polygonArea(o.coordinates);\n },\n\n MultiPolygon: function(o) {\n var sum = 0,\n coordinates = o.coordinates,\n i = -1, // coordinates index\n n = coordinates.length;\n while (++i < n) sum += polygonArea(coordinates[i]);\n return sum;\n },\n\n GeometryCollection: function(o) {\n var sum = 0,\n geometries = o.geometries,\n i = -1, // geometries index\n n = geometries.length;\n while (++i < n) sum += areaType(geometries[i]);\n return sum;\n }\n\n }, 0);\n\n function polygonArea(coordinates) {\n var sum = area(coordinates[0]), // exterior ring\n i = 0, // coordinates.index\n n = coordinates.length;\n while (++i < n) sum -= area(coordinates[i]); // holes\n return sum;\n }\n\n function polygonCentroid(coordinates) {\n var polygon = d3.geom.polygon(coordinates[0].map(projection)), // exterior ring\n area = polygon.area(),\n centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1),\n x = centroid[0],\n y = centroid[1],\n z = area,\n i = 0, // coordinates index\n n = coordinates.length;\n while (++i < n) {\n polygon = d3.geom.polygon(coordinates[i].map(projection)); // holes\n area = polygon.area();\n centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1);\n x -= centroid[0];\n y -= centroid[1];\n z -= area;\n }\n return [x, y, 6 * z]; // weighted centroid\n }\n\n var centroidType = path.centroid = d3_geo_type({\n\n // TODO FeatureCollection\n // TODO Point\n // TODO MultiPoint\n // TODO LineString\n // TODO MultiLineString\n // TODO GeometryCollection\n\n Feature: function(o) {\n return centroidType(o.geometry);\n },\n\n Polygon: function(o) {\n var centroid = polygonCentroid(o.coordinates);\n return [centroid[0] / centroid[2], centroid[1] / centroid[2]];\n },\n\n MultiPolygon: function(o) {\n var area = 0,\n coordinates = o.coordinates,\n centroid,\n x = 0,\n y = 0,\n z = 0,\n i = -1, // coordinates index\n n = coordinates.length;\n while (++i < n) {\n centroid = polygonCentroid(coordinates[i]);\n x += centroid[0];\n y += centroid[1];\n z += centroid[2];\n }\n return [x / z, y / z];\n }\n\n });\n\n function area(coordinates) {\n return Math.abs(d3.geom.polygon(coordinates.map(projection)).area());\n }\n\n path.projection = function(x) {\n projection = x;\n return path;\n };\n\n path.pointRadius = function(x) {\n if (typeof x === \"function\") pointRadius = x;\n else {\n pointRadius = +x;\n pointCircle = d3_path_circle(pointRadius);\n }\n return path;\n };\n\n return path;\n};\n\nfunction d3_path_circle(radius) {\n return \"m0,\" + radius\n + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + (-2 * radius)\n + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + (+2 * radius)\n + \"z\";\n}\n/**\n * Given a GeoJSON object, returns the corresponding bounding box. The bounding\n * box is represented by a two-dimensional array: [[left, bottom], [right,\n * top]], where left is the minimum longitude, bottom is the minimum latitude,\n * right is maximum longitude, and top is the maximum latitude.\n */\nd3.geo.bounds = function(feature) {\n var left = Infinity,\n bottom = Infinity,\n right = -Infinity,\n top = -Infinity;\n d3_geo_bounds(feature, function(x, y) {\n if (x < left) left = x;\n if (x > right) right = x;\n if (y < bottom) bottom = y;\n if (y > top) top = y;\n });\n return [[left, bottom], [right, top]];\n};\n\nfunction d3_geo_bounds(o, f) {\n if (d3_geo_boundsTypes.hasOwnProperty(o.type)) d3_geo_boundsTypes[o.type](o, f);\n}\n\nvar d3_geo_boundsTypes = {\n Feature: d3_geo_boundsFeature,\n FeatureCollection: d3_geo_boundsFeatureCollection,\n GeometryCollection: d3_geo_boundsGeometryCollection,\n LineString: d3_geo_boundsLineString,\n MultiLineString: d3_geo_boundsMultiLineString,\n MultiPoint: d3_geo_boundsLineString,\n MultiPolygon: d3_geo_boundsMultiPolygon,\n Point: d3_geo_boundsPoint,\n Polygon: d3_geo_boundsPolygon\n};\n\nfunction d3_geo_boundsFeature(o, f) {\n d3_geo_bounds(o.geometry, f);\n}\n\nfunction d3_geo_boundsFeatureCollection(o, f) {\n for (var a = o.features, i = 0, n = a.length; i < n; i++) {\n d3_geo_bounds(a[i].geometry, f);\n }\n}\n\nfunction d3_geo_boundsGeometryCollection(o, f) {\n for (var a = o.geometries, i = 0, n = a.length; i < n; i++) {\n d3_geo_bounds(a[i], f);\n }\n}\n\nfunction d3_geo_boundsLineString(o, f) {\n for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {\n f.apply(null, a[i]);\n }\n}\n\nfunction d3_geo_boundsMultiLineString(o, f) {\n for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {\n for (var b = a[i], j = 0, m = b.length; j < m; j++) {\n f.apply(null, b[j]);\n }\n }\n}\n\nfunction d3_geo_boundsMultiPolygon(o, f) {\n for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {\n for (var b = a[i][0], j = 0, m = b.length; j < m; j++) {\n f.apply(null, b[j]);\n }\n }\n}\n\nfunction d3_geo_boundsPoint(o, f) {\n f.apply(null, o.coordinates);\n}\n\nfunction d3_geo_boundsPolygon(o, f) {\n for (var a = o.coordinates[0], i = 0, n = a.length; i < n; i++) {\n f.apply(null, a[i]);\n }\n}\n// TODO breakAtDateLine?\n\nd3.geo.circle = function() {\n var origin = [0, 0],\n degrees = 90 - 1e-2,\n radians = degrees * d3_geo_radians,\n arc = d3.geo.greatArc().target(Object);\n\n function circle() {\n // TODO render a circle as a Polygon\n }\n\n function visible(point) {\n return arc.distance(point) < radians;\n }\n\n circle.clip = function(d) {\n arc.source(typeof origin === \"function\" ? origin.apply(this, arguments) : origin);\n return clipType(d);\n };\n\n var clipType = d3_geo_type({\n\n FeatureCollection: function(o) {\n var features = o.features.map(clipType).filter(Object);\n return features && (o = Object.create(o), o.features = features, o);\n },\n\n Feature: function(o) {\n var geometry = clipType(o.geometry);\n return geometry && (o = Object.create(o), o.geometry = geometry, o);\n },\n\n Point: function(o) {\n return visible(o.coordinates) && o;\n },\n\n MultiPoint: function(o) {\n var coordinates = o.coordinates.filter(visible);\n return coordinates.length && {\n type: o.type,\n coordinates: coordinates\n };\n },\n\n LineString: function(o) {\n var coordinates = clip(o.coordinates);\n return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);\n },\n\n MultiLineString: function(o) {\n var coordinates = o.coordinates.map(clip).filter(function(d) { return d.length; });\n return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);\n },\n\n Polygon: function(o) {\n var coordinates = o.coordinates.map(clip);\n return coordinates[0].length && (o = Object.create(o), o.coordinates = coordinates, o);\n },\n\n MultiPolygon: function(o) {\n var coordinates = o.coordinates.map(function(d) { return d.map(clip); }).filter(function(d) { return d[0].length; });\n return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);\n },\n\n GeometryCollection: function(o) {\n var geometries = o.geometries.map(clipType).filter(Object);\n return geometries.length && (o = Object.create(o), o.geometries = geometries, o);\n }\n\n });\n\n function clip(coordinates) {\n var i = -1,\n n = coordinates.length,\n clipped = [],\n p0,\n p1,\n p2,\n d0,\n d1;\n\n while (++i < n) {\n d1 = arc.distance(p2 = coordinates[i]);\n if (d1 < radians) {\n if (p1) clipped.push(d3_geo_greatArcInterpolate(p1, p2)((d0 - radians) / (d0 - d1)));\n clipped.push(p2);\n p0 = p1 = null;\n } else {\n p1 = p2;\n if (!p0 && clipped.length) {\n clipped.push(d3_geo_greatArcInterpolate(clipped[clipped.length - 1], p1)((radians - d0) / (d1 - d0)));\n p0 = p1;\n }\n }\n d0 = d1;\n }\n\n if (p1 && clipped.length) {\n d1 = arc.distance(p2 = clipped[0]);\n clipped.push(d3_geo_greatArcInterpolate(p1, p2)((d0 - radians) / (d0 - d1)));\n }\n\n return resample(clipped);\n }\n\n // Resample coordinates, creating great arcs between each.\n function resample(coordinates) {\n var i = 0,\n n = coordinates.length,\n j,\n m,\n resampled = n ? [coordinates[0]] : coordinates,\n resamples,\n origin = arc.source();\n\n while (++i < n) {\n resamples = arc.source(coordinates[i - 1])(coordinates[i]).coordinates;\n for (j = 0, m = resamples.length; ++j < m;) resampled.push(resamples[j]);\n }\n\n arc.source(origin);\n return resampled;\n }\n\n circle.origin = function(x) {\n if (!arguments.length) return origin;\n origin = x;\n return circle;\n };\n\n circle.angle = function(x) {\n if (!arguments.length) return degrees;\n radians = (degrees = +x) * d3_geo_radians;\n return circle;\n };\n\n // Precision is specified in degrees.\n circle.precision = function(x) {\n if (!arguments.length) return arc.precision();\n arc.precision(x);\n return circle;\n };\n\n return circle;\n}\nd3.geo.greatArc = function() {\n var source = d3_geo_greatArcSource,\n target = d3_geo_greatArcTarget,\n precision = 6 * d3_geo_radians;\n\n function greatArc() {\n var a = typeof source === \"function\" ? source.apply(this, arguments) : source,\n b = typeof target === \"function\" ? target.apply(this, arguments) : target,\n i = d3_geo_greatArcInterpolate(a, b),\n dt = precision / i.d,\n t = 0,\n coordinates = [a];\n while ((t += dt) < 1) coordinates.push(i(t));\n coordinates.push(b);\n return {\n type: \"LineString\",\n coordinates: coordinates\n };\n }\n\n // Length returned in radians; multiply by radius for distance.\n greatArc.distance = function() {\n var a = typeof source === \"function\" ? source.apply(this, arguments) : source,\n b = typeof target === \"function\" ? target.apply(this, arguments) : target;\n return d3_geo_greatArcInterpolate(a, b).d;\n };\n\n greatArc.source = function(x) {\n if (!arguments.length) return source;\n source = x;\n return greatArc;\n };\n\n greatArc.target = function(x) {\n if (!arguments.length) return target;\n target = x;\n return greatArc;\n };\n\n // Precision is specified in degrees.\n greatArc.precision = function(x) {\n if (!arguments.length) return precision / d3_geo_radians;\n precision = x * d3_geo_radians;\n return greatArc;\n };\n\n return greatArc;\n};\n\nfunction d3_geo_greatArcSource(d) {\n return d.source;\n}\n\nfunction d3_geo_greatArcTarget(d) {\n return d.target;\n}\n\nfunction d3_geo_greatArcInterpolate(a, b) {\n var x0 = a[0] * d3_geo_radians, cx0 = Math.cos(x0), sx0 = Math.sin(x0),\n y0 = a[1] * d3_geo_radians, cy0 = Math.cos(y0), sy0 = Math.sin(y0),\n x1 = b[0] * d3_geo_radians, cx1 = Math.cos(x1), sx1 = Math.sin(x1),\n y1 = b[1] * d3_geo_radians, cy1 = Math.cos(y1), sy1 = Math.sin(y1),\n d = interpolate.d = Math.acos(Math.max(-1, Math.min(1, sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)))),\n sd = Math.sin(d);\n\n // From http://williams.best.vwh.net/avform.htm#Intermediate\n function interpolate(t) {\n var A = Math.sin(d - (t *= d)) / sd,\n B = Math.sin(t) / sd,\n x = A * cy0 * cx0 + B * cy1 * cx1,\n y = A * cy0 * sx0 + B * cy1 * sx1,\n z = A * sy0 + B * sy1;\n return [\n Math.atan2(y, x) / d3_geo_radians,\n Math.atan2(z, Math.sqrt(x * x + y * y)) / d3_geo_radians\n ];\n }\n\n return interpolate;\n}\nd3.geo.greatCircle = d3.geo.circle;\nd3.geom = {};\n/**\n * Computes a contour for a given input grid function using the <a\n * href=\"http://en.wikipedia.org/wiki/Marching_squares\">marching\n * squares</a> algorithm. Returns the contour polygon as an array of points.\n *\n * @param grid a two-input function(x, y) that returns true for values\n * inside the contour and false for values outside the contour.\n * @param start an optional starting point [x, y] on the grid.\n * @returns polygon [[x1, y1], [x2, y2], \u2026]\n */\nd3.geom.contour = function(grid, start) {\n var s = start || d3_geom_contourStart(grid), // starting point\n c = [], // contour polygon\n x = s[0], // current x position\n y = s[1], // current y position\n dx = 0, // next x direction\n dy = 0, // next y direction\n pdx = NaN, // previous x direction\n pdy = NaN, // previous y direction\n i = 0;\n\n do {\n // determine marching squares index\n i = 0;\n if (grid(x-1, y-1)) i += 1;\n if (grid(x, y-1)) i += 2;\n if (grid(x-1, y )) i += 4;\n if (grid(x, y )) i += 8;\n\n // determine next direction\n if (i === 6) {\n dx = pdy === -1 ? -1 : 1;\n dy = 0;\n } else if (i === 9) {\n dx = 0;\n dy = pdx === 1 ? -1 : 1;\n } else {\n dx = d3_geom_contourDx[i];\n dy = d3_geom_contourDy[i];\n }\n\n // update contour polygon\n if (dx != pdx && dy != pdy) {\n c.push([x, y]);\n pdx = dx;\n pdy = dy;\n }\n\n x += dx;\n y += dy;\n } while (s[0] != x || s[1] != y);\n\n return c;\n};\n\n// lookup tables for marching directions\nvar d3_geom_contourDx = [1, 0, 1, 1,-1, 0,-1, 1,0, 0,0,0,-1, 0,-1,NaN],\n d3_geom_contourDy = [0,-1, 0, 0, 0,-1, 0, 0,1,-1,1,1, 0,-1, 0,NaN];\n\nfunction d3_geom_contourStart(grid) {\n var x = 0,\n y = 0;\n\n // search for a starting point; begin at origin\n // and proceed along outward-expanding diagonals\n while (true) {\n if (grid(x,y)) {\n return [x,y];\n }\n if (x === 0) {\n x = y + 1;\n y = 0;\n } else {\n x = x - 1;\n y = y + 1;\n }\n }\n}\n/**\n * Computes the 2D convex hull of a set of points using Graham's scanning\n * algorithm. The algorithm has been implemented as described in Cormen,\n * Leiserson, and Rivest's Introduction to Algorithms. The running time of\n * this algorithm is O(n log n), where n is the number of input points.\n *\n * @param vertices [[x1, y1], [x2, y2], \u2026]\n * @returns polygon [[x1, y1], [x2, y2], \u2026]\n */\nd3.geom.hull = function(vertices) {\n if (vertices.length < 3) return [];\n\n var len = vertices.length,\n plen = len - 1,\n points = [],\n stack = [],\n i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;\n\n // find the starting ref point: leftmost point with the minimum y coord\n for (i=1; i<len; ++i) {\n if (vertices[i][1] < vertices[h][1]) {\n h = i;\n } else if (vertices[i][1] == vertices[h][1]) {\n h = (vertices[i][0] < vertices[h][0] ? i : h);\n }\n }\n\n // calculate polar angles from ref point and sort\n for (i=0; i<len; ++i) {\n if (i === h) continue;\n y1 = vertices[i][1] - vertices[h][1];\n x1 = vertices[i][0] - vertices[h][0];\n points.push({angle: Math.atan2(y1, x1), index: i});\n }\n points.sort(function(a, b) { return a.angle - b.angle; });\n\n // toss out duplicate angles\n a = points[0].angle;\n v = points[0].index;\n u = 0;\n for (i=1; i<plen; ++i) {\n j = points[i].index;\n if (a == points[i].angle) {\n // keep angle for point most distant from the reference\n x1 = vertices[v][0] - vertices[h][0];\n y1 = vertices[v][1] - vertices[h][1];\n x2 = vertices[j][0] - vertices[h][0];\n y2 = vertices[j][1] - vertices[h][1];\n if ((x1*x1 + y1*y1) >= (x2*x2 + y2*y2)) {\n points[i].index = -1;\n } else {\n points[u].index = -1;\n a = points[i].angle;\n u = i;\n v = j;\n }\n } else {\n a = points[i].angle;\n u = i;\n v = j;\n }\n }\n\n // initialize the stack\n stack.push(h);\n for (i=0, j=0; i<2; ++j) {\n if (points[j].index !== -1) {\n stack.push(points[j].index);\n i++;\n }\n }\n sp = stack.length;\n\n // do graham's scan\n for (; j<plen; ++j) {\n if (points[j].index === -1) continue; // skip tossed out points\n while (!d3_geom_hullCCW(stack[sp-2], stack[sp-1], points[j].index, vertices)) {\n --sp;\n }\n stack[sp++] = points[j].index;\n }\n\n // construct the hull\n var poly = [];\n for (i=0; i<sp; ++i) {\n poly.push(vertices[stack[i]]);\n }\n return poly;\n}\n\n// are three points in counter-clockwise order?\nfunction d3_geom_hullCCW(i1, i2, i3, v) {\n var t, a, b, c, d, e, f;\n t = v[i1]; a = t[0]; b = t[1];\n t = v[i2]; c = t[0]; d = t[1];\n t = v[i3]; e = t[0]; f = t[1];\n return ((f-b)*(c-a) - (d-b)*(e-a)) > 0;\n}\n// Note: requires coordinates to be counterclockwise and convex!\nd3.geom.polygon = function(coordinates) {\n\n coordinates.area = function() {\n var i = 0,\n n = coordinates.length,\n a = coordinates[n - 1][0] * coordinates[0][1],\n b = coordinates[n - 1][1] * coordinates[0][0];\n while (++i < n) {\n a += coordinates[i - 1][0] * coordinates[i][1];\n b += coordinates[i - 1][1] * coordinates[i][0];\n }\n return (b - a) * .5;\n };\n\n coordinates.centroid = function(k) {\n var i = -1,\n n = coordinates.length,\n x = 0,\n y = 0,\n a,\n b = coordinates[n - 1],\n c;\n if (!arguments.length) k = -1 / (6 * coordinates.area());\n while (++i < n) {\n a = b;\n b = coordinates[i];\n c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n return [x * k, y * k];\n };\n\n // The Sutherland-Hodgman clipping algorithm.\n coordinates.clip = function(subject) {\n var input,\n i = -1,\n n = coordinates.length,\n j,\n m,\n a = coordinates[n - 1],\n b,\n c,\n d;\n while (++i < n) {\n input = subject.slice();\n subject.length = 0;\n b = coordinates[i];\n c = input[(m = input.length) - 1];\n j = -1;\n while (++j < m) {\n d = input[j];\n if (d3_geom_polygonInside(d, a, b)) {\n if (!d3_geom_polygonInside(c, a, b)) {\n subject.push(d3_geom_polygonIntersect(c, d, a, b));\n }\n subject.push(d);\n } else if (d3_geom_polygonInside(c, a, b)) {\n subject.push(d3_geom_polygonIntersect(c, d, a, b));\n }\n c = d;\n }\n a = b;\n }\n return subject;\n };\n\n return coordinates;\n};\n\nfunction d3_geom_polygonInside(p, a, b) {\n return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);\n}\n\n// Intersect two infinite lines cd and ab.\nfunction d3_geom_polygonIntersect(c, d, a, b) {\n var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0],\n y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1],\n x13 = x1 - x3,\n x21 = x2 - x1,\n x43 = x4 - x3,\n y13 = y1 - y3,\n y21 = y2 - y1,\n y43 = y4 - y3,\n ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);\n return [x1 + ua * x21, y1 + ua * y21];\n}\n// Adapted from Nicolas Garcia Belmonte's JIT implementation:\n// http://blog.thejit.org/2010/02/12/voronoi-tessellation/\n// http://blog.thejit.org/assets/voronoijs/voronoi.js\n// See lib/jit/LICENSE for details.\n\n// Notes:\n//\n// This implementation does not clip the returned polygons, so if you want to\n// clip them to a particular shape you will need to do that either in SVG or by\n// post-processing with d3.geom.polygon's clip method.\n//\n// If any vertices are coincident or have NaN positions, the behavior of this\n// method is undefined. Most likely invalid polygons will be returned. You\n// should filter invalid points, and consolidate coincident points, before\n// computing the tessellation.\n\n/**\n * @param vertices [[x1, y1], [x2, y2], \u2026]\n * @returns polygons [[[x1, y1], [x2, y2], \u2026], \u2026]\n */\nd3.geom.voronoi = function(vertices) {\n var polygons = vertices.map(function() { return []; });\n\n d3_voronoi_tessellate(vertices, function(e) {\n var s1,\n s2,\n x1,\n x2,\n y1,\n y2;\n if (e.a === 1 && e.b >= 0) {\n s1 = e.ep.r;\n s2 = e.ep.l;\n } else {\n s1 = e.ep.l;\n s2 = e.ep.r;\n }\n if (e.a === 1) {\n y1 = s1 ? s1.y : -1e6;\n x1 = e.c - e.b * y1;\n y2 = s2 ? s2.y : 1e6;\n x2 = e.c - e.b * y2;\n } else {\n x1 = s1 ? s1.x : -1e6;\n y1 = e.c - e.a * x1;\n x2 = s2 ? s2.x : 1e6;\n y2 = e.c - e.a * x2;\n }\n var v1 = [x1, y1],\n v2 = [x2, y2];\n polygons[e.region.l.index].push(v1, v2);\n polygons[e.region.r.index].push(v1, v2);\n });\n\n // Reconnect the polygon segments into counterclockwise loops.\n return polygons.map(function(polygon, i) {\n var cx = vertices[i][0],\n cy = vertices[i][1];\n polygon.forEach(function(v) {\n v.angle = Math.atan2(v[0] - cx, v[1] - cy);\n });\n return polygon.sort(function(a, b) {\n return a.angle - b.angle;\n }).filter(function(d, i) {\n return !i || (d.angle - polygon[i - 1].angle > 1e-10);\n });\n });\n};\n\nvar d3_voronoi_opposite = {\"l\": \"r\", \"r\": \"l\"};\n\nfunction d3_voronoi_tessellate(vertices, callback) {\n\n var Sites = {\n list: vertices\n .map(function(v, i) {\n return {\n index: i,\n x: v[0],\n y: v[1]\n };\n })\n .sort(function(a, b) {\n return a.y < b.y ? -1\n : a.y > b.y ? 1\n : a.x < b.x ? -1\n : a.x > b.x ? 1\n : 0;\n }),\n bottomSite: null\n };\n\n var EdgeList = {\n list: [],\n leftEnd: null,\n rightEnd: null,\n\n init: function() {\n EdgeList.leftEnd = EdgeList.createHalfEdge(null, \"l\");\n EdgeList.rightEnd = EdgeList.createHalfEdge(null, \"l\");\n EdgeList.leftEnd.r = EdgeList.rightEnd;\n EdgeList.rightEnd.l = EdgeList.leftEnd;\n EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);\n },\n\n createHalfEdge: function(edge, side) {\n return {\n edge: edge,\n side: side,\n vertex: null,\n \"l\": null,\n \"r\": null\n };\n },\n\n insert: function(lb, he) {\n he.l = lb;\n he.r = lb.r;\n lb.r.l = he;\n lb.r = he;\n },\n\n leftBound: function(p) {\n var he = EdgeList.leftEnd;\n do {\n he = he.r;\n } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));\n he = he.l;\n return he;\n },\n\n del: function(he) {\n he.l.r = he.r;\n he.r.l = he.l;\n he.edge = null;\n },\n\n right: function(he) {\n return he.r;\n },\n\n left: function(he) {\n return he.l;\n },\n\n leftRegion: function(he) {\n return he.edge == null\n ? Sites.bottomSite\n : he.edge.region[he.side];\n },\n\n rightRegion: function(he) {\n return he.edge == null\n ? Sites.bottomSite\n : he.edge.region[d3_voronoi_opposite[he.side]];\n }\n };\n\n var Geom = {\n\n bisect: function(s1, s2) {\n var newEdge = {\n region: {\"l\": s1, \"r\": s2},\n ep: {\"l\": null, \"r\": null}\n };\n\n var dx = s2.x - s1.x,\n dy = s2.y - s1.y,\n adx = dx > 0 ? dx : -dx,\n ady = dy > 0 ? dy : -dy;\n\n newEdge.c = s1.x * dx + s1.y * dy\n + (dx * dx + dy * dy) * .5;\n\n if (adx > ady) {\n newEdge.a = 1;\n newEdge.b = dy / dx;\n newEdge.c /= dx;\n } else {\n newEdge.b = 1;\n newEdge.a = dx / dy;\n newEdge.c /= dy;\n }\n\n return newEdge;\n },\n\n intersect: function(el1, el2) {\n var e1 = el1.edge,\n e2 = el2.edge;\n if (!e1 || !e2 || (e1.region.r == e2.region.r)) {\n return null;\n }\n var d = (e1.a * e2.b) - (e1.b * e2.a);\n if (Math.abs(d) < 1e-10) {\n return null;\n }\n var xint = (e1.c * e2.b - e2.c * e1.b) / d,\n yint = (e2.c * e1.a - e1.c * e2.a) / d,\n e1r = e1.region.r,\n e2r = e2.region.r,\n el,\n e;\n if ((e1r.y < e2r.y) ||\n (e1r.y == e2r.y && e1r.x < e2r.x)) {\n el = el1;\n e = e1;\n } else {\n el = el2;\n e = e2;\n }\n var rightOfSite = (xint >= e.region.r.x);\n if ((rightOfSite && (el.side === \"l\")) ||\n (!rightOfSite && (el.side === \"r\"))) {\n return null;\n }\n return {\n x: xint,\n y: yint\n };\n },\n\n rightOf: function(he, p) {\n var e = he.edge,\n topsite = e.region.r,\n rightOfSite = (p.x > topsite.x);\n\n if (rightOfSite && (he.side === \"l\")) {\n return 1;\n }\n if (!rightOfSite && (he.side === \"r\")) {\n return 0;\n }\n if (e.a === 1) {\n var dyp = p.y - topsite.y,\n dxp = p.x - topsite.x,\n fast = 0,\n above = 0;\n\n if ((!rightOfSite && (e.b < 0)) ||\n (rightOfSite && (e.b >= 0))) {\n above = fast = (dyp >= e.b * dxp);\n } else {\n above = ((p.x + p.y * e.b) > e.c);\n if (e.b < 0) {\n above = !above;\n }\n if (!above) {\n fast = 1;\n }\n }\n if (!fast) {\n var dxs = topsite.x - e.region.l.x;\n above = (e.b * (dxp * dxp - dyp * dyp)) <\n (dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b));\n\n if (e.b < 0) {\n above = !above;\n }\n }\n } else /* e.b == 1 */ {\n var yl = e.c - e.a * p.x,\n t1 = p.y - yl,\n t2 = p.x - topsite.x,\n t3 = yl - topsite.y;\n\n above = (t1 * t1) > (t2 * t2 + t3 * t3);\n }\n return he.side === \"l\" ? above : !above;\n },\n\n endPoint: function(edge, side, site) {\n edge.ep[side] = site;\n if (!edge.ep[d3_voronoi_opposite[side]]) return;\n callback(edge);\n },\n\n distance: function(s, t) {\n var dx = s.x - t.x,\n dy = s.y - t.y;\n return Math.sqrt(dx * dx + dy * dy);\n }\n };\n\n var EventQueue = {\n list: [],\n\n insert: function(he, site, offset) {\n he.vertex = site;\n he.ystar = site.y + offset;\n for (var i=0, list=EventQueue.list, l=list.length; i<l; i++) {\n var next = list[i];\n if (he.ystar > next.ystar ||\n (he.ystar == next.ystar &&\n site.x > next.vertex.x)) {\n continue;\n } else {\n break;\n }\n }\n list.splice(i, 0, he);\n },\n\n del: function(he) {\n for (var i=0, ls=EventQueue.list, l=ls.length; i<l && (ls[i] != he); ++i) {}\n ls.splice(i, 1);\n },\n\n empty: function() { return EventQueue.list.length === 0; },\n\n nextEvent: function(he) {\n for (var i=0, ls=EventQueue.list, l=ls.length; i<l; ++i) {\n if (ls[i] == he) return ls[i+1];\n }\n return null;\n },\n\n min: function() {\n var elem = EventQueue.list[0];\n return {\n x: elem.vertex.x,\n y: elem.ystar\n };\n },\n\n extractMin: function() {\n return EventQueue.list.shift();\n }\n };\n\n EdgeList.init();\n Sites.bottomSite = Sites.list.shift();\n\n var newSite = Sites.list.shift(), newIntStar;\n var lbnd, rbnd, llbnd, rrbnd, bisector;\n var bot, top, temp, p, v;\n var e, pm;\n\n while (true) {\n if (!EventQueue.empty()) {\n newIntStar = EventQueue.min();\n }\n if (newSite && (EventQueue.empty()\n || newSite.y < newIntStar.y\n || (newSite.y == newIntStar.y\n && newSite.x < newIntStar.x))) { //new site is smallest\n lbnd = EdgeList.leftBound(newSite);\n rbnd = EdgeList.right(lbnd);\n bot = EdgeList.rightRegion(lbnd);\n e = Geom.bisect(bot, newSite);\n bisector = EdgeList.createHalfEdge(e, \"l\");\n EdgeList.insert(lbnd, bisector);\n p = Geom.intersect(lbnd, bisector);\n if (p) {\n EventQueue.del(lbnd);\n EventQueue.insert(lbnd, p, Geom.distance(p, newSite));\n }\n lbnd = bisector;\n bisector = EdgeList.createHalfEdge(e, \"r\");\n EdgeList.insert(lbnd, bisector);\n p = Geom.intersect(bisector, rbnd);\n if (p) {\n EventQueue.insert(bisector, p, Geom.distance(p, newSite));\n }\n newSite = Sites.list.shift();\n } else if (!EventQueue.empty()) { //intersection is smallest\n lbnd = EventQueue.extractMin();\n llbnd = EdgeList.left(lbnd);\n rbnd = EdgeList.right(lbnd);\n rrbnd = EdgeList.right(rbnd);\n bot = EdgeList.leftRegion(lbnd);\n top = EdgeList.rightRegion(rbnd);\n v = lbnd.vertex;\n Geom.endPoint(lbnd.edge, lbnd.side, v);\n Geom.endPoint(rbnd.edge, rbnd.side, v);\n EdgeList.del(lbnd);\n EventQueue.del(rbnd);\n EdgeList.del(rbnd);\n pm = \"l\";\n if (bot.y > top.y) {\n temp = bot;\n bot = top;\n top = temp;\n pm = \"r\";\n }\n e = Geom.bisect(bot, top);\n bisector = EdgeList.createHalfEdge(e, pm);\n EdgeList.insert(llbnd, bisector);\n Geom.endPoint(e, d3_voronoi_opposite[pm], v);\n p = Geom.intersect(llbnd, bisector);\n if (p) {\n EventQueue.del(llbnd);\n EventQueue.insert(llbnd, p, Geom.distance(p, bot));\n }\n p = Geom.intersect(bisector, rrbnd);\n if (p) {\n EventQueue.insert(bisector, p, Geom.distance(p, bot));\n }\n } else {\n break;\n }\n }//end while\n\n for (lbnd = EdgeList.right(EdgeList.leftEnd);\n lbnd != EdgeList.rightEnd;\n lbnd = EdgeList.right(lbnd)) {\n callback(lbnd.edge);\n }\n}\n/**\n* @param vertices [[x1, y1], [x2, y2], \u2026]\n* @returns triangles [[[x1, y1], [x2, y2], [x3, y3]], \u2026]\n */\nd3.geom.delaunay = function(vertices) {\n var edges = vertices.map(function() { return []; }),\n triangles = [];\n\n // Use the Voronoi tessellation to determine Delaunay edges.\n d3_voronoi_tessellate(vertices, function(e) {\n edges[e.region.l.index].push(vertices[e.region.r.index]);\n });\n\n // Reconnect the edges into counterclockwise triangles.\n edges.forEach(function(edge, i) {\n var v = vertices[i],\n cx = v[0],\n cy = v[1];\n edge.forEach(function(v) {\n v.angle = Math.atan2(v[0] - cx, v[1] - cy);\n });\n edge.sort(function(a, b) {\n return a.angle - b.angle;\n });\n for (var j = 0, m = edge.length - 1; j < m; j++) {\n triangles.push([v, edge[j], edge[j + 1]]);\n }\n });\n\n return triangles;\n};\n// Constructs a new quadtree for the specified array of points. A quadtree is a\n// two-dimensional recursive spatial subdivision. This implementation uses\n// square partitions, dividing each square into four equally-sized squares. Each\n// point exists in a unique node; if multiple points are in the same position,\n// some points may be stored on internal nodes rather than leaf nodes. Quadtrees\n// can be used to accelerate various spatial operations, such as the Barnes-Hut\n// approximation for computing n-body forces, or collision detection.\nd3.geom.quadtree = function(points, x1, y1, x2, y2) {\n var p,\n i = -1,\n n = points.length;\n\n // Type conversion for deprecated API.\n if (n && isNaN(points[0].x)) points = points.map(d3_geom_quadtreePoint);\n\n // Allow bounds to be specified explicitly.\n if (arguments.length < 5) {\n if (arguments.length === 3) {\n y2 = x2 = y1;\n y1 = x1;\n } else {\n x1 = y1 = Infinity;\n x2 = y2 = -Infinity;\n\n // Compute bounds.\n while (++i < n) {\n p = points[i];\n if (p.x < x1) x1 = p.x;\n if (p.y < y1) y1 = p.y;\n if (p.x > x2) x2 = p.x;\n if (p.y > y2) y2 = p.y;\n }\n\n // Squarify the bounds.\n var dx = x2 - x1,\n dy = y2 - y1;\n if (dx > dy) y2 = y1 + dx;\n else x2 = x1 + dy;\n }\n }\n\n // Recursively inserts the specified point p at the node n or one of its\n // descendants. The bounds are defined by [x1, x2] and [y1, y2].\n function insert(n, p, x1, y1, x2, y2) {\n if (isNaN(p.x) || isNaN(p.y)) return; // ignore invalid points\n if (n.leaf) {\n var v = n.point;\n if (v) {\n // If the point at this leaf node is at the same position as the new\n // point we are adding, we leave the point associated with the\n // internal node while adding the new point to a child node. This\n // avoids infinite recursion.\n if ((Math.abs(v.x - p.x) + Math.abs(v.y - p.y)) < .01) {\n insertChild(n, p, x1, y1, x2, y2);\n } else {\n n.point = null;\n insertChild(n, v, x1, y1, x2, y2);\n insertChild(n, p, x1, y1, x2, y2);\n }\n } else {\n n.point = p;\n }\n } else {\n insertChild(n, p, x1, y1, x2, y2);\n }\n }\n\n // Recursively inserts the specified point p into a descendant of node n. The\n // bounds are defined by [x1, x2] and [y1, y2].\n function insertChild(n, p, x1, y1, x2, y2) {\n // Compute the split point, and the quadrant in which to insert p.\n var sx = (x1 + x2) * .5,\n sy = (y1 + y2) * .5,\n right = p.x >= sx,\n bottom = p.y >= sy,\n i = (bottom << 1) + right;\n\n // Recursively insert into the child node.\n n.leaf = false;\n n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());\n\n // Update the bounds as we recurse.\n if (right) x1 = sx; else x2 = sx;\n if (bottom) y1 = sy; else y2 = sy;\n insert(n, p, x1, y1, x2, y2);\n }\n\n // Create the root node.\n var root = d3_geom_quadtreeNode();\n\n root.add = function(p) {\n insert(root, p, x1, y1, x2, y2);\n };\n\n root.visit = function(f) {\n d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2);\n };\n\n // Insert all points.\n points.forEach(root.add);\n return root;\n};\n\nfunction d3_geom_quadtreeNode() {\n return {\n leaf: true,\n nodes: [],\n point: null\n };\n}\n\nfunction d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {\n if (!f(node, x1, y1, x2, y2)) {\n var sx = (x1 + x2) * .5,\n sy = (y1 + y2) * .5,\n children = node.nodes;\n if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);\n if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);\n if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);\n if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);\n }\n}\n\nfunction d3_geom_quadtreePoint(p) {\n return {\n x: p[0],\n y: p[1]\n };\n}\nd3.time = {};\n\nvar d3_time = Date;\n\nfunction d3_time_utc() {\n this._ = new Date(arguments.length > 1\n ? Date.UTC.apply(this, arguments)\n : arguments[0]);\n}\n\nd3_time_utc.prototype = {\n getDate: function() { return this._.getUTCDate(); },\n getDay: function() { return this._.getUTCDay(); },\n getFullYear: function() { return this._.getUTCFullYear(); },\n getHours: function() { return this._.getUTCHours(); },\n getMilliseconds: function() { return this._.getUTCMilliseconds(); },\n getMinutes: function() { return this._.getUTCMinutes(); },\n getMonth: function() { return this._.getUTCMonth(); },\n getSeconds: function() { return this._.getUTCSeconds(); },\n getTime: function() { return this._.getTime(); },\n getTimezoneOffset: function() { return 0; },\n valueOf: function() { return this._.valueOf(); },\n setDate: function() { d3_time_prototype.setUTCDate.apply(this._, arguments); },\n setDay: function() { d3_time_prototype.setUTCDay.apply(this._, arguments); },\n setFullYear: function() { d3_time_prototype.setUTCFullYear.apply(this._, arguments); },\n setHours: function() { d3_time_prototype.setUTCHours.apply(this._, arguments); },\n setMilliseconds: function() { d3_time_prototype.setUTCMilliseconds.apply(this._, arguments); },\n setMinutes: function() { d3_time_prototype.setUTCMinutes.apply(this._, arguments); },\n setMonth: function() { d3_time_prototype.setUTCMonth.apply(this._, arguments); },\n setSeconds: function() { d3_time_prototype.setUTCSeconds.apply(this._, arguments); },\n setTime: function() { d3_time_prototype.setTime.apply(this._, arguments); }\n};\n\nvar d3_time_prototype = Date.prototype;\nd3.time.format = function(template) {\n var n = template.length;\n\n function format(date) {\n var string = [],\n i = -1,\n j = 0,\n c,\n f;\n while (++i < n) {\n if (template.charCodeAt(i) == 37) {\n string.push(\n template.substring(j, i),\n (f = d3_time_formats[c = template.charAt(++i)])\n ? f(date) : c);\n j = i + 1;\n }\n }\n string.push(template.substring(j, i));\n return string.join(\"\");\n }\n\n format.parse = function(string) {\n var d = {y: 1900, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0},\n i = d3_time_parse(d, template, string, 0);\n if (i != string.length) return null;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n var date = new d3_time();\n date.setFullYear(d.y, d.m, d.d);\n date.setHours(d.H, d.M, d.S, d.L);\n return date;\n };\n\n format.toString = function() {\n return template;\n };\n\n return format;\n};\n\nfunction d3_time_parse(date, template, string, j) {\n var c,\n p,\n i = 0,\n n = template.length,\n m = string.length;\n while (i < n) {\n if (j >= m) return -1;\n c = template.charCodeAt(i++);\n if (c == 37) {\n p = d3_time_parsers[template.charAt(i++)];\n if (!p || ((j = p(date, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n return j;\n}\n\nvar d3_time_zfill2 = d3.format(\"02d\"),\n d3_time_zfill3 = d3.format(\"03d\"),\n d3_time_zfill4 = d3.format(\"04d\"),\n d3_time_sfill2 = d3.format(\"2d\");\n\nvar d3_time_formats = {\n a: function(d) { return d3_time_weekdays[d.getDay()].substring(0, 3); },\n A: function(d) { return d3_time_weekdays[d.getDay()]; },\n b: function(d) { return d3_time_months[d.getMonth()].substring(0, 3); },\n B: function(d) { return d3_time_months[d.getMonth()]; },\n c: d3.time.format(\"%a %b %e %H:%M:%S %Y\"),\n d: function(d) { return d3_time_zfill2(d.getDate()); },\n e: function(d) { return d3_time_sfill2(d.getDate()); },\n H: function(d) { return d3_time_zfill2(d.getHours()); },\n I: function(d) { return d3_time_zfill2(d.getHours() % 12 || 12); },\n j: function(d) { return d3_time_zfill3(1 + d3.time.dayOfYear(d)); },\n L: function(d) { return d3_time_zfill3(d.getMilliseconds()); },\n m: function(d) { return d3_time_zfill2(d.getMonth() + 1); },\n M: function(d) { return d3_time_zfill2(d.getMinutes()); },\n p: function(d) { return d.getHours() >= 12 ? \"PM\" : \"AM\"; },\n S: function(d) { return d3_time_zfill2(d.getSeconds()); },\n U: function(d) { return d3_time_zfill2(d3.time.sundayOfYear(d)); },\n w: function(d) { return d.getDay(); },\n W: function(d) { return d3_time_zfill2(d3.time.mondayOfYear(d)); },\n x: d3.time.format(\"%m/%d/%y\"),\n X: d3.time.format(\"%H:%M:%S\"),\n y: function(d) { return d3_time_zfill2(d.getFullYear() % 100); },\n Y: function(d) { return d3_time_zfill4(d.getFullYear() % 10000); },\n Z: d3_time_zone,\n \"%\": function(d) { return \"%\"; }\n};\n\nvar d3_time_parsers = {\n a: d3_time_parseWeekdayAbbrev,\n A: d3_time_parseWeekday,\n b: d3_time_parseMonthAbbrev,\n B: d3_time_parseMonth,\n c: d3_time_parseLocaleFull,\n d: d3_time_parseDay,\n e: d3_time_parseDay,\n H: d3_time_parseHour24,\n I: d3_time_parseHour24,\n // j: function(d, s, i) { /*TODO day of year [001,366] */ return i; },\n L: d3_time_parseMilliseconds,\n m: d3_time_parseMonthNumber,\n M: d3_time_parseMinutes,\n p: d3_time_parseAmPm,\n S: d3_time_parseSeconds,\n // U: function(d, s, i) { /*TODO week number (sunday) [00,53] */ return i; },\n // w: function(d, s, i) { /*TODO weekday [0,6] */ return i; },\n // W: function(d, s, i) { /*TODO week number (monday) [00,53] */ return i; },\n x: d3_time_parseLocaleDate,\n X: d3_time_parseLocaleTime,\n y: d3_time_parseYear,\n Y: d3_time_parseFullYear\n // ,\n // Z: function(d, s, i) { /*TODO time zone */ return i; },\n // \"%\": function(d, s, i) { /*TODO literal % */ return i; }\n};\n\n// Note: weekday is validated, but does not set the date.\nfunction d3_time_parseWeekdayAbbrev(date, string, i) {\n return d3_time_weekdayAbbrevRe.test(string.substring(i, i += 3)) ? i : -1;\n}\n\n// Note: weekday is validated, but does not set the date.\nfunction d3_time_parseWeekday(date, string, i) {\n d3_time_weekdayRe.lastIndex = 0;\n var n = d3_time_weekdayRe.exec(string.substring(i, i + 10));\n return n ? i += n[0].length : -1;\n}\n\nvar d3_time_weekdayAbbrevRe = /^(?:sun|mon|tue|wed|thu|fri|sat)/i,\n d3_time_weekdayRe = /^(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)/i;\n d3_time_weekdays = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n\nfunction d3_time_parseMonthAbbrev(date, string, i) {\n var n = d3_time_monthAbbrevLookup.get(string.substring(i, i += 3).toLowerCase());\n return n == null ? -1 : (date.m = n, i);\n}\n\nvar d3_time_monthAbbrevLookup = d3.map({\n jan: 0,\n feb: 1,\n mar: 2,\n apr: 3,\n may: 4,\n jun: 5,\n jul: 6,\n aug: 7,\n sep: 8,\n oct: 9,\n nov: 10,\n dec: 11\n});\n\nfunction d3_time_parseMonth(date, string, i) {\n d3_time_monthRe.lastIndex = 0;\n var n = d3_time_monthRe.exec(string.substring(i, i + 12));\n return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;\n}\n\nvar d3_time_monthRe = /^(?:January|February|March|April|May|June|July|August|September|October|November|December)/ig;\n\nvar d3_time_monthLookup = d3.map({\n january: 0,\n february: 1,\n march: 2,\n april: 3,\n may: 4,\n june: 5,\n july: 6,\n august: 7,\n september: 8,\n october: 9,\n november: 10,\n december: 11\n});\n\nvar d3_time_months = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nfunction d3_time_parseLocaleFull(date, string, i) {\n return d3_time_parse(date, d3_time_formats.c.toString(), string, i);\n}\n\nfunction d3_time_parseLocaleDate(date, string, i) {\n return d3_time_parse(date, d3_time_formats.x.toString(), string, i);\n}\n\nfunction d3_time_parseLocaleTime(date, string, i) {\n return d3_time_parse(date, d3_time_formats.X.toString(), string, i);\n}\n\nfunction d3_time_parseFullYear(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.substring(i, i + 4));\n return n ? (date.y = +n[0], i += n[0].length) : -1;\n}\n\nfunction d3_time_parseYear(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.substring(i, i + 2));\n return n ? (date.y = d3_time_century() + +n[0], i += n[0].length) : -1;\n}\n\nfunction d3_time_century() {\n return ~~(new Date().getFullYear() / 1000) * 1000;\n}\n\nfunction d3_time_parseMonthNumber(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.substring(i, i + 2));\n return n ? (date.m = n[0] - 1, i += n[0].length) : -1;\n}\n\nfunction d3_time_parseDay(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.substring(i, i + 2));\n return n ? (date.d = +n[0], i += n[0].length) : -1;\n}\n\n// Note: we don't validate that the hour is in the range [0,23] or [1,12].\nfunction d3_time_parseHour24(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.substring(i, i + 2));\n return n ? (date.H = +n[0], i += n[0].length) : -1;\n}\n\nfunction d3_time_parseMinutes(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.substring(i, i + 2));\n return n ? (date.M = +n[0], i += n[0].length) : -1;\n}\n\nfunction d3_time_parseSeconds(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.substring(i, i + 2));\n return n ? (date.S = +n[0], i += n[0].length) : -1;\n}\n\nfunction d3_time_parseMilliseconds(date, string, i) {\n d3_time_numberRe.lastIndex = 0;\n var n = d3_time_numberRe.exec(string.substring(i, i + 3));\n return n ? (date.L = +n[0], i += n[0].length) : -1;\n}\n\n// Note: we don't look at the next directive.\nvar d3_time_numberRe = /\\s*\\d+/;\n\nfunction d3_time_parseAmPm(date, string, i) {\n var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase());\n return n == null ? -1 : (date.p = n, i);\n}\n\nvar d3_time_amPmLookup = d3.map({\n am: 0,\n pm: 1\n});\n\n// TODO table of time zone offset names?\nfunction d3_time_zone(d) {\n var z = d.getTimezoneOffset(),\n zs = z > 0 ? \"-\" : \"+\",\n zh = ~~(Math.abs(z) / 60),\n zm = Math.abs(z) % 60;\n return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm);\n}\nd3.time.format.utc = function(template) {\n var local = d3.time.format(template);\n\n function format(date) {\n try {\n d3_time = d3_time_utc;\n var utc = new d3_time();\n utc._ = date;\n return local(utc);\n } finally {\n d3_time = Date;\n }\n }\n\n format.parse = function(string) {\n try {\n d3_time = d3_time_utc;\n var date = local.parse(string);\n return date && date._;\n } finally {\n d3_time = Date;\n }\n };\n\n format.toString = local.toString;\n\n return format;\n};\nvar d3_time_formatIso = d3.time.format.utc(\"%Y-%m-%dT%H:%M:%S.%LZ\");\n\nd3.time.format.iso = Date.prototype.toISOString ? d3_time_formatIsoNative : d3_time_formatIso;\n\nfunction d3_time_formatIsoNative(date) {\n return date.toISOString();\n}\n\nd3_time_formatIsoNative.parse = function(string) {\n return new Date(string);\n};\n\nd3_time_formatIsoNative.toString = d3_time_formatIso.toString;\nfunction d3_time_interval(local, step, number) {\n\n function round(date) {\n var d0 = local(date), d1 = offset(d0, 1);\n return date - d0 < d1 - date ? d0 : d1;\n }\n\n function ceil(date) {\n step(date = local(new d3_time(date - 1)), 1);\n return date;\n }\n\n function offset(date, k) {\n step(date = new d3_time(+date), k);\n return date;\n }\n\n function range(t0, t1, dt) {\n var time = ceil(t0), times = [];\n if (dt > 1) {\n while (time < t1) {\n if (!(number(time) % dt)) times.push(new Date(+time));\n step(time, 1);\n }\n } else {\n while (time < t1) times.push(new Date(+time)), step(time, 1);\n }\n return times;\n }\n\n function range_utc(t0, t1, dt) {\n try {\n d3_time = d3_time_utc;\n var utc = new d3_time_utc();\n utc._ = t0;\n return range(utc, t1, dt);\n } finally {\n d3_time = Date;\n }\n }\n\n local.floor = local;\n local.round = round;\n local.ceil = ceil;\n local.offset = offset;\n local.range = range;\n\n var utc = local.utc = d3_time_interval_utc(local);\n utc.floor = utc;\n utc.round = d3_time_interval_utc(round);\n utc.ceil = d3_time_interval_utc(ceil);\n utc.offset = d3_time_interval_utc(offset);\n utc.range = range_utc;\n\n return local;\n}\n\nfunction d3_time_interval_utc(method) {\n return function(date, k) {\n try {\n d3_time = d3_time_utc;\n var utc = new d3_time_utc();\n utc._ = date;\n return method(utc, k)._;\n } finally {\n d3_time = Date;\n }\n };\n}\nd3.time.second = d3_time_interval(function(date) {\n return new d3_time(Math.floor(date / 1e3) * 1e3);\n}, function(date, offset) {\n date.setTime(date.getTime() + Math.floor(offset) * 1e3); // DST breaks setSeconds\n}, function(date) {\n return date.getSeconds();\n});\n\nd3.time.seconds = d3.time.second.range;\nd3.time.seconds.utc = d3.time.second.utc.range;\nd3.time.minute = d3_time_interval(function(date) {\n return new d3_time(Math.floor(date / 6e4) * 6e4);\n}, function(date, offset) {\n date.setTime(date.getTime() + Math.floor(offset) * 6e4); // DST breaks setMinutes\n}, function(date) {\n return date.getMinutes();\n});\n\nd3.time.minutes = d3.time.minute.range;\nd3.time.minutes.utc = d3.time.minute.utc.range;\nd3.time.hour = d3_time_interval(function(date) {\n var timezone = date.getTimezoneOffset() / 60;\n return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);\n}, function(date, offset) {\n date.setTime(date.getTime() + Math.floor(offset) * 36e5); // DST breaks setHours\n}, function(date) {\n return date.getHours();\n});\n\nd3.time.hours = d3.time.hour.range;\nd3.time.hours.utc = d3.time.hour.utc.range;\nd3.time.day = d3_time_interval(function(date) {\n return new d3_time(date.getFullYear(), date.getMonth(), date.getDate());\n}, function(date, offset) {\n date.setDate(date.getDate() + offset);\n}, function(date) {\n return date.getDate() - 1;\n});\n\nd3.time.days = d3.time.day.range;\nd3.time.days.utc = d3.time.day.utc.range;\n\nd3.time.dayOfYear = function(date) {\n var year = d3.time.year(date);\n return Math.floor((date - year) / 864e5 - (date.getTimezoneOffset() - year.getTimezoneOffset()) / 1440);\n};\nd3_time_weekdays.forEach(function(day, i) {\n day = day.toLowerCase();\n i = 7 - i;\n\n var interval = d3.time[day] = d3_time_interval(function(date) {\n (date = d3.time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);\n return date;\n }, function(date, offset) {\n date.setDate(date.getDate() + Math.floor(offset) * 7);\n }, function(date) {\n var day = d3.time.year(date).getDay();\n return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);\n });\n\n d3.time[day + \"s\"] = interval.range;\n d3.time[day + \"s\"].utc = interval.utc.range;\n\n d3.time[day + \"OfYear\"] = function(date) {\n var day = d3.time.year(date).getDay();\n return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7);\n };\n});\n\nd3.time.week = d3.time.sunday;\nd3.time.weeks = d3.time.sunday.range;\nd3.time.weeks.utc = d3.time.sunday.utc.range;\nd3.time.weekOfYear = d3.time.sundayOfYear;\nd3.time.month = d3_time_interval(function(date) {\n return new d3_time(date.getFullYear(), date.getMonth(), 1);\n}, function(date, offset) {\n date.setMonth(date.getMonth() + offset);\n}, function(date) {\n return date.getMonth();\n});\n\nd3.time.months = d3.time.month.range;\nd3.time.months.utc = d3.time.month.utc.range;\nd3.time.year = d3_time_interval(function(date) {\n return new d3_time(date.getFullYear(), 0, 1);\n}, function(date, offset) {\n date.setFullYear(date.getFullYear() + offset);\n}, function(date) {\n return date.getFullYear();\n});\n\nd3.time.years = d3.time.year.range;\nd3.time.years.utc = d3.time.year.utc.range;\nfunction d3_time_scale(linear, methods, format) {\n\n function scale(x) {\n return linear(x);\n }\n\n scale.invert = function(x) {\n return d3_time_scaleDate(linear.invert(x));\n };\n\n scale.domain = function(x) {\n if (!arguments.length) return linear.domain().map(d3_time_scaleDate);\n linear.domain(x);\n return scale;\n };\n\n scale.nice = function(m) {\n var extent = d3_time_scaleExtent(scale.domain());\n return scale.domain([m.floor(extent[0]), m.ceil(extent[1])]);\n };\n\n scale.ticks = function(m, k) {\n var extent = d3_time_scaleExtent(scale.domain());\n if (typeof m !== \"function\") {\n var span = extent[1] - extent[0],\n target = span / m,\n i = d3.bisect(d3_time_scaleSteps, target);\n if (i == d3_time_scaleSteps.length) return methods.year(extent, m);\n if (!i) return linear.ticks(m).map(d3_time_scaleDate);\n if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i;\n m = methods[i];\n k = m[1];\n m = m[0].range;\n }\n return m(extent[0], new Date(+extent[1] + 1), k); // inclusive upper bound\n };\n\n scale.tickFormat = function() {\n return format;\n };\n\n scale.copy = function() {\n return d3_time_scale(linear.copy(), methods, format);\n };\n\n // TOOD expose d3_scale_linear_rebind?\n return d3.rebind(scale, linear, \"range\", \"rangeRound\", \"interpolate\", \"clamp\");\n}\n\n// TODO expose d3_scaleExtent?\nfunction d3_time_scaleExtent(domain) {\n var start = domain[0], stop = domain[domain.length - 1];\n return start < stop ? [start, stop] : [stop, start];\n}\n\nfunction d3_time_scaleDate(t) {\n return new Date(t);\n}\n\nfunction d3_time_scaleFormat(formats) {\n return function(date) {\n var i = formats.length - 1, f = formats[i];\n while (!f[1](date)) f = formats[--i];\n return f[0](date);\n };\n}\n\nfunction d3_time_scaleSetYear(y) {\n var d = new Date(y, 0, 1);\n d.setFullYear(y); // Y2K fail\n return d;\n}\n\nfunction d3_time_scaleGetYear(d) {\n var y = d.getFullYear(),\n d0 = d3_time_scaleSetYear(y),\n d1 = d3_time_scaleSetYear(y + 1);\n return y + (d - d0) / (d1 - d0);\n}\n\nvar d3_time_scaleSteps = [\n 1e3, // 1-second\n 5e3, // 5-second\n 15e3, // 15-second\n 3e4, // 30-second\n 6e4, // 1-minute\n 3e5, // 5-minute\n 9e5, // 15-minute\n 18e5, // 30-minute\n 36e5, // 1-hour\n 108e5, // 3-hour\n 216e5, // 6-hour\n 432e5, // 12-hour\n 864e5, // 1-day\n 1728e5, // 2-day\n 6048e5, // 1-week\n 2592e6, // 1-month\n 7776e6, // 3-month\n 31536e6 // 1-year\n];\n\nvar d3_time_scaleLocalMethods = [\n [d3.time.second, 1],\n [d3.time.second, 5],\n [d3.time.second, 15],\n [d3.time.second, 30],\n [d3.time.minute, 1],\n [d3.time.minute, 5],\n [d3.time.minute, 15],\n [d3.time.minute, 30],\n [d3.time.hour, 1],\n [d3.time.hour, 3],\n [d3.time.hour, 6],\n [d3.time.hour, 12],\n [d3.time.day, 1],\n [d3.time.day, 2],\n [d3.time.week, 1],\n [d3.time.month, 1],\n [d3.time.month, 3],\n [d3.time.year, 1]\n];\n\nvar d3_time_scaleLocalFormats = [\n [d3.time.format(\"%Y\"), function(d) { return true; }],\n [d3.time.format(\"%B\"), function(d) { return d.getMonth(); }],\n [d3.time.format(\"%b %d\"), function(d) { return d.getDate() != 1; }],\n [d3.time.format(\"%a %d\"), function(d) { return d.getDay() && d.getDate() != 1; }],\n [d3.time.format(\"%I %p\"), function(d) { return d.getHours(); }],\n [d3.time.format(\"%I:%M\"), function(d) { return d.getMinutes(); }],\n [d3.time.format(\":%S\"), function(d) { return d.getSeconds(); }],\n [d3.time.format(\".%L\"), function(d) { return d.getMilliseconds(); }]\n];\n\nvar d3_time_scaleLinear = d3.scale.linear(),\n d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);\n\nd3_time_scaleLocalMethods.year = function(extent, m) {\n return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear);\n};\n\nd3.time.scale = function() {\n return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);\n};\nvar d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) {\n return [m[0].utc, m[1]];\n});\n\nvar d3_time_scaleUTCFormats = [\n [d3.time.format.utc(\"%Y\"), function(d) { return true; }],\n [d3.time.format.utc(\"%B\"), function(d) { return d.getUTCMonth(); }],\n [d3.time.format.utc(\"%b %d\"), function(d) { return d.getUTCDate() != 1; }],\n [d3.time.format.utc(\"%a %d\"), function(d) { return d.getUTCDay() && d.getUTCDate() != 1; }],\n [d3.time.format.utc(\"%I %p\"), function(d) { return d.getUTCHours(); }],\n [d3.time.format.utc(\"%I:%M\"), function(d) { return d.getUTCMinutes(); }],\n [d3.time.format.utc(\":%S\"), function(d) { return d.getUTCSeconds(); }],\n [d3.time.format.utc(\".%L\"), function(d) { return d.getUTCMilliseconds(); }]\n];\n\nvar d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);\n\nfunction d3_time_scaleUTCSetYear(y) {\n var d = new Date(Date.UTC(y, 0, 1));\n d.setUTCFullYear(y); // Y2K fail\n return d;\n}\n\nfunction d3_time_scaleUTCGetYear(d) {\n var y = d.getUTCFullYear(),\n d0 = d3_time_scaleUTCSetYear(y),\n d1 = d3_time_scaleUTCSetYear(y + 1);\n return y + (d - d0) / (d1 - d0);\n}\n\nd3_time_scaleUTCMethods.year = function(extent, m) {\n return d3_time_scaleLinear.domain(extent.map(d3_time_scaleUTCGetYear)).ticks(m).map(d3_time_scaleUTCSetYear);\n};\n\nd3.time.scale.utc = function() {\n return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);\n};\n})();\n\n/*! jQuery v1.7.2 jquery.com | jquery.org/license */\nif (!window.jQuery){\n(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f(\"<\"+a+\">\").appendTo(b),e=d.css(\"display\");d.remove();if(e===\"none\"||e===\"\"){ck||(ck=c.createElement(\"iframe\"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?\"<!doctype html>\":\"\")+\"<html><body>\"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,\"display\"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h==\"string\"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k===\"*\")k=l;else if(l!==\"*\"&&l!==k){m=l+\" \"+k,n=e[m]||e[\"* \"+k];if(!n){p=b;for(o in e){j=o.split(\" \");if(j[0]===l||j[0]===\"*\"){p=e[j[1]+\" \"+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error(\"No conversion from \"+m.replace(\" \",\" to \")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]===\"*\")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader(\"content-type\"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+\" \"+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+\"[\"+(typeof e==\"object\"?b:\"\")+\"]\",e,c,d)});else if(!c&&f.type(b)===\"object\")for(var e in b)b_(a+\"[\"+e+\"]\",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==\"string\"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g[\"*\"]&&(l=bZ(a,c,d,e,\"*\",g));return l}function bY(a){return function(b,c){typeof b!=\"string\"&&(c=b,b=\"*\");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\\+/.test(h),j&&(h=h.substr(1)||\"*\"),i=a[h]=a[h]||[],i[j?\"unshift\":\"push\"](c)}}}function bB(a,b,c){var d=b===\"width\"?a.offsetWidth:a.offsetHeight,e=b===\"width\"?1:0,g=4;if(d>0){if(c!==\"border\")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,\"padding\"+bx[e]))||0),c===\"margin\"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,\"border\"+bx[e]+\"Width\"))||0;return d+\"px\"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,\"padding\"+bx[e]))||0,c!==\"padding\"&&(d+=parseFloat(f.css(a,\"border\"+bx[e]+\"Width\"))||0),c===\"margin\"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+\"px\"}function bo(a){var b=c.createElement(\"div\");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||\"\").toLowerCase();b===\"input\"?bm(a):b!==\"script\"&&typeof a.getElementsByTagName!=\"undefined\"&&f.grep(a.getElementsByTagName(\"input\"),bm)}function bm(a){if(a.type===\"checkbox\"||a.type===\"radio\")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!=\"undefined\"?a.getElementsByTagName(\"*\"):typeof a.querySelectorAll!=\"undefined\"?a.querySelectorAll(\"*\"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c===\"object\"?b.outerHTML=a.outerHTML:c!==\"input\"||a.type!==\"checkbox\"&&a.type!==\"radio\"?c===\"option\"?b.selected=a.defaultSelected:c===\"input\"||c===\"textarea\"?b.defaultValue=a.defaultValue:c===\"script\"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute(\"_submit_attached\"),b.removeAttribute(\"_change_attached\"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,\"table\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}function U(a){var b=V.split(\"|\"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b==\"string\"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+\"defer\",e=b+\"queue\",g=b+\"mark\",h=f._data(a,d);h&&(c===\"queue\"||!f._data(a,e))&&(c===\"mark\"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b===\"data\"&&f.isEmptyObject(a[b]))continue;if(b!==\"toJSON\")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e=\"data-\"+c.replace(k,\"-$1\").toLowerCase();d=a.getAttribute(e);if(typeof d==\"string\"){try{d=d===\"true\"?!0:d===\"false\"?!1:d===\"null\"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll(\"left\")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]*)$)/,j=/\\S/,k=/^\\s+/,l=/\\s+$/,m=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,n=/^[\\],:{}\\s]*$/,o=/\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,q=/(?:^|:|,)(?:\\s*\\[)+/g,r=/(webkit)[ \\/]([\\w.]+)/,s=/(opera)(?:.*version)?[ \\/]([\\w.]+)/,t=/(msie) ([\\w.]+)/,u=/(mozilla)(?:.*? rv:([\\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+\"\").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a===\"body\"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a==\"string\"){a.charAt(0)!==\"<\"||a.charAt(a.length-1)!==\">\"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:\"\",jquery:\"1.7.2\",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b===\"find\"?d.selector=this.selector+(this.selector?\" \":\"\")+c:b&&(d.selector=this.selector+\".\"+b+\"(\"+c+\")\");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),\"slice\",F.call(arguments).join(\",\"))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==\"boolean\"&&(l=i,i=arguments[1]||{},j=2),typeof i!=\"object\"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger(\"ready\").off(\"ready\")}},bindReady:function(){if(!A){A=e.Callbacks(\"once memory\");if(c.readyState===\"complete\")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener(\"DOMContentLoaded\",B,!1),a.addEventListener(\"load\",e.ready,!1);else if(c.attachEvent){c.attachEvent(\"onreadystatechange\",B),a.attachEvent(\"onload\",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)===\"function\"},isArray:Array.isArray||function(a){return e.type(a)===\"array\"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||\"object\"},isPlainObject:function(a){if(!a||e.type(a)!==\"object\"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,\"constructor\")&&!D.call(a.constructor.prototype,\"isPrototypeOf\"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!=\"string\"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,\"@\").replace(p,\"]\").replace(q,\"\")))return(new Function(\"return \"+b))();e.error(\"Invalid JSON: \"+b)},parseXML:function(c){if(typeof c!=\"string\"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,\"text/xml\")):(d=new ActiveXObject(\"Microsoft.XMLDOM\"),d.async=\"false\",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName(\"parsererror\").length)&&e.error(\"Invalid XML: \"+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,\"ms-\").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?\"\":G.call(a)}:function(a){return a==null?\"\":(a+\"\").replace(k,\"\").replace(l,\"\")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d===\"string\"||d===\"function\"||d===\"regexp\"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==\"number\")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j==\"number\"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c==\"string\"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d==\"object\"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf(\"compatible\")<0&&u.exec(a)||[];return{browser:b[1]||\"\",version:b[2]||\"0\"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each(\"Boolean Number String Function Array Date RegExp Object\".split(\" \"),function(a,b){I[\"[object \"+b+\"]\"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(\"\u00a0\")&&(k=/^[\\s\\xA0]+/,l=/[\\s\\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener(\"DOMContentLoaded\",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState===\"complete\"&&(c.detachEvent(\"onreadystatechange\",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h===\"array\"?n(g):h===\"function\"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks(\"once memory\"),c=f.Callbacks(\"once memory\"),d=f.Callbacks(\"memory\"),e=\"pending\",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,\"resolve\"],fail:[b,\"reject\"],progress:[c,\"notify\"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+\"With\"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+\"With\"]=g[j].fireWith;i.done(function(){e=\"resolved\"},c.disable,d.lock).fail(function(){e=\"rejected\"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement(\"div\"),q=c.documentElement;p.setAttribute(\"className\",\"t\"),p.innerHTML=\" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>\",d=p.getElementsByTagName(\"*\"),e=p.getElementsByTagName(\"a\")[0];if(!d||!d.length||!e)return{};g=c.createElement(\"select\"),h=g.appendChild(c.createElement(\"option\")),i=p.getElementsByTagName(\"input\")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName(\"tbody\").length,htmlSerialize:!!p.getElementsByTagName(\"link\").length,style:/top/.test(e.getAttribute(\"style\")),hrefNormalized:e.getAttribute(\"href\")===\"/a\",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value===\"on\",optSelected:h.selected,getSetAttribute:p.className!==\"t\",enctype:!!c.createElement(\"form\").enctype,html5Clone:c.createElement(\"nav\").cloneNode(!0).outerHTML!==\"<:nav></:nav>\",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode===\"CSS1Compat\",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent(\"onclick\",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent(\"onclick\")),i=c.createElement(\"input\"),i.value=\"t\",i.setAttribute(\"type\",\"radio\"),b.radioValue=i.value===\"t\",i.setAttribute(\"checked\",\"checked\"),i.setAttribute(\"name\",\"t\"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m=\"on\"+n,o=m in p,o||(p.setAttribute(m,\"return;\"),o=typeof p[m]==\"function\"),b[n+\"Bubbles\"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName(\"body\")[0];!u||(m=1,t=\"padding:0;margin:0;border:\",r=\"position:absolute;top:0;left:0;width:1px;height:1px;\",s=t+\"0;visibility:hidden;\",n=\"style='\"+r+t+\"5px solid #000;\",q=\"<div \"+n+\"display:block;'><div style='\"+t+\"0;display:block;overflow:hidden;'></div></div>\"+\"<table \"+n+\"' cellpadding='0' cellspacing='0'>\"+\"<tr><td></td></tr></table>\",d=c.createElement(\"div\"),d.style.cssText=s+\"width:0;height:0;position:static;top:0;margin-top:\"+m+\"px\",u.insertBefore(d,u.firstChild),p=c.createElement(\"div\"),d.appendChild(p),p.innerHTML=\"<table><tr><td style='\"+t+\"0;display:none'></td><td>t</td></tr></table>\",k=p.getElementsByTagName(\"td\"),o=k[0].offsetHeight===0,k[0].style.display=\"\",k[1].style.display=\"none\",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML=\"\",l=c.createElement(\"div\"),l.style.width=\"0\",l.style.marginRight=\"0\",p.style.width=\"2px\",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!=\"undefined\"&&(p.innerHTML=\"\",p.style.width=p.style.padding=\"1px\",p.style.border=0,p.style.overflow=\"hidden\",p.style.display=\"inline\",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display=\"block\",p.style.overflow=\"visible\",p.innerHTML=\"<div style='width:5px;'></div>\",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position=\"fixed\",g.style.top=\"20px\",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top=\"\",e.style.overflow=\"hidden\",e.style.position=\"relative\",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop=\"1%\",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!==\"1%\"),typeof d.style.zoom!=\"undefined\"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\\{.*\\}|\\[.*\\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:\"jQuery\"+(f.fn.jquery+Math.random()).replace(/\\D/g,\"\"),noData:{embed:!0,object:\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c==\"string\",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c===\"events\";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c==\"object\"||typeof c==\"function\")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(\" \")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute(\"classid\")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,\"parsedAttrs\")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf(\"data-\")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,\"parsedAttrs\",!0)}}return m}if(typeof a==\"object\")return this.each(function(){f.data(this,a)});d=a.split(\".\",2),d[1]=d[1]?\".\"+d[1]:\"\",e=d[1]+\"!\";return f.access(this,function(c){if(c===b){m=this.triggerHandler(\"getData\"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler(\"setData\"+e,d),f.data(this,a,c),b.triggerHandler(\"changeData\"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||\"fx\")+\"mark\",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||\"fx\";var d=c+\"mark\",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,\"mark\"))}},queue:function(a,b,c){var d;if(a){b=(b||\"fx\")+\"queue\",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||\"fx\";var c=f.queue(a,b),d=c.shift(),e={};d===\"inprogress\"&&(d=c.shift()),d&&(b===\"fx\"&&c.unshift(\"inprogress\"),f._data(a,b+\".run\",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+\"queue \"+b+\".run\",!0),n(a,b,\"queue\"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!=\"string\"&&(c=a,a=\"fx\",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a===\"fx\"&&b[0]!==\"inprogress\"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||\"fx\";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||\"fx\",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!=\"string\"&&(c=a,a=b),a=a||\"fx\";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+\"defer\",j=a+\"queue\",k=a+\"mark\",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks(\"once memory\"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\\n\\t\\r]/g,p=/\\s+/,q=/\\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a==\"string\"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=\" \"+e.className+\" \";for(h=0,i=b.length;h<i;h++)~g.indexOf(\" \"+b[h]+\" \")||(g+=b[h]+\" \");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a==\"string\"||a===b){c=(a||\"\").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(\" \"+g.className+\" \").replace(o,\" \");for(i=0,j=c.length;i<j;i++)h=h.replace(\" \"+c[i]+\" \",\" \");g.className=f.trim(h)}else g.className=\"\"}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b==\"boolean\";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c===\"string\"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?\"addClass\":\"removeClass\"](e)}else if(c===\"undefined\"||c===\"boolean\")this.className&&f._data(this,\"__className__\",this.className),this.className=this.className||a===!1?\"\":f._data(this,\"__className__\")||\"\"})},hasClass:function(a){var b=\" \"+a+\" \",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(\" \"+this[c].className+\" \").replace(o,\" \").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h=\"\":typeof h==\"number\"?h+=\"\":f.isArray(h)&&(h=f.map(h,function(a){return a==null?\"\":a+\"\"})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!(\"set\"in c)||c.set(this,h,\"value\")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&\"get\"in c&&(d=c.get(g,\"value\"))!==b)return d;d=g.value;return typeof d==\"string\"?d.replace(q,\"\"):d==null?\"\":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type===\"select-one\";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute(\"disabled\")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,\"optgroup\"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find(\"option\").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute==\"undefined\")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&\"set\"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,\"\"+d);return d}if(h&&\"get\"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,\"\"),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error(\"type property can't be changed\");else if(!f.support.radioValue&&b===\"radio\"&&f.nodeName(a,\"input\")){var c=a.value;a.setAttribute(\"type\",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,\"button\"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,\"button\"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:\"tabIndex\",readonly:\"readOnly\",\"for\":\"htmlFor\",\"class\":\"className\",maxlength:\"maxLength\",cellspacing:\"cellSpacing\",cellpadding:\"cellPadding\",rowspan:\"rowSpan\",colspan:\"colSpan\",usemap:\"useMap\",frameborder:\"frameBorder\",contenteditable:\"contentEditable\"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&\"set\"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&\"get\"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode(\"tabindex\");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!=\"boolean\"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!==\"\":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+\"\"}},f.attrHooks.tabindex.set=w.set,f.each([\"width\",\"height\"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===\"\"){a.setAttribute(b,\"auto\");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===\"\"&&(b=\"false\"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each([\"href\",\"src\",\"width\",\"height\"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=\"\"+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype=\"encoding\"),f.support.checkOn||f.each([\"radio\",\"checkbox\"],function(){f.valHooks[this]={get:function(a){return a.getAttribute(\"value\")===null?\"on\":a.value}}}),f.each([\"radio\",\"checkbox\"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\\.]*)?(?:\\.(.+))?$/,B=/(?:^|\\s)hover(\\.\\S+)?\\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\\w*)(?:#([\\w\\-]+))?(?:\\.([\\w\\-]+))?$/,G=function(\na){var b=F.exec(a);b&&(b[1]=(b[1]||\"\").toLowerCase(),b[3]=b[3]&&new RegExp(\"(?:^|\\\\s)\"+b[3]+\"(?:\\\\s|$)\"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c[\"class\"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,\"mouseenter$1 mouseleave$1\")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!=\"undefined\"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(\" \");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||\"\").split(\".\").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(\".\")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent(\"on\"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||\"\")).split(\" \");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp(\"(^|\\\\.)\"+l.split(\".\").sort().join(\"\\\\.(?:.*\\\\.)?\")+\"(\\\\.|$)\"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d===\"**\"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,[\"events\",\"handle\"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf(\"!\")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(\".\")>=0&&(i=h.split(\".\"),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c==\"object\"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join(\".\"),c.namespace_re=c.namespace?new RegExp(\"(^|\\\\.)\"+i.join(\"\\\\.(?:.*\\\\.)?\")+\"(\\\\.|$)\"):null,o=h.indexOf(\":\")<0?\"on\"+h:\"\";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,\"events\")||{})[c.type]&&f._data(m,\"handle\"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!==\"click\"||!f.nodeName(e,\"a\"))&&f.acceptData(e)&&o&&e[h]&&(h!==\"focus\"&&h!==\"blur\"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,\"events\")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!==\"click\")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:\"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),fixHooks:{},keyHooks:{props:\"char charCode key keyCode\".split(\" \"),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:\"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:\"focusin\"},blur:{delegateType:\"focusout\"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent(\"on\"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,\"form\"))return!1;f.event.add(this,\"click._submit keypress._submit\",function(a){var c=a.target,d=f.nodeName(c,\"input\")||f.nodeName(c,\"button\")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,\"submit._submit\",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate(\"submit\",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,\"form\"))return!1;f.event.remove(this,\"._submit\")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type===\"checkbox\"||this.type===\"radio\")f.event.add(this,\"propertychange._change\",function(a){a.originalEvent.propertyName===\"checked\"&&(this._just_changed=!0)}),f.event.add(this,\"click._change\",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate(\"change\",this,a,!0))});return!1}f.event.add(this,\"beforeactivate._change\",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,\"change._change\",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate(\"change\",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!==\"radio\"&&b.type!==\"checkbox\")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,\"._change\");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:\"focusin\",blur:\"focusout\"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a==\"object\"){typeof c!=\"string\"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c==\"string\"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+\".\"+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a==\"object\"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c==\"function\")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||\"**\",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,\"**\"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,\"lastToggle\"+a.guid)||0)%d;f._data(this,\"lastToggle\"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!=\"string\"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^\\[\\]]*\\]|['\"][^'\"]*['\"]|[^\\[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g,d=\"sizcache\"+(Math.random()+\"\").replace(\".\",\"\"),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\\\/g,k=/\\r\\n/g,l=/\\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=\"string\")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(\"\"),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]===\"~\"||w[0]===\"+\")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q=\"\",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)===\"[object Array]\")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!==\"\\\\\"){g[1]=(g[1]||\"\").replace(j,\"\"),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],\"\");break}}}}d||(d=typeof b.getElementsByTagName!=\"undefined\"?b.getElementsByTagName(\"*\"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)===\"\\\\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],\"\");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error(\"Syntax error, unrecognized expression: \"+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e=\"\";if(d){if(d===1||d===9||d===11){if(typeof a.textContent==\"string\")return a.textContent;if(typeof a.innerText==\"string\")return a.innerText.replace(k,\"\");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:[\"ID\",\"NAME\",\"TAG\"],match:{ID:/#((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,CLASS:/\\.((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/,NAME:/\\[name=['\"]*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)['\"]*\\]/,ATTR:/\\[\\s*((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)\\s*(?:(\\S?=)\\s*(?:(['\"])(.*?)\\3|(#?(?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)*)|)|)\\s*\\]/,TAG:/^((?:[\\w\\u00c0-\\uFFFF\\*\\-]|\\\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\\(\\s*(even|odd|(?:[+\\-]?\\d+|(?:[+\\-]?\\d*)?n\\s*(?:[+\\-]\\s*\\d+)?))\\s*\\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^\\-]|$)/,PSEUDO:/:((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)(?:\\((['\"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?/},leftMatch:{},attrMap:{\"class\":\"className\",\"for\":\"htmlFor\"},attrHandle:{href:function(a){return a.getAttribute(\"href\")},type:function(a){return a.getAttribute(\"type\")}},relative:{\"+\":function(a,b){var c=typeof b==\"string\",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},\">\":function(a,b){var c,d=typeof b==\"string\",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},\"\":function(a,b,c){var d,f=e++,g=x;typeof b==\"string\"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g(\"parentNode\",b,f,a,d,c)},\"~\":function(a,b,c){var d,f=e++,g=x;typeof b==\"string\"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g(\"previousSibling\",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=\"undefined\"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=\"undefined\"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute(\"name\")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=\"undefined\")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=\" \"+a[1].replace(j,\"\")+\" \";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(\" \"+h.className+\" \").replace(/[\\t\\n\\r]/g,\" \").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,\"\")},TAG:function(a,b){return a[1].replace(j,\"\").toLowerCase()},CHILD:function(a){if(a[1]===\"nth\"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\\+|\\s*/g,\"\");var b=/(-?)(\\d*)(?:n([+\\-]?\\d*))?/.exec(a[2]===\"even\"&&\"2n\"||a[2]===\"odd\"&&\"2n+1\"||!/\\D/.test(a[2])&&\"0n+\"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,\"\");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||\"\").replace(j,\"\"),a[2]===\"~=\"&&(a[4]=\" \"+a[4]+\" \");return a},PSEUDO:function(b,c,d,e,f){if(b[1]===\"not\")if((a.exec(b[3])||\"\").length>1||/^\\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!==\"hidden\"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute(\"type\"),c=a.type;return a.nodeName.toLowerCase()===\"input\"&&\"text\"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()===\"input\"&&\"radio\"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()===\"input\"&&\"checkbox\"===a.type},file:function(a){return a.nodeName.toLowerCase()===\"input\"&&\"file\"===a.type},password:function(a){return a.nodeName.toLowerCase()===\"input\"&&\"password\"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b===\"input\"||b===\"button\")&&\"submit\"===a.type},image:function(a){return a.nodeName.toLowerCase()===\"input\"&&\"image\"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b===\"input\"||b===\"button\")&&\"reset\"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b===\"input\"&&\"button\"===a.type||b===\"button\"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e===\"contains\")return(a.textContent||a.innerText||n([a])||\"\").indexOf(b[3])>=0;if(e===\"not\"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case\"only\":case\"first\":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k===\"first\")return!0;l=a;case\"last\":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case\"nth\":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute(\"id\")===b},TAG:function(a,b){return b===\"*\"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(\" \"+(a.className||a.getAttribute(\"class\"))+\" \").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+\"\",f=b[2],g=b[4];return d==null?f===\"!=\":!f&&m.attr?d!=null:f===\"=\"?e===g:f===\"*=\"?e.indexOf(g)>=0:f===\"~=\"?(\" \"+e+\" \").indexOf(g)>=0:g?f===\"!=\"?e!==g:f===\"^=\"?e.indexOf(g)===0:f===\"$=\"?e.substr(e.length-g.length)===g:f===\"|=\"?e===g||e.substr(0,g.length+1)===g+\"-\":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return\"\\\\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\\[]*\\])(?![^\\(]*\\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\\r|\\n)*?)/.source+o.match[r].source.replace(/\\\\(\\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)===\"[object Array]\")Array.prototype.push.apply(d,a);else if(typeof a.length==\"number\")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement(\"div\"),d=\"script\"+(new Date).getTime(),e=c.documentElement;a.innerHTML=\"<a name='\"+d+\"'/>\",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!=\"undefined\"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=\"undefined\"&&e.getAttributeNode(\"id\").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=\"undefined\"&&a.getAttributeNode(\"id\");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement(\"div\");a.appendChild(c.createComment(\"\")),a.getElementsByTagName(\"*\").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]===\"*\"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=\"<a href='#'></a>\",a.firstChild&&typeof a.firstChild.getAttribute!=\"undefined\"&&a.firstChild.getAttribute(\"href\")!==\"#\"&&(o.attrHandle.href=function(a){return a.getAttribute(\"href\",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement(\"div\"),d=\"__sizzle__\";b.innerHTML=\"<p class='TEST'></p>\";if(!b.querySelectorAll||b.querySelectorAll(\".TEST\").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\\w+$)|^\\.([\\w\\-]+$)|^#([\\w\\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b===\"body\"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!==\"object\"){var k=e,l=e.getAttribute(\"id\"),n=l||d,p=e.parentNode,q=/^\\s*[+~]/.test(b);l?n=n.replace(/'/g,\"\\\\$&\"):e.setAttribute(\"id\",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll(\"[id='\"+n+\"'] \"+b),f)}catch(r){}finally{l||k.removeAttribute(\"id\")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement(\"div\"),\"div\"),e=!1;try{b.call(c.documentElement,\"[test!='']:sizzle\")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\\=\\s*([^'\"\\]]*)\\s*\\]/g,\"='$1']\");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement(\"div\");a.innerHTML=\"<div class='test e'></div><div class='test'></div>\";if(!!a.getElementsByClassName&&a.getElementsByClassName(\"e\").length!==0){a.lastChild.className=\"e\";if(a.getElementsByClassName(\"e\").length===1)return;o.order.splice(1,0,\"CLASS\"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=\"undefined\"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!==\"HTML\":!1};var y=function(a,b,c){var d,e=[],f=\"\",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,\"\");a=o.relative[a]?a+\"*\":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[\":\"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\\[\\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!=\"string\")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack(\"\",\"find\",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),\"not\",a)},filter:function(a){return this.pushStack(T(this,a,!0),\"filter\",a)},is:function(a){return!!a&&(typeof a==\"string\"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!=\"string\"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,\"closest\",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a==\"string\")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==\"string\"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,\"parentNode\")},parentsUntil:function(a,b,c){return f.dir(a,\"parentNode\",c)},next:function(a){return f.nth(a,2,\"nextSibling\")},prev:function(a){return f.nth(a,2,\"previousSibling\")},nextAll:function(a){return f.dir(a,\"nextSibling\")},prevAll:function(a){return f.dir(a,\"previousSibling\")},nextUntil:function(a,b,c){return f.dir(a,\"nextSibling\",c)},prevUntil:function(a,b,c){return f.dir(a,\"previousSibling\",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,\"iframe\")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d==\"string\"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(\",\"))}}),f.extend({filter:function(a,b,c){c&&(a=\":not(\"+a+\")\");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V=\"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",W=/ jQuery\\d+=\"(?:\\d+|null)\"/g,X=/^\\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,Z=/<([\\w:]+)/,$=/<tbody/i,_=/<|&#?\\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp(\"<(?:\"+V+\")[\\\\s/>]\",\"i\"),bd=/checked\\s*(?:[^=]|=\\s*.checked.)/i,be=/\\/(java|ecma)script/i,bf=/^\\s*<!(?:\\[CDATA\\[|\\-\\-)/,bg={option:[1,\"<select multiple='multiple'>\",\"</select>\"],legend:[1,\"<fieldset>\",\"</fieldset>\"],thead:[1,\"<table>\",\"</table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],col:[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"],area:[1,\"<map>\",\"</map>\"],_default:[0,\"\",\"\"]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,\"div<div>\",\"</div>\"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,\"body\")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f\n.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,\"before\",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,\"after\",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName(\"*\")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName(\"*\"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,\"\"):null;if(typeof a==\"string\"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||[\"\",\"\"])[1].toLowerCase()]){a=a.replace(Y,\"<$1></$2>\");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName(\"*\")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!=\"string\"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),\"replaceWith\",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j==\"string\"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,\"tr\");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:\"GET\",global:!1,url:b.src,async:!1,dataType:\"script\"}):f.globalEval((b.text||b.textContent||b.innerHTML||\"\").replace(bf,\"$0\")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j==\"string\"&&j.length<512&&i===c&&j.charAt(0)===\"<\"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test(\"<\"+a.nodeName+\">\")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement==\"undefined\"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l==\"number\"&&(l+=\"\");if(!l)continue;if(typeof l==\"string\")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,\"<$1></$2>\");var m=(Z.exec(l)||[\"\",\"\"])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement(\"div\"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m===\"table\"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===\"<table>\"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],\"tbody\")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)==\"number\")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,\"script\")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName(\"script\"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\\([^)]*\\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\\-+]?(?:\\d*\\.)?\\d+$/i,bt=/^-?(?:\\d*\\.)?\\d+(?!px)[^\\d\\s]+$/i,bu=/^([\\-+])=([\\-+.\\de]+)/,bv=/^margin/,bw={position:\"absolute\",visibility:\"hidden\",display:\"block\"},bx=[\"Top\",\"Right\",\"Bottom\",\"Left\"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,\"opacity\");return c===\"\"?\"1\":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":f.support.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&\"get\"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h===\"string\"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h=\"number\");if(d==null||h===\"number\"&&isNaN(d))return;h===\"number\"&&!f.cssNumber[i]&&(d+=\"px\");if(!k||!(\"set\"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c===\"cssFloat\"&&(c=\"float\");if(g&&\"get\"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,\"-$1\").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===\"\"&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b===\"fontSize\"?\"1em\":f,f=g.pixelLeft+\"px\",g.left=c,d&&(a.runtimeStyle.left=d));return f===\"\"?\"auto\":f}),by=bz||bA,f.each([\"height\",\"width\"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+\"px\":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||\"\")?parseFloat(RegExp.$1)/100+\"\":b?\"1\":\"\"},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?\"alpha(opacity=\"+b*100+\")\":\"\",g=d&&d.filter||c.filter||\"\";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,\"\"))===\"\"){c.removeAttribute(\"filter\");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+\" \"+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:\"inline-block\"},function(){return b?by(a,\"margin-right\"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,\"display\"))===\"none\"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:\"\",padding:\"\",border:\"Width\"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c==\"string\"?c.split(\" \"):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\\[\\]$/,bE=/\\r?\\n/g,bF=/#.*$/,bG=/^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\\-storage|.+\\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\\/\\//,bL=/\\?/,bM=/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=[\"*/\"]+[\"*\"];try{bU=e.href}catch(bX){bU=c.createElement(\"a\"),bU.href=\"\",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!=\"string\"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(\" \");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h=\"GET\";c&&(f.isFunction(c)?(d=c,c=b):typeof c==\"object\"&&(c=f.param(c,f.ajaxSettings.traditional),h=\"POST\"));var i=this;f.ajax({url:a,type:h,dataType:\"html\",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f(\"<div>\").append(c.replace(bM,\"\")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,\"\\r\\n\")}}):{name:b.name,value:c.replace(bE,\"\\r\\n\")}}).get()}}),f.each(\"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split(\" \"),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each([\"get\",\"post\"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,\"script\")},getJSON:function(a,b,c){return f.get(a,b,c,\"json\")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:\"GET\",contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",processData:!0,async:!0,accepts:{xml:\"application/xml, text/xml\",html:\"text/html\",text:\"text/plain\",json:\"application/json, text/javascript\",\"*\":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\"},converters:{\"* text\":a.String,\"text html\":!0,\"text json\":f.parseJSON,\"text xml\":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||\"\",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader(\"Last-Modified\"))f.lastModified[k]=y;if(z=v.getResponseHeader(\"Etag\"))f.etag[k]=z}if(a===304)w=\"notmodified\",o=!0;else try{r=cb(d,x),w=\"success\",o=!0}catch(A){w=\"parsererror\",u=A}}else{u=w;if(!w||a)w=\"error\",a<0&&(a=0)}v.status=a,v.statusText=\"\"+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger(\"ajax\"+(o?\"Success\":\"Error\"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger(\"ajaxComplete\",[v,d]),--f.active||f.event.trigger(\"ajaxStop\"))}}typeof a==\"object\"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks(\"once memory\"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||\"abort\",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+\"\").replace(bF,\"\").replace(bK,bV[1]+\"\"),d.dataTypes=f.trim(d.dataType||\"*\").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]===\"http:\"?80:443))==(bV[3]||(bV[1]===\"http:\"?80:443)))),d.data&&d.processData&&typeof d.data!=\"string\"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger(\"ajaxStart\");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?\"&\":\"?\")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,\"$1_=\"+x);d.url=y+(y===d.url?(bL.test(d.url)?\"&\":\"?\")+\"_=\"+x:\"\")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader(\"Content-Type\",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader(\"If-Modified-Since\",f.lastModified[k]),f.etag[k]&&v.setRequestHeader(\"If-None-Match\",f.etag[k])),v.setRequestHeader(\"Accept\",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!==\"*\"?\", \"+bW+\"; q=0.01\":\"\"):d.accepts[\"*\"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,\"No Transport\");else{v.readyState=1,t&&g.trigger(\"ajaxSend\",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort(\"timeout\")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+\"=\"+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join(\"&\").replace(bC,\"+\")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\\=)\\?(&|$)|\\?\\?/i;f.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){return f.expando+\"_\"+cc++}}),f.ajaxPrefilter(\"json jsonp\",function(b,c,d){var e=typeof b.data==\"string\"&&/^application\\/x\\-www\\-form\\-urlencoded/.test(b.contentType);if(b.dataTypes[0]===\"jsonp\"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l=\"$1\"+h+\"$2\";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\\?/.test(j)?\"&\":\"?\")+b.jsonp+\"=\"+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters[\"script json\"]=function(){g||f.error(h+\" was not called\");return g[0]},b.dataTypes[0]=\"json\";return\"script\"}}),f.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/javascript|ecmascript/},converters:{\"text script\":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter(\"script\",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type=\"GET\",a.global=!1)}),f.ajaxTransport(\"script\",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName(\"head\")[0]||c.documentElement;return{send:function(f,g){d=c.createElement(\"script\"),d.async=\"async\",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,\"success\")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&\"withCredentials\"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e[\"X-Requested-With\"]&&(e[\"X-Requested-With\"]=\"XMLHttpRequest\");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=\"\"}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\\-]=)?([\\d+.\\-]+)([a-z%]*)$/i,co,cp=[[\"height\",\"marginTop\",\"marginBottom\",\"paddingTop\",\"paddingBottom\"],[\"width\",\"marginLeft\",\"marginRight\",\"paddingLeft\",\"paddingRight\"],[\"opacity\"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct(\"show\",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,\"olddisplay\")&&e===\"none\"&&(e=d.style.display=\"\"),(e===\"\"&&f.css(d,\"display\")===\"none\"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,\"olddisplay\",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===\"\"||e===\"none\")d.style.display=f._data(d,\"olddisplay\")||\"\"}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct(\"hide\",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,\"display\"),e!==\"none\"&&!f._data(d,\"olddisplay\")&&f._data(d,\"olddisplay\",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display=\"none\");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a==\"boolean\";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(\":hidden\");f(this)[b?\"show\":\"hide\"]()}):this.animate(ct(\"toggle\",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(\":hidden\").css(\"opacity\",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(\":hidden\"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&\"expand\"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||\"swing\";if(h===\"hide\"&&d||h===\"show\"&&!d)return b.complete.call(this);c&&(g===\"height\"||g===\"width\")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,\"display\")===\"inline\"&&f.css(this,\"float\")===\"none\"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)===\"inline\"?this.style.display=\"inline-block\":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow=\"hidden\");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,\"toggle\"+i)||(h===\"toggle\"?d?\"show\":\"hide\":0),q?(f._data(this,\"toggle\"+i,q===\"show\"?\"hide\":\"show\"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?\"\":\"px\"),p!==\"px\"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]===\"-=\"?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,\"\"));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!=\"string\"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||\"fx\",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(\".run\")===b.length-4&&h(this,g,b);else g[b=a+\".run\"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct(\"show\",1),slideUp:ct(\"hide\",1),slideToggle:ct(\"toggle\",1),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a==\"object\"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration==\"number\"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue=\"fx\";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b===\"auto\"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?\"\":\"px\"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,\"fxshow\"+e.prop)===b&&(e.options.hide?f._data(e.elem,\"fxshow\"+e.prop,e.start):e.options.show&&f._data(e.elem,\"fxshow\"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,\"fxshow\"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop===\"width\"||this.prop===\"height\"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,\"fxshow\"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each([\"\",\"X\",\"Y\"],function(a,b){h.style[\"overflow\"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,\"fxshow\"+b,!0),f.removeData(h,\"toggle\"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,\"opacity\",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf(\"margin\")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;\"getBoundingClientRect\"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position===\"fixed\")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!==\"visible\"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position===\"relative\"||j.position===\"static\")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position===\"fixed\"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,\"marginTop\"))||0,c+=parseFloat(f.css(a,\"marginLeft\"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,\"position\");d===\"static\"&&(a.style.position=\"relative\");var e=f(a),g=e.offset(),h=f.css(a,\"top\"),i=f.css(a,\"left\"),j=(d===\"absolute\"||d===\"fixed\")&&f.inArray(\"auto\",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),\"using\"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,\"marginTop\"))||0,c.left-=parseFloat(f.css(a,\"marginLeft\"))||0,d.top+=parseFloat(f.css(b[0],\"borderTopWidth\"))||0,d.left+=parseFloat(f.css(b[0],\"borderLeftWidth\"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,\"position\")===\"static\")a=a.offsetParent;return a})}}),f.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:\"height\",Width:\"width\"},function(a,c){var d=\"client\"+a,e=\"scroll\"+a,g=\"offset\"+a;f.fn[\"inner\"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,\"padding\")):this[c]():null},f.fn[\"outer\"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?\"margin\":\"border\")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define==\"function\"&&define.amd&&define.amd.jQuery&&define(\"jquery\",[],function(){return f})})(window);\n};\n\n/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)\n* Licensed under the MIT License (LICENSE.txt).\n*\n* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.\n* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.\n* Thanks to: Seamus Leahy for adding deltaX and deltaY\n*\n* Version: 3.0.6\n*\n* Requires: 1.2.2+\n*/\n\n(function($) {\n\nvar types = ['DOMMouseScroll', 'mousewheel'];\n\nif ($.event.fixHooks) {\n for ( var i=types.length; i; ) {\n $.event.fixHooks[ types[--i] ] = $.event.mouseHooks;\n }\n}\n\n$.event.special.mousewheel = {\n setup: function() {\n if ( this.addEventListener ) {\n for ( var i=types.length; i; ) {\n this.addEventListener( types[--i], handler, false );\n }\n } else {\n this.onmousewheel = handler;\n }\n },\n\n teardown: function() {\n if ( this.removeEventListener ) {\n for ( var i=types.length; i; ) {\n this.removeEventListener( types[--i], handler, false );\n }\n } else {\n this.onmousewheel = null;\n }\n }\n};\n\n$.fn.extend({\n mousewheel: function(fn) {\n return fn ? this.bind(\"mousewheel\", fn) : this.trigger(\"mousewheel\");\n },\n\n unmousewheel: function(fn) {\n return this.unbind(\"mousewheel\", fn);\n }\n});\n\n\nfunction handler(event) {\n var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;\n event = $.event.fix(orgEvent);\n event.type = \"mousewheel\";\n\n // Old school scrollwheel delta\n if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }\n if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }\n\n // New school multidimensional scroll (touchpads) deltas\n deltaY = delta;\n\n // Gecko\n if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {\n deltaY = 0;\n deltaX = -1*delta;\n }\n\n // Webkit\n if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }\n if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }\n\n // Add event and delta to the front of the arguments\n args.unshift(event, delta, deltaX, deltaY);\n\n return ($.event.dispatch || $.event.handle).apply(this, args);\n}\n\n})(jQuery);\n\n// Underscore.js 1.4.4\n// http://underscorejs.org\n// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `global` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Establish the object that gets returned to break out of a loop iteration.\n var breaker = {};\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var push = ArrayProto.push,\n slice = ArrayProto.slice,\n concat = ArrayProto.concat,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeForEach = ArrayProto.forEach,\n nativeMap = ArrayProto.map,\n nativeReduce = ArrayProto.reduce,\n nativeReduceRight = ArrayProto.reduceRight,\n nativeFilter = ArrayProto.filter,\n nativeEvery = ArrayProto.every,\n nativeSome = ArrayProto.some,\n nativeIndexOf = ArrayProto.indexOf,\n nativeLastIndexOf = ArrayProto.lastIndexOf,\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind;\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object via a string identifier,\n // for Closure Compiler \"advanced\" mode.\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.4.4';\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles objects with the built-in `forEach`, arrays, and raw objects.\n // Delegates to **ECMAScript 5**'s native `forEach` if available.\n var each = _.each = _.forEach = function(obj, iterator, context) {\n if (obj == null) return;\n if (nativeForEach && obj.forEach === nativeForEach) {\n obj.forEach(iterator, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, l = obj.length; i < l; i++) {\n if (iterator.call(context, obj[i], i, obj) === breaker) return;\n }\n } else {\n for (var key in obj) {\n if (_.has(obj, key)) {\n if (iterator.call(context, obj[key], key, obj) === breaker) return;\n }\n }\n }\n };\n\n // Return the results of applying the iterator to each element.\n // Delegates to **ECMAScript 5**'s native `map` if available.\n _.map = _.collect = function(obj, iterator, context) {\n var results = [];\n if (obj == null) return results;\n if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n each(obj, function(value, index, list) {\n results[results.length] = iterator.call(context, value, index, list);\n });\n return results;\n };\n\n var reduceError = 'Reduce of empty array with no initial value';\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.\n _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {\n var initial = arguments.length > 2;\n if (obj == null) obj = [];\n if (nativeReduce && obj.reduce === nativeReduce) {\n if (context) iterator = _.bind(iterator, context);\n return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);\n }\n each(obj, function(value, index, list) {\n if (!initial) {\n memo = value;\n initial = true;\n } else {\n memo = iterator.call(context, memo, value, index, list);\n }\n });\n if (!initial) throw new TypeError(reduceError);\n return memo;\n };\n\n // The right-associative version of reduce, also known as `foldr`.\n // Delegates to **ECMAScript 5**'s native `reduceRight` if available.\n _.reduceRight = _.foldr = function(obj, iterator, memo, context) {\n var initial = arguments.length > 2;\n if (obj == null) obj = [];\n if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {\n if (context) iterator = _.bind(iterator, context);\n return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);\n }\n var length = obj.length;\n if (length !== +length) {\n var keys = _.keys(obj);\n length = keys.length;\n }\n each(obj, function(value, index, list) {\n index = keys ? keys[--length] : --length;\n if (!initial) {\n memo = obj[index];\n initial = true;\n } else {\n memo = iterator.call(context, memo, obj[index], index, list);\n }\n });\n if (!initial) throw new TypeError(reduceError);\n return memo;\n };\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, iterator, context) {\n var result;\n any(obj, function(value, index, list) {\n if (iterator.call(context, value, index, list)) {\n result = value;\n return true;\n }\n });\n return result;\n };\n\n // Return all the elements that pass a truth test.\n // Delegates to **ECMAScript 5**'s native `filter` if available.\n // Aliased as `select`.\n _.filter = _.select = function(obj, iterator, context) {\n var results = [];\n if (obj == null) return results;\n if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);\n each(obj, function(value, index, list) {\n if (iterator.call(context, value, index, list)) results[results.length] = value;\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, iterator, context) {\n return _.filter(obj, function(value, index, list) {\n return !iterator.call(context, value, index, list);\n }, context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Delegates to **ECMAScript 5**'s native `every` if available.\n // Aliased as `all`.\n _.every = _.all = function(obj, iterator, context) {\n iterator || (iterator = _.identity);\n var result = true;\n if (obj == null) return result;\n if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);\n each(obj, function(value, index, list) {\n if (!(result = result && iterator.call(context, value, index, list))) return breaker;\n });\n return !!result;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Delegates to **ECMAScript 5**'s native `some` if available.\n // Aliased as `any`.\n var any = _.some = _.any = function(obj, iterator, context) {\n iterator || (iterator = _.identity);\n var result = false;\n if (obj == null) return result;\n if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);\n each(obj, function(value, index, list) {\n if (result || (result = iterator.call(context, value, index, list))) return breaker;\n });\n return !!result;\n };\n\n // Determine if the array or object contains a given value (using `===`).\n // Aliased as `include`.\n _.contains = _.include = function(obj, target) {\n if (obj == null) return false;\n if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\n return any(obj, function(value) {\n return value === target;\n });\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n return (isFunc ? method : value[method]).apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, function(value){ return value[key]; });\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs, first) {\n if (_.isEmpty(attrs)) return first ? null : [];\n return _[first ? 'find' : 'filter'](obj, function(value) {\n for (var key in attrs) {\n if (attrs[key] !== value[key]) return false;\n }\n return true;\n });\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.where(obj, attrs, true);\n };\n\n // Return the maximum element or (element-based computation).\n // Can't optimize arrays of integers longer than 65,535 elements.\n // See: https://bugs.webkit.org/show_bug.cgi?id=80797\n _.max = function(obj, iterator, context) {\n if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n return Math.max.apply(Math, obj);\n }\n if (!iterator && _.isEmpty(obj)) return -Infinity;\n var result = {computed : -Infinity, value: -Infinity};\n each(obj, function(value, index, list) {\n var computed = iterator ? iterator.call(context, value, index, list) : value;\n computed >= result.computed && (result = {value : value, computed : computed});\n });\n return result.value;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iterator, context) {\n if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {\n return Math.min.apply(Math, obj);\n }\n if (!iterator && _.isEmpty(obj)) return Infinity;\n var result = {computed : Infinity, value: Infinity};\n each(obj, function(value, index, list) {\n var computed = iterator ? iterator.call(context, value, index, list) : value;\n computed < result.computed && (result = {value : value, computed : computed});\n });\n return result.value;\n };\n\n // Shuffle an array.\n _.shuffle = function(obj) {\n var rand;\n var index = 0;\n var shuffled = [];\n each(obj, function(value) {\n rand = _.random(index++);\n shuffled[index - 1] = shuffled[rand];\n shuffled[rand] = value;\n });\n return shuffled;\n };\n\n // An internal function to generate lookup iterators.\n var lookupIterator = function(value) {\n return _.isFunction(value) ? value : function(obj){ return obj[value]; };\n };\n\n // Sort the object's values by a criterion produced by an iterator.\n _.sortBy = function(obj, value, context) {\n var iterator = lookupIterator(value);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value : value,\n index : index,\n criteria : iterator.call(context, value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index < right.index ? -1 : 1;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(obj, value, context, behavior) {\n var result = {};\n var iterator = lookupIterator(value || _.identity);\n each(obj, function(value, index) {\n var key = iterator.call(context, value, index, obj);\n behavior(result, key, value);\n });\n return result;\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = function(obj, value, context) {\n return group(obj, value, context, function(result, key, value) {\n (_.has(result, key) ? result[key] : (result[key] = [])).push(value);\n });\n };\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = function(obj, value, context) {\n return group(obj, value, context, function(result, key) {\n if (!_.has(result, key)) result[key] = 0;\n result[key]++;\n });\n };\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iterator, context) {\n iterator = iterator == null ? _.identity : lookupIterator(iterator);\n var value = iterator.call(context, obj);\n var low = 0, high = array.length;\n while (low < high) {\n var mid = (low + high) >>> 1;\n iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;\n }\n return low;\n };\n\n // Safely convert anything iterable into a real, live array.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (obj.length === +obj.length) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n return (n != null) && !guard ? slice.call(array, 0, n) : array[0];\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N. The **guard** check allows it to work with\n // `_.map`.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array. The **guard** check allows it to work with `_.map`.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if ((n != null) && !guard) {\n return slice.call(array, Math.max(array.length - n, 0));\n } else {\n return array[array.length - 1];\n }\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array. The **guard**\n // check allows it to work with `_.map`.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, (n == null) || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, output) {\n each(input, function(value) {\n if (_.isArray(value)) {\n shallow ? push.apply(output, value) : flatten(value, shallow, output);\n } else {\n output.push(value);\n }\n });\n return output;\n };\n\n // Return a completely flattened version of an array.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, []);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iterator, context) {\n if (_.isFunction(isSorted)) {\n context = iterator;\n iterator = isSorted;\n isSorted = false;\n }\n var initial = iterator ? _.map(array, iterator, context) : array;\n var results = [];\n var seen = [];\n each(initial, function(value, index) {\n if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {\n seen.push(value);\n results.push(array[index]);\n }\n });\n return results;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(concat.apply(ArrayProto, arguments));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var rest = slice.call(arguments, 1);\n return _.filter(_.uniq(array), function(item) {\n return _.every(rest, function(other) {\n return _.indexOf(other, item) >= 0;\n });\n });\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = concat.apply(ArrayProto, slice.call(arguments, 1));\n return _.filter(array, function(value){ return !_.contains(rest, value); });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n var args = slice.call(arguments);\n var length = _.max(_.pluck(args, 'length'));\n var results = new Array(length);\n for (var i = 0; i < length; i++) {\n results[i] = _.pluck(args, \"\" + i);\n }\n return results;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n if (list == null) return {};\n var result = {};\n for (var i = 0, l = list.length; i < l; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),\n // we need this function. Return the position of the first occurrence of an\n // item in an array, or -1 if the item is not included in the array.\n // Delegates to **ECMAScript 5**'s native `indexOf` if available.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = function(array, item, isSorted) {\n if (array == null) return -1;\n var i = 0, l = array.length;\n if (isSorted) {\n if (typeof isSorted == 'number') {\n i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);\n } else {\n i = _.sortedIndex(array, item);\n return array[i] === item ? i : -1;\n }\n }\n if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);\n for (; i < l; i++) if (array[i] === item) return i;\n return -1;\n };\n\n // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.\n _.lastIndexOf = function(array, item, from) {\n if (array == null) return -1;\n var hasIndex = from != null;\n if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {\n return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);\n }\n var i = (hasIndex ? from : array.length);\n while (i--) if (array[i] === item) return i;\n return -1;\n };\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (arguments.length <= 1) {\n stop = start || 0;\n start = 0;\n }\n step = arguments[2] || 1;\n\n var len = Math.max(Math.ceil((stop - start) / step), 0);\n var idx = 0;\n var range = new Array(len);\n\n while(idx < len) {\n range[idx++] = start;\n start += step;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n var args = slice.call(arguments, 2);\n return function() {\n return func.apply(context, args.concat(slice.call(arguments)));\n };\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context.\n _.partial = function(func) {\n var args = slice.call(arguments, 1);\n return function() {\n return func.apply(this, args.concat(slice.call(arguments)));\n };\n };\n\n // Bind all of an object's methods to that object. Useful for ensuring that\n // all callbacks defined on an object belong to it.\n _.bindAll = function(obj) {\n var funcs = slice.call(arguments, 1);\n if (funcs.length === 0) funcs = _.functions(obj);\n each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memo = {};\n hasher || (hasher = _.identity);\n return function() {\n var key = hasher.apply(this, arguments);\n return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));\n };\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){ return func.apply(null, args); }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = function(func) {\n return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\n };\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time.\n _.throttle = function(func, wait) {\n var context, args, timeout, result;\n var previous = 0;\n var later = function() {\n previous = new Date;\n timeout = null;\n result = func.apply(context, args);\n };\n return function() {\n var now = new Date;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n } else if (!timeout) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, result;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) result = func.apply(context, args);\n return result;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = function(func) {\n var ran = false, memo;\n return function() {\n if (ran) return memo;\n ran = true;\n memo = func.apply(this, arguments);\n func = null;\n return memo;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return function() {\n var args = [func];\n push.apply(args, arguments);\n return wrapper.apply(this, args);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var funcs = arguments;\n return function() {\n var args = arguments;\n for (var i = funcs.length - 1; i >= 0; i--) {\n args = [funcs[i].apply(this, args)];\n }\n return args[0];\n };\n };\n\n // Returns a function that will only be executed after being called N times.\n _.after = function(times, func) {\n if (times <= 0) return func();\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Object Functions\n // ----------------\n\n // Retrieve the names of an object's properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = nativeKeys || function(obj) {\n if (obj !== Object(obj)) throw new TypeError('Invalid object');\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var values = [];\n for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);\n return values;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var pairs = [];\n for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = function(obj) {\n each(slice.call(arguments, 1), function(source) {\n if (source) {\n for (var prop in source) {\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(obj) {\n var copy = {};\n var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n each(keys, function(key) {\n if (key in obj) copy[key] = obj[key];\n });\n return copy;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj) {\n var copy = {};\n var keys = concat.apply(ArrayProto, slice.call(arguments, 1));\n for (var key in obj) {\n if (!_.contains(keys, key)) copy[key] = obj[key];\n }\n return copy;\n };\n\n // Fill in a given object with default properties.\n _.defaults = function(obj) {\n each(slice.call(arguments, 1), function(source) {\n if (source) {\n for (var prop in source) {\n if (obj[prop] == null) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] == a) return bStack[length] == b;\n }\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n if (!(result = eq(a[size], b[size], aStack, bStack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent, but `Object`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&\n _.isFunction(bCtor) && (bCtor instanceof bCtor))) {\n return false;\n }\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return result;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b, [], []);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;\n for (var key in obj) if (_.has(obj, key)) return false;\n return true;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) == '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n return obj === Object(obj);\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.\n each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) == '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return !!(obj && _.has(obj, 'callee'));\n };\n }\n\n // Optimize `isFunction` if appropriate.\n if (typeof (/./) !== 'function') {\n _.isFunction = function(obj) {\n return typeof obj === 'function';\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj != +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) == '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iterators.\n _.identity = function(value) {\n return value;\n };\n\n // Run a function **n** times.\n _.times = function(n, iterator, context) {\n var accum = Array(n);\n for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // List of HTML entities for escaping.\n var entityMap = {\n escape: {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n }\n };\n entityMap.unescape = _.invert(entityMap.escape);\n\n // Regexes containing the keys and values listed immediately above.\n var entityRegexes = {\n escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),\n unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')\n };\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n _.each(['escape', 'unescape'], function(method) {\n _[method] = function(string) {\n if (string == null) return '';\n return ('' + string).replace(entityRegexes[method], function(match) {\n return entityMap[method][match];\n });\n };\n });\n\n // If the value of the named property is a function then invoke it;\n // otherwise, return it.\n _.result = function(object, property) {\n if (object == null) return null;\n var value = object[property];\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n each(_.functions(obj), function(name){\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result.call(this, func.apply(_, args));\n };\n });\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\t': 't',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n _.template = function(text, data, settings) {\n var render;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = new RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset)\n .replace(escaper, function(match) { return '\\\\' + escapes[match]; });\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n }\n if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n }\n if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n index = offset + match.length;\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + \"return __p;\\n\";\n\n try {\n render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n if (data) return render(data, _);\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled function source as a convenience for precompilation.\n template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function, which will delegate to the wrapper.\n _.chain = function(obj) {\n return _(obj).chain();\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(obj) {\n return this._chain ? _(obj).chain() : obj;\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];\n return result.call(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result.call(this, method.apply(this._wrapped, arguments));\n };\n });\n\n _.extend(_.prototype, {\n\n // Start chaining a wrapped Underscore object.\n chain: function() {\n this._chain = true;\n return this;\n },\n\n // Extracts the result from a wrapped and chained object.\n value: function() {\n return this._wrapped;\n }\n\n });\n\n}).call(this);\n\n// Backbone.js 0.9.10\n\n// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.\n// Backbone may be freely distributed under the MIT license.\n// For all details and documentation:\n// http://backbonejs.org\n\n(function(){\n\n // Initial Setup\n // -------------\n\n // Save a reference to the global object (`window` in the browser, `exports`\n // on the server).\n var root = this;\n\n // Save the previous value of the `Backbone` variable, so that it can be\n // restored later on, if `noConflict` is used.\n var previousBackbone = root.Backbone;\n\n // Create a local reference to array methods.\n var array = [];\n var push = array.push;\n var slice = array.slice;\n var splice = array.splice;\n\n // The top-level namespace. All public Backbone classes and modules will\n // be attached to this. Exported for both CommonJS and the browser.\n var Backbone;\n if (typeof exports !== 'undefined') {\n Backbone = exports;\n } else {\n Backbone = root.Backbone = {};\n }\n\n // Current version of the library. Keep in sync with `package.json`.\n Backbone.VERSION = '0.9.10';\n\n // Require Underscore, if we're on the server, and it's not already present.\n var _ = root._;\n if (!_ && (typeof require !== 'undefined')) _ = require('underscore');\n\n // For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable.\n Backbone.$ = root.jQuery || root.Zepto || root.ender;\n\n // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable\n // to its previous owner. Returns a reference to this Backbone object.\n Backbone.noConflict = function() {\n root.Backbone = previousBackbone;\n return this;\n };\n\n // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option\n // will fake `\"PUT\"` and `\"DELETE\"` requests via the `_method` parameter and\n // set a `X-Http-Method-Override` header.\n Backbone.emulateHTTP = false;\n\n // Turn on `emulateJSON` to support legacy servers that can't deal with direct\n // `application/json` requests ... will encode the body as\n // `application/x-www-form-urlencoded` instead and will send the model in a\n // form param named `model`.\n Backbone.emulateJSON = false;\n\n // Backbone.Events\n // ---------------\n\n // Regular expression used to split event strings.\n var eventSplitter = /\\s+/;\n\n // Implement fancy features of the Events API such as multiple event\n // names `\"change blur\"` and jQuery-style event maps `{change: action}`\n // in terms of the existing API.\n var eventsApi = function(obj, action, name, rest) {\n if (!name) return true;\n if (typeof name === 'object') {\n for (var key in name) {\n obj[action].apply(obj, [key, name[key]].concat(rest));\n }\n } else if (eventSplitter.test(name)) {\n var names = name.split(eventSplitter);\n for (var i = 0, l = names.length; i < l; i++) {\n obj[action].apply(obj, [names[i]].concat(rest));\n }\n } else {\n return true;\n }\n };\n\n // Optimized internal dispatch function for triggering events. Tries to\n // keep the usual cases speedy (most Backbone events have 3 arguments).\n var triggerEvents = function(events, args) {\n var ev, i = -1, l = events.length;\n switch (args.length) {\n case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx);\n return;\n case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, args[0]);\n return;\n case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, args[0], args[1]);\n return;\n case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, args[0], args[1], args[2]);\n return;\n default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);\n }\n };\n\n // A module that can be mixed in to *any object* in order to provide it with\n // custom events. You may bind with `on` or remove with `off` callback\n // functions to an event; `trigger`-ing an event fires all callbacks in\n // succession.\n //\n // var object = {};\n // _.extend(object, Backbone.Events);\n // object.on('expand', function(){ alert('expanded'); });\n // object.trigger('expand');\n //\n var Events = Backbone.Events = {\n\n // Bind one or more space separated events, or an events map,\n // to a `callback` function. Passing `\"all\"` will bind the callback to\n // all events fired.\n on: function(name, callback, context) {\n if (!(eventsApi(this, 'on', name, [callback, context]) && callback)) return this;\n this._events || (this._events = {});\n var list = this._events[name] || (this._events[name] = []);\n list.push({callback: callback, context: context, ctx: context || this});\n return this;\n },\n\n // Bind events to only be triggered a single time. After the first time\n // the callback is invoked, it will be removed.\n once: function(name, callback, context) {\n if (!(eventsApi(this, 'once', name, [callback, context]) && callback)) return this;\n var self = this;\n var once = _.once(function() {\n self.off(name, once);\n callback.apply(this, arguments);\n });\n once._callback = callback;\n this.on(name, once, context);\n return this;\n },\n\n // Remove one or many callbacks. If `context` is null, removes all\n // callbacks with that function. If `callback` is null, removes all\n // callbacks for the event. If `name` is null, removes all bound\n // callbacks for all events.\n off: function(name, callback, context) {\n var list, ev, events, names, i, l, j, k;\n if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;\n if (!name && !callback && !context) {\n this._events = {};\n return this;\n }\n\n names = name ? [name] : _.keys(this._events);\n for (i = 0, l = names.length; i < l; i++) {\n name = names[i];\n if (list = this._events[name]) {\n events = [];\n if (callback || context) {\n for (j = 0, k = list.length; j < k; j++) {\n ev = list[j];\n if ((callback && callback !== ev.callback &&\n callback !== ev.callback._callback) ||\n (context && context !== ev.context)) {\n events.push(ev);\n }\n }\n }\n this._events[name] = events;\n }\n }\n\n return this;\n },\n\n // Trigger one or many events, firing all bound callbacks. Callbacks are\n // passed the same arguments as `trigger` is, apart from the event name\n // (unless you're listening on `\"all\"`, which will cause your callback to\n // receive the true name of the event as the first argument).\n trigger: function(name) {\n if (!this._events) return this;\n var args = slice.call(arguments, 1);\n if (!eventsApi(this, 'trigger', name, args)) return this;\n var events = this._events[name];\n var allEvents = this._events.all;\n if (events) triggerEvents(events, args);\n if (allEvents) triggerEvents(allEvents, arguments);\n return this;\n },\n\n // An inversion-of-control version of `on`. Tell *this* object to listen to\n // an event in another object ... keeping track of what it's listening to.\n listenTo: function(obj, name, callback) {\n var listeners = this._listeners || (this._listeners = {});\n var id = obj._listenerId || (obj._listenerId = _.uniqueId('l'));\n listeners[id] = obj;\n obj.on(name, typeof name === 'object' ? this : callback, this);\n return this;\n },\n\n // Tell this object to stop listening to either specific events ... or\n // to every object it's currently listening to.\n stopListening: function(obj, name, callback) {\n var listeners = this._listeners;\n if (!listeners) return;\n if (obj) {\n obj.off(name, typeof name === 'object' ? this : callback, this);\n if (!name && !callback) delete listeners[obj._listenerId];\n } else {\n if (typeof name === 'object') callback = this;\n for (var id in listeners) {\n listeners[id].off(name, callback, this);\n }\n this._listeners = {};\n }\n return this;\n }\n };\n\n // Aliases for backwards compatibility.\n Events.bind = Events.on;\n Events.unbind = Events.off;\n\n // Allow the `Backbone` object to serve as a global event bus, for folks who\n // want global \"pubsub\" in a convenient place.\n _.extend(Backbone, Events);\n\n // Backbone.Model\n // --------------\n\n // Create a new model, with defined attributes. A client id (`cid`)\n // is automatically generated and assigned for you.\n var Model = Backbone.Model = function(attributes, options) {\n var defaults;\n var attrs = attributes || {};\n this.cid = _.uniqueId('c');\n this.attributes = {};\n if (options && options.collection) this.collection = options.collection;\n if (options && options.parse) attrs = this.parse(attrs, options) || {};\n if (defaults = _.result(this, 'defaults')) {\n attrs = _.defaults({}, attrs, defaults);\n }\n this.set(attrs, options);\n this.changed = {};\n this.initialize.apply(this, arguments);\n };\n\n // Attach all inheritable methods to the Model prototype.\n _.extend(Model.prototype, Events, {\n\n // A hash of attributes whose current and previous value differ.\n changed: null,\n\n // The default name for the JSON `id` attribute is `\"id\"`. MongoDB and\n // CouchDB users may want to set this to `\"_id\"`.\n idAttribute: 'id',\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Return a copy of the model's `attributes` object.\n toJSON: function(options) {\n return _.clone(this.attributes);\n },\n\n // Proxy `Backbone.sync` by default.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Get the value of an attribute.\n get: function(attr) {\n return this.attributes[attr];\n },\n\n // Get the HTML-escaped value of an attribute.\n escape: function(attr) {\n return _.escape(this.get(attr));\n },\n\n // Returns `true` if the attribute contains a value that is not null\n // or undefined.\n has: function(attr) {\n return this.get(attr) != null;\n },\n\n // ----------------------------------------------------------------------\n\n // Set a hash of model attributes on the object, firing `\"change\"` unless\n // you choose to silence it.\n set: function(key, val, options) {\n var attr, attrs, unset, changes, silent, changing, prev, current;\n if (key == null) return this;\n\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n if (typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n options || (options = {});\n\n // Run validation.\n if (!this._validate(attrs, options)) return false;\n\n // Extract attributes and options.\n unset = options.unset;\n silent = options.silent;\n changes = [];\n changing = this._changing;\n this._changing = true;\n\n if (!changing) {\n this._previousAttributes = _.clone(this.attributes);\n this.changed = {};\n }\n current = this.attributes, prev = this._previousAttributes;\n\n // Check for changes of `id`.\n if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];\n\n // For each `set` attribute, update or delete the current value.\n for (attr in attrs) {\n val = attrs[attr];\n if (!_.isEqual(current[attr], val)) changes.push(attr);\n if (!_.isEqual(prev[attr], val)) {\n this.changed[attr] = val;\n } else {\n delete this.changed[attr];\n }\n unset ? delete current[attr] : current[attr] = val;\n }\n\n // Trigger all relevant attribute changes.\n if (!silent) {\n if (changes.length) this._pending = true;\n for (var i = 0, l = changes.length; i < l; i++) {\n this.trigger('change:' + changes[i], this, current[changes[i]], options);\n }\n }\n\n if (changing) return this;\n if (!silent) {\n while (this._pending) {\n this._pending = false;\n this.trigger('change', this, options);\n }\n }\n this._pending = false;\n this._changing = false;\n return this;\n },\n\n // Remove an attribute from the model, firing `\"change\"` unless you choose\n // to silence it. `unset` is a noop if the attribute doesn't exist.\n unset: function(attr, options) {\n return this.set(attr, void 0, _.extend({}, options, {unset: true}));\n },\n\n // Clear all attributes on the model, firing `\"change\"` unless you choose\n // to silence it.\n clear: function(options) {\n var attrs = {};\n for (var key in this.attributes) attrs[key] = void 0;\n return this.set(attrs, _.extend({}, options, {unset: true}));\n },\n\n // Determine if the model has changed since the last `\"change\"` event.\n // If you specify an attribute name, determine if that attribute has changed.\n hasChanged: function(attr) {\n if (attr == null) return !_.isEmpty(this.changed);\n return _.has(this.changed, attr);\n },\n\n // Return an object containing all the attributes that have changed, or\n // false if there are no changed attributes. Useful for determining what\n // parts of a view need to be updated and/or what attributes need to be\n // persisted to the server. Unset attributes will be set to undefined.\n // You can also pass an attributes object to diff against the model,\n // determining if there *would be* a change.\n changedAttributes: function(diff) {\n if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;\n var val, changed = false;\n var old = this._changing ? this._previousAttributes : this.attributes;\n for (var attr in diff) {\n if (_.isEqual(old[attr], (val = diff[attr]))) continue;\n (changed || (changed = {}))[attr] = val;\n }\n return changed;\n },\n\n // Get the previous value of an attribute, recorded at the time the last\n // `\"change\"` event was fired.\n previous: function(attr) {\n if (attr == null || !this._previousAttributes) return null;\n return this._previousAttributes[attr];\n },\n\n // Get all of the attributes of the model at the time of the previous\n // `\"change\"` event.\n previousAttributes: function() {\n return _.clone(this._previousAttributes);\n },\n\n // ---------------------------------------------------------------------\n\n // Fetch the model from the server. If the server's representation of the\n // model differs from its current attributes, they will be overriden,\n // triggering a `\"change\"` event.\n fetch: function(options) {\n options = options ? _.clone(options) : {};\n if (options.parse === void 0) options.parse = true;\n var success = options.success;\n options.success = function(model, resp, options) {\n if (!model.set(model.parse(resp, options), options)) return false;\n if (success) success(model, resp, options);\n };\n return this.sync('read', this, options);\n },\n\n // Set a hash of model attributes, and sync the model to the server.\n // If the server returns an attributes hash that differs, the model's\n // state will be `set` again.\n save: function(key, val, options) {\n var attrs, success, method, xhr, attributes = this.attributes;\n\n // Handle both `\"key\", value` and `{key: value}` -style arguments.\n if (key == null || typeof key === 'object') {\n attrs = key;\n options = val;\n } else {\n (attrs = {})[key] = val;\n }\n\n // If we're not waiting and attributes exist, save acts as `set(attr).save(null, opts)`.\n if (attrs && (!options || !options.wait) && !this.set(attrs, options)) return false;\n\n options = _.extend({validate: true}, options);\n\n // Do not persist invalid models.\n if (!this._validate(attrs, options)) return false;\n\n // Set temporary attributes if `{wait: true}`.\n if (attrs && options.wait) {\n this.attributes = _.extend({}, attributes, attrs);\n }\n\n // After a successful server-side save, the client is (optionally)\n // updated with the server-side state.\n if (options.parse === void 0) options.parse = true;\n success = options.success;\n options.success = function(model, resp, options) {\n // Ensure attributes are restored during synchronous saves.\n model.attributes = attributes;\n var serverAttrs = model.parse(resp, options);\n if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs);\n if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) {\n return false;\n }\n if (success) success(model, resp, options);\n };\n\n // Finish configuring and sending the Ajax request.\n method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');\n if (method === 'patch') options.attrs = attrs;\n xhr = this.sync(method, this, options);\n\n // Restore attributes.\n if (attrs && options.wait) this.attributes = attributes;\n\n return xhr;\n },\n\n // Destroy this model on the server if it was already persisted.\n // Optimistically removes the model from its collection, if it has one.\n // If `wait: true` is passed, waits for the server to respond before removal.\n destroy: function(options) {\n options = options ? _.clone(options) : {};\n var model = this;\n var success = options.success;\n\n var destroy = function() {\n model.trigger('destroy', model, model.collection, options);\n };\n\n options.success = function(model, resp, options) {\n if (options.wait || model.isNew()) destroy();\n if (success) success(model, resp, options);\n };\n\n if (this.isNew()) {\n options.success(this, null, options);\n return false;\n }\n\n var xhr = this.sync('delete', this, options);\n if (!options.wait) destroy();\n return xhr;\n },\n\n // Default URL for the model's representation on the server -- if you're\n // using Backbone's restful methods, override this to change the endpoint\n // that will be called.\n url: function() {\n var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError();\n if (this.isNew()) return base;\n return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id);\n },\n\n // **parse** converts a response into the hash of attributes to be `set` on\n // the model. The default implementation is just to pass the response along.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new model with identical attributes to this one.\n clone: function() {\n return new this.constructor(this.attributes);\n },\n\n // A model is new if it has never been saved to the server, and lacks an id.\n isNew: function() {\n return this.id == null;\n },\n\n // Check if the model is currently in a valid state.\n isValid: function(options) {\n return !this.validate || !this.validate(this.attributes, options);\n },\n\n // Run validation against the next complete set of model attributes,\n // returning `true` if all is well. Otherwise, fire a general\n // `\"error\"` event and call the error callback, if specified.\n _validate: function(attrs, options) {\n if (!options.validate || !this.validate) return true;\n attrs = _.extend({}, this.attributes, attrs);\n var error = this.validationError = this.validate(attrs, options) || null;\n if (!error) return true;\n this.trigger('invalid', this, error, options || {});\n return false;\n }\n\n });\n\n // Backbone.Collection\n // -------------------\n\n // Provides a standard collection class for our sets of models, ordered\n // or unordered. If a `comparator` is specified, the Collection will maintain\n // its models in sort order, as they're added and removed.\n var Collection = Backbone.Collection = function(models, options) {\n options || (options = {});\n if (options.model) this.model = options.model;\n if (options.comparator !== void 0) this.comparator = options.comparator;\n this.models = [];\n this._reset();\n this.initialize.apply(this, arguments);\n if (models) this.reset(models, _.extend({silent: true}, options));\n };\n\n // Define the Collection's inheritable methods.\n _.extend(Collection.prototype, Events, {\n\n // The default model for a collection is just a **Backbone.Model**.\n // This should be overridden in most cases.\n model: Model,\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // The JSON representation of a Collection is an array of the\n // models' attributes.\n toJSON: function(options) {\n return this.map(function(model){ return model.toJSON(options); });\n },\n\n // Proxy `Backbone.sync` by default.\n sync: function() {\n return Backbone.sync.apply(this, arguments);\n },\n\n // Add a model, or list of models to the set.\n add: function(models, options) {\n models = _.isArray(models) ? models.slice() : [models];\n options || (options = {});\n var i, l, model, attrs, existing, doSort, add, at, sort, sortAttr;\n add = [];\n at = options.at;\n sort = this.comparator && (at == null) && options.sort != false;\n sortAttr = _.isString(this.comparator) ? this.comparator : null;\n\n // Turn bare objects into model references, and prevent invalid models\n // from being added.\n for (i = 0, l = models.length; i < l; i++) {\n if (!(model = this._prepareModel(attrs = models[i], options))) {\n this.trigger('invalid', this, attrs, options);\n continue;\n }\n\n // If a duplicate is found, prevent it from being added and\n // optionally merge it into the existing model.\n if (existing = this.get(model)) {\n if (options.merge) {\n existing.set(attrs === model ? model.attributes : attrs, options);\n if (sort && !doSort && existing.hasChanged(sortAttr)) doSort = true;\n }\n continue;\n }\n\n // This is a new model, push it to the `add` list.\n add.push(model);\n\n // Listen to added models' events, and index models for lookup by\n // `id` and by `cid`.\n model.on('all', this._onModelEvent, this);\n this._byId[model.cid] = model;\n if (model.id != null) this._byId[model.id] = model;\n }\n\n // See if sorting is needed, update `length` and splice in new models.\n if (add.length) {\n if (sort) doSort = true;\n this.length += add.length;\n if (at != null) {\n splice.apply(this.models, [at, 0].concat(add));\n } else {\n push.apply(this.models, add);\n }\n }\n\n // Silently sort the collection if appropriate.\n if (doSort) this.sort({silent: true});\n\n if (options.silent) return this;\n\n // Trigger `add` events.\n for (i = 0, l = add.length; i < l; i++) {\n (model = add[i]).trigger('add', model, this, options);\n }\n\n // Trigger `sort` if the collection was sorted.\n if (doSort) this.trigger('sort', this, options);\n\n return this;\n },\n\n // Remove a model, or a list of models from the set.\n remove: function(models, options) {\n models = _.isArray(models) ? models.slice() : [models];\n options || (options = {});\n var i, l, index, model;\n for (i = 0, l = models.length; i < l; i++) {\n model = this.get(models[i]);\n if (!model) continue;\n delete this._byId[model.id];\n delete this._byId[model.cid];\n index = this.indexOf(model);\n this.models.splice(index, 1);\n this.length--;\n if (!options.silent) {\n options.index = index;\n model.trigger('remove', model, this, options);\n }\n this._removeReference(model);\n }\n return this;\n },\n\n // Add a model to the end of the collection.\n push: function(model, options) {\n model = this._prepareModel(model, options);\n this.add(model, _.extend({at: this.length}, options));\n return model;\n },\n\n // Remove a model from the end of the collection.\n pop: function(options) {\n var model = this.at(this.length - 1);\n this.remove(model, options);\n return model;\n },\n\n // Add a model to the beginning of the collection.\n unshift: function(model, options) {\n model = this._prepareModel(model, options);\n this.add(model, _.extend({at: 0}, options));\n return model;\n },\n\n // Remove a model from the beginning of the collection.\n shift: function(options) {\n var model = this.at(0);\n this.remove(model, options);\n return model;\n },\n\n // Slice out a sub-array of models from the collection.\n slice: function(begin, end) {\n return this.models.slice(begin, end);\n },\n\n // Get a model from the set by id.\n get: function(obj) {\n if (obj == null) return void 0;\n this._idAttr || (this._idAttr = this.model.prototype.idAttribute);\n return this._byId[obj.id || obj.cid || obj[this._idAttr] || obj];\n },\n\n // Get the model at the given index.\n at: function(index) {\n return this.models[index];\n },\n\n // Return models with matching attributes. Useful for simple cases of `filter`.\n where: function(attrs) {\n if (_.isEmpty(attrs)) return [];\n return this.filter(function(model) {\n for (var key in attrs) {\n if (attrs[key] !== model.get(key)) return false;\n }\n return true;\n });\n },\n\n // Force the collection to re-sort itself. You don't need to call this under\n // normal circumstances, as the set will maintain sort order as each item\n // is added.\n sort: function(options) {\n if (!this.comparator) {\n throw new Error('Cannot sort a set without a comparator');\n }\n options || (options = {});\n\n // Run sort based on type of `comparator`.\n if (_.isString(this.comparator) || this.comparator.length === 1) {\n this.models = this.sortBy(this.comparator, this);\n } else {\n this.models.sort(_.bind(this.comparator, this));\n }\n\n if (!options.silent) this.trigger('sort', this, options);\n return this;\n },\n\n // Pluck an attribute from each model in the collection.\n pluck: function(attr) {\n return _.invoke(this.models, 'get', attr);\n },\n\n // Smartly update a collection with a change set of models, adding,\n // removing, and merging as necessary.\n update: function(models, options) {\n options = _.extend({add: true, merge: true, remove: true}, options);\n if (options.parse) models = this.parse(models, options);\n var model, i, l, existing;\n var add = [], remove = [], modelMap = {};\n\n // Allow a single model (or no argument) to be passed.\n if (!_.isArray(models)) models = models ? [models] : [];\n\n // Proxy to `add` for this case, no need to iterate...\n if (options.add && !options.remove) return this.add(models, options);\n\n // Determine which models to add and merge, and which to remove.\n for (i = 0, l = models.length; i < l; i++) {\n model = models[i];\n existing = this.get(model);\n if (options.remove && existing) modelMap[existing.cid] = true;\n if ((options.add && !existing) || (options.merge && existing)) {\n add.push(model);\n }\n }\n if (options.remove) {\n for (i = 0, l = this.models.length; i < l; i++) {\n model = this.models[i];\n if (!modelMap[model.cid]) remove.push(model);\n }\n }\n\n // Remove models (if applicable) before we add and merge the rest.\n if (remove.length) this.remove(remove, options);\n if (add.length) this.add(add, options);\n return this;\n },\n\n // When you have more items than you want to add or remove individually,\n // you can reset the entire set with a new list of models, without firing\n // any `add` or `remove` events. Fires `reset` when finished.\n reset: function(models, options) {\n options || (options = {});\n if (options.parse) models = this.parse(models, options);\n for (var i = 0, l = this.models.length; i < l; i++) {\n this._removeReference(this.models[i]);\n }\n options.previousModels = this.models.slice();\n this._reset();\n if (models) this.add(models, _.extend({silent: true}, options));\n if (!options.silent) this.trigger('reset', this, options);\n return this;\n },\n\n // Fetch the default set of models for this collection, resetting the\n // collection when they arrive. If `update: true` is passed, the response\n // data will be passed through the `update` method instead of `reset`.\n fetch: function(options) {\n options = options ? _.clone(options) : {};\n if (options.parse === void 0) options.parse = true;\n var success = options.success;\n options.success = function(collection, resp, options) {\n var method = options.update ? 'update' : 'reset';\n collection[method](resp, options);\n if (success) success(collection, resp, options);\n };\n return this.sync('read', this, options);\n },\n\n // Create a new instance of a model in this collection. Add the model to the\n // collection immediately, unless `wait: true` is passed, in which case we\n // wait for the server to agree.\n create: function(model, options) {\n options = options ? _.clone(options) : {};\n if (!(model = this._prepareModel(model, options))) return false;\n if (!options.wait) this.add(model, options);\n var collection = this;\n var success = options.success;\n options.success = function(model, resp, options) {\n if (options.wait) collection.add(model, options);\n if (success) success(model, resp, options);\n };\n model.save(null, options);\n return model;\n },\n\n // **parse** converts a response into a list of models to be added to the\n // collection. The default implementation is just to pass it through.\n parse: function(resp, options) {\n return resp;\n },\n\n // Create a new collection with an identical list of models as this one.\n clone: function() {\n return new this.constructor(this.models);\n },\n\n // Reset all internal state. Called when the collection is reset.\n _reset: function() {\n this.length = 0;\n this.models.length = 0;\n this._byId = {};\n },\n\n // Prepare a model or hash of attributes to be added to this collection.\n _prepareModel: function(attrs, options) {\n if (attrs instanceof Model) {\n if (!attrs.collection) attrs.collection = this;\n return attrs;\n }\n options || (options = {});\n options.collection = this;\n var model = new this.model(attrs, options);\n if (!model._validate(attrs, options)) return false;\n return model;\n },\n\n // Internal method to remove a model's ties to a collection.\n _removeReference: function(model) {\n if (this === model.collection) delete model.collection;\n model.off('all', this._onModelEvent, this);\n },\n\n // Internal method called every time a model in the set fires an event.\n // Sets need to update their indexes when models change ids. All other\n // events simply proxy through. \"add\" and \"remove\" events that originate\n // in other collections are ignored.\n _onModelEvent: function(event, model, collection, options) {\n if ((event === 'add' || event === 'remove') && collection !== this) return;\n if (event === 'destroy') this.remove(model, options);\n if (model && event === 'change:' + model.idAttribute) {\n delete this._byId[model.previous(model.idAttribute)];\n if (model.id != null) this._byId[model.id] = model;\n }\n this.trigger.apply(this, arguments);\n },\n\n sortedIndex: function (model, value, context) {\n value || (value = this.comparator);\n var iterator = _.isFunction(value) ? value : function(model) {\n return model.get(value);\n };\n return _.sortedIndex(this.models, model, iterator, context);\n }\n\n });\n\n // Underscore methods that we want to implement on the Collection.\n var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl',\n 'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select',\n 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',\n 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',\n 'tail', 'drop', 'last', 'without', 'indexOf', 'shuffle', 'lastIndexOf',\n 'isEmpty', 'chain'];\n\n // Mix in each Underscore method as a proxy to `Collection#models`.\n _.each(methods, function(method) {\n Collection.prototype[method] = function() {\n var args = slice.call(arguments);\n args.unshift(this.models);\n return _[method].apply(_, args);\n };\n });\n\n // Underscore methods that take a property name as an argument.\n var attributeMethods = ['groupBy', 'countBy', 'sortBy'];\n\n // Use attributes instead of properties.\n _.each(attributeMethods, function(method) {\n Collection.prototype[method] = function(value, context) {\n var iterator = _.isFunction(value) ? value : function(model) {\n return model.get(value);\n };\n return _[method](this.models, iterator, context);\n };\n });\n\n // Backbone.Router\n // ---------------\n\n // Routers map faux-URLs to actions, and fire events when routes are\n // matched. Creating a new one sets its `routes` hash, if not set statically.\n var Router = Backbone.Router = function(options) {\n options || (options = {});\n if (options.routes) this.routes = options.routes;\n this._bindRoutes();\n this.initialize.apply(this, arguments);\n };\n\n // Cached regular expressions for matching named param parts and splatted\n // parts of route strings.\n var optionalParam = /\\((.*?)\\)/g;\n var namedParam = /(\\(\\?)?:\\w+/g;\n var splatParam = /\\*\\w+/g;\n var escapeRegExp = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\n\n // Set up all inheritable **Backbone.Router** properties and methods.\n _.extend(Router.prototype, Events, {\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // Manually bind a single named route to a callback. For example:\n //\n // this.route('search/:query/p:num', 'search', function(query, num) {\n // ...\n // });\n //\n route: function(route, name, callback) {\n if (!_.isRegExp(route)) route = this._routeToRegExp(route);\n if (!callback) callback = this[name];\n Backbone.history.route(route, _.bind(function(fragment) {\n var args = this._extractParameters(route, fragment);\n callback && callback.apply(this, args);\n this.trigger.apply(this, ['route:' + name].concat(args));\n this.trigger('route', name, args);\n Backbone.history.trigger('route', this, name, args);\n }, this));\n return this;\n },\n\n // Simple proxy to `Backbone.history` to save a fragment into the history.\n navigate: function(fragment, options) {\n Backbone.history.navigate(fragment, options);\n return this;\n },\n\n // Bind all defined routes to `Backbone.history`. We have to reverse the\n // order of the routes here to support behavior where the most general\n // routes can be defined at the bottom of the route map.\n _bindRoutes: function() {\n if (!this.routes) return;\n var route, routes = _.keys(this.routes);\n while ((route = routes.pop()) != null) {\n this.route(route, this.routes[route]);\n }\n },\n\n // Convert a route string into a regular expression, suitable for matching\n // against the current location hash.\n _routeToRegExp: function(route) {\n route = route.replace(escapeRegExp, '\\\\$&')\n .replace(optionalParam, '(?:$1)?')\n .replace(namedParam, function(match, optional){\n return optional ? match : '([^\\/]+)';\n })\n .replace(splatParam, '(.*?)');\n return new RegExp('^' + route + '$');\n },\n\n // Given a route, and a URL fragment that it matches, return the array of\n // extracted parameters.\n _extractParameters: function(route, fragment) {\n return route.exec(fragment).slice(1);\n }\n\n });\n\n // Backbone.History\n // ----------------\n\n // Handles cross-browser history management, based on URL fragments. If the\n // browser does not support `onhashchange`, falls back to polling.\n var History = Backbone.History = function() {\n this.handlers = [];\n _.bindAll(this, 'checkUrl');\n\n // Ensure that `History` can be used outside of the browser.\n if (typeof window !== 'undefined') {\n this.location = window.location;\n this.history = window.history;\n }\n };\n\n // Cached regex for stripping a leading hash/slash and trailing space.\n var routeStripper = /^[#\\/]|\\s+$/g;\n\n // Cached regex for stripping leading and trailing slashes.\n var rootStripper = /^\\/+|\\/+$/g;\n\n // Cached regex for detecting MSIE.\n var isExplorer = /msie [\\w.]+/;\n\n // Cached regex for removing a trailing slash.\n var trailingSlash = /\\/$/;\n\n // Has the history handling already been started?\n History.started = false;\n\n // Set up all inheritable **Backbone.History** properties and methods.\n _.extend(History.prototype, Events, {\n\n // The default interval to poll for hash changes, if necessary, is\n // twenty times a second.\n interval: 50,\n\n // Gets the true hash value. Cannot use location.hash directly due to bug\n // in Firefox where location.hash will always be decoded.\n getHash: function(window) {\n var match = (window || this).location.href.match(/#(.*)$/);\n return match ? match[1] : '';\n },\n\n // Get the cross-browser normalized URL fragment, either from the URL,\n // the hash, or the override.\n getFragment: function(fragment, forcePushState) {\n if (fragment == null) {\n if (this._hasPushState || !this._wantsHashChange || forcePushState) {\n fragment = this.location.pathname;\n var root = this.root.replace(trailingSlash, '');\n if (!fragment.indexOf(root)) fragment = fragment.substr(root.length);\n } else {\n fragment = this.getHash();\n }\n }\n return fragment.replace(routeStripper, '');\n },\n\n // Start the hash change handling, returning `true` if the current URL matches\n // an existing route, and `false` otherwise.\n start: function(options) {\n if (History.started) throw new Error(\"Backbone.history has already been started\");\n History.started = true;\n\n // Figure out the initial configuration. Do we need an iframe?\n // Is pushState desired ... is it available?\n this.options = _.extend({}, {root: '/'}, this.options, options);\n this.root = this.options.root;\n this._wantsHashChange = this.options.hashChange !== false;\n this._wantsPushState = !!this.options.pushState;\n this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);\n var fragment = this.getFragment();\n var docMode = document.documentMode;\n var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));\n\n // Normalize root to always include a leading and trailing slash.\n this.root = ('/' + this.root + '/').replace(rootStripper, '/');\n\n if (oldIE && this._wantsHashChange) {\n this.iframe = Backbone.$('<iframe src=\"javascript:0\" tabindex=\"-1\" />').hide().appendTo('body')[0].contentWindow;\n this.navigate(fragment);\n }\n\n // Depending on whether we're using pushState or hashes, and whether\n // 'onhashchange' is supported, determine how we check the URL state.\n if (this._hasPushState) {\n Backbone.$(window).on('popstate', this.checkUrl);\n } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {\n Backbone.$(window).on('hashchange', this.checkUrl);\n } else if (this._wantsHashChange) {\n this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\n }\n\n // Determine if we need to change the base url, for a pushState link\n // opened by a non-pushState browser.\n this.fragment = fragment;\n var loc = this.location;\n var atRoot = loc.pathname.replace(/[^\\/]$/, '$&/') === this.root;\n\n // If we've started off with a route from a `pushState`-enabled browser,\n // but we're currently in a browser that doesn't support it...\n if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) {\n this.fragment = this.getFragment(null, true);\n this.location.replace(this.root + this.location.search + '#' + this.fragment);\n // Return immediately as browser will do redirect to new url\n return true;\n\n // Or if we've started out with a hash-based route, but we're currently\n // in a browser where it could be `pushState`-based instead...\n } else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {\n this.fragment = this.getHash().replace(routeStripper, '');\n this.history.replaceState({}, document.title, this.root + this.fragment + loc.search);\n }\n\n if (!this.options.silent) return this.loadUrl();\n },\n\n // Disable Backbone.history, perhaps temporarily. Not useful in a real app,\n // but possibly useful for unit testing Routers.\n stop: function() {\n Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);\n clearInterval(this._checkUrlInterval);\n History.started = false;\n },\n\n // Add a route to be tested when the fragment changes. Routes added later\n // may override previous routes.\n route: function(route, callback) {\n this.handlers.unshift({route: route, callback: callback});\n },\n\n // Checks the current URL to see if it has changed, and if it has,\n // calls `loadUrl`, normalizing across the hidden iframe.\n checkUrl: function(e) {\n var current = this.getFragment();\n if (current === this.fragment && this.iframe) {\n current = this.getFragment(this.getHash(this.iframe));\n }\n if (current === this.fragment) return false;\n if (this.iframe) this.navigate(current);\n this.loadUrl() || this.loadUrl(this.getHash());\n },\n\n // Attempt to load the current URL fragment. If a route succeeds with a\n // match, returns `true`. If no defined routes matches the fragment,\n // returns `false`.\n loadUrl: function(fragmentOverride) {\n var fragment = this.fragment = this.getFragment(fragmentOverride);\n var matched = _.any(this.handlers, function(handler) {\n if (handler.route.test(fragment)) {\n handler.callback(fragment);\n return true;\n }\n });\n return matched;\n },\n\n // Save a fragment into the hash history, or replace the URL state if the\n // 'replace' option is passed. You are responsible for properly URL-encoding\n // the fragment in advance.\n //\n // The options object can contain `trigger: true` if you wish to have the\n // route callback be fired (not usually desirable), or `replace: true`, if\n // you wish to modify the current URL without adding an entry to the history.\n navigate: function(fragment, options) {\n if (!History.started) return false;\n if (!options || options === true) options = {trigger: options};\n fragment = this.getFragment(fragment || '');\n if (this.fragment === fragment) return;\n this.fragment = fragment;\n var url = this.root + fragment;\n\n // If pushState is available, we use it to set the fragment as a real URL.\n if (this._hasPushState) {\n this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);\n\n // If hash changes haven't been explicitly disabled, update the hash\n // fragment to store history.\n } else if (this._wantsHashChange) {\n this._updateHash(this.location, fragment, options.replace);\n if (this.iframe && (fragment !== this.getFragment(this.getHash(this.iframe)))) {\n // Opening and closing the iframe tricks IE7 and earlier to push a\n // history entry on hash-tag change. When replace is true, we don't\n // want this.\n if(!options.replace) this.iframe.document.open().close();\n this._updateHash(this.iframe.location, fragment, options.replace);\n }\n\n // If you've told us that you explicitly don't want fallback hashchange-\n // based history, then `navigate` becomes a page refresh.\n } else {\n return this.location.assign(url);\n }\n if (options.trigger) this.loadUrl(fragment);\n },\n\n // Update the hash location, either replacing the current entry, or adding\n // a new one to the browser history.\n _updateHash: function(location, fragment, replace) {\n if (replace) {\n var href = location.href.replace(/(javascript:|#).*$/, '');\n location.replace(href + '#' + fragment);\n } else {\n // Some browsers require that `hash` contains a leading #.\n location.hash = '#' + fragment;\n }\n }\n\n });\n\n // Create the default Backbone.history.\n Backbone.history = new History;\n\n // Backbone.View\n // -------------\n\n // Creating a Backbone.View creates its initial element outside of the DOM,\n // if an existing element is not provided...\n var View = Backbone.View = function(options) {\n this.cid = _.uniqueId('view');\n this._configure(options || {});\n this._ensureElement();\n this.initialize.apply(this, arguments);\n this.delegateEvents();\n };\n\n // Cached regex to split keys for `delegate`.\n var delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n // List of view options to be merged as properties.\n var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];\n\n // Set up all inheritable **Backbone.View** properties and methods.\n _.extend(View.prototype, Events, {\n\n // The default `tagName` of a View's element is `\"div\"`.\n tagName: 'div',\n\n // jQuery delegate for element lookup, scoped to DOM elements within the\n // current view. This should be prefered to global lookups where possible.\n $: function(selector) {\n return this.$el.find(selector);\n },\n\n // Initialize is an empty function by default. Override it with your own\n // initialization logic.\n initialize: function(){},\n\n // **render** is the core function that your view should override, in order\n // to populate its element (`this.el`), with the appropriate HTML. The\n // convention is for **render** to always return `this`.\n render: function() {\n return this;\n },\n\n // Remove this view by taking the element out of the DOM, and removing any\n // applicable Backbone.Events listeners.\n remove: function() {\n this.$el.remove();\n this.stopListening();\n return this;\n },\n\n // Change the view's element (`this.el` property), including event\n // re-delegation.\n setElement: function(element, delegate) {\n if (this.$el) this.undelegateEvents();\n this.$el = element instanceof Backbone.$ ? element : Backbone.$(element);\n this.el = this.$el[0];\n if (delegate !== false) this.delegateEvents();\n return this;\n },\n\n // Set callbacks, where `this.events` is a hash of\n //\n // *{\"event selector\": \"callback\"}*\n //\n // {\n // 'mousedown .title': 'edit',\n // 'click .button': 'save'\n // 'click .open': function(e) { ... }\n // }\n //\n // pairs. Callbacks will be bound to the view, with `this` set properly.\n // Uses event delegation for efficiency.\n // Omitting the selector binds the event to `this.el`.\n // This only works for delegate-able events: not `focus`, `blur`, and\n // not `change`, `submit`, and `reset` in Internet Explorer.\n delegateEvents: function(events) {\n if (!(events || (events = _.result(this, 'events')))) return;\n this.undelegateEvents();\n for (var key in events) {\n var method = events[key];\n if (!_.isFunction(method)) method = this[events[key]];\n if (!method) throw new Error('Method \"' + events[key] + '\" does not exist');\n var match = key.match(delegateEventSplitter);\n var eventName = match[1], selector = match[2];\n method = _.bind(method, this);\n eventName += '.delegateEvents' + this.cid;\n if (selector === '') {\n this.$el.on(eventName, method);\n } else {\n this.$el.on(eventName, selector, method);\n }\n }\n },\n\n // Clears all callbacks previously bound to the view with `delegateEvents`.\n // You usually don't need to use this, but may wish to if you have multiple\n // Backbone views attached to the same DOM element.\n undelegateEvents: function() {\n this.$el.off('.delegateEvents' + this.cid);\n },\n\n // Performs the initial configuration of a View with a set of options.\n // Keys with special meaning *(model, collection, id, className)*, are\n // attached directly to the view.\n _configure: function(options) {\n if (this.options) options = _.extend({}, _.result(this, 'options'), options);\n _.extend(this, _.pick(options, viewOptions));\n this.options = options;\n },\n\n // Ensure that the View has a DOM element to render into.\n // If `this.el` is a string, pass it through `$()`, take the first\n // matching element, and re-assign it to `el`. Otherwise, create\n // an element from the `id`, `className` and `tagName` properties.\n _ensureElement: function() {\n if (!this.el) {\n var attrs = _.extend({}, _.result(this, 'attributes'));\n if (this.id) attrs.id = _.result(this, 'id');\n if (this.className) attrs['class'] = _.result(this, 'className');\n var $el = Backbone.$('<' + _.result(this, 'tagName') + '>').attr(attrs);\n this.setElement($el, false);\n } else {\n this.setElement(_.result(this, 'el'), false);\n }\n }\n\n });\n\n // Backbone.sync\n // -------------\n\n // Map from CRUD to HTTP for our default `Backbone.sync` implementation.\n var methodMap = {\n 'create': 'POST',\n 'update': 'PUT',\n 'patch': 'PATCH',\n 'delete': 'DELETE',\n 'read': 'GET'\n };\n\n // Override this function to change the manner in which Backbone persists\n // models to the server. You will be passed the type of request, and the\n // model in question. By default, makes a RESTful Ajax request\n // to the model's `url()`. Some possible customizations could be:\n //\n // * Use `setTimeout` to batch rapid-fire updates into a single request.\n // * Send up the models as XML instead of JSON.\n // * Persist models via WebSockets instead of Ajax.\n //\n // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests\n // as `POST`, with a `_method` parameter containing the true HTTP method,\n // as well as all requests with the body as `application/x-www-form-urlencoded`\n // instead of `application/json` with the model in a param named `model`.\n // Useful when interfacing with server-side languages like **PHP** that make\n // it difficult to read the body of `PUT` requests.\n Backbone.sync = function(method, model, options) {\n var type = methodMap[method];\n\n // Default options, unless specified.\n _.defaults(options || (options = {}), {\n emulateHTTP: Backbone.emulateHTTP,\n emulateJSON: Backbone.emulateJSON\n });\n\n // Default JSON-request options.\n var params = {type: type, dataType: 'json'};\n\n // Ensure that we have a URL.\n if (!options.url) {\n params.url = _.result(model, 'url') || urlError();\n }\n // Ensure that we have the appropriate request data.\n if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {\n params.contentType = 'application/json';\n params.data = JSON.stringify(options.attrs || model.toJSON(options));\n }\n\n // For older servers, emulate JSON by encoding the request into an HTML-form.\n if (options.emulateJSON) {\n params.contentType = 'application/x-www-form-urlencoded';\n params.data = params.data ? {model: params.data} : {};\n }\n\n // For older servers, emulate HTTP by mimicking the HTTP method with `_method`\n // And an `X-HTTP-Method-Override` header.\n if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {\n params.type = 'POST';\n if (options.emulateJSON) params.data._method = type;\n var beforeSend = options.beforeSend;\n options.beforeSend = function(xhr) {\n xhr.setRequestHeader('X-HTTP-Method-Override', type);\n if (beforeSend) return beforeSend.apply(this, arguments);\n };\n }\n\n // Don't process data on a non-GET request.\n if (params.type !== 'GET' && !options.emulateJSON) {\n params.processData = false;\n }\n\n var success = options.success;\n options.success = function(resp) {\n if (success) success(model, resp, options);\n model.trigger('sync', model, resp, options);\n };\n\n var error = options.error;\n options.error = function(xhr) {\n if (error) error(model, xhr, options);\n model.trigger('error', model, xhr, options);\n };\n\n // Make the request, allowing the user to override any Ajax options.\n var xhr = options.xhr = Backbone.ajax(_.extend(params, options));\n model.trigger('request', model, xhr, options);\n return xhr;\n };\n\n // Set the default implementation of `Backbone.ajax` to proxy through to `$`.\n Backbone.ajax = function() {\n return Backbone.$.ajax.apply(Backbone.$, arguments);\n };\n\n // Helpers\n // -------\n\n // Helper function to correctly set up the prototype chain, for subclasses.\n // Similar to `goog.inherits`, but uses a hash of prototype properties and\n // class properties to be extended.\n var extend = function(protoProps, staticProps) {\n var parent = this;\n var child;\n\n // The constructor function for the new subclass is either defined by you\n // (the \"constructor\" property in your `extend` definition), or defaulted\n // by us to simply call the parent's constructor.\n if (protoProps && _.has(protoProps, 'constructor')) {\n child = protoProps.constructor;\n } else {\n child = function(){ return parent.apply(this, arguments); };\n }\n\n // Add static properties to the constructor function, if supplied.\n _.extend(child, parent, staticProps);\n\n // Set the prototype chain to inherit from `parent`, without calling\n // `parent`'s constructor function.\n var Surrogate = function(){ this.constructor = child; };\n Surrogate.prototype = parent.prototype;\n child.prototype = new Surrogate;\n\n // Add prototype properties (instance properties) to the subclass,\n // if supplied.\n if (protoProps) _.extend(child.prototype, protoProps);\n\n // Set a convenience property in case the parent's prototype is needed\n // later.\n child.__super__ = parent.prototype;\n\n return child;\n };\n\n // Set up inheritance for the model, collection, router, view and history.\n Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;\n\n // Throw an error when a URL is needed, and none is supplied.\n var urlError = function() {\n throw new Error('A \"url\" property or function must be specified');\n };\n\n}).call(this);\n\n// Copyright 2012 Mauricio Santos. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n//\n// Some documentation is borrowed from the official Java API\n// as it serves the same porpose.\n\n/**\n * @namespace Top level namespace for Buckets, a JavaScript data structure library.\n */\nvar buckets = {};\n\n/**\n * Default function to compare element order.\n * @function\n * @private\n */\nbuckets.defaultCompare = function(a, b) {\n if (a < b) {\n return - 1;\n } else if (a === b) {\n return 0;\n } else {\n return 1;\n }\n};\n/**\n * Default function to test equality.\n * @function\n * @private\n */\nbuckets.defaultEquals = function(a, b) {\n return a === b;\n};\n\n/**\n * Default function to convert an object to a string.\n * @function\n * @private\n */\nbuckets.defaultToString = function(item) {\n if (item === null) {\n return 'BUCKETS_NULL';\n } else if (buckets.isUndefined(item)) {\n return 'BUCKETS_UNDEFINED';\n } else if (buckets.isString(item)) {\n return item;\n } else {\n return item.toString();\n }\n};\n\n/**\n * Checks if the given argument is a function.\n * @function\n * @private\n */\nbuckets.isFunction = function(func) {\n return (typeof func) === 'function';\n};\n\n/**\n * Checks if the given argument is undefined.\n * @function\n * @private\n */\nbuckets.isUndefined = function(obj) {\n return (typeof obj) === 'undefined';\n};\n\n/**\n * Checks if the given argument is a string.\n * @function\n * @private\n */\nbuckets.isString = function(obj) {\n return Object.prototype.toString.call(obj) === '[object String]';\n};\n\n/**\n * Reverses a compare function.\n * @function\n * @private\n */\nbuckets.reverseCompareFunction = function(compareFunction) {\n if (!buckets.isFunction(compareFunction)) {\n return function(a, b) {\n if (a < b) {\n return 1;\n } else if (a === b) {\n return 0;\n } else {\n return - 1;\n }\n };\n } else {\n return function(d, v) {\n return compareFunction(d, v) * -1;\n };\n }\n};\n\n/**\n * Returns an equal function given a compare function.\n * @function\n * @private\n */\nbuckets.compareToEquals = function(compareFunction) {\n return function(a, b) {\n return compareFunction(a, b) === 0;\n };\n};\n\n/**\n * @namespace Contains various functions for manipulating arrays.\n */\nbuckets.arrays = {};\n\n/**\n * Returns the position of the first occurrence of the specified item\n * within the specified array.\n * @param {*} array the array in which to search the element.\n * @param {Object} item the element to search.\n * @param {function(Object,Object):boolean=} equalsFunction optional function used to \n * check equality between 2 elements.\n * @return {number} the position of the first occurrence of the specified element\n * within the specified array, or -1 if not found.\n */\nbuckets.arrays.indexOf = function(array, item, equalsFunction) {\n var equals = equalsFunction || buckets.defaultEquals;\n var length = array.length;\n for (var i = 0; i < length; i++) {\n if (equals(array[i], item)) {\n return i;\n }\n }\n return - 1;\n};\n\n/**\n * Returns the position of the last occurrence of the specified element\n * within the specified array.\n * @param {*} array the array in which to search the element.\n * @param {Object} item the element to search.\n * @param {function(Object,Object):boolean=} equalsFunction optional function used to \n * check equality between 2 elements.\n * @return {number} the position of the last occurrence of the specified element\n * within the specified array or -1 if not found.\n */\nbuckets.arrays.lastIndexOf = function(array, item, equalsFunction) {\n var equals = equalsFunction || buckets.defaultEquals;\n var length = array.length;\n for (var i = length - 1; i >= 0; i--) {\n if (equals(array[i], item)) {\n return i;\n }\n }\n return - 1;\n};\n\n/**\n * Returns true if the specified array contains the specified element.\n * @param {*} array the array in which to search the element.\n * @param {Object} item the element to search.\n * @param {function(Object,Object):boolean=} equalsFunction optional function to \n * check equality between 2 elements.\n * @return {boolean} true if the specified array contains the specified element.\n */\nbuckets.arrays.contains = function(array, item, equalsFunction) {\n return buckets.arrays.indexOf(array, item, equalsFunction) >= 0;\n};\n\n\n/**\n * Removes the first ocurrence of the specified element from the specified array.\n * @param {*} array the array in which to search element.\n * @param {Object} item the element to search.\n * @param {function(Object,Object):boolean=} equalsFunction optional function to \n * check equality between 2 elements.\n * @return {boolean} true if the array changed after this call.\n */\nbuckets.arrays.remove = function(array, item, equalsFunction) {\n var index = buckets.arrays.indexOf(array, item, equalsFunction);\n if (index < 0) {\n return false;\n }\n array.splice(index, 1);\n return true;\n};\n\n/**\n * Returns the number of elements in the specified array equal\n * to the specified object.\n * @param {Array} array the array in which to determine the frequency of the element.\n * @param {Object} item the element whose frequency is to be determined.\n * @param {function(Object,Object):boolean=} equalsFunction optional function used to \n * check equality between 2 elements.\n * @return {number} the number of elements in the specified array \n * equal to the specified object.\n */\nbuckets.arrays.frequency = function(array, item, equalsFunction) {\n var equals = equalsFunction || buckets.defaultEquals;\n var length = array.length;\n var freq = 0;\n for (var i = 0; i < length; i++) {\n if (equals(array[i], item)) {\n freq++;\n }\n }\n return freq;\n};\n\n/**\n * Returns true if the two specified arrays are equal to one another.\n * Two arrays are considered equal if both arrays contain the same number\n * of elements, and all corresponding pairs of elements in the two \n * arrays are equal and are in the same order. \n * @param {Array} array1 one array to be tested for equality.\n * @param {Array} array2 the other array to be tested for equality.\n * @param {function(Object,Object):boolean=} equalsFunction optional function used to \n * check equality between elemements in the arrays.\n * @return {boolean} true if the two arrays are equal\n */\nbuckets.arrays.equals = function(array1, array2, equalsFunction) {\n var equals = equalsFunction || buckets.defaultEquals;\n\n if (array1.length !== array2.length) {\n return false;\n }\n var length = array1.length;\n for (var i = 0; i < length; i++) {\n if (!equals(array1[i], array2[i])) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Returns shallow a copy of the specified array.\n * @param {*} array the array to copy.\n * @return {Array} a copy of the specified array\n */\nbuckets.arrays.copy = function(array) {\n return array.concat();\n};\n\n/**\n * Swaps the elements at the specified positions in the specified array.\n * @param {Array} array The array in which to swap elements.\n * @param {number} i the index of one element to be swapped.\n * @param {number} j the index of the other element to be swapped.\n * @return {boolean} true if the array is defined and the indexes are valid.\n */\nbuckets.arrays.swap = function(array, i, j) {\n if (i < 0 || i >= array.length || j < 0 || j >= array.length) {\n return false;\n }\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n return true;\n};\n\n/**\n * Executes the provided function once for each element present in this array \n * starting from index 0 to length - 1.\n * @param {Array} array The array in which to iterate.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one argument: the element value, to break the iteration you can \n * optionally return false.\n */\nbuckets.arrays.forEach = function(array, callback) {\n var lenght = array.length;\n for (var i=0; i < lenght; i++) {\n \t\tif(callback(array[i])===false){\n\t\t\treturn;\n\t\t}\n }\t \n};\n\n/**\n * Creates an empty Linked List.\n * @class A linked list is a data structure consisting of a group of nodes\n * which together represent a sequence.\n * @constructor\n */\nbuckets.LinkedList = function() {\n\n /**\n * First node in the list\n * @type {Object}\n * @private\n */\n this.firstNode = null;\n\n /**\n * Last node in the list\n * @type {Object}\n * @private\n */\n this.lastNode = null;\n\n /**\n * Number of elements in the list\n * @type {number}\n * @private\n */\n this.nElements = 0;\n};\n\n\n/**\n * Adds an element to this list.\n * @param {Object} item element to be added.\n * @param {number=} index optional index to add the element. If no index is specified\n * the element is added to the end of this list.\n * @return {boolean} true if the element was added or false if the index is invalid\n * or if the element is undefined.\n */\nbuckets.LinkedList.prototype.add = function(item, index) {\n\n if (buckets.isUndefined(index)) {\n index = this.nElements;\n }\n if (index < 0 || index > this.nElements || buckets.isUndefined(item)) {\n return false;\n }\n var newNode = this.createNode(item);\n if (this.nElements === 0) {\n // First node in the list.\n this.firstNode = newNode;\n this.lastNode = newNode;\n } else if (index === this.nElements) {\n // Insert at the end.\n this.lastNode.next = newNode;\n this.lastNode = newNode;\n } else if (index === 0) {\n // Change first node.\n newNode.next = this.firstNode;\n this.firstNode = newNode;\n } else {\n var prev = this.nodeAtIndex(index - 1);\n newNode.next = prev.next;\n prev.next = newNode;\n }\n this.nElements++;\n return true;\n};\n\n\n/**\n * Returns the first element in this list.\n * @return {*} the first element of the list or undefined if the list is\n * empty.\n */\nbuckets.LinkedList.prototype.first = function() {\n\n if (this.firstNode !== null) {\n return this.firstNode.element;\n }\n return undefined;\n};\n\n/**\n * Returns the last element in this list.\n * @return {*} the last element in the list or undefined if the list is\n * empty.\n */\nbuckets.LinkedList.prototype.last = function() {\n\n if (this.lastNode !== null) {\n return this.lastNode.element;\n }\n return undefined;\n};\n\n\n/**\n * Returns the element at the specified position in this list.\n * @param {number} index desired index.\n * @return {*} the element at the given index or undefined if the index is\n * out of bounds.\n */\nbuckets.LinkedList.prototype.elementAtIndex = function(index) {\n\n var node = this.nodeAtIndex(index);\n if (node === null) {\n return undefined;\n }\n return node.element;\n};\n\n/**\n * Returns the index in this list of the first occurrence of the\n * specified element, or -1 if the List does not contain this element.\n * <p>If the elements inside this list are\n * not comparable with the === operator a custom equals function should be\n * provided to perform searches, the function must receive two arguments and\n * return true if they are equal, false otherwise. Example:</p>\n *\n * <pre>\n * var petsAreEqualByName = function(pet1, pet2) {\n * return pet1.name === pet2.name;\n * }\n * </pre>\n * @param {Object} item element to search for.\n * @param {function(Object,Object):boolean=} equalsFunction Optional\n * function used to check if two elements are equal.\n * @return {number} the index in this list of the first occurrence\n * of the specified element, or -1 if this list does not contain the\n * element.\n */\nbuckets.LinkedList.prototype.indexOf = function(item, equalsFunction) {\n\n var equalsF = equalsFunction || buckets.defaultEquals;\n if (buckets.isUndefined(item)) {\n return - 1;\n }\n var currentNode = this.firstNode;\n var index = 0;\n while (currentNode !== null) {\n if (equalsF(currentNode.element, item)) {\n return index;\n }\n index++;\n currentNode = currentNode.next;\n }\n return - 1;\n};\n\n/**\n * Returns true if this list contains the specified element.\n * <p>If the elements inside the list are\n * not comparable with the === operator a custom equals function should be\n * provided to perform searches, the function must receive two arguments and\n * return true if they are equal, false otherwise. Example:</p>\n *\n * <pre>\n * var petsAreEqualByName = function(pet1, pet2) {\n * return pet1.name === pet2.name;\n * }\n * </pre>\n * @param {Object} item element to search for.\n * @param {function(Object,Object):boolean=} equalsFunction Optional\n * function used to check if two elements are equal.\n * @return {boolean} true if this list contains the specified element, false\n * otherwise.\n */\nbuckets.LinkedList.prototype.contains = function(item, equalsFunction) {\n return (this.indexOf(item, equalsFunction) >= 0);\n};\n\n/**\n * Removes the first occurrence of the specified element in this list.\n * <p>If the elements inside the list are\n * not comparable with the === operator a custom equals function should be\n * provided to perform searches, the function must receive two arguments and\n * return true if they are equal, false otherwise. Example:</p>\n *\n * <pre>\n * var petsAreEqualByName = function(pet1, pet2) {\n * return pet1.name === pet2.name;\n * }\n * </pre>\n * @param {Object} item element to be removed from this list, if present.\n * @return {boolean} true if the list contained the specified element.\n */\nbuckets.LinkedList.prototype.remove = function(item, equalsFunction) {\n var equalsF = equalsFunction || buckets.defaultEquals;\n if (this.nElements < 1 || buckets.isUndefined(item)) {\n return false;\n }\n var previous = null;\n var currentNode = this.firstNode;\n while (currentNode !== null) {\n\n if (equalsF(currentNode.element, item)) {\n\n if (currentNode === this.firstNode) {\n this.firstNode = this.firstNode.next;\n if (currentNode === this.lastNode) {\n this.lastNode = null;\n }\n } else if (currentNode === this.lastNode) {\n this.lastNode = previous;\n previous.next = currentNode.next;\n currentNode.next = null;\n } else {\n previous.next = currentNode.next;\n currentNode.next = null;\n }\n this.nElements--;\n return true;\n }\n previous = currentNode;\n currentNode = currentNode.next;\n }\n return false;\n};\n\n/**\n * Removes all of the elements from this list.\n */\nbuckets.LinkedList.prototype.clear = function() {\n this.firstNode = null;\n this.lastNode = null;\n this.nElements = 0;\n};\n\n/**\n * Returns true if this list is equal to the given list.\n * Two lists are equal if they have the same elements in the same order.\n * @param {buckets.LinkedList} other the other list.\n * @param {function(Object,Object):boolean=} equalsFunction optional\n * function used to check if two elements are equal. If the elements in the lists\n * are custom objects you should provide a function, otherwise the\n * the === operator is used to check equality between elements.\n * @return {boolean} true if this list is equal to the given list.\n */\nbuckets.LinkedList.prototype.equals = function(other, equalsFunction) {\n var eqF = equalsFunction || buckets.defaultEquals;\n if (! (other instanceof buckets.LinkedList)) {\n return false;\n }\n if (this.size() !== other.size()) {\n return false;\n }\n return this.equalsAux(this.firstNode, other.firstNode, eqF);\n};\n\n/**\n * @private\n */\nbuckets.LinkedList.prototype.equalsAux = function(n1, n2, eqF) {\n while (n1 !== null) {\n if (!eqF(n1.element, n2.element)) {\n return false;\n }\n n1 = n1.next;\n n2 = n2.next;\n }\n return true;\n};\n\n/**\n * Removes the element at the specified position in this list.\n * @param {number} index given index.\n * @return {*} removed element or undefined if the index is out of bounds.\n */\nbuckets.LinkedList.prototype.removeElementAtIndex = function(index) {\n\n if (index < 0 || index >= this.nElements) {\n return undefined;\n }\n var element;\n if (this.nElements === 1) {\n //First node in the list.\n element = this.firstNode.element;\n this.firstNode = null;\n this.lastNode = null;\n } else {\n var previous = this.nodeAtIndex(index - 1);\n if (previous === null) {\n element = this.firstNode.element;\n this.firstNode = this.firstNode.next;\n } else if (previous.next === this.lastNode) {\n element = this.lastNode.element;\n this.lastNode = previous;\n }\n if (previous !== null) {\n element = previous.next.element;\n previous.next = previous.next.next;\n }\n }\n this.nElements--;\n return element;\n};\n\n/**\n * Executes the provided function once for each element present in this list in order.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one argument: the element value, to break the iteration you can \n * optionally return false.\n */\nbuckets.LinkedList.prototype.forEach = function(callback) {\n var currentNode = this.firstNode;\n while (currentNode !== null) {\n if (callback(currentNode.element) === false) {\n break;\n }\n currentNode = currentNode.next;\n }\n};\n\n/**\n * Reverses the order of the elements in this linked list (makes the last \n * element first, and the first element last).\n */\nbuckets.LinkedList.prototype.reverse = function() {\n var previous = null;\n var current = this.firstNode;\n var temp = null;\n while (current !== null) {\n temp = current.next;\n current.next = previous;\n previous = current;\n current = temp;\n }\n temp = this.firstNode;\n this.firstNode = this.lastNode;\n this.lastNode = temp;\n};\n\n\n/**\n * Returns an array containing all of the elements in this list in proper\n * sequence.\n * @return {Array.<*>} an array containing all of the elements in this list,\n * in proper sequence.\n */\nbuckets.LinkedList.prototype.toArray = function() {\n var array = [];\n var currentNode = this.firstNode;\n while (currentNode !== null) {\n array.push(currentNode.element);\n currentNode = currentNode.next;\n }\n return array;\n};\n/**\n * Returns the number of elements in this list.\n * @return {number} the number of elements in this list.\n */\nbuckets.LinkedList.prototype.size = function() {\n return this.nElements;\n};\n\n/**\n * Returns true if this list contains no elements.\n * @return {boolean} true if this list contains no elements.\n */\nbuckets.LinkedList.prototype.isEmpty = function() {\n return this.nElements <= 0;\n};\n\n/**\n * @private\n */\nbuckets.LinkedList.prototype.nodeAtIndex = function(index) {\n\n if (index < 0 || index >= this.nElements) {\n return null;\n }\n if (index === (this.nElements - 1)) {\n return this.lastNode;\n }\n var node = this.firstNode;\n for (var i = 0; i < index; i++) {\n node = node.next;\n }\n return node;\n};\n/**\n * @private\n */\nbuckets.LinkedList.prototype.createNode = function(item) {\n return {\n element: item,\n next: null\n };\n};\n\n\n/**\n * Creates an empty dictionary. \n * @class <p>Dictionaries map keys to values; each key can map to at most one value.\n * This implementation accepts any kind of objects as keys.</p>\n *\n * <p>If the keys are custom objects a function which converts keys to unique\n * strings must be provided. Example:</p>\n * <pre>\n * function petToString(pet) {\n * return pet.name;\n * }\n * </pre>\n * @constructor\n * @param {function(Object):string=} toStrFunction optional function used\n * to convert keys to strings. If the keys aren't strings or if toString()\n * is not appropriate, a custom function which receives a key and returns a\n * unique string must be provided.\n */\nbuckets.Dictionary = function(toStrFunction) {\n\n /**\n * Object holding the key-value pairs.\n * @type {Object}\n * @private\n */\n this.table = {};\n\n /**\n * Number of elements in the list.\n * @type {number}\n * @private\n */\n this.nElements = 0;\n\n /**\n * Function used to convert keys to strings.\n * @type {function(Object):string}\n * @private\n */\n this.toStr = toStrFunction || buckets.defaultToString;\n};\n\n/**\n * Returns the value to which this dictionary maps the specified key.\n * Returns undefined if this dictionary contains no mapping for this key.\n * @param {Object} key key whose associated value is to be returned.\n * @return {*} the value to which this dictionary maps the specified key or\n * undefined if the map contains no mapping for this key.\n */\nbuckets.Dictionary.prototype.get = function(key) {\n\n var pair = this.table[this.toStr(key)];\n if (buckets.isUndefined(pair)) {\n return undefined;\n }\n return pair.value;\n};\n/**\n * Associates the specified value with the specified key in this dictionary.\n * If the dictionary previously contained a mapping for this key, the old\n * value is replaced by the specified value.\n * @param {Object} key key with which the specified value is to be\n * associated.\n * @param {Object} value value to be associated with the specified key.\n * @return {*} previous value associated with the specified key, or undefined if\n * there was no mapping for the key or if the key/value are undefined.\n */\nbuckets.Dictionary.prototype.set = function(key, value) {\n\n if (buckets.isUndefined(key) || buckets.isUndefined(value)) {\n return undefined;\n }\n\n var ret;\n var k = this.toStr(key);\n var previousElement = this.table[k];\n if (buckets.isUndefined(previousElement)) {\n this.nElements++;\n ret = undefined;\n } else {\n ret = previousElement.value;\n }\n this.table[k] = {\n key: key,\n value: value\n };\n return ret;\n};\n/**\n * Removes the mapping for this key from this dictionary if it is present.\n * @param {Object} key key whose mapping is to be removed from the\n * dictionary.\n * @return {*} previous value associated with specified key, or undefined if\n * there was no mapping for key.\n */\nbuckets.Dictionary.prototype.remove = function(key) {\n var k = this.toStr(key);\n var previousElement = this.table[k];\n if (!buckets.isUndefined(previousElement)) {\n delete this.table[k];\n this.nElements--;\n return previousElement.value;\n }\n return undefined;\n};\n/**\n * Returns an array containing all of the keys in this dictionary.\n * @return {Array} an array containing all of the keys in this dictionary.\n */\nbuckets.Dictionary.prototype.keys = function() {\n var array = [];\n for (var name in this.table) {\n if (this.table.hasOwnProperty(name)) {\n array.push(this.table[name].key);\n }\n }\n return array;\n};\n/**\n * Returns an array containing all of the values in this dictionary.\n * @return {Array} an array containing all of the values in this dictionary.\n */\nbuckets.Dictionary.prototype.values = function() {\n var array = [];\n for (var name in this.table) {\n if (this.table.hasOwnProperty(name)) {\n array.push(this.table[name].value);\n }\n }\n return array;\n};\n\n/**\n * Executes the provided function once for each key-value pair \n * present in this dictionary.\n * @param {function(Object,Object):*} callback function to execute, it is\n * invoked with two arguments: key and value. To break the iteration you can \n * optionally return false.\n */\nbuckets.Dictionary.prototype.forEach = function(callback) {\n for (var name in this.table) {\n if (this.table.hasOwnProperty(name)) {\n var pair = this.table[name];\n var ret = callback(pair.key, pair.value);\n if (ret === false) {\n return;\n }\n }\n }\n};\n\n/**\n * Returns true if this dictionary contains a mapping for the specified key.\n * @param {Object} key key whose presence in this dictionary is to be\n * tested.\n * @return {boolean} true if this dictionary contains a mapping for the\n * specified key.\n */\nbuckets.Dictionary.prototype.containsKey = function(key) {\n return ! buckets.isUndefined(this.get(key));\n};\n/**\n * Removes all mappings from this dictionary.\n * @this {buckets.Dictionary}\n */\nbuckets.Dictionary.prototype.clear = function() {\n\n this.table = {};\n this.nElements = 0;\n};\n/**\n * Returns the number of keys in this dictionary.\n * @return {number} the number of key-value mappings in this dictionary.\n */\nbuckets.Dictionary.prototype.size = function() {\n return this.nElements;\n};\n\n/**\n * Returns true if this dictionary contains no mappings.\n * @return {boolean} true if this dictionary contains no mappings.\n */\nbuckets.Dictionary.prototype.isEmpty = function() {\n return this.nElements <= 0;\n};\n\n// /**\n// * Returns true if this dictionary is equal to the given dictionary.\n// * Two dictionaries are equal if they contain the same mappings.\n// * @param {buckets.Dictionary} other the other dictionary.\n// * @param {function(Object,Object):boolean=} valuesEqualFunction optional\n// * function used to check if two values are equal.\n// * @return {boolean} true if this dictionary is equal to the given dictionary.\n// */\n// buckets.Dictionary.prototype.equals = function(other,valuesEqualFunction) {\n// \tvar eqF = valuesEqualFunction || buckets.defaultEquals;\n// \tif(!(other instanceof buckets.Dictionary)){\n// \t\treturn false;\n// \t}\n// \tif(this.size() !== other.size()){\n// \t\treturn false;\n// \t}\n// \treturn this.equalsAux(this.firstNode,other.firstNode,eqF);\n// };\n/**\n * Creates an empty multi dictionary. \n * @class <p>A multi dictionary is a special kind of dictionary that holds\n * multiple values against each key. Setting a value into the dictionary will \n * add the value to an array at that key. Getting a key will return an array,\n * holding all the values set to that key.\n * This implementation accepts any kind of objects as keys.</p>\n *\n * <p>If the keys are custom objects a function which converts keys to strings must be\n * provided. Example:</p>\n *\n * <pre>\n * function petToString(pet) {\n * return pet.name;\n * }\n * </pre>\n * <p>If the values are custom objects a function to check equality between values\n * must be provided. Example:</p>\n *\n * <pre>\n * function petsAreEqualByAge(pet1,pet2) {\n * return pet1.age===pet2.age;\n * }\n * </pre>\n * @constructor\n * @param {function(Object):string=} toStrFunction optional function\n * to convert keys to strings. If the keys aren't strings or if toString()\n * is not appropriate, a custom function which receives a key and returns a\n * unique string must be provided.\n * @param {function(Object,Object):boolean=} valuesEqualsFunction optional\n * function to check if two values are equal.\n * \n */\nbuckets.MultiDictionary = function(toStrFunction, valuesEqualsFunction) {\n // Call the parent's constructor\n this.parent = new buckets.Dictionary(toStrFunction);\n this.equalsF = valuesEqualsFunction || buckets.defaultEquals;\n};\n\n/**\n * Returns an array holding the values to which this dictionary maps\n * the specified key.\n * Returns an empty array if this dictionary contains no mappings for this key.\n * @param {Object} key key whose associated values are to be returned.\n * @return {Array} an array holding the values to which this dictionary maps\n * the specified key.\n */\nbuckets.MultiDictionary.prototype.get = function(key) {\n var values = this.parent.get(key);\n if (buckets.isUndefined(values)) {\n return [];\n }\n return buckets.arrays.copy(values);\n};\n\n/**\n * Adds the value to the array associated with the specified key, if \n * it is not already present.\n * @param {Object} key key with which the specified value is to be\n * associated.\n * @param {Object} value the value to add to the array at the key\n * @return {boolean} true if the value was not already associated with that key.\n */\nbuckets.MultiDictionary.prototype.set = function(key, value) {\n\n if (buckets.isUndefined(key) || buckets.isUndefined(value)) {\n return false;\n }\n if (!this.containsKey(key)) {\n this.parent.set(key, [value]);\n return true;\n }\n var array = this.parent.get(key);\n if (buckets.arrays.contains(array, value, this.equalsF)) {\n return false;\n }\n array.push(value);\n return true;\n};\n\n/**\n * Removes the specified values from the array of values associated with the\n * specified key. If a value isn't given, all values associated with the specified \n * key are removed.\n * @param {Object} key key whose mapping is to be removed from the\n * dictionary.\n * @param {Object=} value optional argument to specify the value to remove \n * from the array associated with the specified key.\n * @return {*} true if the dictionary changed, false if the key doesn't exist or \n * if the specified value isn't associated with the specified key.\n */\nbuckets.MultiDictionary.prototype.remove = function(key, value) {\n if (buckets.isUndefined(value)) {\n var v = this.parent.remove(key);\n if (buckets.isUndefined(v)) {\n return false;\n }\n return true;\n }\n var array = this.parent.get(key);\n if (buckets.arrays.remove(array, value, this.equalsF)) {\n if (array.length === 0) {\n this.parent.remove(key);\n }\n return true;\n }\n return false;\n};\n\n/**\n * Returns an array containing all of the keys in this dictionary.\n * @return {Array} an array containing all of the keys in this dictionary.\n */\nbuckets.MultiDictionary.prototype.keys = function() {\n return this.parent.keys();\n};\n\n/**\n * Returns an array containing all of the values in this dictionary.\n * @return {Array} an array containing all of the values in this dictionary.\n */\nbuckets.MultiDictionary.prototype.values = function() {\n var values = this.parent.values();\n var array = [];\n for (var i = 0; i < values.length; i++) {\n var v = values[i];\n for (var j = 0; j < v.length; j++) {\n array.push(v[j]);\n }\n }\n return array;\n};\n\n/**\n * Returns true if this dictionary at least one value associatted the specified key.\n * @param {Object} key key whose presence in this dictionary is to be\n * tested.\n * @return {boolean} true if this dictionary at least one value associatted \n * the specified key.\n */\nbuckets.MultiDictionary.prototype.containsKey = function(key) {\n return this.parent.containsKey(key);\n};\n\n/**\n * Removes all mappings from this dictionary.\n */\nbuckets.MultiDictionary.prototype.clear = function() {\n return this.parent.clear();\n};\n\n/**\n * Returns the number of keys in this dictionary.\n * @return {number} the number of key-value mappings in this dictionary.\n */\nbuckets.MultiDictionary.prototype.size = function() {\n return this.parent.size();\n};\n\n/**\n * Returns true if this dictionary contains no mappings.\n * @return {boolean} true if this dictionary contains no mappings.\n */\nbuckets.MultiDictionary.prototype.isEmpty = function() {\n return this.parent.isEmpty();\n};\n\n/**\n * Creates an empty Heap.\n * @class \n * <p>A heap is a binary tree, where the nodes maintain the heap property: \n * each node is smaller than each of its children. \n * This implementation uses an array to store elements.</p>\n * <p>If the inserted elements are custom objects a compare function must be provided, \n * at construction time, otherwise the <=, === and >= operators are \n * used to compare elements. Example:</p>\n *\n * <pre>\n * function compare(a, b) {\n * if (a is less than b by some ordering criterion) {\n * return -1;\n * } if (a is greater than b by the ordering criterion) {\n * return 1;\n * } \n * // a must be equal to b\n * return 0;\n * }\n * </pre>\n *\n * <p>If a Max-Heap is wanted (greater elements on top) you can a provide a\n * reverse compare function to accomplish that behavior. Example:</p>\n *\n * <pre>\n * function reverseCompare(a, b) {\n * if (a is less than b by some ordering criterion) {\n * return 1;\n * } if (a is greater than b by the ordering criterion) {\n * return -1;\n * } \n * // a must be equal to b\n * return 0;\n * }\n * </pre>\n *\n * @constructor\n * @param {function(Object,Object):number=} compareFunction optional\n * function used to compare two elements. Must return a negative integer,\n * zero, or a positive integer as the first argument is less than, equal to,\n * or greater than the second.\n */\nbuckets.Heap = function(compareFunction) {\n\n /**\n * Array used to store the elements od the heap.\n * @type {Array.<Object>}\n * @private\n */\n this.data = [];\n\n /**\n * Function used to compare elements.\n * @type {function(Object,Object):number}\n * @private\n */\n this.compare = compareFunction || buckets.defaultCompare;\n};\n/**\n * Returns the index of the left child of the node at the given index.\n * @param {number} nodeIndex The index of the node to get the left child\n * for.\n * @return {number} The index of the left child.\n * @private\n */\nbuckets.Heap.prototype.leftChildIndex = function(nodeIndex) {\n return (2 * nodeIndex) + 1;\n};\n/**\n * Returns the index of the right child of the node at the given index.\n * @param {number} nodeIndex The index of the node to get the right child\n * for.\n * @return {number} The index of the right child.\n * @private\n */\nbuckets.Heap.prototype.rightChildIndex = function(nodeIndex) {\n return (2 * nodeIndex) + 2;\n};\n/**\n * Returns the index of the parent of the node at the given index.\n * @param {number} nodeIndex The index of the node to get the parent for.\n * @return {number} The index of the parent.\n * @private\n */\nbuckets.Heap.prototype.parentIndex = function(nodeIndex) {\n return Math.floor((nodeIndex - 1) / 2);\n};\n/**\n * Returns the index of the smaller child node (if it exists).\n * @param {number} leftChild left child index.\n * @param {number} rightChild right child index.\n * @return {number} the index with the minimum value or -1 if it doesn't\n * exists.\n * @private\n */\nbuckets.Heap.prototype.minIndex = function(leftChild, rightChild) {\n\n if (rightChild >= this.data.length) {\n if (leftChild >= this.data.length) {\n return - 1;\n } else {\n return leftChild;\n }\n } else {\n if (this.compare(this.data[leftChild], this.data[rightChild]) <= 0) {\n return leftChild;\n } else {\n return rightChild;\n }\n }\n};\n/**\n * Moves the node at the given index up to its proper place in the heap.\n * @param {number} index The index of the node to move up.\n * @private\n */\nbuckets.Heap.prototype.siftUp = function(index) {\n\n var parent = this.parentIndex(index);\n while (index > 0 && this.compare(this.data[parent], this.data[index]) > 0) {\n buckets.arrays.swap(this.data, parent, index);\n index = parent;\n parent = this.parentIndex(index);\n }\n};\n/**\n * Moves the node at the given index down to its proper place in the heap.\n * @param {number} nodeIndex The index of the node to move down.\n * @private\n */\nbuckets.Heap.prototype.siftDown = function(nodeIndex) {\n\n //smaller child index\n var min = this.minIndex(this.leftChildIndex(nodeIndex),\n this.rightChildIndex(nodeIndex));\n\n while (min >= 0 && this.compare(this.data[nodeIndex],\n this.data[min]) > 0) {\n buckets.arrays.swap(this.data, min, nodeIndex);\n nodeIndex = min;\n min = this.minIndex(this.leftChildIndex(nodeIndex),\n this.rightChildIndex(nodeIndex));\n }\n};\n/**\n * Retrieves but does not remove the root element of this heap.\n * @return {*} The value at the root of the heap. Returns undefined if the\n * heap is empty.\n */\nbuckets.Heap.prototype.peek = function() {\n\n if (this.data.length > 0) {\n return this.data[0];\n } else {\n return undefined;\n }\n};\n/**\n * Adds the given element into the heap.\n * @param {*} element the element.\n * @return true if the element was added or fals if it is undefined.\n */\nbuckets.Heap.prototype.add = function(element) {\n if (buckets.isUndefined(element)) {\n return undefined;\n }\n this.data.push(element);\n this.siftUp(this.data.length - 1);\n return true;\n};\n\n/**\n * Retrieves and removes the root element of this heap.\n * @return {*} The value removed from the root of the heap. Returns\n * undefined if the heap is empty.\n */\nbuckets.Heap.prototype.removeRoot = function() {\n\n if (this.data.length > 0) {\n var obj = this.data[0];\n this.data[0] = this.data[this.data.length - 1];\n this.data.splice(this.data.length - 1, 1);\n if (this.data.length > 0) {\n this.siftDown(0);\n }\n return obj;\n }\n return undefined;\n};\n/**\n * Returns true if this heap contains the specified element.\n * @param {Object} element element to search for.\n * @return {boolean} true if this Heap contains the specified element, false\n * otherwise.\n */\nbuckets.Heap.prototype.contains = function(element) {\n var equF = buckets.compareToEquals(this.compare);\n return buckets.arrays.contains(this.data, element, equF);\n};\n/**\n * Returns the number of elements in this heap.\n * @return {number} the number of elements in this heap.\n */\nbuckets.Heap.prototype.size = function() {\n return this.data.length;\n};\n/**\n * Checks if this heap is empty.\n * @return {boolean} true if and only if this heap contains no items; false\n * otherwise.\n */\nbuckets.Heap.prototype.isEmpty = function() {\n return this.data.length <= 0;\n};\n/**\n * Removes all of the elements from this heap.\n */\nbuckets.Heap.prototype.clear = function() {\n this.data.length = 0;\n};\n\n/**\n * Executes the provided function once for each element present in this heap in \n * no particular order.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one argument: the element value, to break the iteration you can \n * optionally return false.\n */\nbuckets.Heap.prototype.forEach = function(callback) {\n buckets.arrays.forEach(this.data,callback);\n};\n\n/**\n * Creates an empty Stack.\n * @class A Stack is a Last-In-First-Out (LIFO) data structure, the last\n * element added to the stack will be the first one to be removed. This\n * implementation uses a linked list as a container.\n * @constructor\n */\nbuckets.Stack = function() {\n\n /**\n * List containing the elements.\n * @type buckets.LinkedList\n * @private\n */\n this.list = new buckets.LinkedList();\n};\n/**\n * Pushes an item onto the top of this stack.\n * @param {Object} elem the element to be pushed onto this stack.\n * @return {boolean} true if the element was pushed or false if it is undefined.\n */\nbuckets.Stack.prototype.push = function(elem) {\n return this.list.add(elem, 0);\n};\n/**\n * Pushes an item onto the top of this stack.\n * @param {Object} elem the element to be pushed onto this stack.\n * @return {boolean} true if the element was pushed or false if it is undefined.\n */\nbuckets.Stack.prototype.add = function(elem) {\n return this.list.add(elem, 0);\n};\n/**\n * Removes the object at the top of this stack and returns that object.\n * @return {*} the object at the top of this stack or undefined if the\n * stack is empty.\n */\nbuckets.Stack.prototype.pop = function() {\n return this.list.removeElementAtIndex(0);\n};\n/**\n * Looks at the object at the top of this stack without removing it from the\n * stack.\n * @return {*} the object at the top of this stack or undefined if the\n * stack is empty.\n */\nbuckets.Stack.prototype.peek = function() {\n return this.list.first();\n};\n/**\n * Returns the number of elements in this stack.\n * @return {number} the number of elements in this stack.\n */\nbuckets.Stack.prototype.size = function() {\n return this.list.size();\n};\n\n/**\n * Returns true if this stack contains the specified element.\n * <p>If the elements inside this stack are\n * not comparable with the === operator, a custom equals function should be\n * provided to perform searches, the function must receive two arguments and\n * return true if they are equal, false otherwise. Example:</p>\n *\n * <pre>\n * var petsAreEqualByName = function(pet1, pet2) {\n * return pet1.name === pet2.name;\n * }\n * </pre>\n * @param {Object} elem element to search for.\n * @param {function(Object,Object):boolean=} equalsFunction optional\n * function to check if two elements are equal.\n * @return {boolean} true if this stack contains the specified element,\n * false otherwise.\n */\nbuckets.Stack.prototype.contains = function(elem, equalsFunction) {\n return this.list.contains(elem, equalsFunction);\n};\n/**\n * Checks if this stack is empty.\n * @return {boolean} true if and only if this stack contains no items; false\n * otherwise.\n */\nbuckets.Stack.prototype.isEmpty = function() {\n return this.list.isEmpty();\n};\n/**\n * Removes all of the elements from this stack.\n */\nbuckets.Stack.prototype.clear = function() {\n this.list.clear();\n};\n\n/**\n * Executes the provided function once for each element present in this stack in \n * LIFO order.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one argument: the element value, to break the iteration you can \n * optionally return false.\n */\nbuckets.Stack.prototype.forEach = function(callback) {\n this.list.forEach(callback);\n};\n\n/**\n * Creates an empty queue.\n * @class A queue is a First-In-First-Out (FIFO) data structure, the first\n * element added to the queue will be the first one to be removed. This\n * implementation uses a linked list as a container.\n * @constructor\n */\nbuckets.Queue = function() {\n\n /**\n * List containing the elements.\n * @type buckets.LinkedList\n * @private\n */\n this.list = new buckets.LinkedList();\n};\n/**\n * Inserts the specified element into the end of this queue.\n * @param {Object} elem the element to insert.\n * @return {boolean} true if the element was inserted, or false if it is undefined.\n */\nbuckets.Queue.prototype.enqueue = function(elem) {\n return this.list.add(elem);\n};\n/**\n * Inserts the specified element into the end of this queue.\n * @param {Object} elem the element to insert.\n * @return {boolean} true if the element was inserted, or false if it is undefined.\n */\nbuckets.Queue.prototype.add = function(elem) {\n return this.list.add(elem);\n};\n/**\n * Retrieves and removes the head of this queue.\n * @return {*} the head of this queue, or undefined if this queue is empty.\n */\nbuckets.Queue.prototype.dequeue = function() {\n if (this.list.size() !== 0) {\n var el = this.list.first();\n this.list.removeElementAtIndex(0);\n return el;\n }\n return undefined;\n};\n/**\n * Retrieves, but does not remove, the head of this queue.\n * @return {*} the head of this queue, or undefined if this queue is empty.\n */\nbuckets.Queue.prototype.peek = function() {\n\n if (this.list.size() !== 0) {\n return this.list.first();\n }\n return undefined;\n};\n\n/**\n * Returns the number of elements in this queue.\n * @return {number} the number of elements in this queue.\n */\nbuckets.Queue.prototype.size = function() {\n return this.list.size();\n};\n\n/**\n * Returns true if this queue contains the specified element.\n * <p>If the elements inside this stack are\n * not comparable with the === operator, a custom equals function should be\n * provided to perform searches, the function must receive two arguments and\n * return true if they are equal, false otherwise. Example:</p>\n *\n * <pre>\n * var petsAreEqualByName = function(pet1, pet2) {\n * return pet1.name === pet2.name;\n * }\n * </pre>\n * @param {Object} elem element to search for.\n * @param {function(Object,Object):boolean=} equalsFunction optional\n * function to check if two elements are equal.\n * @return {boolean} true if this queue contains the specified element,\n * false otherwise.\n */\nbuckets.Queue.prototype.contains = function(elem, equalsFunction) {\n return this.list.contains(elem, equalsFunction);\n};\n\n/**\n * Checks if this queue is empty.\n * @return {boolean} true if and only if this queue contains no items; false\n * otherwise.\n */\nbuckets.Queue.prototype.isEmpty = function() {\n return this.list.size() <= 0;\n};\n\n/**\n * Removes all of the elements from this queue.\n */\nbuckets.Queue.prototype.clear = function() {\n this.list.clear();\n};\n\n/**\n * Executes the provided function once for each element present in this queue in \n * FIFO order.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one argument: the element value, to break the iteration you can \n * optionally return false.\n */\nbuckets.Queue.prototype.forEach = function(callback) {\n this.list.forEach(callback);\n};\n\n/**\n * Creates an empty priority queue.\n * @class <p>In a priority queue each element is associated with a \"priority\",\n * elements are dequeued in highest-priority-first order (the elements with the \n * highest priority are dequeued first). Priority Queues are implemented as heaps. \n * If the inserted elements are custom objects a compare function must be provided, \n * otherwise the <=, === and >= operators are used to compare object priority.</p>\n * <pre>\n * function compare(a, b) {\n * if (a is less than b by some ordering criterion) {\n * return -1;\n * } if (a is greater than b by the ordering criterion) {\n * return 1;\n * } \n * // a must be equal to b\n * return 0;\n * }\n * </pre>\n * @constructor\n * @param {function(Object,Object):number=} compareFunction optional\n * function used to compare two element priorities. Must return a negative integer,\n * zero, or a positive integer as the first argument is less than, equal to,\n * or greater than the second.\n */\nbuckets.PriorityQueue = function(compareFunction) {\n this.heap = new buckets.Heap(buckets.reverseCompareFunction(compareFunction));\n};\n\n/**\n * Inserts the specified element into this priority queue.\n * @param {Object} element the element to insert.\n * @return {boolean} true if the element was inserted, or false if it is undefined.\n */\nbuckets.PriorityQueue.prototype.enqueue = function(element) {\n return this.heap.add(element);\n};\n\n/**\n * Inserts the specified element into this priority queue.\n * @param {Object} element the element to insert.\n * @return {boolean} true if the element was inserted, or false if it is undefined.\n */\nbuckets.PriorityQueue.prototype.add = function(element) {\n return this.heap.add(element);\n};\n\n/**\n * Retrieves and removes the highest priority element of this queue.\n * @return {*} the the highest priority element of this queue, \nor undefined if this queue is empty.\n */\nbuckets.PriorityQueue.prototype.dequeue = function() {\n if (this.heap.size() !== 0) {\n var el = this.heap.peek();\n this.heap.removeRoot();\n return el;\n }\n return undefined;\n};\n\n/**\n * Retrieves, but does not remove, the highest priority element of this queue.\n * @return {*} the highest priority element of this queue, or undefined if this queue is empty.\n */\nbuckets.PriorityQueue.prototype.peek = function() {\n return this.heap.peek();\n};\n\n/**\n * Returns true if this priority queue contains the specified element.\n * @param {Object} element element to search for.\n * @return {boolean} true if this priority queue contains the specified element,\n * false otherwise.\n */\nbuckets.PriorityQueue.prototype.contains = function(element) {\n return this.heap.contains(element);\n};\n\n/**\n * Checks if this priority queue is empty.\n * @return {boolean} true if and only if this priority queue contains no items; false\n * otherwise.\n */\nbuckets.PriorityQueue.prototype.isEmpty = function() {\n return this.heap.isEmpty();\n};\n\n/**\n * Returns the number of elements in this priority queue.\n * @return {number} the number of elements in this priority queue.\n */\nbuckets.PriorityQueue.prototype.size = function() {\n return this.heap.size();\n};\n\n/**\n * Removes all of the elements from this priority queue.\n */\nbuckets.PriorityQueue.prototype.clear = function() {\n this.heap.clear();\n};\n\n/**\n * Executes the provided function once for each element present in this queue in \n * no particular order.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one argument: the element value, to break the iteration you can \n * optionally return false.\n */\nbuckets.PriorityQueue.prototype.forEach = function(callback) {\n buckets.heap.forEach(callback);\n};\n\n\n/**\n * Creates an empty set.\n * @class <p>A set is a data structure that contains no duplicate items.</p>\n * <p>If the inserted elements are custom objects a function \n * which converts elements to strings must be provided. Example:</p>\n *\n * <pre>\n * function petToString(pet) {\n * return pet.name;\n * }\n * </pre>\n *\n * @constructor\n * @param {function(Object):string=} toStringFunction optional function used\n * to convert elements to strings. If the elements aren't strings or if toString()\n * is not appropriate, a custom function which receives a onject and returns a\n * unique string must be provided.\n */\nbuckets.Set = function(toStringFunction) {\n this.dictionary = new buckets.Dictionary(toStringFunction);\n};\n\n/**\n * Returns true if this set contains the specified element.\n * @param {Object} element element to search for.\n * @return {boolean} true if this set contains the specified element,\n * false otherwise.\n */\nbuckets.Set.prototype.contains = function(element) {\n return this.dictionary.containsKey(element);\n};\n\n/**\n * Adds the specified element to this set if it is not already present.\n * @param {Object} element the element to insert.\n * @return {boolean} true if this set did not already contain the specified element.\n */\nbuckets.Set.prototype.add = function(element) {\n if (this.contains(element) || buckets.isUndefined(element)) {\n return false;\n } else {\n this.dictionary.set(element, element);\n return true;\n }\n};\n\n/**\n * Performs an intersecion between this an another set.\n * Removes all values that are not present this set and the given set.\n * @param {buckets.Set} otherSet other set.\n */\nbuckets.Set.prototype.intersection = function(otherSet) {\n var set = this;\n this.forEach(function(element) {\n if (!otherSet.contains(element)) {\n set.remove(element);\n }\n });\n};\n\n/**\n * Performs a union between this an another set.\n * Adds all values from the given set to this set.\n * @param {buckets.Set} otherSet other set.\n */\nbuckets.Set.prototype.union = function(otherSet) {\n var set = this;\n otherSet.forEach(function(element) {\n set.add(element);\n });\n};\n\n/**\n * Performs a difference between this an another set.\n * Removes from this set all the values that are present in the given set.\n * @param {buckets.Set} otherSet other set.\n */\nbuckets.Set.prototype.difference = function(otherSet) {\n var set = this;\n otherSet.forEach(function(element) {\n set.remove(element);\n });\n};\n\n/**\n * Checks whether the given set contains all the elements in this set.\n * @param {buckets.Set} otherSet other set.\n * @return {boolean} true if this set is a subset of the given set.\n */\nbuckets.Set.prototype.isSubsetOf = function(otherSet) {\n if (this.size() > otherSet.size()) {\n return false;\n }\n\n this.forEach(function(element) {\n if (!otherSet.contains(element)) {\n return false;\n }\n });\n return true;\n};\n\n/**\n * Removes the specified element from this set if it is present.\n * @return {boolean} true if this set contained the specified element.\n */\nbuckets.Set.prototype.remove = function(element) {\n if (!this.contains(element)) {\n return false;\n } else {\n this.dictionary.remove(element);\n return true;\n }\n};\n\n/**\n * Executes the provided function once for each element \n * present in this set.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one arguments: the element. To break the iteration you can \n * optionally return false.\n */\nbuckets.Set.prototype.forEach = function(callback) {\n this.dictionary.forEach(function(k, v) {\n return callback(v);\n });\n};\n\n/**\n * Returns an array containing all of the elements in this set in arbitrary order.\n * @return {Array} an array containing all of the elements in this set.\n */\nbuckets.Set.prototype.toArray = function() {\n return this.dictionary.values();\n};\n\n/**\n * Returns true if this set contains no elements.\n * @return {boolean} true if this set contains no elements.\n */\nbuckets.Set.prototype.isEmpty = function() {\n return this.dictionary.isEmpty();\n};\n\n/**\n * Returns the number of elements in this set.\n * @return {number} the number of elements in this set.\n */\nbuckets.Set.prototype.size = function() {\n return this.dictionary.size();\n};\n\n/**\n * Removes all of the elements from this set.\n */\nbuckets.Set.prototype.clear = function() {\n this.dictionary.clear();\n};\n\n/**\n * Creates an empty bag.\n * @class <p>A bag is a special kind of set in which members are \n * allowed to appear more than once.</p>\n * <p>If the inserted elements are custom objects a function \n * which converts elements to unique strings must be provided. Example:</p>\n *\n * <pre>\n * function petToString(pet) {\n * return pet.name;\n * }\n * </pre>\n *\n * @constructor\n * @param {function(Object):string=} toStringFunction optional function used\n * to convert elements to strings. If the elements aren't strings or if toString()\n * is not appropriate, a custom function which receives an object and returns a\n * unique string must be provided.\n */\nbuckets.Bag = function(toStrFunction) {\n this.toStrF = toStrFunction || buckets.defaultToString;\n this.dictionary = new buckets.Dictionary(this.toStrF);\n this.nElements = 0;\n};\n\n/**\n* Adds nCopies of the specified object to this bag.\n* @param {Object} element element to add.\n* @param {number=} nCopies the number of copies to add, if this argument is\n* undefined 1 copy is added.\n* @return {boolean} true unless element is undefined.\n*/\nbuckets.Bag.prototype.add = function(element, nCopies) {\n\n if (isNaN(nCopies) || buckets.isUndefined(nCopies)) {\n nCopies = 1;\n }\n if (buckets.isUndefined(element) || nCopies <= 0) {\n return false;\n }\n\n if (!this.contains(element)) {\n var node = {\n value: element,\n copies: nCopies\n };\n this.dictionary.set(element, node);\n } else {\n this.dictionary.get(element).copies += nCopies;\n }\n this.nElements += nCopies;\n return true;\n};\n\n/**\n* Counts the number of copies of the specified object in this bag.\n* @param {Object} element the object to search for..\n* @return {number} the number of copies of the object, 0 if not found\n*/\nbuckets.Bag.prototype.count = function(element) {\n\n if (!this.contains(element)) {\n return 0;\n } else {\n return this.dictionary.get(element).copies;\n }\n};\n\n/**\n * Returns true if this bag contains the specified element.\n * @param {Object} element element to search for.\n * @return {boolean} true if this bag contains the specified element,\n * false otherwise.\n */\nbuckets.Bag.prototype.contains = function(element) {\n return this.dictionary.containsKey(element);\n};\n\n/**\n* Removes nCopies of the specified object to this bag.\n* If the number of copies to remove is greater than the actual number \n* of copies in the Bag, all copies are removed. \n* @param {Object} element element to remove.\n* @param {number=} nCopies the number of copies to remove, if this argument is\n* undefined 1 copy is removed.\n* @return {boolean} true if at least 1 element was removed.\n*/\nbuckets.Bag.prototype.remove = function(element, nCopies) {\n\n if (isNaN(nCopies) || buckets.isUndefined(nCopies)) {\n nCopies = 1;\n }\n if (buckets.isUndefined(element) || nCopies <= 0) {\n return false;\n }\n\n if (!this.contains(element)) {\n return false;\n } else {\n var node = this.dictionary.get(element);\n if (nCopies > node.copies) {\n this.nElements -= node.copies;\n } else {\n this.nElements -= nCopies;\n }\n node.copies -= nCopies;\n if (node.copies <= 0) {\n this.dictionary.remove(element);\n }\n return true;\n }\n};\n\n/**\n * Returns an array containing all of the elements in this big in arbitrary order, \n * including multiple copies.\n * @return {Array} an array containing all of the elements in this bag.\n */\nbuckets.Bag.prototype.toArray = function() {\n var a = [];\n var values = this.dictionary.values();\n var vl = values.length;\n for (var i = 0; i < vl; i++) {\n var node = values[i];\n var element = node.value;\n var copies = node.copies;\n for (var j = 0; j < copies; j++) {\n a.push(element);\n }\n }\n return a;\n};\n\n/**\n * Returns a set of unique elements in this bag. \n * @return {buckets.Set} a set of unique elements in this bag.\n */\nbuckets.Bag.prototype.toSet = function() {\n var set = new buckets.Set(this.toStrF);\n var elements = this.dictionary.values();\n var l = elements.length;\n for (var i = 0; i < l; i++) {\n var value = elements[i].value;\n set.add(value);\n }\n return set;\n};\n\n/**\n * Executes the provided function once for each element \n * present in this bag, including multiple copies.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one argument: the element. To break the iteration you can \n * optionally return false.\n */\nbuckets.Bag.prototype.forEach = function(callback) {\n this.dictionary.forEach(function(k, v) {\n var value = v.value;\n var copies = v.copies;\n for (var i = 0; i < copies; i++) {\n if (callback(value) === false) {\n return false;\n }\n }\n return true;\n });\n};\n/**\n * Returns the number of elements in this bag.\n * @return {number} the number of elements in this bag.\n */\nbuckets.Bag.prototype.size = function() {\n return this.nElements;\n};\n\n/**\n * Returns true if this bag contains no elements.\n * @return {boolean} true if this bag contains no elements.\n */\nbuckets.Bag.prototype.isEmpty = function() {\n return this.nElements === 0;\n};\n\n/**\n * Removes all of the elements from this bag.\n */\nbuckets.Bag.prototype.clear = function() {\n this.nElements = 0;\n this.dictionary.clear();\n};\n\n\n\n/**\n * Creates an empty binary search tree.\n * @class <p>A binary search tree is a binary tree in which each \n * internal node stores an element such that the elements stored in the \n * left subtree are less than it and the elements \n * stored in the right subtree are greater.</p>\n * <p>Formally, a binary search tree is a node-based binary tree data structure which \n * has the following properties:</p>\n * <ul>\n * <li>The left subtree of a node contains only nodes with elements less \n * than the node's element</li>\n * <li>The right subtree of a node contains only nodes with elements greater \n * than the node's element</li>\n * <li>Both the left and right subtrees must also be binary search trees.</li>\n * </ul>\n * <p>If the inserted elements are custom objects a compare function must \n * be provided at construction time, otherwise the <=, === and >= operators are \n * used to compare elements. Example:</p>\n * <pre>\n * function compare(a, b) {\n * if (a is less than b by some ordering criterion) {\n * return -1;\n * } if (a is greater than b by the ordering criterion) {\n * return 1;\n * } \n * // a must be equal to b\n * return 0;\n * }\n * </pre>\n * @constructor\n * @param {function(Object,Object):number=} compareFunction optional\n * function used to compare two elements. Must return a negative integer,\n * zero, or a positive integer as the first argument is less than, equal to,\n * or greater than the second.\n */\nbuckets.BSTree = function(compareFunction) {\n this.root = null;\n this.compare = compareFunction || buckets.defaultCompare;\n this.nElements = 0;\n};\n\n\n/**\n * Adds the specified element to this tree if it is not already present.\n * @param {Object} element the element to insert.\n * @return {boolean} true if this tree did not already contain the specified element.\n */\nbuckets.BSTree.prototype.add = function(element) {\n if (buckets.isUndefined(element)) {\n return false;\n }\n\n if (this.insertNode(this.createNode(element)) !== null) {\n this.nElements++;\n return true;\n }\n return false;\n};\n\n/**\n * Removes all of the elements from this tree.\n */\nbuckets.BSTree.prototype.clear = function() {\n this.root = null;\n this.nElements = 0;\n};\n\n/**\n * Returns true if this tree contains no elements.\n * @return {boolean} true if this tree contains no elements.\n */\nbuckets.BSTree.prototype.isEmpty = function() {\n return this.nElements === 0;\n};\n\n/**\n * Returns the number of elements in this tree.\n * @return {number} the number of elements in this tree.\n */\nbuckets.BSTree.prototype.size = function() {\n return this.nElements;\n};\n\n/**\n * Returns true if this tree contains the specified element.\n * @param {Object} element element to search for.\n * @return {boolean} true if this tree contains the specified element,\n * false otherwise.\n */\nbuckets.BSTree.prototype.contains = function(element) {\n if (buckets.isUndefined(element)) {\n return false;\n }\n return this.searchNode(this.root, element) !== null;\n};\n\n/**\n * Removes the specified element from this tree if it is present.\n * @return {boolean} true if this tree contained the specified element.\n */\nbuckets.BSTree.prototype.remove = function(element) {\n var node = this.searchNode(this.root, element);\n if (node === null) {\n return false;\n }\n this.removeNode(node);\n this.nElements--;\n return true;\n};\n\n/**\n * Executes the provided function once for each element present in this tree in \n * in-order.\n * @param {function(Object):*} callback function to execute, it is invoked with one \n * argument: the element value, to break the iteration you can optionally return false.\n */\nbuckets.BSTree.prototype.inorderTraversal = function(callback) {\n this.inorderTraversalAux(this.root, callback, {\n stop: false\n });\n};\n\n/**\n * Executes the provided function once for each element present in this tree in pre-order.\n * @param {function(Object):*} callback function to execute, it is invoked with one \n * argument: the element value, to break the iteration you can optionally return false.\n */\nbuckets.BSTree.prototype.preorderTraversal = function(callback) {\n this.preorderTraversalAux(this.root, callback, {\n stop: false\n });\n};\n\n/**\n * Executes the provided function once for each element present in this tree in post-order.\n * @param {function(Object):*} callback function to execute, it is invoked with one \n * argument: the element value, to break the iteration you can optionally return false.\n */\nbuckets.BSTree.prototype.postorderTraversal = function(callback) {\n this.postorderTraversalAux(this.root, callback, {\n stop: false\n });\n};\n\n/**\n * Executes the provided function once for each element present in this tree in \n * level-order.\n * @param {function(Object):*} callback function to execute, it is invoked with one \n * argument: the element value, to break the iteration you can optionally return false.\n */\nbuckets.BSTree.prototype.levelTraversal = function(callback) {\n this.levelTraversalAux(this.root, callback);\n};\n\n/**\n * Returns the minimum element of this tree.\n * @return {*} the minimum element of this tree or undefined if this tree is\n * is empty.\n */\nbuckets.BSTree.prototype.minimum = function() {\n if (this.isEmpty()) {\n return undefined;\n }\n return this.minimumAux(this.root).element;\n};\n\n/**\n * Returns the maximum element of this tree.\n * @return {*} the maximum element of this tree or undefined if this tree is\n * is empty.\n */\nbuckets.BSTree.prototype.maximum = function() {\n if (this.isEmpty()) {\n return undefined;\n }\n return this.maximumAux(this.root).element;\n};\n\n/**\n * Executes the provided function once for each element present in this tree in inorder.\n * Equivalent to inorderTraversal.\n * @param {function(Object):*} callback function to execute, it is\n * invoked with one argument: the element value, to break the iteration you can \n * optionally return false.\n */\nbuckets.BSTree.prototype.forEach = function(callback) {\n this.inorderTraversal(callback);\n};\n\n/**\n * Returns an array containing all of the elements in this tree in in-order.\n * @return {Array} an array containing all of the elements in this tree in in-order.\n */\nbuckets.BSTree.prototype.toArray = function() {\n var array = [];\n this.inorderTraversal(function(element) {\n array.push(element);\n });\n return array;\n};\n\n/**\n * Returns the height of this tree.\n * @return {number} the height of this tree or -1 if is empty.\n */\nbuckets.BSTree.prototype.height = function() {\n return this.heightAux(this.root);\n};\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.searchNode = function(node, element) {\n var cmp = null;\n while (node !== null && cmp !== 0) {\n cmp = this.compare(element, node.element);\n if (cmp < 0) {\n node = node.leftCh;\n } else if (cmp > 0) {\n node = node.rightCh;\n }\n }\n return node;\n};\n\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.transplant = function(n1, n2) {\n if (n1.parent === null) {\n this.root = n2;\n } else if (n1 === n1.parent.leftCh) {\n n1.parent.leftCh = n2;\n } else {\n n1.parent.rightCh = n2;\n }\n if (n2 !== null) {\n n2.parent = n1.parent;\n }\n};\n\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.removeNode = function(node) {\n if (node.leftCh === null) {\n this.transplant(node, node.rightCh);\n } else if (node.rightCh === null) {\n this.transplant(node, node.leftCh);\n } else {\n var y = this.minimumAux(node.rightCh);\n if (y.parent !== node) {\n this.transplant(y, y.rightCh);\n y.rightCh = node.rightCh;\n y.rightCh.parent = y;\n }\n this.transplant(node, y);\n y.leftCh = node.leftCh;\n y.leftCh.parent = y;\n }\n};\n/**\n* @private\n*/\nbuckets.BSTree.prototype.inorderTraversalAux = function(node, callback, signal) {\n if (node === null || signal.stop) {\n return;\n }\n this.inorderTraversalAux(node.leftCh, callback, signal);\n if (signal.stop) {\n return;\n }\n signal.stop = callback(node.element) === false;\n if (signal.stop) {\n return;\n }\n this.inorderTraversalAux(node.rightCh, callback, signal);\n};\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.levelTraversalAux = function(node, callback) {\n var queue = new buckets.Queue();\n if (node !== null) {\n queue.enqueue(node);\n }\n while (!queue.isEmpty()) {\n node = queue.dequeue();\n if (callback(node.element) === false) {\n return;\n }\n if (node.leftCh !== null) {\n queue.enqueue(node.leftCh);\n }\n if (node.rightCh !== null) {\n queue.enqueue(node.rightCh);\n }\n }\n};\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.preorderTraversalAux = function(node, callback, signal) {\n if (node === null || signal.stop) {\n return;\n }\n signal.stop = callback(node.element) === false;\n if (signal.stop) {\n return;\n }\n this.preorderTraversalAux(node.leftCh, callback, signal);\n if (signal.stop) {\n return;\n }\n this.preorderTraversalAux(node.rightCh, callback, signal);\n};\n/**\n* @private\n*/\nbuckets.BSTree.prototype.postorderTraversalAux = function(node, callback, signal) {\n if (node === null || signal.stop) {\n return;\n }\n this.postorderTraversalAux(node.leftCh, callback, signal);\n if (signal.stop) {\n return;\n }\n this.postorderTraversalAux(node.rightCh, callback, signal);\n if (signal.stop) {\n return;\n }\n signal.stop = callback(node.element) === false;\n};\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.minimumAux = function(node) {\n while (node.leftCh !== null) {\n node = node.leftCh;\n }\n return node;\n};\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.maximumAux = function(node) {\n while (node.rightCh !== null) {\n node = node.rightCh;\n }\n return node;\n};\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.successorNode = function(node) {\n if (node.rightCh !== null) {\n return this.minimumAux(node.rightCh);\n }\n var successor = node.parent;\n while (successor !== null && node === successor.rightCh) {\n node = successor;\n successor = node.parent;\n }\n return successor;\n};\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.heightAux = function(node) {\n if (node === null) {\n return - 1;\n }\n return Math.max(this.heightAux(node.leftCh), this.heightAux(node.rightCh)) + 1;\n};\n\n/*\n* @private\n*/\nbuckets.BSTree.prototype.insertNode = function(node) {\n\n var parent = null;\n var position = this.root;\n var cmp = null;\n while (position !== null) {\n cmp = this.compare(node.element, position.element);\n if (cmp === 0) {\n return null;\n } else if (cmp < 0) {\n parent = position;\n position = position.leftCh;\n } else {\n parent = position;\n position = position.rightCh;\n }\n }\n node.parent = parent;\n if (parent === null) {\n // tree is empty\n this.root = node;\n } else if (this.compare(node.element, parent.element) < 0) {\n parent.leftCh = node;\n } else {\n parent.rightCh = node;\n }\n return node;\n};\n\n/**\n* @private\n*/\nbuckets.BSTree.prototype.createNode = function(element) {\n return {\n element: element,\n leftCh: null,\n rightCh: null,\n parent: null\n };\n};\n//customizations to libraries\n(function () {\n_.uniqueId = function (prefix) {\n //from ipython project\n // http://www.ietf.org/rfc/rfc4122.txt\n var s = [];\n var hexDigits = \"0123456789ABCDEF\";\n for (var i = 0; i < 32; i++) {\n s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);\n }\n s[12] = \"4\"; // bits 12-15 of the time_hi_and_version field to 0010\n s[16] = hexDigits.substr((s[16] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01\n\n var uuid = s.join(\"\");\n if (prefix){\n return prefix + \"-\" + uuid;\n }else{\n return uuid;\n }\n};\n\n_.isNullOrUndefined = function(x){\n return _.isNull(x) || _.isUndefined(x);\n};\n\n_.setdefault = function(obj, key, value){\n if (_.has(obj, key)){\n return obj[key]}\n else{\n obj[key] = value\n return value\n }\n};\n}).call(this);\n\n\n(function(/*! Stitch !*/) {\n if (!this.require) {\n var modules = {}, cache = {}, require = function(name, root) {\n var path = expand(root, name), indexPath = expand(path, './index'), module, fn;\n module = cache[path] || cache[indexPath]\n if (module) {\n return module.exports;\n } else if (fn = modules[path] || modules[path = indexPath]) {\n module = {id: path, exports: {}};\n try {\n cache[path] = module;\n fn(module.exports, function(name) {\n return require(name, dirname(path));\n }, module);\n return module.exports;\n } catch (err) {\n delete cache[path];\n throw err;\n }\n } else {\n throw 'module \\'' + name + '\\' not found';\n }\n }, expand = function(root, name) {\n var results = [], parts, part;\n if (/^\\.\\.?(\\/|$)/.test(name)) {\n parts = [root, name].join('/').split('/');\n } else {\n parts = name.split('/');\n }\n for (var i = 0, length = parts.length; i < length; i++) {\n part = parts[i];\n if (part == '..') {\n results.pop();\n } else if (part != '.' && part != '') {\n results.push(part);\n }\n }\n return results.join('/');\n }, dirname = function(path) {\n return path.split('/').slice(0, -1).join('/');\n };\n this.require = function(name) {\n return require(name, '');\n }\n this.require.define = function(bundle) {\n for (var key in bundle)\n modules[key] = bundle[key];\n };\n this.require.modules = modules;\n this.require.cache = cache;\n }\n return this.require.define;\n}).call(this)({\n \"serverutils\": function(exports, require, module) {(function() {\n var Collections, Config, Deferreds, HasProperties, Promises, WebSocketWrapper, base, container, load_models, submodels, utility;\n\n Deferreds = {};\n\n Promises = {};\n\n Deferreds._doc_loaded = $.Deferred();\n\n Deferreds._doc_requested = $.Deferred();\n\n Promises.doc_loaded = Deferreds._doc_loaded.promise();\n\n Promises.doc_requested = Deferreds._doc_requested.promise();\n\n base = require(\"./base\");\n\n Collections = base.Collections;\n\n container = require(\"./container\");\n\n HasProperties = base.HasProperties;\n\n load_models = base.load_models;\n\n submodels = base.submodels;\n\n WebSocketWrapper = base.WebSocketWrapper;\n\n Config = base.Config;\n\n exports.wswrapper = null;\n\n exports.plotcontext = null;\n\n exports.plotcontextview = null;\n\n exports.Promises = Promises;\n\n HasProperties.prototype.sync = Backbone.sync;\n\n utility = {\n load_user: function() {\n var response;\n response = $.get('/bokeh/userinfo/', {});\n return response;\n },\n load_doc: function(docid) {\n var response;\n response = $.get(Config.prefix + (\"/bokeh/bokehinfo/\" + docid + \"/\"), {}).done(function(data) {\n var all_models, apikey;\n all_models = data['all_models'];\n load_models(all_models);\n apikey = data['apikey'];\n return submodels(exports.wswrapper, \"bokehplot:\" + docid, apikey);\n });\n return response;\n },\n make_websocket: function() {\n var wswrapper;\n wswrapper = new WebSocketWrapper(Config.ws_conn_string);\n exports.wswrapper = wswrapper;\n return wswrapper;\n },\n render_plots: function(plot_context_ref, viewclass, viewoptions) {\n var options, plotcontext, plotcontextview;\n if (viewclass == null) {\n viewclass = null;\n }\n if (viewoptions == null) {\n viewoptions = {};\n }\n plotcontext = Collections(plot_context_ref.type).get(plot_context_ref.id);\n if (!viewclass) {\n viewclass = plotcontext.default_view;\n }\n options = _.extend(viewoptions, {\n model: plotcontext\n });\n plotcontextview = new viewclass(options);\n plotcontext = plotcontext;\n plotcontextview = plotcontextview;\n plotcontextview.render();\n exports.plotcontext = plotcontext;\n return exports.plotcontextview = plotcontextview;\n },\n bokeh_connection: function(host, docid, protocol) {\n if (_.isUndefined(protocol)) {\n protocol = \"https\";\n }\n if (Promises.doc_requested.state() === \"pending\") {\n Deferreds._doc_requested.resolve();\n return $.get(\"\" + protocol + \"://\" + host + \"/bokeh/publicbokehinfo/\" + docid, {}, function(data) {\n console.log('instatiate_doc_single, docid', docid);\n data = JSON.parse(data);\n load_models(data['all_models']);\n return Deferreds._doc_loaded.resolve(data);\n });\n }\n },\n instantiate_doc_single_plot: function(docid, view_model_id, target_el, host) {\n if (target_el == null) {\n target_el = \"#PlotPane\";\n }\n if (host == null) {\n host = \"www.wakari.io\";\n }\n utility.bokeh_connection(host, docid, \"https\");\n return Deferreds._doc_loaded.done(function(data) {\n utility.render_plots(data.plot_context_ref, container.SinglePlotContextView, {\n target_model_id: view_model_id\n });\n return $(target_el).empty().append(exports.plotcontextview.el);\n });\n }\n };\n\n exports.utility = utility;\n\n}).call(this);\n}, \"usercontext/wrappertemplate\": function(exports, require, module) {module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n \n __out.push('<div class=\"accordion-heading bokehdocheading\">\\n <a class=\"accordion-toggle bokehdoclabel\" data-toggle=\"collapse\" \\n href=\"#');\n \n __out.push(__sanitize(this.bodyid));\n \n __out.push('\">\\n Document: ');\n \n __out.push(__sanitize(this.model.get('title')));\n \n __out.push('\\n <i class=\"bokehdelete icon-trash\"></i>\\n </a>\\n</div>\\n<div id=\"');\n \n __out.push(__sanitize(this.bodyid));\n \n __out.push('\" class=\"accordion-body collapse\">\\n <div class=\"accordion-inner\">\\n </div>\\n</div>\\n\\n\\n');\n \n }).call(this);\n \n }).call(__obj);\n __obj.safe = __objSafe, __obj.escape = __escape;\n return __out.join('');\n}}, \"usercontext/documentationtemplate\": function(exports, require, module) {module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n \n __out.push('<p>\\n <b>\\n You have no Plots. Follow the intsructions\\n below to create some\\n </b>\\n</p>\\n');\n \n }).call(this);\n \n }).call(__obj);\n __obj.safe = __objSafe, __obj.escape = __escape;\n return __out.join('');\n}}, \"usercontext/usercontext\": function(exports, require, module) {(function() {\n var ContinuumView, HasParent, HasProperties, PlotContextWrapper, UserDoc, UserDocs, UserDocsView, base, build_views, documentationtemplate, load_models, template, userdocstemplate, utility,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n base = require(\"../base\");\n\n ContinuumView = base.ContinuumView;\n\n HasParent = base.HasParent;\n\n HasProperties = base.HasProperties;\n\n load_models = base.load_models;\n\n template = require(\"./wrappertemplate\");\n\n userdocstemplate = require(\"./userdocstemplate\");\n\n documentationtemplate = require(\"./documentationtemplate\");\n\n utility = require(\"../serverutils\").utility;\n\n build_views = base.build_views;\n\n PlotContextWrapper = (function(_super) {\n\n __extends(PlotContextWrapper, _super);\n\n function PlotContextWrapper() {\n return PlotContextWrapper.__super__.constructor.apply(this, arguments);\n }\n\n PlotContextWrapper.prototype.events = {\n \"click .bokehdoclabel\": \"loaddoc\",\n \"click .bokehdelete\": \"deldoc\"\n };\n\n PlotContextWrapper.prototype.deldoc = function(e) {\n console.log('foo');\n e.preventDefault();\n this.model.destroy();\n return false;\n };\n\n PlotContextWrapper.prototype.loaddoc = function() {\n return this.model.load();\n };\n\n PlotContextWrapper.prototype.initialize = function(options) {\n PlotContextWrapper.__super__.initialize.call(this, options);\n return this.render_init();\n };\n\n PlotContextWrapper.prototype.delegateEvents = function(events) {\n PlotContextWrapper.__super__.delegateEvents.call(this, events);\n return this.listenTo(this.model, 'loaded', this.render);\n };\n\n PlotContextWrapper.prototype.render_init = function() {\n var html;\n html = template({\n model: this.model,\n bodyid: _.uniqueId()\n });\n this.$el.html(html);\n return this.$el.addClass('accordion-group');\n };\n\n PlotContextWrapper.prototype.render = function() {\n var plot_context;\n plot_context = this.model.get_obj('plot_context');\n this.plot_context_view = new plot_context.default_view({\n model: plot_context\n });\n this.$el.find('.accordion-inner').append(this.plot_context_view.el);\n return true;\n };\n\n return PlotContextWrapper;\n\n })(ContinuumView);\n\n UserDocsView = (function(_super) {\n\n __extends(UserDocsView, _super);\n\n function UserDocsView() {\n return UserDocsView.__super__.constructor.apply(this, arguments);\n }\n\n UserDocsView.prototype.initialize = function(options) {\n this.docs = options.docs;\n this.collection = options.collection;\n this.views = {};\n UserDocsView.__super__.initialize.call(this, options);\n return this.render();\n };\n\n UserDocsView.prototype.attributes = {\n \"class\": 'usercontext'\n };\n\n UserDocsView.prototype.events = {\n 'click .bokehrefresh': function() {\n return this.collection.fetch({\n update: true\n });\n }\n };\n\n UserDocsView.prototype.delegateEvents = function(events) {\n var _this = this;\n UserDocsView.__super__.delegateEvents.call(this, events);\n this.listenTo(this.collection, 'add', this.render);\n this.listenTo(this.collection, 'remove', this.render);\n this.listenTo(this.collection, 'add', function(model, collection, options) {\n return _this.listenTo(model, 'loaded', function() {\n return _this.listenTo(model.get_obj('plot_context'), 'change', function() {\n return _this.trigger('show');\n });\n });\n });\n return this.listenTo(this.collection, 'remove', function(model, collection, options) {\n return _this.stopListening(model);\n });\n };\n\n UserDocsView.prototype.render_docs = function() {\n this.$el.html(documentationtemplate());\n return this.$el.append(this.docs);\n };\n\n UserDocsView.prototype.render = function() {\n var html, model, models, _i, _len;\n if (this.collection.models.length === 0 && this.docs) {\n return this.render_docs();\n }\n html = userdocstemplate();\n _.map(_.values(this.views), function(view) {\n return view.$el.detach();\n });\n models = this.collection.models.slice().reverse();\n build_views(this.views, models, {});\n this.$el.html(html);\n for (_i = 0, _len = models.length; _i < _len; _i++) {\n model = models[_i];\n this.$el.find(\".accordion\").append(this.views[model.id].el);\n }\n return this;\n };\n\n return UserDocsView;\n\n })(ContinuumView);\n\n UserDoc = (function(_super) {\n\n __extends(UserDoc, _super);\n\n function UserDoc() {\n return UserDoc.__super__.constructor.apply(this, arguments);\n }\n\n UserDoc.prototype.default_view = PlotContextWrapper;\n\n UserDoc.prototype.idAttribute = 'docid';\n\n UserDoc.prototype.defaults = {\n docid: null,\n title: null,\n plot_context: null,\n apikey: null\n };\n\n UserDoc.prototype.sync = function() {};\n\n UserDoc.prototype.destroy = function(options) {\n UserDoc.__super__.destroy.call(this, options);\n return $.ajax({\n url: \"/bokeh/doc/\" + (this.get('docid')) + \"/\",\n type: 'delete'\n });\n };\n\n UserDoc.prototype.load = function() {\n var docid, resp,\n _this = this;\n if (this.loaded) {\n return;\n }\n docid = this.get('docid');\n resp = utility.load_doc(docid);\n return resp.done(function(data) {\n _this.set('apikey', data['apikey']);\n _this.set('plot_context', data['plot_context_ref']);\n _this.trigger('loaded');\n return _this.loaded = true;\n });\n };\n\n return UserDoc;\n\n })(HasParent);\n\n UserDocs = (function(_super) {\n\n __extends(UserDocs, _super);\n\n function UserDocs() {\n return UserDocs.__super__.constructor.apply(this, arguments);\n }\n\n UserDocs.prototype.model = UserDoc;\n\n UserDocs.prototype.subscribe = function(wswrapper, username) {\n wswrapper.subscribe(\"bokehuser:\" + username, null);\n return this.listenTo(wswrapper, \"msg:bokehuser:\" + username, function(msg) {\n msg = JSON.parse(msg);\n if (msg['msgtype'] === 'docchange') {\n return this.fetch({\n update: true\n });\n }\n });\n };\n\n UserDocs.prototype.fetch = function(options) {\n var resp, response,\n _this = this;\n if (_.isUndefined(options)) {\n options = {};\n }\n resp = response = $.get('/bokeh/userinfo/', {});\n resp.done(function(data) {\n var docs;\n docs = data['docs'];\n if (options.update) {\n return _this.update(docs, options);\n } else {\n return _this.reset(docs, options);\n }\n });\n return resp;\n };\n\n return UserDocs;\n\n })(Backbone.Collection);\n\n exports.UserDocs = UserDocs;\n\n exports.UserDocsView = UserDocsView;\n\n}).call(this);\n}, \"usercontext/userdocstemplate\": function(exports, require, module) {module.exports = function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n \n __out.push('<div class=\"accordion\">\\n</div>\\n');\n \n }).call(this);\n \n }).call(__obj);\n __obj.safe = __objSafe, __obj.escape = __escape;\n return __out.join('');\n}}, \"serverrun\": function(exports, require, module) {(function() {\n var Config, Promises, base, container, usercontext, utility, utils;\n\n utils = require(\"./serverutils\");\n\n base = require(\"./base\");\n\n container = require(\"./container\");\n\n Config = base.Config;\n\n utility = utils.utility;\n\n Promises = utils.Promises;\n\n Config.ws_conn_string = \"ws://\" + window.location.host + \"/bokeh/sub\";\n\n usercontext = require(\"usercontext/usercontext\");\n\n $(function() {\n var load, userdocs, wswrapper;\n wswrapper = utility.make_websocket();\n userdocs = new usercontext.UserDocs();\n window.userdocs = userdocs;\n load = userdocs.fetch();\n return load.done(function() {\n var userdocsview;\n userdocsview = new usercontext.UserDocsView({\n collection: userdocs\n });\n return $('#PlotPane').append(userdocsview.el);\n });\n });\n\n}).call(this);\n}, \"guides\": function(exports, require, module) {(function() {\n var HasParent, Legend, LegendRendererView, Legends, LinearAxes, LinearAxis, LinearAxisView, LinearDateAxes, LinearDateAxis, LinearDateAxisView, LinearMapper, PlotWidget, base, mapper, safebind, ticks,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n base = require(\"./base\");\n\n ticks = require(\"./ticks\");\n\n safebind = base.safebind;\n\n HasParent = base.HasParent;\n\n PlotWidget = base.PlotWidget;\n\n mapper = require(\"./mapper\");\n\n LinearMapper = mapper.LinearMapper;\n\n LinearAxisView = (function(_super) {\n\n __extends(LinearAxisView, _super);\n\n function LinearAxisView() {\n return LinearAxisView.__super__.constructor.apply(this, arguments);\n }\n\n LinearAxisView.prototype.initialize = function(options) {\n LinearAxisView.__super__.initialize.call(this, options);\n this.plot_view = options.plot_view;\n if (this.mget('orientation') === 'top' || this.mget('orientation') === 'bottom') {\n this.screendim = 'width';\n } else {\n this.screendim = 'height';\n }\n return this.set_mapper();\n };\n\n LinearAxisView.prototype.bind_bokeh_events = function() {\n safebind(this, this.plot_model, 'change', this.request_render);\n safebind(this, this.model, 'change', this.request_render);\n safebind(this, this.model, 'change:data_range', this.set_mapper);\n return safebind(this, this.mget_obj('data_range'), 'change', this.request_render);\n };\n\n LinearAxisView.prototype.set_mapper = function() {\n this.mapper = new LinearMapper({}, {\n data_range: this.mget_obj('data_range'),\n viewstate: this.plot_view.viewstate,\n screendim: this.screendim\n });\n return this.request_render();\n };\n\n LinearAxisView.prototype.tagName = 'div';\n\n LinearAxisView.prototype.get_offsets = function(orientation) {\n var offsets;\n offsets = {\n x: 0,\n y: 0\n };\n if (orientation === 'bottom') {\n offsets['y'] += this.plot_view.viewstate.get('height');\n }\n return offsets;\n };\n\n LinearAxisView.prototype.get_tick_size = function(orientation) {\n if (!_.isNull(this.mget('tickSize'))) {\n return this.mget('tickSize');\n } else {\n if (orientation === 'bottom') {\n return -this.plot_view.viewstate.get('height');\n } else {\n return -this.plot_view.viewstate.get('width');\n }\n }\n };\n\n LinearAxisView.prototype.render = function() {\n var unselected_color, _ref;\n LinearAxisView.__super__.render.call(this);\n unselected_color = \"#ccc\";\n this.plot_view.ctx.fillStyle = unselected_color;\n this.plot_view.ctx.strokeStyle = unselected_color;\n if ((_ref = this.mget('orientation')) === 'bottom' || _ref === 'top') {\n this.render_x();\n this.render_end();\n return;\n }\n this.render_y();\n this.render_end();\n };\n\n LinearAxisView.prototype.tick_label = function(tick) {\n return tick.toString();\n };\n\n LinearAxisView.prototype.render_x = function() {\n var can_ctx, current_tick, data_range, first_tick, interval, last_tick, last_tick_end, range, text_width, txtpos, x, x_scale, x_ticks, _ref;\n can_ctx = this.plot_view.x_can_ctx;\n data_range = this.mapper.data_range;\n interval = ticks.auto_interval(data_range.get('start'), data_range.get('end'));\n range = data_range.get('end') - data_range.get('start');\n x_scale = this.mapper.get('scalestate')[0];\n last_tick_end = 10000;\n _ref = ticks.auto_bounds(data_range.get('start'), data_range.get('end'), interval), first_tick = _ref[0], last_tick = _ref[1];\n current_tick = first_tick;\n x_ticks = [];\n last_tick_end = 0;\n can_ctx.clearRect(0, 0, this.plot_view.viewstate.get('width'), this.plot_view.viewstate.get('height'));\n while (current_tick <= last_tick) {\n x_ticks.push(current_tick);\n text_width = can_ctx.measureText(this.tick_label(current_tick)).width;\n x = this.plot_view.viewstate.xpos(this.mapper.map_screen(current_tick));\n txtpos = x - (text_width / 2);\n if (txtpos > last_tick_end) {\n can_ctx.fillText(this.tick_label(current_tick), txtpos, 20);\n last_tick_end = (txtpos + text_width) + 10;\n }\n this.plot_view.ctx.beginPath();\n this.plot_view.ctx.moveTo(x, 0);\n this.plot_view.ctx.lineTo(x, this.plot_view.viewstate.get('height'));\n this.plot_view.ctx.stroke();\n current_tick += interval;\n }\n can_ctx.stroke();\n return this.render_end();\n };\n\n LinearAxisView.prototype.DEFAULT_TEXT_HEIGHT = 8;\n\n LinearAxisView.prototype.render_y = function() {\n var can_ctx, current_tick, data_range, first_tick, interval, last_tick, last_tick_end, range, txtpos, y, y_scale, y_ticks, _ref;\n can_ctx = this.plot_view.y_can_ctx;\n data_range = this.mapper.data_range;\n interval = ticks.auto_interval(data_range.get('start'), data_range.get('end'));\n range = data_range.get('end') - data_range.get('start');\n y_scale = this.mapper.get('scalestate')[0];\n _ref = ticks.auto_bounds(data_range.get('start'), data_range.get('end'), interval), first_tick = _ref[0], last_tick = _ref[1];\n current_tick = first_tick;\n y_ticks = [];\n last_tick_end = 10000;\n can_ctx.clearRect(0, 0, this.plot_view.viewstate.get('width'), this.plot_view.viewstate.get('height'));\n while (current_tick <= last_tick) {\n y_ticks.push(current_tick);\n y = this.plot_view.viewstate.ypos(this.mapper.map_screen(current_tick));\n txtpos = y + (this.DEFAULT_TEXT_HEIGHT / 2);\n if (y < last_tick_end) {\n can_ctx.fillText(this.tick_label(current_tick), 0, y);\n last_tick_end = (y + this.DEFAULT_TEXT_HEIGHT) + 10;\n }\n this.plot_view.ctx.beginPath();\n this.plot_view.ctx.moveTo(0, y);\n this.plot_view.ctx.lineTo(this.plot_view.viewstate.get('width'), y);\n this.plot_view.ctx.stroke();\n current_tick += interval;\n }\n can_ctx.stroke();\n return this.render_end();\n };\n\n return LinearAxisView;\n\n })(PlotWidget);\n\n LinearDateAxisView = (function(_super) {\n\n __extends(LinearDateAxisView, _super);\n\n function LinearDateAxisView() {\n return LinearDateAxisView.__super__.constructor.apply(this, arguments);\n }\n\n LinearDateAxisView.prototype.tick_label = function(tick) {\n var end, one_day, start;\n start = this.mget_obj('data_range').get('start');\n end = this.mget_obj('data_range').get('end');\n one_day = 3600 * 24 * 1000;\n tick = new Date(tick);\n if ((Math.abs(end - start)) > (one_day * 2)) {\n return tick.toLocaleDateString();\n } else {\n return tick.toLocaleTimeString();\n }\n };\n\n return LinearDateAxisView;\n\n })(LinearAxisView);\n\n LegendRendererView = (function(_super) {\n\n __extends(LegendRendererView, _super);\n\n function LegendRendererView() {\n return LegendRendererView.__super__.constructor.apply(this, arguments);\n }\n\n LegendRendererView.prototype.render = function() {\n var can_ctx, coords, l, legend_height, legend_offset_x, legend_offset_y, legend_width, start_x, start_y, text_height, x, y, _i, _len, _ref;\n LegendRendererView.__super__.render.call(this);\n can_ctx = this.plot_view.ctx;\n coords = this.model.get('coords');\n x = coords[0], y = coords[1];\n if (x < 0) {\n start_x = this.plot_view.viewstate.get('width') + x;\n } else {\n start_x = x;\n }\n if (y < 0) {\n start_y = this.plot_view.viewstate.get('height') + y;\n } else {\n start_y = y;\n }\n text_height = 20;\n legend_height = text_height * this.model.get('legends').length;\n legend_width = 100;\n legend_offset_x = start_x;\n legend_offset_y = start_y;\n can_ctx.strokeStyle = 'black';\n can_ctx.strokeRect(legend_offset_x, legend_offset_y, legend_width, legend_height);\n can_ctx.fillStyle = 'white';\n can_ctx.fillRect(legend_offset_x, legend_offset_y, legend_width, legend_height);\n can_ctx.strokeStyle = 'black';\n can_ctx.fillStyle = 'black';\n legend_offset_x += 5;\n legend_offset_y += 10;\n _ref = this.model.get('legends');\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n l = _ref[_i];\n console.log(\"l.name\", l.name, l, legend_offset_x, legend_offset_y);\n can_ctx.strokeStyle = l.color;\n can_ctx.fillStyle = l.color;\n can_ctx.fillText(l.name, legend_offset_x, legend_offset_y);\n legend_offset_y += text_height;\n }\n can_ctx.stroke();\n this.render_end();\n return null;\n };\n\n return LegendRendererView;\n\n })(PlotWidget);\n\n LinearAxis = (function(_super) {\n\n __extends(LinearAxis, _super);\n\n function LinearAxis() {\n return LinearAxis.__super__.constructor.apply(this, arguments);\n }\n\n LinearAxis.prototype.type = 'LinearAxis';\n\n LinearAxis.prototype.default_view = LinearAxisView;\n\n LinearAxis.prototype.display_defaults = {\n tick_color: '#fff'\n };\n\n return LinearAxis;\n\n })(HasParent);\n\n LinearAxis.prototype.defaults = _.clone(LinearAxis.prototype.defaults);\n\n _.extend(LinearAxis.prototype.defaults, {\n data_range: null,\n orientation: 'bottom',\n ticks: 10,\n ticksSubdivide: 1,\n tickSize: null,\n tickPadding: 3\n });\n\n LinearAxes = (function(_super) {\n\n __extends(LinearAxes, _super);\n\n function LinearAxes() {\n return LinearAxes.__super__.constructor.apply(this, arguments);\n }\n\n LinearAxes.prototype.model = LinearAxis;\n\n return LinearAxes;\n\n })(Backbone.Collection);\n\n LinearDateAxis = (function(_super) {\n\n __extends(LinearDateAxis, _super);\n\n function LinearDateAxis() {\n return LinearDateAxis.__super__.constructor.apply(this, arguments);\n }\n\n LinearDateAxis.prototype.type = \"LinearDateAxis\";\n\n LinearDateAxis.prototype.default_view = LinearDateAxisView;\n\n return LinearDateAxis;\n\n })(LinearAxis);\n\n LinearDateAxes = (function(_super) {\n\n __extends(LinearDateAxes, _super);\n\n function LinearDateAxes() {\n return LinearDateAxes.__super__.constructor.apply(this, arguments);\n }\n\n LinearDateAxes.prototype.model = LinearDateAxis;\n\n return LinearDateAxes;\n\n })(Backbone.Collection);\n\n Legend = (function(_super) {\n\n __extends(Legend, _super);\n\n function Legend() {\n return Legend.__super__.constructor.apply(this, arguments);\n }\n\n Legend.prototype.type = \"Legend\";\n\n Legend.prototype.default_view = LegendRendererView;\n\n Legend.prototype.defaults = {\n renderers: [],\n unselected_color: \"#ccc\",\n positions: {\n top_left: [20, 20],\n top_right: [-80, 20],\n bottom_left: [20, -60],\n bottom_right: [-80, -60]\n },\n position: \"top_left\"\n };\n\n Legend.prototype.initialize = function(options) {\n var ptype;\n Legend.__super__.initialize.call(this, options);\n console.log(\"options\", options);\n ptype = typeof options.position;\n if (ptype === \"string\") {\n return this.set('coords', this.defaults.positions[options.position]);\n } else if (ptype === \"object\") {\n return this.set('coords', options.position);\n }\n };\n\n return Legend;\n\n })(HasParent);\n\n Legends = (function(_super) {\n\n __extends(Legends, _super);\n\n function Legends() {\n return Legends.__super__.constructor.apply(this, arguments);\n }\n\n Legends.prototype.model = Legend;\n\n return Legends;\n\n })(Backbone.Collection);\n\n exports.linearaxes = new LinearAxes;\n\n exports.lineardateaxes = new LinearDateAxes;\n\n exports.legends = new Legends;\n\n exports.LinearAxisView = LinearAxisView;\n\n exports.LinearDateAxisView = LinearDateAxisView;\n\n exports.LegendRendererView = LegendRendererView;\n\n}).call(this);\n}, \"renderers/glyph\": function(exports, require, module) {(function() {\n var Collections, Glyph, GlyphView, Glyphs, HasParent, LinearMapper, PlotWidget, base, mapper, safebind,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n base = require('../base');\n\n Collections = base.Collections;\n\n HasParent = base.HasParent;\n\n PlotWidget = base.PlotWidget;\n\n safebind = base.safebind;\n\n mapper = require('../mapper');\n\n LinearMapper = mapper.LinearMapper;\n\n GlyphView = (function(_super) {\n\n __extends(GlyphView, _super);\n\n function GlyphView() {\n return GlyphView.__super__.constructor.apply(this, arguments);\n }\n\n GlyphView.prototype.initialize = function(options) {\n GlyphView.__super__.initialize.call(this, options);\n this.set_xmapper();\n return this.set_ymapper();\n };\n\n GlyphView.prototype.render = function() {\n var data, source;\n source = this.mget_obj('data_source');\n if (source.type === 'ObjectArrayDataSource') {\n data = source.get('data');\n } else if (source.type === 'ColumnDataSource') {\n data = source.datapoints();\n } else {\n console.log('Unknown data source type: ' + source.type);\n }\n return this._render(data);\n };\n\n GlyphView.prototype.bind_bokeh_events = function() {\n safebind(this, this.model, 'change', this.request_render);\n safebind(this, this.plot_view.viewstate, 'change', this.request_render);\n safebind(this, this.mget_obj('data_source'), 'change', this.request_render);\n safebind(this, this.model, 'change:xdata_range', this.set_xmapper);\n safebind(this, this.model, 'change:ydata_range', this.set_ymapper);\n safebind(this, this.mget_obj('xdata_range'), 'change', this.request_render);\n return safebind(this, this.mget_obj('ydata_range'), 'change', this.request_render);\n };\n\n GlyphView.prototype.set_xmapper = function() {\n this.xmapper = new LinearMapper({}, {\n data_range: this.mget_obj('xdata_range'),\n viewstate: this.plot_view.viewstate,\n screendim: 'width'\n });\n return this.request_render();\n };\n\n GlyphView.prototype.set_ymapper = function() {\n this.ymapper = new LinearMapper({}, {\n data_range: this.mget_obj('ydata_range'),\n viewstate: this.plot_view.viewstate,\n screendim: 'height'\n });\n return this.request_render();\n };\n\n GlyphView.prototype.distance = function(data, pt, span, position) {\n var d, halfspan, i, pt0, pt1, pt_units, ptc, span_units, spt0, spt1, x;\n pt_units = this.glyph_props[pt].units;\n span_units = this.glyph_props[span].units;\n if (pt === 'x') {\n mapper = this.xmapper;\n } else if (pt === 'y') {\n mapper = this.ymapper;\n }\n span = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n x = data[_i];\n _results.push(this.glyph_props.select(span, x));\n }\n return _results;\n }).call(this);\n if (span_units === 'screen') {\n return span;\n }\n if (position === 'center') {\n halfspan = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = span.length; _i < _len; _i++) {\n d = span[_i];\n _results.push(d / 2);\n }\n return _results;\n })();\n ptc = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n x = data[_i];\n _results.push(this.glyph_props.select(pt, x));\n }\n return _results;\n }).call(this);\n if (pt_units === 'screen') {\n ptc = mapper.v_map_data(ptc);\n }\n pt0 = (function() {\n var _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = ptc.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n _results.push(ptc[i] - halfspan[i]);\n }\n return _results;\n })();\n pt1 = (function() {\n var _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = ptc.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n _results.push(ptc[i] + halfspan[i]);\n }\n return _results;\n })();\n } else {\n pt0 = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n x = data[_i];\n _results.push(this.glyph_props.select(pt, x));\n }\n return _results;\n }).call(this);\n if (pt_units === 'screen') {\n pt0 = mapper.v_map_data(pt0);\n }\n pt1 = (function() {\n var _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = pt0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n _results.push(pt0[i] + span[i]);\n }\n return _results;\n })();\n }\n spt0 = mapper.v_map_screen(pt0);\n spt1 = mapper.v_map_screen(pt1);\n return (function() {\n var _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = spt0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n _results.push(spt1[i] - spt0[i]);\n }\n return _results;\n })();\n };\n\n GlyphView.prototype.map_to_screen = function(x, x_units, y, y_units) {\n var sx, sy;\n sx = new Array(x.length);\n sy = new Array(y.length);\n if (x_units === 'screen') {\n sx = x;\n } else {\n sx = this.xmapper.v_map_screen(x);\n sx = this.plot_view.viewstate.v_xpos(sx);\n }\n if (y_units === 'screen') {\n sy = y;\n } else {\n sy = this.ymapper.v_map_screen(y);\n sy = this.plot_view.viewstate.v_ypos(sy);\n }\n return [sx, sy];\n };\n\n return GlyphView;\n\n })(PlotWidget);\n\n Glyph = (function(_super) {\n\n __extends(Glyph, _super);\n\n function Glyph() {\n return Glyph.__super__.constructor.apply(this, arguments);\n }\n\n return Glyph;\n\n })(HasParent);\n\n Glyph.prototype.defaults = _.clone(Glyph.prototype.defaults);\n\n _.extend(Glyph.prototype.defaults, {\n data_source: null\n });\n\n Glyph.prototype.display_defaults = _.clone(Glyph.prototype.display_defaults);\n\n _.extend(Glyph.prototype.display_defaults, {\n radius_units: 'screen',\n length_units: 'screen',\n angle_units: 'deg',\n start_angle_units: 'deg',\n end_angle_units: 'deg'\n });\n\n Glyphs = (function(_super) {\n\n __extends(Glyphs, _super);\n\n function Glyphs() {\n return Glyphs.__super__.constructor.apply(this, arguments);\n }\n\n Glyphs.prototype.model = Glyph;\n\n return Glyphs;\n\n })(Backbone.Collection);\n\n exports.glyphs = new Glyphs;\n\n exports.GlyphView = GlyphView;\n\n exports.Glyph = Glyph;\n\n}).call(this);\n}, \"renderers/oval\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Oval, OvalView, Ovals, fill_properties, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n fill_properties = properties.fill_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n OvalView = (function(_super) {\n\n __extends(OvalView, _super);\n\n function OvalView() {\n return OvalView.__super__.constructor.apply(this, arguments);\n }\n\n OvalView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x', 'y', 'width', 'height', 'angle'], [new fill_properties(this, glyphspec), new line_properties(this, glyphspec)]);\n this.do_fill = this.glyph_props.fill_properties.do_fill;\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return OvalView.__super__.initialize.call(this, options);\n };\n\n OvalView.prototype._render = function(data) {\n var ctx, glyph_props, obj, x, y, _ref;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x = glyph_props.v_select('x', data);\n y = glyph_props.v_select('y', data);\n _ref = this.map_to_screen(x, glyph_props.x.units, y, glyph_props.y.units), this.sx = _ref[0], this.sy = _ref[1];\n this.sw = this.distance(data, 'x', 'width', 'center');\n this.sh = this.distance(data, 'y', 'height', 'center');\n this.angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(glyph_props.select('angle', obj));\n }\n return _results;\n })();\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n OvalView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _j, _ref, _ref1;\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, glyph);\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.sw[i] + this.sh[i] + this.angle[i])) {\n continue;\n }\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.beginPath();\n ctx.moveTo(0, -this.sh[i] / 2);\n ctx.bezierCurveTo(this.sw[i] / 2, -this.sh[i] / 2, this.sw[i] / 2, this.sh[i] / 2, 0, this.sh[i] / 2);\n ctx.bezierCurveTo(-this.sw[i] / 2, this.sh[i] / 2, -this.sw[i] / 2, -this.sh[i] / 2, 0, -this.sh[i] / 2);\n ctx.closePath();\n ctx.fill();\n ctx.rotate(-this.angle[i]);\n ctx.translate(-this.sx[i], -this.sy[i]);\n }\n }\n if (this.do_fill) {\n glyph_props.line_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _j = 0, _ref1 = this.sx.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {\n if (isNaN(this.sx[i] + this.sy[i] + this.sw[i] + this.sh[i] + this.angle[i])) {\n continue;\n }\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.moveTo(0, -this.sh[i] / 2);\n ctx.bezierCurveTo(this.sw[i] / 2, -this.sh[i] / 2, this.sw[i] / 2, this.sh[i] / 2, 0, this.sh[i] / 2);\n ctx.bezierCurveTo(-this.sw[i] / 2, this.sh[i] / 2, -this.sw[i] / 2, -this.sh[i] / 2, 0, -this.sh[i] / 2);\n ctx.rotate(-this.angle[i]);\n ctx.translate(-this.sx[i], -this.sy[i]);\n }\n return ctx.stroke();\n }\n };\n\n OvalView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.sw[i] + this.sh[i] + this.angle[i])) {\n continue;\n }\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.beginPath();\n ctx.moveTo(0, -this.sh[i] / 2);\n ctx.bezierCurveTo(this.sw[i] / 2, -this.sh[i] / 2, this.sw[i] / 2, this.sh[i] / 2, 0, this.sh[i] / 2);\n ctx.bezierCurveTo(-this.sw[i] / 2, this.sh[i] / 2, -this.sw[i] / 2, -this.sh[i] / 2, 0, -this.sh[i] / 2);\n ctx.closePath();\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, data[i]);\n ctx.fill();\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, data[i]);\n ctx.stroke();\n }\n ctx.rotate(-this.angle[i]);\n _results.push(ctx.translate(-this.sx[i], -this.sy[i]));\n }\n return _results;\n };\n\n return OvalView;\n\n })(GlyphView);\n\n Oval = (function(_super) {\n\n __extends(Oval, _super);\n\n function Oval() {\n return Oval.__super__.constructor.apply(this, arguments);\n }\n\n Oval.prototype.default_view = OvalView;\n\n Oval.prototype.type = 'GlyphRenderer';\n\n return Oval;\n\n })(Glyph);\n\n Oval.prototype.display_defaults = _.clone(Oval.prototype.display_defaults);\n\n _.extend(Oval.prototype.display_defaults, {\n fill: 'gray',\n fill_alpha: 1.0,\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0,\n angle: 0.0\n });\n\n Ovals = (function(_super) {\n\n __extends(Ovals, _super);\n\n function Ovals() {\n return Ovals.__super__.constructor.apply(this, arguments);\n }\n\n Ovals.prototype.model = Oval;\n\n return Ovals;\n\n })(Backbone.Collection);\n\n exports.ovals = new Ovals;\n\n exports.Oval = Oval;\n\n exports.OvalView = OvalView;\n\n}).call(this);\n}, \"renderers/ray\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Ray, RayView, Rays, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n RayView = (function(_super) {\n\n __extends(RayView, _super);\n\n function RayView() {\n return RayView.__super__.constructor.apply(this, arguments);\n }\n\n RayView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x', 'y', 'angle', 'length'], [new line_properties(this, glyphspec)]);\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return RayView.__super__.initialize.call(this, options);\n };\n\n RayView.prototype._render = function(data) {\n var ctx, glyph_props, height, i, inf_len, obj, width, x, y, _i, _ref, _ref1;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n width = this.plot_view.viewstate.get('width');\n height = this.plot_view.viewstate.get('height');\n inf_len = 2 * (width + height);\n x = glyph_props.v_select('x', data);\n y = glyph_props.v_select('y', data);\n _ref = this.map_to_screen(x, glyph_props.x.units, y, glyph_props.y.units), this.sx = _ref[0], this.sy = _ref[1];\n this.angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(glyph_props.select('angle', obj));\n }\n return _results;\n })();\n this.length = glyph_props.v_select('length', data);\n for (i = _i = 0, _ref1 = this.sx.length - 1; 0 <= _ref1 ? _i <= _ref1 : _i >= _ref1; i = 0 <= _ref1 ? ++_i : --_i) {\n if (this.length[i] === 0) {\n this.length[i] = inf_len;\n }\n }\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n RayView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _ref;\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.angle[i] + this.length[i])) {\n continue;\n }\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.moveTo(0, 0);\n ctx.lineTo(this.length[i], 0);\n ctx.rotate(-this.angle[i]);\n ctx.translate(-this.sx[i], -this.sy[i]);\n }\n return ctx.stroke();\n }\n };\n\n RayView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n if (this.do_stroke) {\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.angle[i] + this.length[i])) {\n continue;\n }\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(this.length[i], 0);\n glyph_props.line_properties.set(ctx, data[i]);\n ctx.stroke();\n ctx.rotate(-this.angle[i]);\n _results.push(ctx.translate(-this.sx[i], -this.sy[i]));\n }\n return _results;\n }\n };\n\n return RayView;\n\n })(GlyphView);\n\n Ray = (function(_super) {\n\n __extends(Ray, _super);\n\n function Ray() {\n return Ray.__super__.constructor.apply(this, arguments);\n }\n\n Ray.prototype.default_view = RayView;\n\n Ray.prototype.type = 'GlyphRenderer';\n\n return Ray;\n\n })(Glyph);\n\n Ray.prototype.display_defaults = _.clone(Ray.prototype.display_defaults);\n\n _.extend(Ray.prototype.display_defaults, {\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Rays = (function(_super) {\n\n __extends(Rays, _super);\n\n function Rays() {\n return Rays.__super__.constructor.apply(this, arguments);\n }\n\n Rays.prototype.model = Ray;\n\n return Rays;\n\n })(Backbone.Collection);\n\n exports.rays = new Rays;\n\n exports.Ray = Ray;\n\n exports.RayView = RayView;\n\n}).call(this);\n}, \"renderers/bezier\": function(exports, require, module) {(function() {\n var Bezier, BezierView, Beziers, Glyph, GlyphView, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n BezierView = (function(_super) {\n\n __extends(BezierView, _super);\n\n function BezierView() {\n return BezierView.__super__.constructor.apply(this, arguments);\n }\n\n BezierView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x0', 'y0', 'x1', 'y1', 'cx0', 'cy0', 'cx1', 'cy1'], [new line_properties(this, glyphspec)]);\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return BezierView.__super__.initialize.call(this, options);\n };\n\n BezierView.prototype._render = function(data) {\n var ctx, cx0, cx1, cy0, cy1, glyph_props, x0, x1, y0, y1, _ref, _ref1, _ref2, _ref3;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x0 = glyph_props.v_select('x0', data);\n y0 = glyph_props.v_select('y0', data);\n _ref = this.map_to_screen(x0, glyph_props.x0.units, y0, glyph_props.y0.units), this.sx0 = _ref[0], this.sy0 = _ref[1];\n x1 = glyph_props.v_select('x1', data);\n y1 = glyph_props.v_select('y1', data);\n _ref1 = this.map_to_screen(x1, glyph_props.x1.units, y1, glyph_props.y1.units), this.sx1 = _ref1[0], this.sy1 = _ref1[1];\n cx0 = glyph_props.v_select('cx0', data);\n cy0 = glyph_props.v_select('cy0', data);\n _ref2 = this.map_to_screen(cx0, glyph_props.cx0.units, cy0, glyph_props.cy0.units), this.scx0 = _ref2[0], this.scy0 = _ref2[1];\n cx1 = glyph_props.v_select('cx1', data);\n cy1 = glyph_props.v_select('cy1', data);\n _ref3 = this.map_to_screen(cx1, glyph_props.cx1.units, cy1, glyph_props.cy1.units), this.scx1 = _ref3[0], this.scy1 = _ref3[1];\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n BezierView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _ref;\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _i = 0, _ref = this.sx0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i] + this.scx0[i] + this.scy0[i] + this.scx1[i] + this.scy1[i])) {\n continue;\n }\n ctx.moveTo(this.sx0[i], this.sy0[i]);\n ctx.bezierCurveTo(this.scx0[i], this.scy0[i], this.scx1[i], this.scy1[i], this.sx1[i], this.sy1[i]);\n }\n return ctx.stroke();\n }\n };\n\n BezierView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n if (this.do_stroke) {\n _results = [];\n for (i = _i = 0, _ref = this.sx0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i] + this.scx0[i] + this.scy0[i] + this.scx1[i] + this.scy1[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.moveTo(this.sx0[i], this.sy0[i]);\n ctx.bezierCurveTo(this.scx0[i], this.scy0[i], this.scx1[i], this.scy1[i], this.sx1[i], this.sy1[i]);\n glyph_props.line_properties.set(ctx, data[i]);\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n return BezierView;\n\n })(GlyphView);\n\n Bezier = (function(_super) {\n\n __extends(Bezier, _super);\n\n function Bezier() {\n return Bezier.__super__.constructor.apply(this, arguments);\n }\n\n Bezier.prototype.default_view = BezierView;\n\n Bezier.prototype.type = 'GlyphRenderer';\n\n return Bezier;\n\n })(Glyph);\n\n Bezier.prototype.display_defaults = _.clone(Bezier.prototype.display_defaults);\n\n _.extend(Bezier.prototype.display_defaults, {\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Beziers = (function(_super) {\n\n __extends(Beziers, _super);\n\n function Beziers() {\n return Beziers.__super__.constructor.apply(this, arguments);\n }\n\n Beziers.prototype.model = Bezier;\n\n return Beziers;\n\n })(Backbone.Collection);\n\n exports.beziers = new Beziers;\n\n exports.Bezier = Bezier;\n\n exports.BezierView = BezierView;\n\n}).call(this);\n}, \"renderers/glyph_renderer\": function(exports, require, module) {(function() {\n var Collections, GlyphRenderers, HasParent, base, prim,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n base = require('../base');\n\n Collections = base.Collections;\n\n HasParent = base.HasParent;\n\n prim = require('./primitives');\n\n GlyphRenderers = (function(_super) {\n\n __extends(GlyphRenderers, _super);\n\n function GlyphRenderers() {\n return GlyphRenderers.__super__.constructor.apply(this, arguments);\n }\n\n GlyphRenderers.prototype.model = function(attrs, options) {\n var model, type, _ref;\n if (!(((_ref = attrs.glyphspec) != null ? _ref.type : void 0) != null)) {\n console.log(\"missing type\");\n return;\n }\n type = attrs.glyphspec.type;\n if (!(type in prim)) {\n console.log(\"Unknown type '\" + attrs.type + \"'\");\n return;\n }\n model = prim[type];\n return new model(attrs, options);\n };\n\n return GlyphRenderers;\n\n })(Backbone.Collection);\n\n exports.glyphrenderers = new GlyphRenderers;\n\n}).call(this);\n}, \"renderers/quad\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Quad, QuadView, Quads, fill_properties, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n fill_properties = properties.fill_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n QuadView = (function(_super) {\n\n __extends(QuadView, _super);\n\n function QuadView() {\n return QuadView.__super__.constructor.apply(this, arguments);\n }\n\n QuadView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['right', 'left', 'bottom', 'top'], [new fill_properties(this, glyphspec), new line_properties(this, glyphspec)]);\n this.do_fill = this.glyph_props.fill_properties.do_fill;\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return QuadView.__super__.initialize.call(this, options);\n };\n\n QuadView.prototype._render = function(data) {\n var bottom, ctx, glyph_props, left, right, top, _ref, _ref1;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n left = glyph_props.v_select('left', data);\n top = glyph_props.v_select('top', data);\n _ref = this.map_to_screen(left, glyph_props.left.units, top, glyph_props.top.units), this.sx0 = _ref[0], this.sy0 = _ref[1];\n right = glyph_props.v_select('right', data);\n bottom = glyph_props.v_select('bottom', data);\n _ref1 = this.map_to_screen(right, glyph_props.right.units, bottom, glyph_props.bottom.units), this.sx1 = _ref1[0], this.sy1 = _ref1[1];\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n QuadView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _j, _ref, _ref1;\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _i = 0, _ref = this.sx0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i])) {\n continue;\n }\n ctx.rect(this.sx0[i], this.sy0[i], this.sx1[i] - this.sx0[i], this.sy1[i] - this.sy0[i]);\n }\n ctx.fill();\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _j = 0, _ref1 = this.sx0.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i])) {\n continue;\n }\n ctx.rect(this.sx0[i], this.sy0[i], this.sx1[i] - this.sx0[i], this.sy1[i] - this.sy0[i]);\n }\n return ctx.stroke();\n }\n };\n\n QuadView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = this.sx0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.rect(this.sx0[i], this.sy0[i], this.sx1[i] - this.sx0[i], this.sy1[i] - this.sy0[i]);\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, data[i]);\n ctx.fill();\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, data[i]);\n _results.push(ctx.stroke());\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n };\n\n return QuadView;\n\n })(GlyphView);\n\n Quad = (function(_super) {\n\n __extends(Quad, _super);\n\n function Quad() {\n return Quad.__super__.constructor.apply(this, arguments);\n }\n\n Quad.prototype.default_view = QuadView;\n\n Quad.prototype.type = 'GlyphRenderer';\n\n return Quad;\n\n })(Glyph);\n\n Quad.prototype.display_defaults = _.clone(Quad.prototype.display_defaults);\n\n _.extend(Quad.prototype.display_defaults, {\n fill: 'gray',\n fill_alpha: 1.0,\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Quads = (function(_super) {\n\n __extends(Quads, _super);\n\n function Quads() {\n return Quads.__super__.constructor.apply(this, arguments);\n }\n\n Quads.prototype.model = Quad;\n\n return Quads;\n\n })(Backbone.Collection);\n\n exports.quads = new Quads;\n\n exports.Quad = Quad;\n\n exports.QuadView = QuadView;\n\n}).call(this);\n}, \"renderers/circle\": function(exports, require, module) {(function() {\n var Circle, CircleView, Circles, Glyph, GlyphView, fill_properties, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n fill_properties = properties.fill_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n CircleView = (function(_super) {\n\n __extends(CircleView, _super);\n\n function CircleView() {\n return CircleView.__super__.constructor.apply(this, arguments);\n }\n\n CircleView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x', 'y', 'radius'], [new fill_properties(this, glyphspec), new line_properties(this, glyphspec)]);\n this.do_fill = this.glyph_props.fill_properties.do_fill;\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return CircleView.__super__.initialize.call(this, options);\n };\n\n CircleView.prototype._render = function(data) {\n var ctx, glyph_props, x, y, _ref;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x = glyph_props.v_select('x', data);\n y = glyph_props.v_select('y', data);\n _ref = this.map_to_screen(x, glyph_props.x.units, y, glyph_props.y.units), this.sx = _ref[0], this.sy = _ref[1];\n this.radius = this.distance(data, 'x', 'radius', 'edge');\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n CircleView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _j, _ref, _ref1, _results;\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, glyph);\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.radius[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.arc(this.sx[i], this.sy[i], this.radius[i], 0, 2 * Math.PI * 2, false);\n ctx.fill();\n }\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n _results = [];\n for (i = _j = 0, _ref1 = this.sx.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {\n if (isNaN(this.sx[i] + this.sy[i] + this.radius[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.arc(this.sx[i], this.sy[i], this.radius[i], 0, 2 * Math.PI * 2, false);\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n CircleView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.radius[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.arc(this.sx[i], this.sy[i], this.radius[i], 0, 2 * Math.PI * 2, false);\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, data[i]);\n ctx.fill();\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, data[i]);\n _results.push(ctx.stroke());\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n };\n\n return CircleView;\n\n })(GlyphView);\n\n Circle = (function(_super) {\n\n __extends(Circle, _super);\n\n function Circle() {\n return Circle.__super__.constructor.apply(this, arguments);\n }\n\n Circle.prototype.default_view = CircleView;\n\n Circle.prototype.type = 'GlyphRenderer';\n\n return Circle;\n\n })(Glyph);\n\n Circle.prototype.display_defaults = _.clone(Circle.prototype.display_defaults);\n\n _.extend(Circle.prototype.display_defaults, {\n fill: 'gray',\n fill_alpha: 1.0,\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Circles = (function(_super) {\n\n __extends(Circles, _super);\n\n function Circles() {\n return Circles.__super__.constructor.apply(this, arguments);\n }\n\n Circles.prototype.model = Circle;\n\n return Circles;\n\n })(Backbone.Collection);\n\n exports.circles = new Circles;\n\n exports.Circle = Circle;\n\n exports.CircleView = CircleView;\n\n}).call(this);\n}, \"renderers/text\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Text, TextView, Texts, glyph, glyph_properties, properties, text_properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n text_properties = properties.text_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n TextView = (function(_super) {\n\n __extends(TextView, _super);\n\n function TextView() {\n return TextView.__super__.constructor.apply(this, arguments);\n }\n\n TextView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x', 'y', 'angle', 'text:string'], [new text_properties(this, glyphspec)]);\n return TextView.__super__.initialize.call(this, options);\n };\n\n TextView.prototype._render = function(data) {\n var ctx, glyph_props, obj, x, y, _ref;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x = glyph_props.v_select('x', data);\n y = glyph_props.v_select('y', data);\n _ref = this.map_to_screen(x, glyph_props.x.units, y, glyph_props.y.units), this.sx = _ref[0], this.sy = _ref[1];\n this.angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(glyph_props.select(\"angle\", obj));\n }\n return _results;\n })();\n this.text = glyph_props.v_select(\"text\", data);\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n TextView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _ref, _results;\n glyph_props.text_properties.set(ctx, glyph);\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.angle[i])) {\n continue;\n }\n if (angle[i]) {\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.fillText(this.text[i], 0, 0);\n ctx.rotate(-this.angle[i]);\n _results.push(ctx.translate(-this.sx[i], -this.sy[i]));\n } else {\n _results.push(ctx.fillText(text[i], this.sx[i], this.sy[i]));\n }\n }\n return _results;\n };\n\n TextView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.angle[i])) {\n continue;\n }\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n glyph_props.text_properties.set(ctx, data[i]);\n ctx.fillText(this.text[i], 0, 0);\n ctx.rotate(-this.angle[i]);\n _results.push(ctx.translate(-this.sx[i], -this.sy[i]));\n }\n return _results;\n };\n\n return TextView;\n\n })(GlyphView);\n\n Text = (function(_super) {\n\n __extends(Text, _super);\n\n function Text() {\n return Text.__super__.constructor.apply(this, arguments);\n }\n\n Text.prototype.default_view = TextView;\n\n Text.prototype.type = 'GlyphRenderer';\n\n return Text;\n\n })(Glyph);\n\n Text.prototype.display_defaults = _.clone(Text.prototype.display_defaults);\n\n _.extend(Text.prototype.display_defaults, {\n text_font: \"helvetica\",\n text_font_size: \"1em\",\n text_font_style: \"normal\",\n text_color: \"#444444\",\n text_alpha: 1.0,\n text_align: \"left\",\n text_baseline: \"bottom\"\n });\n\n Texts = (function(_super) {\n\n __extends(Texts, _super);\n\n function Texts() {\n return Texts.__super__.constructor.apply(this, arguments);\n }\n\n Texts.prototype.model = Text;\n\n return Texts;\n\n })(Backbone.Collection);\n\n exports.texts = new Texts;\n\n exports.Text = Text;\n\n exports.TextView = TextView;\n\n}).call(this);\n}, \"renderers/primitives\": function(exports, require, module) {(function() {\n var arc, area, bezier, circle, image, line, oval, quad, quadcurve, ray, rect, segment, text, wedge;\n\n arc = require(\"./arc\");\n\n area = require(\"./area\");\n\n bezier = require(\"./bezier\");\n\n circle = require(\"./circle\");\n\n image = require(\"./image\");\n\n line = require(\"./line\");\n\n oval = require(\"./oval\");\n\n quad = require(\"./quad\");\n\n quadcurve = require(\"./quadcurve\");\n\n ray = require(\"./ray\");\n\n rect = require(\"./rect\");\n\n segment = require(\"./segment\");\n\n text = require(\"./text\");\n\n wedge = require(\"./wedge\");\n\n exports.arc = arc.Arc;\n\n exports.area = area.Area;\n\n exports.bezier = bezier.Bezier;\n\n exports.circle = circle.Circle;\n\n exports.image = image.Image;\n\n exports.line = line.Line;\n\n exports.oval = oval.Oval;\n\n exports.quad = quad.Quad;\n\n exports.quadcurve = quadcurve.Quadcurve;\n\n exports.ray = ray.Ray;\n\n exports.rect = rect.Rect;\n\n exports.segment = segment.Segment;\n\n exports.text = text.Text;\n\n exports.wedge = wedge.Wedge;\n\n}).call(this);\n}, \"renderers/image\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, ImageGlyph, ImageView, Images, glyph, glyph_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n ImageView = (function(_super) {\n\n __extends(ImageView, _super);\n\n function ImageView() {\n return ImageView.__super__.constructor.apply(this, arguments);\n }\n\n ImageView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['image:string', 'x', 'y', 'angle'], []);\n return ImageView.__super__.initialize.call(this, options);\n };\n\n ImageView.prototype._render = function(data) {\n var ctx, glyph_props, i, img, obj, x, y, _i, _ref, _ref1,\n _this = this;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x = glyph_props.v_select('x', data);\n y = glyph_props.v_select('y', data);\n _ref = this.map_to_screen(x, glyph_props.x.units, y, glyph_props.y.units), this.sx = _ref[0], this.sy = _ref[1];\n this.image = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(glyph_props.select('image', obj));\n }\n return _results;\n })();\n this.angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(glyph_props.select('angle', obj));\n }\n return _results;\n })();\n for (i = _i = 0, _ref1 = this.sx.length - 1; 0 <= _ref1 ? _i <= _ref1 : _i >= _ref1; i = 0 <= _ref1 ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.angle[i])) {\n continue;\n }\n img = new Image();\n img.onload = (function(img, i) {\n return function() {\n if (_this.angle[i]) {\n ctx.translate(_this.sx[i], _this.sy[i]);\n ctx.rotate(_this.angle[i]);\n ctx.drawImage(img, 0, 0);\n ctx.rotate(-_this.angle[i]);\n return ctx.translate(-_this.sx[i], -_this.sy[i]);\n } else {\n return ctx.drawImage(img, _this.sx[i], _this.sy[i]);\n }\n };\n })(img, i);\n img.src = this.image[i];\n }\n return ctx.restore();\n };\n\n return ImageView;\n\n })(GlyphView);\n\n ImageGlyph = (function(_super) {\n\n __extends(ImageGlyph, _super);\n\n function ImageGlyph() {\n return ImageGlyph.__super__.constructor.apply(this, arguments);\n }\n\n ImageGlyph.prototype.default_view = ImageView;\n\n ImageGlyph.prototype.type = 'GlyphRenderer';\n\n return ImageGlyph;\n\n })(Glyph);\n\n ImageGlyph.prototype.display_defaults = _.clone(ImageGlyph.prototype.display_defaults);\n\n _.extend(ImageGlyph.prototype.display_defaults, {});\n\n Images = (function(_super) {\n\n __extends(Images, _super);\n\n function Images() {\n return Images.__super__.constructor.apply(this, arguments);\n }\n\n Images.prototype.model = ImageGlyph;\n\n return Images;\n\n })(Backbone.Collection);\n\n exports.images = new Images;\n\n exports.Image = ImageGlyph;\n\n exports.ImageView = ImageView;\n\n}).call(this);\n}, \"renderers/area\": function(exports, require, module) {(function() {\n var Area, AreaView, Areas, Glyph, GlyphView, fill_properties, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n fill_properties = properties.fill_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n AreaView = (function(_super) {\n\n __extends(AreaView, _super);\n\n function AreaView() {\n return AreaView.__super__.constructor.apply(this, arguments);\n }\n\n AreaView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['xs:array', 'ys:array'], [new fill_properties(this, glyphspec), new line_properties(this, glyphspec)]);\n this.do_fill = this.glyph_props.fill_properties.do_fill;\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return AreaView.__super__.initialize.call(this, options);\n };\n\n AreaView.prototype._render = function(data) {\n var ctx, glyph_props, i, pt, sx, sy, x, y, _i, _j, _k, _len, _ref, _ref1, _ref2;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n pt = data[_i];\n x = glyph_props.select('xs', pt);\n y = glyph_props.select('ys', pt);\n _ref = this.map_to_screen(x, glyph_props.xs.units, y, glyph_props.ys.units), sx = _ref[0], sy = _ref[1];\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, pt);\n for (i = _j = 0, _ref1 = sx.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {\n if (i === 0) {\n ctx.beginPath();\n ctx.moveTo(sx[i], sy[i]);\n continue;\n } else if (isNaN(sx[i] + sy[i])) {\n ctx.closePath();\n ctx.fill();\n ctx.beginPath();\n continue;\n } else {\n ctx.lineTo(sx[i], sy[i]);\n }\n }\n ctx.closePath();\n ctx.fill();\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, pt);\n for (i = _k = 0, _ref2 = sx.length - 1; 0 <= _ref2 ? _k <= _ref2 : _k >= _ref2; i = 0 <= _ref2 ? ++_k : --_k) {\n if (i === 0) {\n ctx.beginPath();\n ctx.moveTo(sx[i], sy[i]);\n continue;\n } else if (isNaN(sx[i] + sy[i])) {\n ctx.closePath();\n ctx.stroke();\n ctx.beginPath();\n continue;\n } else {\n ctx.lineTo(sx[i], sy[i]);\n }\n }\n ctx.closePath();\n ctx.stroke();\n }\n }\n return ctx.restore();\n };\n\n return AreaView;\n\n })(GlyphView);\n\n Area = (function(_super) {\n\n __extends(Area, _super);\n\n function Area() {\n return Area.__super__.constructor.apply(this, arguments);\n }\n\n Area.prototype.default_view = AreaView;\n\n Area.prototype.type = 'GlyphRenderer';\n\n return Area;\n\n })(Glyph);\n\n Area.prototype.display_defaults = _.clone(Area.prototype.display_defaults);\n\n _.extend(Area.prototype.display_defaults, {\n fill: 'gray',\n fill_alpha: 1.0,\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Areas = (function(_super) {\n\n __extends(Areas, _super);\n\n function Areas() {\n return Areas.__super__.constructor.apply(this, arguments);\n }\n\n Areas.prototype.model = Area;\n\n return Areas;\n\n })(Backbone.Collection);\n\n exports.areas = new Areas;\n\n exports.Area = Area;\n\n exports.AreaView = AreaView;\n\n}).call(this);\n}, \"renderers/segment\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Segment, SegmentView, Segments, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n SegmentView = (function(_super) {\n\n __extends(SegmentView, _super);\n\n function SegmentView() {\n return SegmentView.__super__.constructor.apply(this, arguments);\n }\n\n SegmentView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x0', 'y0', 'x1', 'y1'], [new line_properties(this, glyphspec)]);\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return SegmentView.__super__.initialize.call(this, options);\n };\n\n SegmentView.prototype._render = function(data) {\n var ctx, glyph_props, x0, x1, y0, y1, _ref, _ref1;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x0 = glyph_props.v_select('x0', data);\n y0 = glyph_props.v_select('y0', data);\n _ref = this.map_to_screen(x0, glyph_props.x0.units, y0, glyph_props.y0.units), this.sx0 = _ref[0], this.sy0 = _ref[1];\n x1 = glyph_props.v_select('x1', data);\n y1 = glyph_props.v_select('y1', data);\n _ref1 = this.map_to_screen(x1, glyph_props.x1.units, y1, glyph_props.y1.units), this.sx1 = _ref1[0], this.sy1 = _ref1[1];\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n SegmentView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _ref;\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _i = 0, _ref = this.sx0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i])) {\n continue;\n }\n ctx.moveTo(this.sx0[i], this.sy0[i]);\n ctx.lineTo(this.sx1[i], this.sy1[i]);\n }\n return ctx.stroke();\n }\n };\n\n SegmentView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n if (this.do_stroke) {\n _results = [];\n for (i = _i = 0, _ref = this.sx0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.moveTo(this.sx0[i], this.sy0[i]);\n ctx.lineTo(this.sx1[i], this.sy1[i]);\n glyph_props.line_properties.set(ctx, data[i]);\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n return SegmentView;\n\n })(GlyphView);\n\n Segment = (function(_super) {\n\n __extends(Segment, _super);\n\n function Segment() {\n return Segment.__super__.constructor.apply(this, arguments);\n }\n\n Segment.prototype.default_view = SegmentView;\n\n Segment.prototype.type = 'GlyphRenderer';\n\n return Segment;\n\n })(Glyph);\n\n Segment.prototype.display_defaults = _.clone(Segment.prototype.display_defaults);\n\n _.extend(Segment.prototype.display_defaults, {\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Segments = (function(_super) {\n\n __extends(Segments, _super);\n\n function Segments() {\n return Segments.__super__.constructor.apply(this, arguments);\n }\n\n Segments.prototype.model = Segment;\n\n return Segments;\n\n })(Backbone.Collection);\n\n exports.segments = new Segments;\n\n exports.Segment = Segment;\n\n exports.SegmentView = SegmentView;\n\n}).call(this);\n}, \"renderers/wedge\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Wedge, WedgeView, Wedges, fill_properties, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n fill_properties = properties.fill_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n WedgeView = (function(_super) {\n\n __extends(WedgeView, _super);\n\n function WedgeView() {\n return WedgeView.__super__.constructor.apply(this, arguments);\n }\n\n WedgeView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x', 'y', 'radius', 'start_angle', 'end_angle'], [new fill_properties(this, glyphspec), new line_properties(this, glyphspec)]);\n this.do_fill = this.glyph_props.fill_properties.do_fill;\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return WedgeView.__super__.initialize.call(this, options);\n };\n\n WedgeView.prototype._render = function(data) {\n var ctx, glyph_props, obj, x, y, _ref;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x = glyph_props.v_select('x', data);\n y = glyph_props.v_select('y', data);\n _ref = this.map_to_screen(x, this.glyph_props.x.units, y, this.glyph_props.y.units), this.sx = _ref[0], this.sy = _ref[1];\n this.radius = this.distance(data, 'x', 'radius', 'edge');\n this.start_angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(this.glyph_props.select('start_angle', obj));\n }\n return _results;\n }).call(this);\n this.end_angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(this.glyph_props.select('end_angle', obj));\n }\n return _results;\n }).call(this);\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n WedgeView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _j, _ref, _ref1, _results;\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, glyph);\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.radius[i] + this.start_angle[i] + this.end_angle[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.arc(this.sx[i], this.sy[i], this.radius[i], this.start_angle[i], this.end_angle[i], false);\n ctx.lineTo(this.sx[i], this.sy[i]);\n ctx.closePath();\n ctx.fill();\n }\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n _results = [];\n for (i = _j = 0, _ref1 = this.sx.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {\n if (isNaN(this.sx[i] + this.sy[i] + this.radius[i] + this.start_angle[i] + this.end_angle[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.arc(this.sx[i], this.sy[i], this.radius[i], this.start_angle[i], this.end_angle[i], false);\n ctx.lineTo(this.sx[i], this.sy[i]);\n ctx.closePath();\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n WedgeView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.radius[i] + this.start_angle[i] + this.end_angle[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.arc(this.sx[i], this.sy[i], this.radius[i], this.start_angle[i], this.end_angle[i], false);\n ctx.lineTo(this.sx[i], this.sy[i]);\n ctx.closePath();\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, data[i]);\n ctx.fill();\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, data[i]);\n _results.push(ctx.stroke());\n } else {\n _results.push(void 0);\n }\n }\n return _results;\n };\n\n return WedgeView;\n\n })(GlyphView);\n\n Wedge = (function(_super) {\n\n __extends(Wedge, _super);\n\n function Wedge() {\n return Wedge.__super__.constructor.apply(this, arguments);\n }\n\n Wedge.prototype.default_view = WedgeView;\n\n Wedge.prototype.type = 'GlyphRenderer';\n\n return Wedge;\n\n })(Glyph);\n\n Wedge.prototype.display_defaults = _.clone(Wedge.prototype.display_defaults);\n\n _.extend(Wedge.prototype.display_defaults, {\n fill: 'gray',\n fill_alpha: 1.0,\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Wedges = (function(_super) {\n\n __extends(Wedges, _super);\n\n function Wedges() {\n return Wedges.__super__.constructor.apply(this, arguments);\n }\n\n Wedges.prototype.model = Wedge;\n\n return Wedges;\n\n })(Backbone.Collection);\n\n exports.wedges = new Wedges;\n\n exports.Wedge = Wedge;\n\n exports.WedgeView = WedgeView;\n\n}).call(this);\n}, \"renderers/quadcurve\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Quadcurve, QuadcurveView, Quadcurves, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n QuadcurveView = (function(_super) {\n\n __extends(QuadcurveView, _super);\n\n function QuadcurveView() {\n return QuadcurveView.__super__.constructor.apply(this, arguments);\n }\n\n QuadcurveView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x0', 'y0', 'x1', 'y1', 'cx', 'cy'], [new line_properties(this, glyphspec)]);\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return QuadcurveView.__super__.initialize.call(this, options);\n };\n\n QuadcurveView.prototype._render = function(data) {\n var ctx, cx, cy, glyph_props, x0, x1, y0, y1, _ref, _ref1, _ref2;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x0 = glyph_props.v_select('x0', data);\n y0 = glyph_props.v_select('y0', data);\n _ref = this.map_to_screen(x0, glyph_props.x0.units, y0, glyph_props.y0.units), this.sx0 = _ref[0], this.sy0 = _ref[1];\n x1 = glyph_props.v_select('x1', data);\n y1 = glyph_props.v_select('y1', data);\n _ref1 = this.map_to_screen(x1, glyph_props.x1.units, y1, glyph_props.y1.units), this.sx1 = _ref1[0], this.sy1 = _ref1[1];\n cx = glyph_props.v_select('cx', data);\n cy = glyph_props.v_select('cy', data);\n _ref2 = this.map_to_screen(cx, glyph_props.cx.units, cy, glyph_props.cy.units), this.scx = _ref2[0], this.scy = _ref2[1];\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n QuadcurveView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _ref;\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _i = 0, _ref = this.sx0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i] + this.scx[i] + this.scy[i])) {\n continue;\n }\n ctx.moveTo(this.sx0[i], this.sy0[i]);\n ctx.quadraticCurveTo(this.scx[i], this.scy[i], this.sx1[i], this.sy1[i]);\n }\n return ctx.stroke();\n }\n };\n\n QuadcurveView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n if (this.do_stroke) {\n _results = [];\n for (i = _i = 0, _ref = this.sx0.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx0[i] + this.sy0[i] + this.sx1[i] + this.sy1[i] + this.scx[i] + this.scy[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.moveTo(this.sx0[i], this.sy0[i]);\n ctx.quadraticCurveTo(this.scx[i], this.scy[i], this.sx1[i], this.sy1[i]);\n glyph_props.line_properties.set(ctx, data[i]);\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n return QuadcurveView;\n\n })(GlyphView);\n\n Quadcurve = (function(_super) {\n\n __extends(Quadcurve, _super);\n\n function Quadcurve() {\n return Quadcurve.__super__.constructor.apply(this, arguments);\n }\n\n Quadcurve.prototype.default_view = QuadcurveView;\n\n Quadcurve.prototype.type = 'GlyphRenderer';\n\n return Quadcurve;\n\n })(Glyph);\n\n Quadcurve.prototype.display_defaults = _.clone(Quadcurve.prototype.display_defaults);\n\n _.extend(Quadcurve.prototype.display_defaults, {\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Quadcurves = (function(_super) {\n\n __extends(Quadcurves, _super);\n\n function Quadcurves() {\n return Quadcurves.__super__.constructor.apply(this, arguments);\n }\n\n Quadcurves.prototype.model = Quadcurve;\n\n return Quadcurves;\n\n })(Backbone.Collection);\n\n exports.quadcurves = new Quadcurves;\n\n exports.Quadcurve = Quadcurve;\n\n exports.QuadcurveView = QuadcurveView;\n\n}).call(this);\n}, \"renderers/properties\": function(exports, require, module) {(function() {\n var fill_properties, glyph_properties, line_properties, properties, text_properties,\n __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = (function() {\n\n function properties() {}\n\n properties.prototype.string = function(styleprovider, glyphspec, attrname) {\n var default_value, glyph_value;\n default_value = styleprovider.mget(attrname);\n if (!(attrname in glyphspec)) {\n if (_.isString(default_value)) {\n this[attrname] = {\n \"default\": default_value\n };\n } else {\n console.log((\"string property '\" + attrname + \"' given invalid default value: \") + default_value);\n }\n return;\n }\n glyph_value = glyphspec[attrname];\n if (_.isString(glyph_value)) {\n return this[attrname] = {\n \"default\": glyph_value\n };\n } else if (_.isObject(glyph_value)) {\n this[attrname] = glyph_value;\n if (!(this[attrname][\"default\"] != null)) {\n this[attrname][\"default\"] = default_value;\n }\n return console.log(this[attrname]);\n } else {\n return console.log((\"string property '\" + attrname + \"' given invalid glyph value: \") + glyph_value);\n }\n };\n\n properties.prototype.number = function(styleprovider, glyphspec, attrname) {\n var default_units, default_value, glyph_value, _ref;\n default_value = styleprovider.mget(attrname);\n default_units = (_ref = styleprovider.mget(attrname + '_units')) != null ? _ref : 'data';\n if (attrname + '_units' in glyphspec) {\n default_units = glyphspec[attrname + '_units'];\n }\n if (!(attrname in glyphspec)) {\n if (_.isNumber(default_value)) {\n this[attrname] = {\n \"default\": default_value,\n units: default_units\n };\n } else {\n console.log((\"number property '\" + attrname + \"' given invalid default value: \") + default_value);\n }\n return;\n }\n glyph_value = glyphspec[attrname];\n if (_.isString(glyph_value)) {\n return this[attrname] = {\n field: glyph_value,\n \"default\": default_value,\n units: default_units\n };\n } else if (_.isNumber(glyph_value)) {\n return this[attrname] = {\n \"default\": glyph_value,\n units: default_units\n };\n } else if (_.isObject(glyph_value)) {\n this[attrname] = glyph_value;\n if (!(this[attrname][\"default\"] != null)) {\n this[attrname][\"default\"] = default_value;\n }\n if (!(this[attrname].units != null)) {\n return this[attrname].units = default_units;\n }\n } else {\n return console.log((\"number property '\" + attrname + \"' given invalid glyph value: \") + glyph_value);\n }\n };\n\n properties.prototype.color = function(styleprovider, glyphspec, attrname) {\n var default_value, glyph_value;\n default_value = styleprovider.mget(attrname);\n if (!(attrname in glyphspec)) {\n if (_.isString(default_value) || _.isNull(default_value)) {\n this[attrname] = {\n \"default\": default_value\n };\n } else {\n console.log((\"color property '\" + attrname + \"' given invalid default value: \") + default_value);\n }\n return;\n }\n glyph_value = glyphspec[attrname];\n if (_.isString(glyph_value) || _.isNull(glyph_value)) {\n return this[attrname] = {\n \"default\": glyph_value\n };\n } else if (_.isObject(glyph_value)) {\n this[attrname] = glyph_value;\n if (!(this[attrname][\"default\"] != null)) {\n return this[attrname][\"default\"] = default_value;\n }\n } else {\n return console.log((\"color property '\" + attrname + \"' given invalid glyph value: \") + glyph_value);\n }\n };\n\n properties.prototype.array = function(styleprovider, glyphspec, attrname) {\n var default_units, default_value, glyph_value, _ref;\n default_value = styleprovider.mget(attrname);\n default_units = (_ref = styleprovider.mget(attrname + \"_units\")) != null ? _ref : 'data';\n if (attrname + '_units' in glyphspec) {\n default_units = glyphspec[attrname + 'units'];\n }\n if (!(attrname in glyphspec)) {\n if (_.isArray(default_value)) {\n this[attrname] = {\n \"default\": default_value,\n units: default_units\n };\n } else {\n console.log((\"array property '\" + attrname + \"' given invalid default value: \") + default_value);\n }\n return;\n }\n glyph_value = glyphspec[attrname];\n if (_.isString(glyph_value)) {\n return this[attrname] = {\n field: glyph_value,\n \"default\": default_value,\n units: default_units\n };\n } else if (_.isArray(glyph_value)) {\n return this[attrname] = {\n \"default\": glyph_value,\n units: default_units\n };\n } else if (_.isObject(glyph_value)) {\n this[attrname] = glyph_value;\n if (!(this[attrname][\"default\"] != null)) {\n return this[attrname][\"default\"] = default_value;\n }\n } else {\n return console.log((\"array property '\" + attrname + \"' given invalid glyph value: \") + glyph_value);\n }\n };\n\n properties.prototype[\"enum\"] = function(styleprovider, glyphspec, attrname, vals) {\n var default_value, glyph_value, levels_value;\n default_value = styleprovider.mget(attrname);\n levels_value = vals.split(\" \");\n if (!(attrname in glyphspec)) {\n if (_.isString(default_value) && __indexOf.call(levels_value, default_value) >= 0) {\n this[attrname] = {\n \"default\": default_value\n };\n } else {\n console.log((\"enum property '\" + attrname + \"' given invalid default value: \") + default_value);\n console.log(\" acceptable values:\" + levels_value);\n }\n return;\n }\n glyph_value = glyphspec[attrname];\n if (_.isString(glyph_value)) {\n if (__indexOf.call(levels_value, glyph_value) >= 0) {\n return this[attrname] = {\n \"default\": glyph_value\n };\n } else {\n return this[attrname] = {\n field: glyph_value,\n \"default\": default_value\n };\n }\n } else if (_.isObject(glyph_value)) {\n this[attrname] = glyph_value;\n if (!(this[attrname][\"default\"] != null)) {\n return this[attrname][\"default\"] = default_value;\n }\n } else {\n console.log((\"enum property '\" + attrname + \"' given invalid glyph value: \") + glyph_value);\n return console.log(\" acceptable values:\" + levels_value);\n }\n };\n\n properties.prototype.setattr = function(styleprovider, glyphspec, attrname, attrtype) {\n var values, _ref;\n values = null;\n if (attrtype.indexOf(\":\") > -1) {\n _ref = attrtype.split(\":\"), attrtype = _ref[0], values = _ref[1];\n }\n if (attrtype === \"string\") {\n return this.string(styleprovider, glyphspec, attrname);\n } else if (attrtype === \"number\") {\n return this.number(styleprovider, glyphspec, attrname);\n } else if (attrtype === \"color\") {\n return this.color(styleprovider, glyphspec, attrname);\n } else if (attrtype === \"array\") {\n return this.array(styleprovider, glyphspec, attrname);\n } else if (attrtype === \"enum\" && values) {\n return this[\"enum\"](styleprovider, glyphspec, attrname, values);\n } else {\n return console.log((\"Unknown type '\" + attrtype + \"' for glyph property: \") + attrname);\n }\n };\n\n properties.prototype.select = function(attrname, obj) {\n if (!(attrname in this)) {\n console.log((\"requested unknown property '\" + attrname + \" on object: \") + obj);\n return;\n }\n if (this[attrname].field != null) {\n if (this[attrname].field in obj) {\n return obj[this[attrname].field];\n }\n }\n if (obj[attrname]) {\n return obj[attrname];\n }\n if (this[attrname][\"default\"] != null) {\n return this[attrname][\"default\"];\n } else {\n return console.log(\"selection for attribute '\" + attrname + \" failed on object: \" + obj);\n }\n };\n\n properties.prototype.v_select = function(attrname, objs) {\n var i, obj, result, _i, _ref;\n if (!(attrname in this)) {\n console.log(\"requested unknown property '\" + attrname + \" on objects\");\n return;\n }\n result = new Array(objs.length);\n for (i = _i = 0, _ref = objs.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n obj = objs[i];\n if (this[attrname].field != null) {\n if (this[attrname].field in obj) {\n result[i] = obj[this[attrname].field];\n }\n } else if (obj[attrname]) {\n result[i] = obj[attrname];\n } else if (this[attrname][\"default\"] != null) {\n result[i] = this[attrname][\"default\"];\n } else {\n console.log(\"vector selection for attribute '\" + attrname + \" failed on object: \" + obj);\n return;\n }\n }\n return result;\n };\n\n return properties;\n\n })();\n\n line_properties = (function(_super) {\n\n __extends(line_properties, _super);\n\n function line_properties(styleprovider, glyphspec, prefix) {\n if (prefix == null) {\n prefix = \"\";\n }\n this.line_color_name = \"\" + prefix + \"line_color\";\n this.line_width_name = \"\" + prefix + \"line_width\";\n this.line_alpha_name = \"\" + prefix + \"line_alpha\";\n this.line_join_name = \"\" + prefix + \"line_join\";\n this.line_cap_name = \"\" + prefix + \"line_cap\";\n this.line_dash_name = \"\" + prefix + \"line_dash\";\n this.line_dash_offset_name = \"\" + prefix + \"line_dash_offset\";\n this.color(styleprovider, glyphspec, this.line_color_name);\n this.number(styleprovider, glyphspec, this.line_width_name);\n this.number(styleprovider, glyphspec, this.line_alpha_name);\n this[\"enum\"](styleprovider, glyphspec, this.line_join_name, \"miter round bevel\");\n this[\"enum\"](styleprovider, glyphspec, this.line_cap_name, \"butt round square\");\n this.array(styleprovider, glyphspec, this.line_dash_name);\n this.number(styleprovider, glyphspec, this.line_dash_offset_name);\n this.do_stroke = !(this.line_color[\"default\"] === null);\n }\n\n line_properties.prototype.set = function(ctx, obj) {\n ctx.strokeStyle = this.select(this.line_color_name, obj);\n ctx.globalAlpha = this.select(this.line_alpha_name, obj);\n ctx.lineWidth = this.select(this.line_width_name, obj);\n ctx.lineJoin = this.select(this.line_join_name, obj);\n ctx.lineCap = this.select(this.line_cap_name, obj);\n ctx.setLineDash(this.select(this.line_dash_name, obj));\n return ctx.setLineDashOffset(this.select(this.line_dash_offset_name, obj));\n };\n\n return line_properties;\n\n })(properties);\n\n fill_properties = (function(_super) {\n\n __extends(fill_properties, _super);\n\n function fill_properties(styleprovider, glyphspec, prefix) {\n if (prefix == null) {\n prefix = \"\";\n }\n this.fill_name = \"\" + prefix + \"fill\";\n this.fill_alpha_name = \"\" + prefix + \"fill_alpha\";\n this.color(styleprovider, glyphspec, this.fill_name);\n this.number(styleprovider, glyphspec, this.fill_alpha_name);\n this.do_fill = !(this.fill[\"default\"] === null);\n }\n\n fill_properties.prototype.set = function(ctx, obj) {\n ctx.fillStyle = this.select(this.fill_name, obj);\n return ctx.globalAlpha = this.select(this.fill_alpha_name, obj);\n };\n\n return fill_properties;\n\n })(properties);\n\n text_properties = (function(_super) {\n\n __extends(text_properties, _super);\n\n function text_properties(styleprovider, glyphspec, prefix) {\n if (prefix == null) {\n prefix = \"\";\n }\n this.text_font_name = \"\" + prefix + \"text_font\";\n this.text_font_size_name = \"\" + prefix + \"text_font_size\";\n this.text_font_style_name = \"\" + prefix + \"text_font_style\";\n this.text_color_name = \"\" + prefix + \"text_color\";\n this.text_alpha_name = \"\" + prefix + \"text_alpha\";\n this.text_align_name = \"\" + prefix + \"text_align\";\n this.text_baseline_name = \"\" + prefix + \"text_baseline\";\n this.string(styleprovider, glyphspec, this.text_font_name);\n this.string(styleprovider, glyphspec, this.text_font_size_name);\n this.string(styleprovider, glyphspec, this.text_font_style_name);\n this.color(styleprovider, glyphspec, this.text_color_name);\n this.number(styleprovider, glyphspec, this.text_alpha_name);\n this[\"enum\"](styleprovider, glyphspec, this.text_align_name, \"left right center\");\n this[\"enum\"](styleprovider, glyphspec, this.text_baseline_name, \"top middle bottom\");\n }\n\n text_properties.prototype.set = function(ctx, obj) {\n var font, font_size, font_style;\n font = this.select(this.text_font_name, obj);\n font_size = this.select(this.text_font_size_name, obj);\n font_style = this.select(this.text_font_style_name, obj);\n ctx.font = font_style + \" \" + font_size + \" \" + font;\n ctx.fillStyle = this.select(this.text_color_name, obj);\n ctx.globalAlpha = this.select(this.text_alpha_name, obj);\n ctx.textAlign = this.select(this.text_align_name, obj);\n return ctx.textBaseline = this.select(this.text_baseline_name, obj);\n };\n\n return text_properties;\n\n })(properties);\n\n glyph_properties = (function(_super) {\n\n __extends(glyph_properties, _super);\n\n function glyph_properties(styleprovider, glyphspec, attrnames, properties) {\n var attrname, attrtype, prop, _i, _j, _len, _len1, _ref;\n for (_i = 0, _len = attrnames.length; _i < _len; _i++) {\n attrname = attrnames[_i];\n attrtype = \"number\";\n if (attrname.indexOf(\":\") > -1) {\n _ref = attrname.split(\":\"), attrname = _ref[0], attrtype = _ref[1];\n }\n this.setattr(styleprovider, glyphspec, attrname, attrtype);\n }\n for (_j = 0, _len1 = properties.length; _j < _len1; _j++) {\n prop = properties[_j];\n this[prop.constructor.name] = prop;\n }\n this.fast_path = false;\n if ('fast_path' in glyphspec) {\n this.fast_path = glyphspec.fast_path;\n }\n }\n\n return glyph_properties;\n\n })(properties);\n\n exports.glyph_properties = glyph_properties;\n\n exports.fill_properties = fill_properties;\n\n exports.line_properties = line_properties;\n\n exports.text_properties = text_properties;\n\n}).call(this);\n}, \"renderers/rect\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Rect, RectView, Rects, fill_properties, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n fill_properties = properties.fill_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n RectView = (function(_super) {\n\n __extends(RectView, _super);\n\n function RectView() {\n return RectView.__super__.constructor.apply(this, arguments);\n }\n\n RectView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x', 'y', 'width', 'height', 'angle'], [new fill_properties(this, glyphspec), new line_properties(this, glyphspec)]);\n this.do_fill = this.glyph_props.fill_properties.do_fill;\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return RectView.__super__.initialize.call(this, options);\n };\n\n RectView.prototype._render = function(data) {\n var ctx, glyph_props, obj, x, y, _ref;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x = glyph_props.v_select('x', data);\n y = glyph_props.v_select('y', data);\n _ref = this.map_to_screen(x, glyph_props.x.units, y, glyph_props.y.units), this.sx = _ref[0], this.sy = _ref[1];\n this.sw = this.distance(data, 'x', 'width', 'center');\n this.sh = this.distance(data, 'y', 'height', 'center');\n this.angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(glyph_props.select('angle', obj));\n }\n return _results;\n })();\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n RectView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _j, _ref, _ref1;\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.sw[i] + this.sh[i] + this.angle[i])) {\n continue;\n }\n if (this.angle[i]) {\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.rect(-this.sw[i] / 2, -this.sh[i] / 2, this.sw[i], this.sh[i]);\n ctx.rotate(-this.angle[i]);\n ctx.translate(-this.sx[i], -this.sy[i]);\n } else {\n ctx.rect(this.sx[i] - this.sw[i] / 2, this.sy[i] - this.sh[i] / 2, this.sw[i], this.sh[i]);\n }\n }\n ctx.fill();\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n ctx.beginPath();\n for (i = _j = 0, _ref1 = this.sx.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {\n if (isNaN(this.sx[i] + this.sy[i] + this.sw[i] + this.sh[i] + this.angle[i])) {\n continue;\n }\n if (this.angle[i]) {\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.rect(-this.sw[i] / 2, -this.sh[i] / 2, this.sw[i], this.sh[i]);\n ctx.rotate(-this.angle[i]);\n ctx.translate(-this.sx[i], -this.sy[i]);\n } else {\n ctx.rect(this.sx[i] - this.sw[i] / 2, this.sy[i] - this.sh[i] / 2, this.sw[i], this.sh[i]);\n }\n }\n return ctx.stroke();\n }\n };\n\n RectView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.sw[i] + this.sh[i] + this.angle[i])) {\n continue;\n }\n ctx.translate(this.sx[i], this.sy[i]);\n ctx.rotate(this.angle[i]);\n ctx.beginPath();\n ctx.rect(-this.sw[i] / 2, -this.sh[i] / 2, this.sw[i], this.sh[i]);\n if (this.do_fill) {\n glyph_props.fill_properties.set(ctx, data[i]);\n ctx.fill();\n }\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, data[i]);\n ctx.stroke();\n }\n ctx.rotate(-this.angle[i]);\n _results.push(ctx.translate(-this.sx[i], -this.sy[i]));\n }\n return _results;\n };\n\n return RectView;\n\n })(GlyphView);\n\n Rect = (function(_super) {\n\n __extends(Rect, _super);\n\n function Rect() {\n return Rect.__super__.constructor.apply(this, arguments);\n }\n\n Rect.prototype.default_view = RectView;\n\n Rect.prototype.type = 'GlyphRenderer';\n\n return Rect;\n\n })(Glyph);\n\n Rect.prototype.display_defaults = _.clone(Rect.prototype.display_defaults);\n\n _.extend(Rect.prototype.display_defaults, {\n fill: 'gray',\n fill_alpha: 1.0,\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0,\n angle: 0.0\n });\n\n Rects = (function(_super) {\n\n __extends(Rects, _super);\n\n function Rects() {\n return Rects.__super__.constructor.apply(this, arguments);\n }\n\n Rects.prototype.model = Rect;\n\n return Rects;\n\n })(Backbone.Collection);\n\n exports.rects = new Rects;\n\n exports.Rect = Rect;\n\n exports.RectView = RectView;\n\n}).call(this);\n}, \"renderers/line\": function(exports, require, module) {(function() {\n var Glyph, GlyphView, Line, LineView, Lines, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n LineView = (function(_super) {\n\n __extends(LineView, _super);\n\n function LineView() {\n return LineView.__super__.constructor.apply(this, arguments);\n }\n\n LineView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['xs:array', 'ys:array'], [new line_properties(this, glyphspec)]);\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return LineView.__super__.initialize.call(this, options);\n };\n\n LineView.prototype._render = function(data) {\n var ctx, glyph_props;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n LineView.prototype._fast_path = function(ctx, glyph_props) {\n var i, pt, sx, sy, x, y, _i, _j, _len, _ref, _ref1, _results;\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph);\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n pt = data[_i];\n x = glyph_props.select('xs', pt);\n y = glyph_props.select('ys', pt);\n _ref = this.map_to_screen(x, glyph_props.xs.units, y, glyph_props.ys.units), sx = _ref[0], sy = _ref[1];\n for (i = _j = 0, _ref1 = sx.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {\n if (i === 0) {\n ctx.beginPath();\n ctx.moveTo(sx[i], sy[i]);\n continue;\n } else if (isNaN(sx[i]) || isNaN(sy[i])) {\n ctx.stroke();\n ctx.beginPath();\n continue;\n } else {\n ctx.lineTo(sx[i], sy[i]);\n }\n }\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n LineView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, pt, sx, sy, x, y, _i, _j, _len, _ref, _ref1, _results;\n if (this.do_stroke) {\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n pt = data[_i];\n x = glyph_props.select('xs', pt);\n y = glyph_props.select('ys', pt);\n _ref = this.map_to_screen(x, glyph_props.xs.units, y, glyph_props.ys.units), sx = _ref[0], sy = _ref[1];\n glyph_props.line_properties.set(ctx, pt);\n for (i = _j = 0, _ref1 = sx.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {\n if (i === 0) {\n ctx.beginPath();\n ctx.moveTo(sx[i], sy[i]);\n continue;\n } else if (isNaN(sx[i]) || isNaN(sy[i])) {\n ctx.stroke();\n ctx.beginPath();\n continue;\n } else {\n ctx.lineTo(sx[i], sy[i]);\n }\n }\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n return LineView;\n\n })(GlyphView);\n\n Line = (function(_super) {\n\n __extends(Line, _super);\n\n function Line() {\n return Line.__super__.constructor.apply(this, arguments);\n }\n\n Line.prototype.default_view = LineView;\n\n Line.prototype.type = 'GlyphRenderer';\n\n return Line;\n\n })(Glyph);\n\n Line.prototype.display_defaults = _.clone(Line.prototype.display_defaults);\n\n _.extend(Line.prototype.display_defaults, {\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Lines = (function(_super) {\n\n __extends(Lines, _super);\n\n function Lines() {\n return Lines.__super__.constructor.apply(this, arguments);\n }\n\n Lines.prototype.model = Line;\n\n return Lines;\n\n })(Backbone.Collection);\n\n exports.lines = new Lines;\n\n exports.Line = Line;\n\n exports.LineView = LineView;\n\n}).call(this);\n}, \"renderers/arc\": function(exports, require, module) {(function() {\n var Arc, ArcView, Arcs, Glyph, GlyphView, glyph, glyph_properties, line_properties, properties,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n properties = require('./properties');\n\n glyph_properties = properties.glyph_properties;\n\n line_properties = properties.line_properties;\n\n glyph = require('./glyph');\n\n Glyph = glyph.Glyph;\n\n GlyphView = glyph.GlyphView;\n\n ArcView = (function(_super) {\n\n __extends(ArcView, _super);\n\n function ArcView() {\n return ArcView.__super__.constructor.apply(this, arguments);\n }\n\n ArcView.prototype.initialize = function(options) {\n var glyphspec;\n glyphspec = this.mget('glyphspec');\n this.glyph_props = new glyph_properties(this, glyphspec, ['x', 'y', 'radius', 'start_angle', 'end_angle', 'direction:string'], [new line_properties(this, glyphspec)]);\n this.do_stroke = this.glyph_props.line_properties.do_stroke;\n return ArcView.__super__.initialize.call(this, options);\n };\n\n ArcView.prototype._render = function(data) {\n var ctx, dir, glyph_props, i, obj, x, y, _i, _ref, _ref1;\n ctx = this.plot_view.ctx;\n glyph_props = this.glyph_props;\n ctx.save();\n x = glyph_props.v_select('x', data);\n y = glyph_props.v_select('y', data);\n _ref = this.map_to_screen(x, glyph_props.x.units, y, glyph_props.y.units), this.sx = _ref[0], this.sy = _ref[1];\n this.radius = this.distance(data, 'x', 'radius', 'edge');\n this.start_angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(glyph_props.select('start_angle', obj));\n }\n return _results;\n })();\n this.end_angle = (function() {\n var _i, _len, _results;\n _results = [];\n for (_i = 0, _len = data.length; _i < _len; _i++) {\n obj = data[_i];\n _results.push(glyph_props.select('end_angle', obj));\n }\n return _results;\n })();\n this.direction = new Array(this.sx.length);\n for (i = _i = 0, _ref1 = this.sx.length - 1; 0 <= _ref1 ? _i <= _ref1 : _i >= _ref1; i = 0 <= _ref1 ? ++_i : --_i) {\n dir = glyph_props.select('direction', data[i]);\n if (dir === 'clock') {\n this.direction[i] = false;\n } else if (dir === 'anticlock') {\n this.direction[i] = true;\n } else {\n this.direction[i] = NaN;\n }\n }\n if (this.glyph_props.fast_path) {\n this._fast_path(ctx, glyph_props);\n } else {\n this._full_path(ctx, glyph_props, data);\n }\n return ctx.restore();\n };\n\n ArcView.prototype._fast_path = function(ctx, glyph_props) {\n var i, _i, _ref, _results;\n if (this.do_stroke) {\n glyph_props.line_properties.set(ctx, glyph_props);\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.radius[i] + this.start_angle[i] + this.end_angle[i] + this.direction[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.arc(this.sx[i], this.sy[i], this.radius[i], this.start_angle[i], this.end_angle[i], this.direction[i]);\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n ArcView.prototype._full_path = function(ctx, glyph_props, data) {\n var i, _i, _ref, _results;\n if (this.do_stroke) {\n _results = [];\n for (i = _i = 0, _ref = this.sx.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n if (isNaN(this.sx[i] + this.sy[i] + this.radius[i] + this.start_angle[i] + this.end_angle[i] + this.direction[i])) {\n continue;\n }\n ctx.beginPath();\n ctx.arc(this.sx[i], this.sy[i], this.radius[i], this.start_angle[i], this.end_angle[i], this.direction[i]);\n glyph_props.line_properties.set(ctx, data[i]);\n _results.push(ctx.stroke());\n }\n return _results;\n }\n };\n\n return ArcView;\n\n })(GlyphView);\n\n Arc = (function(_super) {\n\n __extends(Arc, _super);\n\n function Arc() {\n return Arc.__super__.constructor.apply(this, arguments);\n }\n\n Arc.prototype.default_view = ArcView;\n\n Arc.prototype.type = 'GlyphRenderer';\n\n return Arc;\n\n })(Glyph);\n\n Arc.prototype.display_defaults = _.clone(Arc.prototype.display_defaults);\n\n _.extend(Arc.prototype.display_defaults, {\n line_color: 'red',\n line_width: 1,\n line_alpha: 1.0,\n line_join: 'miter',\n line_cap: 'butt',\n line_dash: [],\n line_dash_offset: 0\n });\n\n Arcs = (function(_super) {\n\n __extends(Arcs, _super);\n\n function Arcs() {\n return Arcs.__super__.constructor.apply(this, arguments);\n }\n\n Arcs.prototype.model = Arc;\n\n return Arcs;\n\n })(Backbone.Collection);\n\n exports.arcs = new Arcs;\n\n exports.Arc = Arc;\n\n exports.ArcView = ArcView;\n\n}).call(this);\n}, \"ticks\": function(exports, require, module) {(function() {\n \" Tick generator classes and helper functions for calculating axis\\ntick-related values (i.e., bounds and intervals).\\n\";\n\n var AbstractTickGenerator, DefaultTickGenerator, ShowAllTickGenerator, arange, argsort, arr_div, arr_div2, arr_div3, arr_pow2, auto_bounds, auto_interval, auto_ticks, calc_bound, divmod, float, heckbert_interval, is_base2, log10, log2, tick_intervals, _nice,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n AbstractTickGenerator = (function() {\n \" Abstract class for tick generators.\";\n\n function AbstractTickGenerator() {}\n\n AbstractTickGenerator.prototype.get_ticks = function(data_low, data_high, bounds_low, bounds_high, interval, use_endpoints, scale) {\n if (use_endpoints == null) {\n use_endpoints = False;\n }\n if (scale == null) {\n scale = 'linear';\n }\n return \" Returns a list of ticks points in data space.\\n\\nParameters\\n----------\\ndata_low, data_high : float\\n The actual minimum and maximum of index values of the entire\\n dataset.\\nbounds_low, bounds_high : \\\"auto\\\", \\\"fit\\\", float\\n The range for which ticks should be generated.\\ninterval : \\\"auto\\\", float\\n If the value is a positive number, it specifies the length\\n of the tick interval; a negative integer specifies the\\n number of tick intervals; 'auto' specifies that the number and\\n length of the tick intervals are automatically calculated, based\\n on the range of the axis.\\nuse_endpoints : Boolean\\n If True, the lower and upper bounds of the data are used as the\\n lower and upper end points of the axis. If False, the end points\\n might not fall exactly on the bounds.\\nscale : 'linear' or 'log'\\n The type of scale the ticks are for.\\n\\nReturns\\n-------\\ntick_list : array of floats\\n Where ticks are to be placed.\\n\\n\\nExample\\n-------\\nIf the range of x-values in a line plot span from -15.0 to +15.0, but\\nthe plot is currently displaying only the region from 3.1 to 6.83, and\\nthe user wants the interval to be automatically computed to be some\\nnice value, then call get_ticks() thusly::\\n\\n get_ticks(-15.0, 15.0, 3.1, 6.83, \\\"auto\\\")\\n\\nA reasonable return value in this case would be::\\n\\n [3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5]\";\n };\n\n return AbstractTickGenerator;\n\n })();\n\n DefaultTickGenerator = (function(_super) {\n\n __extends(DefaultTickGenerator, _super);\n\n \" An implementation of AbstractTickGenerator that simply uses the\\nauto_ticks() and log_auto_ticks() functions.\";\n\n\n function DefaultTickGenerator() {\n return DefaultTickGenerator.__super__.constructor.apply(this, arguments);\n }\n\n DefaultTickGenerator.prototype.get_ticks = function(data_low, data_high, bounds_low, bounds_high, interval, use_endpoints, scale) {\n if (use_endpoints == null) {\n use_endpoints = False;\n }\n if (scale == null) {\n scale = 'linear';\n }\n if (scale === 'linear') {\n \"\";\n\n }\n return elif(scale === {\n 'log': \"\"\n });\n };\n\n return DefaultTickGenerator;\n\n })(AbstractTickGenerator);\n\n ShowAllTickGenerator = (function(_super) {\n\n __extends(ShowAllTickGenerator, _super);\n\n \" Uses the abstract interface, but returns all \\\"positions\\\" instead\\nof decimating the ticks.\\n\\nYou must provide a sequence of values as a *positions* keyword argument\\nto the constructor.\";\n\n\n function ShowAllTickGenerator() {\n return ShowAllTickGenerator.__super__.constructor.apply(this, arguments);\n }\n\n ShowAllTickGenerator.prototype.get_ticks = function(data_low, data_high, bounds_low, bounds_high, interval, use_endpoints, scale) {\n if (use_endpoints == null) {\n use_endpoints = False;\n }\n if (scale == null) {\n scale = 'linear';\n }\n return \" Returns an array based on **positions**.\";\n };\n\n return ShowAllTickGenerator;\n\n })(AbstractTickGenerator);\n\n auto_ticks = function(data_low, data_high, bound_low, bound_high, tick_interval, use_endpoints) {\n var auto_lower, auto_upper, delta, end, intervals, is_auto_high, is_auto_low, lower, rng, start, tick, ticks, upper, _ref;\n if (use_endpoints == null) {\n use_endpoints = true;\n }\n \" Finds locations for axis tick marks.\\n\\nCalculates the locations for tick marks on an axis. The *bound_low*,\\n*bound_high*, and *tick_interval* parameters specify how the axis end\\npoints and tick interval are calculated.\\n\\nParameters\\n----------\\n\\ndata_low, data_high : number\\n The minimum and maximum values of the data along this axis.\\n If any of the bound settings are 'auto' or 'fit', the axis\\n traits are calculated automatically from these values.\\nbound_low, bound_high : 'auto', 'fit', or a number.\\n The lower and upper bounds of the axis. If the value is a number,\\n that value is used for the corresponding end point. If the value is\\n 'auto', then the end point is calculated automatically. If the\\n value is 'fit', then the axis bound is set to the corresponding\\n *data_low* or *data_high* value.\\ntick_interval : can be 'auto' or a number\\n If the value is a positive number, it specifies the length\\n of the tick interval; a negative integer specifies the\\n number of tick intervals; 'auto' specifies that the number and\\n length of the tick intervals are automatically calculated, based\\n on the range of the axis.\\nuse_endpoints : Boolean\\n If True, the lower and upper bounds of the data are used as the\\n lower and upper end points of the axis. If False, the end points\\n might not fall exactly on the bounds.\\n\\nReturns\\n-------\\nAn array of tick mark locations. The first and last tick entries are the\\naxis end points.\";\n\n is_auto_low = bound_low === 'auto';\n is_auto_high = bound_high === 'auto';\n if (typeof bound_low === \"string\") {\n lower = data_low;\n } else {\n lower = bound_low;\n }\n if (typeof bound_high === \"string\") {\n upper = data_high;\n } else {\n upper = bound_high;\n }\n if ((tick_interval === 'auto') || (tick_interval === 0.0)) {\n rng = Math.abs(upper - lower);\n if (rng === 0.0) {\n tick_interval = 0.5;\n lower = data_low - 0.5;\n upper = data_high + 0.5;\n } else if (is_base2(rng) && is_base2(upper) && rng > 4) {\n if (rng === 2) {\n tick_interval = 1;\n } else if (rng === 4) {\n tick_interval = 4;\n } else {\n tick_interval = rng / 4;\n }\n } else {\n tick_interval = auto_interval(lower, upper);\n }\n } else if (tick_interval < 0) {\n intervals = -tick_interval;\n tick_interval = tick_intervals(lower, upper, intervals);\n if (is_auto_low && is_auto_high) {\n is_auto_low = is_auto_high = false;\n lower = tick_interval * floor(lower / tick_interval);\n while ((Math.abs(lower) >= tick_interval) && ((lower + tick_interval * (intervals - 1)) >= upper)) {\n lower -= tick_interval;\n }\n upper = lower + tick_interval * intervals;\n }\n }\n if (is_auto_low || is_auto_high) {\n delta = 0.01 * tick_interval * (data_low === data_high);\n _ref = auto_bounds(data_low - delta, data_high + delta, tick_interval), auto_lower = _ref[0], auto_upper = _ref[1];\n if (is_auto_low) {\n lower = auto_lower;\n }\n if (is_auto_high) {\n upper = auto_upper;\n }\n }\n start = floor(lower / tick_interval) * tick_interval;\n end = floor(upper / tick_interval) * tick_interval;\n if (start === end) {\n lower = start = start - tick_interval;\n upper = end = start - tick_interval;\n }\n if (upper > end) {\n end += tick_interval;\n }\n ticks = arange(start, end + (tick_interval / 2.0), tick_interval);\n if (len(ticks) < 2) {\n \"\";\n\n }\n if ((!is_auto_low) && use_endpoints) {\n ticks[0] = lower;\n }\n if ((!is_auto_high) && use_endpoints) {\n ticks[-1] = upper;\n }\n return [\n (function() {\n var _i, _len, _results;\n if (tick >= bound_low && tick <= bound_high) {\n _results = [];\n for (_i = 0, _len = ticks.length; _i < _len; _i++) {\n tick = ticks[_i];\n _results.push(tick);\n }\n return _results;\n }\n })()\n ];\n };\n\n is_base2 = function(range) {\n \" Returns True if *range* is a positive base-2 number (2, 4, 8, 16, ...).\";\n\n var lg;\n if (range <= 0.0) {\n return false;\n } else {\n lg = log2(range);\n return (lg === Math.floor(lg)) && (lg > 0.0);\n }\n };\n\n log10 = function(num) {\n if (num === 0.0) {\n num += 1.0e-16;\n }\n return Math.log(num) / Math.log(10);\n };\n\n log2 = function(num) {\n \" Returns the base 2 logarithm of a number (or array).\\n\";\n if (num === 0.0) {\n num += 1.0e-16;\n }\n return Math.log(num);\n };\n\n heckbert_interval = function(data_low, data_high, numticks) {\n var d, graphmax, graphmin, range;\n if (numticks == null) {\n numticks = 8;\n }\n \"Returns a \\\"nice\\\" range and interval for a given data range and a preferred\\nnumber of ticks. From Paul Heckbert's algorithm in Graphics Gems.\";\n\n range = _nice(data_high - data_low);\n d = _nice(range / (numticks - 1), true);\n graphmin = Math.floor(data_low / d) * d;\n graphmax = Math.ceil(data_high / d) * d;\n return [graphmin, graphmax, d];\n };\n\n _nice = function(x, round) {\n var expv, f, nf;\n if (round == null) {\n round = false;\n }\n \" if round is false, then use Math.ceil(range) \";\n\n expv = Math.floor(log10(x));\n f = x / Math.pow(10, expv);\n if (round) {\n if (f < 1.5) {\n nf = 1.0;\n } else if (f < 3.0) {\n nf = 2.0;\n } else if (f < 7.0) {\n nf = 5.0;\n } else {\n nf = 10.0;\n }\n } else {\n if (f <= 1.0) {\n nf = 1.0;\n } else if (f <= 2.0) {\n nf = 2.0;\n } else if (f <= 5.0) {\n nf = 5.0;\n } else {\n nf = 10.0;\n }\n }\n return nf * Math.pow(10, expv);\n };\n\n arange = function(start, end, step) {\n var i, ret_arr;\n if (end == null) {\n end = false;\n }\n if (step == null) {\n step = false;\n }\n if (!end) {\n end = start;\n start = 0;\n }\n if (start > end) {\n if (step === false) {\n step = -1;\n } else if (step > 0) {\n \"the loop will never terminate\";\n\n 1 / 0;\n }\n } else if (step < 0) {\n \"the loop will never terminate\";\n\n 1 / 0;\n }\n if (!step) {\n step = 1;\n }\n ret_arr = [];\n i = start;\n if (start < end) {\n while (i < end) {\n ret_arr.push(i);\n i += step;\n }\n } else {\n while (i > end) {\n ret_arr.push(i);\n i += step;\n }\n }\n return ret_arr;\n };\n\n arr_div = function(numerators, denominator) {\n var output_arr, val, _i, _len;\n output_arr = [];\n for (_i = 0, _len = numerators.length; _i < _len; _i++) {\n val = numerators[_i];\n output_arr.push(val / denominator);\n }\n return output_arr;\n };\n\n arr_div2 = function(numerator, denominators) {\n var output_arr, val, _i, _len;\n output_arr = [];\n for (_i = 0, _len = denominators.length; _i < _len; _i++) {\n val = denominators[_i];\n output_arr.push(numerator / val);\n }\n return output_arr;\n };\n\n arr_div3 = function(numerators, denominators) {\n var i, output_arr, val, _i, _len;\n output_arr = [];\n for (i = _i = 0, _len = denominators.length; _i < _len; i = ++_i) {\n val = denominators[i];\n output_arr.push(numerators[i] / val);\n }\n return output_arr;\n };\n\n arr_pow2 = function(base, exponents) {\n var output_arr, val, _i, _len;\n output_arr = [];\n for (_i = 0, _len = exponents.length; _i < _len; _i++) {\n val = exponents[_i];\n output_arr.push(Math.pow(base, val));\n }\n return output_arr;\n };\n\n _.sorted = function(arr) {\n return _.sortBy(arr, _.identity);\n };\n\n argsort = function(arr) {\n var i, ret_arr, sorted_arr, y, _i, _len;\n sorted_arr = _.sortBy(arr, _.identity);\n ret_arr = [];\n for (i = _i = 0, _len = sorted_arr.length; _i < _len; i = ++_i) {\n y = sorted_arr[i];\n ret_arr[i] = arr.indexOf(y);\n }\n return ret_arr;\n };\n\n exports.argsort = argsort;\n\n auto_interval = function(data_low, data_high) {\n \" Calculates the tick interval for a range.\\n\\nThe boundaries for the data to be plotted on the axis are::\\n\\n data_bounds = (data_low,data_high)\\n\\nThe function chooses the number of tick marks, which can be between\\n3 and 9 marks (including end points), and chooses tick intervals at\\n1, 2, 2.5, 5, 10, 20, ...\\n\\nReturns\\n-------\\ninterval : float\\n tick mark interval for axis\";\n\n var best_magics, best_mantissas, candidate_intervals, diff_arr, divisions, interval, ma, magic_index, magic_intervals, magnitude, magnitudes, mantissa_index, mantissas, mi, range, result, _i, _j, _len, _len1;\n range = float(data_high) - float(data_low);\n divisions = [8.0, 7.0, 6.0, 5.0, 4.0, 3.0];\n candidate_intervals = arr_div2(range, divisions);\n magnitudes = candidate_intervals.map(function(candidate) {\n return Math.pow(10.0, Math.floor(log10(candidate)));\n });\n mantissas = arr_div3(candidate_intervals, magnitudes);\n magic_intervals = [1.0, 2.0, 2.5, 5.0, 10.0];\n best_mantissas = [];\n best_magics = [];\n for (_i = 0, _len = magic_intervals.length; _i < _len; _i++) {\n mi = magic_intervals[_i];\n diff_arr = mantissas.map(function(x) {\n return Math.abs(mi - x);\n });\n best_magics.push(_.min(diff_arr));\n }\n for (_j = 0, _len1 = mantissas.length; _j < _len1; _j++) {\n ma = mantissas[_j];\n diff_arr = magic_intervals.map(function(x) {\n return Math.abs(ma - x);\n });\n best_mantissas.push(_.min(diff_arr));\n }\n magic_index = argsort(best_magics)[0];\n mantissa_index = argsort(best_mantissas)[0];\n interval = magic_intervals[magic_index];\n magnitude = magnitudes[mantissa_index];\n result = interval * magnitude;\n return result;\n };\n\n exports.auto_interval = auto_interval;\n\n float = function(x) {\n return x + 0.0;\n };\n\n exports.float = float;\n\n tick_intervals = function(data_low, data_high, intervals) {\n \" Computes the best tick interval length to achieve a specified number of\\ntick intervals.\\n\\nParameters\\n----------\\ndata_low, data_high : number\\n The minimum and maximum values of the data along this axis.\\n If any of the bound settings are 'auto' or 'fit', the axis\\n traits are calculated automatically from these values.\\nintervals : number\\n The desired number of intervals\\n\\nReturns\\n-------\\nReturns a float indicating the tick interval length.\";\n\n var exp_, factor, index, interval, range, result;\n range = float(data_high - data_low);\n if (range === 0.0) {\n range = 1.0;\n }\n interval = range / intervals;\n exp_ = Math.floor(log10(interval));\n factor = Math.pow(10, exp_);\n console.log(\"exp_ \" + exp_ + \" pre_factor \" + factor + \" pre_interval \" + interval);\n interval = interval / factor;\n console.log(\" factor \" + factor + \" initial_interval \" + interval);\n if (interval < 2.0) {\n interval = 2.0;\n index = 0;\n } else if (interval < 2.5) {\n interval = 2.5;\n index = 1;\n } else if (interval < 5.0) {\n interval = 5.0;\n index = 2;\n } else {\n interval = 10.0;\n index = 3;\n }\n while (true) {\n result = interval * factor;\n console.log(\"result \" + result + \" index \" + index + \" interval \" + interval);\n if ((Math.floor(data_low / result) * result) + (intervals * result) >= data_high) {\n return result;\n }\n index = (index + 1) % 4;\n interval = interval * [2.0, 1.25, 2.0, 2.0]([index]);\n }\n };\n\n exports.tick_intervals = tick_intervals;\n\n \"I'll worry about this after getting linear ticks working\\nlog_auto_ticks = (data_low, data_high,\\n bound_low, bound_high,\\n tick_interval, use_endpoints=true) ->\\n #Like auto_ticks(), but for log scales.\\n tick_goal = 15\\n magic_numbers = [1, 2, 5]\\n explicit_ticks = false\\n\\n if data_low <= 0.0\\n return []\\n\\n if tick_interval != 'auto'\\n if tick_interval < 0\\n tick_goal = -tick_interval\\n else\\n magic_numbers = [tick_interval]\\n explicit_ticks = true\\n\\n if data_low>data_high\\n [data_low, data_high] = data_high, data_low\\n\\n log_low = log10(data_low)\\n log_high = log10(data_high)\\n log_interval = log_high-log_low\\n\\n if log_interval < 1.0\\n # If less than a factor of 10 separates the data, just use the normal\\n # linear approach\\n return auto_ticks(data_low, data_high,\\n bound_low, bound_high,\\n tick_interval,\\n use_endpoints = false)\\n\\n else if log_interval < (tick_goal+1)/2 or explicit_ticks\\n # If there's enough space, try to put lines at the magic number multipliers\\n # inside each power of ten\\n\\n # Try each interval to see how many ticks we get\\n for interval in magic_numbers\\n ticklist = []\\n for exp in [Math.floor(log_low).,Math.ceil(log_high)]\\n for multiplier in linspace(interval, 10.0, round(10.0/interval),\\n endpoint=1)\\n tick = Math.exp(10, exp*multiplier)\\n if tick >= data_low and tick <= data_high:\\n ticklist.append(tick)\\n if len(ticklist)<tick_goal+3 or explicit_ticks:\\n return ticklist\\n else:\\n # We put lines at every power of ten or less\\n startlog = Math.ceil(log_low)\\n endlog = Math.floor(log_high)\\n interval = Math.ceil((endlog-startlog)/9.0)\\n expticks = arange(startlog, endlog, interval)\\n # There's no function that is like arange but inclusive, so\\n # we have to check whether the endpoint should be included.\\n if (endlog-startlog) % interval == 0.0:\\n expticks = concatenate([expticks, [endlog]])\\n return 10**expticks\";\n\n\n auto_bounds = function(data_low, data_high, tick_interval) {\n \" Calculates appropriate upper and lower bounds for the axis from\\nthe data bounds and the given axis interval.\\n\\nThe boundaries hit either exactly on the lower and upper values\\nor on the tick mark just beyond the lower and upper values.\";\n return [calc_bound(data_low, tick_interval, false), calc_bound(data_high, tick_interval, true)];\n };\n\n exports.auto_bounds = auto_bounds;\n\n divmod = function(x, y) {\n var quot, rem;\n quot = Math.floor(x / y);\n rem = x % y;\n return [quot, rem];\n };\n\n exports.divmod = divmod;\n\n calc_bound = function(end_point, tick_interval, is_upper) {\n \" Finds an axis end point that includes the value *end_point*.\\n\\nIf the tick mark interval results in a tick mark hitting directly on the\\nend point, *end_point* is returned. Otherwise, the location of the tick\\nmark just past *end_point* is returned. The *is_upper* parameter\\nspecifies whether *end_point* is at the upper (True) or lower (false)\\nend of the axis.\";\n\n var c1, c2, quotient, rem_p, remainder, tick_p, _ref;\n _ref = divmod(end_point, tick_interval), quotient = _ref[0], remainder = _ref[1];\n rem_p = remainder === 0.0;\n tick_p = ((tick_interval - remainder) / tick_interval) < 0.00001;\n if (rem_p || tick_p) {\n return end_point;\n }\n c1 = (quotient + 1.0) * tick_interval;\n c2 = quotient * tick_interval;\n if (is_upper) {\n return Math.max(c1, c2);\n }\n return Math.min(c1, c2);\n };\n\n exports.calc_bound = calc_bound;\n\n}).call(this);\n}, \"adhoc/speed_test\": function(exports, require, module) {(function() {\n\n test('linetest', function() {\n var a, b, c, data, line, maxval, path, scale1, scale2, temp, x, y, _i, _len, _ref;\n expect(0);\n maxval = 6000;\n x = _.range(maxval);\n y = _.range(maxval);\n data = (function() {\n var _i, _len, _ref, _results;\n _ref = _.zip(x, y);\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n temp = _ref[_i];\n _results.push({\n 'x': temp[0],\n 'y': temp[1]\n });\n }\n return _results;\n })();\n window.data = data;\n scale1 = d3.scale.linear().domain([0, maxval]).range([0, 300]);\n scale2 = d3.scale.linear().domain([0, maxval]).range([300, 0]);\n $('body').append(\"<div><svg id='chart'></svg></div>\");\n d3.select('#chart').attr('width', 300).attr('height', 300);\n a = new Date();\n _ref = _.range(1);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n c = _ref[_i];\n console.log('drawing line');\n line = d3.svg.line().x(function(d) {\n return scale1(d['x']);\n }).y(function(d) {\n return scale2(d['y']);\n });\n path = d3.select('#chart').selectAll('path').data([data]).attr('d', line);\n path = d3.select('#chart').selectAll('path').data([data]);\n path.attr('d', line);\n path.attr('stroke', '#000').attr('fill', 'none');\n path = path.enter().append('path');\n path.attr('d', line);\n path.attr('stroke', '#000').attr('fill', 'none');\n }\n b = new Date();\n return console.log(b - a);\n });\n\n test('scatter', function() {\n var a, b, c, data, maxval, node, scale1, scale2, temp, x, y, _i, _len, _ref;\n expect(0);\n maxval = 1560;\n x = _.range(maxval);\n y = _.range(maxval);\n data = (function() {\n var _i, _len, _ref, _results;\n _ref = _.zip(x, y);\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n temp = _ref[_i];\n _results.push({\n 'x': temp[0],\n 'y': temp[1]\n });\n }\n return _results;\n })();\n window.data = data;\n scale1 = d3.scale.linear().domain([0, maxval]).range([0, 300]);\n scale2 = d3.scale.linear().domain([0, maxval]).range([300, 0]);\n $('body').append(\"<div><svg id='chart'></svg></div>\");\n d3.select('#chart').attr('width', 300).attr('height', 300);\n a = new Date();\n node = d3.select('#chart').selectAll('circle').data(data).enter().append('circle');\n b = new Date();\n console.log('getmarks', b - a);\n a = new Date();\n _ref = _.range(1);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n c = _ref[_i];\n console.log('drawing scatter');\n node.attr('cx', (function(d) {\n return scale1(d['x']);\n })).attr('cy', (function(d) {\n return scale2(d['x']);\n })).attr('r', 5).attr('fill', '#000');\n }\n b = new Date();\n return console.log(b - a);\n });\n\n}).call(this);\n}, \"base\": function(exports, require, module) {(function() {\n var Collections, Config, ContinuumView, HasParent, HasProperties, PlotWidget, WebSocketWrapper, build_views, load_models, locations, safebind, submodels,\n __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n Config = {\n prefix: ''\n };\n\n safebind = function(binder, target, event, callback) {\n var _this = this;\n if (!_.has(binder, 'eventers')) {\n binder['eventers'] = {};\n }\n try {\n binder['eventers'][target.id] = target;\n } catch (error) {\n\n }\n if (target != null) {\n target.on(event, callback, binder);\n target.on('destroy remove', function() {\n return delete binder['eventers'][target];\n }, binder);\n } else {\n console.log(\"error with binder\", binder, event);\n }\n return null;\n };\n\n load_models = function(modelspecs) {\n var attrs, coll, coll_attrs, model, newspecs, oldspecs, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m;\n newspecs = [];\n oldspecs = [];\n for (_i = 0, _len = modelspecs.length; _i < _len; _i++) {\n model = modelspecs[_i];\n coll = Collections(model['type']);\n attrs = model['attributes'];\n if (coll && coll.get(attrs['id'])) {\n oldspecs.push([coll, attrs]);\n } else {\n newspecs.push([coll, attrs]);\n }\n }\n for (_j = 0, _len1 = newspecs.length; _j < _len1; _j++) {\n coll_attrs = newspecs[_j];\n coll = coll_attrs[0], attrs = coll_attrs[1];\n if (coll) {\n coll.add(attrs, {\n 'silent': true\n });\n }\n }\n for (_k = 0, _len2 = newspecs.length; _k < _len2; _k++) {\n coll_attrs = newspecs[_k];\n coll = coll_attrs[0], attrs = coll_attrs[1];\n if (coll) {\n coll.get(attrs['id']).dinitialize(attrs);\n }\n }\n for (_l = 0, _len3 = newspecs.length; _l < _len3; _l++) {\n coll_attrs = newspecs[_l];\n coll = coll_attrs[0], attrs = coll_attrs[1];\n if (coll) {\n model = coll.get(attrs.id);\n model.trigger('add', model, coll, {});\n }\n }\n for (_m = 0, _len4 = oldspecs.length; _m < _len4; _m++) {\n coll_attrs = oldspecs[_m];\n coll = coll_attrs[0], attrs = coll_attrs[1];\n if (coll) {\n coll.get(attrs['id']).set(attrs);\n }\n }\n return null;\n };\n\n WebSocketWrapper = (function() {\n\n _.extend(WebSocketWrapper.prototype, Backbone.Events);\n\n function WebSocketWrapper(ws_conn_string) {\n this.onmessage = __bind(this.onmessage, this);\n\n var _this = this;\n this.auth = {};\n this.ws_conn_string = ws_conn_string;\n this._connected = $.Deferred();\n this.connected = this._connected.promise();\n try {\n this.s = new WebSocket(ws_conn_string);\n } catch (error) {\n this.s = new MozWebSocket(ws_conn_string);\n }\n this.s.onopen = function() {\n return _this._connected.resolve();\n };\n this.s.onmessage = this.onmessage;\n }\n\n WebSocketWrapper.prototype.onmessage = function(msg) {\n var data, index, topic;\n data = msg.data;\n index = data.indexOf(\":\");\n index = data.indexOf(\":\", index + 1);\n topic = data.substring(0, index);\n data = data.substring(index + 1);\n this.trigger(\"msg:\" + topic, data);\n return null;\n };\n\n WebSocketWrapper.prototype.send = function(msg) {\n var _this = this;\n return $.when(this.connected).done(function() {\n return _this.s.send(msg);\n });\n };\n\n WebSocketWrapper.prototype.subscribe = function(topic, auth) {\n var msg;\n this.auth[topic] = auth;\n msg = JSON.stringify({\n msgtype: 'subscribe',\n topic: topic,\n auth: auth\n });\n return this.send(msg);\n };\n\n return WebSocketWrapper;\n\n })();\n\n submodels = function(wswrapper, topic, apikey) {\n wswrapper.subscribe(topic, apikey);\n return wswrapper.on(\"msg:\" + topic, function(msg) {\n var clientid, model, msgobj, ref, _i, _len, _ref;\n msgobj = JSON.parse(msg);\n if (msgobj['msgtype'] === 'modelpush') {\n load_models(msgobj['modelspecs']);\n } else if (msgobj['msgtype'] === 'modeldel') {\n _ref = msgobj['modelspecs'];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n ref = _ref[_i];\n model = resolve_ref(ref['type'], ref['id']);\n if (model) {\n model.destroy({\n 'local': true\n });\n }\n }\n } else if (msgobj['msgtype'] === 'status' && msgobj['status'][0] === 'subscribesuccess') {\n clientid = msgobj['status'][2];\n Config.clientid = clientid;\n $.ajaxSetup({\n 'headers': {\n 'Continuum-Clientid': clientid\n }\n });\n } else {\n console.log(msgobj);\n }\n return null;\n });\n };\n\n HasProperties = (function(_super) {\n\n __extends(HasProperties, _super);\n\n function HasProperties() {\n this.get_obj = __bind(this.get_obj, this);\n\n this.resolve_ref = __bind(this.resolve_ref, this);\n\n this.convert_to_ref = __bind(this.convert_to_ref, this);\n return HasProperties.__super__.constructor.apply(this, arguments);\n }\n\n HasProperties.prototype.destroy = function(options) {\n var target, val, _ref, _results;\n HasProperties.__super__.destroy.call(this, options);\n if (_.has(this, 'eventers')) {\n _ref = this.eventers;\n _results = [];\n for (target in _ref) {\n if (!__hasProp.call(_ref, target)) continue;\n val = _ref[target];\n _results.push(val.off(null, null, this));\n }\n return _results;\n }\n };\n\n HasProperties.prototype.isNew = function() {\n return !this.get('created');\n };\n\n HasProperties.prototype.initialize = function(attrs, options) {\n var _this = this;\n if (!attrs) {\n attrs = {};\n }\n if (!options) {\n options = {};\n }\n HasProperties.__super__.initialize.call(this, attrs, options);\n this.properties = {};\n this.property_cache = {};\n if (!_.has(attrs, this.idAttribute)) {\n this.id = _.uniqueId(this.type);\n this.attributes[this.idAttribute] = this.id;\n }\n return _.defer(function() {\n if (!_this.inited) {\n return _this.dinitialize(attrs, options);\n }\n });\n };\n\n HasProperties.prototype.dinitialize = function(attrs, options) {\n return this.inited = true;\n };\n\n HasProperties.prototype.set_obj = function(key, value, options) {\n var attrs, val;\n if (_.isObject(key) || key === null) {\n attrs = key;\n options = value;\n } else {\n attrs = {};\n attrs[key] = value;\n }\n for (key in attrs) {\n if (!__hasProp.call(attrs, key)) continue;\n val = attrs[key];\n attrs[key] = this.convert_to_ref(val);\n }\n return this.set(attrs, options);\n };\n\n HasProperties.prototype.set = function(key, value, options) {\n var attrs, toremove, val, _i, _len;\n if (_.isObject(key) || key === null) {\n attrs = key;\n options = value;\n } else {\n attrs = {};\n attrs[key] = value;\n }\n toremove = [];\n for (key in attrs) {\n if (!__hasProp.call(attrs, key)) continue;\n val = attrs[key];\n if (_.has(this, 'properties') && _.has(this.properties, key) && this.properties[key]['setter']) {\n this.properties[key]['setter'].call(this, val);\n toremove.push(key);\n }\n }\n for (_i = 0, _len = toremove.length; _i < _len; _i++) {\n key = toremove[_i];\n delete attrs[key];\n }\n if (!_.isEmpty(attrs)) {\n return HasProperties.__super__.set.call(this, attrs, options);\n }\n };\n\n HasProperties.prototype.convert_to_ref = function(value) {\n if (_.isArray(value)) {\n return _.map(value, this.convert_to_ref);\n } else {\n if (value instanceof HasProperties) {\n return value.ref();\n }\n }\n };\n\n HasProperties.prototype.add_dependencies = function(prop_name, object, fields) {\n var fld, prop_spec, _i, _len, _results;\n if (!_.isArray(fields)) {\n fields = [fields];\n }\n prop_spec = this.properties[prop_name];\n prop_spec.dependencies = prop_spec.dependencies.concat({\n obj: object,\n fields: fields\n });\n _results = [];\n for (_i = 0, _len = fields.length; _i < _len; _i++) {\n fld = fields[_i];\n _results.push(safebind(this, object, \"change:\" + fld, prop_spec['callbacks']['changedep']));\n }\n return _results;\n };\n\n HasProperties.prototype.register_setter = function(prop_name, setter) {\n var prop_spec;\n prop_spec = this.properties[prop_name];\n return prop_spec.setter = setter;\n };\n\n HasProperties.prototype.register_property = function(prop_name, getter, use_cache) {\n var changedep, prop_spec, propchange,\n _this = this;\n if (_.isUndefined(use_cache)) {\n use_cache = true;\n }\n if (_.has(this.properties, prop_name)) {\n this.remove_property(prop_name);\n }\n changedep = function() {\n return _this.trigger('changedep:' + prop_name);\n };\n propchange = function() {\n var firechange, new_val, old_val;\n firechange = true;\n if (prop_spec['use_cache']) {\n old_val = _this.get_cache(prop_name);\n _this.clear_cache(prop_name);\n new_val = _this.get(prop_name);\n firechange = new_val !== old_val;\n }\n if (firechange) {\n _this.trigger('change:' + prop_name, _this, _this.get(prop_name));\n return _this.trigger('change', _this);\n }\n };\n prop_spec = {\n 'getter': getter,\n 'dependencies': [],\n 'use_cache': use_cache,\n 'setter': null,\n 'callbacks': {\n changedep: changedep,\n propchange: propchange\n }\n };\n this.properties[prop_name] = prop_spec;\n safebind(this, this, \"changedep:\" + prop_name, prop_spec['callbacks']['propchange']);\n return prop_spec;\n };\n\n HasProperties.prototype.remove_property = function(prop_name) {\n var dep, dependencies, fld, obj, prop_spec, _i, _j, _len, _len1, _ref;\n prop_spec = this.properties[prop_name];\n dependencies = prop_spec.dependencies;\n for (_i = 0, _len = dependencies.length; _i < _len; _i++) {\n dep = dependencies[_i];\n obj = dep.obj;\n _ref = dep['fields'];\n for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {\n fld = _ref[_j];\n obj.off('change:' + fld, prop_spec['callbacks']['changedep'], this);\n }\n }\n this.off(\"changedep:\" + dep);\n delete this.properties[prop_name];\n if (prop_spec.use_cache) {\n return this.clear_cache(prop_name);\n }\n };\n\n HasProperties.prototype.has_cache = function(prop_name) {\n return _.has(this.property_cache, prop_name);\n };\n\n HasProperties.prototype.add_cache = function(prop_name, val) {\n return this.property_cache[prop_name] = val;\n };\n\n HasProperties.prototype.clear_cache = function(prop_name, val) {\n return delete this.property_cache[prop_name];\n };\n\n HasProperties.prototype.get_cache = function(prop_name) {\n return this.property_cache[prop_name];\n };\n\n HasProperties.prototype.get = function(prop_name) {\n var computed, getter, prop_spec;\n if (_.has(this.properties, prop_name)) {\n prop_spec = this.properties[prop_name];\n if (prop_spec.use_cache && this.has_cache(prop_name)) {\n return this.property_cache[prop_name];\n } else {\n getter = prop_spec.getter;\n computed = getter.apply(this, this);\n if (this.properties[prop_name].use_cache) {\n this.add_cache(prop_name, computed);\n }\n return computed;\n }\n } else {\n return HasProperties.__super__.get.call(this, prop_name);\n }\n };\n\n HasProperties.prototype.ref = function() {\n return {\n 'type': this.type,\n 'id': this.id\n };\n };\n\n HasProperties.prototype.resolve_ref = function(ref) {\n if (_.isArray(ref)) {\n return _.map(ref, this.resolve_ref);\n }\n if (!ref) {\n console.log('ERROR, null reference');\n }\n if (ref['type'] === this.type && ref['id'] === this.id) {\n return this;\n } else {\n return Collections(ref['type']).get(ref['id']);\n }\n };\n\n HasProperties.prototype.get_obj = function(ref_name) {\n var ref;\n ref = this.get(ref_name);\n if (ref) {\n return this.resolve_ref(ref);\n }\n };\n\n HasProperties.prototype.url = function() {\n var base;\n base = Config.prefix + \"/bokeh/bb/\" + this.get('doc') + \"/\" + this.type + \"/\";\n if (this.isNew()) {\n return base;\n }\n return base + this.get('id') + \"/\";\n };\n\n HasProperties.prototype.sync = function(method, model, options) {\n return options.success(model);\n };\n\n HasProperties.prototype.defaults = {};\n\n return HasProperties;\n\n })(Backbone.Model);\n\n HasParent = (function(_super) {\n\n __extends(HasParent, _super);\n\n function HasParent() {\n return HasParent.__super__.constructor.apply(this, arguments);\n }\n\n HasParent.prototype.get_fallback = function(attr) {\n var retval;\n if (this.get_obj('parent') && _.indexOf(this.get_obj('parent').parent_properties, attr) >= 0 && !_.isUndefined(this.get_obj('parent').get(attr))) {\n return this.get_obj('parent').get(attr);\n } else {\n retval = this.display_defaults[attr];\n return retval;\n }\n };\n\n HasParent.prototype.get = function(attr) {\n var normalval;\n normalval = HasParent.__super__.get.call(this, attr);\n if (!_.isUndefined(normalval)) {\n return normalval;\n } else if (!(attr === 'parent')) {\n return this.get_fallback(attr);\n }\n };\n\n HasParent.prototype.display_defaults = {};\n\n return HasParent;\n\n })(HasProperties);\n\n build_views = function(view_storage, view_models, options) {\n \"use strict\";\n\n var created_views, key, model, newmodels, to_remove, view_specific_option, _i, _j, _len, _len1;\n created_views = [];\n try {\n newmodels = _.filter(view_models, function(x) {\n return !_.has(view_storage, x.id);\n });\n } catch (error) {\n debugger;\n console.log(error);\n throw error;\n }\n for (_i = 0, _len = newmodels.length; _i < _len; _i++) {\n model = newmodels[_i];\n view_specific_option = _.extend({}, options, {\n 'model': model\n });\n try {\n view_storage[model.id] = new model.default_view(view_specific_option);\n } catch (error) {\n console.log(\"error on model of\", model, error);\n throw error;\n }\n created_views.push(view_storage[model.id]);\n }\n to_remove = _.difference(_.keys(view_storage), _.pluck(view_models, 'id'));\n for (_j = 0, _len1 = to_remove.length; _j < _len1; _j++) {\n key = to_remove[_j];\n view_storage[key].remove();\n delete view_storage[key];\n }\n return created_views;\n };\n\n ContinuumView = (function(_super) {\n\n __extends(ContinuumView, _super);\n\n function ContinuumView() {\n return ContinuumView.__super__.constructor.apply(this, arguments);\n }\n\n ContinuumView.prototype.initialize = function(options) {\n if (!_.has(options, 'id')) {\n return this.id = _.uniqueId('ContinuumView');\n }\n };\n\n ContinuumView.prototype.bind_bokeh_events = function() {\n return 'pass';\n };\n\n ContinuumView.prototype.delegateEvents = function(events) {\n ContinuumView.__super__.delegateEvents.call(this, events);\n return this.bind_bokeh_events();\n };\n\n ContinuumView.prototype.remove = function() {\n var target, val, _ref;\n if (_.has(this, 'eventers')) {\n _ref = this.eventers;\n for (target in _ref) {\n if (!__hasProp.call(_ref, target)) continue;\n val = _ref[target];\n val.off(null, null, this);\n }\n }\n this.trigger('remove');\n return ContinuumView.__super__.remove.call(this);\n };\n\n ContinuumView.prototype.mget = function() {\n return this.model.get.apply(this.model, arguments);\n };\n\n ContinuumView.prototype.mset = function() {\n return this.model.set.apply(this.model, arguments);\n };\n\n ContinuumView.prototype.mget_obj = function(fld) {\n return this.model.get_obj(fld);\n };\n\n ContinuumView.prototype.render_end = function() {\n return \"pass\";\n };\n\n return ContinuumView;\n\n })(Backbone.View);\n\n PlotWidget = (function(_super) {\n\n __extends(PlotWidget, _super);\n\n function PlotWidget() {\n return PlotWidget.__super__.constructor.apply(this, arguments);\n }\n\n PlotWidget.prototype.tagName = 'div';\n\n PlotWidget.prototype.marksize = 3;\n\n PlotWidget.prototype.initialize = function(options) {\n var ctx;\n this.plot_model = options.plot_model;\n this.plot_view = options.plot_view;\n ctx = this.plot_view.ctx;\n if (!ctx.setLineDash) {\n ctx.setLineDash = function(dash) {\n ctx.mozDash = dash;\n return ctx.webkitLineDash = dash;\n };\n }\n if (!ctx.getLineDash) {\n ctx.getLineDash = function() {\n return ctx.mozDash;\n };\n }\n ctx.setLineDashOffset = function(dash_offset) {\n ctx.lineDashOffset = dash_offset;\n ctx.mozDashOffset = dash_offset;\n return ctx.webkitLineDashOffset = dash_offset;\n };\n return PlotWidget.__super__.initialize.call(this, options);\n };\n\n PlotWidget.prototype.bind_bokeh_events = function() {\n return safebind(this, this.plot_view.viewstate, 'change', function() {\n return this.request_render();\n });\n };\n\n PlotWidget.prototype.addPolygon = function(x, y) {\n if (isNaN(x) || isNaN(y)) {\n return null;\n }\n return this.plot_view.ctx.fillRect(x, y, this.marksize, this.marksize);\n };\n\n PlotWidget.prototype.addCircle = function(x, y) {\n if (isNaN(x) || isNaN(y)) {\n return null;\n }\n this.plot_view.ctx.beginPath();\n this.plot_view.ctx.arc(x, y, this.marksize, 0, Math.PI * 2);\n this.plot_view.ctx.closePath();\n this.plot_view.ctx.fill();\n return this.plot_view.ctx.stroke();\n };\n\n PlotWidget.prototype.request_render = function() {\n return this.plot_view.throttled();\n };\n\n return PlotWidget;\n\n })(ContinuumView);\n\n locations = {\n Plot: ['./container', 'plots'],\n PanTool: ['./tools/pantool', 'pantools'],\n ZoomTool: ['./tools/zoomtool', 'zoomtools'],\n SelectionTool: ['./tools/selecttool', 'selectiontools'],\n LinearAxis: ['./guides', 'linearaxes'],\n LinearDateAxis: ['./guides', 'lineardateaxes'],\n Legend: ['./guides', 'legends'],\n GlyphRenderer: ['./renderers/glyph_renderer', 'glyphrenderers'],\n Glyph: ['./renderers/glyph', 'glyphs'],\n Arc: ['./renderers/arc', 'arcs'],\n Area: ['./renderers/area', 'areas'],\n Bezier: ['./renderers/bezier', 'beziers'],\n Circle: ['./renderers/circle', 'circles'],\n Image: ['./renderers/image', 'images'],\n Line: ['./renderers/line', 'lines'],\n Oval: ['./renderers/oval', 'ovals'],\n Quad: ['./renderers/quad', 'quads'],\n Quadcurve: ['./renderers/quadcurve', 'quadcurves'],\n Ray: ['./renderers/ray', 'rays'],\n Rect: ['./renderers/rect', 'rects'],\n Segment: ['./renderers/segment', 'segments'],\n Text: ['./renderers/text', 'texts'],\n Wedge: ['./renderers/wedge', 'wedges'],\n BoxSelectionOverlay: ['./overlays', 'boxselectionoverlays'],\n ObjectArrayDataSource: ['./datasource', 'objectarraydatasources'],\n ColumnDataSource: ['./datasource', 'columndatasources'],\n Range1d: ['./ranges', 'range1ds'],\n DataRange1d: ['./ranges', 'datarange1ds'],\n DataFactorRange: ['./ranges', 'datafactorranges'],\n Plot: ['./container', 'plots'],\n GridPlotContainer: ['./container', 'gridplotcontainers'],\n CDXPlotContext: ['./container', 'plotcontexts'],\n PlotContext: ['./container', 'plotcontexts'],\n ScatterRenderer: ['./schema_renderers', 'scatterrenderers'],\n LineRenderer: ['./schema_renderers', 'linerenderers'],\n DiscreteColorMapper: ['./mapper', 'discretecolormappers'],\n DataTable: ['./table', 'datatables'],\n PandasPivot: ['./pandas/pandas', 'pandaspivots'],\n PandasDataSource: ['./pandas/pandas', 'pandasdatasources'],\n PandasPlotSource: ['./pandas/pandas', 'pandasplotsources']\n };\n\n exports.locations = locations;\n\n Collections = function(typename) {\n var collection, modulename, _ref;\n if (!locations[typename]) {\n throw \"./base: Unknown Collection \" + typename;\n }\n _ref = locations[typename], modulename = _ref[0], collection = _ref[1];\n return require(modulename)[collection];\n };\n\n exports.Collections = Collections;\n\n exports.Config = Config;\n\n exports.safebind = safebind;\n\n exports.load_models = load_models;\n\n exports.WebSocketWrapper = WebSocketWrapper;\n\n exports.submodels = submodels;\n\n exports.HasProperties = HasProperties;\n\n exports.HasParent = HasParent;\n\n exports.build_views = build_views;\n\n exports.ContinuumView = ContinuumView;\n\n exports.PlotWidget = PlotWidget;\n\n}).call(this);\n}, \"coffee_style_guide\": function(exports, require, module) {(function() {\n \"start of continuum CS style guide. our code does not follow this yet.\";\n\n \"2 spaces per indent\\n80 characters per line\";\n\n \"underscores to separate variables names\\nCamelCase for class names\\nunderscores preceding functions show what we think is private\\ncoffeescript makes it easy to pass instance methods as callbacks.\\ntry to use that instead of writing lots of inline functions as callbacks\";\n\n var MyBigClass, foo,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n MyBigClass = (function(_super) {\n\n __extends(MyBigClass, _super);\n\n function MyBigClass() {\n return MyBigClass.__super__.constructor.apply(this, arguments);\n }\n\n MyBigClass.prototype.set_my_field = function() {\n this.set('hello');\n return MyBigClass.__super__.set_my_field.call(this);\n };\n\n MyBigClass.prototype._dont_call_func = function() {\n return console.log('you should not be calling this');\n };\n\n MyBigClass.prototype.call_func = function() {\n console.log('but I can call this func, because I am in this class');\n return this._dont_call_func();\n };\n\n return MyBigClass;\n\n })(Backbone.Model);\n\n \"coffee script looseness\\nALWAYS use parentheses around function calls\";\n\n\n console.log('log this statement');\n\n console.log('logging this message');\n\n foo = {\n coffee: 'black',\n cream: 'none',\n bagels: {\n cream_cheese: 'fat_free',\n toasted: 'of course'\n }\n };\n\n foo({\n 'name': 'firstobject',\n 'title': 'first'\n }, {\n 'name': 'second object',\n 'title': 'first'\n });\n\n foo({\n 'name': 'second object',\n 'title': 'first'\n }, {\n 'name': 'second object',\n 'title': 'first'\n });\n\n foo({\n 'name': 'second object',\n 'title': 'first'\n }, {\n 'name': 'second object',\n 'title': 'first'\n }, [1, 2, 3, 4, 5]);\n\n \"inline functions\\nwe follow the same syntax for object arrays. 4 spaces before the start of the\\nfunction definition. 2 spaces before the comma separating the functions\";\n\n\n foo(1, 2, 3, function() {\n var a;\n my_callback_goes_here();\n a = {\n 'node': 'fast'\n };\n return a;\n }, function() {\n return second_callback_goes_here();\n });\n\n \"return values\\ncoffee script always returns the last value in a function. don't rely on this.\\nalways return something, or null\";\n\n\n}).call(this);\n}, \"overlays\": function(exports, require, module) {(function() {\n var BoxSelectionOverlay, BoxSelectionOverlayView, BoxSelectionOverlays, HasParent, PlotWidget, base, safebind,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n base = require(\"./base\");\n\n safebind = base.safebind;\n\n PlotWidget = base.PlotWidget;\n\n HasParent = base.HasParent;\n\n BoxSelectionOverlayView = (function(_super) {\n\n __extends(BoxSelectionOverlayView, _super);\n\n function BoxSelectionOverlayView() {\n return BoxSelectionOverlayView.__super__.constructor.apply(this, arguments);\n }\n\n BoxSelectionOverlayView.prototype.bind_events = function() {};\n\n BoxSelectionOverlayView.prototype.initialize = function(options) {\n this.selecting = false;\n this.xrange = [null, null];\n this.yrange = [null, null];\n BoxSelectionOverlayView.__super__.initialize.call(this, options);\n this.toolview = this.plot_view.tools[this.mget('tool').id];\n return this.plot_view.$el.find('.main_can_wrapper').append(this.$el);\n };\n\n BoxSelectionOverlayView.prototype.boxselect = function(xrange, yrange) {\n this.xrange = xrange;\n this.yrange = yrange;\n this.request_render();\n return console.log('valchange');\n };\n\n BoxSelectionOverlayView.prototype.startselect = function() {\n this.selecting = true;\n this.xrange = [null, null];\n this.yrange = [null, null];\n this.request_render();\n return console.log('selecting');\n };\n\n BoxSelectionOverlayView.prototype.stopselect = function() {\n this.selecting = false;\n this.xrange = [null, null];\n this.yrange = [null, null];\n this.request_render();\n return console.log('not selecting');\n };\n\n BoxSelectionOverlayView.prototype.bind_bokeh_events = function(options) {\n safebind(this, this.toolview, 'boxselect', this.boxselect);\n safebind(this, this.toolview, 'startselect', this.startselect);\n return safebind(this, this.toolview, 'stopselect', this.stopselect);\n };\n\n BoxSelectionOverlayView.prototype.render = function() {\n var height, style_string, width, xpos, xrange, ypos, yrange;\n if (!this.selecting) {\n this.$el.removeClass('shading');\n return;\n }\n xrange = this.xrange;\n yrange = this.yrange;\n if (_.any(_.map(xrange, _.isNullOrUndefined)) || _.any(_.map(yrange, _.isNullOrUndefined))) {\n this.$el.removeClass('shading');\n return;\n }\n style_string = \"\";\n xpos = this.plot_view.viewstate.rxpos(Math.min(xrange[0], xrange[1]));\n if (xrange) {\n width = Math.abs(xrange[1] - xrange[0]);\n } else {\n width = this.plot_view.viewstate.get('width');\n }\n style_string += \"; left:\" + xpos + \"px; width:\" + width + \"px; \";\n ypos = this.plot_view.viewstate.rypos(Math.max(yrange[0], yrange[1]));\n if (yrange) {\n height = yrange[1] - yrange[0];\n } else {\n height = this.plot_view.viewstate.get('height');\n }\n this.$el.addClass('shading');\n style_string += \"top:\" + ypos + \"px; height:\" + height + \"px\";\n return this.$el.attr('style', style_string);\n };\n\n return BoxSelectionOverlayView;\n\n })(PlotWidget);\n\n BoxSelectionOverlay = (function(_super) {\n\n __extends(BoxSelectionOverlay, _super);\n\n function BoxSelectionOverlay() {\n return BoxSelectionOverlay.__super__.constructor.apply(this, arguments);\n }\n\n BoxSelectionOverlay.prototype.type = 'BoxSelectionOverlay';\n\n BoxSelectionOverlay.prototype.default_view = BoxSelectionOverlayView;\n\n return BoxSelectionOverlay;\n\n })(HasParent);\n\n _.extend(BoxSelectionOverlay.prototype.defaults, {\n tool: null\n });\n\n BoxSelectionOverlays = (function(_super) {\n\n __extends(BoxSelectionOverlays, _super);\n\n function BoxSelectionOverlays() {\n return BoxSelectionOverlays.__super__.constructor.apply(this, arguments);\n }\n\n BoxSelectionOverlays.prototype.model = BoxSelectionOverlay;\n\n return BoxSelectionOverlays;\n\n })(Backbone.Collection);\n\n exports.boxselectionoverlays = new BoxSelectionOverlays;\n\n exports.BoxSelectionOverlayView = BoxSelectionOverlayView;\n\n exports.BoxSelectionOverlay = BoxSelectionOverlay;\n\n}).call(this);\n}, \"testutils\": function(exports, require, module) {(function() {\n var Collections, bar_plot, base, data_table, glyph_plot, line_plot, make_range_and_mapper, scatter_plot,\n __hasProp = {}.hasOwnProperty;\n\n base = require(\"./base\");\n\n Collections = base.Collections;\n\n scatter_plot = function(parent, data_source, xfield, yfield, color_field, mark, colormapper, local) {\n var color_mapper, options, plot_model, source_name, xaxis, xdr, yaxis, ydr;\n if (_.isUndefined(local)) {\n local = true;\n }\n options = {\n 'local': local\n };\n if (_.isUndefined(mark)) {\n mark = 'circle';\n }\n if (_.isUndefined(color_field)) {\n color_field = null;\n }\n if (_.isUndefined(color_mapper) && color_field) {\n color_mapper = Collections('DiscreteColorMapper').create({\n data_range: Collections('DataFactorRange').create({\n data_source: data_source.ref(),\n columns: ['x']\n }, options)\n }, options);\n }\n source_name = data_source.get('name');\n plot_model = Collections('Plot').create({\n data_sources: {\n source_name: data_source.ref()\n },\n parent: parent\n }, options);\n xdr = Collections('DataRange1d').create({\n 'sources': [\n {\n 'ref': data_source.ref(),\n 'columns': [xfield]\n }\n ]\n }, options);\n ydr = Collections('DataRange1d').create({\n 'sources': [\n {\n 'ref': data_source.ref(),\n 'columns': [yfield]\n }\n ]\n }, options);\n scatter_plot = Collections(\"ScatterRenderer\").create({\n data_source: data_source.ref(),\n xdata_range: xdr.ref(),\n ydata_range: ydr.ref(),\n xfield: xfield,\n yfield: yfield,\n color_field: color_field,\n color_mapper: color_mapper,\n mark: mark,\n parent: plot_model.ref()\n }, options);\n xaxis = Collections('LinearAxis').create({\n 'orientation': 'bottom',\n 'parent': plot_model.ref(),\n 'data_range': xdr.ref()\n }, options);\n yaxis = Collections('LinearAxis').create({\n 'orientation': 'left',\n 'parent': plot_model.ref(),\n 'data_range': ydr.ref()\n }, options);\n plot_model.set({\n 'renderers': [scatter_plot.ref()],\n 'axes': [xaxis.ref(), yaxis.ref()]\n }, options);\n return plot_model;\n };\n\n data_table = function(parent, data_source, xfield, yfield, color_field, mark, colormapper, local) {\n var color_mapper, options, source_name, table_model, xdr, xmapper, ydr, ymapper;\n if (_.isUndefined(local)) {\n local = true;\n }\n options = {\n 'local': local\n };\n if (_.isUndefined(mark)) {\n mark = 'circle';\n }\n if (_.isUndefined(color_field)) {\n color_field = null;\n }\n if (_.isUndefined(color_mapper) && color_field) {\n color_mapper = Collections('DiscreteColorMapper').create({\n data_range: Collections('DataFactorRange').create({\n data_source: data_source.ref(),\n columns: ['x']\n }, options)\n }, options);\n }\n source_name = data_source.get('name');\n table_model = Collections('Table').create({\n data_sources: {\n source_name: data_source.ref()\n },\n parent: parent\n }, options);\n xdr = Collections('DataRange1d').create({\n 'sources': [\n {\n 'ref': data_source.ref(),\n 'columns': [xfield]\n }\n ]\n }, options);\n ydr = Collections('DataRange1d').create({\n 'sources': [\n {\n 'ref': data_source.ref(),\n 'columns': [yfield]\n }\n ]\n }, options);\n xmapper = Collections('LinearMapper').create({\n data_range: xdr.ref(),\n screen_range: table_model.get('xrange')\n }, options);\n ymapper = Collections('LinearMapper').create({\n data_range: ydr.ref(),\n screen_range: table_model.get('yrange')\n }, options);\n scatter_plot = Collections(\"TableRenderer\").create({\n data_source: data_source.ref(),\n xfield: xfield,\n yfield: yfield,\n color_field: color_field,\n color_mapper: color_mapper,\n mark: mark,\n xmapper: xmapper.ref(),\n ymapper: ymapper.ref(),\n parent: table_model.ref()\n }, options);\n return table_model.set({\n 'renderers': [scatter_plot.ref()]\n }, options);\n };\n\n make_range_and_mapper = function(data_source, datafields, padding, screen_range, ordinal, options) {\n var mapper, range;\n if (!ordinal) {\n range = Collections('DataRange1d').create({\n sources: [\n {\n ref: data_source.ref(),\n columns: datafields\n }\n ],\n rangepadding: padding\n }, options);\n mapper = Collections('LinearMapper').create({\n data_range: range.ref(),\n screen_range: screen_range.ref()\n }, options);\n } else {\n range = Collections('DataFactorRange').create({\n data_source: data_source.ref(),\n columns: [field]\n }, options);\n mapper = Collections('FactorMapper').create({\n data_range: range.ref(),\n screen_range: screen_range.ref()\n }, options);\n }\n return [range, mapper];\n };\n\n bar_plot = function(parent, data_source, xfield, yfield, orientation, local) {\n var options, plot_model, xaxis, xdr, xmapper, yaxis, ydr, ymapper, _ref, _ref1;\n if (_.isUndefined(local)) {\n local = true;\n }\n options = {\n 'local': local\n };\n plot_model = Collections('Plot').create({\n data_sources: {\n source_name: data_source.ref()\n },\n parent: parent\n }, options);\n _ref = make_range_and_mapper(data_source, [xfield], d3.max([1 / (data_source.get('data').length - 1), 0.1]), plot_model.get_obj('xrange'), false, options), xdr = _ref[0], xmapper = _ref[1];\n _ref1 = make_range_and_mapper(data_source, [yfield], d3.max([1 / (data_source.get('data').length - 1), 0.1]), plot_model.get_obj('yrange'), false, options), ydr = _ref1[0], ymapper = _ref1[1];\n bar_plot = Collections(\"BarRenderer\").create({\n data_source: data_source.ref(),\n xfield: xfield,\n yfield: yfield,\n xmapper: xmapper.ref(),\n ymapper: ymapper.ref(),\n parent: plot_model.ref(),\n orientation: orientation\n }, options);\n xaxis = Collections('LinearAxis').create({\n orientation: 'bottom',\n mapper: xmapper.ref(),\n parent: plot_model.ref()\n }, options);\n yaxis = Collections('LinearAxis').create({\n orientation: 'left',\n mapper: ymapper.ref(),\n parent: plot_model.ref()\n }, options);\n return plot_model.set({\n renderers: [bar_plot.ref()],\n axes: [xaxis.ref(), yaxis.ref()]\n }, options);\n };\n\n line_plot = function(parent, data_source, xfield, yfield, local) {\n var options, plot_model, source_name, xaxis, xdr, yaxis, ydr;\n if (_.isUndefined(local)) {\n local = true;\n }\n options = {\n 'local': local\n };\n source_name = data_source.get('name');\n plot_model = Collections('Plot').create({\n data_sources: {\n source_name: data_source.ref()\n },\n parent: parent\n }, options);\n xdr = Collections('DataRange1d').create({\n 'sources': [\n {\n 'ref': data_source.ref(),\n 'columns': [xfield]\n }\n ]\n }, options);\n ydr = Collections('DataRange1d').create({\n 'sources': [\n {\n 'ref': data_source.ref(),\n 'columns': [yfield]\n }\n ]\n }, options);\n line_plot = Collections(\"LineRenderer\").create({\n data_source: data_source.ref(),\n xfield: xfield,\n yfield: yfield,\n xdata_range: xdr.ref(),\n ydata_range: ydr.ref(),\n parent: plot_model.ref()\n }, options);\n xaxis = Collections('LinearAxis').create({\n 'orientation': 'bottom',\n 'data_range': xdr.ref(),\n 'mapper': 'linear',\n 'parent': plot_model.ref()\n }, options);\n yaxis = Collections('LinearAxis').create({\n 'orientation': 'left',\n 'data_range': ydr.ref(),\n 'mapper': 'linear',\n 'parent': plot_model.ref()\n }, options);\n return plot_model.set({\n 'renderers': [line_plot.ref()],\n 'axes': [xaxis.ref(), yaxis.ref()]\n }, options);\n };\n\n glyph_plot = function(data_source, renderer, dom_element, xdatanames, ydatanames) {\n var plot_model, xaxis, xdr, yaxis, ydr;\n if (xdatanames == null) {\n xdatanames = ['x'];\n }\n if (ydatanames == null) {\n ydatanames = ['y'];\n }\n plot_model = Collections('Plot').create();\n xdr = Collections('DataRange1d').create({\n sources: [\n {\n ref: data_source.ref(),\n columns: ['x']\n }\n ]\n });\n ydr = Collections('DataRange1d').create({\n sources: [\n {\n ref: data_source.ref(),\n columns: ['y']\n }\n ]\n });\n renderer.set('xdata_range', xdr.ref());\n renderer.set('ydata_range', ydr.ref());\n xaxis = Collections('LinearAxis').create({\n orientation: 'bottom',\n parent: plot_model.ref(),\n data_range: xdr.ref()\n });\n yaxis = Collections('LinearAxis').create({\n orientation: 'left',\n parent: plot_model.ref(),\n data_range: ydr.ref()\n });\n plot_model.set({\n renderers: [renderer.ref()],\n axes: [xaxis.ref(), yaxis.ref()]\n });\n return plot_model;\n };\n\n window.bokehprettyprint = function(obj) {\n var key, val, _results;\n _results = [];\n for (key in obj) {\n if (!__hasProp.call(obj, key)) continue;\n val = obj[key];\n _results.push(console.log(key, val));\n }\n return _results;\n };\n\n exports.scatter_plot = scatter_plot;\n\n exports.data_table = data_table;\n\n exports.make_range_and_mapper = make_range_and_mapper;\n\n exports.bar_plot = bar_plot;\n\n exports.line_plot = line_plot;\n\n exports.glyph_plot = glyph_plot;\n\n}).call(this);\n}, \"table\": function(exports, require, module) {(function() {\n var ContinuumView, DataTable, DataTableView, DataTables, HasParent, base, safebind,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n base = require(\"./base\");\n\n ContinuumView = base.ContinuumView;\n\n safebind = base.safebind;\n\n HasParent = base.HasParent;\n\n DataTableView = (function(_super) {\n\n __extends(DataTableView, _super);\n\n function DataTableView() {\n return DataTableView.__super__.constructor.apply(this, arguments);\n }\n\n DataTableView.prototype.initialize = function(options) {\n DataTableView.__super__.initialize.call(this, options);\n safebind(this, this.model, 'destroy', this.remove);\n safebind(this, this.model, 'change', this.render);\n safebind(this, this.mget_obj('data_source'), 'change', this.render);\n return this.render();\n };\n\n DataTableView.prototype.className = 'div';\n\n DataTableView.prototype.render = function() {\n var colname, data_source, datacell, datacell_template, header, header_column, header_template, html, idx, rawdata, row, row_template, rowdata, table, table_template, toiter, _i, _j, _k, _len, _len1, _len2, _ref, _ref1;\n data_source = this.mget_obj('data_source');\n table_template = \"<table class='table table-striped table-bordered table-condensed' id='tableid_na'></table>\";\n header_template = \"<thead></thead>\";\n header_column = \"<th><%= column_name %></th>\";\n row_template = \"<tr></tr>\";\n datacell_template = \"<td><%= data %></td>\";\n table = $(table_template);\n header = $(header_template);\n _ref = this.mget('columns');\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n colname = _ref[_i];\n html = _.template(header_column, {\n 'column_name': colname\n });\n header.append($(html));\n }\n table.append(header);\n rawdata = this.mget_obj('data_source').get('data');\n if (!data_source.get('selecting')) {\n toiter = _.range(rawdata.length);\n } else {\n toiter = data_source.get('selected');\n }\n for (_j = 0, _len1 = toiter.length; _j < _len1; _j++) {\n idx = toiter[_j];\n rowdata = rawdata[idx];\n row = $(row_template);\n _ref1 = this.mget('columns');\n for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {\n colname = _ref1[_k];\n datacell = $(_.template(datacell_template, {\n 'data': rowdata[colname]\n }));\n row.append(datacell);\n }\n table.append(row);\n }\n this.$el.empty();\n this.$el.html(table);\n this.$el.height(this.mget('height'));\n this.$el.width(this.mget('width'));\n return this.$el.addClass(\"bokehtable\");\n };\n\n return DataTableView;\n\n })(ContinuumView);\n\n DataTable = (function(_super) {\n\n __extends(DataTable, _super);\n\n function DataTable() {\n return DataTable.__super__.constructor.apply(this, arguments);\n }\n\n DataTable.prototype.type = 'DataTable';\n\n DataTable.prototype.initialize = function(attrs, options) {\n return DataTable.__super__.initialize.call(this, attrs, options);\n };\n\n DataTable.prototype.defaults = {\n data_source: null,\n columns: []\n };\n\n DataTable.prototype.default_view = DataTableView;\n\n return DataTable;\n\n })(HasParent);\n\n DataTables = (function(_super) {\n\n __extends(DataTables, _super);\n\n function DataTables() {\n return DataTables.__super__.constructor.apply(this, arguments);\n }\n\n DataTables.prototype.model = DataTable;\n\n return DataTables;\n\n })(Backbone.Collection);\n\n exports.datatables = new DataTables();\n\n exports.DataTable = DataTable;\n\n exports.DataTableView = DataTableView;\n\n}).call(this);\n}, \"datasource\": function(exports, require, module) {(function() {\n var ColumnDataSource, ColumnDataSources, HasProperties, ObjectArrayDataSource, ObjectArrayDataSources, base,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\n\n base = require(\"./base\");\n\n HasProperties = base.HasProperties;\n\n ObjectArrayDataSource = (function(_super) {\n\n __extends(ObjectArrayDataSource, _super);\n\n function ObjectArrayDataSource() {\n return ObjectArrayDataSource.__super__.constructor.apply(this, arguments);\n }\n\n ObjectArrayDataSource.prototype.type = 'ObjectArrayDataSource';\n\n ObjectArrayDataSource.prototype.initialize = function(attrs, options) {\n ObjectArrayDataSource.__super__.initialize.call(this, attrs, options);\n this.cont_ranges = {};\n return this.discrete_ranges = {};\n };\n\n ObjectArrayDataSource.prototype.getcolumn = function(colname) {\n var x;\n return (function() {\n var _i, _len, _ref, _results;\n _ref = this.get('data');\n _results = [];\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n x = _ref[_i];\n _results.push(x[colname]);\n }\n return _results;\n }).call(this);\n };\n\n ObjectArrayDataSource.prototype.compute_cont_range = function(field) {\n var data;\n data = this.getcolumn(field);\n return [_.max(data), _.min(data)];\n };\n\n ObjectArrayDataSource.prototype.compute_discrete_factor = function(field) {\n var temp, uniques, val, _i, _len, _ref;\n temp = {};\n _ref = this.getcolumn(field);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n val = _ref[_i];\n temp[val] = true;\n }\n uniques = _.keys(temp);\n return uniques = _.sortBy(uniques, (function(x) {\n return x;\n }));\n };\n\n ObjectArrayDataSource.prototype.get_cont_range = function(field, padding) {\n var center, max, min, span, _ref, _ref1,\n _this = this;\n if (_.isUndefined(padding)) {\n padding = 1.0;\n }\n if (!_.exists(this.cont_ranges, field)) {\n _ref = this.compute_cont_range(field), min = _ref[0], max = _ref[1];\n span = (max - min) * (1 + padding);\n center = (max + min) / 2.0;\n _ref1 = [center - span / 2.0, center + span / 2.0], min = _ref1[0], max = _ref1[1];\n this.cont_ranges[field] = Collections('Range1d').create({\n start: min,\n end: max\n });\n this.on('change:data', function() {\n var _ref2;\n _ref2 = _this.compute_cont_range(field), max = _ref2[0], min = _ref2[1];\n _this.cont_ranges[field].set('start', min);\n return _this.cont_ranges[field].set('end', max);\n });\n }\n return this.cont_ranges[field];\n };\n\n ObjectArrayDataSource.prototype.get_discrete_range = function(field) {\n var factors,\n _this = this;\n if (!_.exists(this.discrete_ranges, field)) {\n factors = this.compute_discrete_factor(field);\n this.discrete_ranges[field] = Collections('FactorRange').create({\n values: factors\n });\n this.on('change:data', function() {\n factors = _this.compute_discrete_factor(field);\n return _this.discrete_ranges[field] = Collections('FactorRange').set('values', factors);\n });\n }\n return this.discrete_ranges[field];\n };\n\n ObjectArrayDataSource.prototype.select = function(fields, func) {\n var args, idx, selected, val, x, _i, _len, _ref;\n selected = [];\n _ref = this.get('data');\n for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) {\n val = _ref[idx];\n args = (function() {\n var _j, _len1, _results;\n _results = [];\n for (_j = 0, _len1 = fields.length; _j < _len1; _j++) {\n x = fields[_j];\n _results.push(val[x]);\n }\n return _results;\n })();\n if (func.apply(func, args)) {\n selected.push(idx);\n }\n }\n selected.sort();\n return selected;\n };\n\n return ObjectArrayDataSource;\n\n })(HasProperties);\n\n ObjectArrayDataSource.prototype.defaults = _.clone(ObjectArrayDataSource.prototype.defaults);\n\n _.extend(ObjectArrayDataSource.prototype.defaults, {\n data: [{}],\n name: 'data',\n selected: [],\n selecting: false\n });\n\n ObjectArrayDataSources = (function(_super) {\n\n __extends(ObjectArrayDataSources, _super);\n\n function ObjectArrayDataSources() {\n return ObjectArrayDataSources.__super__.constructor.apply(this, arguments);\n }\n\n ObjectArrayDataSources.prototype.model = ObjectArrayDataSource;\n\n return ObjectArrayDataSources;\n\n })(Backbone.Collection);\n\n ColumnDataSource = (function(_super) {\n\n __extends(ColumnDataSource, _super);\n\n function ColumnDataSource() {\n return ColumnDataSource.__super__.constructor.apply(this, arguments);\n }\n\n ColumnDataSource.prototype.type = 'ColumnDataSource';\n\n ColumnDataSource.prototype.initialize = function(attrs, options) {\n ColumnDataSource.__super__.initialize.call(this, attrs, options);\n this.cont_ranges = {};\n return this.discrete_ranges = {};\n };\n\n ColumnDataSource.prototype.getcolumn = function(colname) {\n return this.get('data')[colname];\n };\n\n ColumnDataSource.prototype.datapoints = function() {\n var data, field, fields, i, point, points, _i, _j, _len, _ref;\n data = this.get('data');\n fields = _.keys(data);\n points = [];\n for (i = _i = 0, _ref = data[fields[0]].length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {\n point = {};\n for (_j = 0, _len = fields.length; _j < _len; _j++) {\n field = fields[_j];\n point[field] = data[field][i];\n }\n points.push(point);\n }\n return points;\n };\n\n return ColumnDataSource;\n\n })(ObjectArrayDataSource);\n\n ColumnDataSources = (function(_super) {\n\n __extends(ColumnDataSources, _super);\n\n function ColumnDataSources() {\n return ColumnDataSources.__super__.constructor.apply(this, arguments);\n }\n\n ColumnDataSources.prototype.model = ColumnDataSource;\n\n return ColumnDataSources;\n\n })(Backbone.Collection);\n\n exports.objectarraydatasources = new ObjectArrayDataSources;\n\n exports.columndatasources = new ColumnDataSources;\n\n exports.ObjectArrayDataSource = ObjectArrayDataSource;\n\n exports.ColumnDataSource = ColumnDataSource;\n\n}).call(this);\n}, \"ranges\": function(exports, require, module) {(function() {\n var DataFactorRange, DataFactorRanges, DataRange1d, DataRange1ds, FactorRange, FactorRanges, HasProperties, Range1d, Range1ds, base,\n __hasProp = {}.hasOwnProperty,\n __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };\n\n base = require(\"./base\");\n\n HasProperties = base.HasProperties;\n\n Range1d = (function(_super) {\n\n __extends(Range1d, _super);\n\n function Range1d() {\n return Range1d.__super__.constructor.apply(this, arguments);\n }\n\n Range1d.prototype.type = 'Range1d';\n\n return Range1d;\n\n })(HasProperties);\n\n Range1d.prototype.defaults = _.clone(Range1d.prototype.defaults);\n\n _.extend(Range1d.prototype.defaults, {\n start: 0,\n end: 1\n });\n\n Range1ds = (function(_super) {\n\n __extends(Range1ds, _super);\n\n function Range1ds() {\n return Range1ds.__super__.constructor.apply(this, arguments);\n }\n\n Range1ds.prototype.model = Range1d;\n\n return Range1ds;\n\n })(Backbone.Collection);\n\n DataRange1d = (function(_super) {\n\n __extends(DataRange1d, _super);\n\n function DataRange1d() {\n return DataRange1d.__super__.constructor.apply(this, arguments);\n }\n\n DataRange1d.prototype.type = 'DataRange1d';\n\n DataRange1d.prototype._get_minmax = function() {\n var center, colname, columns, max, min, source, sourceobj, span, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3;\n columns = [];\n _ref = this.get('sources');\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n source = _ref[_i];\n sourceobj = this.resolve_ref(source['ref']);\n _ref1 = source['columns'];\n for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {\n colname = _ref1[_j];\n columns.push(sourceobj.getcolumn(colname));\n }\n }\n columns = _.reduce(columns, (function(x, y) {\n return x.concat(y);\n }), []);\n columns = _.filter(columns, function(x) {\n return typeof x !== \"string\";\n });\n _ref2 = [_.min(columns), _.max(columns)], min = _ref2[0], max = _ref2[1];\n span = (max - min) * (1 + this.get('rangepadding'));\n center = (max + min) / 2.0;\n _ref3 = [center - span / 2.0, center + span / 2.0], min = _ref3[0], max = _ref3[1];\n return [min, max];\n };\n\n DataRange1d.prototype._get_start = function() {\n if (!_.isNullOrUndefined(this.get('_start'))) {\n return this.get('_start');\n } else {\n return this.get('minmax')[0];\n }\n };\n\n DataRange1d.prototype._set_start = function(start) {\n return this.set('_start', start);\n };\n\n DataRange1d.prototype._get_end = function() {\n if (!_.isNullOrUndefined(this.get('_end'))) {\n return this.get('_end');\n } else {\n return this.get('minmax')[1];\n }\n };\n\n DataRange1d.prototype._set_end = function(end) {\n return this.set('_end', end);\n };\n\n DataRange1d.prototype.dinitialize = function(attrs, options) {\n var source, _i, _len, _ref;\n DataRange1d.__super__.dinitialize.call(this, attrs, options);\n this.register_property('minmax', this._get_minmax, true);\n this.add_dependencies('minmax', this, ['sources'], ['rangepadding']);\n _ref = this.get('sources');\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n source = _ref[_i];\n source = this.resolve_ref(source.ref);\n this.add_dependencies('minmax', source, 'data');\n }\n this.register_property('start', this._get_start, true);\n this.register_setter('start', this._set_start);\n this.add_dependencies('start', this, ['minmax', '_start']);\n this.register_property('end', this._get_end, true);\n this.register_setter('end', this._set_end);\n return this.add_dependencies('end', this, ['minmax', '_end']);\n };\n\n return DataRange1d;\n\n })(Range1d);\n\n DataRange1d.prototype.defaults = _.clone(DataRange1d.prototype.defaults);\n\n _.extend(DataRange1d.prototype.defaults, {\n sources: [],\n rangepadding: 0.1\n });\n\n DataRange1ds = (function(_super) {\n\n __extends(DataRange1ds, _super);\n\n function DataRange1ds() {\n return DataRange1ds.__super__.constructor.apply(this, arguments);\n }\n\n DataRange1ds.prototype.model = DataRange1d;\n\n return DataRange1ds;\n\n })(Backbone.Collection);\n\n Range1ds = (function(_super) {\n\n __extends(Range1ds, _super);\n\n function Range1ds() {\n return Range1ds.__super__.constructor.apply(this, arguments);\n }\n\n Range1ds.prototype.model = Range1d;\n\n return Range1ds;\n\n })(Backbone.Collection);\n\n FactorRange = (function(_super) {\n\n __extends(FactorRange, _super);\n\n function FactorRange() {\n return FactorRange.__super__.constructor.apply(this, arguments);\n }\n\n FactorRange.prototype.type = 'FactorRange';\n\n return FactorRange;\n\n })(HasProperties);\n\n FactorRange.prototype.defaults = _.clone(FactorRange.prototype.defaults);\n\n _.extend(FactorRange.prototype.defaults, {\n values: []\n });\n\n DataFactorRange = (function(_super) {\n\n __extends(DataFactorRange, _super);\n\n function DataFactorRange() {\n this._get_values = __bind(this._get_values, this);\n return DataFactorRange.__super__.constructor.apply(this, arguments);\n }\n\n DataFactorRange.prototype.type = 'DataFactorRange';\n\n DataFactorRange.prototype._get_values = function() {\n var columns, temp, uniques, val, x, _i, _len;\n columns = (function() {\n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment