ext_yarn 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (618) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +125 -0
  3. data/.ruby-version +1 -0
  4. data/Gemfile +21 -0
  5. data/Gemfile.lock +78 -0
  6. data/MIT-LICENSE +20 -0
  7. data/README.md +3 -0
  8. data/bin/yarn +12 -0
  9. data/ext_yarn.gemspec +23 -0
  10. data/lib/ext_yarn/engine.rb +21 -0
  11. data/lib/ext_yarn/version.rb +3 -0
  12. data/lib/ext_yarn.rb +5 -0
  13. data/node_modules/.yarn-integrity +64 -0
  14. data/node_modules/bootstrap-sass/LICENSE +22 -0
  15. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/affix.js +162 -0
  16. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/alert.js +94 -0
  17. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/button.js +125 -0
  18. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/carousel.js +237 -0
  19. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/collapse.js +212 -0
  20. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/dropdown.js +165 -0
  21. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/modal.js +339 -0
  22. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/popover.js +108 -0
  23. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/scrollspy.js +172 -0
  24. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/tab.js +155 -0
  25. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/tooltip.js +520 -0
  26. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap/transition.js +59 -0
  27. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap-sprockets.js +12 -0
  28. data/node_modules/bootstrap-sass/assets/javascripts/bootstrap.js +2377 -0
  29. data/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap-compass.scss +9 -0
  30. data/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap-mincer.scss +19 -0
  31. data/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
  32. data/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss +56 -0
  33. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_alerts.scss +73 -0
  34. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_badges.scss +68 -0
  35. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
  36. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
  37. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_buttons.scss +168 -0
  38. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_carousel.scss +270 -0
  39. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_close.scss +36 -0
  40. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_code.scss +69 -0
  41. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_component-animations.scss +37 -0
  42. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_dropdowns.scss +216 -0
  43. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_forms.scss +617 -0
  44. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
  45. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_grid.scss +84 -0
  46. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_input-groups.scss +171 -0
  47. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_jumbotron.scss +54 -0
  48. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_labels.scss +66 -0
  49. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_list-group.scss +130 -0
  50. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_media.scss +66 -0
  51. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_mixins.scss +40 -0
  52. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_modals.scss +150 -0
  53. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_navbar.scss +662 -0
  54. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_navs.scss +242 -0
  55. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_normalize.scss +424 -0
  56. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_pager.scss +54 -0
  57. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_pagination.scss +89 -0
  58. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_panels.scss +271 -0
  59. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_popovers.scss +131 -0
  60. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_print.scss +101 -0
  61. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
  62. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
  63. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_responsive-utilities.scss +179 -0
  64. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
  65. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_tables.scss +234 -0
  66. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_theme.scss +291 -0
  67. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
  68. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_tooltip.scss +101 -0
  69. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_type.scss +298 -0
  70. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_utilities.scss +55 -0
  71. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss +874 -0
  72. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_wells.scss +29 -0
  73. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_alerts.scss +14 -0
  74. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
  75. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  76. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_buttons.scss +65 -0
  77. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  78. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  79. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
  80. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_gradients.scss +58 -0
  81. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
  82. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
  83. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  84. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
  85. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  86. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
  87. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  88. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  89. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_opacity.scss +8 -0
  90. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
  91. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
  92. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
  93. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  94. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  95. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  96. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +21 -0
  97. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
  98. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  99. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  100. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
  101. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  102. data/node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  103. data/node_modules/bootstrap-sass/package.json +44 -0
  104. data/node_modules/bootswatch/cerulean/_bootswatch.scss +131 -0
  105. data/node_modules/bootswatch/cerulean/_variables.scss +870 -0
  106. data/node_modules/bootswatch/cosmo/_bootswatch.scss +262 -0
  107. data/node_modules/bootswatch/cosmo/_variables.scss +870 -0
  108. data/node_modules/bootswatch/cyborg/_bootswatch.scss +243 -0
  109. data/node_modules/bootswatch/cyborg/_variables.scss +870 -0
  110. data/node_modules/bootswatch/darkly/_bootswatch.scss +351 -0
  111. data/node_modules/bootswatch/darkly/_variables.scss +870 -0
  112. data/node_modules/bootswatch/flatly/_bootswatch.scss +330 -0
  113. data/node_modules/bootswatch/flatly/_variables.scss +870 -0
  114. data/node_modules/bootswatch/journal/_bootswatch.scss +145 -0
  115. data/node_modules/bootswatch/journal/_variables.scss +870 -0
  116. data/node_modules/bootswatch/lumen/_bootswatch.scss +523 -0
  117. data/node_modules/bootswatch/lumen/_variables.scss +870 -0
  118. data/node_modules/bootswatch/package.json +26 -0
  119. data/node_modules/bootswatch/paper/_bootswatch.scss +620 -0
  120. data/node_modules/bootswatch/paper/_variables.scss +870 -0
  121. data/node_modules/bootswatch/readable/_bootswatch.scss +183 -0
  122. data/node_modules/bootswatch/readable/_variables.scss +870 -0
  123. data/node_modules/bootswatch/sandstone/_bootswatch.scss +196 -0
  124. data/node_modules/bootswatch/sandstone/_variables.scss +870 -0
  125. data/node_modules/bootswatch/simplex/_bootswatch.scss +170 -0
  126. data/node_modules/bootswatch/simplex/_variables.scss +870 -0
  127. data/node_modules/bootswatch/slate/_bootswatch.scss +448 -0
  128. data/node_modules/bootswatch/slate/_variables.scss +870 -0
  129. data/node_modules/bootswatch/spacelab/_bootswatch.scss +142 -0
  130. data/node_modules/bootswatch/spacelab/_variables.scss +870 -0
  131. data/node_modules/bootswatch/superhero/_bootswatch.scss +360 -0
  132. data/node_modules/bootswatch/superhero/_variables.scss +870 -0
  133. data/node_modules/bootswatch/united/_bootswatch.scss +56 -0
  134. data/node_modules/bootswatch/united/_variables.scss +870 -0
  135. data/node_modules/bootswatch/yeti/_bootswatch.scss +445 -0
  136. data/node_modules/bootswatch/yeti/_variables.scss +870 -0
  137. data/node_modules/chart.js/dist/Chart.bundle.js +18919 -0
  138. data/node_modules/chart.js/dist/Chart.js +14384 -0
  139. data/node_modules/chart.js/package.json +57 -0
  140. data/node_modules/chartkick/chartkick.js +1853 -0
  141. data/node_modules/chartkick/package.json +25 -0
  142. data/node_modules/eonasdan-bootstrap-datetimepicker/package.json +51 -0
  143. data/node_modules/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +2636 -0
  144. data/node_modules/eonasdan-bootstrap-datetimepicker/src/sass/_bootstrap-datetimepicker.scss +344 -0
  145. data/node_modules/eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss +16 -0
  146. data/node_modules/file-saver/FileSaver.js +188 -0
  147. data/node_modules/file-saver/package.json +28 -0
  148. data/node_modules/font-awesome-sass/LICENSE.txt +22 -0
  149. data/node_modules/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
  150. data/node_modules/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.svg +2671 -0
  151. data/node_modules/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
  152. data/node_modules/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
  153. data/node_modules/font-awesome-sass/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
  154. data/node_modules/font-awesome-sass/assets/stylesheets/_font-awesome-compass.scss +5 -0
  155. data/node_modules/font-awesome-sass/assets/stylesheets/_font-awesome-sprockets.scss +5 -0
  156. data/node_modules/font-awesome-sass/assets/stylesheets/_font-awesome.scss +18 -0
  157. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_animated.scss +34 -0
  158. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_bordered-pulled.scss +25 -0
  159. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_core.scss +12 -0
  160. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_fixed-width.scss +6 -0
  161. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_icons.scss +789 -0
  162. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_larger.scss +13 -0
  163. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_list.scss +19 -0
  164. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_mixins.scss +60 -0
  165. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_path.scss +14 -0
  166. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_rotated-flipped.scss +20 -0
  167. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_screen-reader.scss +5 -0
  168. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_stacked.scss +20 -0
  169. data/node_modules/font-awesome-sass/assets/stylesheets/font-awesome/_variables.scss +802 -0
  170. data/node_modules/font-awesome-sass/package.json +19 -0
  171. data/node_modules/jquery/dist/jquery.js +10253 -0
  172. data/node_modules/jquery/dist/jquery.slim.js +8160 -0
  173. data/node_modules/jquery/package.json +97 -0
  174. data/node_modules/jquery-pjax/jquery.pjax.js +903 -0
  175. data/node_modules/jquery-pjax/package.json +18 -0
  176. data/node_modules/jquery-ui/package.json +74 -0
  177. data/node_modules/jquery-ui/themes/base/accordion.css +23 -0
  178. data/node_modules/jquery-ui/themes/base/all.css +12 -0
  179. data/node_modules/jquery-ui/themes/base/autocomplete.css +16 -0
  180. data/node_modules/jquery-ui/themes/base/base.css +30 -0
  181. data/node_modules/jquery-ui/themes/base/button.css +82 -0
  182. data/node_modules/jquery-ui/themes/base/checkboxradio.css +34 -0
  183. data/node_modules/jquery-ui/themes/base/controlgroup.css +65 -0
  184. data/node_modules/jquery-ui/themes/base/core.css +97 -0
  185. data/node_modules/jquery-ui/themes/base/datepicker.css +185 -0
  186. data/node_modules/jquery-ui/themes/base/dialog.css +101 -0
  187. data/node_modules/jquery-ui/themes/base/draggable.css +12 -0
  188. data/node_modules/jquery-ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  189. data/node_modules/jquery-ui/themes/base/images/ui-icons_444444_256x240.png +0 -0
  190. data/node_modules/jquery-ui/themes/base/images/ui-icons_555555_256x240.png +0 -0
  191. data/node_modules/jquery-ui/themes/base/images/ui-icons_777620_256x240.png +0 -0
  192. data/node_modules/jquery-ui/themes/base/images/ui-icons_777777_256x240.png +0 -0
  193. data/node_modules/jquery-ui/themes/base/images/ui-icons_cc0000_256x240.png +0 -0
  194. data/node_modules/jquery-ui/themes/base/images/ui-icons_ffffff_256x240.png +0 -0
  195. data/node_modules/jquery-ui/themes/base/menu.css +64 -0
  196. data/node_modules/jquery-ui/themes/base/progressbar.css +28 -0
  197. data/node_modules/jquery-ui/themes/base/resizable.css +78 -0
  198. data/node_modules/jquery-ui/themes/base/selectable.css +17 -0
  199. data/node_modules/jquery-ui/themes/base/selectmenu.css +50 -0
  200. data/node_modules/jquery-ui/themes/base/slider.css +75 -0
  201. data/node_modules/jquery-ui/themes/base/sortable.css +12 -0
  202. data/node_modules/jquery-ui/themes/base/spinner.css +52 -0
  203. data/node_modules/jquery-ui/themes/base/tabs.css +51 -0
  204. data/node_modules/jquery-ui/themes/base/theme.css +443 -0
  205. data/node_modules/jquery-ui/themes/base/tooltip.css +19 -0
  206. data/node_modules/jquery-ui/ui/core.js +21 -0
  207. data/node_modules/jquery-ui/ui/data.js +39 -0
  208. data/node_modules/jquery-ui/ui/disable-selection.js +46 -0
  209. data/node_modules/jquery-ui/ui/effect.js +1635 -0
  210. data/node_modules/jquery-ui/ui/effects/effect-blind.js +70 -0
  211. data/node_modules/jquery-ui/ui/effects/effect-bounce.js +110 -0
  212. data/node_modules/jquery-ui/ui/effects/effect-clip.js +65 -0
  213. data/node_modules/jquery-ui/ui/effects/effect-drop.js +69 -0
  214. data/node_modules/jquery-ui/ui/effects/effect-explode.js +111 -0
  215. data/node_modules/jquery-ui/ui/effects/effect-fade.js +47 -0
  216. data/node_modules/jquery-ui/ui/effects/effect-fold.js +89 -0
  217. data/node_modules/jquery-ui/ui/effects/effect-highlight.js +57 -0
  218. data/node_modules/jquery-ui/ui/effects/effect-puff.js +42 -0
  219. data/node_modules/jquery-ui/ui/effects/effect-pulsate.js +64 -0
  220. data/node_modules/jquery-ui/ui/effects/effect-scale.js +56 -0
  221. data/node_modules/jquery-ui/ui/effects/effect-shake.js +74 -0
  222. data/node_modules/jquery-ui/ui/effects/effect-size.js +191 -0
  223. data/node_modules/jquery-ui/ui/effects/effect-slide.js +76 -0
  224. data/node_modules/jquery-ui/ui/effects/effect-transfer.js +40 -0
  225. data/node_modules/jquery-ui/ui/escape-selector.js +21 -0
  226. data/node_modules/jquery-ui/ui/focusable.js +84 -0
  227. data/node_modules/jquery-ui/ui/form-reset-mixin.js +77 -0
  228. data/node_modules/jquery-ui/ui/form.js +20 -0
  229. data/node_modules/jquery-ui/ui/i18n/datepicker-af.js +37 -0
  230. data/node_modules/jquery-ui/ui/i18n/datepicker-ar-DZ.js +39 -0
  231. data/node_modules/jquery-ui/ui/i18n/datepicker-ar.js +39 -0
  232. data/node_modules/jquery-ui/ui/i18n/datepicker-az.js +37 -0
  233. data/node_modules/jquery-ui/ui/i18n/datepicker-be.js +37 -0
  234. data/node_modules/jquery-ui/ui/i18n/datepicker-bg.js +38 -0
  235. data/node_modules/jquery-ui/ui/i18n/datepicker-bs.js +37 -0
  236. data/node_modules/jquery-ui/ui/i18n/datepicker-ca.js +37 -0
  237. data/node_modules/jquery-ui/ui/i18n/datepicker-cs.js +37 -0
  238. data/node_modules/jquery-ui/ui/i18n/datepicker-cy-GB.js +45 -0
  239. data/node_modules/jquery-ui/ui/i18n/datepicker-da.js +37 -0
  240. data/node_modules/jquery-ui/ui/i18n/datepicker-de.js +37 -0
  241. data/node_modules/jquery-ui/ui/i18n/datepicker-el.js +37 -0
  242. data/node_modules/jquery-ui/ui/i18n/datepicker-en-AU.js +37 -0
  243. data/node_modules/jquery-ui/ui/i18n/datepicker-en-GB.js +37 -0
  244. data/node_modules/jquery-ui/ui/i18n/datepicker-en-NZ.js +37 -0
  245. data/node_modules/jquery-ui/ui/i18n/datepicker-eo.js +37 -0
  246. data/node_modules/jquery-ui/ui/i18n/datepicker-es.js +37 -0
  247. data/node_modules/jquery-ui/ui/i18n/datepicker-et.js +45 -0
  248. data/node_modules/jquery-ui/ui/i18n/datepicker-eu.js +36 -0
  249. data/node_modules/jquery-ui/ui/i18n/datepicker-fa.js +73 -0
  250. data/node_modules/jquery-ui/ui/i18n/datepicker-fi.js +37 -0
  251. data/node_modules/jquery-ui/ui/i18n/datepicker-fo.js +45 -0
  252. data/node_modules/jquery-ui/ui/i18n/datepicker-fr-CA.js +37 -0
  253. data/node_modules/jquery-ui/ui/i18n/datepicker-fr-CH.js +37 -0
  254. data/node_modules/jquery-ui/ui/i18n/datepicker-fr.js +39 -0
  255. data/node_modules/jquery-ui/ui/i18n/datepicker-gl.js +37 -0
  256. data/node_modules/jquery-ui/ui/i18n/datepicker-he.js +37 -0
  257. data/node_modules/jquery-ui/ui/i18n/datepicker-hi.js +37 -0
  258. data/node_modules/jquery-ui/ui/i18n/datepicker-hr.js +37 -0
  259. data/node_modules/jquery-ui/ui/i18n/datepicker-hu.js +36 -0
  260. data/node_modules/jquery-ui/ui/i18n/datepicker-hy.js +37 -0
  261. data/node_modules/jquery-ui/ui/i18n/datepicker-id.js +37 -0
  262. data/node_modules/jquery-ui/ui/i18n/datepicker-is.js +45 -0
  263. data/node_modules/jquery-ui/ui/i18n/datepicker-it-CH.js +37 -0
  264. data/node_modules/jquery-ui/ui/i18n/datepicker-it.js +37 -0
  265. data/node_modules/jquery-ui/ui/i18n/datepicker-ja.js +37 -0
  266. data/node_modules/jquery-ui/ui/i18n/datepicker-ka.js +48 -0
  267. data/node_modules/jquery-ui/ui/i18n/datepicker-kk.js +37 -0
  268. data/node_modules/jquery-ui/ui/i18n/datepicker-km.js +37 -0
  269. data/node_modules/jquery-ui/ui/i18n/datepicker-ko.js +37 -0
  270. data/node_modules/jquery-ui/ui/i18n/datepicker-ky.js +38 -0
  271. data/node_modules/jquery-ui/ui/i18n/datepicker-lb.js +45 -0
  272. data/node_modules/jquery-ui/ui/i18n/datepicker-lt.js +45 -0
  273. data/node_modules/jquery-ui/ui/i18n/datepicker-lv.js +45 -0
  274. data/node_modules/jquery-ui/ui/i18n/datepicker-mk.js +37 -0
  275. data/node_modules/jquery-ui/ui/i18n/datepicker-ml.js +37 -0
  276. data/node_modules/jquery-ui/ui/i18n/datepicker-ms.js +37 -0
  277. data/node_modules/jquery-ui/ui/i18n/datepicker-nb.js +49 -0
  278. data/node_modules/jquery-ui/ui/i18n/datepicker-nl-BE.js +37 -0
  279. data/node_modules/jquery-ui/ui/i18n/datepicker-nl.js +37 -0
  280. data/node_modules/jquery-ui/ui/i18n/datepicker-nn.js +49 -0
  281. data/node_modules/jquery-ui/ui/i18n/datepicker-no.js +50 -0
  282. data/node_modules/jquery-ui/ui/i18n/datepicker-pl.js +37 -0
  283. data/node_modules/jquery-ui/ui/i18n/datepicker-pt-BR.js +45 -0
  284. data/node_modules/jquery-ui/ui/i18n/datepicker-pt.js +44 -0
  285. data/node_modules/jquery-ui/ui/i18n/datepicker-rm.js +61 -0
  286. data/node_modules/jquery-ui/ui/i18n/datepicker-ro.js +40 -0
  287. data/node_modules/jquery-ui/ui/i18n/datepicker-ru.js +37 -0
  288. data/node_modules/jquery-ui/ui/i18n/datepicker-sk.js +37 -0
  289. data/node_modules/jquery-ui/ui/i18n/datepicker-sl.js +38 -0
  290. data/node_modules/jquery-ui/ui/i18n/datepicker-sq.js +37 -0
  291. data/node_modules/jquery-ui/ui/i18n/datepicker-sr-SR.js +37 -0
  292. data/node_modules/jquery-ui/ui/i18n/datepicker-sr.js +37 -0
  293. data/node_modules/jquery-ui/ui/i18n/datepicker-sv.js +37 -0
  294. data/node_modules/jquery-ui/ui/i18n/datepicker-ta.js +53 -0
  295. data/node_modules/jquery-ui/ui/i18n/datepicker-th.js +37 -0
  296. data/node_modules/jquery-ui/ui/i18n/datepicker-tj.js +37 -0
  297. data/node_modules/jquery-ui/ui/i18n/datepicker-tr.js +37 -0
  298. data/node_modules/jquery-ui/ui/i18n/datepicker-uk.js +38 -0
  299. data/node_modules/jquery-ui/ui/i18n/datepicker-vi.js +37 -0
  300. data/node_modules/jquery-ui/ui/i18n/datepicker-zh-CN.js +37 -0
  301. data/node_modules/jquery-ui/ui/i18n/datepicker-zh-HK.js +37 -0
  302. data/node_modules/jquery-ui/ui/i18n/datepicker-zh-TW.js +37 -0
  303. data/node_modules/jquery-ui/ui/ie.js +15 -0
  304. data/node_modules/jquery-ui/ui/jquery-1-7.js +89 -0
  305. data/node_modules/jquery-ui/ui/keycode.js +45 -0
  306. data/node_modules/jquery-ui/ui/labels.js +62 -0
  307. data/node_modules/jquery-ui/ui/plugin.js +44 -0
  308. data/node_modules/jquery-ui/ui/position.js +498 -0
  309. data/node_modules/jquery-ui/ui/safe-active-element.js +40 -0
  310. data/node_modules/jquery-ui/ui/safe-blur.js +21 -0
  311. data/node_modules/jquery-ui/ui/scroll-parent.js +45 -0
  312. data/node_modules/jquery-ui/ui/tabbable.js +35 -0
  313. data/node_modules/jquery-ui/ui/unique-id.js +49 -0
  314. data/node_modules/jquery-ui/ui/version.js +17 -0
  315. data/node_modules/jquery-ui/ui/widget.js +733 -0
  316. data/node_modules/jquery-ui/ui/widgets/accordion.js +613 -0
  317. data/node_modules/jquery-ui/ui/widgets/autocomplete.js +682 -0
  318. data/node_modules/jquery-ui/ui/widgets/button.js +386 -0
  319. data/node_modules/jquery-ui/ui/widgets/checkboxradio.js +286 -0
  320. data/node_modules/jquery-ui/ui/widgets/controlgroup.js +298 -0
  321. data/node_modules/jquery-ui/ui/widgets/datepicker.js +2120 -0
  322. data/node_modules/jquery-ui/ui/widgets/dialog.js +940 -0
  323. data/node_modules/jquery-ui/ui/widgets/draggable.js +1250 -0
  324. data/node_modules/jquery-ui/ui/widgets/droppable.js +497 -0
  325. data/node_modules/jquery-ui/ui/widgets/menu.js +673 -0
  326. data/node_modules/jquery-ui/ui/widgets/mouse.js +226 -0
  327. data/node_modules/jquery-ui/ui/widgets/progressbar.js +178 -0
  328. data/node_modules/jquery-ui/ui/widgets/resizable.js +1201 -0
  329. data/node_modules/jquery-ui/ui/widgets/selectable.js +310 -0
  330. data/node_modules/jquery-ui/ui/widgets/selectmenu.js +687 -0
  331. data/node_modules/jquery-ui/ui/widgets/slider.js +752 -0
  332. data/node_modules/jquery-ui/ui/widgets/sortable.js +1554 -0
  333. data/node_modules/jquery-ui/ui/widgets/spinner.js +575 -0
  334. data/node_modules/jquery-ui/ui/widgets/tabs.js +924 -0
  335. data/node_modules/jquery-ui/ui/widgets/tooltip.js +520 -0
  336. data/node_modules/jquery-ujs/package.json +26 -0
  337. data/node_modules/jquery-ujs/src/rails.js +555 -0
  338. data/node_modules/js-cookie/package.json +49 -0
  339. data/node_modules/js-cookie/src/js.cookie.js +165 -0
  340. data/node_modules/jstz/dist/jstz.js +1428 -0
  341. data/node_modules/jstz/package.json +57 -0
  342. data/node_modules/lodash/core.js +3836 -0
  343. data/node_modules/lodash/lodash.js +17084 -0
  344. data/node_modules/lodash/package.json +17 -0
  345. data/node_modules/moment/locale/af.js +74 -0
  346. data/node_modules/moment/locale/ar-dz.js +60 -0
  347. data/node_modules/moment/locale/ar-kw.js +60 -0
  348. data/node_modules/moment/locale/ar-ly.js +127 -0
  349. data/node_modules/moment/locale/ar-ma.js +61 -0
  350. data/node_modules/moment/locale/ar-sa.js +106 -0
  351. data/node_modules/moment/locale/ar-tn.js +60 -0
  352. data/node_modules/moment/locale/ar.js +143 -0
  353. data/node_modules/moment/locale/az.js +106 -0
  354. data/node_modules/moment/locale/be.js +135 -0
  355. data/node_modules/moment/locale/bg.js +91 -0
  356. data/node_modules/moment/locale/bm.js +60 -0
  357. data/node_modules/moment/locale/bn.js +120 -0
  358. data/node_modules/moment/locale/bo.js +120 -0
  359. data/node_modules/moment/locale/br.js +109 -0
  360. data/node_modules/moment/locale/bs.js +153 -0
  361. data/node_modules/moment/locale/ca.js +89 -0
  362. data/node_modules/moment/locale/cs.js +180 -0
  363. data/node_modules/moment/locale/cv.js +64 -0
  364. data/node_modules/moment/locale/cy.js +82 -0
  365. data/node_modules/moment/locale/da.js +61 -0
  366. data/node_modules/moment/locale/de-at.js +80 -0
  367. data/node_modules/moment/locale/de-ch.js +79 -0
  368. data/node_modules/moment/locale/de.js +79 -0
  369. data/node_modules/moment/locale/dv.js +101 -0
  370. data/node_modules/moment/locale/el.js +101 -0
  371. data/node_modules/moment/locale/en-au.js +68 -0
  372. data/node_modules/moment/locale/en-ca.js +64 -0
  373. data/node_modules/moment/locale/en-gb.js +68 -0
  374. data/node_modules/moment/locale/en-ie.js +68 -0
  375. data/node_modules/moment/locale/en-nz.js +68 -0
  376. data/node_modules/moment/locale/eo.js +74 -0
  377. data/node_modules/moment/locale/es-do.js +92 -0
  378. data/node_modules/moment/locale/es-us.js +84 -0
  379. data/node_modules/moment/locale/es.js +93 -0
  380. data/node_modules/moment/locale/et.js +82 -0
  381. data/node_modules/moment/locale/eu.js +67 -0
  382. data/node_modules/moment/locale/fa.js +108 -0
  383. data/node_modules/moment/locale/fi.js +110 -0
  384. data/node_modules/moment/locale/fo.js +61 -0
  385. data/node_modules/moment/locale/fr-ca.js +75 -0
  386. data/node_modules/moment/locale/fr-ch.js +79 -0
  387. data/node_modules/moment/locale/fr.js +84 -0
  388. data/node_modules/moment/locale/fy.js +76 -0
  389. data/node_modules/moment/locale/gd.js +77 -0
  390. data/node_modules/moment/locale/gl.js +78 -0
  391. data/node_modules/moment/locale/gom-latn.js +124 -0
  392. data/node_modules/moment/locale/gu.js +125 -0
  393. data/node_modules/moment/locale/he.js +100 -0
  394. data/node_modules/moment/locale/hi.js +125 -0
  395. data/node_modules/moment/locale/hr.js +155 -0
  396. data/node_modules/moment/locale/hu.js +111 -0
  397. data/node_modules/moment/locale/hy-am.js +96 -0
  398. data/node_modules/moment/locale/id.js +84 -0
  399. data/node_modules/moment/locale/is.js +133 -0
  400. data/node_modules/moment/locale/it.js +71 -0
  401. data/node_modules/moment/locale/ja.js +81 -0
  402. data/node_modules/moment/locale/jv.js +84 -0
  403. data/node_modules/moment/locale/ka.js +90 -0
  404. data/node_modules/moment/locale/kk.js +88 -0
  405. data/node_modules/moment/locale/km.js +59 -0
  406. data/node_modules/moment/locale/kn.js +127 -0
  407. data/node_modules/moment/locale/ko.js +83 -0
  408. data/node_modules/moment/locale/ky.js +89 -0
  409. data/node_modules/moment/locale/lb.js +138 -0
  410. data/node_modules/moment/locale/lo.js +71 -0
  411. data/node_modules/moment/locale/lt.js +119 -0
  412. data/node_modules/moment/locale/lv.js +99 -0
  413. data/node_modules/moment/locale/me.js +113 -0
  414. data/node_modules/moment/locale/mi.js +65 -0
  415. data/node_modules/moment/locale/mk.js +91 -0
  416. data/node_modules/moment/locale/ml.js +82 -0
  417. data/node_modules/moment/locale/mr.js +162 -0
  418. data/node_modules/moment/locale/ms-my.js +84 -0
  419. data/node_modules/moment/locale/ms.js +83 -0
  420. data/node_modules/moment/locale/mt.js +61 -0
  421. data/node_modules/moment/locale/my.js +97 -0
  422. data/node_modules/moment/locale/nb.js +64 -0
  423. data/node_modules/moment/locale/ne.js +124 -0
  424. data/node_modules/moment/locale/nl-be.js +89 -0
  425. data/node_modules/moment/locale/nl.js +89 -0
  426. data/node_modules/moment/locale/nn.js +61 -0
  427. data/node_modules/moment/locale/pa-in.js +125 -0
  428. data/node_modules/moment/locale/pl.js +127 -0
  429. data/node_modules/moment/locale/pt-br.js +62 -0
  430. data/node_modules/moment/locale/pt.js +66 -0
  431. data/node_modules/moment/locale/ro.js +77 -0
  432. data/node_modules/moment/locale/ru.js +185 -0
  433. data/node_modules/moment/locale/sd.js +99 -0
  434. data/node_modules/moment/locale/se.js +62 -0
  435. data/node_modules/moment/locale/si.js +72 -0
  436. data/node_modules/moment/locale/sk.js +158 -0
  437. data/node_modules/moment/locale/sl.js +174 -0
  438. data/node_modules/moment/locale/sq.js +71 -0
  439. data/node_modules/moment/locale/sr-cyrl.js +112 -0
  440. data/node_modules/moment/locale/sr.js +112 -0
  441. data/node_modules/moment/locale/ss.js +90 -0
  442. data/node_modules/moment/locale/sv.js +70 -0
  443. data/node_modules/moment/locale/sw.js +60 -0
  444. data/node_modules/moment/locale/ta.js +131 -0
  445. data/node_modules/moment/locale/te.js +90 -0
  446. data/node_modules/moment/locale/tet.js +69 -0
  447. data/node_modules/moment/locale/th.js +68 -0
  448. data/node_modules/moment/locale/tl-ph.js +63 -0
  449. data/node_modules/moment/locale/tlh.js +123 -0
  450. data/node_modules/moment/locale/tr.js +91 -0
  451. data/node_modules/moment/locale/tzl.js +93 -0
  452. data/node_modules/moment/locale/tzm-latn.js +59 -0
  453. data/node_modules/moment/locale/tzm.js +59 -0
  454. data/node_modules/moment/locale/uk.js +153 -0
  455. data/node_modules/moment/locale/ur.js +100 -0
  456. data/node_modules/moment/locale/uz-latn.js +59 -0
  457. data/node_modules/moment/locale/uz.js +59 -0
  458. data/node_modules/moment/locale/vi.js +80 -0
  459. data/node_modules/moment/locale/x-pseudo.js +69 -0
  460. data/node_modules/moment/locale/yo.js +61 -0
  461. data/node_modules/moment/locale/zh-cn.js +112 -0
  462. data/node_modules/moment/locale/zh-hk.js +106 -0
  463. data/node_modules/moment/locale/zh-tw.js +105 -0
  464. data/node_modules/moment/min/locales.js +9769 -0
  465. data/node_modules/moment/min/moment-with-locales.js +14289 -0
  466. data/node_modules/moment/moment.js +4535 -0
  467. data/node_modules/moment/package.json +99 -0
  468. data/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js +1204 -0
  469. data/node_modules/moment-timezone/builds/moment-timezone-with-data.js +1204 -0
  470. data/node_modules/moment-timezone/moment-timezone-utils.js +316 -0
  471. data/node_modules/moment-timezone/moment-timezone.js +605 -0
  472. data/node_modules/moment-timezone/package.json +50 -0
  473. data/node_modules/nprogress/nprogress.css +74 -0
  474. data/node_modules/nprogress/nprogress.js +480 -0
  475. data/node_modules/nprogress/package.json +47 -0
  476. data/node_modules/nprogress/support/extras.css +4 -0
  477. data/node_modules/roboto-fontface/css/mixins.scss +36 -0
  478. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-black-italic.scss +3 -0
  479. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-black.scss +3 -0
  480. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-bold-italic.scss +3 -0
  481. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-bold.scss +3 -0
  482. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-light-italic.scss +3 -0
  483. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-light.scss +3 -0
  484. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-medium-italic.scss +3 -0
  485. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-medium.scss +3 -0
  486. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-regular-italic.scss +3 -0
  487. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-regular.scss +3 -0
  488. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-thin-italic.scss +3 -0
  489. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-thin.scss +3 -0
  490. data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss +12 -0
  491. data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-bold-italic.scss +3 -0
  492. data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-bold.scss +3 -0
  493. data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-light-italic.scss +3 -0
  494. data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-light.scss +3 -0
  495. data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-regular-italic.scss +3 -0
  496. data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-regular.scss +3 -0
  497. data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface.scss +6 -0
  498. data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-bold.scss +3 -0
  499. data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-light.scss +3 -0
  500. data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-regular.scss +3 -0
  501. data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-thin.scss +3 -0
  502. data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface.scss +4 -0
  503. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.eot +0 -0
  504. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.svg +10968 -0
  505. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.ttf +0 -0
  506. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.woff +0 -0
  507. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.woff2 +0 -0
  508. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.eot +0 -0
  509. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.svg +11086 -0
  510. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.ttf +0 -0
  511. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.woff +0 -0
  512. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.woff2 +0 -0
  513. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.eot +0 -0
  514. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.svg +11010 -0
  515. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.ttf +0 -0
  516. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff +0 -0
  517. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff2 +0 -0
  518. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.eot +0 -0
  519. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.svg +11096 -0
  520. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.ttf +0 -0
  521. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff +0 -0
  522. data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff2 +0 -0
  523. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.eot +0 -0
  524. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.svg +10564 -0
  525. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.ttf +0 -0
  526. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff +0 -0
  527. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff2 +0 -0
  528. data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.eot +0 -0
  529. data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.svg +10646 -0
  530. data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.ttf +0 -0
  531. data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.woff +0 -0
  532. data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.woff2 +0 -0
  533. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.eot +0 -0
  534. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.svg +10999 -0
  535. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.ttf +0 -0
  536. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff +0 -0
  537. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff2 +0 -0
  538. data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.eot +0 -0
  539. data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.svg +11100 -0
  540. data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.ttf +0 -0
  541. data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff +0 -0
  542. data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff2 +0 -0
  543. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.eot +0 -0
  544. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.svg +10520 -0
  545. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.ttf +0 -0
  546. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff +0 -0
  547. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff2 +0 -0
  548. data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.eot +0 -0
  549. data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.svg +10629 -0
  550. data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.ttf +0 -0
  551. data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff +0 -0
  552. data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff2 +0 -0
  553. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.eot +0 -0
  554. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.svg +10617 -0
  555. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.ttf +0 -0
  556. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.woff +0 -0
  557. data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.woff2 +0 -0
  558. data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.eot +0 -0
  559. data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.svg +10726 -0
  560. data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.ttf +0 -0
  561. data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.woff +0 -0
  562. data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.woff2 +0 -0
  563. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.eot +0 -0
  564. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.svg +643 -0
  565. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.ttf +0 -0
  566. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.woff +0 -0
  567. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.woff2 +0 -0
  568. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.eot +0 -0
  569. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.svg +643 -0
  570. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.ttf +0 -0
  571. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.woff +0 -0
  572. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.woff2 +0 -0
  573. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.eot +0 -0
  574. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.svg +643 -0
  575. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.ttf +0 -0
  576. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.woff +0 -0
  577. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.woff2 +0 -0
  578. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.eot +0 -0
  579. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.svg +643 -0
  580. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.ttf +0 -0
  581. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.woff +0 -0
  582. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.woff2 +0 -0
  583. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.eot +0 -0
  584. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.svg +644 -0
  585. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.ttf +0 -0
  586. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff +0 -0
  587. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff2 +0 -0
  588. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.eot +0 -0
  589. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.svg +644 -0
  590. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.ttf +0 -0
  591. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.woff +0 -0
  592. data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.woff2 +0 -0
  593. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.eot +0 -0
  594. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.svg +679 -0
  595. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.ttf +0 -0
  596. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.woff +0 -0
  597. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.woff2 +0 -0
  598. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.eot +0 -0
  599. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.svg +678 -0
  600. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.ttf +0 -0
  601. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.woff +0 -0
  602. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.woff2 +0 -0
  603. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.eot +0 -0
  604. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.svg +678 -0
  605. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.ttf +0 -0
  606. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.woff +0 -0
  607. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.woff2 +0 -0
  608. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.eot +0 -0
  609. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.svg +678 -0
  610. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.ttf +0 -0
  611. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.woff +0 -0
  612. data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.woff2 +0 -0
  613. data/node_modules/roboto-fontface/package.json +28 -0
  614. data/node_modules/signature_pad/dist/signature_pad.js +610 -0
  615. data/node_modules/signature_pad/package.json +41 -0
  616. data/package.json +25 -0
  617. data/yarn.lock +126 -0
  618. metadata +708 -0
