weaver 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (568) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +3 -0
  5. data/CODE_OF_CONDUCT.md +13 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +39 -0
  9. data/Rakefile +1 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +7 -0
  12. data/bin/weaver +76 -0
  13. data/data/weaver/css/animate.css +2848 -0
  14. data/data/weaver/css/bootstrap.css +6358 -0
  15. data/data/weaver/css/bootstrap.min.css +5 -0
  16. data/data/weaver/css/patterns/congruent_pentagon.png +0 -0
  17. data/data/weaver/css/patterns/header-profile-skin-1.png +0 -0
  18. data/data/weaver/css/patterns/header-profile-skin-2.png +0 -0
  19. data/data/weaver/css/patterns/header-profile-skin-3.png +0 -0
  20. data/data/weaver/css/patterns/header-profile.png +0 -0
  21. data/data/weaver/css/patterns/otis_redding.png +0 -0
  22. data/data/weaver/css/patterns/shattered.png +0 -0
  23. data/data/weaver/css/patterns/triangular.png +0 -0
  24. data/data/weaver/css/plugins/blueimp/css/blueimp-gallery-indicator.css +71 -0
  25. data/data/weaver/css/plugins/blueimp/css/blueimp-gallery-video.css +87 -0
  26. data/data/weaver/css/plugins/blueimp/css/blueimp-gallery.css +226 -0
  27. data/data/weaver/css/plugins/blueimp/css/blueimp-gallery.min.css +1 -0
  28. data/data/weaver/css/plugins/blueimp/css/demo.css +51 -0
  29. data/data/weaver/css/plugins/blueimp/img/error.png +0 -0
  30. data/data/weaver/css/plugins/blueimp/img/error.svg +5 -0
  31. data/data/weaver/css/plugins/blueimp/img/loading.gif +0 -0
  32. data/data/weaver/css/plugins/blueimp/img/play-pause.png +0 -0
  33. data/data/weaver/css/plugins/blueimp/img/play-pause.svg +6 -0
  34. data/data/weaver/css/plugins/blueimp/img/video-play.png +0 -0
  35. data/data/weaver/css/plugins/blueimp/img/video-play.svg +5 -0
  36. data/data/weaver/css/plugins/bootstrap-rtl/bootstrap-rtl.css +1468 -0
  37. data/data/weaver/css/plugins/bootstrap-rtl/bootstrap-rtl.css.map +1 -0
  38. data/data/weaver/css/plugins/bootstrap-rtl/bootstrap-rtl.min.css +9 -0
  39. data/data/weaver/css/plugins/chosen/chosen-sprite.png +0 -0
  40. data/data/weaver/css/plugins/chosen/chosen-sprite@2x.png +0 -0
  41. data/data/weaver/css/plugins/chosen/chosen.css +429 -0
  42. data/data/weaver/css/plugins/codemirror/ambiance.css +77 -0
  43. data/data/weaver/css/plugins/codemirror/codemirror.css +309 -0
  44. data/data/weaver/css/plugins/colorpicker/bootstrap-colorpicker.min.css +9 -0
  45. data/data/weaver/css/plugins/cropper/cropper.min.css +9 -0
  46. data/data/weaver/css/plugins/dataTables/dataTables.bootstrap.css +233 -0
  47. data/data/weaver/css/plugins/dataTables/dataTables.responsive.css +93 -0
  48. data/data/weaver/css/plugins/dataTables/dataTables.tableTools.min.css +1 -0
  49. data/data/weaver/css/plugins/datapicker/datepicker3.css +789 -0
  50. data/data/weaver/css/plugins/dropzone/basic.css +155 -0
  51. data/data/weaver/css/plugins/dropzone/dropzone.css +410 -0
  52. data/data/weaver/css/plugins/fullcalendar/fullcalendar.css +977 -0
  53. data/data/weaver/css/plugins/fullcalendar/fullcalendar.print.css +202 -0
  54. data/data/weaver/css/plugins/iCheck/custom.css +59 -0
  55. data/data/weaver/css/plugins/iCheck/green.png +0 -0
  56. data/data/weaver/css/plugins/iCheck/green@2x.png +0 -0
  57. data/data/weaver/css/plugins/images/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  58. data/data/weaver/css/plugins/images/bootstrap-colorpicker/alpha.png +0 -0
  59. data/data/weaver/css/plugins/images/bootstrap-colorpicker/hue-horizontal.png +0 -0
  60. data/data/weaver/css/plugins/images/bootstrap-colorpicker/hue.png +0 -0
  61. data/data/weaver/css/plugins/images/bootstrap-colorpicker/saturation.png +0 -0
  62. data/data/weaver/css/plugins/images/sort.png +0 -0
  63. data/data/weaver/css/plugins/images/sort_asc.png +0 -0
  64. data/data/weaver/css/plugins/images/sort_desc.png +0 -0
  65. data/data/weaver/css/plugins/images/sprite-skin-flat.png +0 -0
  66. data/data/weaver/css/plugins/images/sprite-skin-flat2.png +0 -0
  67. data/data/weaver/css/plugins/images/sprite-skin-nice.png +0 -0
  68. data/data/weaver/css/plugins/images/sprite-skin-simple.png +0 -0
  69. data/data/weaver/css/plugins/images/spritemap.png +0 -0
  70. data/data/weaver/css/plugins/images/spritemap@2x.png +0 -0
  71. data/data/weaver/css/plugins/ionRangeSlider/ion.rangeSlider.css +126 -0
  72. data/data/weaver/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css +89 -0
  73. data/data/weaver/css/plugins/ionRangeSlider/ion.rangeSlider.skinNice.css +85 -0
  74. data/data/weaver/css/plugins/ionRangeSlider/ion.rangeSlider.skinSimple.css +85 -0
  75. data/data/weaver/css/plugins/jQueryUI/images/animated-overlay.gif +0 -0
  76. data/data/weaver/css/plugins/jQueryUI/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  77. data/data/weaver/css/plugins/jQueryUI/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  78. data/data/weaver/css/plugins/jQueryUI/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  79. data/data/weaver/css/plugins/jQueryUI/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  80. data/data/weaver/css/plugins/jQueryUI/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  81. data/data/weaver/css/plugins/jQueryUI/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  82. data/data/weaver/css/plugins/jQueryUI/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  83. data/data/weaver/css/plugins/jQueryUI/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  84. data/data/weaver/css/plugins/jQueryUI/images/ui-icons_222222_256x240.png +0 -0
  85. data/data/weaver/css/plugins/jQueryUI/images/ui-icons_2e83ff_256x240.png +0 -0
  86. data/data/weaver/css/plugins/jQueryUI/images/ui-icons_454545_256x240.png +0 -0
  87. data/data/weaver/css/plugins/jQueryUI/images/ui-icons_888888_256x240.png +0 -0
  88. data/data/weaver/css/plugins/jQueryUI/images/ui-icons_cd0a0a_256x240.png +0 -0
  89. data/data/weaver/css/plugins/jQueryUI/jquery-ui-1.10.4.custom.min.css +7 -0
  90. data/data/weaver/css/plugins/jasny/jasny-bootstrap.min.css +7 -0
  91. data/data/weaver/css/plugins/jqGrid/ui.jqgrid.css +171 -0
  92. data/data/weaver/css/plugins/jsTree/32px.png +0 -0
  93. data/data/weaver/css/plugins/jsTree/39px.png +0 -0
  94. data/data/weaver/css/plugins/jsTree/40px.png +0 -0
  95. data/data/weaver/css/plugins/jsTree/style.css +1050 -0
  96. data/data/weaver/css/plugins/jsTree/style.min.css +1 -0
  97. data/data/weaver/css/plugins/jsTree/throbber.gif +0 -0
  98. data/data/weaver/css/plugins/morris/morris-0.4.3.min.css +2 -0
  99. data/data/weaver/css/plugins/nouslider/jquery.nouislider.css +165 -0
  100. data/data/weaver/css/plugins/social-buttons/social-buttons.css +68 -0
  101. data/data/weaver/css/plugins/steps/jquery.steps.css +380 -0
  102. data/data/weaver/css/plugins/summernote/summernote-bs3.css +5970 -0
  103. data/data/weaver/css/plugins/summernote/summernote.css +446 -0
  104. data/data/weaver/css/plugins/switchery/switchery.css +32 -0
  105. data/data/weaver/css/plugins/toastr/toastr.min.css +222 -0
  106. data/data/weaver/css/style.css +5031 -0
  107. data/data/weaver/css/style.min.css +1 -0
  108. data/data/weaver/font-awesome/css/font-awesome.css +1801 -0
  109. data/data/weaver/font-awesome/css/font-awesome.min.css +4 -0
  110. data/data/weaver/font-awesome/fonts/FontAwesome.otf +0 -0
  111. data/data/weaver/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  112. data/data/weaver/font-awesome/fonts/fontawesome-webfont.svg +565 -0
  113. data/data/weaver/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  114. data/data/weaver/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  115. data/data/weaver/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
  116. data/data/weaver/font-awesome/less/animated.less +34 -0
  117. data/data/weaver/font-awesome/less/bordered-pulled.less +16 -0
  118. data/data/weaver/font-awesome/less/core.less +13 -0
  119. data/data/weaver/font-awesome/less/fixed-width.less +6 -0
  120. data/data/weaver/font-awesome/less/font-awesome.less +17 -0
  121. data/data/weaver/font-awesome/less/icons.less +596 -0
  122. data/data/weaver/font-awesome/less/larger.less +13 -0
  123. data/data/weaver/font-awesome/less/list.less +19 -0
  124. data/data/weaver/font-awesome/less/mixins.less +27 -0
  125. data/data/weaver/font-awesome/less/path.less +15 -0
  126. data/data/weaver/font-awesome/less/rotated-flipped.less +20 -0
  127. data/data/weaver/font-awesome/less/stacked.less +20 -0
  128. data/data/weaver/font-awesome/less/variables.less +606 -0
  129. data/data/weaver/font-awesome/scss/_animated.scss +34 -0
  130. data/data/weaver/font-awesome/scss/_bordered-pulled.scss +16 -0
  131. data/data/weaver/font-awesome/scss/_core.scss +13 -0
  132. data/data/weaver/font-awesome/scss/_fixed-width.scss +6 -0
  133. data/data/weaver/font-awesome/scss/_icons.scss +596 -0
  134. data/data/weaver/font-awesome/scss/_larger.scss +13 -0
  135. data/data/weaver/font-awesome/scss/_list.scss +19 -0
  136. data/data/weaver/font-awesome/scss/_mixins.scss +27 -0
  137. data/data/weaver/font-awesome/scss/_path.scss +15 -0
  138. data/data/weaver/font-awesome/scss/_rotated-flipped.scss +20 -0
  139. data/data/weaver/font-awesome/scss/_stacked.scss +20 -0
  140. data/data/weaver/font-awesome/scss/_variables.scss +606 -0
  141. data/data/weaver/font-awesome/scss/font-awesome.scss +17 -0
  142. data/data/weaver/fonts/OpenSans/OpenSans-Bold.ttf +0 -0
  143. data/data/weaver/fonts/OpenSans/OpenSans-BoldItalic.ttf +0 -0
  144. data/data/weaver/fonts/OpenSans/OpenSans-ExtraBold.ttf +0 -0
  145. data/data/weaver/fonts/OpenSans/OpenSans-ExtraBoldItalic.ttf +0 -0
  146. data/data/weaver/fonts/OpenSans/OpenSans-Italic.ttf +0 -0
  147. data/data/weaver/fonts/OpenSans/OpenSans-Light.ttf +0 -0
  148. data/data/weaver/fonts/OpenSans/OpenSans-LightItalic.ttf +0 -0
  149. data/data/weaver/fonts/OpenSans/OpenSans-Regular.ttf +0 -0
  150. data/data/weaver/fonts/OpenSans/OpenSans-Semibold.ttf +0 -0
  151. data/data/weaver/fonts/OpenSans/OpenSans-SemiboldItalic.ttf +0 -0
  152. data/data/weaver/fonts/glyphicons-halflings-regular.eot +0 -0
  153. data/data/weaver/fonts/glyphicons-halflings-regular.svg +229 -0
  154. data/data/weaver/fonts/glyphicons-halflings-regular.ttf +0 -0
  155. data/data/weaver/fonts/glyphicons-halflings-regular.woff +0 -0
  156. data/data/weaver/js/bootstrap.js +2276 -0
  157. data/data/weaver/js/bootstrap.min.js +7 -0
  158. data/data/weaver/js/demo/chartjs-demo.js +217 -0
  159. data/data/weaver/js/demo/dashboard-demo.js +117 -0
  160. data/data/weaver/js/demo/flot-demo.js +308 -0
  161. data/data/weaver/js/demo/flot-demo2.js +377 -0
  162. data/data/weaver/js/demo/morris-demo.js +89 -0
  163. data/data/weaver/js/demo/peity-demo.js +33 -0
  164. data/data/weaver/js/demo/rickshaw-demo.js +103 -0
  165. data/data/weaver/js/demo/sparkline-demo.js +51 -0
  166. data/data/weaver/js/inspinia.js +149 -0
  167. data/data/weaver/js/jquery-2.1.1.js +4 -0
  168. data/data/weaver/js/jquery-ui-1.10.4.min.js +7 -0
  169. data/data/weaver/js/jquery-ui.custom.min.js +16 -0
  170. data/data/weaver/js/plugins/blueimp/jquery.blueimp-gallery.min.js +1 -0
  171. data/data/weaver/js/plugins/chartJs/Chart.min.js +11 -0
  172. data/data/weaver/js/plugins/chosen/chosen.jquery.js +1211 -0
  173. data/data/weaver/js/plugins/codemirror/codemirror.js +7830 -0
  174. data/data/weaver/js/plugins/codemirror/mode/apl/apl.js +175 -0
  175. data/data/weaver/js/plugins/codemirror/mode/apl/index.html +72 -0
  176. data/data/weaver/js/plugins/codemirror/mode/asterisk/asterisk.js +198 -0
  177. data/data/weaver/js/plugins/codemirror/mode/asterisk/index.html +154 -0
  178. data/data/weaver/js/plugins/codemirror/mode/clike/clike.js +474 -0
  179. data/data/weaver/js/plugins/codemirror/mode/clike/index.html +225 -0
  180. data/data/weaver/js/plugins/codemirror/mode/clike/scala.html +767 -0
  181. data/data/weaver/js/plugins/codemirror/mode/clojure/clojure.js +243 -0
  182. data/data/weaver/js/plugins/codemirror/mode/clojure/index.html +88 -0
  183. data/data/weaver/js/plugins/codemirror/mode/cobol/cobol.js +255 -0
  184. data/data/weaver/js/plugins/codemirror/mode/cobol/index.html +210 -0
  185. data/data/weaver/js/plugins/codemirror/mode/coffeescript/coffeescript.js +369 -0
  186. data/data/weaver/js/plugins/codemirror/mode/coffeescript/index.html +740 -0
  187. data/data/weaver/js/plugins/codemirror/mode/commonlisp/commonlisp.js +120 -0
  188. data/data/weaver/js/plugins/codemirror/mode/commonlisp/index.html +177 -0
  189. data/data/weaver/js/plugins/codemirror/mode/css/css.js +717 -0
  190. data/data/weaver/js/plugins/codemirror/mode/css/index.html +70 -0
  191. data/data/weaver/js/plugins/codemirror/mode/css/less.html +152 -0
  192. data/data/weaver/js/plugins/codemirror/mode/css/less_test.js +51 -0
  193. data/data/weaver/js/plugins/codemirror/mode/css/scss.html +157 -0
  194. data/data/weaver/js/plugins/codemirror/mode/css/scss_test.js +110 -0
  195. data/data/weaver/js/plugins/codemirror/mode/css/test.js +135 -0
  196. data/data/weaver/js/plugins/codemirror/mode/cypher/cypher.js +146 -0
  197. data/data/weaver/js/plugins/codemirror/mode/cypher/index.html +63 -0
  198. data/data/weaver/js/plugins/codemirror/mode/d/d.js +218 -0
  199. data/data/weaver/js/plugins/codemirror/mode/d/index.html +273 -0
  200. data/data/weaver/js/plugins/codemirror/mode/diff/diff.js +47 -0
  201. data/data/weaver/js/plugins/codemirror/mode/diff/index.html +117 -0
  202. data/data/weaver/js/plugins/codemirror/mode/django/django.js +67 -0
  203. data/data/weaver/js/plugins/codemirror/mode/django/index.html +63 -0
  204. data/data/weaver/js/plugins/codemirror/mode/dtd/dtd.js +142 -0
  205. data/data/weaver/js/plugins/codemirror/mode/dtd/index.html +89 -0
  206. data/data/weaver/js/plugins/codemirror/mode/dylan/dylan.js +299 -0
  207. data/data/weaver/js/plugins/codemirror/mode/dylan/index.html +407 -0
  208. data/data/weaver/js/plugins/codemirror/mode/ecl/ecl.js +207 -0
  209. data/data/weaver/js/plugins/codemirror/mode/ecl/index.html +52 -0
  210. data/data/weaver/js/plugins/codemirror/mode/eiffel/eiffel.js +162 -0
  211. data/data/weaver/js/plugins/codemirror/mode/eiffel/index.html +429 -0
  212. data/data/weaver/js/plugins/codemirror/mode/erlang/erlang.js +622 -0
  213. data/data/weaver/js/plugins/codemirror/mode/erlang/index.html +76 -0
  214. data/data/weaver/js/plugins/codemirror/mode/fortran/fortran.js +188 -0
  215. data/data/weaver/js/plugins/codemirror/mode/fortran/index.html +81 -0
  216. data/data/weaver/js/plugins/codemirror/mode/gas/gas.js +345 -0
  217. data/data/weaver/js/plugins/codemirror/mode/gas/index.html +68 -0
  218. data/data/weaver/js/plugins/codemirror/mode/gfm/gfm.js +122 -0
  219. data/data/weaver/js/plugins/codemirror/mode/gfm/index.html +82 -0
  220. data/data/weaver/js/plugins/codemirror/mode/gfm/test.js +164 -0
  221. data/data/weaver/js/plugins/codemirror/mode/gherkin/gherkin.js +178 -0
  222. data/data/weaver/js/plugins/codemirror/mode/gherkin/index.html +48 -0
  223. data/data/weaver/js/plugins/codemirror/mode/go/go.js +184 -0
  224. data/data/weaver/js/plugins/codemirror/mode/go/index.html +85 -0
  225. data/data/weaver/js/plugins/codemirror/mode/groovy/groovy.js +226 -0
  226. data/data/weaver/js/plugins/codemirror/mode/groovy/index.html +84 -0
  227. data/data/weaver/js/plugins/codemirror/mode/haml/haml.js +159 -0
  228. data/data/weaver/js/plugins/codemirror/mode/haml/index.html +79 -0
  229. data/data/weaver/js/plugins/codemirror/mode/haml/test.js +97 -0
  230. data/data/weaver/js/plugins/codemirror/mode/haskell/haskell.js +267 -0
  231. data/data/weaver/js/plugins/codemirror/mode/haskell/index.html +73 -0
  232. data/data/weaver/js/plugins/codemirror/mode/haxe/haxe.js +518 -0
  233. data/data/weaver/js/plugins/codemirror/mode/haxe/index.html +124 -0
  234. data/data/weaver/js/plugins/codemirror/mode/htmlembedded/htmlembedded.js +86 -0
  235. data/data/weaver/js/plugins/codemirror/mode/htmlembedded/index.html +58 -0
  236. data/data/weaver/js/plugins/codemirror/mode/htmlmixed/htmlmixed.js +121 -0
  237. data/data/weaver/js/plugins/codemirror/mode/htmlmixed/index.html +85 -0
  238. data/data/weaver/js/plugins/codemirror/mode/http/http.js +113 -0
  239. data/data/weaver/js/plugins/codemirror/mode/http/index.html +45 -0
  240. data/data/weaver/js/plugins/codemirror/mode/index.html +125 -0
  241. data/data/weaver/js/plugins/codemirror/mode/jade/index.html +70 -0
  242. data/data/weaver/js/plugins/codemirror/mode/jade/jade.js +590 -0
  243. data/data/weaver/js/plugins/codemirror/mode/javascript/index.html +114 -0
  244. data/data/weaver/js/plugins/codemirror/mode/javascript/javascript.js +684 -0
  245. data/data/weaver/js/plugins/codemirror/mode/javascript/json-ld.html +72 -0
  246. data/data/weaver/js/plugins/codemirror/mode/javascript/test.js +194 -0
  247. data/data/weaver/js/plugins/codemirror/mode/javascript/typescript.html +61 -0
  248. data/data/weaver/js/plugins/codemirror/mode/jinja2/index.html +54 -0
  249. data/data/weaver/js/plugins/codemirror/mode/jinja2/jinja2.js +142 -0
  250. data/data/weaver/js/plugins/codemirror/mode/julia/index.html +195 -0
  251. data/data/weaver/js/plugins/codemirror/mode/julia/julia.js +301 -0
  252. data/data/weaver/js/plugins/codemirror/mode/kotlin/index.html +89 -0
  253. data/data/weaver/js/plugins/codemirror/mode/kotlin/kotlin.js +280 -0
  254. data/data/weaver/js/plugins/codemirror/mode/livescript/index.html +459 -0
  255. data/data/weaver/js/plugins/codemirror/mode/livescript/livescript.js +280 -0
  256. data/data/weaver/js/plugins/codemirror/mode/lua/index.html +85 -0
  257. data/data/weaver/js/plugins/codemirror/mode/lua/lua.js +159 -0
  258. data/data/weaver/js/plugins/codemirror/mode/markdown/index.html +359 -0
  259. data/data/weaver/js/plugins/codemirror/mode/markdown/markdown.js +758 -0
  260. data/data/weaver/js/plugins/codemirror/mode/markdown/test.js +754 -0
  261. data/data/weaver/js/plugins/codemirror/mode/meta.js +144 -0
  262. data/data/weaver/js/plugins/codemirror/mode/mirc/index.html +160 -0
  263. data/data/weaver/js/plugins/codemirror/mode/mirc/mirc.js +193 -0
  264. data/data/weaver/js/plugins/codemirror/mode/mllike/index.html +179 -0
  265. data/data/weaver/js/plugins/codemirror/mode/mllike/mllike.js +205 -0
  266. data/data/weaver/js/plugins/codemirror/mode/modelica/index.html +67 -0
  267. data/data/weaver/js/plugins/codemirror/mode/modelica/modelica.js +245 -0
  268. data/data/weaver/js/plugins/codemirror/mode/nginx/index.html +181 -0
  269. data/data/weaver/js/plugins/codemirror/mode/nginx/nginx.js +178 -0
  270. data/data/weaver/js/plugins/codemirror/mode/ntriples/index.html +45 -0
  271. data/data/weaver/js/plugins/codemirror/mode/ntriples/ntriples.js +186 -0
  272. data/data/weaver/js/plugins/codemirror/mode/octave/index.html +83 -0
  273. data/data/weaver/js/plugins/codemirror/mode/octave/octave.js +135 -0
  274. data/data/weaver/js/plugins/codemirror/mode/pascal/index.html +61 -0
  275. data/data/weaver/js/plugins/codemirror/mode/pascal/pascal.js +109 -0
  276. data/data/weaver/js/plugins/codemirror/mode/pegjs/index.html +66 -0
  277. data/data/weaver/js/plugins/codemirror/mode/pegjs/pegjs.js +114 -0
  278. data/data/weaver/js/plugins/codemirror/mode/perl/index.html +75 -0
  279. data/data/weaver/js/plugins/codemirror/mode/perl/perl.js +832 -0
  280. data/data/weaver/js/plugins/codemirror/mode/php/index.html +64 -0
  281. data/data/weaver/js/plugins/codemirror/mode/php/php.js +226 -0
  282. data/data/weaver/js/plugins/codemirror/mode/php/test.js +154 -0
  283. data/data/weaver/js/plugins/codemirror/mode/pig/index.html +55 -0
  284. data/data/weaver/js/plugins/codemirror/mode/pig/pig.js +188 -0
  285. data/data/weaver/js/plugins/codemirror/mode/properties/index.html +53 -0
  286. data/data/weaver/js/plugins/codemirror/mode/properties/properties.js +78 -0
  287. data/data/weaver/js/plugins/codemirror/mode/puppet/index.html +121 -0
  288. data/data/weaver/js/plugins/codemirror/mode/puppet/puppet.js +220 -0
  289. data/data/weaver/js/plugins/codemirror/mode/python/index.html +198 -0
  290. data/data/weaver/js/plugins/codemirror/mode/python/python.js +359 -0
  291. data/data/weaver/js/plugins/codemirror/mode/q/index.html +144 -0
  292. data/data/weaver/js/plugins/codemirror/mode/q/q.js +139 -0
  293. data/data/weaver/js/plugins/codemirror/mode/r/index.html +85 -0
  294. data/data/weaver/js/plugins/codemirror/mode/r/r.js +162 -0
  295. data/data/weaver/js/plugins/codemirror/mode/rpm/changes/index.html +66 -0
  296. data/data/weaver/js/plugins/codemirror/mode/rpm/index.html +149 -0
  297. data/data/weaver/js/plugins/codemirror/mode/rpm/rpm.js +101 -0
  298. data/data/weaver/js/plugins/codemirror/mode/rst/index.html +535 -0
  299. data/data/weaver/js/plugins/codemirror/mode/rst/rst.js +557 -0
  300. data/data/weaver/js/plugins/codemirror/mode/ruby/index.html +184 -0
  301. data/data/weaver/js/plugins/codemirror/mode/ruby/ruby.js +285 -0
  302. data/data/weaver/js/plugins/codemirror/mode/ruby/test.js +14 -0
  303. data/data/weaver/js/plugins/codemirror/mode/rust/index.html +60 -0
  304. data/data/weaver/js/plugins/codemirror/mode/rust/rust.js +451 -0
  305. data/data/weaver/js/plugins/codemirror/mode/sass/index.html +66 -0
  306. data/data/weaver/js/plugins/codemirror/mode/sass/sass.js +327 -0
  307. data/data/weaver/js/plugins/codemirror/mode/scheme/index.html +77 -0
  308. data/data/weaver/js/plugins/codemirror/mode/scheme/scheme.js +248 -0
  309. data/data/weaver/js/plugins/codemirror/mode/shell/index.html +66 -0
  310. data/data/weaver/js/plugins/codemirror/mode/shell/shell.js +138 -0
  311. data/data/weaver/js/plugins/codemirror/mode/shell/test.js +58 -0
  312. data/data/weaver/js/plugins/codemirror/mode/sieve/index.html +93 -0
  313. data/data/weaver/js/plugins/codemirror/mode/sieve/sieve.js +193 -0
  314. data/data/weaver/js/plugins/codemirror/mode/slim/index.html +96 -0
  315. data/data/weaver/js/plugins/codemirror/mode/slim/slim.js +575 -0
  316. data/data/weaver/js/plugins/codemirror/mode/slim/test.js +96 -0
  317. data/data/weaver/js/plugins/codemirror/mode/smalltalk/index.html +68 -0
  318. data/data/weaver/js/plugins/codemirror/mode/smalltalk/smalltalk.js +168 -0
  319. data/data/weaver/js/plugins/codemirror/mode/smarty/index.html +136 -0
  320. data/data/weaver/js/plugins/codemirror/mode/smarty/smarty.js +221 -0
  321. data/data/weaver/js/plugins/codemirror/mode/smartymixed/index.html +114 -0
  322. data/data/weaver/js/plugins/codemirror/mode/smartymixed/smartymixed.js +197 -0
  323. data/data/weaver/js/plugins/codemirror/mode/solr/index.html +57 -0
  324. data/data/weaver/js/plugins/codemirror/mode/solr/solr.js +104 -0
  325. data/data/weaver/js/plugins/codemirror/mode/sparql/index.html +53 -0
  326. data/data/weaver/js/plugins/codemirror/mode/sparql/sparql.js +160 -0
  327. data/data/weaver/js/plugins/codemirror/mode/sql/index.html +84 -0
  328. data/data/weaver/js/plugins/codemirror/mode/sql/sql.js +393 -0
  329. data/data/weaver/js/plugins/codemirror/mode/stex/index.html +110 -0
  330. data/data/weaver/js/plugins/codemirror/mode/stex/stex.js +262 -0
  331. data/data/weaver/js/plugins/codemirror/mode/stex/test.js +123 -0
  332. data/data/weaver/js/plugins/codemirror/mode/tcl/index.html +142 -0
  333. data/data/weaver/js/plugins/codemirror/mode/tcl/tcl.js +147 -0
  334. data/data/weaver/js/plugins/codemirror/mode/textile/index.html +191 -0
  335. data/data/weaver/js/plugins/codemirror/mode/textile/test.js +406 -0
  336. data/data/weaver/js/plugins/codemirror/mode/textile/textile.js +553 -0
  337. data/data/weaver/js/plugins/codemirror/mode/tiddlywiki/index.html +154 -0
  338. data/data/weaver/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  339. data/data/weaver/js/plugins/codemirror/mode/tiddlywiki/tiddlywiki.js +369 -0
  340. data/data/weaver/js/plugins/codemirror/mode/tiki/index.html +95 -0
  341. data/data/weaver/js/plugins/codemirror/mode/tiki/tiki.css +26 -0
  342. data/data/weaver/js/plugins/codemirror/mode/tiki/tiki.js +323 -0
  343. data/data/weaver/js/plugins/codemirror/mode/toml/index.html +73 -0
  344. data/data/weaver/js/plugins/codemirror/mode/toml/toml.js +88 -0
  345. data/data/weaver/js/plugins/codemirror/mode/tornado/index.html +63 -0
  346. data/data/weaver/js/plugins/codemirror/mode/tornado/tornado.js +68 -0
  347. data/data/weaver/js/plugins/codemirror/mode/turtle/index.html +50 -0
  348. data/data/weaver/js/plugins/codemirror/mode/turtle/turtle.js +160 -0
  349. data/data/weaver/js/plugins/codemirror/mode/vb/index.html +102 -0
  350. data/data/weaver/js/plugins/codemirror/mode/vb/vb.js +274 -0
  351. data/data/weaver/js/plugins/codemirror/mode/vbscript/index.html +55 -0
  352. data/data/weaver/js/plugins/codemirror/mode/vbscript/vbscript.js +350 -0
  353. data/data/weaver/js/plugins/codemirror/mode/velocity/index.html +118 -0
  354. data/data/weaver/js/plugins/codemirror/mode/velocity/velocity.js +201 -0
  355. data/data/weaver/js/plugins/codemirror/mode/verilog/index.html +120 -0
  356. data/data/weaver/js/plugins/codemirror/mode/verilog/test.js +273 -0
  357. data/data/weaver/js/plugins/codemirror/mode/verilog/verilog.js +364 -0
  358. data/data/weaver/js/plugins/codemirror/mode/xml/index.html +57 -0
  359. data/data/weaver/js/plugins/codemirror/mode/xml/test.js +51 -0
  360. data/data/weaver/js/plugins/codemirror/mode/xml/xml.js +384 -0
  361. data/data/weaver/js/plugins/codemirror/mode/xquery/index.html +210 -0
  362. data/data/weaver/js/plugins/codemirror/mode/xquery/test.js +67 -0
  363. data/data/weaver/js/plugins/codemirror/mode/xquery/xquery.js +447 -0
  364. data/data/weaver/js/plugins/codemirror/mode/yaml/index.html +80 -0
  365. data/data/weaver/js/plugins/codemirror/mode/yaml/yaml.js +112 -0
  366. data/data/weaver/js/plugins/codemirror/mode/z80/index.html +52 -0
  367. data/data/weaver/js/plugins/codemirror/mode/z80/z80.js +100 -0
  368. data/data/weaver/js/plugins/colorpicker/bootstrap-colorpicker.min.js +1 -0
  369. data/data/weaver/js/plugins/cropper/cropper.min.js +9 -0
  370. data/data/weaver/js/plugins/dataTables/dataTables.bootstrap.js +245 -0
  371. data/data/weaver/js/plugins/dataTables/dataTables.responsive.js +801 -0
  372. data/data/weaver/js/plugins/dataTables/dataTables.tableTools.min.js +69 -0
  373. data/data/weaver/js/plugins/dataTables/jquery.dataTables.js +14840 -0
  374. data/data/weaver/js/plugins/dataTables/swf/copy_csv_xls.swf +0 -0
  375. data/data/weaver/js/plugins/dataTables/swf/copy_csv_xls_pdf.swf +0 -0
  376. data/data/weaver/js/plugins/datapicker/bootstrap-datepicker.js +1671 -0
  377. data/data/weaver/js/plugins/dropzone/dropzone.js +1841 -0
  378. data/data/weaver/js/plugins/easypiechart/easypiechart.js +350 -0
  379. data/data/weaver/js/plugins/easypiechart/jquery.easypiechart.js +359 -0
  380. data/data/weaver/js/plugins/flot/curvedLines.js +315 -0
  381. data/data/weaver/js/plugins/flot/excanvas.min.js +1 -0
  382. data/data/weaver/js/plugins/flot/jquery.flot.js +3168 -0
  383. data/data/weaver/js/plugins/flot/jquery.flot.pie.js +820 -0
  384. data/data/weaver/js/plugins/flot/jquery.flot.resize.js +59 -0
  385. data/data/weaver/js/plugins/flot/jquery.flot.spline.js +212 -0
  386. data/data/weaver/js/plugins/flot/jquery.flot.symbol.js +71 -0
  387. data/data/weaver/js/plugins/flot/jquery.flot.time.js +432 -0
  388. data/data/weaver/js/plugins/flot/jquery.flot.tooltip.min.js +12 -0
  389. data/data/weaver/js/plugins/fullcalendar/fullcalendar.min.js +8 -0
  390. data/data/weaver/js/plugins/fullcalendar/moment.min.js +7 -0
  391. data/data/weaver/js/plugins/gritter/images/gritter-light.png +0 -0
  392. data/data/weaver/js/plugins/gritter/images/gritter-long.png +0 -0
  393. data/data/weaver/js/plugins/gritter/images/gritter.png +0 -0
  394. data/data/weaver/js/plugins/gritter/images/ie-spacer.gif +0 -0
  395. data/data/weaver/js/plugins/gritter/jquery.gritter.css +137 -0
  396. data/data/weaver/js/plugins/gritter/jquery.gritter.min.js +1 -0
  397. data/data/weaver/js/plugins/iCheck/icheck.min.js +11 -0
  398. data/data/weaver/js/plugins/ionRangeSlider/ion.rangeSlider.min.js +26 -0
  399. data/data/weaver/js/plugins/jasny/jasny-bootstrap.min.js +6 -0
  400. data/data/weaver/js/plugins/jeditable/jquery.jeditable.js +543 -0
  401. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-ar.js +128 -0
  402. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-bg.js +134 -0
  403. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-bg1251.js +132 -0
  404. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-cat.js +130 -0
  405. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-cn.js +169 -0
  406. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-cs.js +130 -0
  407. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-da.js +130 -0
  408. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-de.js +173 -0
  409. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-dk.js +129 -0
  410. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-el.js +128 -0
  411. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-en.js +170 -0
  412. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-es.js +130 -0
  413. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-fa.js +147 -0
  414. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-fi.js +131 -0
  415. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-fr.js +128 -0
  416. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-gl.js +128 -0
  417. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-he.js +129 -0
  418. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-hr.js +164 -0
  419. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-hr1250.js +164 -0
  420. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-hu.js +131 -0
  421. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-id.js +170 -0
  422. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-is.js +128 -0
  423. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-it.js +1 -0
  424. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-ja.js +158 -0
  425. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-kr.js +130 -0
  426. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-lt.js +130 -0
  427. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-mne.js +130 -0
  428. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-nl.js +150 -0
  429. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-no.js +1 -0
  430. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-pl.js +134 -0
  431. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-pt-br.js +137 -0
  432. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-pt.js +127 -0
  433. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-ro.js +141 -0
  434. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-ru.js +129 -0
  435. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-sk.js +129 -0
  436. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-sr-latin.js +130 -0
  437. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-sr.js +130 -0
  438. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-sv.js +129 -0
  439. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-th.js +130 -0
  440. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-tr.js +128 -0
  441. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-tw.js +131 -0
  442. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-ua.js +129 -0
  443. data/data/weaver/js/plugins/jqGrid/i18n/grid.locale-vi.js +170 -0
  444. data/data/weaver/js/plugins/jqGrid/jquery.jqGrid.min.js +545 -0
  445. data/data/weaver/js/plugins/jquery-ui/i18n/jquery-ui-i18n.min.js +6 -0
  446. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-af.min.js +4 -0
  447. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar-DZ.min.js +4 -0
  448. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ar.min.js +4 -0
  449. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-az.min.js +4 -0
  450. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-be.min.js +4 -0
  451. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bg.min.js +4 -0
  452. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-bs.min.js +4 -0
  453. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ca.min.js +4 -0
  454. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cs.min.js +4 -0
  455. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-cy-GB.min.js +4 -0
  456. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-da.min.js +4 -0
  457. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-de.min.js +4 -0
  458. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-el.min.js +4 -0
  459. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-AU.min.js +4 -0
  460. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-GB.min.js +4 -0
  461. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-en-NZ.min.js +4 -0
  462. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eo.min.js +4 -0
  463. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-es.min.js +4 -0
  464. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-et.min.js +4 -0
  465. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-eu.min.js +4 -0
  466. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fa.min.js +4 -0
  467. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fi.min.js +4 -0
  468. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fo.min.js +4 -0
  469. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CA.min.js +4 -0
  470. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr-CH.min.js +4 -0
  471. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-fr.min.js +4 -0
  472. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-gl.min.js +4 -0
  473. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-he.min.js +4 -0
  474. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hi.min.js +4 -0
  475. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hr.min.js +4 -0
  476. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js +4 -0
  477. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-hy.min.js +4 -0
  478. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-id.min.js +4 -0
  479. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-is.min.js +4 -0
  480. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-it.min.js +4 -0
  481. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ja.min.js +4 -0
  482. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ka.min.js +4 -0
  483. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-kk.min.js +4 -0
  484. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-km.min.js +4 -0
  485. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ko.min.js +4 -0
  486. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ky.min.js +4 -0
  487. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lb.min.js +4 -0
  488. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lt.min.js +4 -0
  489. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-lv.min.js +4 -0
  490. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-mk.min.js +4 -0
  491. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ml.min.js +4 -0
  492. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ms.min.js +4 -0
  493. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nb.min.js +4 -0
  494. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl-BE.min.js +4 -0
  495. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nl.min.js +4 -0
  496. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-nn.min.js +4 -0
  497. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-no.min.js +4 -0
  498. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pl.min.js +4 -0
  499. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt-BR.min.js +4 -0
  500. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-pt.min.js +4 -0
  501. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-rm.min.js +4 -0
  502. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ro.min.js +4 -0
  503. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ru.min.js +4 -0
  504. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sk.min.js +4 -0
  505. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sl.min.js +4 -0
  506. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sq.min.js +4 -0
  507. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr-SR.min.js +4 -0
  508. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sr.min.js +4 -0
  509. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-sv.min.js +4 -0
  510. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-ta.min.js +4 -0
  511. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-th.min.js +4 -0
  512. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tj.min.js +4 -0
  513. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-tr.min.js +4 -0
  514. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-uk.min.js +4 -0
  515. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-vi.min.js +4 -0
  516. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-CN.min.js +4 -0
  517. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-HK.min.js +4 -0
  518. data/data/weaver/js/plugins/jquery-ui/i18n/jquery.ui.datepicker-zh-TW.min.js +4 -0
  519. data/data/weaver/js/plugins/jquery-ui/images/animated-overlay.gif +0 -0
  520. data/data/weaver/js/plugins/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  521. data/data/weaver/js/plugins/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  522. data/data/weaver/js/plugins/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  523. data/data/weaver/js/plugins/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  524. data/data/weaver/js/plugins/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  525. data/data/weaver/js/plugins/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  526. data/data/weaver/js/plugins/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  527. data/data/weaver/js/plugins/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  528. data/data/weaver/js/plugins/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
  529. data/data/weaver/js/plugins/jquery-ui/images/ui-icons_2e83ff_256x240.png +0 -0
  530. data/data/weaver/js/plugins/jquery-ui/images/ui-icons_454545_256x240.png +0 -0
  531. data/data/weaver/js/plugins/jquery-ui/images/ui-icons_888888_256x240.png +0 -0
  532. data/data/weaver/js/plugins/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
  533. data/data/weaver/js/plugins/jquery-ui/jquery-ui.css +1189 -0
  534. data/data/weaver/js/plugins/jquery-ui/jquery-ui.js +15040 -0
  535. data/data/weaver/js/plugins/jquery-ui/jquery-ui.min.css +4 -0
  536. data/data/weaver/js/plugins/jquery-ui/jquery-ui.min.js +12 -0
  537. data/data/weaver/js/plugins/jsKnob/jquery.knob.js +791 -0
  538. data/data/weaver/js/plugins/jsTree/jstree.min.js +5 -0
  539. data/data/weaver/js/plugins/justified-gallery/README.md +14 -0
  540. data/data/weaver/js/plugins/justified-gallery/jquery.justifiedgallery.css +73 -0
  541. data/data/weaver/js/plugins/justified-gallery/jquery.justifiedgallery.js +258 -0
  542. data/data/weaver/js/plugins/justified-gallery/jquery.justifiedgallery.min.css +17 -0
  543. data/data/weaver/js/plugins/justified-gallery/jquery.justifiedgallery.min.js +24 -0
  544. data/data/weaver/js/plugins/justified-gallery/loading.gif +0 -0
  545. data/data/weaver/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js +8 -0
  546. data/data/weaver/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +1 -0
  547. data/data/weaver/js/plugins/metisMenu/jquery.metisMenu.js +120 -0
  548. data/data/weaver/js/plugins/morris/morris.js +1888 -0
  549. data/data/weaver/js/plugins/morris/raphael-2.1.0.min.js +10 -0
  550. data/data/weaver/js/plugins/nestable/jquery.nestable.js +484 -0
  551. data/data/weaver/js/plugins/nouslider/jquery.nouislider.min.js +34 -0
  552. data/data/weaver/js/plugins/pace/pace.min.js +2 -0
  553. data/data/weaver/js/plugins/peity/jquery.peity.min.js +13 -0
  554. data/data/weaver/js/plugins/rickshaw/rickshaw.min.js +3 -0
  555. data/data/weaver/js/plugins/rickshaw/vendor/d3.v3.js +5 -0
  556. data/data/weaver/js/plugins/slimscroll/jquery.slimscroll.js +464 -0
  557. data/data/weaver/js/plugins/slimscroll/jquery.slimscroll.min.js +16 -0
  558. data/data/weaver/js/plugins/sparkline/jquery.sparkline.min.js +5 -0
  559. data/data/weaver/js/plugins/staps/jquery.steps.min.js +6 -0
  560. data/data/weaver/js/plugins/summernote/summernote.min.js +2 -0
  561. data/data/weaver/js/plugins/switchery/switchery.js +1 -0
  562. data/data/weaver/js/plugins/toastr/toastr.min.js +2 -0
  563. data/data/weaver/js/plugins/validate/jquery.validate.min.js +4 -0
  564. data/data/weaver/js/plugins/video/responsible-video.js +21 -0
  565. data/lib/weaver.rb +922 -0
  566. data/lib/weaver/version.rb +3 -0
  567. data/weaver.gemspec +34 -0
  568. metadata +656 -0
