bench9000 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (719) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +7 -0
  3. data/benchmarks/chunky_png/chunky-canvas-resampling-bilinear.rb +69 -0
  4. data/benchmarks/chunky_png/chunky-canvas-resampling-nearest-neighbor.rb +68 -0
  5. data/benchmarks/chunky_png/chunky-canvas-resampling-steps-residues.rb +37 -0
  6. data/benchmarks/chunky_png/chunky-canvas-resampling-steps.rb +37 -0
  7. data/benchmarks/chunky_png/chunky-color-a.rb +39 -0
  8. data/benchmarks/chunky_png/chunky-color-b.rb +39 -0
  9. data/benchmarks/chunky_png/chunky-color-compose-quick.rb +39 -0
  10. data/benchmarks/chunky_png/chunky-color-g.rb +39 -0
  11. data/benchmarks/chunky_png/chunky-color-r.rb +39 -0
  12. data/benchmarks/chunky_png/chunky-decode-png-image-pass.rb +74 -0
  13. data/benchmarks/chunky_png/chunky-encode-png-image-pass-to-stream.rb +84 -0
  14. data/benchmarks/chunky_png/chunky-operations-compose.rb +70 -0
  15. data/benchmarks/chunky_png/chunky-operations-replace.rb +69 -0
  16. data/benchmarks/chunky_png/chunky_png.patch +22 -0
  17. data/benchmarks/chunky_png/version.txt +2 -0
  18. data/benchmarks/classic/binary-trees.rb +100 -0
  19. data/benchmarks/classic/deltablue.rb +732 -0
  20. data/benchmarks/classic/fannkuch-redux.rb +111 -0
  21. data/benchmarks/classic/fasta-string.rb +71 -0
  22. data/benchmarks/classic/mandelbrot.rb +112 -0
  23. data/benchmarks/classic/matrix-multiply.rb +78 -0
  24. data/benchmarks/classic/n-body.rb +188 -0
  25. data/benchmarks/classic/pidigits.rb +88 -0
  26. data/benchmarks/classic/red-black.rb +363 -0
  27. data/benchmarks/classic/richards-kwargs.rb +403 -0
  28. data/benchmarks/classic/richards.rb +403 -0
  29. data/benchmarks/classic/spectral-norm.rb +95 -0
  30. data/benchmarks/default.config.rb +206 -0
  31. data/benchmarks/graph/connected.rb +62 -0
  32. data/benchmarks/literature/acid.rb +46 -0
  33. data/benchmarks/micro/pack-big-U-loop.rb +24 -0
  34. data/benchmarks/micro/pack-big-xLX-repeat.rb +22 -0
  35. data/benchmarks/micro/pack-small-mixture.rb +17 -0
  36. data/benchmarks/micro/string-equal.rb +28 -0
  37. data/benchmarks/octane/deltablue.rb +981 -0
  38. data/benchmarks/psd.rb/mock-logger.rb +23 -0
  39. data/benchmarks/psd.rb/psd-color-cmyk-to-rgb.rb +46 -0
  40. data/benchmarks/psd.rb/psd-compose-color-burn.rb +43 -0
  41. data/benchmarks/psd.rb/psd-compose-color-dodge.rb +43 -0
  42. data/benchmarks/psd.rb/psd-compose-darken.rb +43 -0
  43. data/benchmarks/psd.rb/psd-compose-difference.rb +43 -0
  44. data/benchmarks/psd.rb/psd-compose-exclusion.rb +43 -0
  45. data/benchmarks/psd.rb/psd-compose-hard-light.rb +43 -0
  46. data/benchmarks/psd.rb/psd-compose-hard-mix.rb +43 -0
  47. data/benchmarks/psd.rb/psd-compose-lighten.rb +43 -0
  48. data/benchmarks/psd.rb/psd-compose-linear-burn.rb +43 -0
  49. data/benchmarks/psd.rb/psd-compose-linear-dodge.rb +43 -0
  50. data/benchmarks/psd.rb/psd-compose-linear-light.rb +43 -0
  51. data/benchmarks/psd.rb/psd-compose-multiply.rb +43 -0
  52. data/benchmarks/psd.rb/psd-compose-normal.rb +43 -0
  53. data/benchmarks/psd.rb/psd-compose-overlay.rb +43 -0
  54. data/benchmarks/psd.rb/psd-compose-pin-light.rb +43 -0
  55. data/benchmarks/psd.rb/psd-compose-screen.rb +43 -0
  56. data/benchmarks/psd.rb/psd-compose-soft-light.rb +43 -0
  57. data/benchmarks/psd.rb/psd-compose-vivid-light.rb +43 -0
  58. data/benchmarks/psd.rb/psd-imageformat-layerraw-parse-raw.rb +70 -0
  59. data/benchmarks/psd.rb/psd-imageformat-rle-decode-rle-channel.rb +87 -0
  60. data/benchmarks/psd.rb/psd-imagemode-cmyk-combine-cmyk-channel.rb +65 -0
  61. data/benchmarks/psd.rb/psd-imagemode-greyscale-combine-greyscale-channel.rb +68 -0
  62. data/benchmarks/psd.rb/psd-imagemode-rgb-combine-rgb-channel.rb +65 -0
  63. data/benchmarks/psd.rb/psd-renderer-blender-compose.rb +113 -0
  64. data/benchmarks/psd.rb/psd-renderer-clippingmask-apply.rb +129 -0
  65. data/benchmarks/psd.rb/psd-renderer-mask-apply.rb +137 -0
  66. data/benchmarks/psd.rb/psd-util-clamp.rb +42 -0
  67. data/benchmarks/psd.rb/psd-util-pad2.rb +42 -0
  68. data/benchmarks/psd.rb/psd-util-pad4.rb +42 -0
  69. data/benchmarks/psd.rb/psd_native.patch +99 -0
  70. data/benchmarks/psd.rb/version.txt +2 -0
  71. data/benchmarks/topaz/neural-net.rb +208 -0
  72. data/benchmarks/vm/codeload.rb +35 -0
  73. data/benchmarks/vm/fixtures/codeload/LICENSE.txt +25 -0
  74. data/benchmarks/vm/fixtures/codeload/lexer.rb +21493 -0
  75. data/bin/bench9000 +13 -0
  76. data/example/report.data +945 -0
  77. data/example/report.html +59178 -0
  78. data/lib/bench9000.rb +27 -0
  79. data/lib/bench9000/benchmark.rb +29 -0
  80. data/lib/bench9000/commands/command.rb +30 -0
  81. data/lib/bench9000/commands/compare-reference.rb +70 -0
  82. data/lib/bench9000/commands/compare.rb +43 -0
  83. data/lib/bench9000/commands/detail.rb +51 -0
  84. data/lib/bench9000/commands/list-benchmarks.rb +29 -0
  85. data/lib/bench9000/commands/list-implementations.rb +29 -0
  86. data/lib/bench9000/commands/reference.rb +46 -0
  87. data/lib/bench9000/commands/remove.rb +41 -0
  88. data/lib/bench9000/commands/report.rb +71 -0
  89. data/lib/bench9000/commands/score.rb +27 -0
  90. data/lib/bench9000/config.rb +88 -0
  91. data/lib/bench9000/group.rb +23 -0
  92. data/lib/bench9000/harness.rb +68 -0
  93. data/lib/bench9000/implementation.rb +134 -0
  94. data/lib/bench9000/json-formatter.rb +50 -0
  95. data/lib/bench9000/main.rb +268 -0
  96. data/lib/bench9000/measurement.rb +75 -0
  97. data/lib/bench9000/micro-harness.rb +39 -0
  98. data/lib/bench9000/options.rb +31 -0
  99. data/lib/bench9000/report/bootstrap-theme.css +5 -0
  100. data/lib/bench9000/report/bootstrap.css +5 -0
  101. data/lib/bench9000/report/bootstrap.js +6 -0
  102. data/lib/bench9000/report/chart.js +3432 -0
  103. data/lib/bench9000/report/chartjs.patch +91 -0
  104. data/lib/bench9000/report/jquery.js +4 -0
  105. data/lib/bench9000/report/report.html +177 -0
  106. data/lib/bench9000/report/report.js +547 -0
  107. data/lib/bench9000/stats.rb +41 -0
  108. data/readme.md +205 -0
  109. data/vendor/chunky_png/BENCHMARKS.rdoc +31 -0
  110. data/vendor/chunky_png/Gemfile +10 -0
  111. data/vendor/chunky_png/LICENSE +20 -0
  112. data/vendor/chunky_png/README.rdoc +84 -0
  113. data/vendor/chunky_png/Rakefile +11 -0
  114. data/vendor/chunky_png/benchmarks/decoding_benchmark.rb +36 -0
  115. data/vendor/chunky_png/benchmarks/encoding_benchmark.rb +40 -0
  116. data/vendor/chunky_png/benchmarks/filesize_benchmark.rb +28 -0
  117. data/vendor/chunky_png/chunky_png.gemspec +47 -0
  118. data/vendor/chunky_png/lib/chunky_png.rb +160 -0
  119. data/vendor/chunky_png/lib/chunky_png/canvas.rb +372 -0
  120. data/vendor/chunky_png/lib/chunky_png/canvas/adam7_interlacing.rb +72 -0
  121. data/vendor/chunky_png/lib/chunky_png/canvas/data_url_exporting.rb +15 -0
  122. data/vendor/chunky_png/lib/chunky_png/canvas/data_url_importing.rb +21 -0
  123. data/vendor/chunky_png/lib/chunky_png/canvas/drawing.rb +338 -0
  124. data/vendor/chunky_png/lib/chunky_png/canvas/masking.rb +91 -0
  125. data/vendor/chunky_png/lib/chunky_png/canvas/operations.rb +395 -0
  126. data/vendor/chunky_png/lib/chunky_png/canvas/png_decoding.rb +492 -0
  127. data/vendor/chunky_png/lib/chunky_png/canvas/png_encoding.rb +442 -0
  128. data/vendor/chunky_png/lib/chunky_png/canvas/resampling.rb +147 -0
  129. data/vendor/chunky_png/lib/chunky_png/canvas/stream_exporting.rb +58 -0
  130. data/vendor/chunky_png/lib/chunky_png/canvas/stream_importing.rb +77 -0
  131. data/vendor/chunky_png/lib/chunky_png/chunk.rb +328 -0
  132. data/vendor/chunky_png/lib/chunky_png/color.rb +780 -0
  133. data/vendor/chunky_png/lib/chunky_png/compatibility.rb +15 -0
  134. data/vendor/chunky_png/lib/chunky_png/datastream.rb +185 -0
  135. data/vendor/chunky_png/lib/chunky_png/dimension.rb +113 -0
  136. data/vendor/chunky_png/lib/chunky_png/image.rb +79 -0
  137. data/vendor/chunky_png/lib/chunky_png/palette.rb +209 -0
  138. data/vendor/chunky_png/lib/chunky_png/point.rb +115 -0
  139. data/vendor/chunky_png/lib/chunky_png/rmagick.rb +43 -0
  140. data/vendor/chunky_png/lib/chunky_png/vector.rb +186 -0
  141. data/vendor/chunky_png/lib/chunky_png/version.rb +5 -0
  142. data/vendor/chunky_png/spec/chunky_png/canvas/adam7_interlacing_spec.rb +106 -0
  143. data/vendor/chunky_png/spec/chunky_png/canvas/data_url_exporting_spec.rb +13 -0
  144. data/vendor/chunky_png/spec/chunky_png/canvas/data_url_importing_spec.rb +15 -0
  145. data/vendor/chunky_png/spec/chunky_png/canvas/drawing_spec.rb +170 -0
  146. data/vendor/chunky_png/spec/chunky_png/canvas/masking_spec.rb +51 -0
  147. data/vendor/chunky_png/spec/chunky_png/canvas/operations_spec.rb +388 -0
  148. data/vendor/chunky_png/spec/chunky_png/canvas/png_decoding_spec.rb +97 -0
  149. data/vendor/chunky_png/spec/chunky_png/canvas/png_encoding_spec.rb +235 -0
  150. data/vendor/chunky_png/spec/chunky_png/canvas/resampling_spec.rb +121 -0
  151. data/vendor/chunky_png/spec/chunky_png/canvas/stream_exporting_spec.rb +59 -0
  152. data/vendor/chunky_png/spec/chunky_png/canvas/stream_importing_spec.rb +31 -0
  153. data/vendor/chunky_png/spec/chunky_png/canvas_spec.rb +226 -0
  154. data/vendor/chunky_png/spec/chunky_png/color_spec.rb +251 -0
  155. data/vendor/chunky_png/spec/chunky_png/datastream_spec.rb +32 -0
  156. data/vendor/chunky_png/spec/chunky_png/dimension_spec.rb +48 -0
  157. data/vendor/chunky_png/spec/chunky_png/image_spec.rb +25 -0
  158. data/vendor/chunky_png/spec/chunky_png/point_spec.rb +76 -0
  159. data/vendor/chunky_png/spec/chunky_png/rmagick_spec.rb +23 -0
  160. data/vendor/chunky_png/spec/chunky_png/vector_spec.rb +104 -0
  161. data/vendor/chunky_png/spec/chunky_png_spec.rb +8 -0
  162. data/vendor/chunky_png/spec/png_suite/background_chunks/bgai4a08.png +0 -0
  163. data/vendor/chunky_png/spec/png_suite/background_chunks/bgai4a16.png +0 -0
  164. data/vendor/chunky_png/spec/png_suite/background_chunks/bgan6a08.png +0 -0
  165. data/vendor/chunky_png/spec/png_suite/background_chunks/bgan6a16.png +0 -0
  166. data/vendor/chunky_png/spec/png_suite/background_chunks/bgbn4a08.png +0 -0
  167. data/vendor/chunky_png/spec/png_suite/background_chunks/bggn4a16.png +0 -0
  168. data/vendor/chunky_png/spec/png_suite/background_chunks/bgwn6a08.png +0 -0
  169. data/vendor/chunky_png/spec/png_suite/background_chunks/bgyn6a16.png +0 -0
  170. data/vendor/chunky_png/spec/png_suite/basic/basi0g01.png +0 -0
  171. data/vendor/chunky_png/spec/png_suite/basic/basi0g01.rgba +0 -0
  172. data/vendor/chunky_png/spec/png_suite/basic/basi0g02.png +0 -0
  173. data/vendor/chunky_png/spec/png_suite/basic/basi0g02.rgba +0 -0
  174. data/vendor/chunky_png/spec/png_suite/basic/basi0g04.png +0 -0
  175. data/vendor/chunky_png/spec/png_suite/basic/basi0g04.rgba +0 -0
  176. data/vendor/chunky_png/spec/png_suite/basic/basi0g08.png +0 -0
  177. data/vendor/chunky_png/spec/png_suite/basic/basi0g08.rgba +0 -0
  178. data/vendor/chunky_png/spec/png_suite/basic/basi0g16.png +0 -0
  179. data/vendor/chunky_png/spec/png_suite/basic/basi0g16.rgba +0 -0
  180. data/vendor/chunky_png/spec/png_suite/basic/basi2c08.png +0 -0
  181. data/vendor/chunky_png/spec/png_suite/basic/basi2c08.rgba +0 -0
  182. data/vendor/chunky_png/spec/png_suite/basic/basi2c16.png +0 -0
  183. data/vendor/chunky_png/spec/png_suite/basic/basi2c16.rgba +0 -0
  184. data/vendor/chunky_png/spec/png_suite/basic/basi3p01.png +0 -0
  185. data/vendor/chunky_png/spec/png_suite/basic/basi3p01.rgba +1 -0
  186. data/vendor/chunky_png/spec/png_suite/basic/basi3p02.png +0 -0
  187. data/vendor/chunky_png/spec/png_suite/basic/basi3p02.rgba +0 -0
  188. data/vendor/chunky_png/spec/png_suite/basic/basi3p04.png +0 -0
  189. data/vendor/chunky_png/spec/png_suite/basic/basi3p04.rgba +0 -0
  190. data/vendor/chunky_png/spec/png_suite/basic/basi3p08.png +0 -0
  191. data/vendor/chunky_png/spec/png_suite/basic/basi3p08.rgba +0 -0
  192. data/vendor/chunky_png/spec/png_suite/basic/basi4a08.png +0 -0
  193. data/vendor/chunky_png/spec/png_suite/basic/basi4a08.rgba +0 -0
  194. data/vendor/chunky_png/spec/png_suite/basic/basi4a16.png +0 -0
  195. data/vendor/chunky_png/spec/png_suite/basic/basi4a16.rgba +0 -0
  196. data/vendor/chunky_png/spec/png_suite/basic/basi6a08.png +0 -0
  197. data/vendor/chunky_png/spec/png_suite/basic/basi6a08.rgba +0 -0
  198. data/vendor/chunky_png/spec/png_suite/basic/basi6a16.png +0 -0
  199. data/vendor/chunky_png/spec/png_suite/basic/basi6a16.rgba +0 -0
  200. data/vendor/chunky_png/spec/png_suite/basic/basn0g01.png +0 -0
  201. data/vendor/chunky_png/spec/png_suite/basic/basn0g01.rgba +0 -0
  202. data/vendor/chunky_png/spec/png_suite/basic/basn0g02.png +0 -0
  203. data/vendor/chunky_png/spec/png_suite/basic/basn0g02.rgba +0 -0
  204. data/vendor/chunky_png/spec/png_suite/basic/basn0g04.png +0 -0
  205. data/vendor/chunky_png/spec/png_suite/basic/basn0g04.rgba +0 -0
  206. data/vendor/chunky_png/spec/png_suite/basic/basn0g08.png +0 -0
  207. data/vendor/chunky_png/spec/png_suite/basic/basn0g08.rgba +0 -0
  208. data/vendor/chunky_png/spec/png_suite/basic/basn0g16.png +0 -0
  209. data/vendor/chunky_png/spec/png_suite/basic/basn0g16.rgba +0 -0
  210. data/vendor/chunky_png/spec/png_suite/basic/basn2c08.png +0 -0
  211. data/vendor/chunky_png/spec/png_suite/basic/basn2c08.rgba +0 -0
  212. data/vendor/chunky_png/spec/png_suite/basic/basn2c16.png +0 -0
  213. data/vendor/chunky_png/spec/png_suite/basic/basn2c16.rgba +0 -0
  214. data/vendor/chunky_png/spec/png_suite/basic/basn3p01.png +0 -0
  215. data/vendor/chunky_png/spec/png_suite/basic/basn3p01.rgba +1 -0
  216. data/vendor/chunky_png/spec/png_suite/basic/basn3p02.png +0 -0
  217. data/vendor/chunky_png/spec/png_suite/basic/basn3p02.rgba +0 -0
  218. data/vendor/chunky_png/spec/png_suite/basic/basn3p04.png +0 -0
  219. data/vendor/chunky_png/spec/png_suite/basic/basn3p04.rgba +0 -0
  220. data/vendor/chunky_png/spec/png_suite/basic/basn3p08.png +0 -0
  221. data/vendor/chunky_png/spec/png_suite/basic/basn3p08.rgba +0 -0
  222. data/vendor/chunky_png/spec/png_suite/basic/basn4a08.png +0 -0
  223. data/vendor/chunky_png/spec/png_suite/basic/basn4a08.rgba +0 -0
  224. data/vendor/chunky_png/spec/png_suite/basic/basn4a16.png +0 -0
  225. data/vendor/chunky_png/spec/png_suite/basic/basn4a16.rgba +0 -0
  226. data/vendor/chunky_png/spec/png_suite/basic/basn6a08.png +0 -0
  227. data/vendor/chunky_png/spec/png_suite/basic/basn6a08.rgba +0 -0
  228. data/vendor/chunky_png/spec/png_suite/basic/basn6a16.png +0 -0
  229. data/vendor/chunky_png/spec/png_suite/basic/basn6a16.rgba +0 -0
  230. data/vendor/chunky_png/spec/png_suite/broken/x00n0g01.png +0 -0
  231. data/vendor/chunky_png/spec/png_suite/broken/xcrn0g04.png +0 -0
  232. data/vendor/chunky_png/spec/png_suite/broken/xlfn0g04.png +13 -0
  233. data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi1n0g16.png +0 -0
  234. data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi1n2c16.png +0 -0
  235. data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi2n0g16.png +0 -0
  236. data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi2n2c16.png +0 -0
  237. data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi4n0g16.png +0 -0
  238. data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi4n2c16.png +0 -0
  239. data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi9n0g16.png +0 -0
  240. data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi9n2c16.png +0 -0
  241. data/vendor/chunky_png/spec/png_suite/compression_levels/z00n2c08.png +0 -0
  242. data/vendor/chunky_png/spec/png_suite/compression_levels/z03n2c08.png +0 -0
  243. data/vendor/chunky_png/spec/png_suite/compression_levels/z06n2c08.png +0 -0
  244. data/vendor/chunky_png/spec/png_suite/compression_levels/z09n2c08.png +0 -0
  245. data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08.png +0 -0
  246. data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08.rgba +0 -0
  247. data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08_reference.png +0 -0
  248. data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08_reference.rgba +0 -0
  249. data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08.png +0 -0
  250. data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08.rgba +0 -0
  251. data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08_reference.png +0 -0
  252. data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08_reference.rgba +0 -0
  253. data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08.png +0 -0
  254. data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08.rgba +0 -0
  255. data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08_reference.png +0 -0
  256. data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08_reference.rgba +0 -0
  257. data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08.png +0 -0
  258. data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08.rgba +0 -0
  259. data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08_reference.png +0 -0
  260. data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08_reference.rgba +0 -0
  261. data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08.png +0 -0
  262. data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08.rgba +0 -0
  263. data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08_reference.png +0 -0
  264. data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08_reference.rgba +0 -0
  265. data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08.png +0 -0
  266. data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08.rgba +0 -0
  267. data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08_reference.png +0 -0
  268. data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08_reference.rgba +0 -0
  269. data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08.png +0 -0
  270. data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08.rgba +0 -0
  271. data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08_reference.png +0 -0
  272. data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08_reference.rgba +0 -0
  273. data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08.png +0 -0
  274. data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08.rgba +0 -0
  275. data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08_reference.png +0 -0
  276. data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08_reference.rgba +0 -0
  277. data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08.png +0 -0
  278. data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08.rgba +0 -0
  279. data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08_reference.png +0 -0
  280. data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08_reference.rgba +0 -0
  281. data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08.png +0 -0
  282. data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08.rgba +0 -0
  283. data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08_reference.png +0 -0
  284. data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08_reference.rgba +0 -0
  285. data/vendor/chunky_png/spec/png_suite/gamma/g03n0g16.png +0 -0
  286. data/vendor/chunky_png/spec/png_suite/gamma/g03n2c08.png +0 -0
  287. data/vendor/chunky_png/spec/png_suite/gamma/g03n3p04.png +0 -0
  288. data/vendor/chunky_png/spec/png_suite/gamma/g04n0g16.png +0 -0
  289. data/vendor/chunky_png/spec/png_suite/gamma/g04n2c08.png +0 -0
  290. data/vendor/chunky_png/spec/png_suite/gamma/g04n3p04.png +0 -0
  291. data/vendor/chunky_png/spec/png_suite/gamma/g05n0g16.png +0 -0
  292. data/vendor/chunky_png/spec/png_suite/gamma/g05n2c08.png +0 -0
  293. data/vendor/chunky_png/spec/png_suite/gamma/g05n3p04.png +0 -0
  294. data/vendor/chunky_png/spec/png_suite/gamma/g07n0g16.png +0 -0
  295. data/vendor/chunky_png/spec/png_suite/gamma/g07n2c08.png +0 -0
  296. data/vendor/chunky_png/spec/png_suite/gamma/g07n3p04.png +0 -0
  297. data/vendor/chunky_png/spec/png_suite/gamma/g10n0g16.png +0 -0
  298. data/vendor/chunky_png/spec/png_suite/gamma/g10n2c08.png +0 -0
  299. data/vendor/chunky_png/spec/png_suite/gamma/g10n3p04.png +0 -0
  300. data/vendor/chunky_png/spec/png_suite/gamma/g25n0g16.png +0 -0
  301. data/vendor/chunky_png/spec/png_suite/gamma/g25n2c08.png +0 -0
  302. data/vendor/chunky_png/spec/png_suite/gamma/g25n3p04.png +0 -0
  303. data/vendor/chunky_png/spec/png_suite/metadata/cm0n0g04.png +0 -0
  304. data/vendor/chunky_png/spec/png_suite/metadata/cm7n0g04.png +0 -0
  305. data/vendor/chunky_png/spec/png_suite/metadata/cm9n0g04.png +0 -0
  306. data/vendor/chunky_png/spec/png_suite/other/ccwn2c08.png +0 -0
  307. data/vendor/chunky_png/spec/png_suite/other/ccwn3p08.png +0 -0
  308. data/vendor/chunky_png/spec/png_suite/other/cdfn2c08.png +0 -0
  309. data/vendor/chunky_png/spec/png_suite/other/cdhn2c08.png +0 -0
  310. data/vendor/chunky_png/spec/png_suite/other/cdsn2c08.png +0 -0
  311. data/vendor/chunky_png/spec/png_suite/other/cdun2c08.png +0 -0
  312. data/vendor/chunky_png/spec/png_suite/other/ch1n3p04.png +0 -0
  313. data/vendor/chunky_png/spec/png_suite/other/ch2n3p08.png +0 -0
  314. data/vendor/chunky_png/spec/png_suite/other/cs3n2c16.png +0 -0
  315. data/vendor/chunky_png/spec/png_suite/other/cs3n3p08.png +0 -0
  316. data/vendor/chunky_png/spec/png_suite/other/cs5n2c08.png +0 -0
  317. data/vendor/chunky_png/spec/png_suite/other/cs5n3p08.png +0 -0
  318. data/vendor/chunky_png/spec/png_suite/other/cs8n2c08.png +0 -0
  319. data/vendor/chunky_png/spec/png_suite/other/cs8n3p08.png +0 -0
  320. data/vendor/chunky_png/spec/png_suite/other/ct0n0g04.png +0 -0
  321. data/vendor/chunky_png/spec/png_suite/other/ct1n0g04.png +0 -0
  322. data/vendor/chunky_png/spec/png_suite/other/ctzn0g04.png +0 -0
  323. data/vendor/chunky_png/spec/png_suite/other/pp0n2c16.png +0 -0
  324. data/vendor/chunky_png/spec/png_suite/other/pp0n6a08.png +0 -0
  325. data/vendor/chunky_png/spec/png_suite/other/ps1n0g08.png +0 -0
  326. data/vendor/chunky_png/spec/png_suite/other/ps1n2c16.png +0 -0
  327. data/vendor/chunky_png/spec/png_suite/other/ps2n0g08.png +0 -0
  328. data/vendor/chunky_png/spec/png_suite/other/ps2n2c16.png +0 -0
  329. data/vendor/chunky_png/spec/png_suite/sizes/s01i3p01.png +0 -0
  330. data/vendor/chunky_png/spec/png_suite/sizes/s01n3p01.png +0 -0
  331. data/vendor/chunky_png/spec/png_suite/sizes/s02i3p01.png +0 -0
  332. data/vendor/chunky_png/spec/png_suite/sizes/s02n3p01.png +0 -0
  333. data/vendor/chunky_png/spec/png_suite/sizes/s03i3p01.png +0 -0
  334. data/vendor/chunky_png/spec/png_suite/sizes/s03n3p01.png +0 -0
  335. data/vendor/chunky_png/spec/png_suite/sizes/s04i3p01.png +0 -0
  336. data/vendor/chunky_png/spec/png_suite/sizes/s04n3p01.png +0 -0
  337. data/vendor/chunky_png/spec/png_suite/sizes/s05i3p02.png +0 -0
  338. data/vendor/chunky_png/spec/png_suite/sizes/s05n3p02.png +0 -0
  339. data/vendor/chunky_png/spec/png_suite/sizes/s06i3p02.png +0 -0
  340. data/vendor/chunky_png/spec/png_suite/sizes/s06n3p02.png +0 -0
  341. data/vendor/chunky_png/spec/png_suite/sizes/s07i3p02.png +0 -0
  342. data/vendor/chunky_png/spec/png_suite/sizes/s07n3p02.png +0 -0
  343. data/vendor/chunky_png/spec/png_suite/sizes/s08i3p02.png +0 -0
  344. data/vendor/chunky_png/spec/png_suite/sizes/s08n3p02.png +0 -0
  345. data/vendor/chunky_png/spec/png_suite/sizes/s09i3p02.png +0 -0
  346. data/vendor/chunky_png/spec/png_suite/sizes/s09n3p02.png +0 -0
  347. data/vendor/chunky_png/spec/png_suite/sizes/s32i3p04.png +0 -0
  348. data/vendor/chunky_png/spec/png_suite/sizes/s32n3p04.png +0 -0
  349. data/vendor/chunky_png/spec/png_suite/sizes/s33i3p04.png +0 -0
  350. data/vendor/chunky_png/spec/png_suite/sizes/s33n3p04.png +0 -0
  351. data/vendor/chunky_png/spec/png_suite/sizes/s34i3p04.png +0 -0
  352. data/vendor/chunky_png/spec/png_suite/sizes/s34n3p04.png +0 -0
  353. data/vendor/chunky_png/spec/png_suite/sizes/s35i3p04.png +0 -0
  354. data/vendor/chunky_png/spec/png_suite/sizes/s35n3p04.png +0 -0
  355. data/vendor/chunky_png/spec/png_suite/sizes/s36i3p04.png +0 -0
  356. data/vendor/chunky_png/spec/png_suite/sizes/s36n3p04.png +0 -0
  357. data/vendor/chunky_png/spec/png_suite/sizes/s37i3p04.png +0 -0
  358. data/vendor/chunky_png/spec/png_suite/sizes/s37n3p04.png +0 -0
  359. data/vendor/chunky_png/spec/png_suite/sizes/s38i3p04.png +0 -0
  360. data/vendor/chunky_png/spec/png_suite/sizes/s38n3p04.png +0 -0
  361. data/vendor/chunky_png/spec/png_suite/sizes/s39i3p04.png +0 -0
  362. data/vendor/chunky_png/spec/png_suite/sizes/s39n3p04.png +0 -0
  363. data/vendor/chunky_png/spec/png_suite/sizes/s40i3p04.png +0 -0
  364. data/vendor/chunky_png/spec/png_suite/sizes/s40n3p04.png +0 -0
  365. data/vendor/chunky_png/spec/png_suite/transparency/tbbn1g04.png +0 -0
  366. data/vendor/chunky_png/spec/png_suite/transparency/tbbn2c16.png +0 -0
  367. data/vendor/chunky_png/spec/png_suite/transparency/tbbn3p08.png +0 -0
  368. data/vendor/chunky_png/spec/png_suite/transparency/tbgn2c16.png +0 -0
  369. data/vendor/chunky_png/spec/png_suite/transparency/tbgn3p08.png +0 -0
  370. data/vendor/chunky_png/spec/png_suite/transparency/tbrn2c08.png +0 -0
  371. data/vendor/chunky_png/spec/png_suite/transparency/tbwn1g16.png +0 -0
  372. data/vendor/chunky_png/spec/png_suite/transparency/tbwn3p08.png +0 -0
  373. data/vendor/chunky_png/spec/png_suite/transparency/tbyn3p08.png +0 -0
  374. data/vendor/chunky_png/spec/png_suite/transparency/tp0n1g08.png +0 -0
  375. data/vendor/chunky_png/spec/png_suite/transparency/tp0n2c08.png +0 -0
  376. data/vendor/chunky_png/spec/png_suite/transparency/tp0n3p08.png +0 -0
  377. data/vendor/chunky_png/spec/png_suite/transparency/tp1n3p08.png +0 -0
  378. data/vendor/chunky_png/spec/png_suite_spec.rb +121 -0
  379. data/vendor/chunky_png/spec/resources/adam7.png +0 -0
  380. data/vendor/chunky_png/spec/resources/bezier_five_point.png +0 -0
  381. data/vendor/chunky_png/spec/resources/bezier_four_point.png +0 -0
  382. data/vendor/chunky_png/spec/resources/bezier_four_point_flipped.png +0 -0
  383. data/vendor/chunky_png/spec/resources/bezier_four_point_s.png +0 -0
  384. data/vendor/chunky_png/spec/resources/bezier_six_point.png +0 -0
  385. data/vendor/chunky_png/spec/resources/bezier_three_point.png +0 -0
  386. data/vendor/chunky_png/spec/resources/bezier_three_point_flipped.png +0 -0
  387. data/vendor/chunky_png/spec/resources/circles.png +0 -0
  388. data/vendor/chunky_png/spec/resources/clock.png +0 -0
  389. data/vendor/chunky_png/spec/resources/clock_base.png +0 -0
  390. data/vendor/chunky_png/spec/resources/clock_bl_xdown_ydown.png +0 -0
  391. data/vendor/chunky_png/spec/resources/clock_bl_xdown_yup.png +0 -0
  392. data/vendor/chunky_png/spec/resources/clock_bl_xup_yup.png +0 -0
  393. data/vendor/chunky_png/spec/resources/clock_mask.png +0 -0
  394. data/vendor/chunky_png/spec/resources/clock_mask_updated.png +0 -0
  395. data/vendor/chunky_png/spec/resources/clock_nn_xdown_ydown.png +0 -0
  396. data/vendor/chunky_png/spec/resources/clock_nn_xdown_yup.png +0 -0
  397. data/vendor/chunky_png/spec/resources/clock_nn_xup_yup.png +0 -0
  398. data/vendor/chunky_png/spec/resources/clock_updated.png +0 -0
  399. data/vendor/chunky_png/spec/resources/composited.png +0 -0
  400. data/vendor/chunky_png/spec/resources/cropped.png +0 -0
  401. data/vendor/chunky_png/spec/resources/damaged_chunk.png +0 -0
  402. data/vendor/chunky_png/spec/resources/damaged_signature.png +13 -0
  403. data/vendor/chunky_png/spec/resources/lines.png +0 -0
  404. data/vendor/chunky_png/spec/resources/operations.png +0 -0
  405. data/vendor/chunky_png/spec/resources/operations_border.png +0 -0
  406. data/vendor/chunky_png/spec/resources/operations_grayscale.png +0 -0
  407. data/vendor/chunky_png/spec/resources/partial_circles.png +0 -0
  408. data/vendor/chunky_png/spec/resources/pixelstream.bgr +67 -0
  409. data/vendor/chunky_png/spec/resources/pixelstream.rgb +67 -1
  410. data/vendor/chunky_png/spec/resources/pixelstream.rgba +67 -0
  411. data/vendor/chunky_png/spec/resources/pixelstream_best_compression.png +0 -0
  412. data/vendor/chunky_png/spec/resources/pixelstream_fast_rgba.png +0 -0
  413. data/vendor/chunky_png/spec/resources/pixelstream_reference.png +0 -0
  414. data/vendor/chunky_png/spec/resources/polygon_filled_horizontal.png +0 -0
  415. data/vendor/chunky_png/spec/resources/polygon_filled_vertical.png +0 -0
  416. data/vendor/chunky_png/spec/resources/polygon_triangle_filled.png +0 -0
  417. data/vendor/chunky_png/spec/resources/polygon_unfilled.png +0 -0
  418. data/vendor/chunky_png/spec/resources/rect.png +0 -0
  419. data/vendor/chunky_png/spec/resources/replaced.png +0 -0
  420. data/vendor/chunky_png/spec/resources/text_chunk.png +0 -0
  421. data/vendor/chunky_png/spec/resources/ztxt_chunk.png +0 -0
  422. data/vendor/chunky_png/spec/spec_helper.rb +52 -0
  423. data/vendor/chunky_png/tasks/benchmarks.rake +26 -0
  424. data/vendor/oily_png/Gemfile +4 -0
  425. data/vendor/oily_png/LICENSE +20 -0
  426. data/vendor/oily_png/README.rdoc +26 -0
  427. data/vendor/oily_png/Rakefile +19 -0
  428. data/vendor/oily_png/ext/oily_png/color.c +58 -0
  429. data/vendor/oily_png/ext/oily_png/color.h +29 -0
  430. data/vendor/oily_png/ext/oily_png/extconf.rb +3 -0
  431. data/vendor/oily_png/ext/oily_png/oily_png_ext.c +59 -0
  432. data/vendor/oily_png/ext/oily_png/oily_png_ext.h +72 -0
  433. data/vendor/oily_png/ext/oily_png/operations.c +122 -0
  434. data/vendor/oily_png/ext/oily_png/operations.h +36 -0
  435. data/vendor/oily_png/ext/oily_png/png_decoding.c +374 -0
  436. data/vendor/oily_png/ext/oily_png/png_decoding.h +27 -0
  437. data/vendor/oily_png/ext/oily_png/png_encoding.c +302 -0
  438. data/vendor/oily_png/ext/oily_png/png_encoding.h +19 -0
  439. data/vendor/oily_png/ext/oily_png/resampling.c +213 -0
  440. data/vendor/oily_png/ext/oily_png/resampling.h +25 -0
  441. data/vendor/oily_png/lib/oily_png.rb +21 -0
  442. data/vendor/oily_png/lib/oily_png/canvas.rb +15 -0
  443. data/vendor/oily_png/lib/oily_png/version.rb +3 -0
  444. data/vendor/oily_png/oily_png.gemspec +39 -0
  445. data/vendor/oily_png/spec/color_spec.rb +38 -0
  446. data/vendor/oily_png/spec/decoding_spec.rb +51 -0
  447. data/vendor/oily_png/spec/encoding_spec.rb +135 -0
  448. data/vendor/oily_png/spec/operations_spec.rb +52 -0
  449. data/vendor/oily_png/spec/resampling_spec.rb +51 -0
  450. data/vendor/oily_png/spec/resources/basi0g01.png +0 -0
  451. data/vendor/oily_png/spec/resources/basi0g02.png +0 -0
  452. data/vendor/oily_png/spec/resources/basi0g04.png +0 -0
  453. data/vendor/oily_png/spec/resources/basi0g08.png +0 -0
  454. data/vendor/oily_png/spec/resources/basi0g16.png +0 -0
  455. data/vendor/oily_png/spec/resources/basi2c08.png +0 -0
  456. data/vendor/oily_png/spec/resources/basi2c16.png +0 -0
  457. data/vendor/oily_png/spec/resources/basi3p01.png +0 -0
  458. data/vendor/oily_png/spec/resources/basi3p02.png +0 -0
  459. data/vendor/oily_png/spec/resources/basi3p04.png +0 -0
  460. data/vendor/oily_png/spec/resources/basi3p08.png +0 -0
  461. data/vendor/oily_png/spec/resources/basi4a08.png +0 -0
  462. data/vendor/oily_png/spec/resources/basi4a16.png +0 -0
  463. data/vendor/oily_png/spec/resources/basi6a08.png +0 -0
  464. data/vendor/oily_png/spec/resources/basi6a16.png +0 -0
  465. data/vendor/oily_png/spec/resources/basn0g01.png +0 -0
  466. data/vendor/oily_png/spec/resources/basn0g02.png +0 -0
  467. data/vendor/oily_png/spec/resources/basn0g04.png +0 -0
  468. data/vendor/oily_png/spec/resources/basn0g08.png +0 -0
  469. data/vendor/oily_png/spec/resources/basn0g16.png +0 -0
  470. data/vendor/oily_png/spec/resources/basn2c08.png +0 -0
  471. data/vendor/oily_png/spec/resources/basn2c16.png +0 -0
  472. data/vendor/oily_png/spec/resources/basn3p01.png +0 -0
  473. data/vendor/oily_png/spec/resources/basn3p02.png +0 -0
  474. data/vendor/oily_png/spec/resources/basn3p04.png +0 -0
  475. data/vendor/oily_png/spec/resources/basn3p08.png +0 -0
  476. data/vendor/oily_png/spec/resources/basn4a08.png +0 -0
  477. data/vendor/oily_png/spec/resources/basn4a16.png +0 -0
  478. data/vendor/oily_png/spec/resources/basn6a08.png +0 -0
  479. data/vendor/oily_png/spec/resources/basn6a16.png +0 -0
  480. data/vendor/oily_png/spec/resources/composited.png +0 -0
  481. data/vendor/oily_png/spec/resources/gray.png +0 -0
  482. data/vendor/oily_png/spec/resources/interlaced.png +0 -0
  483. data/vendor/oily_png/spec/resources/nonsquare.png +0 -0
  484. data/vendor/oily_png/spec/resources/operations.png +0 -0
  485. data/vendor/oily_png/spec/resources/replaced.png +0 -0
  486. data/vendor/oily_png/spec/resources/s01i3p01.png +0 -0
  487. data/vendor/oily_png/spec/resources/s01n3p01.png +0 -0
  488. data/vendor/oily_png/spec/resources/s02i3p01.png +0 -0
  489. data/vendor/oily_png/spec/resources/s02n3p01.png +0 -0
  490. data/vendor/oily_png/spec/resources/s03i3p01.png +0 -0
  491. data/vendor/oily_png/spec/resources/s03n3p01.png +0 -0
  492. data/vendor/oily_png/spec/resources/s04i3p01.png +0 -0
  493. data/vendor/oily_png/spec/resources/s04n3p01.png +0 -0
  494. data/vendor/oily_png/spec/resources/s05i3p02.png +0 -0
  495. data/vendor/oily_png/spec/resources/s05n3p02.png +0 -0
  496. data/vendor/oily_png/spec/resources/s06i3p02.png +0 -0
  497. data/vendor/oily_png/spec/resources/s06n3p02.png +0 -0
  498. data/vendor/oily_png/spec/resources/s07i3p02.png +0 -0
  499. data/vendor/oily_png/spec/resources/s07n3p02.png +0 -0
  500. data/vendor/oily_png/spec/resources/s08i3p02.png +0 -0
  501. data/vendor/oily_png/spec/resources/s08n3p02.png +0 -0
  502. data/vendor/oily_png/spec/resources/s09i3p02.png +0 -0
  503. data/vendor/oily_png/spec/resources/s09n3p02.png +0 -0
  504. data/vendor/oily_png/spec/resources/s32i3p04.png +0 -0
  505. data/vendor/oily_png/spec/resources/s32n3p04.png +0 -0
  506. data/vendor/oily_png/spec/resources/s33i3p04.png +0 -0
  507. data/vendor/oily_png/spec/resources/s33n3p04.png +0 -0
  508. data/vendor/oily_png/spec/resources/s34i3p04.png +0 -0
  509. data/vendor/oily_png/spec/resources/s34n3p04.png +0 -0
  510. data/vendor/oily_png/spec/resources/s35i3p04.png +0 -0
  511. data/vendor/oily_png/spec/resources/s35n3p04.png +0 -0
  512. data/vendor/oily_png/spec/resources/s36i3p04.png +0 -0
  513. data/vendor/oily_png/spec/resources/s36n3p04.png +0 -0
  514. data/vendor/oily_png/spec/resources/s37i3p04.png +0 -0
  515. data/vendor/oily_png/spec/resources/s37n3p04.png +0 -0
  516. data/vendor/oily_png/spec/resources/s38i3p04.png +0 -0
  517. data/vendor/oily_png/spec/resources/s38n3p04.png +0 -0
  518. data/vendor/oily_png/spec/resources/s39i3p04.png +0 -0
  519. data/vendor/oily_png/spec/resources/s39n3p04.png +0 -0
  520. data/vendor/oily_png/spec/resources/s40i3p04.png +0 -0
  521. data/vendor/oily_png/spec/resources/s40n3p04.png +0 -0
  522. data/vendor/oily_png/spec/resources/square.png +0 -0
  523. data/vendor/oily_png/spec/resources/tbbn1g04.png +0 -0
  524. data/vendor/oily_png/spec/resources/tbbn2c16.png +0 -0
  525. data/vendor/oily_png/spec/resources/tbbn3p08.png +0 -0
  526. data/vendor/oily_png/spec/resources/tbgn2c16.png +0 -0
  527. data/vendor/oily_png/spec/resources/tbgn3p08.png +0 -0
  528. data/vendor/oily_png/spec/resources/tbrn2c08.png +0 -0
  529. data/vendor/oily_png/spec/resources/tbwn1g16.png +0 -0
  530. data/vendor/oily_png/spec/resources/tbwn3p08.png +0 -0
  531. data/vendor/oily_png/spec/resources/tbyn3p08.png +0 -0
  532. data/vendor/oily_png/spec/resources/tp0n1g08.png +0 -0
  533. data/vendor/oily_png/spec/resources/tp0n2c08.png +0 -0
  534. data/vendor/oily_png/spec/resources/tp0n3p08.png +0 -0
  535. data/vendor/oily_png/spec/resources/tp1n3p08.png +0 -0
  536. data/vendor/oily_png/spec/spec_helper.rb +40 -0
  537. data/vendor/oily_png/tasks/testing.rake +49 -0
  538. data/vendor/psd.rb/CONTRIBUTING.md +7 -0
  539. data/vendor/psd.rb/Gemfile +2 -0
  540. data/vendor/psd.rb/Guardfile +8 -0
  541. data/vendor/psd.rb/LICENSE.txt +22 -0
  542. data/vendor/psd.rb/README.md +235 -0
  543. data/vendor/psd.rb/Rakefile +6 -0
  544. data/vendor/psd.rb/circle.yml +6 -0
  545. data/vendor/psd.rb/examples/build_image.rb +16 -0
  546. data/vendor/psd.rb/examples/export_image.rb +12 -0
  547. data/vendor/psd.rb/examples/export_layer_images.rb +19 -0
  548. data/vendor/psd.rb/examples/export_node.rb +7 -0
  549. data/vendor/psd.rb/examples/export_text_data.rb +13 -0
  550. data/vendor/psd.rb/examples/guides.rb +17 -0
  551. data/vendor/psd.rb/examples/images/comp-example.psd +0 -0
  552. data/vendor/psd.rb/examples/images/example-cmyk.psd +0 -0
  553. data/vendor/psd.rb/examples/images/example-greyscale.psd +0 -0
  554. data/vendor/psd.rb/examples/images/example-nocompat.psd +0 -0
  555. data/vendor/psd.rb/examples/images/example.psd +0 -0
  556. data/vendor/psd.rb/examples/images/example16.psd +0 -0
  557. data/vendor/psd.rb/examples/images/guides.psd +0 -0
  558. data/vendor/psd.rb/examples/layer_comps.rb +20 -0
  559. data/vendor/psd.rb/examples/parse.rb +36 -0
  560. data/vendor/psd.rb/examples/path.rb +7 -0
  561. data/vendor/psd.rb/examples/profile.rb +15 -0
  562. data/vendor/psd.rb/examples/slices.rb +17 -0
  563. data/vendor/psd.rb/examples/tree.rb +8 -0
  564. data/vendor/psd.rb/examples/unimplemented_info.rb +9 -0
  565. data/vendor/psd.rb/lib/psd.rb +173 -0
  566. data/vendor/psd.rb/lib/psd/blend_mode.rb +80 -0
  567. data/vendor/psd.rb/lib/psd/channel_image.rb +115 -0
  568. data/vendor/psd.rb/lib/psd/color.rb +125 -0
  569. data/vendor/psd.rb/lib/psd/descriptor.rb +200 -0
  570. data/vendor/psd.rb/lib/psd/file.rb +104 -0
  571. data/vendor/psd.rb/lib/psd/header.rb +69 -0
  572. data/vendor/psd.rb/lib/psd/helpers.rb +51 -0
  573. data/vendor/psd.rb/lib/psd/image.rb +123 -0
  574. data/vendor/psd.rb/lib/psd/image_exports/png.rb +31 -0
  575. data/vendor/psd.rb/lib/psd/image_formats/layer_raw.rb +21 -0
  576. data/vendor/psd.rb/lib/psd/image_formats/layer_rle.rb +24 -0
  577. data/vendor/psd.rb/lib/psd/image_formats/raw.rb +12 -0
  578. data/vendor/psd.rb/lib/psd/image_formats/rle.rb +63 -0
  579. data/vendor/psd.rb/lib/psd/image_modes/cmyk.rb +31 -0
  580. data/vendor/psd.rb/lib/psd/image_modes/greyscale.rb +22 -0
  581. data/vendor/psd.rb/lib/psd/image_modes/rgb.rb +32 -0
  582. data/vendor/psd.rb/lib/psd/layer.rb +77 -0
  583. data/vendor/psd.rb/lib/psd/layer/blend_modes.rb +30 -0
  584. data/vendor/psd.rb/lib/psd/layer/blending_ranges.rb +62 -0
  585. data/vendor/psd.rb/lib/psd/layer/channel_image.rb +15 -0
  586. data/vendor/psd.rb/lib/psd/layer/exporting.rb +28 -0
  587. data/vendor/psd.rb/lib/psd/layer/helpers.rb +77 -0
  588. data/vendor/psd.rb/lib/psd/layer/info.rb +74 -0
  589. data/vendor/psd.rb/lib/psd/layer/mask.rb +19 -0
  590. data/vendor/psd.rb/lib/psd/layer/name.rb +33 -0
  591. data/vendor/psd.rb/lib/psd/layer/path_components.rb +22 -0
  592. data/vendor/psd.rb/lib/psd/layer/position_and_channels.rb +47 -0
  593. data/vendor/psd.rb/lib/psd/layer_info.rb +27 -0
  594. data/vendor/psd.rb/lib/psd/layer_info/blend_clipping_elements.rb +13 -0
  595. data/vendor/psd.rb/lib/psd/layer_info/blend_interior_elements.rb +13 -0
  596. data/vendor/psd.rb/lib/psd/layer_info/fill_opacity.rb +13 -0
  597. data/vendor/psd.rb/lib/psd/layer_info/layer_group.rb +30 -0
  598. data/vendor/psd.rb/lib/psd/layer_info/layer_id.rb +13 -0
  599. data/vendor/psd.rb/lib/psd/layer_info/layer_name_source.rb +14 -0
  600. data/vendor/psd.rb/lib/psd/layer_info/layer_section_divider.rb +48 -0
  601. data/vendor/psd.rb/lib/psd/layer_info/legacy_typetool.rb +88 -0
  602. data/vendor/psd.rb/lib/psd/layer_info/locked.rb +19 -0
  603. data/vendor/psd.rb/lib/psd/layer_info/metadata_setting.rb +35 -0
  604. data/vendor/psd.rb/lib/psd/layer_info/object_effects.rb +16 -0
  605. data/vendor/psd.rb/lib/psd/layer_info/placed_layer.rb +13 -0
  606. data/vendor/psd.rb/lib/psd/layer_info/reference_point.rb +16 -0
  607. data/vendor/psd.rb/lib/psd/layer_info/typetool.rb +165 -0
  608. data/vendor/psd.rb/lib/psd/layer_info/unicode_name.rb +17 -0
  609. data/vendor/psd.rb/lib/psd/layer_info/vector_mask.rb +25 -0
  610. data/vendor/psd.rb/lib/psd/layer_info/vector_mask_2.rb +10 -0
  611. data/vendor/psd.rb/lib/psd/layer_info/vector_stroke.rb +12 -0
  612. data/vendor/psd.rb/lib/psd/layer_info/vector_stroke_content.rb +15 -0
  613. data/vendor/psd.rb/lib/psd/layer_mask.rb +129 -0
  614. data/vendor/psd.rb/lib/psd/lazy_execute.rb +60 -0
  615. data/vendor/psd.rb/lib/psd/logger.rb +40 -0
  616. data/vendor/psd.rb/lib/psd/mask.rb +74 -0
  617. data/vendor/psd.rb/lib/psd/node.rb +70 -0
  618. data/vendor/psd.rb/lib/psd/node_exporting.rb +20 -0
  619. data/vendor/psd.rb/lib/psd/node_group.rb +86 -0
  620. data/vendor/psd.rb/lib/psd/node_layer.rb +81 -0
  621. data/vendor/psd.rb/lib/psd/node_root.rb +93 -0
  622. data/vendor/psd.rb/lib/psd/nodes/ancestry.rb +98 -0
  623. data/vendor/psd.rb/lib/psd/nodes/build_preview.rb +17 -0
  624. data/vendor/psd.rb/lib/psd/nodes/has_children.rb +13 -0
  625. data/vendor/psd.rb/lib/psd/nodes/lock_to_origin.rb +7 -0
  626. data/vendor/psd.rb/lib/psd/nodes/parse_layers.rb +18 -0
  627. data/vendor/psd.rb/lib/psd/nodes/search.rb +91 -0
  628. data/vendor/psd.rb/lib/psd/path_record.rb +180 -0
  629. data/vendor/psd.rb/lib/psd/renderer.rb +91 -0
  630. data/vendor/psd.rb/lib/psd/renderer/blender.rb +53 -0
  631. data/vendor/psd.rb/lib/psd/renderer/canvas.rb +95 -0
  632. data/vendor/psd.rb/lib/psd/renderer/canvas_management.rb +26 -0
  633. data/vendor/psd.rb/lib/psd/renderer/clipping_mask.rb +41 -0
  634. data/vendor/psd.rb/lib/psd/renderer/compose.rb +361 -0
  635. data/vendor/psd.rb/lib/psd/renderer/layer_styles.rb +56 -0
  636. data/vendor/psd.rb/lib/psd/renderer/layer_styles/color_overlay.rb +65 -0
  637. data/vendor/psd.rb/lib/psd/renderer/layer_styles/drop_shadow.rb +75 -0
  638. data/vendor/psd.rb/lib/psd/renderer/mask.rb +46 -0
  639. data/vendor/psd.rb/lib/psd/resource.rb +26 -0
  640. data/vendor/psd.rb/lib/psd/resource_section.rb +22 -0
  641. data/vendor/psd.rb/lib/psd/resources.rb +69 -0
  642. data/vendor/psd.rb/lib/psd/resources/guides.rb +35 -0
  643. data/vendor/psd.rb/lib/psd/resources/layer_comps.rb +42 -0
  644. data/vendor/psd.rb/lib/psd/resources/slices.rb +132 -0
  645. data/vendor/psd.rb/lib/psd/section.rb +26 -0
  646. data/vendor/psd.rb/lib/psd/util.rb +18 -0
  647. data/vendor/psd.rb/lib/psd/version.rb +3 -0
  648. data/vendor/psd.rb/psd.gemspec +32 -0
  649. data/vendor/psd.rb/spec/files/blendmodes.psd +0 -0
  650. data/vendor/psd.rb/spec/files/empty-layer-subgroups.psd +0 -0
  651. data/vendor/psd.rb/spec/files/empty-layer.psd +0 -0
  652. data/vendor/psd.rb/spec/files/example.psd +0 -0
  653. data/vendor/psd.rb/spec/files/guides.psd +0 -0
  654. data/vendor/psd.rb/spec/files/locked.psd +0 -0
  655. data/vendor/psd.rb/spec/files/one_layer.psd +0 -0
  656. data/vendor/psd.rb/spec/files/path.psd +0 -0
  657. data/vendor/psd.rb/spec/files/pixel.psd +0 -0
  658. data/vendor/psd.rb/spec/files/simplest.psd +0 -0
  659. data/vendor/psd.rb/spec/files/slices.psd +0 -0
  660. data/vendor/psd.rb/spec/files/text.psd +0 -0
  661. data/vendor/psd.rb/spec/guides_spec.rb +34 -0
  662. data/vendor/psd.rb/spec/hierarchy_spec.rb +152 -0
  663. data/vendor/psd.rb/spec/image_spec.rb +86 -0
  664. data/vendor/psd.rb/spec/lazy_execute_spec.rb +20 -0
  665. data/vendor/psd.rb/spec/locked_spec.rb +78 -0
  666. data/vendor/psd.rb/spec/parsing_spec.rb +163 -0
  667. data/vendor/psd.rb/spec/psd_spec.rb +37 -0
  668. data/vendor/psd.rb/spec/slices_spec.rb +57 -0
  669. data/vendor/psd.rb/spec/spec_helper.rb +13 -0
  670. data/vendor/psd.rb/spec/text_spec.rb +27 -0
  671. data/vendor/psd_native/Gemfile +4 -0
  672. data/vendor/psd_native/Guardfile +6 -0
  673. data/vendor/psd_native/LICENSE.txt +22 -0
  674. data/vendor/psd_native/README.md +48 -0
  675. data/vendor/psd_native/Rakefile +13 -0
  676. data/vendor/psd_native/ext/psd_native/blender.c +57 -0
  677. data/vendor/psd_native/ext/psd_native/blender.h +6 -0
  678. data/vendor/psd_native/ext/psd_native/canvas.c +9 -0
  679. data/vendor/psd_native/ext/psd_native/canvas.h +6 -0
  680. data/vendor/psd_native/ext/psd_native/clipping_mask.c +57 -0
  681. data/vendor/psd_native/ext/psd_native/clipping_mask.h +6 -0
  682. data/vendor/psd_native/ext/psd_native/color.c +20 -0
  683. data/vendor/psd_native/ext/psd_native/color.h +18 -0
  684. data/vendor/psd_native/ext/psd_native/compose.c +394 -0
  685. data/vendor/psd_native/ext/psd_native/compose.h +43 -0
  686. data/vendor/psd_native/ext/psd_native/extconf.rb +3 -0
  687. data/vendor/psd_native/ext/psd_native/file.c +20 -0
  688. data/vendor/psd_native/ext/psd_native/file.h +9 -0
  689. data/vendor/psd_native/ext/psd_native/image_mode_cmyk.c +64 -0
  690. data/vendor/psd_native/ext/psd_native/image_mode_cmyk.h +6 -0
  691. data/vendor/psd_native/ext/psd_native/image_mode_greyscale.c +27 -0
  692. data/vendor/psd_native/ext/psd_native/image_mode_greyscale.h +6 -0
  693. data/vendor/psd_native/ext/psd_native/image_mode_rgb.c +49 -0
  694. data/vendor/psd_native/ext/psd_native/image_mode_rgb.h +6 -0
  695. data/vendor/psd_native/ext/psd_native/layer_raw.c +20 -0
  696. data/vendor/psd_native/ext/psd_native/layer_raw.h +6 -0
  697. data/vendor/psd_native/ext/psd_native/mask.c +52 -0
  698. data/vendor/psd_native/ext/psd_native/mask.h +6 -0
  699. data/vendor/psd_native/ext/psd_native/psd_native_ext.c +87 -0
  700. data/vendor/psd_native/ext/psd_native/psd_native_ext.h +31 -0
  701. data/vendor/psd_native/ext/psd_native/rle_decoding.c +53 -0
  702. data/vendor/psd_native/ext/psd_native/rle_decoding.h +6 -0
  703. data/vendor/psd_native/ext/psd_native/util.c +17 -0
  704. data/vendor/psd_native/ext/psd_native/util.h +8 -0
  705. data/vendor/psd_native/lib/psd_native.rb +35 -0
  706. data/vendor/psd_native/lib/psd_native/compose.rb +19 -0
  707. data/vendor/psd_native/lib/psd_native/version.rb +3 -0
  708. data/vendor/psd_native/psd_native.gemspec +35 -0
  709. data/vendor/psd_native/spec/files/example.psd +0 -0
  710. data/vendor/psd_native/spec/files/one_layer.psd +0 -0
  711. data/vendor/psd_native/spec/files/path.psd +0 -0
  712. data/vendor/psd_native/spec/files/pixel.psd +0 -0
  713. data/vendor/psd_native/spec/files/simplest.psd +0 -0
  714. data/vendor/psd_native/spec/files/text.psd +0 -0
  715. data/vendor/psd_native/spec/image_spec.rb +86 -0
  716. data/vendor/psd_native/spec/psd_spec.rb +37 -0
  717. data/vendor/psd_native/spec/spec_helper.rb +13 -0
  718. data/vendor/psd_native/spec/util_spec.rb +15 -0
  719. metadata +767 -0