@@ -0,0 +1,1853 @@
1
+ /*
2
+ * Chartkick.js
3
+ * Create beautiful charts with one line of JavaScript
4
+ * https://github.com/ankane/chartkick.js
5
+ * v2.2.4
6
+ * MIT License
7
+ */
8
+
9
+ /*jslint browser: true, indent: 2, plusplus: true, vars: true */
10
+
11
+ (function (window) {
12
+ 'use strict';
13
+
14
+ var config = window.Chartkick || {};
15
+ var Chartkick, ISO8601_PATTERN, DECIMAL_SEPARATOR, adapters = [];
16
+ var DATE_PATTERN = /^(\d\d\d\d)(\-)?(\d\d)(\-)?(\d\d)$/i;
17
+ var GoogleChartsAdapter, HighchartsAdapter, ChartjsAdapter;
18
+ var pendingRequests = [], runningRequests = 0, maxRequests = 4;
19
+
20
+ // helpers
21
+
22
+ function isArray(variable) {
23
+ return Object.prototype.toString.call(variable) === "[object Array]";
24
+ }
25
+
26
+ function isFunction(variable) {
27
+ return variable instanceof Function;
28
+ }
29
+
30
+ function isPlainObject(variable) {
31
+ return !isFunction(variable) && variable instanceof Object;
32
+ }
33
+
34
+ // https://github.com/madrobby/zepto/blob/master/src/zepto.js
35
+ function extend(target, source) {
36
+ var key;
37
+ for (key in source) {
38
+ if (isPlainObject(source[key]) || isArray(source[key])) {
39
+ if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
40
+ target[key] = {};
41
+ }
42
+ if (isArray(source[key]) && !isArray(target[key])) {
43
+ target[key] = [];
44
+ }
45
+ extend(target[key], source[key]);
46
+ } else if (source[key] !== undefined) {
47
+ target[key] = source[key];
48
+ }
49
+ }
50
+ }
51
+
52
+ function merge(obj1, obj2) {
53
+ var target = {};
54
+ extend(target, obj1);
55
+ extend(target, obj2);
56
+ return target;
57
+ }
58
+
59
+ // https://github.com/Do/iso8601.js
60
+ ISO8601_PATTERN = /(\d\d\d\d)(\-)?(\d\d)(\-)?(\d\d)(T)?(\d\d)(:)?(\d\d)?(:)?(\d\d)?([\.,]\d+)?($|Z|([\+\-])(\d\d)(:)?(\d\d)?)/i;
61
+ DECIMAL_SEPARATOR = String(1.5).charAt(1);
62
+
63
+ function parseISO8601(input) {
64
+ var day, hour, matches, milliseconds, minutes, month, offset, result, seconds, type, year;
65
+ type = Object.prototype.toString.call(input);
66
+ if (type === "[object Date]") {
67
+ return input;
68
+ }
69
+ if (type !== "[object String]") {
70
+ return;
71
+ }
72
+ matches = input.match(ISO8601_PATTERN);
73
+ if (matches) {
74
+ year = parseInt(matches[1], 10);
75
+ month = parseInt(matches[3], 10) - 1;
76
+ day = parseInt(matches[5], 10);
77
+ hour = parseInt(matches[7], 10);
78
+ minutes = matches[9] ? parseInt(matches[9], 10) : 0;
79
+ seconds = matches[11] ? parseInt(matches[11], 10) : 0;
80
+ milliseconds = matches[12] ? parseFloat(DECIMAL_SEPARATOR + matches[12].slice(1)) * 1000 : 0;
81
+ result = Date.UTC(year, month, day, hour, minutes, seconds, milliseconds);
82
+ if (matches[13] && matches[14]) {
83
+ offset = matches[15] * 60;
84
+ if (matches[17]) {
85
+ offset += parseInt(matches[17], 10);
86
+ }
87
+ offset *= matches[14] === "-" ? -1 : 1;
88
+ result -= offset * 60 * 1000;
89
+ }
90
+ return new Date(result);
91
+ }
92
+ }
93
+ // end iso8601.js
94
+
95
+ function negativeValues(series) {
96
+ var i, j, data;
97
+ for (i = 0; i < series.length; i++) {
98
+ data = series[i].data;
99
+ for (j = 0; j < data.length; j++) {
100
+ if (data[j][1] < 0) {
101
+ return true;
102
+ }
103
+ }
104
+ }
105
+ return false;
106
+ }
107
+
108
+ function jsOptionsFunc(defaultOptions, hideLegend, setTitle, setMin, setMax, setStacked, setXtitle, setYtitle) {
109
+ return function (chart, opts, chartOptions) {
110
+ var series = chart.data;
111
+ var options = merge({}, defaultOptions);
112
+ options = merge(options, chartOptions || {});
113
+
114
+ if (chart.hideLegend || "legend" in opts) {
115
+ hideLegend(options, opts.legend, chart.hideLegend);
116
+ }
117
+
118
+ if (opts.title) {
119
+ setTitle(options, opts.title);
120
+ }
121
+
122
+ // min
123
+ if ("min" in opts) {
124
+ setMin(options, opts.min);
125
+ } else if (!negativeValues(series)) {
126
+ setMin(options, 0);
127
+ }
128
+
129
+ // max
130
+ if (opts.max) {
131
+ setMax(options, opts.max);
132
+ }
133
+
134
+ if ("stacked" in opts) {
135
+ setStacked(options, opts.stacked);
136
+ }
137
+
138
+ if (opts.colors) {
139
+ options.colors = opts.colors;
140
+ }
141
+
142
+ if (opts.xtitle) {
143
+ setXtitle(options, opts.xtitle);
144
+ }
145
+
146
+ if (opts.ytitle) {
147
+ setYtitle(options, opts.ytitle);
148
+ }
149
+
150
+ // merge library last
151
+ options = merge(options, opts.library || {});
152
+
153
+ return options;
154
+ };
155
+ }
156
+
157
+ function setText(element, text) {
158
+ if (document.body.innerText) {
159
+ element.innerText = text;
160
+ } else {
161
+ element.textContent = text;
162
+ }
163
+ }
164
+
165
+ function chartError(element, message) {
166
+ setText(element, "Error Loading Chart: " + message);
167
+ element.style.color = "#ff0000";
168
+ }
169
+
170
+ function pushRequest(element, url, success) {
171
+ pendingRequests.push([element, url, success]);
172
+ runNext();
173
+ }
174
+
175
+ function runNext() {
176
+ if (runningRequests < maxRequests) {
177
+ var request = pendingRequests.shift()
178
+ if (request) {
179
+ runningRequests++;
180
+ getJSON(request[0], request[1], request[2]);
181
+ runNext();
182
+ }
183
+ }
184
+ }
185
+
186
+ function requestComplete() {
187
+ runningRequests--;
188
+ runNext();
189
+ }
190
+
191
+ function getJSON(element, url, success) {
192
+ ajaxCall(url, success, function (jqXHR, textStatus, errorThrown) {
193
+ // PATCH_BEGIN
194
+ var message = jqXHR.getResponseHeader("X-Status-Reason");
195
+ if (jqXHR.status === 413) {
196
+ message = message || "Request Entity Too Large";
197
+ }
198
+ message = message || ((typeof errorThrown === "string") ? errorThrown : errorThrown.message);
199
+ // PATCH_END
200
+ chartError(element, message);
201
+ });
202
+ }
203
+
204
+ function ajaxCall(url, success, error) {
205
+ var $ = window.jQuery || window.Zepto || window.$;
206
+
207
+ if ($) {
208
+ $.ajax({
209
+ dataType: "json",
210
+ url: url,
211
+ success: success,
212
+ error: error,
213
+ complete: requestComplete
214
+ });
215
+ } else {
216
+ var xhr = new XMLHttpRequest();
217
+ xhr.open("GET", url, true);
218
+ xhr.setRequestHeader("Content-Type", "application/json");
219
+ xhr.onload = function () {
220
+ requestComplete();
221
+ if (xhr.status === 200) {
222
+ success(JSON.parse(xhr.responseText), xhr.statusText, xhr);
223
+ } else {
224
+ error(xhr, "error", xhr.statusText);
225
+ }
226
+ };
227
+ xhr.send();
228
+ }
229
+ }
230
+
231
+ function errorCatcher(chart, callback) {
232
+ try {
233
+ callback(chart);
234
+ } catch (err) {
235
+ chartError(chart.element, err.message);
236
+ throw err;
237
+ }
238
+ }
239
+
240
+ function fetchDataSource(chart, callback, dataSource) {
241
+ if (typeof dataSource === "string") {
242
+ pushRequest(chart.element, dataSource, function (data, textStatus, jqXHR) {
243
+ chart.rawData = data;
244
+ errorCatcher(chart, callback);
245
+ });
246
+ } else {
247
+ chart.rawData = dataSource;
248
+ errorCatcher(chart, callback);
249
+ }
250
+ }
251
+
252
+ function addDownloadButton(chart) {
253
+ var element = chart.element;
254
+ var link = document.createElement("a");
255
+ link.download = chart.options.download === true ? "chart.png" : chart.options.download; // http://caniuse.com/download
256
+ link.style.position = "absolute";
257
+ link.style.top = "20px";
258
+ link.style.right = "20px";
259
+ link.style.zIndex = 1000;
260
+ link.style.lineHeight = "20px";
261
+ link.target = "_blank"; // for safari
262
+ var image = document.createElement("img");
263
+ image.alt = "Download";
264
+ image.style.border = "none";
265
+ // icon from font-awesome
266
+ // http://fa2png.io/
267
+ image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==";
268
+ link.appendChild(image);
269
+ element.style.position = "relative";
270
+
271
+ chart.downloadAttached = true;
272
+
273
+ // mouseenter
274
+ addEvent(element, "mouseover", function(e) {
275
+ var related = e.relatedTarget;
276
+ // check download option again to ensure it wasn't changed
277
+ if (!related || (related !== this && !childOf(this, related)) && chart.options.download) {
278
+ link.href = chart.toImage();
279
+ element.appendChild(link);
280
+ }
281
+ });
282
+
283
+ // mouseleave
284
+ addEvent(element, "mouseout", function(e) {
285
+ var related = e.relatedTarget;
286
+ if (!related || (related !== this && !childOf(this, related))) {
287
+ if (link.parentNode) {
288
+ link.parentNode.removeChild(link);
289
+ }
290
+ }
291
+ });
292
+ }
293
+
294
+ // http://stackoverflow.com/questions/10149963/adding-event-listener-cross-browser
295
+ function addEvent(elem, event, fn) {
296
+ if (elem.addEventListener) {
297
+ elem.addEventListener(event, fn, false);
298
+ } else {
299
+ elem.attachEvent("on" + event, function() {
300
+ // set the this pointer same as addEventListener when fn is called
301
+ return(fn.call(elem, window.event));
302
+ });
303
+ }
304
+ }
305
+
306
+ // https://gist.github.com/shawnbot/4166283
307
+ function childOf(p, c) {
308
+ if (p === c) return false;
309
+ while (c && c !== p) c = c.parentNode;
310
+ return c === p;
311
+ }
312
+
313
+ // type conversions
314
+
315
+ function toStr(n) {
316
+ return "" + n;
317
+ }
318
+
319
+ function toFloat(n) {
320
+ return parseFloat(n);
321
+ }
322
+
323
+ function toDate(n) {
324
+ var matches, year, month, day;
325
+ if (typeof n !== "object") {
326
+ if (typeof n === "number") {
327
+ n = new Date(n * 1000); // ms
328
+ } else {
329
+ n = toStr(n);
330
+ if ((matches = n.match(DATE_PATTERN))) {
331
+ year = parseInt(matches[1], 10);
332
+ month = parseInt(matches[3], 10) - 1;
333
+ day = parseInt(matches[5], 10);
334
+ return new Date(year, month, day);
335
+ } else { // str
336
+ // try our best to get the str into iso8601
337
+ // TODO be smarter about this
338
+ var str = n.replace(/ /, "T").replace(" ", "").replace("UTC", "Z");
339
+ n = parseISO8601(str) || new Date(n);
340
+ }
341
+ }
342
+ }
343
+ return n;
344
+ }
345
+
346
+ function toArr(n) {
347
+ if (!isArray(n)) {
348
+ var arr = [], i;
349
+ for (i in n) {
350
+ if (n.hasOwnProperty(i)) {
351
+ arr.push([i, n[i]]);
352
+ }
353
+ }
354
+ n = arr;
355
+ }
356
+ return n;
357
+ }
358
+
359
+ function sortByTime(a, b) {
360
+ return a[0].getTime() - b[0].getTime();
361
+ }
362
+
363
+ function sortByNumberSeries(a, b) {
364
+ return a[0] - b[0];
365
+ }
366
+
367
+ function sortByNumber(a, b) {
368
+ return a - b;
369
+ }
370
+
371
+ function loadAdapters() {
372
+ if (!HighchartsAdapter && "Highcharts" in window) {
373
+ HighchartsAdapter = new function () {
374
+ var Highcharts = window.Highcharts;
375
+
376
+ this.name = "highcharts";
377
+
378
+ var defaultOptions = {
379
+ chart: {},
380
+ xAxis: {
381
+ title: {
382
+ text: null
383
+ },
384
+ labels: {
385
+ style: {
386
+ fontSize: "12px"
387
+ }
388
+ }
389
+ },
390
+ yAxis: {
391
+ title: {
392
+ text: null
393
+ },
394
+ labels: {
395
+ style: {
396
+ fontSize: "12px"
397
+ }
398
+ }
399
+ },
400
+ title: {
401
+ text: null
402
+ },
403
+ credits: {
404
+ enabled: false
405
+ },
406
+ legend: {
407
+ borderWidth: 0
408
+ },
409
+ tooltip: {
410
+ style: {
411
+ fontSize: "12px"
412
+ }
413
+ },
414
+ plotOptions: {
415
+ areaspline: {},
416
+ series: {
417
+ marker: {}
418
+ }
419
+ }
420
+ };
421
+
422
+ var hideLegend = function (options, legend, hideLegend) {
423
+ if (legend !== undefined) {
424
+ options.legend.enabled = !!legend;
425
+ if (legend && legend !== true) {
426
+ if (legend === "top" || legend === "bottom") {
427
+ options.legend.verticalAlign = legend;
428
+ } else {
429
+ options.legend.layout = "vertical";
430
+ options.legend.verticalAlign = "middle";
431
+ options.legend.align = legend;
432
+ }
433
+ }
434
+ } else if (hideLegend) {
435
+ options.legend.enabled = false;
436
+ }
437
+ };
438
+
439
+ var setTitle = function (options, title) {
440
+ options.title.text = title;
441
+ };
442
+
443
+ var setMin = function (options, min) {
444
+ options.yAxis.min = min;
445
+ };
446
+
447
+ var setMax = function (options, max) {
448
+ options.yAxis.max = max;
449
+ };
450
+
451
+ var setStacked = function (options, stacked) {
452
+ options.plotOptions.series.stacking = stacked ? "normal" : null;
453
+ };
454
+
455
+ var setXtitle = function (options, title) {
456
+ options.xAxis.title.text = title;
457
+ };
458
+
459
+ var setYtitle = function (options, title) {
460
+ options.yAxis.title.text = title;
461
+ };
462
+
463
+ var jsOptions = jsOptionsFunc(defaultOptions, hideLegend, setTitle, setMin, setMax, setStacked, setXtitle, setYtitle);
464
+
465
+ this.renderLineChart = function (chart, chartType) {
466
+ chartType = chartType || "spline";
467
+ var chartOptions = {};
468
+ if (chartType === "areaspline") {
469
+ chartOptions = {
470
+ plotOptions: {
471
+ areaspline: {
472
+ stacking: "normal"
473
+ },
474
+ area: {
475
+ stacking: "normal"
476
+ },
477
+ series: {
478
+ marker: {
479
+ enabled: false
480
+ }
481
+ }
482
+ }
483
+ };
484
+ }
485
+
486
+ if (chart.options.curve === false) {
487
+ if (chartType === "areaspline") {
488
+ chartType = "area";
489
+ } else if (chartType === "spline") {
490
+ chartType = "line";
491
+ }
492
+ }
493
+
494
+ var options = jsOptions(chart, chart.options, chartOptions), data, i, j;
495
+ options.xAxis.type = chart.discrete ? "category" : "datetime";
496
+ if (!options.chart.type) {
497
+ options.chart.type = chartType;
498
+ }
499
+ options.chart.renderTo = chart.element.id;
500
+
501
+ var series = chart.data;
502
+ for (i = 0; i < series.length; i++) {
503
+ data = series[i].data;
504
+ if (!chart.discrete) {
505
+ for (j = 0; j < data.length; j++) {
506
+ data[j][0] = data[j][0].getTime();
507
+ }
508
+ }
509
+ series[i].marker = {symbol: "circle"};
510
+ if (chart.options.points === false) {
511
+ series[i].marker.enabled = false;
512
+ }
513
+ }
514
+ options.series = series;
515
+ chart.chart = new Highcharts.Chart(options);
516
+ };
517
+
518
+ this.renderScatterChart = function (chart) {
519
+ var chartOptions = {};
520
+ var options = jsOptions(chart, chart.options, chartOptions);
521
+ options.chart.type = "scatter";
522
+ options.chart.renderTo = chart.element.id;
523
+ options.series = chart.data;
524
+ chart.chart = new Highcharts.Chart(options);
525
+ };
526
+
527
+ this.renderPieChart = function (chart) {
528
+ var chartOptions = merge(defaultOptions, {});
529
+
530
+ if (chart.options.colors) {
531
+ chartOptions.colors = chart.options.colors;
532
+ }
533
+ if (chart.options.donut) {
534
+ chartOptions.plotOptions = {pie: {innerSize: "50%"}};
535
+ }
536
+
537
+ if ("legend" in chart.options) {
538
+ hideLegend(chartOptions, chart.options.legend);
539
+ }
540
+
541
+ if (chart.options.title) {
542
+ setTitle(chartOptions, chart.options.title);
543
+ }
544
+
545
+ var options = merge(chartOptions, chart.options.library || {});
546
+ options.chart.renderTo = chart.element.id;
547
+ options.series = [{
548
+ type: "pie",
549
+ name: chart.options.label || "Value",
550
+ data: chart.data
551
+ }];
552
+ chart.chart = new Highcharts.Chart(options);
553
+ };
554
+
555
+ this.renderColumnChart = function (chart, chartType) {
556
+ chartType = chartType || "column";
557
+ var series = chart.data;
558
+ var options = jsOptions(chart, chart.options), i, j, s, d, rows = [], categories = [];
559
+ options.chart.type = chartType;
560
+ options.chart.renderTo = chart.element.id;
561
+
562
+ for (i = 0; i < series.length; i++) {
563
+ s = series[i];
564
+
565
+ for (j = 0; j < s.data.length; j++) {
566
+ d = s.data[j];
567
+ if (!rows[d[0]]) {
568
+ rows[d[0]] = new Array(series.length);
569
+ categories.push(d[0]);
570
+ }
571
+ rows[d[0]][i] = d[1];
572
+ }
573
+ }
574
+
575
+ if (chart.options.xtype === "number") {
576
+ categories.sort(sortByNumber);
577
+ }
578
+
579
+ options.xAxis.categories = categories;
580
+
581
+ var newSeries = [], d2;
582
+ for (i = 0; i < series.length; i++) {
583
+ d = [];
584
+ for (j = 0; j < categories.length; j++) {
585
+ d.push(rows[categories[j]][i] || 0);
586
+ }
587
+
588
+ d2 = {
589
+ name: series[i].name,
590
+ data: d
591
+ }
592
+ if (series[i].stack) {
593
+ d2.stack = series[i].stack;
594
+ }
595
+
596
+ newSeries.push(d2);
597
+ }
598
+ options.series = newSeries;
599
+
600
+ chart.chart = new Highcharts.Chart(options);
601
+ };
602
+
603
+ var self = this;
604
+
605
+ this.renderBarChart = function (chart) {
606
+ self.renderColumnChart(chart, "bar");
607
+ };
608
+
609
+ this.renderAreaChart = function (chart) {
610
+ self.renderLineChart(chart, "areaspline");
611
+ };
612
+ };
613
+ adapters.push(HighchartsAdapter);
614
+ }
615
+ if (!GoogleChartsAdapter && window.google && (window.google.setOnLoadCallback || window.google.charts)) {
616
+ GoogleChartsAdapter = new function () {
617
+ var google = window.google;
618
+
619
+ this.name = "google";
620
+
621
+ var loaded = {};
622
+ var callbacks = [];
623
+
624
+ var runCallbacks = function () {
625
+ var cb, call;
626
+ for (var i = 0; i < callbacks.length; i++) {
627
+ cb = callbacks[i];
628
+ call = google.visualization && ((cb.pack === "corechart" && google.visualization.LineChart) || (cb.pack === "timeline" && google.visualization.Timeline));
629
+ if (call) {
630
+ cb.callback();
631
+ callbacks.splice(i, 1);
632
+ i--;
633
+ }
634
+ }
635
+ };
636
+
637
+ var waitForLoaded = function (pack, callback) {
638
+ if (!callback) {
639
+ callback = pack;
640
+ pack = "corechart";
641
+ }
642
+
643
+ callbacks.push({pack: pack, callback: callback});
644
+
645
+ if (loaded[pack]) {
646
+ runCallbacks();
647
+ } else {
648
+ loaded[pack] = true;
649
+
650
+ // https://groups.google.com/forum/#!topic/google-visualization-api/fMKJcyA2yyI
651
+ var loadOptions = {
652
+ packages: [pack],
653
+ callback: runCallbacks
654
+ };
655
+ if (config.language) {
656
+ loadOptions.language = config.language;
657
+ }
658
+ if (pack === "corechart" && config.mapsApiKey) {
659
+ loadOptions.mapsApiKey = config.mapsApiKey;
660
+ }
661
+
662
+ if (window.google.setOnLoadCallback) {
663
+ google.load("visualization", "1", loadOptions);
664
+ } else {
665
+ google.charts.load("current", loadOptions);
666
+ }
667
+ }
668
+ };
669
+
670
+ // Set chart options
671
+ var defaultOptions = {
672
+ chartArea: {},
673
+ fontName: "'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",
674
+ pointSize: 6,
675
+ legend: {
676
+ textStyle: {
677
+ fontSize: 12,
678
+ color: "#444"
679
+ },
680
+ alignment: "center",
681
+ position: "right"
682
+ },
683
+ curveType: "function",
684
+ hAxis: {
685
+ textStyle: {
686
+ color: "#666",
687
+ fontSize: 12
688
+ },
689
+ titleTextStyle: {},
690
+ gridlines: {
691
+ color: "transparent"
692
+ },
693
+ baselineColor: "#ccc",
694
+ viewWindow: {}
695
+ },
696
+ vAxis: {
697
+ textStyle: {
698
+ color: "#666",
699
+ fontSize: 12
700
+ },
701
+ titleTextStyle: {},
702
+ baselineColor: "#ccc",
703
+ viewWindow: {}
704
+ },
705
+ tooltip: {
706
+ textStyle: {
707
+ color: "#666",
708
+ fontSize: 12
709
+ }
710
+ }
711
+ };
712
+
713
+ var hideLegend = function (options, legend, hideLegend) {
714
+ if (legend !== undefined) {
715
+ var position;
716
+ if (!legend) {
717
+ position = "none";
718
+ } else if (legend === true) {
719
+ position = "right";
720
+ } else {
721
+ position = legend;
722
+ }
723
+ options.legend.position = position;
724
+ } else if (hideLegend) {
725
+ options.legend.position = "none";
726
+ }
727
+ };
728
+
729
+ var setTitle = function (options, title) {
730
+ options.title = title;
731
+ options.titleTextStyle = {color: "#333", fontSize: "20px"};
732
+ };
733
+
734
+ var setMin = function (options, min) {
735
+ options.vAxis.viewWindow.min = min;
736
+ };
737
+
738
+ var setMax = function (options, max) {
739
+ options.vAxis.viewWindow.max = max;
740
+ };
741
+
742
+ var setBarMin = function (options, min) {
743
+ options.hAxis.viewWindow.min = min;
744
+ };
745
+
746
+ var setBarMax = function (options, max) {
747
+ options.hAxis.viewWindow.max = max;
748
+ };
749
+
750
+ var setStacked = function (options, stacked) {
751
+ options.isStacked = !!stacked;
752
+ };
753
+
754
+ var setXtitle = function (options, title) {
755
+ options.hAxis.title = title;
756
+ options.hAxis.titleTextStyle.italic = false;
757
+ };
758
+
759
+ var setYtitle = function (options, title) {
760
+ options.vAxis.title = title;
761
+ options.vAxis.titleTextStyle.italic = false;
762
+ };
763
+
764
+ var jsOptions = jsOptionsFunc(defaultOptions, hideLegend, setTitle, setMin, setMax, setStacked, setXtitle, setYtitle);
765
+
766
+ // cant use object as key
767
+ var createDataTable = function (series, columnType, xtype) {
768
+ var i, j, s, d, key, rows = [], sortedLabels = [];
769
+ for (i = 0; i < series.length; i++) {
770
+ s = series[i];
771
+
772
+ for (j = 0; j < s.data.length; j++) {
773
+ d = s.data[j];
774
+ key = (columnType === "datetime") ? d[0].getTime() : d[0];
775
+ if (!rows[key]) {
776
+ rows[key] = new Array(series.length);
777
+ sortedLabels.push(key);
778
+ }
779
+ rows[key][i] = toFloat(d[1]);
780
+ }
781
+ }
782
+
783
+ var rows2 = [];
784
+ var day = true;
785
+ var value;
786
+ for (var j = 0; j < sortedLabels.length; j++) {
787
+ var i = sortedLabels[j];
788
+ if (columnType === "datetime") {
789
+ value = new Date(toFloat(i));
790
+ day = day && isDay(value);
791
+ } else if (columnType === "number") {
792
+ value = toFloat(i);
793
+ } else {
794
+ value = i;
795
+ }
796
+ rows2.push([value].concat(rows[i]));
797
+ }
798
+ if (columnType === "datetime") {
799
+ rows2.sort(sortByTime);
800
+ } else if (columnType === "number") {
801
+ rows2.sort(sortByNumberSeries);
802
+ }
803
+
804
+ if (xtype === "number") {
805
+ rows2.sort(sortByNumberSeries);
806
+
807
+ for (var i = 0; i < rows2.length; i++) {
808
+ rows2[i][0] = toStr(rows2[i][0]);
809
+ }
810
+ }
811
+
812
+ // create datatable
813
+ var data = new google.visualization.DataTable();
814
+ columnType = columnType === "datetime" && day ? "date" : columnType;
815
+ data.addColumn(columnType, "");
816
+ for (i = 0; i < series.length; i++) {
817
+ data.addColumn("number", series[i].name);
818
+ }
819
+ data.addRows(rows2);
820
+
821
+ return data;
822
+ };
823
+
824
+ var resize = function (callback) {
825
+ if (window.attachEvent) {
826
+ window.attachEvent("onresize", callback);
827
+ } else if (window.addEventListener) {
828
+ window.addEventListener("resize", callback, true);
829
+ }
830
+ callback();
831
+ };
832
+
833
+ this.renderLineChart = function (chart) {
834
+ waitForLoaded(function () {
835
+ var chartOptions = {};
836
+
837
+ if (chart.options.curve === false) {
838
+ chartOptions.curveType = "none";
839
+ }
840
+
841
+ if (chart.options.points === false) {
842
+ chartOptions.pointSize = 0;
843
+ }
844
+
845
+ var options = jsOptions(chart, chart.options, chartOptions);
846
+ var columnType = chart.discrete ? "string" : "datetime";
847
+ if (chart.options.xtype === "number") {
848
+ columnType = "number";
849
+ }
850
+ var data = createDataTable(chart.data, columnType);
851
+ chart.chart = new google.visualization.LineChart(chart.element);
852
+ resize(function () {
853
+ chart.chart.draw(data, options);
854
+ });
855
+ });
856
+ };
857
+
858
+ this.renderPieChart = function (chart) {
859
+ waitForLoaded(function () {
860
+ var chartOptions = {
861
+ chartArea: {
862
+ top: "10%",
863
+ height: "80%"
864
+ },
865
+ legend: {}
866
+ };
867
+ if (chart.options.colors) {
868
+ chartOptions.colors = chart.options.colors;
869
+ }
870
+ if (chart.options.donut) {
871
+ chartOptions.pieHole = 0.5;
872
+ }
873
+ if ("legend" in chart.options) {
874
+ hideLegend(chartOptions, chart.options.legend);
875
+ }
876
+ if (chart.options.title) {
877
+ setTitle(chartOptions, chart.options.title);
878
+ }
879
+ var options = merge(merge(defaultOptions, chartOptions), chart.options.library || {});
880
+
881
+ var data = new google.visualization.DataTable();
882
+ data.addColumn("string", "");
883
+ data.addColumn("number", "Value");
884
+ data.addRows(chart.data);
885
+
886
+ chart.chart = new google.visualization.PieChart(chart.element);
887
+ resize(function () {
888
+ chart.chart.draw(data, options);
889
+ });
890
+ });
891
+ };
892
+
893
+ this.renderColumnChart = function (chart) {
894
+ waitForLoaded(function () {
895
+ var options = jsOptions(chart, chart.options);
896
+ var data = createDataTable(chart.data, "string", chart.options.xtype);
897
+ chart.chart = new google.visualization.ColumnChart(chart.element);
898
+ resize(function () {
899
+ chart.chart.draw(data, options);
900
+ });
901
+ });
902
+ };
903
+
904
+ this.renderBarChart = function (chart) {
905
+ waitForLoaded(function () {
906
+ var chartOptions = {
907
+ hAxis: {
908
+ gridlines: {
909
+ color: "#ccc"
910
+ }
911
+ }
912
+ };
913
+ var options = jsOptionsFunc(defaultOptions, hideLegend, setTitle, setBarMin, setBarMax, setStacked, setXtitle, setYtitle)(chart, chart.options, chartOptions);
914
+ var data = createDataTable(chart.data, "string", chart.options.xtype);
915
+ chart.chart = new google.visualization.BarChart(chart.element);
916
+ resize(function () {
917
+ chart.chart.draw(data, options);
918
+ });
919
+ });
920
+ };
921
+
922
+ this.renderAreaChart = function (chart) {
923
+ waitForLoaded(function () {
924
+ var chartOptions = {
925
+ isStacked: true,
926
+ pointSize: 0,
927
+ areaOpacity: 0.5
928
+ };
929
+
930
+ var options = jsOptions(chart, chart.options, chartOptions);
931
+ var columnType = chart.discrete ? "string" : "datetime";
932
+ if (chart.options.xtype === "number") {
933
+ columnType = "number";
934
+ }
935
+ var data = createDataTable(chart.data, columnType);
936
+ chart.chart = new google.visualization.AreaChart(chart.element);
937
+ resize(function () {
938
+ chart.chart.draw(data, options);
939
+ });
940
+ });
941
+ };
942
+
943
+ this.renderGeoChart = function (chart) {
944
+ waitForLoaded(function () {
945
+ var chartOptions = {
946
+ legend: "none",
947
+ colorAxis: {
948
+ colors: chart.options.colors || ["#f6c7b6", "#ce502d"]
949
+ }
950
+ };
951
+ var options = merge(merge(defaultOptions, chartOptions), chart.options.library || {});
952
+
953
+ var data = new google.visualization.DataTable();
954
+ data.addColumn("string", "");
955
+ data.addColumn("number", chart.options.label || "Value");
956
+ data.addRows(chart.data);
957
+
958
+ chart.chart = new google.visualization.GeoChart(chart.element);
959
+ resize(function () {
960
+ chart.chart.draw(data, options);
961
+ });
962
+ });
963
+ };
964
+
965
+ this.renderScatterChart = function (chart) {
966
+ waitForLoaded(function () {
967
+ var chartOptions = {};
968
+ var options = jsOptions(chart, chart.options, chartOptions);
969
+
970
+ var series = chart.data, rows2 = [], i, j, data, d;
971
+ for (i = 0; i < series.length; i++) {
972
+ d = series[i].data;
973
+ for (j = 0; j < d.length; j++) {
974
+ var row = new Array(series.length + 1);
975
+ row[0] = d[j][0];
976
+ row[i + 1] = d[j][1];
977
+ rows2.push(row);
978
+ }
979
+ }
980
+
981
+ var data = new google.visualization.DataTable();
982
+ data.addColumn("number", "");
983
+ for (i = 0; i < series.length; i++) {
984
+ data.addColumn("number", series[i].name);
985
+ }
986
+ data.addRows(rows2);
987
+
988
+ chart.chart = new google.visualization.ScatterChart(chart.element);
989
+ resize(function () {
990
+ chart.chart.draw(data, options);
991
+ });
992
+ });
993
+ };
994
+
995
+ this.renderTimeline = function (chart) {
996
+ waitForLoaded("timeline", function () {
997
+ var chartOptions = {
998
+ legend: "none"
999
+ };
1000
+
1001
+ if (chart.options.colors) {
1002
+ chartOptions.colors = chart.options.colors;
1003
+ }
1004
+ var options = merge(merge(defaultOptions, chartOptions), chart.options.library || {});
1005
+
1006
+ var data = new google.visualization.DataTable();
1007
+ data.addColumn({type: "string", id: "Name"});
1008
+ data.addColumn({type: "date", id: "Start"});
1009
+ data.addColumn({type: "date", id: "End"});
1010
+ data.addRows(chart.data);
1011
+
1012
+ chart.element.style.lineHeight = "normal";
1013
+ chart.chart = new google.visualization.Timeline(chart.element);
1014
+
1015
+ resize(function () {
1016
+ chart.chart.draw(data, options);
1017
+ });
1018
+ });
1019
+ };
1020
+ };
1021
+
1022
+ adapters.push(GoogleChartsAdapter);
1023
+ }
1024
+ if (!ChartjsAdapter && "Chart" in window) {
1025
+ ChartjsAdapter = new function () {
1026
+ var Chart = window.Chart;
1027
+
1028
+ this.name = "chartjs";
1029
+
1030
+ var baseOptions = {
1031
+ maintainAspectRatio: false,
1032
+ animation: false,
1033
+ tooltips: {
1034
+ displayColors: false
1035
+ },
1036
+ legend: {},
1037
+ title: {fontSize: 20, fontColor: "#333"}
1038
+ };
1039
+
1040
+ var defaultOptions = {
1041
+ scales: {
1042
+ yAxes: [
1043
+ {
1044
+ ticks: {
1045
+ maxTicksLimit: 4
1046
+ },
1047
+ scaleLabel: {
1048
+ fontSize: 16,
1049
+ // fontStyle: "bold",
1050
+ fontColor: "#333"
1051
+ }
1052
+ }
1053
+ ],
1054
+ xAxes: [
1055
+ {
1056
+ gridLines: {
1057
+ drawOnChartArea: false
1058
+ },
1059
+ scaleLabel: {
1060
+ fontSize: 16,
1061
+ // fontStyle: "bold",
1062
+ fontColor: "#333"
1063
+ },
1064
+ time: {},
1065
+ ticks: {}
1066
+ }
1067
+ ]
1068
+ }
1069
+ };
1070
+
1071
+ // http://there4.io/2012/05/02/google-chart-color-list/
1072
+ var defaultColors = [
1073
+ "#3366CC", "#DC3912", "#FF9900", "#109618", "#990099", "#3B3EAC", "#0099C6",
1074
+ "#DD4477", "#66AA00", "#B82E2E", "#316395", "#994499", "#22AA99", "#AAAA11",
1075
+ "#6633CC", "#E67300", "#8B0707", "#329262", "#5574A6", "#651067"
1076
+ ];
1077
+
1078
+ var hideLegend = function (options, legend, hideLegend) {
1079
+ if (legend !== undefined) {
1080
+ options.legend.display = !!legend;
1081
+ if (legend && legend !== true) {
1082
+ options.legend.position = legend;
1083
+ }
1084
+ } else if (hideLegend) {
1085
+ options.legend.display = false;
1086
+ }
1087
+ };
1088
+
1089
+ var setTitle = function (options, title) {
1090
+ options.title.display = true;
1091
+ options.title.text = title;
1092
+ };
1093
+
1094
+ var setMin = function (options, min) {
1095
+ if (min !== null) {
1096
+ options.scales.yAxes[0].ticks.min = toFloat(min);
1097
+ }
1098
+ };
1099
+
1100
+ var setMax = function (options, max) {
1101
+ options.scales.yAxes[0].ticks.max = toFloat(max);
1102
+ };
1103
+
1104
+ var setBarMin = function (options, min) {
1105
+ if (min !== null) {
1106
+ options.scales.xAxes[0].ticks.min = toFloat(min);
1107
+ }
1108
+ };
1109
+
1110
+ var setBarMax = function (options, max) {
1111
+ options.scales.xAxes[0].ticks.max = toFloat(max);
1112
+ };
1113
+
1114
+ var setStacked = function (options, stacked) {
1115
+ options.scales.xAxes[0].stacked = !!stacked;
1116
+ options.scales.yAxes[0].stacked = !!stacked;
1117
+ };
1118
+
1119
+ var setXtitle = function (options, title) {
1120
+ options.scales.xAxes[0].scaleLabel.display = true;
1121
+ options.scales.xAxes[0].scaleLabel.labelString = title;
1122
+ };
1123
+
1124
+ var setYtitle = function (options, title) {
1125
+ options.scales.yAxes[0].scaleLabel.display = true;
1126
+ options.scales.yAxes[0].scaleLabel.labelString = title;
1127
+ };
1128
+
1129
+ var drawChart = function(chart, type, data, options) {
1130
+ if (chart.chart) {
1131
+ chart.chart.destroy();
1132
+ } else {
1133
+ chart.element.innerHTML = "<canvas></canvas>";
1134
+ }
1135
+
1136
+ var ctx = chart.element.getElementsByTagName("CANVAS")[0];
1137
+ chart.chart = new Chart(ctx, {
1138
+ type: type,
1139
+ data: data,
1140
+ options: options
1141
+ });
1142
+ };
1143
+
1144
+ // http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
1145
+ var addOpacity = function(hex, opacity) {
1146
+ var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
1147
+ return result ? "rgba(" + parseInt(result[1], 16) + ", " + parseInt(result[2], 16) + ", " + parseInt(result[3], 16) + ", " + opacity + ")" : hex;
1148
+ };
1149
+
1150
+ var setLabelSize = function (chart, data, options) {
1151
+ var maxLabelSize = Math.ceil(chart.element.offsetWidth / 4.0 / data.labels.length);
1152
+ if (maxLabelSize > 25) {
1153
+ maxLabelSize = 25;
1154
+ }
1155
+ options.scales.xAxes[0].ticks.callback = function (value) {
1156
+ value = toStr(value);
1157
+ if (value.length > maxLabelSize) {
1158
+ return value.substring(0, maxLabelSize - 2) + "...";
1159
+ } else {
1160
+ return value;
1161
+ }
1162
+ };
1163
+ };
1164
+
1165
+ var jsOptions = jsOptionsFunc(merge(baseOptions, defaultOptions), hideLegend, setTitle, setMin, setMax, setStacked, setXtitle, setYtitle);
1166
+
1167
+ var createDataTable = function (chart, options, chartType) {
1168
+ var datasets = [];
1169
+ var labels = [];
1170
+
1171
+ var colors = chart.options.colors || defaultColors;
1172
+
1173
+ var day = true;
1174
+ var week = true;
1175
+ var dayOfWeek;
1176
+ var month = true;
1177
+ var year = true;
1178
+ var hour = true;
1179
+ var minute = true;
1180
+ var detectType = (chartType === "line" || chartType === "area") && !chart.discrete;
1181
+
1182
+ var series = chart.data;
1183
+
1184
+ var sortedLabels = [];
1185
+
1186
+ var i, j, s, d, key, rows = [];
1187
+ for (i = 0; i < series.length; i++) {
1188
+ s = series[i];
1189
+
1190
+ for (j = 0; j < s.data.length; j++) {
1191
+ d = s.data[j];
1192
+ key = detectType ? d[0].getTime() : d[0];
1193
+ if (!rows[key]) {
1194
+ rows[key] = new Array(series.length);
1195
+ }
1196
+ rows[key][i] = toFloat(d[1]);
1197
+ if (sortedLabels.indexOf(key) === -1) {
1198
+ sortedLabels.push(key);
1199
+ }
1200
+ }
1201
+ }
1202
+
1203
+ if (detectType || chart.options.xtype === "number") {
1204
+ sortedLabels.sort(sortByNumber);
1205
+ }
1206
+
1207
+ var rows2 = [];
1208
+ for (j = 0; j < series.length; j++) {
1209
+ rows2.push([]);
1210
+ }
1211
+
1212
+ var value;
1213
+ var k;
1214
+ for (k = 0; k < sortedLabels.length; k++) {
1215
+ i = sortedLabels[k];
1216
+ if (detectType) {
1217
+ value = new Date(toFloat(i));
1218
+ // TODO make this efficient
1219
+ day = day && isDay(value);
1220
+ if (!dayOfWeek) {
1221
+ dayOfWeek = value.getDay();
1222
+ }
1223
+ week = week && isWeek(value, dayOfWeek);
1224
+ month = month && isMonth(value);
1225
+ year = year && isYear(value);
1226
+ hour = hour && isHour(value);
1227
+ minute = minute && isMinute(value);
1228
+ } else {
1229
+ value = i;
1230
+ }
1231
+ labels.push(value);
1232
+ for (j = 0; j < series.length; j++) {
1233
+ // Chart.js doesn't like undefined
1234
+ rows2[j].push(rows[i][j] === undefined ? null : rows[i][j]);
1235
+ }
1236
+ }
1237
+
1238
+ for (i = 0; i < series.length; i++) {
1239
+ s = series[i];
1240
+
1241
+ var color = s.color || colors[i];
1242
+ var backgroundColor = chartType !== "line" ? addOpacity(color, 0.5) : color;
1243
+
1244
+ var dataset = {
1245
+ label: s.name,
1246
+ data: rows2[i],
1247
+ fill: chartType === "area",
1248
+ borderColor: color,
1249
+ backgroundColor: backgroundColor,
1250
+ pointBackgroundColor: color,
1251
+ borderWidth: 2
1252
+ };
1253
+
1254
+ if (s.stack) {
1255
+ dataset.stack = s.stack;
1256
+ }
1257
+
1258
+ // PATCH_BEGIN
1259
+ if (chart.options.y2 === true) {
1260
+ dataset.yAxisID = (s.y2 === true) ? 'y-axis-right' : 'y-axis-left';
1261
+ options.scales.yAxes = [
1262
+ { id: 'y-axis-left', position: 'left' },
1263
+ { id: 'y-axis-right', position: 'right' }
1264
+ ];
1265
+ }
1266
+ // PATCH_END
1267
+
1268
+ if (chart.options.curve === false) {
1269
+ dataset.lineTension = 0;
1270
+ }
1271
+
1272
+ if (chart.options.points === false) {
1273
+ dataset.pointRadius = 0;
1274
+ dataset.pointHitRadius = 5;
1275
+ }
1276
+
1277
+ datasets.push(merge(dataset, s.library || {}));
1278
+ }
1279
+
1280
+ if (detectType && labels.length > 0) {
1281
+ var minTime = labels[0].getTime();
1282
+ var maxTime = labels[0].getTime();
1283
+ for (i = 1; i < labels.length; i++) {
1284
+ value = labels[i].getTime();
1285
+ if (value < minTime) {
1286
+ minTime = value;
1287
+ }
1288
+ if (value > maxTime) {
1289
+ maxTime = value;
1290
+ }
1291
+ }
1292
+
1293
+ var timeDiff = (maxTime - minTime) / (86400 * 1000.0);
1294
+
1295
+ if (!options.scales.xAxes[0].time.unit) {
1296
+ var step;
1297
+ if (year || timeDiff > 365 * 10) {
1298
+ options.scales.xAxes[0].time.unit = "year";
1299
+ step = 365;
1300
+ } else if (month || timeDiff > 30 * 10) {
1301
+ options.scales.xAxes[0].time.unit = "month";
1302
+ step = 30;
1303
+ } else if (day || timeDiff > 10) {
1304
+ options.scales.xAxes[0].time.unit = "day";
1305
+ step = 1;
1306
+ } else if (hour || timeDiff > 0.5) {
1307
+ options.scales.xAxes[0].time.displayFormats = {hour: "MMM D, h a"};
1308
+ options.scales.xAxes[0].time.unit = "hour";
1309
+ step = 1 / 24.0;
1310
+ } else if (minute) {
1311
+ options.scales.xAxes[0].time.displayFormats = {minute: "h:mm a"};
1312
+ options.scales.xAxes[0].time.unit = "minute";
1313
+ step = 1 / 24.0 / 60.0;
1314
+ }
1315
+
1316
+ if (step && timeDiff > 0) {
1317
+ var unitStepSize = Math.ceil(timeDiff / step / (chart.element.offsetWidth / 100.0));
1318
+ if (week && step === 1) {
1319
+ unitStepSize = Math.ceil(unitStepSize / 7.0) * 7;
1320
+ }
1321
+ options.scales.xAxes[0].time.unitStepSize = unitStepSize;
1322
+ }
1323
+ }
1324
+
1325
+ if (!options.scales.xAxes[0].time.tooltipFormat) {
1326
+ if (day) {
1327
+ options.scales.xAxes[0].time.tooltipFormat = "ll";
1328
+ } else if (hour) {
1329
+ options.scales.xAxes[0].time.tooltipFormat = "MMM D, h a";
1330
+ } else if (minute) {
1331
+ options.scales.xAxes[0].time.tooltipFormat = "h:mm a";
1332
+ }
1333
+ }
1334
+ }
1335
+
1336
+ var data = {
1337
+ labels: labels,
1338
+ datasets: datasets
1339
+ };
1340
+
1341
+ return data;
1342
+ };
1343
+
1344
+ this.renderLineChart = function (chart, chartType) {
1345
+ if (chart.options.xtype === "number") {
1346
+ return self.renderScatterChart(chart, chartType, true);
1347
+ }
1348
+
1349
+ var chartOptions = {};
1350
+ if (chartType === "area") {
1351
+ // TODO fix area stacked
1352
+ // chartOptions.stacked = true;
1353
+ }
1354
+ // fix for https://github.com/chartjs/Chart.js/issues/2441
1355
+ if (!chart.options.max && allZeros(chart.data)) {
1356
+ chartOptions.max = 1;
1357
+ }
1358
+
1359
+ var options = jsOptions(chart, merge(chartOptions, chart.options));
1360
+
1361
+ var data = createDataTable(chart, options, chartType || "line");
1362
+
1363
+ options.scales.xAxes[0].type = chart.discrete ? "category" : "time";
1364
+
1365
+ drawChart(chart, "line", data, options);
1366
+ };
1367
+
1368
+ this.renderPieChart = function (chart) {
1369
+ var options = merge({}, baseOptions);
1370
+ if (chart.options.donut) {
1371
+ options.cutoutPercentage = 50;
1372
+ }
1373
+
1374
+ if ("legend" in chart.options) {
1375
+ hideLegend(options, chart.options.legend);
1376
+ }
1377
+
1378
+ if (chart.options.title) {
1379
+ setTitle(options, chart.options.title);
1380
+ }
1381
+
1382
+ options = merge(options, chart.options.library || {});
1383
+
1384
+ var labels = [];
1385
+ var values = [];
1386
+ for (var i = 0; i < chart.data.length; i++) {
1387
+ var point = chart.data[i];
1388
+ labels.push(point[0]);
1389
+ values.push(point[1]);
1390
+ }
1391
+
1392
+ var data = {
1393
+ labels: labels,
1394
+ datasets: [
1395
+ {
1396
+ data: values,
1397
+ backgroundColor: chart.options.colors || defaultColors
1398
+ }
1399
+ ]
1400
+ };
1401
+
1402
+ drawChart(chart, "pie", data, options);
1403
+ };
1404
+
1405
+ this.renderColumnChart = function (chart, chartType) {
1406
+ var options;
1407
+ if (chartType === "bar") {
1408
+ options = jsOptionsFunc(merge(baseOptions, defaultOptions), hideLegend, setTitle, setBarMin, setBarMax, setStacked, setXtitle, setYtitle)(chart, chart.options);
1409
+ } else {
1410
+ options = jsOptions(chart, chart.options);
1411
+ }
1412
+ var data = createDataTable(chart, options, "column");
1413
+ setLabelSize(chart, data, options);
1414
+ drawChart(chart, (chartType === "bar" ? "horizontalBar" : "bar"), data, options);
1415
+ };
1416
+
1417
+ var self = this;
1418
+
1419
+ this.renderAreaChart = function (chart) {
1420
+ self.renderLineChart(chart, "area");
1421
+ };
1422
+
1423
+ this.renderBarChart = function (chart) {
1424
+ self.renderColumnChart(chart, "bar");
1425
+ };
1426
+
1427
+ this.renderScatterChart = function (chart, chartType, lineChart) {
1428
+ chartType = chartType || "line";
1429
+
1430
+ var options = jsOptions(chart, chart.options);
1431
+
1432
+ var colors = chart.options.colors || defaultColors;
1433
+
1434
+ var datasets = [];
1435
+ var series = chart.data;
1436
+ for (var i = 0; i < series.length; i++) {
1437
+ var s = series[i];
1438
+ var d = [];
1439
+ for (var j = 0; j < s.data.length; j++) {
1440
+ var point = {
1441
+ x: toFloat(s.data[j][0]),
1442
+ y: toFloat(s.data[j][1])
1443
+ };
1444
+ if (chartType === "bubble") {
1445
+ point.r = toFloat(s.data[j][2]);
1446
+ }
1447
+ d.push(point);
1448
+ }
1449
+
1450
+ var color = s.color || colors[i];
1451
+ var backgroundColor = chartType === "area" ? addOpacity(color, 0.5) : color;
1452
+
1453
+ datasets.push({
1454
+ label: s.name,
1455
+ showLine: lineChart || false,
1456
+ data: d,
1457
+ borderColor: color,
1458
+ backgroundColor: backgroundColor,
1459
+ pointBackgroundColor: color,
1460
+ fill: chartType === "area"
1461
+ })
1462
+ }
1463
+
1464
+ if (chartType === "area") {
1465
+ chartType = "line";
1466
+ }
1467
+
1468
+ var data = {datasets: datasets};
1469
+
1470
+ options.scales.xAxes[0].type = "linear";
1471
+ options.scales.xAxes[0].position = "bottom";
1472
+
1473
+ drawChart(chart, chartType, data, options);
1474
+ };
1475
+
1476
+ this.renderBubbleChart = function (chart) {
1477
+ this.renderScatterChart(chart, "bubble");
1478
+ };
1479
+ };
1480
+
1481
+ adapters.unshift(ChartjsAdapter);
1482
+ }
1483
+ }
1484
+
1485
+ function dataEmpty(data, chartType) {
1486
+ if (chartType === "PieChart" || chartType === "GeoChart" || chartType === "Timeline") {
1487
+ return data.length === 0;
1488
+ } else {
1489
+ for (var i = 0; i < data.length; i++) {
1490
+ if (data[i].data.length > 0) {
1491
+ return false;
1492
+ }
1493
+ }
1494
+ return true;
1495
+ }
1496
+ }
1497
+
1498
+ function renderChart(chartType, chart) {
1499
+ if (chart.options.messages && chart.options.messages.empty && dataEmpty(chart.data, chartType)) {
1500
+ setText(chart.element, chart.options.messages.empty);
1501
+ } else {
1502
+ callAdapter(chartType, chart);
1503
+ if (chart.options.download && !chart.downloadAttached && chart.adapter === "chartjs") {
1504
+ addDownloadButton(chart);
1505
+ }
1506
+ }
1507
+ }
1508
+
1509
+ // TODO remove chartType if cross-browser way
1510
+ // to get the name of the chart class
1511
+ function callAdapter(chartType, chart) {
1512
+ var i, adapter, fnName, adapterName;
1513
+ fnName = "render" + chartType;
1514
+ adapterName = chart.options.adapter;
1515
+
1516
+ loadAdapters();
1517
+
1518
+ for (i = 0; i < adapters.length; i++) {
1519
+ adapter = adapters[i];
1520
+ if ((!adapterName || adapterName === adapter.name) && isFunction(adapter[fnName])) {
1521
+ chart.adapter = adapter.name;
1522
+ return adapter[fnName](chart);
1523
+ }
1524
+ }
1525
+ throw new Error("No adapter found");
1526
+ }
1527
+
1528
+ // process data
1529
+
1530
+ var toFormattedKey = function (key, keyType) {
1531
+ if (keyType === "number") {
1532
+ key = toFloat(key);
1533
+ } else if (keyType === "datetime") {
1534
+ key = toDate(key);
1535
+ } else {
1536
+ key = toStr(key);
1537
+ }
1538
+ return key;
1539
+ };
1540
+
1541
+ var formatSeriesData = function (data, keyType) {
1542
+ var r = [], key, j;
1543
+ for (j = 0; j < data.length; j++) {
1544
+ if (keyType === "bubble") {
1545
+ r.push([toFloat(data[j][0]), toFloat(data[j][1]), toFloat(data[j][2])]);
1546
+ } else {
1547
+ key = toFormattedKey(data[j][0], keyType);
1548
+ r.push([key, toFloat(data[j][1])]);
1549
+ }
1550
+ }
1551
+ if (keyType === "datetime") {
1552
+ r.sort(sortByTime);
1553
+ } else if (keyType === "number") {
1554
+ r.sort(sortByNumberSeries);
1555
+ }
1556
+ return r;
1557
+ };
1558
+
1559
+ function isMinute(d) {
1560
+ return d.getMilliseconds() === 0 && d.getSeconds() === 0;
1561
+ }
1562
+
1563
+ function isHour(d) {
1564
+ return isMinute(d) && d.getMinutes() === 0;
1565
+ }
1566
+
1567
+ function isDay(d) {
1568
+ return isHour(d) && d.getHours() === 0;
1569
+ }
1570
+
1571
+ function isWeek(d, dayOfWeek) {
1572
+ return isDay(d) && d.getDay() === dayOfWeek;
1573
+ }
1574
+
1575
+ function isMonth(d) {
1576
+ return isDay(d) && d.getDate() === 1;
1577
+ }
1578
+
1579
+ function isYear(d) {
1580
+ return isMonth(d) && d.getMonth() === 0;
1581
+ }
1582
+
1583
+ function isDate(obj) {
1584
+ return !isNaN(toDate(obj)) && toStr(obj).length >= 6;
1585
+ }
1586
+
1587
+ function allZeros(data) {
1588
+ var i, j, d;
1589
+ for (i = 0; i < data.length; i++) {
1590
+ d = data[i].data;
1591
+ for (j = 0; j < d.length; j++) {
1592
+ if (d[j][1] != 0) {
1593
+ return false;
1594
+ }
1595
+ }
1596
+ }
1597
+ return true;
1598
+ }
1599
+
1600
+ function detectDiscrete(series) {
1601
+ var i, j, data;
1602
+ for (i = 0; i < series.length; i++) {
1603
+ data = toArr(series[i].data);
1604
+ for (j = 0; j < data.length; j++) {
1605
+ if (!isDate(data[j][0])) {
1606
+ return true;
1607
+ }
1608
+ }
1609
+ }
1610
+ return false;
1611
+ }
1612
+
1613
+ // creates a shallow copy of each element of the array
1614
+ // elements are expected to be objects
1615
+ function copySeries(series) {
1616
+ var newSeries = [], i, j;
1617
+ for (i = 0; i < series.length; i++) {
1618
+ var copy = {}
1619
+ for (j in series[i]) {
1620
+ if (series[i].hasOwnProperty(j)) {
1621
+ copy[j] = series[i][j];
1622
+ }
1623
+ }
1624
+ newSeries.push(copy)
1625
+ }
1626
+ return newSeries;
1627
+ }
1628
+
1629
+ function processSeries(chart, keyType) {
1630
+ var i;
1631
+
1632
+ var opts = chart.options;
1633
+ var series = chart.rawData;
1634
+
1635
+ // see if one series or multiple
1636
+ if (!isArray(series) || typeof series[0] !== "object" || isArray(series[0])) {
1637
+ series = [{name: opts.label || "Value", data: series}];
1638
+ chart.hideLegend = true;
1639
+ } else {
1640
+ chart.hideLegend = false;
1641
+ }
1642
+ if ((opts.discrete === null || opts.discrete === undefined) && keyType !== "bubble" && keyType !== "number") {
1643
+ chart.discrete = detectDiscrete(series);
1644
+ } else {
1645
+ chart.discrete = opts.discrete;
1646
+ }
1647
+ if (chart.discrete) {
1648
+ keyType = "string";
1649
+ }
1650
+ if (chart.options.xtype) {
1651
+ keyType = chart.options.xtype;
1652
+ }
1653
+
1654
+ // right format
1655
+ series = copySeries(series);
1656
+ for (i = 0; i < series.length; i++) {
1657
+ series[i].data = formatSeriesData(toArr(series[i].data), keyType);
1658
+ }
1659
+
1660
+ return series;
1661
+ }
1662
+
1663
+ function processSimple(chart) {
1664
+ var perfectData = toArr(chart.rawData), i;
1665
+ for (i = 0; i < perfectData.length; i++) {
1666
+ perfectData[i] = [toStr(perfectData[i][0]), toFloat(perfectData[i][1])];
1667
+ }
1668
+ return perfectData;
1669
+ }
1670
+
1671
+ function processTime(chart)
1672
+ {
1673
+ var i, data = chart.rawData;
1674
+ for (i = 0; i < data.length; i++) {
1675
+ data[i][1] = toDate(data[i][1]);
1676
+ data[i][2] = toDate(data[i][2]);
1677
+ }
1678
+ return data;
1679
+ }
1680
+
1681
+ function processLineData(chart) {
1682
+ return processSeries(chart, "datetime");
1683
+ }
1684
+
1685
+ function processColumnData(chart) {
1686
+ return processSeries(chart, "string");
1687
+ }
1688
+
1689
+ function processBarData(chart) {
1690
+ return processSeries(chart, "string");
1691
+ }
1692
+
1693
+ function processAreaData(chart) {
1694
+ return processSeries(chart, "datetime");
1695
+ }
1696
+
1697
+ function processScatterData(chart) {
1698
+ return processSeries(chart, "number");
1699
+ }
1700
+
1701
+ function processBubbleData(chart) {
1702
+ return processSeries(chart, "bubble");
1703
+ }
1704
+
1705
+ function createChart(chartType, chart, element, dataSource, opts, processData) {
1706
+ var elementId;
1707
+ if (typeof element === "string") {
1708
+ elementId = element;
1709
+ element = document.getElementById(element);
1710
+ if (!element) {
1711
+ throw new Error("No element with id " + elementId);
1712
+ }
1713
+ }
1714
+
1715
+ chart.element = element;
1716
+ opts = merge(Chartkick.options, opts || {});
1717
+ chart.options = opts;
1718
+ chart.dataSource = dataSource;
1719
+
1720
+ if (!processData) {
1721
+ processData = function (chart) {
1722
+ return chart.rawData;
1723
+ }
1724
+ }
1725
+
1726
+ // getters
1727
+ chart.getElement = function () {
1728
+ return element;
1729
+ };
1730
+ chart.getDataSource = function () {
1731
+ return chart.dataSource;
1732
+ };
1733
+ chart.getData = function () {
1734
+ return chart.data;
1735
+ };
1736
+ chart.getOptions = function () {
1737
+ return chart.options;
1738
+ };
1739
+ chart.getChartObject = function () {
1740
+ return chart.chart;
1741
+ };
1742
+ chart.getAdapter = function () {
1743
+ return chart.adapter;
1744
+ };
1745
+
1746
+ var callback = function () {
1747
+ chart.data = processData(chart);
1748
+ renderChart(chartType, chart);
1749
+ };
1750
+
1751
+ // functions
1752
+ chart.updateData = function (dataSource, options) {
1753
+ chart.dataSource = dataSource;
1754
+ if (options) {
1755
+ chart.options = merge(Chartkick.options, options);
1756
+ }
1757
+ fetchDataSource(chart, callback, dataSource);
1758
+ };
1759
+ chart.setOptions = function (options) {
1760
+ chart.options = merge(Chartkick.options, options);
1761
+ chart.redraw();
1762
+ };
1763
+ chart.redraw = function() {
1764
+ fetchDataSource(chart, callback, chart.rawData);
1765
+ };
1766
+ chart.refreshData = function () {
1767
+ if (typeof chart.dataSource === "string") {
1768
+ // prevent browser from caching
1769
+ var sep = chart.dataSource.indexOf("?") === -1 ? "?" : "&";
1770
+ var url = chart.dataSource + sep + "_=" + (new Date()).getTime();
1771
+ fetchDataSource(chart, callback, url);
1772
+ }
1773
+ };
1774
+ chart.stopRefresh = function () {
1775
+ if (chart.intervalId) {
1776
+ clearInterval(chart.intervalId);
1777
+ }
1778
+ };
1779
+ chart.toImage = function () {
1780
+ if (chart.adapter === "chartjs") {
1781
+ return chart.chart.toBase64Image();
1782
+ } else {
1783
+ return null;
1784
+ }
1785
+ }
1786
+
1787
+ Chartkick.charts[element.id] = chart;
1788
+
1789
+ fetchDataSource(chart, callback, dataSource);
1790
+
1791
+ if (opts.refresh) {
1792
+ chart.intervalId = setInterval( function () {
1793
+ chart.refreshData();
1794
+ }, opts.refresh * 1000);
1795
+ }
1796
+ }
1797
+
1798
+ // define classes
1799
+
1800
+ Chartkick = {
1801
+ LineChart: function (element, dataSource, options) {
1802
+ createChart("LineChart", this, element, dataSource, options, processLineData);
1803
+ },
1804
+ PieChart: function (element, dataSource, options) {
1805
+ createChart("PieChart", this, element, dataSource, options, processSimple);
1806
+ },
1807
+ ColumnChart: function (element, dataSource, options) {
1808
+ createChart("ColumnChart", this, element, dataSource, options, processColumnData);
1809
+ },
1810
+ BarChart: function (element, dataSource, options) {
1811
+ createChart("BarChart", this, element, dataSource, options, processBarData);
1812
+ },
1813
+ AreaChart: function (element, dataSource, options) {
1814
+ createChart("AreaChart", this, element, dataSource, options, processAreaData);
1815
+ },
1816
+ GeoChart: function (element, dataSource, options) {
1817
+ createChart("GeoChart", this, element, dataSource, options, processSimple);
1818
+ },
1819
+ ScatterChart: function (element, dataSource, options) {
1820
+ createChart("ScatterChart", this, element, dataSource, options, processScatterData);
1821
+ },
1822
+ BubbleChart: function (element, dataSource, options) {
1823
+ createChart("BubbleChart", this, element, dataSource, options, processBubbleData);
1824
+ },
1825
+ Timeline: function (element, dataSource, options) {
1826
+ createChart("Timeline", this, element, dataSource, options, processTime);
1827
+ },
1828
+ charts: {},
1829
+ configure: function (options) {
1830
+ for (var key in options) {
1831
+ if (options.hasOwnProperty(key)) {
1832
+ config[key] = options[key];
1833
+ }
1834
+ }
1835
+ },
1836
+ eachChart: function (callback) {
1837
+ for (var chartId in Chartkick.charts) {
1838
+ if (Chartkick.charts.hasOwnProperty(chartId)) {
1839
+ callback(Chartkick.charts[chartId]);
1840
+ }
1841
+ }
1842
+ },
1843
+ options: {},
1844
+ adapters: adapters,
1845
+ createChart: createChart
1846
+ };
1847
+
1848
+ if (typeof module === "object" && typeof module.exports === "object") {
1849
+ module.exports = Chartkick;
1850
+ } else {
1851
+ window.Chartkick = Chartkick;
1852
+ }
1853
+ }(window));