@@ -0,0 +1,1841 @@
1
+
2
+ ;(function(){
3
+
4
+ /**
5
+ * Require the module at `name`.
6
+ *
7
+ * @param {String} name
8
+ * @return {Object} exports
9
+ * @api public
10
+ */
11
+
12
+ function require(name) {
13
+ var module = require.modules[name];
14
+ if (!module) throw new Error('failed to require "' + name + '"');
15
+
16
+ if (!('exports' in module) && typeof module.definition === 'function') {
17
+ module.client = module.component = true;
18
+ module.definition.call(this, module.exports = {}, module);
19
+ delete module.definition;
20
+ }
21
+
22
+ return module.exports;
23
+ }
24
+
25
+ /**
26
+ * Registered modules.
27
+ */
28
+
29
+ require.modules = {};
30
+
31
+ /**
32
+ * Register module at `name` with callback `definition`.
33
+ *
34
+ * @param {String} name
35
+ * @param {Function} definition
36
+ * @api private
37
+ */
38
+
39
+ require.register = function (name, definition) {
40
+ require.modules[name] = {
41
+ definition: definition
42
+ };
43
+ };
44
+
45
+ /**
46
+ * Define a module's exports immediately with `exports`.
47
+ *
48
+ * @param {String} name
49
+ * @param {Generic} exports
50
+ * @api private
51
+ */
52
+
53
+ require.define = function (name, exports) {
54
+ require.modules[name] = {
55
+ exports: exports
56
+ };
57
+ };
58
+ require.register("component~emitter@1.1.2", function (exports, module) {
59
+
60
+ /**
61
+ * Expose `Emitter`.
62
+ */
63
+
64
+ module.exports = Emitter;
65
+
66
+ /**
67
+ * Initialize a new `Emitter`.
68
+ *
69
+ * @api public
70
+ */
71
+
72
+ function Emitter(obj) {
73
+ if (obj) return mixin(obj);
74
+ };
75
+
76
+ /**
77
+ * Mixin the emitter properties.
78
+ *
79
+ * @param {Object} obj
80
+ * @return {Object}
81
+ * @api private
82
+ */
83
+
84
+ function mixin(obj) {
85
+ for (var key in Emitter.prototype) {
86
+ obj[key] = Emitter.prototype[key];
87
+ }
88
+ return obj;
89
+ }
90
+
91
+ /**
92
+ * Listen on the given `event` with `fn`.
93
+ *
94
+ * @param {String} event
95
+ * @param {Function} fn
96
+ * @return {Emitter}
97
+ * @api public
98
+ */
99
+
100
+ Emitter.prototype.on =
101
+ Emitter.prototype.addEventListener = function(event, fn){
102
+ this._callbacks = this._callbacks || {};
103
+ (this._callbacks[event] = this._callbacks[event] || [])
104
+ .push(fn);
105
+ return this;
106
+ };
107
+
108
+ /**
109
+ * Adds an `event` listener that will be invoked a single
110
+ * time then automatically removed.
111
+ *
112
+ * @param {String} event
113
+ * @param {Function} fn
114
+ * @return {Emitter}
115
+ * @api public
116
+ */
117
+
118
+ Emitter.prototype.once = function(event, fn){
119
+ var self = this;
120
+ this._callbacks = this._callbacks || {};
121
+
122
+ function on() {
123
+ self.off(event, on);
124
+ fn.apply(this, arguments);
125
+ }
126
+
127
+ on.fn = fn;
128
+ this.on(event, on);
129
+ return this;
130
+ };
131
+
132
+ /**
133
+ * Remove the given callback for `event` or all
134
+ * registered callbacks.
135
+ *
136
+ * @param {String} event
137
+ * @param {Function} fn
138
+ * @return {Emitter}
139
+ * @api public
140
+ */
141
+
142
+ Emitter.prototype.off =
143
+ Emitter.prototype.removeListener =
144
+ Emitter.prototype.removeAllListeners =
145
+ Emitter.prototype.removeEventListener = function(event, fn){
146
+ this._callbacks = this._callbacks || {};
147
+
148
+ // all
149
+ if (0 == arguments.length) {
150
+ this._callbacks = {};
151
+ return this;
152
+ }
153
+
154
+ // specific event
155
+ var callbacks = this._callbacks[event];
156
+ if (!callbacks) return this;
157
+
158
+ // remove all handlers
159
+ if (1 == arguments.length) {
160
+ delete this._callbacks[event];
161
+ return this;
162
+ }
163
+
164
+ // remove specific handler
165
+ var cb;
166
+ for (var i = 0; i < callbacks.length; i++) {
167
+ cb = callbacks[i];
168
+ if (cb === fn || cb.fn === fn) {
169
+ callbacks.splice(i, 1);
170
+ break;
171
+ }
172
+ }
173
+ return this;
174
+ };
175
+
176
+ /**
177
+ * Emit `event` with the given args.
178
+ *
179
+ * @param {String} event
180
+ * @param {Mixed} ...
181
+ * @return {Emitter}
182
+ */
183
+
184
+ Emitter.prototype.emit = function(event){
185
+ this._callbacks = this._callbacks || {};
186
+ var args = [].slice.call(arguments, 1)
187
+ , callbacks = this._callbacks[event];
188
+
189
+ if (callbacks) {
190
+ callbacks = callbacks.slice(0);
191
+ for (var i = 0, len = callbacks.length; i < len; ++i) {
192
+ callbacks[i].apply(this, args);
193
+ }
194
+ }
195
+
196
+ return this;
197
+ };
198
+
199
+ /**
200
+ * Return array of callbacks for `event`.
201
+ *
202
+ * @param {String} event
203
+ * @return {Array}
204
+ * @api public
205
+ */
206
+
207
+ Emitter.prototype.listeners = function(event){
208
+ this._callbacks = this._callbacks || {};
209
+ return this._callbacks[event] || [];
210
+ };
211
+
212
+ /**
213
+ * Check if this emitter has `event` handlers.
214
+ *
215
+ * @param {String} event
216
+ * @return {Boolean}
217
+ * @api public
218
+ */
219
+
220
+ Emitter.prototype.hasListeners = function(event){
221
+ return !! this.listeners(event).length;
222
+ };
223
+
224
+ });
225
+
226
+ require.register("dropzone", function (exports, module) {
227
+
228
+
229
+ /**
230
+ * Exposing dropzone
231
+ */
232
+ module.exports = require("dropzone/lib/dropzone.js");
233
+
234
+ });
235
+
236
+ require.register("dropzone/lib/dropzone.js", function (exports, module) {
237
+
238
+ /*
239
+ *
240
+ * More info at [www.dropzonejs.com](http://www.dropzonejs.com)
241
+ *
242
+ * Copyright (c) 2012, Matias Meno
243
+ *
244
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
245
+ * of this software and associated documentation files (the "Software"), to deal
246
+ * in the Software without restriction, including without limitation the rights
247
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
248
+ * copies of the Software, and to permit persons to whom the Software is
249
+ * furnished to do so, subject to the following conditions:
250
+ *
251
+ * The above copyright notice and this permission notice shall be included in
252
+ * all copies or substantial portions of the Software.
253
+ *
254
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
255
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
256
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
257
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
258
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
259
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
260
+ * THE SOFTWARE.
261
+ *
262
+ */
263
+
264
+ (function() {
265
+ var Dropzone, Em, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without,
266
+ __hasProp = {}.hasOwnProperty,
267
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
268
+ __slice = [].slice;
269
+
270
+ Em = typeof Emitter !== "undefined" && Emitter !== null ? Emitter : require("component~emitter@1.1.2");
271
+
272
+ noop = function() {};
273
+
274
+ Dropzone = (function(_super) {
275
+ var extend;
276
+
277
+ __extends(Dropzone, _super);
278
+
279
+
280
+ /*
281
+ This is a list of all available events you can register on a dropzone object.
282
+
283
+ You can register an event handler like this:
284
+
285
+ dropzone.on("dragEnter", function() { });
286
+ */
287
+
288
+ Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached"];
289
+
290
+ Dropzone.prototype.defaultOptions = {
291
+ url: null,
292
+ method: "post",
293
+ withCredentials: false,
294
+ parallelUploads: 2,
295
+ uploadMultiple: false,
296
+ maxFilesize: 256,
297
+ paramName: "file",
298
+ createImageThumbnails: true,
299
+ maxThumbnailFilesize: 10,
300
+ thumbnailWidth: 100,
301
+ thumbnailHeight: 100,
302
+ maxFiles: null,
303
+ params: {},
304
+ clickable: true,
305
+ ignoreHiddenFiles: true,
306
+ acceptedFiles: null,
307
+ acceptedMimeTypes: null,
308
+ autoProcessQueue: true,
309
+ autoQueue: true,
310
+ addRemoveLinks: false,
311
+ previewsContainer: null,
312
+ dictDefaultMessage: "Drop files here to upload",
313
+ dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
314
+ dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
315
+ dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
316
+ dictInvalidFileType: "You can't upload files of this type.",
317
+ dictResponseError: "Server responded with {{statusCode}} code.",
318
+ dictCancelUpload: "Cancel upload",
319
+ dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
320
+ dictRemoveFile: "Remove file",
321
+ dictRemoveFileConfirmation: null,
322
+ dictMaxFilesExceeded: "You can not upload any more files.",
323
+ accept: function(file, done) {
324
+ return done();
325
+ },
326
+ init: function() {
327
+ return noop;
328
+ },
329
+ forceFallback: false,
330
+ fallback: function() {
331
+ var child, messageElement, span, _i, _len, _ref;
332
+ this.element.className = "" + this.element.className + " dz-browser-not-supported";
333
+ _ref = this.element.getElementsByTagName("div");
334
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
335
+ child = _ref[_i];
336
+ if (/(^| )dz-message($| )/.test(child.className)) {
337
+ messageElement = child;
338
+ child.className = "dz-message";
339
+ continue;
340
+ }
341
+ }
342
+ if (!messageElement) {
343
+ messageElement = Dropzone.createElement("<div class=\"dz-message\"><span></span></div>");
344
+ this.element.appendChild(messageElement);
345
+ }
346
+ span = messageElement.getElementsByTagName("span")[0];
347
+ if (span) {
348
+ span.textContent = this.options.dictFallbackMessage;
349
+ }
350
+ return this.element.appendChild(this.getFallbackForm());
351
+ },
352
+ resize: function(file) {
353
+ var info, srcRatio, trgRatio;
354
+ info = {
355
+ srcX: 0,
356
+ srcY: 0,
357
+ srcWidth: file.width,
358
+ srcHeight: file.height
359
+ };
360
+ srcRatio = file.width / file.height;
361
+ trgRatio = this.options.thumbnailWidth / this.options.thumbnailHeight;
362
+ if (file.height < this.options.thumbnailHeight || file.width < this.options.thumbnailWidth) {
363
+ info.trgHeight = info.srcHeight;
364
+ info.trgWidth = info.srcWidth;
365
+ } else {
366
+ if (srcRatio > trgRatio) {
367
+ info.srcHeight = file.height;
368
+ info.srcWidth = info.srcHeight * trgRatio;
369
+ } else {
370
+ info.srcWidth = file.width;
371
+ info.srcHeight = info.srcWidth / trgRatio;
372
+ }
373
+ }
374
+ info.srcX = (file.width - info.srcWidth) / 2;
375
+ info.srcY = (file.height - info.srcHeight) / 2;
376
+ return info;
377
+ },
378
+
379
+ /*
380
+ Those functions register themselves to the events on init and handle all
381
+ the user interface specific stuff. Overwriting them won't break the upload
382
+ but can break the way it's displayed.
383
+ You can overwrite them if you don't like the default behavior. If you just
384
+ want to add an additional event handler, register it on the dropzone object
385
+ and don't overwrite those options.
386
+ */
387
+ drop: function(e) {
388
+ return this.element.classList.remove("dz-drag-hover");
389
+ },
390
+ dragstart: noop,
391
+ dragend: function(e) {
392
+ return this.element.classList.remove("dz-drag-hover");
393
+ },
394
+ dragenter: function(e) {
395
+ return this.element.classList.add("dz-drag-hover");
396
+ },
397
+ dragover: function(e) {
398
+ return this.element.classList.add("dz-drag-hover");
399
+ },
400
+ dragleave: function(e) {
401
+ return this.element.classList.remove("dz-drag-hover");
402
+ },
403
+ paste: noop,
404
+ reset: function() {
405
+ return this.element.classList.remove("dz-started");
406
+ },
407
+ addedfile: function(file) {
408
+ var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
409
+ if (this.element === this.previewsContainer) {
410
+ this.element.classList.add("dz-started");
411
+ }
412
+ file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
413
+ file.previewTemplate = file.previewElement;
414
+ this.previewsContainer.appendChild(file.previewElement);
415
+ _ref = file.previewElement.querySelectorAll("[data-dz-name]");
416
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
417
+ node = _ref[_i];
418
+ node.textContent = file.name;
419
+ }
420
+ _ref1 = file.previewElement.querySelectorAll("[data-dz-size]");
421
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
422
+ node = _ref1[_j];
423
+ node.innerHTML = this.filesize(file.size);
424
+ }
425
+ if (this.options.addRemoveLinks) {
426
+ file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>" + this.options.dictRemoveFile + "</a>");
427
+ file.previewElement.appendChild(file._removeLink);
428
+ }
429
+ removeFileEvent = (function(_this) {
430
+ return function(e) {
431
+ e.preventDefault();
432
+ e.stopPropagation();
433
+ if (file.status === Dropzone.UPLOADING) {
434
+ return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() {
435
+ return _this.removeFile(file);
436
+ });
437
+ } else {
438
+ if (_this.options.dictRemoveFileConfirmation) {
439
+ return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() {
440
+ return _this.removeFile(file);
441
+ });
442
+ } else {
443
+ return _this.removeFile(file);
444
+ }
445
+ }
446
+ };
447
+ })(this);
448
+ _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]");
449
+ _results = [];
450
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
451
+ removeLink = _ref2[_k];
452
+ _results.push(removeLink.addEventListener("click", removeFileEvent));
453
+ }
454
+ return _results;
455
+ },
456
+ removedfile: function(file) {
457
+ var _ref;
458
+ if ((_ref = file.previewElement) != null) {
459
+ _ref.parentNode.removeChild(file.previewElement);
460
+ }
461
+ return this._updateMaxFilesReachedClass();
462
+ },
463
+ thumbnail: function(file, dataUrl) {
464
+ var thumbnailElement, _i, _len, _ref, _results;
465
+ file.previewElement.classList.remove("dz-file-preview");
466
+ file.previewElement.classList.add("dz-image-preview");
467
+ _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]");
468
+ _results = [];
469
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
470
+ thumbnailElement = _ref[_i];
471
+ thumbnailElement.alt = file.name;
472
+ _results.push(thumbnailElement.src = dataUrl);
473
+ }
474
+ return _results;
475
+ },
476
+ error: function(file, message) {
477
+ var node, _i, _len, _ref, _results;
478
+ file.previewElement.classList.add("dz-error");
479
+ if (typeof message !== "String" && message.error) {
480
+ message = message.error;
481
+ }
482
+ _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]");
483
+ _results = [];
484
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
485
+ node = _ref[_i];
486
+ _results.push(node.textContent = message);
487
+ }
488
+ return _results;
489
+ },
490
+ errormultiple: noop,
491
+ processing: function(file) {
492
+ file.previewElement.classList.add("dz-processing");
493
+ if (file._removeLink) {
494
+ return file._removeLink.textContent = this.options.dictCancelUpload;
495
+ }
496
+ },
497
+ processingmultiple: noop,
498
+ uploadprogress: function(file, progress, bytesSent) {
499
+ var node, _i, _len, _ref, _results;
500
+ _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]");
501
+ _results = [];
502
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
503
+ node = _ref[_i];
504
+ _results.push(node.style.width = "" + progress + "%");
505
+ }
506
+ return _results;
507
+ },
508
+ totaluploadprogress: noop,
509
+ sending: noop,
510
+ sendingmultiple: noop,
511
+ success: function(file) {
512
+ return file.previewElement.classList.add("dz-success");
513
+ },
514
+ successmultiple: noop,
515
+ canceled: function(file) {
516
+ return this.emit("error", file, "Upload canceled.");
517
+ },
518
+ canceledmultiple: noop,
519
+ complete: function(file) {
520
+ if (file._removeLink) {
521
+ return file._removeLink.textContent = this.options.dictRemoveFile;
522
+ }
523
+ },
524
+ completemultiple: noop,
525
+ maxfilesexceeded: noop,
526
+ maxfilesreached: noop,
527
+ previewTemplate: "<div class=\"dz-preview dz-file-preview\">\n <div class=\"dz-details\">\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n <div class=\"dz-size\" data-dz-size></div>\n <img data-dz-thumbnail />\n </div>\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n <div class=\"dz-success-mark\"><span>✔</span></div>\n <div class=\"dz-error-mark\"><span>✘</span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n</div>"
528
+ };
529
+
530
+ extend = function() {
531
+ var key, object, objects, target, val, _i, _len;
532
+ target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
533
+ for (_i = 0, _len = objects.length; _i < _len; _i++) {
534
+ object = objects[_i];
535
+ for (key in object) {
536
+ val = object[key];
537
+ target[key] = val;
538
+ }
539
+ }
540
+ return target;
541
+ };
542
+
543
+ function Dropzone(element, options) {
544
+ var elementOptions, fallback, _ref;
545
+ this.element = element;
546
+ this.version = Dropzone.version;
547
+ this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, "");
548
+ this.clickableElements = [];
549
+ this.listeners = [];
550
+ this.files = [];
551
+ if (typeof this.element === "string") {
552
+ this.element = document.querySelector(this.element);
553
+ }
554
+ if (!(this.element && (this.element.nodeType != null))) {
555
+ throw new Error("Invalid dropzone element.");
556
+ }
557
+ if (this.element.dropzone) {
558
+ throw new Error("Dropzone already attached.");
559
+ }
560
+ Dropzone.instances.push(this);
561
+ this.element.dropzone = this;
562
+ elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};
563
+ this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});
564
+ if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {
565
+ return this.options.fallback.call(this);
566
+ }
567
+ if (this.options.url == null) {
568
+ this.options.url = this.element.getAttribute("action");
569
+ }
570
+ if (!this.options.url) {
571
+ throw new Error("No URL provided.");
572
+ }
573
+ if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {
574
+ throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
575
+ }
576
+ if (this.options.acceptedMimeTypes) {
577
+ this.options.acceptedFiles = this.options.acceptedMimeTypes;
578
+ delete this.options.acceptedMimeTypes;
579
+ }
580
+ this.options.method = this.options.method.toUpperCase();
581
+ if ((fallback = this.getExistingFallback()) && fallback.parentNode) {
582
+ fallback.parentNode.removeChild(fallback);
583
+ }
584
+ if (this.options.previewsContainer) {
585
+ this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer");
586
+ } else {
587
+ this.previewsContainer = this.element;
588
+ }
589
+ if (this.options.clickable) {
590
+ if (this.options.clickable === true) {
591
+ this.clickableElements = [this.element];
592
+ } else {
593
+ this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable");
594
+ }
595
+ }
596
+ this.init();
597
+ }
598
+
599
+ Dropzone.prototype.getAcceptedFiles = function() {
600
+ var file, _i, _len, _ref, _results;
601
+ _ref = this.files;
602
+ _results = [];
603
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
604
+ file = _ref[_i];
605
+ if (file.accepted) {
606
+ _results.push(file);
607
+ }
608
+ }
609
+ return _results;
610
+ };
611
+
612
+ Dropzone.prototype.getRejectedFiles = function() {
613
+ var file, _i, _len, _ref, _results;
614
+ _ref = this.files;
615
+ _results = [];
616
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
617
+ file = _ref[_i];
618
+ if (!file.accepted) {
619
+ _results.push(file);
620
+ }
621
+ }
622
+ return _results;
623
+ };
624
+
625
+ Dropzone.prototype.getFilesWithStatus = function(status) {
626
+ var file, _i, _len, _ref, _results;
627
+ _ref = this.files;
628
+ _results = [];
629
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
630
+ file = _ref[_i];
631
+ if (file.status === status) {
632
+ _results.push(file);
633
+ }
634
+ }
635
+ return _results;
636
+ };
637
+
638
+ Dropzone.prototype.getQueuedFiles = function() {
639
+ return this.getFilesWithStatus(Dropzone.QUEUED);
640
+ };
641
+
642
+ Dropzone.prototype.getUploadingFiles = function() {
643
+ return this.getFilesWithStatus(Dropzone.UPLOADING);
644
+ };
645
+
646
+ Dropzone.prototype.getActiveFiles = function() {
647
+ var file, _i, _len, _ref, _results;
648
+ _ref = this.files;
649
+ _results = [];
650
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
651
+ file = _ref[_i];
652
+ if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {
653
+ _results.push(file);
654
+ }
655
+ }
656
+ return _results;
657
+ };
658
+
659
+ Dropzone.prototype.init = function() {
660
+ var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1;
661
+ if (this.element.tagName === "form") {
662
+ this.element.setAttribute("enctype", "multipart/form-data");
663
+ }
664
+ if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
665
+ this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><span>" + this.options.dictDefaultMessage + "</span></div>"));
666
+ }
667
+ if (this.clickableElements.length) {
668
+ setupHiddenFileInput = (function(_this) {
669
+ return function() {
670
+ if (_this.hiddenFileInput) {
671
+ document.body.removeChild(_this.hiddenFileInput);
672
+ }
673
+ _this.hiddenFileInput = document.createElement("input");
674
+ _this.hiddenFileInput.setAttribute("type", "file");
675
+ if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {
676
+ _this.hiddenFileInput.setAttribute("multiple", "multiple");
677
+ }
678
+ _this.hiddenFileInput.className = "dz-hidden-input";
679
+ if (_this.options.acceptedFiles != null) {
680
+ _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles);
681
+ }
682
+ _this.hiddenFileInput.style.visibility = "hidden";
683
+ _this.hiddenFileInput.style.position = "absolute";
684
+ _this.hiddenFileInput.style.top = "0";
685
+ _this.hiddenFileInput.style.left = "0";
686
+ _this.hiddenFileInput.style.height = "0";
687
+ _this.hiddenFileInput.style.width = "0";
688
+ document.body.appendChild(_this.hiddenFileInput);
689
+ return _this.hiddenFileInput.addEventListener("change", function() {
690
+ var file, files, _i, _len;
691
+ files = _this.hiddenFileInput.files;
692
+ if (files.length) {
693
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
694
+ file = files[_i];
695
+ _this.addFile(file);
696
+ }
697
+ }
698
+ return setupHiddenFileInput();
699
+ });
700
+ };
701
+ })(this);
702
+ setupHiddenFileInput();
703
+ }
704
+ this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;
705
+ _ref1 = this.events;
706
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
707
+ eventName = _ref1[_i];
708
+ this.on(eventName, this.options[eventName]);
709
+ }
710
+ this.on("uploadprogress", (function(_this) {
711
+ return function() {
712
+ return _this.updateTotalUploadProgress();
713
+ };
714
+ })(this));
715
+ this.on("removedfile", (function(_this) {
716
+ return function() {
717
+ return _this.updateTotalUploadProgress();
718
+ };
719
+ })(this));
720
+ this.on("canceled", (function(_this) {
721
+ return function(file) {
722
+ return _this.emit("complete", file);
723
+ };
724
+ })(this));
725
+ this.on("complete", (function(_this) {
726
+ return function(file) {
727
+ if (_this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) {
728
+ return setTimeout((function() {
729
+ return _this.emit("queuecomplete");
730
+ }), 0);
731
+ }
732
+ };
733
+ })(this));
734
+ noPropagation = function(e) {
735
+ e.stopPropagation();
736
+ if (e.preventDefault) {
737
+ return e.preventDefault();
738
+ } else {
739
+ return e.returnValue = false;
740
+ }
741
+ };
742
+ this.listeners = [
743
+ {
744
+ element: this.element,
745
+ events: {
746
+ "dragstart": (function(_this) {
747
+ return function(e) {
748
+ return _this.emit("dragstart", e);
749
+ };
750
+ })(this),
751
+ "dragenter": (function(_this) {
752
+ return function(e) {
753
+ noPropagation(e);
754
+ return _this.emit("dragenter", e);
755
+ };
756
+ })(this),
757
+ "dragover": (function(_this) {
758
+ return function(e) {
759
+ var efct;
760
+ try {
761
+ efct = e.dataTransfer.effectAllowed;
762
+ } catch (_error) {}
763
+ e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';
764
+ noPropagation(e);
765
+ return _this.emit("dragover", e);
766
+ };
767
+ })(this),
768
+ "dragleave": (function(_this) {
769
+ return function(e) {
770
+ return _this.emit("dragleave", e);
771
+ };
772
+ })(this),
773
+ "drop": (function(_this) {
774
+ return function(e) {
775
+ noPropagation(e);
776
+ return _this.drop(e);
777
+ };
778
+ })(this),
779
+ "dragend": (function(_this) {
780
+ return function(e) {
781
+ return _this.emit("dragend", e);
782
+ };
783
+ })(this)
784
+ }
785
+ }
786
+ ];
787
+ this.clickableElements.forEach((function(_this) {
788
+ return function(clickableElement) {
789
+ return _this.listeners.push({
790
+ element: clickableElement,
791
+ events: {
792
+ "click": function(evt) {
793
+ if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
794
+ return _this.hiddenFileInput.click();
795
+ }
796
+ }
797
+ }
798
+ });
799
+ };
800
+ })(this));
801
+ this.enable();
802
+ return this.options.init.call(this);
803
+ };
804
+
805
+ Dropzone.prototype.destroy = function() {
806
+ var _ref;
807
+ this.disable();
808
+ this.removeAllFiles(true);
809
+ if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) {
810
+ this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
811
+ this.hiddenFileInput = null;
812
+ }
813
+ delete this.element.dropzone;
814
+ return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
815
+ };
816
+
817
+ Dropzone.prototype.updateTotalUploadProgress = function() {
818
+ var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;
819
+ totalBytesSent = 0;
820
+ totalBytes = 0;
821
+ activeFiles = this.getActiveFiles();
822
+ if (activeFiles.length) {
823
+ _ref = this.getActiveFiles();
824
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
825
+ file = _ref[_i];
826
+ totalBytesSent += file.upload.bytesSent;
827
+ totalBytes += file.upload.total;
828
+ }
829
+ totalUploadProgress = 100 * totalBytesSent / totalBytes;
830
+ } else {
831
+ totalUploadProgress = 100;
832
+ }
833
+ return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
834
+ };
835
+
836
+ Dropzone.prototype.getFallbackForm = function() {
837
+ var existingFallback, fields, fieldsString, form;
838
+ if (existingFallback = this.getExistingFallback()) {
839
+ return existingFallback;
840
+ }
841
+ fieldsString = "<div class=\"dz-fallback\">";
842
+ if (this.options.dictFallbackText) {
843
+ fieldsString += "<p>" + this.options.dictFallbackText + "</p>";
844
+ }
845
+ fieldsString += "<input type=\"file\" name=\"" + this.options.paramName + (this.options.uploadMultiple ? "[]" : "") + "\" " + (this.options.uploadMultiple ? 'multiple="multiple"' : void 0) + " /><input type=\"submit\" value=\"Upload!\"></div>";
846
+ fields = Dropzone.createElement(fieldsString);
847
+ if (this.element.tagName !== "FORM") {
848
+ form = Dropzone.createElement("<form action=\"" + this.options.url + "\" enctype=\"multipart/form-data\" method=\"" + this.options.method + "\"></form>");
849
+ form.appendChild(fields);
850
+ } else {
851
+ this.element.setAttribute("enctype", "multipart/form-data");
852
+ this.element.setAttribute("method", this.options.method);
853
+ }
854
+ return form != null ? form : fields;
855
+ };
856
+
857
+ Dropzone.prototype.getExistingFallback = function() {
858
+ var fallback, getFallback, tagName, _i, _len, _ref;
859
+ getFallback = function(elements) {
860
+ var el, _i, _len;
861
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
862
+ el = elements[_i];
863
+ if (/(^| )fallback($| )/.test(el.className)) {
864
+ return el;
865
+ }
866
+ }
867
+ };
868
+ _ref = ["div", "form"];
869
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
870
+ tagName = _ref[_i];
871
+ if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {
872
+ return fallback;
873
+ }
874
+ }
875
+ };
876
+
877
+ Dropzone.prototype.setupEventListeners = function() {
878
+ var elementListeners, event, listener, _i, _len, _ref, _results;
879
+ _ref = this.listeners;
880
+ _results = [];
881
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
882
+ elementListeners = _ref[_i];
883
+ _results.push((function() {
884
+ var _ref1, _results1;
885
+ _ref1 = elementListeners.events;
886
+ _results1 = [];
887
+ for (event in _ref1) {
888
+ listener = _ref1[event];
889
+ _results1.push(elementListeners.element.addEventListener(event, listener, false));
890
+ }
891
+ return _results1;
892
+ })());
893
+ }
894
+ return _results;
895
+ };
896
+
897
+ Dropzone.prototype.removeEventListeners = function() {
898
+ var elementListeners, event, listener, _i, _len, _ref, _results;
899
+ _ref = this.listeners;
900
+ _results = [];
901
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
902
+ elementListeners = _ref[_i];
903
+ _results.push((function() {
904
+ var _ref1, _results1;
905
+ _ref1 = elementListeners.events;
906
+ _results1 = [];
907
+ for (event in _ref1) {
908
+ listener = _ref1[event];
909
+ _results1.push(elementListeners.element.removeEventListener(event, listener, false));
910
+ }
911
+ return _results1;
912
+ })());
913
+ }
914
+ return _results;
915
+ };
916
+
917
+ Dropzone.prototype.disable = function() {
918
+ var file, _i, _len, _ref, _results;
919
+ this.clickableElements.forEach(function(element) {
920
+ return element.classList.remove("dz-clickable");
921
+ });
922
+ this.removeEventListeners();
923
+ _ref = this.files;
924
+ _results = [];
925
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
926
+ file = _ref[_i];
927
+ _results.push(this.cancelUpload(file));
928
+ }
929
+ return _results;
930
+ };
931
+
932
+ Dropzone.prototype.enable = function() {
933
+ this.clickableElements.forEach(function(element) {
934
+ return element.classList.add("dz-clickable");
935
+ });
936
+ return this.setupEventListeners();
937
+ };
938
+
939
+ Dropzone.prototype.filesize = function(size) {
940
+ var string;
941
+ if (size >= 1024 * 1024 * 1024 * 1024 / 10) {
942
+ size = size / (1024 * 1024 * 1024 * 1024 / 10);
943
+ string = "TiB";
944
+ } else if (size >= 1024 * 1024 * 1024 / 10) {
945
+ size = size / (1024 * 1024 * 1024 / 10);
946
+ string = "GiB";
947
+ } else if (size >= 1024 * 1024 / 10) {
948
+ size = size / (1024 * 1024 / 10);
949
+ string = "MiB";
950
+ } else if (size >= 1024 / 10) {
951
+ size = size / (1024 / 10);
952
+ string = "KiB";
953
+ } else {
954
+ size = size * 10;
955
+ string = "b";
956
+ }
957
+ return "<strong>" + (Math.round(size) / 10) + "</strong> " + string;
958
+ };
959
+
960
+ Dropzone.prototype._updateMaxFilesReachedClass = function() {
961
+ if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {
962
+ if (this.getAcceptedFiles().length === this.options.maxFiles) {
963
+ this.emit('maxfilesreached', this.files);
964
+ }
965
+ return this.element.classList.add("dz-max-files-reached");
966
+ } else {
967
+ return this.element.classList.remove("dz-max-files-reached");
968
+ }
969
+ };
970
+
971
+ Dropzone.prototype.drop = function(e) {
972
+ var files, items;
973
+ if (!e.dataTransfer) {
974
+ return;
975
+ }
976
+ this.emit("drop", e);
977
+ files = e.dataTransfer.files;
978
+ if (files.length) {
979
+ items = e.dataTransfer.items;
980
+ if (items && items.length && (items[0].webkitGetAsEntry != null)) {
981
+ this._addFilesFromItems(items);
982
+ } else {
983
+ this.handleFiles(files);
984
+ }
985
+ }
986
+ };
987
+
988
+ Dropzone.prototype.paste = function(e) {
989
+ var items, _ref;
990
+ if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) {
991
+ return;
992
+ }
993
+ this.emit("paste", e);
994
+ items = e.clipboardData.items;
995
+ if (items.length) {
996
+ return this._addFilesFromItems(items);
997
+ }
998
+ };
999
+
1000
+ Dropzone.prototype.handleFiles = function(files) {
1001
+ var file, _i, _len, _results;
1002
+ _results = [];
1003
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
1004
+ file = files[_i];
1005
+ _results.push(this.addFile(file));
1006
+ }
1007
+ return _results;
1008
+ };
1009
+
1010
+ Dropzone.prototype._addFilesFromItems = function(items) {
1011
+ var entry, item, _i, _len, _results;
1012
+ _results = [];
1013
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
1014
+ item = items[_i];
1015
+ if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) {
1016
+ if (entry.isFile) {
1017
+ _results.push(this.addFile(item.getAsFile()));
1018
+ } else if (entry.isDirectory) {
1019
+ _results.push(this._addFilesFromDirectory(entry, entry.name));
1020
+ } else {
1021
+ _results.push(void 0);
1022
+ }
1023
+ } else if (item.getAsFile != null) {
1024
+ if ((item.kind == null) || item.kind === "file") {
1025
+ _results.push(this.addFile(item.getAsFile()));
1026
+ } else {
1027
+ _results.push(void 0);
1028
+ }
1029
+ } else {
1030
+ _results.push(void 0);
1031
+ }
1032
+ }
1033
+ return _results;
1034
+ };
1035
+
1036
+ Dropzone.prototype._addFilesFromDirectory = function(directory, path) {
1037
+ var dirReader, entriesReader;
1038
+ dirReader = directory.createReader();
1039
+ entriesReader = (function(_this) {
1040
+ return function(entries) {
1041
+ var entry, _i, _len;
1042
+ for (_i = 0, _len = entries.length; _i < _len; _i++) {
1043
+ entry = entries[_i];
1044
+ if (entry.isFile) {
1045
+ entry.file(function(file) {
1046
+ if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {
1047
+ return;
1048
+ }
1049
+ file.fullPath = "" + path + "/" + file.name;
1050
+ return _this.addFile(file);
1051
+ });
1052
+ } else if (entry.isDirectory) {
1053
+ _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name);
1054
+ }
1055
+ }
1056
+ };
1057
+ })(this);
1058
+ return dirReader.readEntries(entriesReader, function(error) {
1059
+ return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0;
1060
+ });
1061
+ };
1062
+
1063
+ Dropzone.prototype.accept = function(file, done) {
1064
+ if (file.size > this.options.maxFilesize * 1024 * 1024) {
1065
+ return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
1066
+ } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {
1067
+ return done(this.options.dictInvalidFileType);
1068
+ } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {
1069
+ done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));
1070
+ return this.emit("maxfilesexceeded", file);
1071
+ } else {
1072
+ return this.options.accept.call(this, file, done);
1073
+ }
1074
+ };
1075
+
1076
+ Dropzone.prototype.addFile = function(file) {
1077
+ file.upload = {
1078
+ progress: 0,
1079
+ total: file.size,
1080
+ bytesSent: 0
1081
+ };
1082
+ this.files.push(file);
1083
+ file.status = Dropzone.ADDED;
1084
+ this.emit("addedfile", file);
1085
+ this._enqueueThumbnail(file);
1086
+ return this.accept(file, (function(_this) {
1087
+ return function(error) {
1088
+ if (error) {
1089
+ file.accepted = false;
1090
+ _this._errorProcessing([file], error);
1091
+ } else {
1092
+ file.accepted = true;
1093
+ if (_this.options.autoQueue) {
1094
+ _this.enqueueFile(file);
1095
+ }
1096
+ }
1097
+ return _this._updateMaxFilesReachedClass();
1098
+ };
1099
+ })(this));
1100
+ };
1101
+
1102
+ Dropzone.prototype.enqueueFiles = function(files) {
1103
+ var file, _i, _len;
1104
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
1105
+ file = files[_i];
1106
+ this.enqueueFile(file);
1107
+ }
1108
+ return null;
1109
+ };
1110
+
1111
+ Dropzone.prototype.enqueueFile = function(file) {
1112
+ if (file.status === Dropzone.ADDED && file.accepted === true) {
1113
+ file.status = Dropzone.QUEUED;
1114
+ if (this.options.autoProcessQueue) {
1115
+ return setTimeout(((function(_this) {
1116
+ return function() {
1117
+ return _this.processQueue();
1118
+ };
1119
+ })(this)), 0);
1120
+ }
1121
+ } else {
1122
+ throw new Error("This file can't be queued because it has already been processed or was rejected.");
1123
+ }
1124
+ };
1125
+
1126
+ Dropzone.prototype._thumbnailQueue = [];
1127
+
1128
+ Dropzone.prototype._processingThumbnail = false;
1129
+
1130
+ Dropzone.prototype._enqueueThumbnail = function(file) {
1131
+ if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
1132
+ this._thumbnailQueue.push(file);
1133
+ return setTimeout(((function(_this) {
1134
+ return function() {
1135
+ return _this._processThumbnailQueue();
1136
+ };
1137
+ })(this)), 0);
1138
+ }
1139
+ };
1140
+
1141
+ Dropzone.prototype._processThumbnailQueue = function() {
1142
+ if (this._processingThumbnail || this._thumbnailQueue.length === 0) {
1143
+ return;
1144
+ }
1145
+ this._processingThumbnail = true;
1146
+ return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) {
1147
+ return function() {
1148
+ _this._processingThumbnail = false;
1149
+ return _this._processThumbnailQueue();
1150
+ };
1151
+ })(this));
1152
+ };
1153
+
1154
+ Dropzone.prototype.removeFile = function(file) {
1155
+ if (file.status === Dropzone.UPLOADING) {
1156
+ this.cancelUpload(file);
1157
+ }
1158
+ this.files = without(this.files, file);
1159
+ this.emit("removedfile", file);
1160
+ if (this.files.length === 0) {
1161
+ return this.emit("reset");
1162
+ }
1163
+ };
1164
+
1165
+ Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) {
1166
+ var file, _i, _len, _ref;
1167
+ if (cancelIfNecessary == null) {
1168
+ cancelIfNecessary = false;
1169
+ }
1170
+ _ref = this.files.slice();
1171
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1172
+ file = _ref[_i];
1173
+ if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
1174
+ this.removeFile(file);
1175
+ }
1176
+ }
1177
+ return null;
1178
+ };
1179
+
1180
+ Dropzone.prototype.createThumbnail = function(file, callback) {
1181
+ var fileReader;
1182
+ fileReader = new FileReader;
1183
+ fileReader.onload = (function(_this) {
1184
+ return function() {
1185
+ var img;
1186
+ img = document.createElement("img");
1187
+ img.onload = function() {
1188
+ var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3;
1189
+ file.width = img.width;
1190
+ file.height = img.height;
1191
+ resizeInfo = _this.options.resize.call(_this, file);
1192
+ if (resizeInfo.trgWidth == null) {
1193
+ resizeInfo.trgWidth = _this.options.thumbnailWidth;
1194
+ }
1195
+ if (resizeInfo.trgHeight == null) {
1196
+ resizeInfo.trgHeight = _this.options.thumbnailHeight;
1197
+ }
1198
+ canvas = document.createElement("canvas");
1199
+ ctx = canvas.getContext("2d");
1200
+ canvas.width = resizeInfo.trgWidth;
1201
+ canvas.height = resizeInfo.trgHeight;
1202
+ drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);
1203
+ thumbnail = canvas.toDataURL("image/png");
1204
+ _this.emit("thumbnail", file, thumbnail);
1205
+ if (callback != null) {
1206
+ return callback();
1207
+ }
1208
+ };
1209
+ return img.src = fileReader.result;
1210
+ };
1211
+ })(this);
1212
+ return fileReader.readAsDataURL(file);
1213
+ };
1214
+
1215
+ Dropzone.prototype.processQueue = function() {
1216
+ var i, parallelUploads, processingLength, queuedFiles;
1217
+ parallelUploads = this.options.parallelUploads;
1218
+ processingLength = this.getUploadingFiles().length;
1219
+ i = processingLength;
1220
+ if (processingLength >= parallelUploads) {
1221
+ return;
1222
+ }
1223
+ queuedFiles = this.getQueuedFiles();
1224
+ if (!(queuedFiles.length > 0)) {
1225
+ return;
1226
+ }
1227
+ if (this.options.uploadMultiple) {
1228
+ return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));
1229
+ } else {
1230
+ while (i < parallelUploads) {
1231
+ if (!queuedFiles.length) {
1232
+ return;
1233
+ }
1234
+ this.processFile(queuedFiles.shift());
1235
+ i++;
1236
+ }
1237
+ }
1238
+ };
1239
+
1240
+ Dropzone.prototype.processFile = function(file) {
1241
+ return this.processFiles([file]);
1242
+ };
1243
+
1244
+ Dropzone.prototype.processFiles = function(files) {
1245
+ var file, _i, _len;
1246
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
1247
+ file = files[_i];
1248
+ file.processing = true;
1249
+ file.status = Dropzone.UPLOADING;
1250
+ this.emit("processing", file);
1251
+ }
1252
+ if (this.options.uploadMultiple) {
1253
+ this.emit("processingmultiple", files);
1254
+ }
1255
+ return this.uploadFiles(files);
1256
+ };
1257
+
1258
+ Dropzone.prototype._getFilesWithXhr = function(xhr) {
1259
+ var file, files;
1260
+ return files = (function() {
1261
+ var _i, _len, _ref, _results;
1262
+ _ref = this.files;
1263
+ _results = [];
1264
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1265
+ file = _ref[_i];
1266
+ if (file.xhr === xhr) {
1267
+ _results.push(file);
1268
+ }
1269
+ }
1270
+ return _results;
1271
+ }).call(this);
1272
+ };
1273
+
1274
+ Dropzone.prototype.cancelUpload = function(file) {
1275
+ var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref;
1276
+ if (file.status === Dropzone.UPLOADING) {
1277
+ groupedFiles = this._getFilesWithXhr(file.xhr);
1278
+ for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) {
1279
+ groupedFile = groupedFiles[_i];
1280
+ groupedFile.status = Dropzone.CANCELED;
1281
+ }
1282
+ file.xhr.abort();
1283
+ for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) {
1284
+ groupedFile = groupedFiles[_j];
1285
+ this.emit("canceled", groupedFile);
1286
+ }
1287
+ if (this.options.uploadMultiple) {
1288
+ this.emit("canceledmultiple", groupedFiles);
1289
+ }
1290
+ } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) {
1291
+ file.status = Dropzone.CANCELED;
1292
+ this.emit("canceled", file);
1293
+ if (this.options.uploadMultiple) {
1294
+ this.emit("canceledmultiple", [file]);
1295
+ }
1296
+ }
1297
+ if (this.options.autoProcessQueue) {
1298
+ return this.processQueue();
1299
+ }
1300
+ };
1301
+
1302
+ Dropzone.prototype.uploadFile = function(file) {
1303
+ return this.uploadFiles([file]);
1304
+ };
1305
+
1306
+ Dropzone.prototype.uploadFiles = function(files) {
1307
+ var file, formData, handleError, headerName, headerValue, headers, input, inputName, inputType, key, option, progressObj, response, updateProgress, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4;
1308
+ xhr = new XMLHttpRequest();
1309
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
1310
+ file = files[_i];
1311
+ file.xhr = xhr;
1312
+ }
1313
+ xhr.open(this.options.method, this.options.url, true);
1314
+ xhr.withCredentials = !!this.options.withCredentials;
1315
+ response = null;
1316
+ handleError = (function(_this) {
1317
+ return function() {
1318
+ var _j, _len1, _results;
1319
+ _results = [];
1320
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
1321
+ file = files[_j];
1322
+ _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr));
1323
+ }
1324
+ return _results;
1325
+ };
1326
+ })(this);
1327
+ updateProgress = (function(_this) {
1328
+ return function(e) {
1329
+ var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results;
1330
+ if (e != null) {
1331
+ progress = 100 * e.loaded / e.total;
1332
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
1333
+ file = files[_j];
1334
+ file.upload = {
1335
+ progress: progress,
1336
+ total: e.total,
1337
+ bytesSent: e.loaded
1338
+ };
1339
+ }
1340
+ } else {
1341
+ allFilesFinished = true;
1342
+ progress = 100;
1343
+ for (_k = 0, _len2 = files.length; _k < _len2; _k++) {
1344
+ file = files[_k];
1345
+ if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) {
1346
+ allFilesFinished = false;
1347
+ }
1348
+ file.upload.progress = progress;
1349
+ file.upload.bytesSent = file.upload.total;
1350
+ }
1351
+ if (allFilesFinished) {
1352
+ return;
1353
+ }
1354
+ }
1355
+ _results = [];
1356
+ for (_l = 0, _len3 = files.length; _l < _len3; _l++) {
1357
+ file = files[_l];
1358
+ _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent));
1359
+ }
1360
+ return _results;
1361
+ };
1362
+ })(this);
1363
+ xhr.onload = (function(_this) {
1364
+ return function(e) {
1365
+ var _ref;
1366
+ if (files[0].status === Dropzone.CANCELED) {
1367
+ return;
1368
+ }
1369
+ if (xhr.readyState !== 4) {
1370
+ return;
1371
+ }
1372
+ response = xhr.responseText;
1373
+ if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
1374
+ try {
1375
+ response = JSON.parse(response);
1376
+ } catch (_error) {
1377
+ e = _error;
1378
+ response = "Invalid JSON response from server.";
1379
+ }
1380
+ }
1381
+ updateProgress();
1382
+ if (!((200 <= (_ref = xhr.status) && _ref < 300))) {
1383
+ return handleError();
1384
+ } else {
1385
+ return _this._finished(files, response, e);
1386
+ }
1387
+ };
1388
+ })(this);
1389
+ xhr.onerror = (function(_this) {
1390
+ return function() {
1391
+ if (files[0].status === Dropzone.CANCELED) {
1392
+ return;
1393
+ }
1394
+ return handleError();
1395
+ };
1396
+ })(this);
1397
+ progressObj = (_ref = xhr.upload) != null ? _ref : xhr;
1398
+ progressObj.onprogress = updateProgress;
1399
+ headers = {
1400
+ "Accept": "application/json",
1401
+ "Cache-Control": "no-cache",
1402
+ "X-Requested-With": "XMLHttpRequest"
1403
+ };
1404
+ if (this.options.headers) {
1405
+ extend(headers, this.options.headers);
1406
+ }
1407
+ for (headerName in headers) {
1408
+ headerValue = headers[headerName];
1409
+ xhr.setRequestHeader(headerName, headerValue);
1410
+ }
1411
+ formData = new FormData();
1412
+ if (this.options.params) {
1413
+ _ref1 = this.options.params;
1414
+ for (key in _ref1) {
1415
+ value = _ref1[key];
1416
+ formData.append(key, value);
1417
+ }
1418
+ }
1419
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
1420
+ file = files[_j];
1421
+ this.emit("sending", file, xhr, formData);
1422
+ }
1423
+ if (this.options.uploadMultiple) {
1424
+ this.emit("sendingmultiple", files, xhr, formData);
1425
+ }
1426
+ if (this.element.tagName === "FORM") {
1427
+ _ref2 = this.element.querySelectorAll("input, textarea, select, button");
1428
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
1429
+ input = _ref2[_k];
1430
+ inputName = input.getAttribute("name");
1431
+ inputType = input.getAttribute("type");
1432
+ if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {
1433
+ _ref3 = input.options;
1434
+ for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
1435
+ option = _ref3[_l];
1436
+ if (option.selected) {
1437
+ formData.append(inputName, option.value);
1438
+ }
1439
+ }
1440
+ } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) {
1441
+ formData.append(inputName, input.value);
1442
+ }
1443
+ }
1444
+ }
1445
+ for (_m = 0, _len4 = files.length; _m < _len4; _m++) {
1446
+ file = files[_m];
1447
+ formData.append("" + this.options.paramName + (this.options.uploadMultiple ? "[]" : ""), file, file.name);
1448
+ }
1449
+ return xhr.send(formData);
1450
+ };
1451
+
1452
+ Dropzone.prototype._finished = function(files, responseText, e) {
1453
+ var file, _i, _len;
1454
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
1455
+ file = files[_i];
1456
+ file.status = Dropzone.SUCCESS;
1457
+ this.emit("success", file, responseText, e);
1458
+ this.emit("complete", file);
1459
+ }
1460
+ if (this.options.uploadMultiple) {
1461
+ this.emit("successmultiple", files, responseText, e);
1462
+ this.emit("completemultiple", files);
1463
+ }
1464
+ if (this.options.autoProcessQueue) {
1465
+ return this.processQueue();
1466
+ }
1467
+ };
1468
+
1469
+ Dropzone.prototype._errorProcessing = function(files, message, xhr) {
1470
+ var file, _i, _len;
1471
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
1472
+ file = files[_i];
1473
+ file.status = Dropzone.ERROR;
1474
+ this.emit("error", file, message, xhr);
1475
+ this.emit("complete", file);
1476
+ }
1477
+ if (this.options.uploadMultiple) {
1478
+ this.emit("errormultiple", files, message, xhr);
1479
+ this.emit("completemultiple", files);
1480
+ }
1481
+ if (this.options.autoProcessQueue) {
1482
+ return this.processQueue();
1483
+ }
1484
+ };
1485
+
1486
+ return Dropzone;
1487
+
1488
+ })(Em);
1489
+
1490
+ Dropzone.version = "3.8.7";
1491
+
1492
+ Dropzone.options = {};
1493
+
1494
+ Dropzone.optionsForElement = function(element) {
1495
+ if (element.getAttribute("id")) {
1496
+ return Dropzone.options[camelize(element.getAttribute("id"))];
1497
+ } else {
1498
+ return void 0;
1499
+ }
1500
+ };
1501
+
1502
+ Dropzone.instances = [];
1503
+
1504
+ Dropzone.forElement = function(element) {
1505
+ if (typeof element === "string") {
1506
+ element = document.querySelector(element);
1507
+ }
1508
+ if ((element != null ? element.dropzone : void 0) == null) {
1509
+ throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
1510
+ }
1511
+ return element.dropzone;
1512
+ };
1513
+
1514
+ Dropzone.autoDiscover = true;
1515
+
1516
+ Dropzone.discover = function() {
1517
+ var checkElements, dropzone, dropzones, _i, _len, _results;
1518
+ if (document.querySelectorAll) {
1519
+ dropzones = document.querySelectorAll(".dropzone");
1520
+ } else {
1521
+ dropzones = [];
1522
+ checkElements = function(elements) {
1523
+ var el, _i, _len, _results;
1524
+ _results = [];
1525
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
1526
+ el = elements[_i];
1527
+ if (/(^| )dropzone($| )/.test(el.className)) {
1528
+ _results.push(dropzones.push(el));
1529
+ } else {
1530
+ _results.push(void 0);
1531
+ }
1532
+ }
1533
+ return _results;
1534
+ };
1535
+ checkElements(document.getElementsByTagName("div"));
1536
+ checkElements(document.getElementsByTagName("form"));
1537
+ }
1538
+ _results = [];
1539
+ for (_i = 0, _len = dropzones.length; _i < _len; _i++) {
1540
+ dropzone = dropzones[_i];
1541
+ if (Dropzone.optionsForElement(dropzone) !== false) {
1542
+ _results.push(new Dropzone(dropzone));
1543
+ } else {
1544
+ _results.push(void 0);
1545
+ }
1546
+ }
1547
+ return _results;
1548
+ };
1549
+
1550
+ Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i];
1551
+
1552
+ Dropzone.isBrowserSupported = function() {
1553
+ var capableBrowser, regex, _i, _len, _ref;
1554
+ capableBrowser = true;
1555
+ if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
1556
+ if (!("classList" in document.createElement("a"))) {
1557
+ capableBrowser = false;
1558
+ } else {
1559
+ _ref = Dropzone.blacklistedBrowsers;
1560
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1561
+ regex = _ref[_i];
1562
+ if (regex.test(navigator.userAgent)) {
1563
+ capableBrowser = false;
1564
+ continue;
1565
+ }
1566
+ }
1567
+ }
1568
+ } else {
1569
+ capableBrowser = false;
1570
+ }
1571
+ return capableBrowser;
1572
+ };
1573
+
1574
+ without = function(list, rejectedItem) {
1575
+ var item, _i, _len, _results;
1576
+ _results = [];
1577
+ for (_i = 0, _len = list.length; _i < _len; _i++) {
1578
+ item = list[_i];
1579
+ if (item !== rejectedItem) {
1580
+ _results.push(item);
1581
+ }
1582
+ }
1583
+ return _results;
1584
+ };
1585
+
1586
+ camelize = function(str) {
1587
+ return str.replace(/[\-_](\w)/g, function(match) {
1588
+ return match.charAt(1).toUpperCase();
1589
+ });
1590
+ };
1591
+
1592
+ Dropzone.createElement = function(string) {
1593
+ var div;
1594
+ div = document.createElement("div");
1595
+ div.innerHTML = string;
1596
+ return div.childNodes[0];
1597
+ };
1598
+
1599
+ Dropzone.elementInside = function(element, container) {
1600
+ if (element === container) {
1601
+ return true;
1602
+ }
1603
+ while (element = element.parentNode) {
1604
+ if (element === container) {
1605
+ return true;
1606
+ }
1607
+ }
1608
+ return false;
1609
+ };
1610
+
1611
+ Dropzone.getElement = function(el, name) {
1612
+ var element;
1613
+ if (typeof el === "string") {
1614
+ element = document.querySelector(el);
1615
+ } else if (el.nodeType != null) {
1616
+ element = el;
1617
+ }
1618
+ if (element == null) {
1619
+ throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element.");
1620
+ }
1621
+ return element;
1622
+ };
1623
+
1624
+ Dropzone.getElements = function(els, name) {
1625
+ var e, el, elements, _i, _j, _len, _len1, _ref;
1626
+ if (els instanceof Array) {
1627
+ elements = [];
1628
+ try {
1629
+ for (_i = 0, _len = els.length; _i < _len; _i++) {
1630
+ el = els[_i];
1631
+ elements.push(this.getElement(el, name));
1632
+ }
1633
+ } catch (_error) {
1634
+ e = _error;
1635
+ elements = null;
1636
+ }
1637
+ } else if (typeof els === "string") {
1638
+ elements = [];
1639
+ _ref = document.querySelectorAll(els);
1640
+ for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
1641
+ el = _ref[_j];
1642
+ elements.push(el);
1643
+ }
1644
+ } else if (els.nodeType != null) {
1645
+ elements = [els];
1646
+ }
1647
+ if (!((elements != null) && elements.length)) {
1648
+ throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");
1649
+ }
1650
+ return elements;
1651
+ };
1652
+
1653
+ Dropzone.confirm = function(question, accepted, rejected) {
1654
+ if (window.confirm(question)) {
1655
+ return accepted();
1656
+ } else if (rejected != null) {
1657
+ return rejected();
1658
+ }
1659
+ };
1660
+
1661
+ Dropzone.isValidFile = function(file, acceptedFiles) {
1662
+ var baseMimeType, mimeType, validType, _i, _len;
1663
+ if (!acceptedFiles) {
1664
+ return true;
1665
+ }
1666
+ acceptedFiles = acceptedFiles.split(",");
1667
+ mimeType = file.type;
1668
+ baseMimeType = mimeType.replace(/\/.*$/, "");
1669
+ for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) {
1670
+ validType = acceptedFiles[_i];
1671
+ validType = validType.trim();
1672
+ if (validType.charAt(0) === ".") {
1673
+ if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
1674
+ return true;
1675
+ }
1676
+ } else if (/\/\*$/.test(validType)) {
1677
+ if (baseMimeType === validType.replace(/\/.*$/, "")) {
1678
+ return true;
1679
+ }
1680
+ } else {
1681
+ if (mimeType === validType) {
1682
+ return true;
1683
+ }
1684
+ }
1685
+ }
1686
+ return false;
1687
+ };
1688
+
1689
+ if (typeof jQuery !== "undefined" && jQuery !== null) {
1690
+ jQuery.fn.dropzone = function(options) {
1691
+ return this.each(function() {
1692
+ return new Dropzone(this, options);
1693
+ });
1694
+ };
1695
+ }
1696
+
1697
+ if (typeof module !== "undefined" && module !== null) {
1698
+ module.exports = Dropzone;
1699
+ } else {
1700
+ window.Dropzone = Dropzone;
1701
+ }
1702
+
1703
+ Dropzone.ADDED = "added";
1704
+
1705
+ Dropzone.QUEUED = "queued";
1706
+
1707
+ Dropzone.ACCEPTED = Dropzone.QUEUED;
1708
+
1709
+ Dropzone.UPLOADING = "uploading";
1710
+
1711
+ Dropzone.PROCESSING = Dropzone.UPLOADING;
1712
+
1713
+ Dropzone.CANCELED = "canceled";
1714
+
1715
+ Dropzone.ERROR = "error";
1716
+
1717
+ Dropzone.SUCCESS = "success";
1718
+
1719
+
1720
+ /*
1721
+
1722
+ Bugfix for iOS 6 and 7
1723
+ Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
1724
+ based on the work of https://github.com/stomita/ios-imagefile-megapixel
1725
+ */
1726
+
1727
+ detectVerticalSquash = function(img) {
1728
+ var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy;
1729
+ iw = img.naturalWidth;
1730
+ ih = img.naturalHeight;
1731
+ canvas = document.createElement("canvas");
1732
+ canvas.width = 1;
1733
+ canvas.height = ih;
1734
+ ctx = canvas.getContext("2d");
1735
+ ctx.drawImage(img, 0, 0);
1736
+ data = ctx.getImageData(0, 0, 1, ih).data;
1737
+ sy = 0;
1738
+ ey = ih;
1739
+ py = ih;
1740
+ while (py > sy) {
1741
+ alpha = data[(py - 1) * 4 + 3];
1742
+ if (alpha === 0) {
1743
+ ey = py;
1744
+ } else {
1745
+ sy = py;
1746
+ }
1747
+ py = (ey + sy) >> 1;
1748
+ }
1749
+ ratio = py / ih;
1750
+ if (ratio === 0) {
1751
+ return 1;
1752
+ } else {
1753
+ return ratio;
1754
+ }
1755
+ };
1756
+
1757
+ drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
1758
+ var vertSquashRatio;
1759
+ vertSquashRatio = detectVerticalSquash(img);
1760
+ return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);
1761
+ };
1762
+
1763
+
1764
+ /*
1765
+ * contentloaded.js
1766
+ *
1767
+ * Author: Diego Perini (diego.perini at gmail.com)
1768
+ * Summary: cross-browser wrapper for DOMContentLoaded
1769
+ * Updated: 20101020
1770
+ * License: MIT
1771
+ * Version: 1.2
1772
+ *
1773
+ * URL:
1774
+ * http://javascript.nwbox.com/ContentLoaded/
1775
+ * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
1776
+ */
1777
+
1778
+ contentLoaded = function(win, fn) {
1779
+ var add, doc, done, init, poll, pre, rem, root, top;
1780
+ done = false;
1781
+ top = true;
1782
+ doc = win.document;
1783
+ root = doc.documentElement;
1784
+ add = (doc.addEventListener ? "addEventListener" : "attachEvent");
1785
+ rem = (doc.addEventListener ? "removeEventListener" : "detachEvent");
1786
+ pre = (doc.addEventListener ? "" : "on");
1787
+ init = function(e) {
1788
+ if (e.type === "readystatechange" && doc.readyState !== "complete") {
1789
+ return;
1790
+ }
1791
+ (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);
1792
+ if (!done && (done = true)) {
1793
+ return fn.call(win, e.type || e);
1794
+ }
1795
+ };
1796
+ poll = function() {
1797
+ var e;
1798
+ try {
1799
+ root.doScroll("left");
1800
+ } catch (_error) {
1801
+ e = _error;
1802
+ setTimeout(poll, 50);
1803
+ return;
1804
+ }
1805
+ return init("poll");
1806
+ };
1807
+ if (doc.readyState !== "complete") {
1808
+ if (doc.createEventObject && root.doScroll) {
1809
+ try {
1810
+ top = !win.frameElement;
1811
+ } catch (_error) {}
1812
+ if (top) {
1813
+ poll();
1814
+ }
1815
+ }
1816
+ doc[add](pre + "DOMContentLoaded", init, false);
1817
+ doc[add](pre + "readystatechange", init, false);
1818
+ return win[add](pre + "load", init, false);
1819
+ }
1820
+ };
1821
+
1822
+ Dropzone._autoDiscoverFunction = function() {
1823
+ if (Dropzone.autoDiscover) {
1824
+ return Dropzone.discover();
1825
+ }
1826
+ };
1827
+
1828
+ contentLoaded(window, Dropzone._autoDiscoverFunction);
1829
+
1830
+ }).call(this);
1831
+
1832
+ });
1833
+
1834
+ if (typeof exports == "object") {
1835
+ module.exports = require("dropzone");
1836
+ } else if (typeof define == "function" && define.amd) {
1837
+ define([], function(){ return require("dropzone"); });
1838
+ } else {
1839
+ this["Dropzone"] = require("dropzone");
1840
+ }
1841
+ })()