@@ -0,0 +1,75 @@
1
+ # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
2
+ # code is released under a tri EPL/GPL/LGPL license. You can use it,
3
+ # redistribute it and/or modify it under the terms of the:
4
+ #
5
+ # Eclipse Public License version 1.0
6
+ # GNU General Public License version 2
7
+ # GNU Lesser General Public License version 2.1
8
+
9
+ module Bench
10
+
11
+ class Measurement
12
+
13
+ attr_reader :warmup_samples
14
+ attr_reader :samples
15
+
16
+ attr_reader :warmup_time
17
+
18
+ attr_reader :sample_mean
19
+ attr_reader :sample_error
20
+
21
+ attr_reader :score
22
+ attr_reader :score_error
23
+
24
+ def initialize(warmup_samples, samples)
25
+ @warmup_samples = warmup_samples
26
+ @samples = samples
27
+
28
+ @warmup_time = Stats.sum(warmup_samples)
29
+ @sample_mean = Stats.mean(samples)
30
+ @sample_error = Stats.standard_deviation(samples)
31
+ @score = to_score(@sample_mean)
32
+ @score_error = to_score(@sample_mean - @sample_error) - to_score(@sample_mean)
33
+ end
34
+
35
+ def to_score(sample)
36
+ 1 / sample * 1000
37
+ end
38
+
39
+ def total_time
40
+ Stats.sum(warmup_samples + samples)
41
+ end
42
+
43
+ end
44
+
45
+ class Measurements
46
+
47
+ def initialize
48
+ @hash = {}
49
+ end
50
+
51
+ def []=(b, i, m)
52
+ @hash[[b, i]] = m
53
+ end
54
+
55
+ def [](b, i)
56
+ @hash[[b, i]]
57
+ end
58
+
59
+ def measurements
60
+ @hash
61
+ end
62
+
63
+ def total_time
64
+ Stats.sum(measurements.values.map { |m|
65
+ if m == :failed
66
+ 0
67
+ else
68
+ m.total_time
69
+ end
70
+ })
71
+ end
72
+
73
+ end
74
+
75
+ end
@@ -0,0 +1,39 @@
1
+ # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
2
+ # code is released under a tri EPL/GPL/LGPL license. You can use it,
3
+ # redistribute it and/or modify it under the terms of the:
4
+ #
5
+ # Eclipse Public License version 1.0
6
+ # GNU General Public License version 2
7
+ # GNU Lesser General Public License version 2.1
8
+
9
+ # This file should be kept as simple as possible to accommodate early
10
+ # implementations of Ruby.
11
+
12
+ SMALL_PRIME = 149
13
+
14
+ def harness_input
15
+ micro_harness_input
16
+ end
17
+
18
+ def harness_sample(input)
19
+ sum = 0
20
+
21
+ micro_harness_iterations.times do
22
+ sum = (sum + micro_harness_sample(input)) % SMALL_PRIME
23
+ end
24
+
25
+ sum
26
+ end
27
+
28
+ def harness_verify(output)
29
+ expected_output = micro_harness_expected
30
+ expected_sum = 0
31
+
32
+ micro_harness_iterations.times do
33
+ expected_sum = (expected_sum + expected_output) % SMALL_PRIME
34
+ end
35
+
36
+ output == expected_sum
37
+ end
38
+
39
+ require 'bench9000/harness'
@@ -0,0 +1,31 @@
1
+ # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. This
2
+ # code is released under a tri EPL/GPL/LGPL license. You can use it,
3
+ # redistribute it and/or modify it under the terms of the:
4
+ #
5
+ # Eclipse Public License version 1.0
6
+ # GNU General Public License version 2
7
+ # GNU Lesser General Public License version 2.1
8
+
9
+ module Bench
10
+
11
+ class Options
12
+
13
+ attr_reader :config
14
+ attr_reader :implementations
15
+ attr_reader :benchmarks
16
+ attr_reader :flags
17
+
18
+ def initialize(
19
+ config,
20
+ implementations,
21
+ benchmarks,
22
+ flags)
23
+ @config = config
24
+ @implementations = implementations
25
+ @benchmarks = benchmarks
26
+ @flags = flags
27
+ end
28
+
29
+ end
30
+
31
+ end
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
3
+ * Copyright 2011-2014 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn:active,.btn.active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:-o-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#2d6ca2));background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-primary:disabled,.btn-primary[disabled]{background-color:#2d6ca2;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-color:#357ebd;background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-o-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#357ebd));background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f3f3f3));background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:-o-linear-gradient(top,#222 0,#282828 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#222),to(#282828));background-image:linear-gradient(to bottom,#222 0,#282828 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:-o-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#3071a9));background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:-o-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#3278b3));background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);background-repeat:repeat-x;border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-o-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#428bca),to(#357ebd));background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
3
+ * Copyright 2011-2014 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;width:100% \9;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;width:100% \9;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px;line-height:1.42857143 \0}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-horizontal .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{position:absolute;z-index:-1;filter:alpha(opacity=0);opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a{color:#777}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
3
+ * Copyright 2011-2014 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f+', [role="menu"], [role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.2.0",c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(c.$body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one("bsTransitionEnd",function(){c.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(300):c.$element.trigger("focus").trigger(e)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;if(this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;e?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(150):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var f=function(){c.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",f).emulateTransitionEnd(150):f()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.2.0",c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var c=a.contains(document.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!c)return;var d=this,e=this.tip(),f=this.getUID(this.type);this.setContent(),e.attr("id",f),this.$element.attr("aria-describedby",f),this.options.animation&&e.addClass("fade");var g="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,h=/\s?auto?\s?/i,i=h.test(g);i&&(g=g.replace(h,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(g).data("bs."+this.type,this),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var j=this.getPosition(),k=e[0].offsetWidth,l=e[0].offsetHeight;if(i){var m=g,n=this.$element.parent(),o=this.getPosition(n);g="bottom"==g&&j.top+j.height+l-o.scroll>o.height?"top":"top"==g&&j.top-o.scroll-l<0?"bottom":"right"==g&&j.right+k>o.width?"left":"left"==g&&j.left-k<o.left?"right":g,e.removeClass(m).addClass(g)}var p=this.getCalculatedOffset(g,j,k,l);this.applyPlacement(p,g);var q=function(){d.$element.trigger("shown.bs."+d.type),d.hoverState=null};a.support.transition&&this.$tip.hasClass("fade")?e.one("bsTransitionEnd",q).emulateTransitionEnd(150):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=k.left?2*k.left-e+i:2*k.top-f+j,m=k.left?"left":"top",n=k.left?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(l,d[0][n],m)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.removeAttr("aria-describedby"),this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one("bsTransitionEnd",b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName;return a.extend({},"function"==typeof c.getBoundingClientRect?c.getBoundingClientRect():null,{scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop(),width:d?a(window).width():b.outerWidth(),height:d?a(window).height():b.outerHeight()},d?{top:0,left:0}:b.offset())},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.2.0",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").empty()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.2.0",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.2.0",c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.closest("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},c.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),f.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault(),b.call(a(this),"show")})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.2.0",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=a(document).height(),d=this.$target.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=b-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:b-this.$element.height()-h}))}}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},d.offsetBottom&&(d.offset.bottom=d.offsetBottom),d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
@@ -0,0 +1,3432 @@
1
+ /*!
2
+ * Chart.js
3
+ * http://chartjs.org/
4
+ * Version: 1.0.1-beta.4
5
+ *
6
+ * Copyright 2014 Nick Downie
7
+ * Released under the MIT license
8
+ * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
9
+ */
10
+
11
+
12
+ (function(){
13
+
14
+ "use strict";
15
+
16
+ //Declare root variable - window in the browser, global on the server
17
+ var root = this,
18
+ previous = root.Chart;
19
+
20
+ //Occupy the global variable of Chart, and create a simple base class
21
+ var Chart = function(context){
22
+ var chart = this;
23
+ this.canvas = context.canvas;
24
+
25
+ this.ctx = context;
26
+
27
+ //Variables global to the chart
28
+ var width = this.width = context.canvas.width;
29
+ var height = this.height = context.canvas.height;
30
+ this.aspectRatio = this.width / this.height;
31
+ //High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.
32
+ helpers.retinaScale(this);
33
+
34
+ return this;
35
+ };
36
+ //Globally expose the defaults to allow for user updating/changing
37
+ Chart.defaults = {
38
+ global: {
39
+ // Boolean - Whether to animate the chart
40
+ animation: true,
41
+
42
+ // Number - Number of animation steps
43
+ animationSteps: 60,
44
+
45
+ // String - Animation easing effect
46
+ animationEasing: "easeOutQuart",
47
+
48
+ // Boolean - If we should show the scale at all
49
+ showScale: true,
50
+
51
+ // Boolean - If we want to override with a hard coded scale
52
+ scaleOverride: false,
53
+
54
+ // ** Required if scaleOverride is true **
55
+ // Number - The number of steps in a hard coded scale
56
+ scaleSteps: null,
57
+ // Number - The value jump in the hard coded scale
58
+ scaleStepWidth: null,
59
+ // Number - The scale starting value
60
+ scaleStartValue: null,
61
+
62
+ // String - Colour of the scale line
63
+ scaleLineColor: "rgba(0,0,0,.1)",
64
+
65
+ // Number - Pixel width of the scale line
66
+ scaleLineWidth: 1,
67
+
68
+ // Boolean - Whether to show labels on the scale
69
+ scaleShowLabels: true,
70
+
71
+ // Interpolated JS string - can access value
72
+ scaleLabel: "<%=value%>",
73
+
74
+ // Boolean - Whether the scale should stick to integers, and not show any floats even if drawing space is there
75
+ scaleIntegersOnly: true,
76
+
77
+ // Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
78
+ scaleBeginAtZero: false,
79
+
80
+ // String - Scale label font declaration for the scale label
81
+ scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
82
+
83
+ // Number - Scale label font size in pixels
84
+ scaleFontSize: 12,
85
+
86
+ // String - Scale label font weight style
87
+ scaleFontStyle: "normal",
88
+
89
+ // String - Scale label font colour
90
+ scaleFontColor: "#666",
91
+
92
+ // Boolean - whether or not the chart should be responsive and resize when the browser does.
93
+ responsive: false,
94
+
95
+ // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
96
+ maintainAspectRatio: true,
97
+
98
+ // Boolean - Determines whether to draw tooltips on the canvas or not - attaches events to touchmove & mousemove
99
+ showTooltips: true,
100
+
101
+ // Array - Array of string names to attach tooltip events
102
+ tooltipEvents: ["mousemove", "touchstart", "touchmove", "mouseout"],
103
+
104
+ // String - Tooltip background colour
105
+ tooltipFillColor: "rgba(0,0,0,0.8)",
106
+
107
+ // String - Tooltip label font declaration for the scale label
108
+ tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
109
+
110
+ // Number - Tooltip label font size in pixels
111
+ tooltipFontSize: 14,
112
+
113
+ // String - Tooltip font weight style
114
+ tooltipFontStyle: "normal",
115
+
116
+ // String - Tooltip label font colour
117
+ tooltipFontColor: "#fff",
118
+
119
+ // String - Tooltip title font declaration for the scale label
120
+ tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
121
+
122
+ // Number - Tooltip title font size in pixels
123
+ tooltipTitleFontSize: 14,
124
+
125
+ // String - Tooltip title font weight style
126
+ tooltipTitleFontStyle: "bold",
127
+
128
+ // String - Tooltip title font colour
129
+ tooltipTitleFontColor: "#fff",
130
+
131
+ // Number - pixel width of padding around tooltip text
132
+ tooltipYPadding: 6,
133
+
134
+ // Number - pixel width of padding around tooltip text
135
+ tooltipXPadding: 6,
136
+
137
+ // Number - Size of the caret on the tooltip
138
+ tooltipCaretSize: 8,
139
+
140
+ // Number - Pixel radius of the tooltip border
141
+ tooltipCornerRadius: 6,
142
+
143
+ // Number - Pixel offset from point x to tooltip edge
144
+ tooltipXOffset: 10,
145
+
146
+ // String - Template string for single tooltips
147
+ tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
148
+
149
+ // String - Template string for single tooltips
150
+ multiTooltipTemplate: "<%= value %>",
151
+
152
+ // String - Colour behind the legend colour block
153
+ multiTooltipKeyBackground: '#fff',
154
+
155
+ // Function - Will fire on animation progression.
156
+ onAnimationProgress: function(){},
157
+
158
+ // Function - Will fire on animation completion.
159
+ onAnimationComplete: function(){}
160
+
161
+ }
162
+ };
163
+
164
+ //Create a dictionary of chart types, to allow for extension of existing types
165
+ Chart.types = {};
166
+
167
+ //Global Chart helpers object for utility methods and classes
168
+ var helpers = Chart.helpers = {};
169
+
170
+ //-- Basic js utility methods
171
+ var each = helpers.each = function(loopable,callback,self){
172
+ var additionalArgs = Array.prototype.slice.call(arguments, 3);
173
+ // Check to see if null or undefined firstly.
174
+ if (loopable){
175
+ if (loopable.length === +loopable.length){
176
+ var i;
177
+ for (i=0; i<loopable.length; i++){
178
+ callback.apply(self,[loopable[i], i].concat(additionalArgs));
179
+ }
180
+ }
181
+ else{
182
+ for (var item in loopable){
183
+ callback.apply(self,[loopable[item],item].concat(additionalArgs));
184
+ }
185
+ }
186
+ }
187
+ },
188
+ clone = helpers.clone = function(obj){
189
+ var objClone = {};
190
+ each(obj,function(value,key){
191
+ if (obj.hasOwnProperty(key)) objClone[key] = value;
192
+ });
193
+ return objClone;
194
+ },
195
+ extend = helpers.extend = function(base){
196
+ each(Array.prototype.slice.call(arguments,1), function(extensionObject) {
197
+ each(extensionObject,function(value,key){
198
+ if (extensionObject.hasOwnProperty(key)) base[key] = value;
199
+ });
200
+ });
201
+ return base;
202
+ },
203
+ merge = helpers.merge = function(base,master){
204
+ //Merge properties in left object over to a shallow clone of object right.
205
+ var args = Array.prototype.slice.call(arguments,0);
206
+ args.unshift({});
207
+ return extend.apply(null, args);
208
+ },
209
+ indexOf = helpers.indexOf = function(arrayToSearch, item){
210
+ if (Array.prototype.indexOf) {
211
+ return arrayToSearch.indexOf(item);
212
+ }
213
+ else{
214
+ for (var i = 0; i < arrayToSearch.length; i++) {
215
+ if (arrayToSearch[i] === item) return i;
216
+ }
217
+ return -1;
218
+ }
219
+ },
220
+ where = helpers.where = function(collection, filterCallback){
221
+ var filtered = [];
222
+
223
+ helpers.each(collection, function(item){
224
+ if (filterCallback(item)){
225
+ filtered.push(item);
226
+ }
227
+ });
228
+
229
+ return filtered;
230
+ },
231
+ findNextWhere = helpers.findNextWhere = function(arrayToSearch, filterCallback, startIndex){
232
+ // Default to start of the array
233
+ if (!startIndex){
234
+ startIndex = -1;
235
+ }
236
+ for (var i = startIndex + 1; i < arrayToSearch.length; i++) {
237
+ var currentItem = arrayToSearch[i];
238
+ if (filterCallback(currentItem)){
239
+ return currentItem;
240
+ }
241
+ };
242
+ },
243
+ findPreviousWhere = helpers.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex){
244
+ // Default to end of the array
245
+ if (!startIndex){
246
+ startIndex = arrayToSearch.length;
247
+ }
248
+ for (var i = startIndex - 1; i >= 0; i--) {
249
+ var currentItem = arrayToSearch[i];
250
+ if (filterCallback(currentItem)){
251
+ return currentItem;
252
+ }
253
+ };
254
+ },
255
+ inherits = helpers.inherits = function(extensions){
256
+ //Basic javascript inheritance based on the model created in Backbone.js
257
+ var parent = this;
258
+ var ChartElement = (extensions && extensions.hasOwnProperty("constructor")) ? extensions.constructor : function(){ return parent.apply(this, arguments); };
259
+
260
+ var Surrogate = function(){ this.constructor = ChartElement;};
261
+ Surrogate.prototype = parent.prototype;
262
+ ChartElement.prototype = new Surrogate();
263
+
264
+ ChartElement.extend = inherits;
265
+
266
+ if (extensions) extend(ChartElement.prototype, extensions);
267
+
268
+ ChartElement.__super__ = parent.prototype;
269
+
270
+ return ChartElement;
271
+ },
272
+ noop = helpers.noop = function(){},
273
+ uid = helpers.uid = (function(){
274
+ var id=0;
275
+ return function(){
276
+ return "chart-" + id++;
277
+ };
278
+ })(),
279
+ warn = helpers.warn = function(str){
280
+ //Method for warning of errors
281
+ if (window.console && typeof window.console.warn == "function") console.warn(str);
282
+ },
283
+ amd = helpers.amd = (typeof define == 'function' && define.amd),
284
+ //-- Math methods
285
+ isNumber = helpers.isNumber = function(n){
286
+ return !isNaN(parseFloat(n)) && isFinite(n);
287
+ },
288
+ max = helpers.max = function(array){
289
+ return Math.max.apply( Math, array );
290
+ },
291
+ min = helpers.min = function(array){
292
+ return Math.min.apply( Math, array );
293
+ },
294
+ cap = helpers.cap = function(valueToCap,maxValue,minValue){
295
+ if(isNumber(maxValue)) {
296
+ if( valueToCap > maxValue ) {
297
+ return maxValue;
298
+ }
299
+ }
300
+ else if(isNumber(minValue)){
301
+ if ( valueToCap < minValue ){
302
+ return minValue;
303
+ }
304
+ }
305
+ return valueToCap;
306
+ },
307
+ getDecimalPlaces = helpers.getDecimalPlaces = function(num){
308
+ if (num%1!==0 && isNumber(num)){
309
+ return num.toString().split(".")[1].length;
310
+ }
311
+ else {
312
+ return 0;
313
+ }
314
+ },
315
+ toRadians = helpers.radians = function(degrees){
316
+ return degrees * (Math.PI/180);
317
+ },
318
+ // Gets the angle from vertical upright to the point about a centre.
319
+ getAngleFromPoint = helpers.getAngleFromPoint = function(centrePoint, anglePoint){
320
+ var distanceFromXCenter = anglePoint.x - centrePoint.x,
321
+ distanceFromYCenter = anglePoint.y - centrePoint.y,
322
+ radialDistanceFromCenter = Math.sqrt( distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);
323
+
324
+
325
+ var angle = Math.PI * 2 + Math.atan2(distanceFromYCenter, distanceFromXCenter);
326
+
327
+ //If the segment is in the top left quadrant, we need to add another rotation to the angle
328
+ if (distanceFromXCenter < 0 && distanceFromYCenter < 0){
329
+ angle += Math.PI*2;
330
+ }
331
+
332
+ return {
333
+ angle: angle,
334
+ distance: radialDistanceFromCenter
335
+ };
336
+ },
337
+ aliasPixel = helpers.aliasPixel = function(pixelWidth){
338
+ return (pixelWidth % 2 === 0) ? 0 : 0.5;
339
+ },
340
+ splineCurve = helpers.splineCurve = function(FirstPoint,MiddlePoint,AfterPoint,t){
341
+ //Props to Rob Spencer at scaled innovation for his post on splining between points
342
+ //http://scaledinnovation.com/analytics/splines/aboutSplines.html
343
+ var d01=Math.sqrt(Math.pow(MiddlePoint.x-FirstPoint.x,2)+Math.pow(MiddlePoint.y-FirstPoint.y,2)),
344
+ d12=Math.sqrt(Math.pow(AfterPoint.x-MiddlePoint.x,2)+Math.pow(AfterPoint.y-MiddlePoint.y,2)),
345
+ fa=t*d01/(d01+d12),// scaling factor for triangle Ta
346
+ fb=t*d12/(d01+d12);
347
+ return {
348
+ inner : {
349
+ x : MiddlePoint.x-fa*(AfterPoint.x-FirstPoint.x),
350
+ y : MiddlePoint.y-fa*(AfterPoint.y-FirstPoint.y)
351
+ },
352
+ outer : {
353
+ x: MiddlePoint.x+fb*(AfterPoint.x-FirstPoint.x),
354
+ y : MiddlePoint.y+fb*(AfterPoint.y-FirstPoint.y)
355
+ }
356
+ };
357
+ },
358
+ calculateOrderOfMagnitude = helpers.calculateOrderOfMagnitude = function(val){
359
+ return Math.floor(Math.log(val) / Math.LN10);
360
+ },
361
+ calculateScaleRange = helpers.calculateScaleRange = function(valuesArray, drawingSize, textSize, startFromZero, integersOnly){
362
+
363
+ //Set a minimum step of two - a point at the top of the graph, and a point at the base
364
+ var minSteps = 2,
365
+ maxSteps = Math.floor(drawingSize/(textSize * 1.5)),
366
+ skipFitting = (minSteps >= maxSteps);
367
+
368
+ var maxValue = max(valuesArray),
369
+ minValue = min(valuesArray);
370
+
371
+ // We need some degree of seperation here to calculate the scales if all the values are the same
372
+ // Adding/minusing 0.5 will give us a range of 1.
373
+ if (maxValue === minValue){
374
+ maxValue += 0.5;
375
+ // So we don't end up with a graph with a negative start value if we've said always start from zero
376
+ if (minValue >= 0.5 && !startFromZero){
377
+ minValue -= 0.5;
378
+ }
379
+ else{
380
+ // Make up a whole number above the values
381
+ maxValue += 0.5;
382
+ }
383
+ }
384
+
385
+ var valueRange = Math.abs(maxValue - minValue),
386
+ rangeOrderOfMagnitude = calculateOrderOfMagnitude(valueRange),
387
+ graphMax = Math.ceil(maxValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude),
388
+ graphMin = (startFromZero) ? 0 : Math.floor(minValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude),
389
+ graphRange = graphMax - graphMin,
390
+ stepValue = Math.pow(10, rangeOrderOfMagnitude),
391
+ numberOfSteps = Math.round(graphRange / stepValue);
392
+
393
+ //If we have more space on the graph we'll use it to give more definition to the data
394
+ while((numberOfSteps > maxSteps || (numberOfSteps * 2) < maxSteps) && !skipFitting) {
395
+ if(numberOfSteps > maxSteps){
396
+ stepValue *=2;
397
+ numberOfSteps = Math.round(graphRange/stepValue);
398
+ // Don't ever deal with a decimal number of steps - cancel fitting and just use the minimum number of steps.
399
+ if (numberOfSteps % 1 !== 0){
400
+ skipFitting = true;
401
+ }
402
+ }
403
+ //We can fit in double the amount of scale points on the scale
404
+ else{
405
+ //If user has declared ints only, and the step value isn't a decimal
406
+ if (integersOnly && rangeOrderOfMagnitude >= 0){
407
+ //If the user has said integers only, we need to check that making the scale more granular wouldn't make it a float
408
+ if(stepValue/2 % 1 === 0){
409
+ stepValue /=2;
410
+ numberOfSteps = Math.round(graphRange/stepValue);
411
+ }
412
+ //If it would make it a float break out of the loop
413
+ else{
414
+ break;
415
+ }
416
+ }
417
+ //If the scale doesn't have to be an int, make the scale more granular anyway.
418
+ else{
419
+ stepValue /=2;
420
+ numberOfSteps = Math.round(graphRange/stepValue);
421
+ }
422
+
423
+ }
424
+ }
425
+
426
+ if (skipFitting){
427
+ numberOfSteps = minSteps;
428
+ stepValue = graphRange / numberOfSteps;
429
+ }
430
+
431
+ return {
432
+ steps : numberOfSteps,
433
+ stepValue : stepValue,
434
+ min : graphMin,
435
+ max : graphMin + (numberOfSteps * stepValue)
436
+ };
437
+
438
+ },
439
+ /* jshint ignore:start */
440
+ // Blows up jshint errors based on the new Function constructor
441
+ //Templating methods
442
+ //Javascript micro templating by John Resig - source at http://ejohn.org/blog/javascript-micro-templating/
443
+ template = helpers.template = function(templateString, valuesObject){
444
+ // If templateString is function rather than string-template - call the function for valuesObject
445
+ if(templateString instanceof Function){
446
+ return templateString(valuesObject);
447
+ }
448
+
449
+ var cache = {};
450
+ function tmpl(str, data){
451
+ // Figure out if we're getting a template, or if we need to
452
+ // load the template - and be sure to cache the result.
453
+ var fn = !/\W/.test(str) ?
454
+ cache[str] = cache[str] :
455
+
456
+ // Generate a reusable function that will serve as a template
457
+ // generator (and which will be cached).
458
+ new Function("obj",
459
+ "var p=[],print=function(){p.push.apply(p,arguments);};" +
460
+
461
+ // Introduce the data as local variables using with(){}
462
+ "with(obj){p.push('" +
463
+
464
+ // Convert the template into pure JavaScript
465
+ str
466
+ .replace(/[\r\t\n]/g, " ")
467
+ .split("<%").join("\t")
468
+ .replace(/((^|%>)[^\t]*)'/g, "$1\r")
469
+ .replace(/\t=(.*?)%>/g, "',$1,'")
470
+ .split("\t").join("');")
471
+ .split("%>").join("p.push('")
472
+ .split("\r").join("\\'") +
473
+ "');}return p.join('');"
474
+ );
475
+
476
+ // Provide some basic currying to the user
477
+ return data ? fn( data ) : fn;
478
+ }
479
+ return tmpl(templateString,valuesObject);
480
+ },
481
+ /* jshint ignore:end */
482
+ generateLabels = helpers.generateLabels = function(templateString,numberOfSteps,graphMin,stepValue){
483
+ var labelsArray = new Array(numberOfSteps);
484
+ if (labelTemplateString){
485
+ each(labelsArray,function(val,index){
486
+ labelsArray[index] = template(templateString,{value: (graphMin + (stepValue*(index+1)))});
487
+ });
488
+ }
489
+ return labelsArray;
490
+ },
491
+ //--Animation methods
492
+ //Easing functions adapted from Robert Penner's easing equations
493
+ //http://www.robertpenner.com/easing/
494
+ easingEffects = helpers.easingEffects = {
495
+ linear: function (t) {
496
+ return t;
497
+ },
498
+ easeInQuad: function (t) {
499
+ return t * t;
500
+ },
501
+ easeOutQuad: function (t) {
502
+ return -1 * t * (t - 2);
503
+ },
504
+ easeInOutQuad: function (t) {
505
+ if ((t /= 1 / 2) < 1) return 1 / 2 * t * t;
506
+ return -1 / 2 * ((--t) * (t - 2) - 1);
507
+ },
508
+ easeInCubic: function (t) {
509
+ return t * t * t;
510
+ },
511
+ easeOutCubic: function (t) {
512
+ return 1 * ((t = t / 1 - 1) * t * t + 1);
513
+ },
514
+ easeInOutCubic: function (t) {
515
+ if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t;
516
+ return 1 / 2 * ((t -= 2) * t * t + 2);
517
+ },
518
+ easeInQuart: function (t) {
519
+ return t * t * t * t;
520
+ },
521
+ easeOutQuart: function (t) {
522
+ return -1 * ((t = t / 1 - 1) * t * t * t - 1);
523
+ },
524
+ easeInOutQuart: function (t) {
525
+ if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t;
526
+ return -1 / 2 * ((t -= 2) * t * t * t - 2);
527
+ },
528
+ easeInQuint: function (t) {
529
+ return 1 * (t /= 1) * t * t * t * t;
530
+ },
531
+ easeOutQuint: function (t) {
532
+ return 1 * ((t = t / 1 - 1) * t * t * t * t + 1);
533
+ },
534
+ easeInOutQuint: function (t) {
535
+ if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t * t;
536
+ return 1 / 2 * ((t -= 2) * t * t * t * t + 2);
537
+ },
538
+ easeInSine: function (t) {
539
+ return -1 * Math.cos(t / 1 * (Math.PI / 2)) + 1;
540
+ },
541
+ easeOutSine: function (t) {
542
+ return 1 * Math.sin(t / 1 * (Math.PI / 2));
543
+ },
544
+ easeInOutSine: function (t) {
545
+ return -1 / 2 * (Math.cos(Math.PI * t / 1) - 1);
546
+ },
547
+ easeInExpo: function (t) {
548
+ return (t === 0) ? 1 : 1 * Math.pow(2, 10 * (t / 1 - 1));
549
+ },
550
+ easeOutExpo: function (t) {
551
+ return (t === 1) ? 1 : 1 * (-Math.pow(2, -10 * t / 1) + 1);
552
+ },
553
+ easeInOutExpo: function (t) {
554
+ if (t === 0) return 0;
555
+ if (t === 1) return 1;
556
+ if ((t /= 1 / 2) < 1) return 1 / 2 * Math.pow(2, 10 * (t - 1));
557
+ return 1 / 2 * (-Math.pow(2, -10 * --t) + 2);
558
+ },
559
+ easeInCirc: function (t) {
560
+ if (t >= 1) return t;
561
+ return -1 * (Math.sqrt(1 - (t /= 1) * t) - 1);
562
+ },
563
+ easeOutCirc: function (t) {
564
+ return 1 * Math.sqrt(1 - (t = t / 1 - 1) * t);
565
+ },
566
+ easeInOutCirc: function (t) {
567
+ if ((t /= 1 / 2) < 1) return -1 / 2 * (Math.sqrt(1 - t * t) - 1);
568
+ return 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);
569
+ },
570
+ easeInElastic: function (t) {
571
+ var s = 1.70158;
572
+ var p = 0;
573
+ var a = 1;
574
+ if (t === 0) return 0;
575
+ if ((t /= 1) == 1) return 1;
576
+ if (!p) p = 1 * 0.3;
577
+ if (a < Math.abs(1)) {
578
+ a = 1;
579
+ s = p / 4;
580
+ } else s = p / (2 * Math.PI) * Math.asin(1 / a);
581
+ return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
582
+ },
583
+ easeOutElastic: function (t) {
584
+ var s = 1.70158;
585
+ var p = 0;
586
+ var a = 1;
587
+ if (t === 0) return 0;
588
+ if ((t /= 1) == 1) return 1;
589
+ if (!p) p = 1 * 0.3;
590
+ if (a < Math.abs(1)) {
591
+ a = 1;
592
+ s = p / 4;
593
+ } else s = p / (2 * Math.PI) * Math.asin(1 / a);
594
+ return a * Math.pow(2, -10 * t) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) + 1;
595
+ },
596
+ easeInOutElastic: function (t) {
597
+ var s = 1.70158;
598
+ var p = 0;
599
+ var a = 1;
600
+ if (t === 0) return 0;
601
+ if ((t /= 1 / 2) == 2) return 1;
602
+ if (!p) p = 1 * (0.3 * 1.5);
603
+ if (a < Math.abs(1)) {
604
+ a = 1;
605
+ s = p / 4;
606
+ } else s = p / (2 * Math.PI) * Math.asin(1 / a);
607
+ if (t < 1) return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
608
+ return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) * 0.5 + 1;
609
+ },
610
+ easeInBack: function (t) {
611
+ var s = 1.70158;
612
+ return 1 * (t /= 1) * t * ((s + 1) * t - s);
613
+ },
614
+ easeOutBack: function (t) {
615
+ var s = 1.70158;
616
+ return 1 * ((t = t / 1 - 1) * t * ((s + 1) * t + s) + 1);
617
+ },
618
+ easeInOutBack: function (t) {
619
+ var s = 1.70158;
620
+ if ((t /= 1 / 2) < 1) return 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));
621
+ return 1 / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
622
+ },
623
+ easeInBounce: function (t) {
624
+ return 1 - easingEffects.easeOutBounce(1 - t);
625
+ },
626
+ easeOutBounce: function (t) {
627
+ if ((t /= 1) < (1 / 2.75)) {
628
+ return 1 * (7.5625 * t * t);
629
+ } else if (t < (2 / 2.75)) {
630
+ return 1 * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75);
631
+ } else if (t < (2.5 / 2.75)) {
632
+ return 1 * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375);
633
+ } else {
634
+ return 1 * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375);
635
+ }
636
+ },
637
+ easeInOutBounce: function (t) {
638
+ if (t < 1 / 2) return easingEffects.easeInBounce(t * 2) * 0.5;
639
+ return easingEffects.easeOutBounce(t * 2 - 1) * 0.5 + 1 * 0.5;
640
+ }
641
+ },
642
+ //Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
643
+ requestAnimFrame = helpers.requestAnimFrame = (function(){
644
+ return window.requestAnimationFrame ||
645
+ window.webkitRequestAnimationFrame ||
646
+ window.mozRequestAnimationFrame ||
647
+ window.oRequestAnimationFrame ||
648
+ window.msRequestAnimationFrame ||
649
+ function(callback) {
650
+ return window.setTimeout(callback, 1000 / 60);
651
+ };
652
+ })(),
653
+ cancelAnimFrame = helpers.cancelAnimFrame = (function(){
654
+ return window.cancelAnimationFrame ||
655
+ window.webkitCancelAnimationFrame ||
656
+ window.mozCancelAnimationFrame ||
657
+ window.oCancelAnimationFrame ||
658
+ window.msCancelAnimationFrame ||
659
+ function(callback) {
660
+ return window.clearTimeout(callback, 1000 / 60);
661
+ };
662
+ })(),
663
+ animationLoop = helpers.animationLoop = function(callback,totalSteps,easingString,onProgress,onComplete,chartInstance){
664
+
665
+ var currentStep = 0,
666
+ easingFunction = easingEffects[easingString] || easingEffects.linear;
667
+
668
+ var animationFrame = function(){
669
+ currentStep++;
670
+ var stepDecimal = currentStep/totalSteps;
671
+ var easeDecimal = easingFunction(stepDecimal);
672
+
673
+ callback.call(chartInstance,easeDecimal,stepDecimal, currentStep);
674
+ onProgress.call(chartInstance,easeDecimal,stepDecimal);
675
+ if (currentStep < totalSteps){
676
+ chartInstance.animationFrame = requestAnimFrame(animationFrame);
677
+ } else{
678
+ onComplete.apply(chartInstance);
679
+ }
680
+ };
681
+ requestAnimFrame(animationFrame);
682
+ },
683
+ //-- DOM methods
684
+ getRelativePosition = helpers.getRelativePosition = function(evt){
685
+ var mouseX, mouseY;
686
+ var e = evt.originalEvent || evt,
687
+ canvas = evt.currentTarget || evt.srcElement,
688
+ boundingRect = canvas.getBoundingClientRect();
689
+
690
+ if (e.touches){
691
+ mouseX = e.touches[0].clientX - boundingRect.left;
692
+ mouseY = e.touches[0].clientY - boundingRect.top;
693
+
694
+ }
695
+ else{
696
+ mouseX = e.clientX - boundingRect.left;
697
+ mouseY = e.clientY - boundingRect.top;
698
+ }
699
+
700
+ return {
701
+ x : mouseX,
702
+ y : mouseY
703
+ };
704
+
705
+ },
706
+ addEvent = helpers.addEvent = function(node,eventType,method){
707
+ if (node.addEventListener){
708
+ node.addEventListener(eventType,method);
709
+ } else if (node.attachEvent){
710
+ node.attachEvent("on"+eventType, method);
711
+ } else {
712
+ node["on"+eventType] = method;
713
+ }
714
+ },
715
+ removeEvent = helpers.removeEvent = function(node, eventType, handler){
716
+ if (node.removeEventListener){
717
+ node.removeEventListener(eventType, handler, false);
718
+ } else if (node.detachEvent){
719
+ node.detachEvent("on"+eventType,handler);
720
+ } else{
721
+ node["on" + eventType] = noop;
722
+ }
723
+ },
724
+ bindEvents = helpers.bindEvents = function(chartInstance, arrayOfEvents, handler){
725
+ // Create the events object if it's not already present
726
+ if (!chartInstance.events) chartInstance.events = {};
727
+
728
+ each(arrayOfEvents,function(eventName){
729
+ chartInstance.events[eventName] = function(){
730
+ handler.apply(chartInstance, arguments);
731
+ };
732
+ addEvent(chartInstance.chart.canvas,eventName,chartInstance.events[eventName]);
733
+ });
734
+ },
735
+ unbindEvents = helpers.unbindEvents = function (chartInstance, arrayOfEvents) {
736
+ each(arrayOfEvents, function(handler,eventName){
737
+ removeEvent(chartInstance.chart.canvas, eventName, handler);
738
+ });
739
+ },
740
+ getMaximumWidth = helpers.getMaximumWidth = function(domNode){
741
+ var container = domNode.parentNode;
742
+ // TODO = check cross browser stuff with this.
743
+ return container.clientWidth;
744
+ },
745
+ getMaximumHeight = helpers.getMaximumHeight = function(domNode){
746
+ var container = domNode.parentNode;
747
+ // TODO = check cross browser stuff with this.
748
+ return container.clientHeight;
749
+ },
750
+ getMaximumSize = helpers.getMaximumSize = helpers.getMaximumWidth, // legacy support
751
+ retinaScale = helpers.retinaScale = function(chart){
752
+ var ctx = chart.ctx,
753
+ width = chart.canvas.width,
754
+ height = chart.canvas.height;
755
+
756
+ if (window.devicePixelRatio) {
757
+ ctx.canvas.style.width = width + "px";
758
+ ctx.canvas.style.height = height + "px";
759
+ ctx.canvas.height = height * window.devicePixelRatio;
760
+ ctx.canvas.width = width * window.devicePixelRatio;
761
+ ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
762
+ }
763
+ },
764
+ //-- Canvas methods
765
+ clear = helpers.clear = function(chart){
766
+ chart.ctx.clearRect(0,0,chart.width,chart.height);
767
+ },
768
+ fontString = helpers.fontString = function(pixelSize,fontStyle,fontFamily){
769
+ return fontStyle + " " + pixelSize+"px " + fontFamily;
770
+ },
771
+ longestText = helpers.longestText = function(ctx,font,arrayOfStrings){
772
+ ctx.font = font;
773
+ var longest = 0;
774
+ each(arrayOfStrings,function(string){
775
+ var textWidth = ctx.measureText(string).width;
776
+ longest = (textWidth > longest) ? textWidth : longest;
777
+ });
778
+ return longest;
779
+ },
780
+ drawRoundedRectangle = helpers.drawRoundedRectangle = function(ctx,x,y,width,height,radius){
781
+ ctx.beginPath();
782
+ ctx.moveTo(x + radius, y);
783
+ ctx.lineTo(x + width - radius, y);
784
+ ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
785
+ ctx.lineTo(x + width, y + height - radius);
786
+ ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
787
+ ctx.lineTo(x + radius, y + height);
788
+ ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
789
+ ctx.lineTo(x, y + radius);
790
+ ctx.quadraticCurveTo(x, y, x + radius, y);
791
+ ctx.closePath();
792
+ };
793
+
794
+
795
+ //Store a reference to each instance - allowing us to globally resize chart instances on window resize.
796
+ //Destroy method on the chart will remove the instance of the chart from this reference.
797
+ Chart.instances = {};
798
+
799
+ Chart.Type = function(data,options,chart){
800
+ this.options = options;
801
+ this.chart = chart;
802
+ this.id = uid();
803
+ //Add the chart instance to the global namespace
804
+ Chart.instances[this.id] = this;
805
+
806
+ // Initialize is always called when a chart type is created
807
+ // By default it is a no op, but it should be extended
808
+ if (options.responsive){
809
+ this.resize();
810
+ }
811
+ this.initialize.call(this,data);
812
+ };
813
+
814
+ //Core methods that'll be a part of every chart type
815
+ extend(Chart.Type.prototype,{
816
+ initialize : function(){return this;},
817
+ clear : function(){
818
+ clear(this.chart);
819
+ return this;
820
+ },
821
+ stop : function(){
822
+ // Stops any current animation loop occuring
823
+ helpers.cancelAnimFrame.call(root, this.animationFrame);
824
+ return this;
825
+ },
826
+ resize : function(callback){
827
+ this.stop();
828
+ var canvas = this.chart.canvas,
829
+ newWidth = getMaximumWidth(this.chart.canvas),
830
+ newHeight = this.options.maintainAspectRatio ? newWidth / this.chart.aspectRatio : getMaximumHeight(this.chart.canvas);
831
+
832
+ canvas.width = this.chart.width = newWidth;
833
+ canvas.height = this.chart.height = newHeight;
834
+
835
+ retinaScale(this.chart);
836
+
837
+ if (typeof callback === "function"){
838
+ callback.apply(this, Array.prototype.slice.call(arguments, 1));
839
+ }
840
+ return this;
841
+ },
842
+ reflow : noop,
843
+ render : function(reflow){
844
+ if (reflow){
845
+ this.reflow();
846
+ }
847
+ if (this.options.animation && !reflow){
848
+ helpers.animationLoop(
849
+ this.draw,
850
+ this.options.animationSteps,
851
+ this.options.animationEasing,
852
+ this.options.onAnimationProgress,
853
+ this.options.onAnimationComplete,
854
+ this
855
+ );
856
+ }
857
+ else{
858
+ this.draw();
859
+ this.options.onAnimationComplete.call(this);
860
+ }
861
+ return this;
862
+ },
863
+ generateLegend : function(){
864
+ return template(this.options.legendTemplate,this);
865
+ },
866
+ destroy : function(){
867
+ this.clear();
868
+ unbindEvents(this, this.events);
869
+ delete Chart.instances[this.id];
870
+ },
871
+ showTooltip : function(ChartElements, forceRedraw){
872
+ // Only redraw the chart if we've actually changed what we're hovering on.
873
+ if (typeof this.activeElements === 'undefined') this.activeElements = [];
874
+
875
+ var isChanged = (function(Elements){
876
+ var changed = false;
877
+
878
+ if (Elements.length !== this.activeElements.length){
879
+ changed = true;
880
+ return changed;
881
+ }
882
+
883
+ each(Elements, function(element, index){
884
+ if (element !== this.activeElements[index]){
885
+ changed = true;
886
+ }
887
+ }, this);
888
+ return changed;
889
+ }).call(this, ChartElements);
890
+
891
+ if (!isChanged && !forceRedraw){
892
+ return;
893
+ }
894
+ else{
895
+ this.activeElements = ChartElements;
896
+ }
897
+ this.draw();
898
+ if (ChartElements.length > 0){
899
+ // If we have multiple datasets, show a MultiTooltip for all of the data points at that index
900
+ if (this.datasets && this.datasets.length > 1) {
901
+ var dataArray,
902
+ dataIndex;
903
+
904
+ for (var i = this.datasets.length - 1; i >= 0; i--) {
905
+ dataArray = this.datasets[i].points || this.datasets[i].bars || this.datasets[i].segments;
906
+ dataIndex = indexOf(dataArray, ChartElements[0]);
907
+ if (dataIndex !== -1){
908
+ break;
909
+ }
910
+ }
911
+ var tooltipLabels = [],
912
+ tooltipColors = [],
913
+ medianPosition = (function(index) {
914
+
915
+ // Get all the points at that particular index
916
+ var Elements = [],
917
+ dataCollection,
918
+ xPositions = [],
919
+ yPositions = [],
920
+ xMax,
921
+ yMax,
922
+ xMin,
923
+ yMin;
924
+ helpers.each(this.datasets, function(dataset){
925
+ dataCollection = dataset.points || dataset.bars || dataset.segments;
926
+ if (dataCollection[dataIndex] && dataCollection[dataIndex].hasValue()){
927
+ Elements.push(dataCollection[dataIndex]);
928
+ }
929
+ });
930
+
931
+ helpers.each(Elements, function(element) {
932
+ xPositions.push(element.x);
933
+ yPositions.push(element.y);
934
+
935
+
936
+ //Include any colour information about the element
937
+ tooltipLabels.push(helpers.template(this.options.multiTooltipTemplate, element));
938
+ tooltipColors.push({
939
+ fill: element._saved.fillColor || element.fillColor,
940
+ stroke: element._saved.strokeColor || element.strokeColor
941
+ });
942
+
943
+ }, this);
944
+
945
+ yMin = min(yPositions);
946
+ yMax = max(yPositions);
947
+
948
+ xMin = min(xPositions);
949
+ xMax = max(xPositions);
950
+
951
+ return {
952
+ x: (xMin > this.chart.width/2) ? xMin : xMax,
953
+ y: (yMin + yMax)/2
954
+ };
955
+ }).call(this, dataIndex);
956
+
957
+ new Chart.MultiTooltip({
958
+ x: medianPosition.x,
959
+ y: medianPosition.y,
960
+ xPadding: this.options.tooltipXPadding,
961
+ yPadding: this.options.tooltipYPadding,
962
+ xOffset: this.options.tooltipXOffset,
963
+ fillColor: this.options.tooltipFillColor,
964
+ textColor: this.options.tooltipFontColor,
965
+ fontFamily: this.options.tooltipFontFamily,
966
+ fontStyle: this.options.tooltipFontStyle,
967
+ fontSize: this.options.tooltipFontSize,
968
+ titleTextColor: this.options.tooltipTitleFontColor,
969
+ titleFontFamily: this.options.tooltipTitleFontFamily,
970
+ titleFontStyle: this.options.tooltipTitleFontStyle,
971
+ titleFontSize: this.options.tooltipTitleFontSize,
972
+ cornerRadius: this.options.tooltipCornerRadius,
973
+ labels: tooltipLabels,
974
+ legendColors: tooltipColors,
975
+ legendColorBackground : this.options.multiTooltipKeyBackground,
976
+ title: ChartElements[0].label,
977
+ chart: this.chart,
978
+ ctx: this.chart.ctx
979
+ }).draw();
980
+
981
+ } else {
982
+ each(ChartElements, function(Element) {
983
+ var tooltipPosition = Element.tooltipPosition();
984
+ new Chart.Tooltip({
985
+ x: Math.round(tooltipPosition.x),
986
+ y: Math.round(tooltipPosition.y),
987
+ xPadding: this.options.tooltipXPadding,
988
+ yPadding: this.options.tooltipYPadding,
989
+ fillColor: this.options.tooltipFillColor,
990
+ textColor: this.options.tooltipFontColor,
991
+ fontFamily: this.options.tooltipFontFamily,
992
+ fontStyle: this.options.tooltipFontStyle,
993
+ fontSize: this.options.tooltipFontSize,
994
+ caretHeight: this.options.tooltipCaretSize,
995
+ cornerRadius: this.options.tooltipCornerRadius,
996
+ text: template(this.options.tooltipTemplate, Element),
997
+ chart: this.chart
998
+ }).draw();
999
+ }, this);
1000
+ }
1001
+ }
1002
+ return this;
1003
+ },
1004
+ toBase64Image : function(){
1005
+ return this.chart.canvas.toDataURL.apply(this.chart.canvas, arguments);
1006
+ }
1007
+ });
1008
+
1009
+ Chart.Type.extend = function(extensions){
1010
+
1011
+ var parent = this;
1012
+
1013
+ var ChartType = function(){
1014
+ return parent.apply(this,arguments);
1015
+ };
1016
+
1017
+ //Copy the prototype object of the this class
1018
+ ChartType.prototype = clone(parent.prototype);
1019
+ //Now overwrite some of the properties in the base class with the new extensions
1020
+ extend(ChartType.prototype, extensions);
1021
+
1022
+ ChartType.extend = Chart.Type.extend;
1023
+
1024
+ if (extensions.name || parent.prototype.name){
1025
+
1026
+ var chartName = extensions.name || parent.prototype.name;
1027
+ //Assign any potential default values of the new chart type
1028
+
1029
+ //If none are defined, we'll use a clone of the chart type this is being extended from.
1030
+ //I.e. if we extend a line chart, we'll use the defaults from the line chart if our new chart
1031
+ //doesn't define some defaults of their own.
1032
+
1033
+ var baseDefaults = (Chart.defaults[parent.prototype.name]) ? clone(Chart.defaults[parent.prototype.name]) : {};
1034
+
1035
+ Chart.defaults[chartName] = extend(baseDefaults,extensions.defaults);
1036
+
1037
+ Chart.types[chartName] = ChartType;
1038
+
1039
+ //Register this new chart type in the Chart prototype
1040
+ Chart.prototype[chartName] = function(data,options){
1041
+ var config = merge(Chart.defaults.global, Chart.defaults[chartName], options || {});
1042
+ return new ChartType(data,config,this);
1043
+ };
1044
+ } else{
1045
+ warn("Name not provided for this chart, so it hasn't been registered");
1046
+ }
1047
+ return parent;
1048
+ };
1049
+
1050
+ Chart.Element = function(configuration){
1051
+ extend(this,configuration);
1052
+ this.initialize.apply(this,arguments);
1053
+ this.save();
1054
+ };
1055
+ extend(Chart.Element.prototype,{
1056
+ initialize : function(){},
1057
+ restore : function(props){
1058
+ if (!props){
1059
+ extend(this,this._saved);
1060
+ } else {
1061
+ each(props,function(key){
1062
+ this[key] = this._saved[key];
1063
+ },this);
1064
+ }
1065
+ return this;
1066
+ },
1067
+ save : function(){
1068
+ this._saved = clone(this);
1069
+ delete this._saved._saved;
1070
+ return this;
1071
+ },
1072
+ update : function(newProps){
1073
+ each(newProps,function(value,key){
1074
+ this._saved[key] = this[key];
1075
+ this[key] = value;
1076
+ },this);
1077
+ return this;
1078
+ },
1079
+ transition : function(props,ease){
1080
+ each(props,function(value,key){
1081
+ this[key] = ((value - this._saved[key]) * ease) + this._saved[key];
1082
+ },this);
1083
+ return this;
1084
+ },
1085
+ tooltipPosition : function(){
1086
+ return {
1087
+ x : this.x,
1088
+ y : this.y
1089
+ };
1090
+ },
1091
+ hasValue: function(){
1092
+ return isNumber(this.value);
1093
+ }
1094
+ });
1095
+
1096
+ Chart.Element.extend = inherits;
1097
+
1098
+
1099
+ Chart.Point = Chart.Element.extend({
1100
+ display: true,
1101
+ inRange: function(chartX,chartY){
1102
+ var hitDetectionRange = this.hitDetectionRadius + this.radius;
1103
+ return ((Math.pow(chartX-this.x, 2)+Math.pow(chartY-this.y, 2)) < Math.pow(hitDetectionRange,2));
1104
+ },
1105
+ draw : function(){
1106
+ if (this.display){
1107
+ var ctx = this.ctx;
1108
+ ctx.beginPath();
1109
+
1110
+ ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);
1111
+ ctx.closePath();
1112
+
1113
+ ctx.strokeStyle = this.strokeColor;
1114
+ ctx.lineWidth = this.strokeWidth;
1115
+
1116
+ ctx.fillStyle = this.fillColor;
1117
+
1118
+ ctx.fill();
1119
+ ctx.stroke();
1120
+ }
1121
+
1122
+
1123
+ //Quick debug for bezier curve splining
1124
+ //Highlights control points and the line between them.
1125
+ //Handy for dev - stripped in the min version.
1126
+
1127
+ // ctx.save();
1128
+ // ctx.fillStyle = "black";
1129
+ // ctx.strokeStyle = "black"
1130
+ // ctx.beginPath();
1131
+ // ctx.arc(this.controlPoints.inner.x,this.controlPoints.inner.y, 2, 0, Math.PI*2);
1132
+ // ctx.fill();
1133
+
1134
+ // ctx.beginPath();
1135
+ // ctx.arc(this.controlPoints.outer.x,this.controlPoints.outer.y, 2, 0, Math.PI*2);
1136
+ // ctx.fill();
1137
+
1138
+ // ctx.moveTo(this.controlPoints.inner.x,this.controlPoints.inner.y);
1139
+ // ctx.lineTo(this.x, this.y);
1140
+ // ctx.lineTo(this.controlPoints.outer.x,this.controlPoints.outer.y);
1141
+ // ctx.stroke();
1142
+
1143
+ // ctx.restore();
1144
+
1145
+
1146
+
1147
+ }
1148
+ });
1149
+
1150
+ Chart.Arc = Chart.Element.extend({
1151
+ inRange : function(chartX,chartY){
1152
+
1153
+ var pointRelativePosition = helpers.getAngleFromPoint(this, {
1154
+ x: chartX,
1155
+ y: chartY
1156
+ });
1157
+
1158
+ //Check if within the range of the open/close angle
1159
+ var betweenAngles = (pointRelativePosition.angle >= this.startAngle && pointRelativePosition.angle <= this.endAngle),
1160
+ withinRadius = (pointRelativePosition.distance >= this.innerRadius && pointRelativePosition.distance <= this.outerRadius);
1161
+
1162
+ return (betweenAngles && withinRadius);
1163
+ //Ensure within the outside of the arc centre, but inside arc outer
1164
+ },
1165
+ tooltipPosition : function(){
1166
+ var centreAngle = this.startAngle + ((this.endAngle - this.startAngle) / 2),
1167
+ rangeFromCentre = (this.outerRadius - this.innerRadius) / 2 + this.innerRadius;
1168
+ return {
1169
+ x : this.x + (Math.cos(centreAngle) * rangeFromCentre),
1170
+ y : this.y + (Math.sin(centreAngle) * rangeFromCentre)
1171
+ };
1172
+ },
1173
+ draw : function(animationPercent){
1174
+
1175
+ var easingDecimal = animationPercent || 1;
1176
+
1177
+ var ctx = this.ctx;
1178
+
1179
+ ctx.beginPath();
1180
+
1181
+ ctx.arc(this.x, this.y, this.outerRadius, this.startAngle, this.endAngle);
1182
+
1183
+ ctx.arc(this.x, this.y, this.innerRadius, this.endAngle, this.startAngle, true);
1184
+
1185
+ ctx.closePath();
1186
+ ctx.strokeStyle = this.strokeColor;
1187
+ ctx.lineWidth = this.strokeWidth;
1188
+
1189
+ ctx.fillStyle = this.fillColor;
1190
+
1191
+ ctx.fill();
1192
+ ctx.lineJoin = 'bevel';
1193
+
1194
+ if (this.showStroke){
1195
+ ctx.stroke();
1196
+ }
1197
+ }
1198
+ });
1199
+
1200
+ Chart.Rectangle = Chart.Element.extend({
1201
+ draw : function(){
1202
+ var ctx = this.ctx,
1203
+ halfWidth = this.width/2,
1204
+ leftX = this.x - halfWidth,
1205
+ rightX = this.x + halfWidth,
1206
+ top = this.base - (this.base - this.y),
1207
+ halfStroke = this.strokeWidth / 2;
1208
+
1209
+ // Canvas doesn't allow us to stroke inside the width so we can
1210
+ // adjust the sizes to fit if we're setting a stroke on the line
1211
+ if (this.showStroke){
1212
+ leftX += halfStroke;
1213
+ rightX -= halfStroke;
1214
+ top += halfStroke;
1215
+ }
1216
+
1217
+ ctx.beginPath();
1218
+
1219
+ ctx.fillStyle = this.fillColor;
1220
+ ctx.strokeStyle = this.strokeColor;
1221
+ ctx.lineWidth = this.strokeWidth;
1222
+
1223
+ // It'd be nice to keep this class totally generic to any rectangle
1224
+ // and simply specify which border to miss out.
1225
+ ctx.moveTo(leftX, this.base);
1226
+ ctx.lineTo(leftX, top);
1227
+ ctx.lineTo(rightX, top);
1228
+ ctx.lineTo(rightX, this.base);
1229
+ ctx.fill();
1230
+ if (this.showStroke){
1231
+ ctx.stroke();
1232
+ }
1233
+ },
1234
+ height : function(){
1235
+ return this.base - this.y;
1236
+ },
1237
+ inRange : function(chartX,chartY){
1238
+ return (chartX >= this.x - this.width/2 && chartX <= this.x + this.width/2) && (chartY >= this.y && chartY <= this.base);
1239
+ }
1240
+ });
1241
+
1242
+ Chart.Tooltip = Chart.Element.extend({
1243
+ draw : function(){
1244
+
1245
+ var ctx = this.chart.ctx;
1246
+
1247
+ ctx.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
1248
+
1249
+ this.xAlign = "center";
1250
+ this.yAlign = "above";
1251
+
1252
+ //Distance between the actual element.y position and the start of the tooltip caret
1253
+ var caretPadding = 2;
1254
+
1255
+ var tooltipWidth = ctx.measureText(this.text).width + 2*this.xPadding,
1256
+ tooltipRectHeight = this.fontSize + 2*this.yPadding,
1257
+ tooltipHeight = tooltipRectHeight + this.caretHeight + caretPadding;
1258
+
1259
+ if (this.x + tooltipWidth/2 >this.chart.width){
1260
+ this.xAlign = "left";
1261
+ } else if (this.x - tooltipWidth/2 < 0){
1262
+ this.xAlign = "right";
1263
+ }
1264
+
1265
+ if (this.y - tooltipHeight < 0){
1266
+ this.yAlign = "below";
1267
+ }
1268
+
1269
+
1270
+ var tooltipX = this.x - tooltipWidth/2,
1271
+ tooltipY = this.y - tooltipHeight;
1272
+
1273
+ ctx.fillStyle = this.fillColor;
1274
+
1275
+ switch(this.yAlign)
1276
+ {
1277
+ case "above":
1278
+ //Draw a caret above the x/y
1279
+ ctx.beginPath();
1280
+ ctx.moveTo(this.x,this.y - caretPadding);
1281
+ ctx.lineTo(this.x + this.caretHeight, this.y - (caretPadding + this.caretHeight));
1282
+ ctx.lineTo(this.x - this.caretHeight, this.y - (caretPadding + this.caretHeight));
1283
+ ctx.closePath();
1284
+ ctx.fill();
1285
+ break;
1286
+ case "below":
1287
+ tooltipY = this.y + caretPadding + this.caretHeight;
1288
+ //Draw a caret below the x/y
1289
+ ctx.beginPath();
1290
+ ctx.moveTo(this.x, this.y + caretPadding);
1291
+ ctx.lineTo(this.x + this.caretHeight, this.y + caretPadding + this.caretHeight);
1292
+ ctx.lineTo(this.x - this.caretHeight, this.y + caretPadding + this.caretHeight);
1293
+ ctx.closePath();
1294
+ ctx.fill();
1295
+ break;
1296
+ }
1297
+
1298
+ switch(this.xAlign)
1299
+ {
1300
+ case "left":
1301
+ tooltipX = this.x - tooltipWidth + (this.cornerRadius + this.caretHeight);
1302
+ break;
1303
+ case "right":
1304
+ tooltipX = this.x - (this.cornerRadius + this.caretHeight);
1305
+ break;
1306
+ }
1307
+
1308
+ drawRoundedRectangle(ctx,tooltipX,tooltipY,tooltipWidth,tooltipRectHeight,this.cornerRadius);
1309
+
1310
+ ctx.fill();
1311
+
1312
+ ctx.fillStyle = this.textColor;
1313
+ ctx.textAlign = "center";
1314
+ ctx.textBaseline = "middle";
1315
+ ctx.fillText(this.text, tooltipX + tooltipWidth/2, tooltipY + tooltipRectHeight/2);
1316
+ }
1317
+ });
1318
+
1319
+ Chart.MultiTooltip = Chart.Element.extend({
1320
+ initialize : function(){
1321
+ this.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
1322
+
1323
+ this.titleFont = fontString(this.titleFontSize,this.titleFontStyle,this.titleFontFamily);
1324
+
1325
+ this.height = (this.labels.length * this.fontSize) + ((this.labels.length-1) * (this.fontSize/2)) + (this.yPadding*2) + this.titleFontSize *1.5;
1326
+
1327
+ this.ctx.font = this.titleFont;
1328
+
1329
+ var titleWidth = this.ctx.measureText(this.title).width,
1330
+ //Label has a legend square as well so account for this.
1331
+ labelWidth = longestText(this.ctx,this.font,this.labels) + this.fontSize + 3,
1332
+ longestTextWidth = max([labelWidth,titleWidth]);
1333
+
1334
+ this.width = longestTextWidth + (this.xPadding*2);
1335
+
1336
+
1337
+ var halfHeight = this.height/2;
1338
+
1339
+ //Check to ensure the height will fit on the canvas
1340
+ //The three is to buffer form the very
1341
+ if (this.y - halfHeight < 0 ){
1342
+ this.y = halfHeight;
1343
+ } else if (this.y + halfHeight > this.chart.height){
1344
+ this.y = this.chart.height - halfHeight;
1345
+ }
1346
+
1347
+ //Decide whether to align left or right based on position on canvas
1348
+ if (this.x > this.chart.width/2){
1349
+ this.x -= this.xOffset + this.width;
1350
+ } else {
1351
+ this.x += this.xOffset;
1352
+ }
1353
+
1354
+
1355
+ },
1356
+ getLineHeight : function(index){
1357
+ var baseLineHeight = this.y - (this.height/2) + this.yPadding,
1358
+ afterTitleIndex = index-1;
1359
+
1360
+ //If the index is zero, we're getting the title
1361
+ if (index === 0){
1362
+ return baseLineHeight + this.titleFontSize/2;
1363
+ } else{
1364
+ return baseLineHeight + ((this.fontSize*1.5*afterTitleIndex) + this.fontSize/2) + this.titleFontSize * 1.5;
1365
+ }
1366
+
1367
+ },
1368
+ draw : function(){
1369
+ drawRoundedRectangle(this.ctx,this.x,this.y - this.height/2,this.width,this.height,this.cornerRadius);
1370
+ var ctx = this.ctx;
1371
+ ctx.fillStyle = this.fillColor;
1372
+ ctx.fill();
1373
+ ctx.closePath();
1374
+
1375
+ ctx.textAlign = "left";
1376
+ ctx.textBaseline = "middle";
1377
+ ctx.fillStyle = this.titleTextColor;
1378
+ ctx.font = this.titleFont;
1379
+
1380
+ ctx.fillText(this.title,this.x + this.xPadding, this.getLineHeight(0));
1381
+
1382
+ ctx.font = this.font;
1383
+ helpers.each(this.labels,function(label,index){
1384
+ ctx.fillStyle = this.textColor;
1385
+ ctx.fillText(label,this.x + this.xPadding + this.fontSize + 3, this.getLineHeight(index + 1));
1386
+
1387
+ //A bit gnarly, but clearing this rectangle breaks when using explorercanvas (clears whole canvas)
1388
+ //ctx.clearRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
1389
+ //Instead we'll make a white filled block to put the legendColour palette over.
1390
+
1391
+ ctx.fillStyle = this.legendColorBackground;
1392
+ ctx.fillRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
1393
+
1394
+ ctx.fillStyle = this.legendColors[index].fill;
1395
+ ctx.fillRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
1396
+
1397
+
1398
+ },this);
1399
+ }
1400
+ });
1401
+
1402
+ Chart.Scale = Chart.Element.extend({
1403
+ initialize : function(){
1404
+ this.fit();
1405
+ },
1406
+ buildYLabels : function(){
1407
+ this.yLabels = [];
1408
+
1409
+ var stepDecimalPlaces = getDecimalPlaces(this.stepValue);
1410
+
1411
+ for (var i=0; i<=this.steps; i++){
1412
+ this.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));
1413
+ }
1414
+ this.yLabelWidth = (this.display && this.showLabels) ? longestText(this.ctx,this.font,this.yLabels) : 0;
1415
+ },
1416
+ addXLabel : function(label){
1417
+ this.xLabels.push(label);
1418
+ this.valuesCount++;
1419
+ this.fit();
1420
+ },
1421
+ removeXLabel : function(){
1422
+ this.xLabels.shift();
1423
+ this.valuesCount--;
1424
+ this.fit();
1425
+ },
1426
+ // Fitting loop to rotate x Labels and figure out what fits there, and also calculate how many Y steps to use
1427
+ fit: function(){
1428
+ // First we need the width of the yLabels, assuming the xLabels aren't rotated
1429
+
1430
+ // To do that we need the base line at the top and base of the chart, assuming there is no x label rotation
1431
+ this.startPoint = (this.display) ? this.fontSize : 0;
1432
+ this.endPoint = (this.display) ? this.height - (this.fontSize * 1.5) - 5 : this.height; // -5 to pad labels
1433
+
1434
+ // Apply padding settings to the start and end point.
1435
+ this.startPoint += this.padding;
1436
+ this.endPoint -= this.padding;
1437
+
1438
+ // Cache the starting height, so can determine if we need to recalculate the scale yAxis
1439
+ var cachedHeight = this.endPoint - this.startPoint,
1440
+ cachedYLabelWidth;
1441
+
1442
+ // Build the current yLabels so we have an idea of what size they'll be to start
1443
+ /*
1444
+ * This sets what is returned from calculateScaleRange as static properties of this class:
1445
+ *
1446
+ this.steps;
1447
+ this.stepValue;
1448
+ this.min;
1449
+ this.max;
1450
+ *
1451
+ */
1452
+ this.calculateYRange(cachedHeight);
1453
+
1454
+ // With these properties set we can now build the array of yLabels
1455
+ // and also the width of the largest yLabel
1456
+ this.buildYLabels();
1457
+
1458
+ this.calculateXLabelRotation();
1459
+
1460
+ while((cachedHeight > this.endPoint - this.startPoint)){
1461
+ cachedHeight = this.endPoint - this.startPoint;
1462
+ cachedYLabelWidth = this.yLabelWidth;
1463
+
1464
+ this.calculateYRange(cachedHeight);
1465
+ this.buildYLabels();
1466
+
1467
+ // Only go through the xLabel loop again if the yLabel width has changed
1468
+ if (cachedYLabelWidth < this.yLabelWidth){
1469
+ this.calculateXLabelRotation();
1470
+ }
1471
+ }
1472
+
1473
+ },
1474
+ calculateXLabelRotation : function(){
1475
+ //Get the width of each grid by calculating the difference
1476
+ //between x offsets between 0 and 1.
1477
+
1478
+ this.ctx.font = this.font;
1479
+
1480
+ var firstWidth = this.ctx.measureText(this.xLabels[0]).width,
1481
+ lastWidth = this.ctx.measureText(this.xLabels[this.xLabels.length - 1]).width,
1482
+ firstRotated,
1483
+ lastRotated;
1484
+
1485
+
1486
+ this.xScalePaddingRight = lastWidth/2 + 3;
1487
+ this.xScalePaddingLeft = (firstWidth/2 > this.yLabelWidth + 10) ? firstWidth/2 : this.yLabelWidth + 10;
1488
+
1489
+ this.xLabelRotation = 0;
1490
+ if (this.display){
1491
+ var originalLabelWidth = longestText(this.ctx,this.font,this.xLabels),
1492
+ cosRotation,
1493
+ firstRotatedWidth;
1494
+ this.xLabelWidth = originalLabelWidth;
1495
+ //Allow 3 pixels x2 padding either side for label readability
1496
+ var xGridWidth = Math.floor(this.calculateX(1) - this.calculateX(0)) - 6;
1497
+
1498
+ //Max label rotate should be 90 - also act as a loop counter
1499
+ while ((this.xLabelWidth > xGridWidth && this.xLabelRotation === 0) || (this.xLabelWidth > xGridWidth && this.xLabelRotation <= 90 && this.xLabelRotation > 0)){
1500
+ cosRotation = Math.cos(toRadians(this.xLabelRotation));
1501
+
1502
+ firstRotated = cosRotation * firstWidth;
1503
+ lastRotated = cosRotation * lastWidth;
1504
+
1505
+ // We're right aligning the text now.
1506
+ if (firstRotated + this.fontSize / 2 > this.yLabelWidth + 8){
1507
+ this.xScalePaddingLeft = firstRotated + this.fontSize / 2;
1508
+ }
1509
+ this.xScalePaddingRight = this.fontSize/2;
1510
+
1511
+
1512
+ this.xLabelRotation++;
1513
+ this.xLabelWidth = cosRotation * originalLabelWidth;
1514
+
1515
+ }
1516
+ if (this.xLabelRotation > 0){
1517
+ this.endPoint -= Math.sin(toRadians(this.xLabelRotation))*originalLabelWidth + 3;
1518
+ }
1519
+ }
1520
+ else{
1521
+ this.xLabelWidth = 0;
1522
+ this.xScalePaddingRight = this.padding;
1523
+ this.xScalePaddingLeft = this.padding;
1524
+ }
1525
+
1526
+ },
1527
+ // Needs to be overidden in each Chart type
1528
+ // Otherwise we need to pass all the data into the scale class
1529
+ calculateYRange: noop,
1530
+ drawingArea: function(){
1531
+ return this.startPoint - this.endPoint;
1532
+ },
1533
+ calculateY : function(value){
1534
+ var scalingFactor = this.drawingArea() / (this.min - this.max);
1535
+ return this.endPoint - (scalingFactor * (value - this.min));
1536
+ },
1537
+ calculateX : function(index){
1538
+ var isRotated = (this.xLabelRotation > 0),
1539
+ // innerWidth = (this.offsetGridLines) ? this.width - offsetLeft - this.padding : this.width - (offsetLeft + halfLabelWidth * 2) - this.padding,
1540
+ innerWidth = this.width - (this.xScalePaddingLeft + this.xScalePaddingRight),
1541
+ valueWidth = innerWidth/(this.valuesCount - ((this.offsetGridLines) ? 0 : 1)),
1542
+ valueOffset = (valueWidth * index) + this.xScalePaddingLeft;
1543
+
1544
+ if (this.offsetGridLines){
1545
+ valueOffset += (valueWidth/2);
1546
+ }
1547
+
1548
+ return Math.round(valueOffset);
1549
+ },
1550
+ update : function(newProps){
1551
+ helpers.extend(this, newProps);
1552
+ this.fit();
1553
+ },
1554
+ draw : function(){
1555
+ var ctx = this.ctx,
1556
+ yLabelGap = (this.endPoint - this.startPoint) / this.steps,
1557
+ xStart = Math.round(this.xScalePaddingLeft);
1558
+ if (this.display){
1559
+ ctx.fillStyle = this.textColor;
1560
+ ctx.font = this.font;
1561
+ each(this.yLabels,function(labelString,index){
1562
+ var yLabelCenter = this.endPoint - (yLabelGap * index),
1563
+ linePositionY = Math.round(yLabelCenter);
1564
+
1565
+ ctx.textAlign = "right";
1566
+ ctx.textBaseline = "middle";
1567
+ if (this.showLabels){
1568
+ ctx.fillText(labelString,xStart - 10,yLabelCenter);
1569
+ }
1570
+ ctx.beginPath();
1571
+ if (index > 0){
1572
+ // This is a grid line in the centre, so drop that
1573
+ ctx.lineWidth = this.gridLineWidth;
1574
+ ctx.strokeStyle = this.gridLineColor;
1575
+ } else {
1576
+ // This is the first line on the scale
1577
+ ctx.lineWidth = this.lineWidth;
1578
+ ctx.strokeStyle = this.lineColor;
1579
+ }
1580
+
1581
+ linePositionY += helpers.aliasPixel(ctx.lineWidth);
1582
+
1583
+ ctx.moveTo(xStart, linePositionY);
1584
+ ctx.lineTo(this.width, linePositionY);
1585
+ ctx.stroke();
1586
+ ctx.closePath();
1587
+
1588
+ ctx.lineWidth = this.lineWidth;
1589
+ ctx.strokeStyle = this.lineColor;
1590
+ ctx.beginPath();
1591
+ ctx.moveTo(xStart - 5, linePositionY);
1592
+ ctx.lineTo(xStart, linePositionY);
1593
+ ctx.stroke();
1594
+ ctx.closePath();
1595
+
1596
+ },this);
1597
+
1598
+ each(this.xLabels,function(label,index){
1599
+ var xPos = this.calculateX(index) + aliasPixel(this.lineWidth),
1600
+ // Check to see if line/bar here and decide where to place the line
1601
+ linePos = this.calculateX(index - (this.offsetGridLines ? 0.5 : 0)) + aliasPixel(this.lineWidth),
1602
+ isRotated = (this.xLabelRotation > 0);
1603
+
1604
+ ctx.beginPath();
1605
+
1606
+ if (index > 0){
1607
+ // This is a grid line in the centre, so drop that
1608
+ ctx.lineWidth = this.gridLineWidth;
1609
+ ctx.strokeStyle = this.gridLineColor;
1610
+ } else {
1611
+ // This is the first line on the scale
1612
+ ctx.lineWidth = this.lineWidth;
1613
+ ctx.strokeStyle = this.lineColor;
1614
+ }
1615
+ ctx.moveTo(linePos,this.endPoint);
1616
+ ctx.lineTo(linePos,this.startPoint - 3);
1617
+ ctx.stroke();
1618
+ ctx.closePath();
1619
+
1620
+
1621
+ ctx.lineWidth = this.lineWidth;
1622
+ ctx.strokeStyle = this.lineColor;
1623
+
1624
+
1625
+ // Small lines at the bottom of the base grid line
1626
+ ctx.beginPath();
1627
+ ctx.moveTo(linePos,this.endPoint);
1628
+ ctx.lineTo(linePos,this.endPoint + 5);
1629
+ ctx.stroke();
1630
+ ctx.closePath();
1631
+
1632
+ ctx.save();
1633
+ ctx.translate(xPos,(isRotated) ? this.endPoint + 12 : this.endPoint + 8);
1634
+ ctx.rotate(toRadians(this.xLabelRotation)*-1);
1635
+ ctx.font = this.font;
1636
+ ctx.textAlign = (isRotated) ? "right" : "center";
1637
+ ctx.textBaseline = (isRotated) ? "middle" : "top";
1638
+ ctx.fillText(label, 0, 0);
1639
+ ctx.restore();
1640
+ },this);
1641
+
1642
+ }
1643
+ }
1644
+
1645
+ });
1646
+
1647
+ Chart.RadialScale = Chart.Element.extend({
1648
+ initialize: function(){
1649
+ this.size = min([this.height, this.width]);
1650
+ this.drawingArea = (this.display) ? (this.size/2) - (this.fontSize/2 + this.backdropPaddingY) : (this.size/2);
1651
+ },
1652
+ calculateCenterOffset: function(value){
1653
+ // Take into account half font size + the yPadding of the top value
1654
+ var scalingFactor = this.drawingArea / (this.max - this.min);
1655
+
1656
+ return (value - this.min) * scalingFactor;
1657
+ },
1658
+ update : function(){
1659
+ if (!this.lineArc){
1660
+ this.setScaleSize();
1661
+ } else {
1662
+ this.drawingArea = (this.display) ? (this.size/2) - (this.fontSize/2 + this.backdropPaddingY) : (this.size/2);
1663
+ }
1664
+ this.buildYLabels();
1665
+ },
1666
+ buildYLabels: function(){
1667
+ this.yLabels = [];
1668
+
1669
+ var stepDecimalPlaces = getDecimalPlaces(this.stepValue);
1670
+
1671
+ for (var i=0; i<=this.steps; i++){
1672
+ this.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));
1673
+ }
1674
+ },
1675
+ getCircumference : function(){
1676
+ return ((Math.PI*2) / this.valuesCount);
1677
+ },
1678
+ setScaleSize: function(){
1679
+ /*
1680
+ * Right, this is really confusing and there is a lot of maths going on here
1681
+ * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
1682
+ *
1683
+ * Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif
1684
+ *
1685
+ * Solution:
1686
+ *
1687
+ * We assume the radius of the polygon is half the size of the canvas at first
1688
+ * at each index we check if the text overlaps.
1689
+ *
1690
+ * Where it does, we store that angle and that index.
1691
+ *
1692
+ * After finding the largest index and angle we calculate how much we need to remove
1693
+ * from the shape radius to move the point inwards by that x.
1694
+ *
1695
+ * We average the left and right distances to get the maximum shape radius that can fit in the box
1696
+ * along with labels.
1697
+ *
1698
+ * Once we have that, we can find the centre point for the chart, by taking the x text protrusion
1699
+ * on each side, removing that from the size, halving it and adding the left x protrusion width.
1700
+ *
1701
+ * This will mean we have a shape fitted to the canvas, as large as it can be with the labels
1702
+ * and position it in the most space efficient manner
1703
+ *
1704
+ * https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif
1705
+ */
1706
+
1707
+
1708
+ // Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.
1709
+ // Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points
1710
+ var largestPossibleRadius = min([(this.height/2 - this.pointLabelFontSize - 5), this.width/2]),
1711
+ pointPosition,
1712
+ i,
1713
+ textWidth,
1714
+ halfTextWidth,
1715
+ furthestRight = this.width,
1716
+ furthestRightIndex,
1717
+ furthestRightAngle,
1718
+ furthestLeft = 0,
1719
+ furthestLeftIndex,
1720
+ furthestLeftAngle,
1721
+ xProtrusionLeft,
1722
+ xProtrusionRight,
1723
+ radiusReductionRight,
1724
+ radiusReductionLeft,
1725
+ maxWidthRadius;
1726
+ this.ctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);
1727
+ for (i=0;i<this.valuesCount;i++){
1728
+ // 5px to space the text slightly out - similar to what we do in the draw function.
1729
+ pointPosition = this.getPointPosition(i, largestPossibleRadius);
1730
+ textWidth = this.ctx.measureText(template(this.templateString, { value: this.labels[i] })).width + 5;
1731
+ if (i === 0 || i === this.valuesCount/2){
1732
+ // If we're at index zero, or exactly the middle, we're at exactly the top/bottom
1733
+ // of the radar chart, so text will be aligned centrally, so we'll half it and compare
1734
+ // w/left and right text sizes
1735
+ halfTextWidth = textWidth/2;
1736
+ if (pointPosition.x + halfTextWidth > furthestRight) {
1737
+ furthestRight = pointPosition.x + halfTextWidth;
1738
+ furthestRightIndex = i;
1739
+ }
1740
+ if (pointPosition.x - halfTextWidth < furthestLeft) {
1741
+ furthestLeft = pointPosition.x - halfTextWidth;
1742
+ furthestLeftIndex = i;
1743
+ }
1744
+ }
1745
+ else if (i < this.valuesCount/2) {
1746
+ // Less than half the values means we'll left align the text
1747
+ if (pointPosition.x + textWidth > furthestRight) {
1748
+ furthestRight = pointPosition.x + textWidth;
1749
+ furthestRightIndex = i;
1750
+ }
1751
+ }
1752
+ else if (i > this.valuesCount/2){
1753
+ // More than half the values means we'll right align the text
1754
+ if (pointPosition.x - textWidth < furthestLeft) {
1755
+ furthestLeft = pointPosition.x - textWidth;
1756
+ furthestLeftIndex = i;
1757
+ }
1758
+ }
1759
+ }
1760
+
1761
+ xProtrusionLeft = furthestLeft;
1762
+
1763
+ xProtrusionRight = Math.ceil(furthestRight - this.width);
1764
+
1765
+ furthestRightAngle = this.getIndexAngle(furthestRightIndex);
1766
+
1767
+ furthestLeftAngle = this.getIndexAngle(furthestLeftIndex);
1768
+
1769
+ radiusReductionRight = xProtrusionRight / Math.sin(furthestRightAngle + Math.PI/2);
1770
+
1771
+ radiusReductionLeft = xProtrusionLeft / Math.sin(furthestLeftAngle + Math.PI/2);
1772
+
1773
+ // Ensure we actually need to reduce the size of the chart
1774
+ radiusReductionRight = (isNumber(radiusReductionRight)) ? radiusReductionRight : 0;
1775
+ radiusReductionLeft = (isNumber(radiusReductionLeft)) ? radiusReductionLeft : 0;
1776
+
1777
+ this.drawingArea = largestPossibleRadius - (radiusReductionLeft + radiusReductionRight)/2;
1778
+
1779
+ //this.drawingArea = min([maxWidthRadius, (this.height - (2 * (this.pointLabelFontSize + 5)))/2])
1780
+ this.setCenterPoint(radiusReductionLeft, radiusReductionRight);
1781
+
1782
+ },
1783
+ setCenterPoint: function(leftMovement, rightMovement){
1784
+
1785
+ var maxRight = this.width - rightMovement - this.drawingArea,
1786
+ maxLeft = leftMovement + this.drawingArea;
1787
+
1788
+ this.xCenter = (maxLeft + maxRight)/2;
1789
+ // Always vertically in the centre as the text height doesn't change
1790
+ this.yCenter = (this.height/2);
1791
+ },
1792
+
1793
+ getIndexAngle : function(index){
1794
+ var angleMultiplier = (Math.PI * 2) / this.valuesCount;
1795
+ // Start from the top instead of right, so remove a quarter of the circle
1796
+
1797
+ return index * angleMultiplier - (Math.PI/2);
1798
+ },
1799
+ getPointPosition : function(index, distanceFromCenter){
1800
+ var thisAngle = this.getIndexAngle(index);
1801
+ return {
1802
+ x : (Math.cos(thisAngle) * distanceFromCenter) + this.xCenter,
1803
+ y : (Math.sin(thisAngle) * distanceFromCenter) + this.yCenter
1804
+ };
1805
+ },
1806
+ draw: function(){
1807
+ if (this.display){
1808
+ var ctx = this.ctx;
1809
+ each(this.yLabels, function(label, index){
1810
+ // Don't draw a centre value
1811
+ if (index > 0){
1812
+ var yCenterOffset = index * (this.drawingArea/this.steps),
1813
+ yHeight = this.yCenter - yCenterOffset,
1814
+ pointPosition;
1815
+
1816
+ // Draw circular lines around the scale
1817
+ if (this.lineWidth > 0){
1818
+ ctx.strokeStyle = this.lineColor;
1819
+ ctx.lineWidth = this.lineWidth;
1820
+
1821
+ if(this.lineArc){
1822
+ ctx.beginPath();
1823
+ ctx.arc(this.xCenter, this.yCenter, yCenterOffset, 0, Math.PI*2);
1824
+ ctx.closePath();
1825
+ ctx.stroke();
1826
+ } else{
1827
+ ctx.beginPath();
1828
+ for (var i=0;i<this.valuesCount;i++)
1829
+ {
1830
+ pointPosition = this.getPointPosition(i, this.calculateCenterOffset(this.min + (index * this.stepValue)));
1831
+ if (i === 0){
1832
+ ctx.moveTo(pointPosition.x, pointPosition.y);
1833
+ } else {
1834
+ ctx.lineTo(pointPosition.x, pointPosition.y);
1835
+ }
1836
+ }
1837
+ ctx.closePath();
1838
+ ctx.stroke();
1839
+ }
1840
+ }
1841
+ if(this.showLabels){
1842
+ ctx.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
1843
+ if (this.showLabelBackdrop){
1844
+ var labelWidth = ctx.measureText(label).width;
1845
+ ctx.fillStyle = this.backdropColor;
1846
+ ctx.fillRect(
1847
+ this.xCenter - labelWidth/2 - this.backdropPaddingX,
1848
+ yHeight - this.fontSize/2 - this.backdropPaddingY,
1849
+ labelWidth + this.backdropPaddingX*2,
1850
+ this.fontSize + this.backdropPaddingY*2
1851
+ );
1852
+ }
1853
+ ctx.textAlign = 'center';
1854
+ ctx.textBaseline = "middle";
1855
+ ctx.fillStyle = this.fontColor;
1856
+ ctx.fillText(label, this.xCenter, yHeight);
1857
+ }
1858
+ }
1859
+ }, this);
1860
+
1861
+ if (!this.lineArc){
1862
+ ctx.lineWidth = this.angleLineWidth;
1863
+ ctx.strokeStyle = this.angleLineColor;
1864
+ for (var i = this.valuesCount - 1; i >= 0; i--) {
1865
+ if (this.angleLineWidth > 0){
1866
+ var outerPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max));
1867
+ ctx.beginPath();
1868
+ ctx.moveTo(this.xCenter, this.yCenter);
1869
+ ctx.lineTo(outerPosition.x, outerPosition.y);
1870
+ ctx.stroke();
1871
+ ctx.closePath();
1872
+ }
1873
+ // Extra 3px out for some label spacing
1874
+ var pointLabelPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max) + 5);
1875
+ ctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);
1876
+ ctx.fillStyle = this.pointLabelFontColor;
1877
+
1878
+ var labelsCount = this.labels.length,
1879
+ halfLabelsCount = this.labels.length/2,
1880
+ quarterLabelsCount = halfLabelsCount/2,
1881
+ upperHalf = (i < quarterLabelsCount || i > labelsCount - quarterLabelsCount),
1882
+ exactQuarter = (i === quarterLabelsCount || i === labelsCount - quarterLabelsCount);
1883
+ if (i === 0){
1884
+ ctx.textAlign = 'center';
1885
+ } else if(i === halfLabelsCount){
1886
+ ctx.textAlign = 'center';
1887
+ } else if (i < halfLabelsCount){
1888
+ ctx.textAlign = 'left';
1889
+ } else {
1890
+ ctx.textAlign = 'right';
1891
+ }
1892
+
1893
+ // Set the correct text baseline based on outer positioning
1894
+ if (exactQuarter){
1895
+ ctx.textBaseline = 'middle';
1896
+ } else if (upperHalf){
1897
+ ctx.textBaseline = 'bottom';
1898
+ } else {
1899
+ ctx.textBaseline = 'top';
1900
+ }
1901
+
1902
+ ctx.fillText(this.labels[i], pointLabelPosition.x, pointLabelPosition.y);
1903
+ }
1904
+ }
1905
+ }
1906
+ }
1907
+ });
1908
+
1909
+ // Attach global event to resize each chart instance when the browser resizes
1910
+ helpers.addEvent(window, "resize", (function(){
1911
+ // Basic debounce of resize function so it doesn't hurt performance when resizing browser.
1912
+ var timeout;
1913
+ return function(){
1914
+ clearTimeout(timeout);
1915
+ timeout = setTimeout(function(){
1916
+ each(Chart.instances,function(instance){
1917
+ // If the responsive flag is set in the chart instance config
1918
+ // Cascade the resize event down to the chart.
1919
+ if (instance.options.responsive){
1920
+ instance.resize(instance.render, true);
1921
+ }
1922
+ });
1923
+ }, 50);
1924
+ };
1925
+ })());
1926
+
1927
+
1928
+ if (amd) {
1929
+ define(function(){
1930
+ return Chart;
1931
+ });
1932
+ } else if (typeof module === 'object' && module.exports) {
1933
+ module.exports = Chart;
1934
+ }
1935
+
1936
+ root.Chart = Chart;
1937
+
1938
+ Chart.noConflict = function(){
1939
+ root.Chart = previous;
1940
+ return Chart;
1941
+ };
1942
+
1943
+ }).call(this);
1944
+
1945
+ (function(){
1946
+ "use strict";
1947
+
1948
+ var root = this,
1949
+ Chart = root.Chart,
1950
+ helpers = Chart.helpers;
1951
+
1952
+
1953
+ var defaultConfig = {
1954
+ //Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
1955
+ scaleBeginAtZero : true,
1956
+
1957
+ //Boolean - Whether grid lines are shown across the chart
1958
+ scaleShowGridLines : true,
1959
+
1960
+ //String - Colour of the grid lines
1961
+ scaleGridLineColor : "rgba(0,0,0,.05)",
1962
+
1963
+ //Number - Width of the grid lines
1964
+ scaleGridLineWidth : 1,
1965
+
1966
+ //Boolean - If there is a stroke on each bar
1967
+ barShowStroke : true,
1968
+
1969
+ //Number - Pixel width of the bar stroke
1970
+ barStrokeWidth : 2,
1971
+
1972
+ //Number - Spacing between each of the X value sets
1973
+ barValueSpacing : 5,
1974
+
1975
+ //Number - Spacing between data sets within X values
1976
+ barDatasetSpacing : 1,
1977
+
1978
+ //String - A legend template
1979
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
1980
+
1981
+ };
1982
+
1983
+
1984
+ Chart.Type.extend({
1985
+ name: "Bar",
1986
+ defaults : defaultConfig,
1987
+ initialize: function(data){
1988
+
1989
+ //Expose options as a scope variable here so we can access it in the ScaleClass
1990
+ var options = this.options;
1991
+
1992
+ this.ScaleClass = Chart.Scale.extend({
1993
+ offsetGridLines : true,
1994
+ calculateBarX : function(datasetCount, datasetIndex, barIndex){
1995
+ //Reusable method for calculating the xPosition of a given bar based on datasetIndex & width of the bar
1996
+ var xWidth = this.calculateBaseWidth(),
1997
+ xAbsolute = this.calculateX(barIndex) - (xWidth/2),
1998
+ barWidth = this.calculateBarWidth(datasetCount);
1999
+
2000
+ return xAbsolute + (barWidth * datasetIndex) + (datasetIndex * options.barDatasetSpacing) + barWidth/2;
2001
+ },
2002
+ calculateBaseWidth : function(){
2003
+ return (this.calculateX(1) - this.calculateX(0)) - (2*options.barValueSpacing);
2004
+ },
2005
+ calculateBarWidth : function(datasetCount){
2006
+ //The padding between datasets is to the right of each bar, providing that there are more than 1 dataset
2007
+ var baseWidth = this.calculateBaseWidth() - ((datasetCount - 1) * options.barDatasetSpacing);
2008
+
2009
+ return (baseWidth / datasetCount);
2010
+ }
2011
+ });
2012
+
2013
+ this.datasets = [];
2014
+
2015
+ //Set up tooltip events on the chart
2016
+ if (this.options.showTooltips){
2017
+ helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
2018
+ var activeBars = (evt.type !== 'mouseout') ? this.getBarsAtEvent(evt) : [];
2019
+
2020
+ this.eachBars(function(bar){
2021
+ bar.restore(['fillColor', 'strokeColor']);
2022
+ });
2023
+ helpers.each(activeBars, function(activeBar){
2024
+ activeBar.fillColor = activeBar.highlightFill;
2025
+ activeBar.strokeColor = activeBar.highlightStroke;
2026
+ });
2027
+ this.showTooltip(activeBars);
2028
+ });
2029
+ }
2030
+
2031
+ //Declare the extension of the default point, to cater for the options passed in to the constructor
2032
+ this.BarClass = Chart.Rectangle.extend({
2033
+ strokeWidth : this.options.barStrokeWidth,
2034
+ showStroke : this.options.barShowStroke,
2035
+ ctx : this.chart.ctx
2036
+ });
2037
+
2038
+ //Iterate through each of the datasets, and build this into a property of the chart
2039
+ helpers.each(data.datasets,function(dataset,datasetIndex){
2040
+
2041
+ var datasetObject = {
2042
+ label : dataset.label || null,
2043
+ fillColor : dataset.fillColor,
2044
+ strokeColor : dataset.strokeColor,
2045
+ bars : []
2046
+ };
2047
+
2048
+ this.datasets.push(datasetObject);
2049
+
2050
+ helpers.each(dataset.data,function(dataPoint,index){
2051
+ //Add a new point for each piece of data, passing any required data to draw.
2052
+
2053
+ // Modified for error bars, fillColors and strokeColors by Chris Seaton
2054
+
2055
+ var datasetProperties = {
2056
+ value : dataPoint,
2057
+ label : data.labels[index],
2058
+ datasetLabel: dataset.label,
2059
+ strokeColor : dataset.strokeColor,
2060
+ fillColor : dataset.fillColor
2061
+ };
2062
+
2063
+ if (datasetProperties.fillColor === undefined && dataset.fillColors !== undefined) {
2064
+ datasetProperties.fillColor = dataset.fillColors[index];
2065
+ }
2066
+
2067
+ if (datasetProperties.strokeColor === undefined && dataset.strokeColors !== undefined) {
2068
+ datasetProperties.strokeColor = dataset.strokeColors[index];
2069
+ }
2070
+
2071
+ if (dataset.error != undefined && dataset.error[index] != undefined) {
2072
+ datasetProperties.error = dataset.error[index]
2073
+ }
2074
+
2075
+ datasetProperties.highlightFill = dataset.highlightFill || datasetProperties.fillColor,
2076
+ datasetProperties.highlightStroke = dataset.highlightStroke || datasetProperties.strokeColor
2077
+
2078
+ datasetObject.bars.push(new this.BarClass(datasetProperties));
2079
+ },this);
2080
+
2081
+ },this);
2082
+
2083
+ this.buildScale(data.labels);
2084
+
2085
+ this.BarClass.prototype.base = this.scale.endPoint;
2086
+
2087
+ this.eachBars(function(bar, index, datasetIndex){
2088
+ helpers.extend(bar, {
2089
+ width : this.scale.calculateBarWidth(this.datasets.length),
2090
+ x: this.scale.calculateBarX(this.datasets.length, datasetIndex, index),
2091
+ y: this.scale.endPoint
2092
+ });
2093
+ bar.save();
2094
+ }, this);
2095
+
2096
+ this.render();
2097
+ },
2098
+ update : function(){
2099
+ this.scale.update();
2100
+ // Reset any highlight colours before updating.
2101
+ helpers.each(this.activeElements, function(activeElement){
2102
+ activeElement.restore(['fillColor', 'strokeColor']);
2103
+ });
2104
+
2105
+ this.eachBars(function(bar){
2106
+ bar.save();
2107
+ });
2108
+ this.render();
2109
+ },
2110
+ eachBars : function(callback){
2111
+ helpers.each(this.datasets,function(dataset, datasetIndex){
2112
+ helpers.each(dataset.bars, callback, this, datasetIndex);
2113
+ },this);
2114
+ },
2115
+ getBarsAtEvent : function(e){
2116
+ var barsArray = [],
2117
+ eventPosition = helpers.getRelativePosition(e),
2118
+ datasetIterator = function(dataset){
2119
+ barsArray.push(dataset.bars[barIndex]);
2120
+ },
2121
+ barIndex;
2122
+
2123
+ for (var datasetIndex = 0; datasetIndex < this.datasets.length; datasetIndex++) {
2124
+ for (barIndex = 0; barIndex < this.datasets[datasetIndex].bars.length; barIndex++) {
2125
+ if (this.datasets[datasetIndex].bars[barIndex].inRange(eventPosition.x,eventPosition.y)){
2126
+ helpers.each(this.datasets, datasetIterator);
2127
+ return barsArray;
2128
+ }
2129
+ }
2130
+ }
2131
+
2132
+ return barsArray;
2133
+ },
2134
+ buildScale : function(labels){
2135
+ var self = this;
2136
+
2137
+ var dataTotal = function(){
2138
+ var values = [];
2139
+ self.eachBars(function(bar){
2140
+ values.push(bar.value);
2141
+ });
2142
+ return values;
2143
+ };
2144
+
2145
+ var scaleOptions = {
2146
+ templateString : this.options.scaleLabel,
2147
+ height : this.chart.height,
2148
+ width : this.chart.width,
2149
+ ctx : this.chart.ctx,
2150
+ textColor : this.options.scaleFontColor,
2151
+ fontSize : this.options.scaleFontSize,
2152
+ fontStyle : this.options.scaleFontStyle,
2153
+ fontFamily : this.options.scaleFontFamily,
2154
+ valuesCount : labels.length,
2155
+ beginAtZero : this.options.scaleBeginAtZero,
2156
+ integersOnly : this.options.scaleIntegersOnly,
2157
+ calculateYRange: function(currentHeight){
2158
+ var updatedRanges = helpers.calculateScaleRange(
2159
+ dataTotal(),
2160
+ currentHeight,
2161
+ this.fontSize,
2162
+ this.beginAtZero,
2163
+ this.integersOnly
2164
+ );
2165
+ helpers.extend(this, updatedRanges);
2166
+ },
2167
+ xLabels : labels,
2168
+ font : helpers.fontString(this.options.scaleFontSize, this.options.scaleFontStyle, this.options.scaleFontFamily),
2169
+ lineWidth : this.options.scaleLineWidth,
2170
+ lineColor : this.options.scaleLineColor,
2171
+ gridLineWidth : (this.options.scaleShowGridLines) ? this.options.scaleGridLineWidth : 0,
2172
+ gridLineColor : (this.options.scaleShowGridLines) ? this.options.scaleGridLineColor : "rgba(0,0,0,0)",
2173
+ padding : (this.options.showScale) ? 0 : (this.options.barShowStroke) ? this.options.barStrokeWidth : 0,
2174
+ showLabels : this.options.scaleShowLabels,
2175
+ display : this.options.showScale
2176
+ };
2177
+
2178
+ if (this.options.scaleOverride){
2179
+ helpers.extend(scaleOptions, {
2180
+ calculateYRange: helpers.noop,
2181
+ steps: this.options.scaleSteps,
2182
+ stepValue: this.options.scaleStepWidth,
2183
+ min: this.options.scaleStartValue,
2184
+ max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
2185
+ });
2186
+ }
2187
+
2188
+ this.scale = new this.ScaleClass(scaleOptions);
2189
+ },
2190
+ addData : function(valuesArray,label){
2191
+ //Map the values array for each of the datasets
2192
+ helpers.each(valuesArray,function(value,datasetIndex){
2193
+ //Add a new point for each piece of data, passing any required data to draw.
2194
+ this.datasets[datasetIndex].bars.push(new this.BarClass({
2195
+ value : value,
2196
+ label : label,
2197
+ x: this.scale.calculateBarX(this.datasets.length, datasetIndex, this.scale.valuesCount+1),
2198
+ y: this.scale.endPoint,
2199
+ width : this.scale.calculateBarWidth(this.datasets.length),
2200
+ base : this.scale.endPoint,
2201
+ strokeColor : this.datasets[datasetIndex].strokeColor,
2202
+ fillColor : this.datasets[datasetIndex].fillColor
2203
+ }));
2204
+ },this);
2205
+
2206
+ this.scale.addXLabel(label);
2207
+ //Then re-render the chart.
2208
+ this.update();
2209
+ },
2210
+ removeData : function(){
2211
+ this.scale.removeXLabel();
2212
+ //Then re-render the chart.
2213
+ helpers.each(this.datasets,function(dataset){
2214
+ dataset.bars.shift();
2215
+ },this);
2216
+ this.update();
2217
+ },
2218
+ reflow : function(){
2219
+ helpers.extend(this.BarClass.prototype,{
2220
+ y: this.scale.endPoint,
2221
+ base : this.scale.endPoint
2222
+ });
2223
+ var newScaleProps = helpers.extend({
2224
+ height : this.chart.height,
2225
+ width : this.chart.width
2226
+ });
2227
+ this.scale.update(newScaleProps);
2228
+ },
2229
+ draw : function(ease){
2230
+ var easingDecimal = ease || 1;
2231
+ this.clear();
2232
+
2233
+ var ctx = this.chart.ctx;
2234
+
2235
+ this.scale.draw(easingDecimal);
2236
+
2237
+ //Draw all the bars for each dataset
2238
+ helpers.each(this.datasets,function(dataset,datasetIndex){
2239
+ helpers.each(dataset.bars,function(bar,index){
2240
+ if (bar.hasValue()){
2241
+ bar.base = this.scale.endPoint;
2242
+ //Transition then draw
2243
+
2244
+ var x = this.scale.calculateBarX(this.datasets.length, datasetIndex, index);
2245
+ var y = this.scale.calculateY(bar.value);
2246
+ var width = this.scale.calculateBarWidth(this.datasets.length);
2247
+
2248
+ bar.transition({
2249
+ x : x,
2250
+ y : y,
2251
+ width : width
2252
+ }, easingDecimal).draw();
2253
+
2254
+ // Modified for error bars by Chris Seaton
2255
+
2256
+ if (bar.error != undefined && width > 6) {
2257
+ var scalingFactor = this.scale.drawingArea() / (this.scale.min - this.scale.max);
2258
+ var error_height = bar.error * scalingFactor;
2259
+ var error_width = error_width = Math.min(5, width * 0.25);
2260
+
2261
+ ctx.save();
2262
+
2263
+ ctx.strokeStyle = "white";
2264
+ ctx.lineWidth = error_width + 2;
2265
+
2266
+ ctx.beginPath();
2267
+ ctx.moveTo(x, y - error_height - 1);
2268
+ ctx.lineTo(x, y + error_height + 1);
2269
+ ctx.closePath();
2270
+ ctx.stroke();
2271
+
2272
+ ctx.strokeStyle = "black";
2273
+ ctx.lineWidth = error_width;
2274
+
2275
+ ctx.beginPath();
2276
+ ctx.moveTo(x, y - error_height);
2277
+ ctx.lineTo(x, y + error_height);
2278
+ ctx.closePath();
2279
+ ctx.stroke();
2280
+
2281
+ ctx.restore();
2282
+ }
2283
+ }
2284
+ },this);
2285
+
2286
+ },this);
2287
+ }
2288
+ });
2289
+
2290
+
2291
+ }).call(this);
2292
+ (function(){
2293
+ "use strict";
2294
+
2295
+ var root = this,
2296
+ Chart = root.Chart,
2297
+ //Cache a local reference to Chart.helpers
2298
+ helpers = Chart.helpers;
2299
+
2300
+ var defaultConfig = {
2301
+ //Boolean - Whether we should show a stroke on each segment
2302
+ segmentShowStroke : true,
2303
+
2304
+ //String - The colour of each segment stroke
2305
+ segmentStrokeColor : "#fff",
2306
+
2307
+ //Number - The width of each segment stroke
2308
+ segmentStrokeWidth : 2,
2309
+
2310
+ //The percentage of the chart that we cut out of the middle.
2311
+ percentageInnerCutout : 50,
2312
+
2313
+ //Number - Amount of animation steps
2314
+ animationSteps : 100,
2315
+
2316
+ //String - Animation easing effect
2317
+ animationEasing : "easeOutBounce",
2318
+
2319
+ //Boolean - Whether we animate the rotation of the Doughnut
2320
+ animateRotate : true,
2321
+
2322
+ //Boolean - Whether we animate scaling the Doughnut from the centre
2323
+ animateScale : false,
2324
+
2325
+ //String - A legend template
2326
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
2327
+
2328
+ };
2329
+
2330
+
2331
+ Chart.Type.extend({
2332
+ //Passing in a name registers this chart in the Chart namespace
2333
+ name: "Doughnut",
2334
+ //Providing a defaults will also register the deafults in the chart namespace
2335
+ defaults : defaultConfig,
2336
+ //Initialize is fired when the chart is initialized - Data is passed in as a parameter
2337
+ //Config is automatically merged by the core of Chart.js, and is available at this.options
2338
+ initialize: function(data){
2339
+
2340
+ //Declare segments as a static property to prevent inheriting across the Chart type prototype
2341
+ this.segments = [];
2342
+ this.outerRadius = (helpers.min([this.chart.width,this.chart.height]) - this.options.segmentStrokeWidth/2)/2;
2343
+
2344
+ this.SegmentArc = Chart.Arc.extend({
2345
+ ctx : this.chart.ctx,
2346
+ x : this.chart.width/2,
2347
+ y : this.chart.height/2
2348
+ });
2349
+
2350
+ //Set up tooltip events on the chart
2351
+ if (this.options.showTooltips){
2352
+ helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
2353
+ var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
2354
+
2355
+ helpers.each(this.segments,function(segment){
2356
+ segment.restore(["fillColor"]);
2357
+ });
2358
+ helpers.each(activeSegments,function(activeSegment){
2359
+ activeSegment.fillColor = activeSegment.highlightColor;
2360
+ });
2361
+ this.showTooltip(activeSegments);
2362
+ });
2363
+ }
2364
+ this.calculateTotal(data);
2365
+
2366
+ helpers.each(data,function(datapoint, index){
2367
+ this.addData(datapoint, index, true);
2368
+ },this);
2369
+
2370
+ this.render();
2371
+ },
2372
+ getSegmentsAtEvent : function(e){
2373
+ var segmentsArray = [];
2374
+
2375
+ var location = helpers.getRelativePosition(e);
2376
+
2377
+ helpers.each(this.segments,function(segment){
2378
+ if (segment.inRange(location.x,location.y)) segmentsArray.push(segment);
2379
+ },this);
2380
+ return segmentsArray;
2381
+ },
2382
+ addData : function(segment, atIndex, silent){
2383
+ var index = atIndex || this.segments.length;
2384
+ this.segments.splice(index, 0, new this.SegmentArc({
2385
+ value : segment.value,
2386
+ outerRadius : (this.options.animateScale) ? 0 : this.outerRadius,
2387
+ innerRadius : (this.options.animateScale) ? 0 : (this.outerRadius/100) * this.options.percentageInnerCutout,
2388
+ fillColor : segment.color,
2389
+ highlightColor : segment.highlight || segment.color,
2390
+ showStroke : this.options.segmentShowStroke,
2391
+ strokeWidth : this.options.segmentStrokeWidth,
2392
+ strokeColor : this.options.segmentStrokeColor,
2393
+ startAngle : Math.PI * 1.5,
2394
+ circumference : (this.options.animateRotate) ? 0 : this.calculateCircumference(segment.value),
2395
+ label : segment.label
2396
+ }));
2397
+ if (!silent){
2398
+ this.reflow();
2399
+ this.update();
2400
+ }
2401
+ },
2402
+ calculateCircumference : function(value){
2403
+ return (Math.PI*2)*(value / this.total);
2404
+ },
2405
+ calculateTotal : function(data){
2406
+ this.total = 0;
2407
+ helpers.each(data,function(segment){
2408
+ this.total += segment.value;
2409
+ },this);
2410
+ },
2411
+ update : function(){
2412
+ this.calculateTotal(this.segments);
2413
+
2414
+ // Reset any highlight colours before updating.
2415
+ helpers.each(this.activeElements, function(activeElement){
2416
+ activeElement.restore(['fillColor']);
2417
+ });
2418
+
2419
+ helpers.each(this.segments,function(segment){
2420
+ segment.save();
2421
+ });
2422
+ this.render();
2423
+ },
2424
+
2425
+ removeData: function(atIndex){
2426
+ var indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1;
2427
+ this.segments.splice(indexToDelete, 1);
2428
+ this.reflow();
2429
+ this.update();
2430
+ },
2431
+
2432
+ reflow : function(){
2433
+ helpers.extend(this.SegmentArc.prototype,{
2434
+ x : this.chart.width/2,
2435
+ y : this.chart.height/2
2436
+ });
2437
+ this.outerRadius = (helpers.min([this.chart.width,this.chart.height]) - this.options.segmentStrokeWidth/2)/2;
2438
+ helpers.each(this.segments, function(segment){
2439
+ segment.update({
2440
+ outerRadius : this.outerRadius,
2441
+ innerRadius : (this.outerRadius/100) * this.options.percentageInnerCutout
2442
+ });
2443
+ }, this);
2444
+ },
2445
+ draw : function(easeDecimal){
2446
+ var animDecimal = (easeDecimal) ? easeDecimal : 1;
2447
+ this.clear();
2448
+ helpers.each(this.segments,function(segment,index){
2449
+ segment.transition({
2450
+ circumference : this.calculateCircumference(segment.value),
2451
+ outerRadius : this.outerRadius,
2452
+ innerRadius : (this.outerRadius/100) * this.options.percentageInnerCutout
2453
+ },animDecimal);
2454
+
2455
+ segment.endAngle = segment.startAngle + segment.circumference;
2456
+
2457
+ segment.draw();
2458
+ if (index === 0){
2459
+ segment.startAngle = Math.PI * 1.5;
2460
+ }
2461
+ //Check to see if it's the last segment, if not get the next and update the start angle
2462
+ if (index < this.segments.length-1){
2463
+ this.segments[index+1].startAngle = segment.endAngle;
2464
+ }
2465
+ },this);
2466
+
2467
+ }
2468
+ });
2469
+
2470
+ Chart.types.Doughnut.extend({
2471
+ name : "Pie",
2472
+ defaults : helpers.merge(defaultConfig,{percentageInnerCutout : 0})
2473
+ });
2474
+
2475
+ }).call(this);
2476
+ (function(){
2477
+ "use strict";
2478
+
2479
+ var root = this,
2480
+ Chart = root.Chart,
2481
+ helpers = Chart.helpers;
2482
+
2483
+ var defaultConfig = {
2484
+
2485
+ ///Boolean - Whether grid lines are shown across the chart
2486
+ scaleShowGridLines : true,
2487
+
2488
+ //String - Colour of the grid lines
2489
+ scaleGridLineColor : "rgba(0,0,0,.05)",
2490
+
2491
+ //Number - Width of the grid lines
2492
+ scaleGridLineWidth : 1,
2493
+
2494
+ //Boolean - Whether the line is curved between points
2495
+ bezierCurve : true,
2496
+
2497
+ //Number - Tension of the bezier curve between points
2498
+ bezierCurveTension : 0.4,
2499
+
2500
+ //Boolean - Whether to show a dot for each point
2501
+ pointDot : true,
2502
+
2503
+ //Number - Radius of each point dot in pixels
2504
+ pointDotRadius : 4,
2505
+
2506
+ //Number - Pixel width of point dot stroke
2507
+ pointDotStrokeWidth : 1,
2508
+
2509
+ //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
2510
+ pointHitDetectionRadius : 20,
2511
+
2512
+ //Boolean - Whether to show a stroke for datasets
2513
+ datasetStroke : true,
2514
+
2515
+ //Number - Pixel width of dataset stroke
2516
+ datasetStrokeWidth : 2,
2517
+
2518
+ //Boolean - Whether to fill the dataset with a colour
2519
+ datasetFill : true,
2520
+
2521
+ //String - A legend template
2522
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
2523
+
2524
+ };
2525
+
2526
+
2527
+ Chart.Type.extend({
2528
+ name: "Line",
2529
+ defaults : defaultConfig,
2530
+ initialize: function(data){
2531
+ //Declare the extension of the default point, to cater for the options passed in to the constructor
2532
+ this.PointClass = Chart.Point.extend({
2533
+ strokeWidth : this.options.pointDotStrokeWidth,
2534
+ radius : this.options.pointDotRadius,
2535
+ display: this.options.pointDot,
2536
+ hitDetectionRadius : this.options.pointHitDetectionRadius,
2537
+ ctx : this.chart.ctx,
2538
+ inRange : function(mouseX){
2539
+ return (Math.pow(mouseX-this.x, 2) < Math.pow(this.radius + this.hitDetectionRadius,2));
2540
+ }
2541
+ });
2542
+
2543
+ this.datasets = [];
2544
+
2545
+ //Set up tooltip events on the chart
2546
+ if (this.options.showTooltips){
2547
+ helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
2548
+ var activePoints = (evt.type !== 'mouseout') ? this.getPointsAtEvent(evt) : [];
2549
+ this.eachPoints(function(point){
2550
+ point.restore(['fillColor', 'strokeColor']);
2551
+ });
2552
+ helpers.each(activePoints, function(activePoint){
2553
+ activePoint.fillColor = activePoint.highlightFill;
2554
+ activePoint.strokeColor = activePoint.highlightStroke;
2555
+ });
2556
+ this.showTooltip(activePoints);
2557
+ });
2558
+ }
2559
+
2560
+ //Iterate through each of the datasets, and build this into a property of the chart
2561
+ helpers.each(data.datasets,function(dataset){
2562
+
2563
+ var datasetObject = {
2564
+ label : dataset.label || null,
2565
+ fillColor : dataset.fillColor,
2566
+ strokeColor : dataset.strokeColor,
2567
+ pointColor : dataset.pointColor,
2568
+ pointStrokeColor : dataset.pointStrokeColor,
2569
+ points : []
2570
+ };
2571
+
2572
+ this.datasets.push(datasetObject);
2573
+
2574
+
2575
+ helpers.each(dataset.data,function(dataPoint,index){
2576
+ //Add a new point for each piece of data, passing any required data to draw.
2577
+ datasetObject.points.push(new this.PointClass({
2578
+ value : dataPoint,
2579
+ label : data.labels[index],
2580
+ datasetLabel: dataset.label,
2581
+ strokeColor : dataset.pointStrokeColor,
2582
+ fillColor : dataset.pointColor,
2583
+ highlightFill : dataset.pointHighlightFill || dataset.pointColor,
2584
+ highlightStroke : dataset.pointHighlightStroke || dataset.pointStrokeColor
2585
+ }));
2586
+ },this);
2587
+
2588
+ this.buildScale(data.labels);
2589
+
2590
+
2591
+ this.eachPoints(function(point, index){
2592
+ helpers.extend(point, {
2593
+ x: this.scale.calculateX(index),
2594
+ y: this.scale.endPoint
2595
+ });
2596
+ point.save();
2597
+ }, this);
2598
+
2599
+ },this);
2600
+
2601
+
2602
+ this.render();
2603
+ },
2604
+ update : function(){
2605
+ this.scale.update();
2606
+ // Reset any highlight colours before updating.
2607
+ helpers.each(this.activeElements, function(activeElement){
2608
+ activeElement.restore(['fillColor', 'strokeColor']);
2609
+ });
2610
+ this.eachPoints(function(point){
2611
+ point.save();
2612
+ });
2613
+ this.render();
2614
+ },
2615
+ eachPoints : function(callback){
2616
+ helpers.each(this.datasets,function(dataset){
2617
+ helpers.each(dataset.points,callback,this);
2618
+ },this);
2619
+ },
2620
+ getPointsAtEvent : function(e){
2621
+ var pointsArray = [],
2622
+ eventPosition = helpers.getRelativePosition(e);
2623
+ helpers.each(this.datasets,function(dataset){
2624
+ helpers.each(dataset.points,function(point){
2625
+ if (point.inRange(eventPosition.x,eventPosition.y)) pointsArray.push(point);
2626
+ });
2627
+ },this);
2628
+ return pointsArray;
2629
+ },
2630
+ buildScale : function(labels){
2631
+ var self = this;
2632
+
2633
+ var dataTotal = function(){
2634
+ var values = [];
2635
+ self.eachPoints(function(point){
2636
+ values.push(point.value);
2637
+ });
2638
+
2639
+ return values;
2640
+ };
2641
+
2642
+ var scaleOptions = {
2643
+ templateString : this.options.scaleLabel,
2644
+ height : this.chart.height,
2645
+ width : this.chart.width,
2646
+ ctx : this.chart.ctx,
2647
+ textColor : this.options.scaleFontColor,
2648
+ fontSize : this.options.scaleFontSize,
2649
+ fontStyle : this.options.scaleFontStyle,
2650
+ fontFamily : this.options.scaleFontFamily,
2651
+ valuesCount : labels.length,
2652
+ beginAtZero : this.options.scaleBeginAtZero,
2653
+ integersOnly : this.options.scaleIntegersOnly,
2654
+ calculateYRange : function(currentHeight){
2655
+ var updatedRanges = helpers.calculateScaleRange(
2656
+ dataTotal(),
2657
+ currentHeight,
2658
+ this.fontSize,
2659
+ this.beginAtZero,
2660
+ this.integersOnly
2661
+ );
2662
+ helpers.extend(this, updatedRanges);
2663
+ },
2664
+ xLabels : labels,
2665
+ font : helpers.fontString(this.options.scaleFontSize, this.options.scaleFontStyle, this.options.scaleFontFamily),
2666
+ lineWidth : this.options.scaleLineWidth,
2667
+ lineColor : this.options.scaleLineColor,
2668
+ gridLineWidth : (this.options.scaleShowGridLines) ? this.options.scaleGridLineWidth : 0,
2669
+ gridLineColor : (this.options.scaleShowGridLines) ? this.options.scaleGridLineColor : "rgba(0,0,0,0)",
2670
+ padding: (this.options.showScale) ? 0 : this.options.pointDotRadius + this.options.pointDotStrokeWidth,
2671
+ showLabels : this.options.scaleShowLabels,
2672
+ display : this.options.showScale
2673
+ };
2674
+
2675
+ if (this.options.scaleOverride){
2676
+ helpers.extend(scaleOptions, {
2677
+ calculateYRange: helpers.noop,
2678
+ steps: this.options.scaleSteps,
2679
+ stepValue: this.options.scaleStepWidth,
2680
+ min: this.options.scaleStartValue,
2681
+ max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
2682
+ });
2683
+ }
2684
+
2685
+
2686
+ this.scale = new Chart.Scale(scaleOptions);
2687
+ },
2688
+ addData : function(valuesArray,label){
2689
+ //Map the values array for each of the datasets
2690
+
2691
+ helpers.each(valuesArray,function(value,datasetIndex){
2692
+ //Add a new point for each piece of data, passing any required data to draw.
2693
+ this.datasets[datasetIndex].points.push(new this.PointClass({
2694
+ value : value,
2695
+ label : label,
2696
+ x: this.scale.calculateX(this.scale.valuesCount+1),
2697
+ y: this.scale.endPoint,
2698
+ strokeColor : this.datasets[datasetIndex].pointStrokeColor,
2699
+ fillColor : this.datasets[datasetIndex].pointColor
2700
+ }));
2701
+ },this);
2702
+
2703
+ this.scale.addXLabel(label);
2704
+ //Then re-render the chart.
2705
+ this.update();
2706
+ },
2707
+ removeData : function(){
2708
+ this.scale.removeXLabel();
2709
+ //Then re-render the chart.
2710
+ helpers.each(this.datasets,function(dataset){
2711
+ dataset.points.shift();
2712
+ },this);
2713
+ this.update();
2714
+ },
2715
+ reflow : function(){
2716
+ var newScaleProps = helpers.extend({
2717
+ height : this.chart.height,
2718
+ width : this.chart.width
2719
+ });
2720
+ this.scale.update(newScaleProps);
2721
+ },
2722
+ draw : function(ease){
2723
+ var easingDecimal = ease || 1;
2724
+ this.clear();
2725
+
2726
+ var ctx = this.chart.ctx;
2727
+
2728
+ // Some helper methods for getting the next/prev points
2729
+ var hasValue = function(item){
2730
+ return item.value !== null;
2731
+ },
2732
+ nextPoint = function(point, collection, index){
2733
+ return helpers.findNextWhere(collection, hasValue, index) || point;
2734
+ },
2735
+ previousPoint = function(point, collection, index){
2736
+ return helpers.findPreviousWhere(collection, hasValue, index) || point;
2737
+ };
2738
+
2739
+ this.scale.draw(easingDecimal);
2740
+
2741
+
2742
+ helpers.each(this.datasets,function(dataset){
2743
+ var pointsWithValues = helpers.where(dataset.points, hasValue);
2744
+
2745
+ //Transition each point first so that the line and point drawing isn't out of sync
2746
+ //We can use this extra loop to calculate the control points of this dataset also in this loop
2747
+
2748
+ helpers.each(dataset.points, function(point, index){
2749
+ if (point.hasValue()){
2750
+ point.transition({
2751
+ y : this.scale.calculateY(point.value),
2752
+ x : this.scale.calculateX(index)
2753
+ }, easingDecimal);
2754
+ }
2755
+ },this);
2756
+
2757
+
2758
+ // Control points need to be calculated in a seperate loop, because we need to know the current x/y of the point
2759
+ // This would cause issues when there is no animation, because the y of the next point would be 0, so beziers would be skewed
2760
+ if (this.options.bezierCurve){
2761
+ helpers.each(pointsWithValues, function(point, index){
2762
+ var tension = (index > 0 && index < pointsWithValues.length - 1) ? this.options.bezierCurveTension : 0;
2763
+ point.controlPoints = helpers.splineCurve(
2764
+ previousPoint(point, pointsWithValues, index),
2765
+ point,
2766
+ nextPoint(point, pointsWithValues, index),
2767
+ tension
2768
+ );
2769
+
2770
+ // Prevent the bezier going outside of the bounds of the graph
2771
+
2772
+ // Cap puter bezier handles to the upper/lower scale bounds
2773
+ if (point.controlPoints.outer.y > this.scale.endPoint){
2774
+ point.controlPoints.outer.y = this.scale.endPoint;
2775
+ }
2776
+ else if (point.controlPoints.outer.y < this.scale.startPoint){
2777
+ point.controlPoints.outer.y = this.scale.startPoint;
2778
+ }
2779
+
2780
+ // Cap inner bezier handles to the upper/lower scale bounds
2781
+ if (point.controlPoints.inner.y > this.scale.endPoint){
2782
+ point.controlPoints.inner.y = this.scale.endPoint;
2783
+ }
2784
+ else if (point.controlPoints.inner.y < this.scale.startPoint){
2785
+ point.controlPoints.inner.y = this.scale.startPoint;
2786
+ }
2787
+ },this);
2788
+ }
2789
+
2790
+
2791
+ //Draw the line between all the points
2792
+ ctx.lineWidth = this.options.datasetStrokeWidth;
2793
+ ctx.strokeStyle = dataset.strokeColor;
2794
+ ctx.beginPath();
2795
+
2796
+ helpers.each(pointsWithValues, function(point, index){
2797
+ if (index === 0){
2798
+ ctx.moveTo(point.x, point.y);
2799
+ }
2800
+ else{
2801
+ if(this.options.bezierCurve){
2802
+ var previous = previousPoint(point, pointsWithValues, index);
2803
+
2804
+ ctx.bezierCurveTo(
2805
+ previous.controlPoints.outer.x,
2806
+ previous.controlPoints.outer.y,
2807
+ point.controlPoints.inner.x,
2808
+ point.controlPoints.inner.y,
2809
+ point.x,
2810
+ point.y
2811
+ );
2812
+ }
2813
+ else{
2814
+ ctx.lineTo(point.x,point.y);
2815
+ }
2816
+ }
2817
+ }, this);
2818
+
2819
+ ctx.stroke();
2820
+
2821
+ if (this.options.datasetFill && pointsWithValues.length > 0){
2822
+ //Round off the line by going to the base of the chart, back to the start, then fill.
2823
+ ctx.lineTo(pointsWithValues[pointsWithValues.length - 1].x, this.scale.endPoint);
2824
+ ctx.lineTo(pointsWithValues[0].x, this.scale.endPoint);
2825
+ ctx.fillStyle = dataset.fillColor;
2826
+ ctx.closePath();
2827
+ ctx.fill();
2828
+ }
2829
+
2830
+ //Now draw the points over the line
2831
+ //A little inefficient double looping, but better than the line
2832
+ //lagging behind the point positions
2833
+ helpers.each(pointsWithValues,function(point){
2834
+ point.draw();
2835
+ });
2836
+ },this);
2837
+ }
2838
+ });
2839
+
2840
+
2841
+ }).call(this);
2842
+ (function(){
2843
+ "use strict";
2844
+
2845
+ var root = this,
2846
+ Chart = root.Chart,
2847
+ //Cache a local reference to Chart.helpers
2848
+ helpers = Chart.helpers;
2849
+
2850
+ var defaultConfig = {
2851
+ //Boolean - Show a backdrop to the scale label
2852
+ scaleShowLabelBackdrop : true,
2853
+
2854
+ //String - The colour of the label backdrop
2855
+ scaleBackdropColor : "rgba(255,255,255,0.75)",
2856
+
2857
+ // Boolean - Whether the scale should begin at zero
2858
+ scaleBeginAtZero : true,
2859
+
2860
+ //Number - The backdrop padding above & below the label in pixels
2861
+ scaleBackdropPaddingY : 2,
2862
+
2863
+ //Number - The backdrop padding to the side of the label in pixels
2864
+ scaleBackdropPaddingX : 2,
2865
+
2866
+ //Boolean - Show line for each value in the scale
2867
+ scaleShowLine : true,
2868
+
2869
+ //Boolean - Stroke a line around each segment in the chart
2870
+ segmentShowStroke : true,
2871
+
2872
+ //String - The colour of the stroke on each segement.
2873
+ segmentStrokeColor : "#fff",
2874
+
2875
+ //Number - The width of the stroke value in pixels
2876
+ segmentStrokeWidth : 2,
2877
+
2878
+ //Number - Amount of animation steps
2879
+ animationSteps : 100,
2880
+
2881
+ //String - Animation easing effect.
2882
+ animationEasing : "easeOutBounce",
2883
+
2884
+ //Boolean - Whether to animate the rotation of the chart
2885
+ animateRotate : true,
2886
+
2887
+ //Boolean - Whether to animate scaling the chart from the centre
2888
+ animateScale : false,
2889
+
2890
+ //String - A legend template
2891
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
2892
+ };
2893
+
2894
+
2895
+ Chart.Type.extend({
2896
+ //Passing in a name registers this chart in the Chart namespace
2897
+ name: "PolarArea",
2898
+ //Providing a defaults will also register the deafults in the chart namespace
2899
+ defaults : defaultConfig,
2900
+ //Initialize is fired when the chart is initialized - Data is passed in as a parameter
2901
+ //Config is automatically merged by the core of Chart.js, and is available at this.options
2902
+ initialize: function(data){
2903
+ this.segments = [];
2904
+ //Declare segment class as a chart instance specific class, so it can share props for this instance
2905
+ this.SegmentArc = Chart.Arc.extend({
2906
+ showStroke : this.options.segmentShowStroke,
2907
+ strokeWidth : this.options.segmentStrokeWidth,
2908
+ strokeColor : this.options.segmentStrokeColor,
2909
+ ctx : this.chart.ctx,
2910
+ innerRadius : 0,
2911
+ x : this.chart.width/2,
2912
+ y : this.chart.height/2
2913
+ });
2914
+ this.scale = new Chart.RadialScale({
2915
+ display: this.options.showScale,
2916
+ fontStyle: this.options.scaleFontStyle,
2917
+ fontSize: this.options.scaleFontSize,
2918
+ fontFamily: this.options.scaleFontFamily,
2919
+ fontColor: this.options.scaleFontColor,
2920
+ showLabels: this.options.scaleShowLabels,
2921
+ showLabelBackdrop: this.options.scaleShowLabelBackdrop,
2922
+ backdropColor: this.options.scaleBackdropColor,
2923
+ backdropPaddingY : this.options.scaleBackdropPaddingY,
2924
+ backdropPaddingX: this.options.scaleBackdropPaddingX,
2925
+ lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
2926
+ lineColor: this.options.scaleLineColor,
2927
+ lineArc: true,
2928
+ width: this.chart.width,
2929
+ height: this.chart.height,
2930
+ xCenter: this.chart.width/2,
2931
+ yCenter: this.chart.height/2,
2932
+ ctx : this.chart.ctx,
2933
+ templateString: this.options.scaleLabel,
2934
+ valuesCount: data.length
2935
+ });
2936
+
2937
+ this.updateScaleRange(data);
2938
+
2939
+ this.scale.update();
2940
+
2941
+ helpers.each(data,function(segment,index){
2942
+ this.addData(segment,index,true);
2943
+ },this);
2944
+
2945
+ //Set up tooltip events on the chart
2946
+ if (this.options.showTooltips){
2947
+ helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
2948
+ var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
2949
+ helpers.each(this.segments,function(segment){
2950
+ segment.restore(["fillColor"]);
2951
+ });
2952
+ helpers.each(activeSegments,function(activeSegment){
2953
+ activeSegment.fillColor = activeSegment.highlightColor;
2954
+ });
2955
+ this.showTooltip(activeSegments);
2956
+ });
2957
+ }
2958
+
2959
+ this.render();
2960
+ },
2961
+ getSegmentsAtEvent : function(e){
2962
+ var segmentsArray = [];
2963
+
2964
+ var location = helpers.getRelativePosition(e);
2965
+
2966
+ helpers.each(this.segments,function(segment){
2967
+ if (segment.inRange(location.x,location.y)) segmentsArray.push(segment);
2968
+ },this);
2969
+ return segmentsArray;
2970
+ },
2971
+ addData : function(segment, atIndex, silent){
2972
+ var index = atIndex || this.segments.length;
2973
+
2974
+ this.segments.splice(index, 0, new this.SegmentArc({
2975
+ fillColor: segment.color,
2976
+ highlightColor: segment.highlight || segment.color,
2977
+ label: segment.label,
2978
+ value: segment.value,
2979
+ outerRadius: (this.options.animateScale) ? 0 : this.scale.calculateCenterOffset(segment.value),
2980
+ circumference: (this.options.animateRotate) ? 0 : this.scale.getCircumference(),
2981
+ startAngle: Math.PI * 1.5
2982
+ }));
2983
+ if (!silent){
2984
+ this.reflow();
2985
+ this.update();
2986
+ }
2987
+ },
2988
+ removeData: function(atIndex){
2989
+ var indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1;
2990
+ this.segments.splice(indexToDelete, 1);
2991
+ this.reflow();
2992
+ this.update();
2993
+ },
2994
+ calculateTotal: function(data){
2995
+ this.total = 0;
2996
+ helpers.each(data,function(segment){
2997
+ this.total += segment.value;
2998
+ },this);
2999
+ this.scale.valuesCount = this.segments.length;
3000
+ },
3001
+ updateScaleRange: function(datapoints){
3002
+ var valuesArray = [];
3003
+ helpers.each(datapoints,function(segment){
3004
+ valuesArray.push(segment.value);
3005
+ });
3006
+
3007
+ var scaleSizes = (this.options.scaleOverride) ?
3008
+ {
3009
+ steps: this.options.scaleSteps,
3010
+ stepValue: this.options.scaleStepWidth,
3011
+ min: this.options.scaleStartValue,
3012
+ max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
3013
+ } :
3014
+ helpers.calculateScaleRange(
3015
+ valuesArray,
3016
+ helpers.min([this.chart.width, this.chart.height])/2,
3017
+ this.options.scaleFontSize,
3018
+ this.options.scaleBeginAtZero,
3019
+ this.options.scaleIntegersOnly
3020
+ );
3021
+
3022
+ helpers.extend(
3023
+ this.scale,
3024
+ scaleSizes,
3025
+ {
3026
+ size: helpers.min([this.chart.width, this.chart.height]),
3027
+ xCenter: this.chart.width/2,
3028
+ yCenter: this.chart.height/2
3029
+ }
3030
+ );
3031
+
3032
+ },
3033
+ update : function(){
3034
+ this.calculateTotal(this.segments);
3035
+
3036
+ helpers.each(this.segments,function(segment){
3037
+ segment.save();
3038
+ });
3039
+ this.render();
3040
+ },
3041
+ reflow : function(){
3042
+ helpers.extend(this.SegmentArc.prototype,{
3043
+ x : this.chart.width/2,
3044
+ y : this.chart.height/2
3045
+ });
3046
+ this.updateScaleRange(this.segments);
3047
+ this.scale.update();
3048
+
3049
+ helpers.extend(this.scale,{
3050
+ xCenter: this.chart.width/2,
3051
+ yCenter: this.chart.height/2
3052
+ });
3053
+
3054
+ helpers.each(this.segments, function(segment){
3055
+ segment.update({
3056
+ outerRadius : this.scale.calculateCenterOffset(segment.value)
3057
+ });
3058
+ }, this);
3059
+
3060
+ },
3061
+ draw : function(ease){
3062
+ var easingDecimal = ease || 1;
3063
+ //Clear & draw the canvas
3064
+ this.clear();
3065
+ helpers.each(this.segments,function(segment, index){
3066
+ segment.transition({
3067
+ circumference : this.scale.getCircumference(),
3068
+ outerRadius : this.scale.calculateCenterOffset(segment.value)
3069
+ },easingDecimal);
3070
+
3071
+ segment.endAngle = segment.startAngle + segment.circumference;
3072
+
3073
+ // If we've removed the first segment we need to set the first one to
3074
+ // start at the top.
3075
+ if (index === 0){
3076
+ segment.startAngle = Math.PI * 1.5;
3077
+ }
3078
+
3079
+ //Check to see if it's the last segment, if not get the next and update the start angle
3080
+ if (index < this.segments.length - 1){
3081
+ this.segments[index+1].startAngle = segment.endAngle;
3082
+ }
3083
+ segment.draw();
3084
+ }, this);
3085
+ this.scale.draw();
3086
+ }
3087
+ });
3088
+
3089
+ }).call(this);
3090
+ (function(){
3091
+ "use strict";
3092
+
3093
+ var root = this,
3094
+ Chart = root.Chart,
3095
+ helpers = Chart.helpers;
3096
+
3097
+
3098
+
3099
+ Chart.Type.extend({
3100
+ name: "Radar",
3101
+ defaults:{
3102
+ //Boolean - Whether to show lines for each scale point
3103
+ scaleShowLine : true,
3104
+
3105
+ //Boolean - Whether we show the angle lines out of the radar
3106
+ angleShowLineOut : true,
3107
+
3108
+ //Boolean - Whether to show labels on the scale
3109
+ scaleShowLabels : false,
3110
+
3111
+ // Boolean - Whether the scale should begin at zero
3112
+ scaleBeginAtZero : true,
3113
+
3114
+ //String - Colour of the angle line
3115
+ angleLineColor : "rgba(0,0,0,.1)",
3116
+
3117
+ //Number - Pixel width of the angle line
3118
+ angleLineWidth : 1,
3119
+
3120
+ //String - Point label font declaration
3121
+ pointLabelFontFamily : "'Arial'",
3122
+
3123
+ //String - Point label font weight
3124
+ pointLabelFontStyle : "normal",
3125
+
3126
+ //Number - Point label font size in pixels
3127
+ pointLabelFontSize : 10,
3128
+
3129
+ //String - Point label font colour
3130
+ pointLabelFontColor : "#666",
3131
+
3132
+ //Boolean - Whether to show a dot for each point
3133
+ pointDot : true,
3134
+
3135
+ //Number - Radius of each point dot in pixels
3136
+ pointDotRadius : 3,
3137
+
3138
+ //Number - Pixel width of point dot stroke
3139
+ pointDotStrokeWidth : 1,
3140
+
3141
+ //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
3142
+ pointHitDetectionRadius : 20,
3143
+
3144
+ //Boolean - Whether to show a stroke for datasets
3145
+ datasetStroke : true,
3146
+
3147
+ //Number - Pixel width of dataset stroke
3148
+ datasetStrokeWidth : 2,
3149
+
3150
+ //Boolean - Whether to fill the dataset with a colour
3151
+ datasetFill : true,
3152
+
3153
+ //String - A legend template
3154
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
3155
+
3156
+ },
3157
+
3158
+ initialize: function(data){
3159
+ this.PointClass = Chart.Point.extend({
3160
+ strokeWidth : this.options.pointDotStrokeWidth,
3161
+ radius : this.options.pointDotRadius,
3162
+ display: this.options.pointDot,
3163
+ hitDetectionRadius : this.options.pointHitDetectionRadius,
3164
+ ctx : this.chart.ctx
3165
+ });
3166
+
3167
+ this.datasets = [];
3168
+
3169
+ this.buildScale(data);
3170
+
3171
+ //Set up tooltip events on the chart
3172
+ if (this.options.showTooltips){
3173
+ helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
3174
+ var activePointsCollection = (evt.type !== 'mouseout') ? this.getPointsAtEvent(evt) : [];
3175
+
3176
+ this.eachPoints(function(point){
3177
+ point.restore(['fillColor', 'strokeColor']);
3178
+ });
3179
+ helpers.each(activePointsCollection, function(activePoint){
3180
+ activePoint.fillColor = activePoint.highlightFill;
3181
+ activePoint.strokeColor = activePoint.highlightStroke;
3182
+ });
3183
+
3184
+ this.showTooltip(activePointsCollection);
3185
+ });
3186
+ }
3187
+
3188
+ //Iterate through each of the datasets, and build this into a property of the chart
3189
+ helpers.each(data.datasets,function(dataset){
3190
+
3191
+ var datasetObject = {
3192
+ label: dataset.label || null,
3193
+ fillColor : dataset.fillColor,
3194
+ strokeColor : dataset.strokeColor,
3195
+ pointColor : dataset.pointColor,
3196
+ pointStrokeColor : dataset.pointStrokeColor,
3197
+ points : []
3198
+ };
3199
+
3200
+ this.datasets.push(datasetObject);
3201
+
3202
+ helpers.each(dataset.data,function(dataPoint,index){
3203
+ //Add a new point for each piece of data, passing any required data to draw.
3204
+ var pointPosition;
3205
+ if (!this.scale.animation){
3206
+ pointPosition = this.scale.getPointPosition(index, this.scale.calculateCenterOffset(dataPoint));
3207
+ }
3208
+ datasetObject.points.push(new this.PointClass({
3209
+ value : dataPoint,
3210
+ label : data.labels[index],
3211
+ datasetLabel: dataset.label,
3212
+ x: (this.options.animation) ? this.scale.xCenter : pointPosition.x,
3213
+ y: (this.options.animation) ? this.scale.yCenter : pointPosition.y,
3214
+ strokeColor : dataset.pointStrokeColor,
3215
+ fillColor : dataset.pointColor,
3216
+ highlightFill : dataset.pointHighlightFill || dataset.pointColor,
3217
+ highlightStroke : dataset.pointHighlightStroke || dataset.pointStrokeColor
3218
+ }));
3219
+ },this);
3220
+
3221
+ },this);
3222
+
3223
+ this.render();
3224
+ },
3225
+ eachPoints : function(callback){
3226
+ helpers.each(this.datasets,function(dataset){
3227
+ helpers.each(dataset.points,callback,this);
3228
+ },this);
3229
+ },
3230
+
3231
+ getPointsAtEvent : function(evt){
3232
+ var mousePosition = helpers.getRelativePosition(evt),
3233
+ fromCenter = helpers.getAngleFromPoint({
3234
+ x: this.scale.xCenter,
3235
+ y: this.scale.yCenter
3236
+ }, mousePosition);
3237
+
3238
+ var anglePerIndex = (Math.PI * 2) /this.scale.valuesCount,
3239
+ pointIndex = Math.round((fromCenter.angle - Math.PI * 1.5) / anglePerIndex),
3240
+ activePointsCollection = [];
3241
+
3242
+ // If we're at the top, make the pointIndex 0 to get the first of the array.
3243
+ if (pointIndex >= this.scale.valuesCount || pointIndex < 0){
3244
+ pointIndex = 0;
3245
+ }
3246
+
3247
+ if (fromCenter.distance <= this.scale.drawingArea){
3248
+ helpers.each(this.datasets, function(dataset){
3249
+ activePointsCollection.push(dataset.points[pointIndex]);
3250
+ });
3251
+ }
3252
+
3253
+ return activePointsCollection;
3254
+ },
3255
+
3256
+ buildScale : function(data){
3257
+ this.scale = new Chart.RadialScale({
3258
+ display: this.options.showScale,
3259
+ fontStyle: this.options.scaleFontStyle,
3260
+ fontSize: this.options.scaleFontSize,
3261
+ fontFamily: this.options.scaleFontFamily,
3262
+ fontColor: this.options.scaleFontColor,
3263
+ showLabels: this.options.scaleShowLabels,
3264
+ showLabelBackdrop: this.options.scaleShowLabelBackdrop,
3265
+ backdropColor: this.options.scaleBackdropColor,
3266
+ backdropPaddingY : this.options.scaleBackdropPaddingY,
3267
+ backdropPaddingX: this.options.scaleBackdropPaddingX,
3268
+ lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
3269
+ lineColor: this.options.scaleLineColor,
3270
+ angleLineColor : this.options.angleLineColor,
3271
+ angleLineWidth : (this.options.angleShowLineOut) ? this.options.angleLineWidth : 0,
3272
+ // Point labels at the edge of each line
3273
+ pointLabelFontColor : this.options.pointLabelFontColor,
3274
+ pointLabelFontSize : this.options.pointLabelFontSize,
3275
+ pointLabelFontFamily : this.options.pointLabelFontFamily,
3276
+ pointLabelFontStyle : this.options.pointLabelFontStyle,
3277
+ height : this.chart.height,
3278
+ width: this.chart.width,
3279
+ xCenter: this.chart.width/2,
3280
+ yCenter: this.chart.height/2,
3281
+ ctx : this.chart.ctx,
3282
+ templateString: this.options.scaleLabel,
3283
+ labels: data.labels,
3284
+ valuesCount: data.datasets[0].data.length
3285
+ });
3286
+
3287
+ this.scale.setScaleSize();
3288
+ this.updateScaleRange(data.datasets);
3289
+ this.scale.buildYLabels();
3290
+ },
3291
+ updateScaleRange: function(datasets){
3292
+ var valuesArray = (function(){
3293
+ var totalDataArray = [];
3294
+ helpers.each(datasets,function(dataset){
3295
+ if (dataset.data){
3296
+ totalDataArray = totalDataArray.concat(dataset.data);
3297
+ }
3298
+ else {
3299
+ helpers.each(dataset.points, function(point){
3300
+ totalDataArray.push(point.value);
3301
+ });
3302
+ }
3303
+ });
3304
+ return totalDataArray;
3305
+ })();
3306
+
3307
+
3308
+ var scaleSizes = (this.options.scaleOverride) ?
3309
+ {
3310
+ steps: this.options.scaleSteps,
3311
+ stepValue: this.options.scaleStepWidth,
3312
+ min: this.options.scaleStartValue,
3313
+ max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
3314
+ } :
3315
+ helpers.calculateScaleRange(
3316
+ valuesArray,
3317
+ helpers.min([this.chart.width, this.chart.height])/2,
3318
+ this.options.scaleFontSize,
3319
+ this.options.scaleBeginAtZero,
3320
+ this.options.scaleIntegersOnly
3321
+ );
3322
+
3323
+ helpers.extend(
3324
+ this.scale,
3325
+ scaleSizes
3326
+ );
3327
+
3328
+ },
3329
+ addData : function(valuesArray,label){
3330
+ //Map the values array for each of the datasets
3331
+ this.scale.valuesCount++;
3332
+ helpers.each(valuesArray,function(value,datasetIndex){
3333
+ var pointPosition = this.scale.getPointPosition(this.scale.valuesCount, this.scale.calculateCenterOffset(value));
3334
+ this.datasets[datasetIndex].points.push(new this.PointClass({
3335
+ value : value,
3336
+ label : label,
3337
+ x: pointPosition.x,
3338
+ y: pointPosition.y,
3339
+ strokeColor : this.datasets[datasetIndex].pointStrokeColor,
3340
+ fillColor : this.datasets[datasetIndex].pointColor
3341
+ }));
3342
+ },this);
3343
+
3344
+ this.scale.labels.push(label);
3345
+
3346
+ this.reflow();
3347
+
3348
+ this.update();
3349
+ },
3350
+ removeData : function(){
3351
+ this.scale.valuesCount--;
3352
+ this.scale.labels.shift();
3353
+ helpers.each(this.datasets,function(dataset){
3354
+ dataset.points.shift();
3355
+ },this);
3356
+ this.reflow();
3357
+ this.update();
3358
+ },
3359
+ update : function(){
3360
+ this.eachPoints(function(point){
3361
+ point.save();
3362
+ });
3363
+ this.reflow();
3364
+ this.render();
3365
+ },
3366
+ reflow: function(){
3367
+ helpers.extend(this.scale, {
3368
+ width : this.chart.width,
3369
+ height: this.chart.height,
3370
+ size : helpers.min([this.chart.width, this.chart.height]),
3371
+ xCenter: this.chart.width/2,
3372
+ yCenter: this.chart.height/2
3373
+ });
3374
+ this.updateScaleRange(this.datasets);
3375
+ this.scale.setScaleSize();
3376
+ this.scale.buildYLabels();
3377
+ },
3378
+ draw : function(ease){
3379
+ var easeDecimal = ease || 1,
3380
+ ctx = this.chart.ctx;
3381
+ this.clear();
3382
+ this.scale.draw();
3383
+
3384
+ helpers.each(this.datasets,function(dataset){
3385
+
3386
+ //Transition each point first so that the line and point drawing isn't out of sync
3387
+ helpers.each(dataset.points,function(point,index){
3388
+ if (point.hasValue()){
3389
+ point.transition(this.scale.getPointPosition(index, this.scale.calculateCenterOffset(point.value)), easeDecimal);
3390
+ }
3391
+ },this);
3392
+
3393
+
3394
+
3395
+ //Draw the line between all the points
3396
+ ctx.lineWidth = this.options.datasetStrokeWidth;
3397
+ ctx.strokeStyle = dataset.strokeColor;
3398
+ ctx.beginPath();
3399
+ helpers.each(dataset.points,function(point,index){
3400
+ if (index === 0){
3401
+ ctx.moveTo(point.x,point.y);
3402
+ }
3403
+ else{
3404
+ ctx.lineTo(point.x,point.y);
3405
+ }
3406
+ },this);
3407
+ ctx.closePath();
3408
+ ctx.stroke();
3409
+
3410
+ ctx.fillStyle = dataset.fillColor;
3411
+ ctx.fill();
3412
+
3413
+ //Now draw the points over the line
3414
+ //A little inefficient double looping, but better than the line
3415
+ //lagging behind the point positions
3416
+ helpers.each(dataset.points,function(point){
3417
+ if (point.hasValue()){
3418
+ point.draw();
3419
+ }
3420
+ });
3421
+
3422
+ },this);
3423
+
3424
+ }
3425
+
3426
+ });
3427
+
3428
+
3429
+
3430
+
3431
+
3432
+ }).call(this);