ruby-wisp-source 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1684) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +28 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +22 -0
  5. data/README.md +12 -0
  6. data/Rakefile +39 -0
  7. data/VERSION +1 -0
  8. data/lib/wisp/source.rb +7 -0
  9. data/ruby-wisp-source.gemspec +13 -0
  10. data/vendor/History.md +159 -0
  11. data/vendor/LICENSE +24 -0
  12. data/vendor/Makefile +64 -0
  13. data/vendor/Readme.md +615 -0
  14. data/vendor/analyzer.js +385 -0
  15. data/vendor/ast.js +214 -0
  16. data/vendor/backend/javascript/writer.js +212 -0
  17. data/vendor/bin/wisp.js +2 -0
  18. data/vendor/compiler.js +1026 -0
  19. data/vendor/design.md +114 -0
  20. data/vendor/embed.js +2 -0
  21. data/vendor/engine/browser.js +59 -0
  22. data/vendor/engine/node.js +13 -0
  23. data/vendor/interactivate/Makefile +38 -0
  24. data/vendor/interactivate/Readme.md +28 -0
  25. data/vendor/interactivate/build/cache.manifest +12 -0
  26. data/vendor/interactivate/build/codemirror-compressed.js +4 -0
  27. data/vendor/interactivate/build/codemirror.css +248 -0
  28. data/vendor/interactivate/build/main.js +5401 -0
  29. data/vendor/interactivate/build/solarized.css +203 -0
  30. data/vendor/interactivate/index.html +429 -0
  31. data/vendor/interactivate/node_modules/codemirror-activine/License.md +18 -0
  32. data/vendor/interactivate/node_modules/codemirror-activine/Readme.md +22 -0
  33. data/vendor/interactivate/node_modules/codemirror-activine/core.js +33 -0
  34. data/vendor/interactivate/node_modules/codemirror-activine/package.json +36 -0
  35. data/vendor/interactivate/node_modules/codemirror-hashare/License.md +18 -0
  36. data/vendor/interactivate/node_modules/codemirror-hashare/Readme.md +23 -0
  37. data/vendor/interactivate/node_modules/codemirror-hashare/core.js +31 -0
  38. data/vendor/interactivate/node_modules/codemirror-hashare/package.json +37 -0
  39. data/vendor/interactivate/node_modules/codemirror-persist/License.md +18 -0
  40. data/vendor/interactivate/node_modules/codemirror-persist/Readme.md +22 -0
  41. data/vendor/interactivate/node_modules/codemirror-persist/core.js +25 -0
  42. data/vendor/interactivate/node_modules/codemirror-persist/package.json +34 -0
  43. data/vendor/interactivate/node_modules/interactivate/History.md +47 -0
  44. data/vendor/interactivate/node_modules/interactivate/License.md +18 -0
  45. data/vendor/interactivate/node_modules/interactivate/Readme.md +11 -0
  46. data/vendor/interactivate/node_modules/interactivate/demo/Readme.md +24 -0
  47. data/vendor/interactivate/node_modules/interactivate/demo/build/cache.manifest +12 -0
  48. data/vendor/interactivate/node_modules/interactivate/demo/build/codemirror-compressed.js +4 -0
  49. data/vendor/interactivate/node_modules/interactivate/demo/build/codemirror.css +248 -0
  50. data/vendor/interactivate/node_modules/interactivate/demo/build/main.js +267 -0
  51. data/vendor/interactivate/node_modules/interactivate/demo/build/solarized.css +207 -0
  52. data/vendor/interactivate/node_modules/interactivate/demo/index.html +115 -0
  53. data/vendor/interactivate/node_modules/interactivate/demo/main.js +39 -0
  54. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/License.md +18 -0
  55. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/Readme.md +22 -0
  56. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/core.js +33 -0
  57. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/package.json +36 -0
  58. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/License.md +18 -0
  59. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/Readme.md +23 -0
  60. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/core.js +31 -0
  61. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/package.json +37 -0
  62. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/License.md +18 -0
  63. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/Readme.md +22 -0
  64. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/core.js +25 -0
  65. data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/package.json +34 -0
  66. data/vendor/interactivate/node_modules/interactivate/demo/package.json +21 -0
  67. data/vendor/interactivate/node_modules/interactivate/host/window.js +19 -0
  68. data/vendor/interactivate/node_modules/interactivate/interactivate.js +187 -0
  69. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/History.md +10 -0
  70. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/License.md +18 -0
  71. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/Readme.md +68 -0
  72. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/diff.js +45 -0
  73. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/index.js +5 -0
  74. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/package.json +53 -0
  75. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/patch.js +21 -0
  76. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/rebase.js +33 -0
  77. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/diff.js +62 -0
  78. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/index.js +16 -0
  79. data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/patch.js +54 -0
  80. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/History.md +15 -0
  81. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/License.md +18 -0
  82. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/Readme.md +54 -0
  83. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/event.js +39 -0
  84. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/index.js +3 -0
  85. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/History.md +20 -0
  86. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/License.md +18 -0
  87. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/Readme.md +45 -0
  88. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/end.js +3 -0
  89. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/index.js +8 -0
  90. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-error.js +9 -0
  91. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-reduced.js +9 -0
  92. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/package.json +57 -0
  93. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduce.js +59 -0
  94. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduced.js +15 -0
  95. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reducible.js +87 -0
  96. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/index.js +6 -0
  97. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reduce.js +116 -0
  98. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reducible.js +106 -0
  99. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/package.json +56 -0
  100. data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/test/index.js +91 -0
  101. data/vendor/interactivate/node_modules/interactivate/node_modules/method/History.md +60 -0
  102. data/vendor/interactivate/node_modules/interactivate/node_modules/method/License.md +18 -0
  103. data/vendor/interactivate/node_modules/interactivate/node_modules/method/Readme.md +125 -0
  104. data/vendor/interactivate/node_modules/interactivate/node_modules/method/core.js +227 -0
  105. data/vendor/interactivate/node_modules/interactivate/node_modules/method/package.json +93 -0
  106. data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/browser.js +18 -0
  107. data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/common-index.js +3 -0
  108. data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/common.js +270 -0
  109. data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/index.js +3 -0
  110. data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/phantom-index.js +3 -0
  111. data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/tap-index.js +3 -0
  112. data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/testling-index.js +3 -0
  113. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/History.md +139 -0
  114. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/License.md +19 -0
  115. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/Readme.md +253 -0
  116. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/capture.js +34 -0
  117. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/concat.js +37 -0
  118. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/debug/print.js +45 -0
  119. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/delay.js +29 -0
  120. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/drop-while.js +39 -0
  121. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/drop.js +40 -0
  122. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/expand.js +25 -0
  123. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/filter.js +21 -0
  124. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/fold.js +55 -0
  125. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/hub.js +102 -0
  126. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/index.js +33 -0
  127. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/into.js +16 -0
  128. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/map.js +19 -0
  129. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/merge.js +50 -0
  130. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/History.md +20 -0
  131. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/License.md +18 -0
  132. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/Readme.md +45 -0
  133. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/end.js +3 -0
  134. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/index.js +8 -0
  135. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-error.js +9 -0
  136. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-reduced.js +9 -0
  137. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/package.json +57 -0
  138. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduce.js +59 -0
  139. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduced.js +15 -0
  140. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reducible.js +87 -0
  141. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/index.js +6 -0
  142. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reduce.js +116 -0
  143. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reducible.js +106 -0
  144. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/package.json +60 -0
  145. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/reducer.js +51 -0
  146. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/reductions.js +31 -0
  147. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/take-while.js +23 -0
  148. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/take.js +40 -0
  149. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/benchmark.js +32 -0
  150. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/capture.js +108 -0
  151. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/concat.js +104 -0
  152. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js +29 -0
  153. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/drop-while.js +118 -0
  154. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/drop.js +89 -0
  155. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/errors.js +222 -0
  156. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/filter.js +72 -0
  157. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/fold.js +111 -0
  158. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/hub.js +222 -0
  159. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/index.js +23 -0
  160. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/into.js +22 -0
  161. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/map.js +67 -0
  162. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/merge.js +75 -0
  163. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/reductions.js +105 -0
  164. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/take-while.js +134 -0
  165. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/take.js +82 -0
  166. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/util/event.js +25 -0
  167. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/util/lazy.js +9 -0
  168. data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/util/test.js +34 -0
  169. data/vendor/interactivate/node_modules/interactivate/output.js +60 -0
  170. data/vendor/interactivate/node_modules/interactivate/package.json +30 -0
  171. data/vendor/interactivate/node_modules/interactivate/render.js +23 -0
  172. data/vendor/interactivate/node_modules/interactivate/view.js +79 -0
  173. data/vendor/interactivate/package.json +22 -0
  174. data/vendor/interactivate/src/host.wisp +84 -0
  175. data/vendor/interactivate/src/main.wisp +38 -0
  176. data/vendor/node_modules/browserify/LICENSE +63 -0
  177. data/vendor/node_modules/browserify/_empty.js +0 -0
  178. data/vendor/node_modules/browserify/bin/advanced.txt +36 -0
  179. data/vendor/node_modules/browserify/bin/cmd.js +150 -0
  180. data/vendor/node_modules/browserify/bin/usage.txt +32 -0
  181. data/vendor/node_modules/browserify/example/api/browser/bar.js +1 -0
  182. data/vendor/node_modules/browserify/example/api/browser/foo.js +5 -0
  183. data/vendor/node_modules/browserify/example/api/browser/main.js +2 -0
  184. data/vendor/node_modules/browserify/example/api/build.js +4 -0
  185. data/vendor/node_modules/browserify/example/multiple_bundles/beep.js +2 -0
  186. data/vendor/node_modules/browserify/example/multiple_bundles/boop.js +2 -0
  187. data/vendor/node_modules/browserify/example/multiple_bundles/build.sh +4 -0
  188. data/vendor/node_modules/browserify/example/multiple_bundles/robot.js +1 -0
  189. data/vendor/node_modules/browserify/example/multiple_bundles/static/beep.html +2 -0
  190. data/vendor/node_modules/browserify/example/multiple_bundles/static/beep.js +6 -0
  191. data/vendor/node_modules/browserify/example/multiple_bundles/static/boop.html +2 -0
  192. data/vendor/node_modules/browserify/example/multiple_bundles/static/boop.js +6 -0
  193. data/vendor/node_modules/browserify/example/multiple_bundles/static/common.js +3 -0
  194. data/vendor/node_modules/browserify/example/source_maps/build.js +10 -0
  195. data/vendor/node_modules/browserify/example/source_maps/build.sh +4 -0
  196. data/vendor/node_modules/browserify/example/source_maps/index.html +11 -0
  197. data/vendor/node_modules/browserify/example/source_maps/js/foo.js +7 -0
  198. data/vendor/node_modules/browserify/example/source_maps/js/main.js +4 -0
  199. data/vendor/node_modules/browserify/example/source_maps/js/wunder/bar.js +8 -0
  200. data/vendor/node_modules/browserify/index.js +352 -0
  201. data/vendor/node_modules/browserify/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
  202. data/vendor/node_modules/browserify/node_modules/JSONStream/LICENSE.MIT +24 -0
  203. data/vendor/node_modules/browserify/node_modules/JSONStream/examples/all_docs.js +13 -0
  204. data/vendor/node_modules/browserify/node_modules/JSONStream/index.js +191 -0
  205. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
  206. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
  207. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
  208. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
  209. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +401 -0
  210. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/package.json +40 -0
  211. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
  212. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
  213. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js +110 -0
  214. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
  215. data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
  216. data/vendor/node_modules/browserify/node_modules/JSONStream/package.json +43 -0
  217. data/vendor/node_modules/browserify/node_modules/JSONStream/readme.markdown +145 -0
  218. data/vendor/node_modules/browserify/node_modules/JSONStream/test/bool.js +41 -0
  219. data/vendor/node_modules/browserify/node_modules/JSONStream/test/destroy_missing.js +22 -0
  220. data/vendor/node_modules/browserify/node_modules/JSONStream/test/empty.js +44 -0
  221. data/vendor/node_modules/browserify/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
  222. data/vendor/node_modules/browserify/node_modules/JSONStream/test/fn.js +39 -0
  223. data/vendor/node_modules/browserify/node_modules/JSONStream/test/multiple_objects.js +42 -0
  224. data/vendor/node_modules/browserify/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
  225. data/vendor/node_modules/browserify/node_modules/JSONStream/test/parsejson.js +28 -0
  226. data/vendor/node_modules/browserify/node_modules/JSONStream/test/stringify.js +41 -0
  227. data/vendor/node_modules/browserify/node_modules/JSONStream/test/stringify_object.js +47 -0
  228. data/vendor/node_modules/browserify/node_modules/JSONStream/test/test.js +35 -0
  229. data/vendor/node_modules/browserify/node_modules/JSONStream/test/test2.js +29 -0
  230. data/vendor/node_modules/browserify/node_modules/JSONStream/test/two-ways.js +41 -0
  231. data/vendor/node_modules/browserify/node_modules/browser-pack/LICENSE +18 -0
  232. data/vendor/node_modules/browserify/node_modules/browser-pack/cmd.js +4 -0
  233. data/vendor/node_modules/browserify/node_modules/browser-pack/example/input.json +13 -0
  234. data/vendor/node_modules/browserify/node_modules/browser-pack/example/output.js +1 -0
  235. data/vendor/node_modules/browserify/node_modules/browser-pack/example/sourcemap/input.json +15 -0
  236. data/vendor/node_modules/browserify/node_modules/browser-pack/example/sourcemap/output.js +6 -0
  237. data/vendor/node_modules/browserify/node_modules/browser-pack/index.js +79 -0
  238. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/LICENSE +23 -0
  239. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/README.md +111 -0
  240. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/example/two-files-short.js +26 -0
  241. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/example/two-files.js +47 -0
  242. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/index.js +97 -0
  243. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE +23 -0
  244. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/README.md +85 -0
  245. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js +15 -0
  246. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/index.js +89 -0
  247. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/package.json +40 -0
  248. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js +25 -0
  249. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js +129 -0
  250. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE +23 -0
  251. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/README.md +88 -0
  252. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js +8 -0
  253. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/index.js +127 -0
  254. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/CHANGELOG.md +58 -0
  255. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/LICENSE +28 -0
  256. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/Makefile.dryice.js +166 -0
  257. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/README.md +347 -0
  258. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/assert-shim.js +56 -0
  259. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/mini-require.js +152 -0
  260. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  261. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/prefix-utils.jsm +18 -0
  262. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-browser.js +8 -0
  263. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  264. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-utils.jsm +21 -0
  265. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/test-prefix.js +8 -0
  266. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/test-suffix.js +3 -0
  267. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/array-set.js +96 -0
  268. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  269. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64.js +42 -0
  270. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  271. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  272. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  273. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-node.js +353 -0
  274. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/util.js +91 -0
  275. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map.js +8 -0
  276. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  277. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  278. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  279. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/package.json +40 -0
  280. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/package.json +81 -0
  281. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/run-tests.js +73 -0
  282. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-api.js +26 -0
  283. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-array-set.js +71 -0
  284. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  285. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64.js +35 -0
  286. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  287. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  288. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  289. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  290. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  291. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/util.js +152 -0
  292. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/package.json +49 -0
  293. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js +247 -0
  294. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js +129 -0
  295. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/LICENSE +23 -0
  296. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/MOZILLA_LICENSE +28 -0
  297. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/README.md +35 -0
  298. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/base64-vlq.js +108 -0
  299. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/base64.js +35 -0
  300. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/example/one-to-one-mappings.js +5 -0
  301. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/index.js +82 -0
  302. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/package.json +46 -0
  303. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/test/parse-base64vlq-mappings.js +72 -0
  304. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/package.json +52 -0
  305. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/test/combine-source-map.js +143 -0
  306. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/README.html +1012 -0
  307. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/README.org +593 -0
  308. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/bin/uglifyjs +334 -0
  309. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/docstyle.css +75 -0
  310. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/consolidator.js +1220 -0
  311. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/parse-js.js +1369 -0
  312. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/process.js +2117 -0
  313. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/squeeze-more.js +78 -0
  314. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/package.json +35 -0
  315. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/beautify.js +28 -0
  316. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/testconsolidator.js +1391 -0
  317. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/testparser.js +409 -0
  318. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/1e21.js +1 -0
  319. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array1.js +1 -0
  320. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array2.js +1 -0
  321. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array3.js +1 -0
  322. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array4.js +1 -0
  323. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/assignment.js +1 -0
  324. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +1 -0
  325. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/const.js +1 -0
  326. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/div-with-regexp.js +1 -0
  327. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +1 -0
  328. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +1 -0
  329. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/if-not.js +1 -0
  330. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/if.js +1 -0
  331. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +1 -0
  332. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +1 -0
  333. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/infinite.js +1 -0
  334. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue10.js +1 -0
  335. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue11.js +1 -0
  336. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue13.js +1 -0
  337. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue14.js +1 -0
  338. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue16.js +1 -0
  339. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue17.js +1 -0
  340. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue20.js +1 -0
  341. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue21.js +1 -0
  342. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue25.js +1 -0
  343. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue27.js +1 -0
  344. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue278.js +1 -0
  345. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue28.js +1 -0
  346. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue29.js +1 -0
  347. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue30.js +1 -0
  348. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue34.js +1 -0
  349. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue349.js +1 -0
  350. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue353.js +1 -0
  351. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue372.js +1 -0
  352. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue4.js +1 -0
  353. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue48.js +1 -0
  354. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue50.js +1 -0
  355. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue53.js +1 -0
  356. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +1 -0
  357. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue68.js +1 -0
  358. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue69.js +1 -0
  359. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue9.js +1 -0
  360. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issues222_324.js +1 -0
  361. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/mangle.js +1 -0
  362. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/null_string.js +1 -0
  363. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +1 -0
  364. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/var.js +1 -0
  365. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/whitespace.js +1 -0
  366. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/with.js +1 -0
  367. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/1e21.js +1 -0
  368. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array1.js +3 -0
  369. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array2.js +4 -0
  370. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array3.js +4 -0
  371. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array4.js +6 -0
  372. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/assignment.js +20 -0
  373. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/concatstring.js +3 -0
  374. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/const.js +5 -0
  375. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/div-with-regexp.js +1 -0
  376. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +4 -0
  377. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/forstatement.js +10 -0
  378. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/if-not.js +1 -0
  379. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/if.js +6 -0
  380. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +9 -0
  381. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +16 -0
  382. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/infinite.js +1 -0
  383. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue10.js +1 -0
  384. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue11.js +3 -0
  385. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue13.js +1 -0
  386. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue14.js +1 -0
  387. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue16.js +1 -0
  388. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue17.js +4 -0
  389. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue20.js +1 -0
  390. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue21.js +6 -0
  391. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue25.js +7 -0
  392. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue27.js +1 -0
  393. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue278.js +1 -0
  394. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue28.js +3 -0
  395. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue29.js +1 -0
  396. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue30.js +3 -0
  397. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue34.js +3 -0
  398. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue349.js +25 -0
  399. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue353.js +4 -0
  400. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue372.js +32 -0
  401. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue4.js +3 -0
  402. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue48.js +1 -0
  403. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue50.js +9 -0
  404. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue53.js +1 -0
  405. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +3 -0
  406. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue68.js +5 -0
  407. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue69.js +1 -0
  408. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue9.js +4 -0
  409. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issues222_324.js +82 -0
  410. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/mangle.js +5 -0
  411. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/null_string.js +1 -0
  412. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +3 -0
  413. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/var.js +3 -0
  414. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/whitespace.js +21 -0
  415. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/with.js +2 -0
  416. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/scripts.js +57 -0
  417. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/hoist.js +33 -0
  418. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/instrument.js +97 -0
  419. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/test.js +30 -0
  420. data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/uglify-js.js +18 -0
  421. data/vendor/node_modules/browserify/node_modules/browser-pack/package.json +70 -0
  422. data/vendor/node_modules/browserify/node_modules/browser-pack/prelude.js +42 -0
  423. data/vendor/node_modules/browserify/node_modules/browser-pack/readme.markdown +81 -0
  424. data/vendor/node_modules/browserify/node_modules/browser-pack/test/comment.js +33 -0
  425. data/vendor/node_modules/browserify/node_modules/browser-pack/test/only_execute_entries.js +26 -0
  426. data/vendor/node_modules/browserify/node_modules/browser-pack/test/order.js +38 -0
  427. data/vendor/node_modules/browserify/node_modules/browser-pack/test/pack.js +28 -0
  428. data/vendor/node_modules/browserify/node_modules/browser-pack/test/raw.js +32 -0
  429. data/vendor/node_modules/browserify/node_modules/browser-pack/test/source-maps-existing.js +56 -0
  430. data/vendor/node_modules/browserify/node_modules/browser-pack/test/source-maps.js +113 -0
  431. data/vendor/node_modules/browserify/node_modules/browser-pack/test/this.js +24 -0
  432. data/vendor/node_modules/browserify/node_modules/browser-resolve/README.md +115 -0
  433. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/assert.js +314 -0
  434. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/child_process.js +2 -0
  435. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/dgram.js +0 -0
  436. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/events.js +183 -0
  437. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/fs.js +1 -0
  438. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/https.js +13 -0
  439. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/net.js +1 -0
  440. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/path.js +175 -0
  441. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/process.js +55 -0
  442. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/querystring.js +250 -0
  443. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/stream.js +119 -0
  444. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/string_decoder.js +161 -0
  445. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/sys.js +1 -0
  446. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/timers.js +39 -0
  447. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/tls.js +1 -0
  448. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/tty.js +2 -0
  449. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/url.js +604 -0
  450. data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/util.js +351 -0
  451. data/vendor/node_modules/browserify/node_modules/browser-resolve/empty.js +0 -0
  452. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/builtin.js +4 -0
  453. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/custom/custom.js +1 -0
  454. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/custom/main.js +1 -0
  455. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/custom/package.json +7 -0
  456. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/custom.js +5 -0
  457. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/resolve.js +4 -0
  458. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/skip/main.js +9 -0
  459. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/skip/package.json +7 -0
  460. data/vendor/node_modules/browserify/node_modules/browser-resolve/example/skip.js +5 -0
  461. data/vendor/node_modules/browserify/node_modules/browser-resolve/index.js +170 -0
  462. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/README.md +11 -0
  463. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/buffer_ieee754.js +84 -0
  464. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/index.js +1317 -0
  465. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/README.md +14 -0
  466. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +84 -0
  467. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/package.json +33 -0
  468. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +50 -0
  469. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/package.json +49 -0
  470. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/test/buffer.js +218 -0
  471. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/LICENCE +19 -0
  472. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/README.md +32 -0
  473. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/index.js +85 -0
  474. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/package.json +80 -0
  475. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/test/index.js +67 -0
  476. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/test/static/index.html +12 -0
  477. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/test/static/test-adapter.js +53 -0
  478. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/example/bundle.js +637 -0
  479. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/example/index.html +12 -0
  480. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/example/test.js +4 -0
  481. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/index.js +74 -0
  482. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/md5.js +384 -0
  483. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/package.json +37 -0
  484. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/readme.markdown +20 -0
  485. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/rng.js +37 -0
  486. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/sha.js +210 -0
  487. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/test/simple.js +35 -0
  488. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/get/index.html +9 -0
  489. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/get/main.js +14 -0
  490. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/get/server.js +12 -0
  491. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/headers/index.html +9 -0
  492. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/headers/main.js +18 -0
  493. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/headers/server.js +15 -0
  494. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/data.json +139 -0
  495. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/index.html +9 -0
  496. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/main.js +13 -0
  497. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
  498. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT +24 -0
  499. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js +13 -0
  500. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +189 -0
  501. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
  502. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
  503. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
  504. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
  505. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +379 -0
  506. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +36 -0
  507. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
  508. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
  509. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
  510. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
  511. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json +40 -0
  512. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown +145 -0
  513. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js +41 -0
  514. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +22 -0
  515. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js +44 -0
  516. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
  517. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js +39 -0
  518. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +69 -0
  519. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +42 -0
  520. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
  521. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js +28 -0
  522. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js +41 -0
  523. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js +47 -0
  524. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js +35 -0
  525. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js +29 -0
  526. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js +41 -0
  527. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/server.js +10 -0
  528. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/post/index.html +9 -0
  529. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/post/main.js +16 -0
  530. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/post/server.js +19 -0
  531. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/index.html +9 -0
  532. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/main.js +16 -0
  533. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/server.js +21 -0
  534. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/index.js +60 -0
  535. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/lib/request.js +131 -0
  536. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/lib/response.js +119 -0
  537. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/index.js +48 -0
  538. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/package.json +33 -0
  539. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/readme.md +31 -0
  540. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js +34 -0
  541. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/package.json +49 -0
  542. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/readme.markdown +128 -0
  543. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/LICENSE +18 -0
  544. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/async.js +5 -0
  545. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/sync.js +3 -0
  546. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/index.js +5 -0
  547. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js +131 -0
  548. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.js +4 -0
  549. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.json +38 -0
  550. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/sync.js +99 -0
  551. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/package.json +39 -0
  552. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/readme.markdown +134 -0
  553. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/core.js +12 -0
  554. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter.js +17 -0
  555. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js +15 -0
  556. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock.js +68 -0
  557. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js +68 -0
  558. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
  559. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  560. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json +3 -0
  561. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  562. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
  563. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
  564. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee +1 -0
  565. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js +1 -0
  566. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee +0 -0
  567. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js +0 -0
  568. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  569. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  570. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver.js +144 -0
  571. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js +157 -0
  572. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/README.markdown +103 -0
  573. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/example/run/bundle.js +473 -0
  574. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/example/run/entry.js +6 -0
  575. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/example/run/index.html +9 -0
  576. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/example/run/server.js +6 -0
  577. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/index.js +85 -0
  578. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/package.json +46 -0
  579. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/testling/run.js +22 -0
  580. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/testling/test.sh +11 -0
  581. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/index.js +43 -0
  582. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/package.json +40 -0
  583. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/readme.md +1 -0
  584. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/test/zlib.test.js +65 -0
  585. data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/zlib.js +55 -0
  586. data/vendor/node_modules/browserify/node_modules/browser-resolve/package.json +45 -0
  587. data/vendor/node_modules/browserify/node_modules/browser-resolve/test/core.js +28 -0
  588. data/vendor/node_modules/browserify/node_modules/browser-resolve/test/false.js +24 -0
  589. data/vendor/node_modules/browserify/node_modules/browser-resolve/test/fixtures/foo.js +1 -0
  590. data/vendor/node_modules/browserify/node_modules/browser-resolve/test/local.js +15 -0
  591. data/vendor/node_modules/browserify/node_modules/browser-resolve/test/mocha.opts +1 -0
  592. data/vendor/node_modules/browserify/node_modules/browser-resolve/test/modules.js +99 -0
  593. data/vendor/node_modules/browserify/node_modules/concat-stream/index.js +50 -0
  594. data/vendor/node_modules/browserify/node_modules/concat-stream/package.json +33 -0
  595. data/vendor/node_modules/browserify/node_modules/concat-stream/readme.md +31 -0
  596. data/vendor/node_modules/browserify/node_modules/concat-stream/test.js +34 -0
  597. data/vendor/node_modules/browserify/node_modules/duplexer/LICENCE +19 -0
  598. data/vendor/node_modules/browserify/node_modules/duplexer/Makefile +4 -0
  599. data/vendor/node_modules/browserify/node_modules/duplexer/README.md +36 -0
  600. data/vendor/node_modules/browserify/node_modules/duplexer/index.js +77 -0
  601. data/vendor/node_modules/browserify/node_modules/duplexer/package.json +46 -0
  602. data/vendor/node_modules/browserify/node_modules/duplexer/test.js +27 -0
  603. data/vendor/node_modules/browserify/node_modules/inherits/README.md +51 -0
  604. data/vendor/node_modules/browserify/node_modules/inherits/inherits.js +29 -0
  605. data/vendor/node_modules/browserify/node_modules/inherits/package.json +29 -0
  606. data/vendor/node_modules/browserify/node_modules/insert-module-globals/LICENSE +18 -0
  607. data/vendor/node_modules/browserify/node_modules/insert-module-globals/bench/results.txt +18 -0
  608. data/vendor/node_modules/browserify/node_modules/insert-module-globals/bench/run.sh +2 -0
  609. data/vendor/node_modules/browserify/node_modules/insert-module-globals/bin/cmd.js +13 -0
  610. data/vendor/node_modules/browserify/node_modules/insert-module-globals/buffer.js +3863 -0
  611. data/vendor/node_modules/browserify/node_modules/insert-module-globals/bundle.sh +4 -0
  612. data/vendor/node_modules/browserify/node_modules/insert-module-globals/example/files/foo/index.js +6 -0
  613. data/vendor/node_modules/browserify/node_modules/insert-module-globals/example/files/main.js +6 -0
  614. data/vendor/node_modules/browserify/node_modules/insert-module-globals/example/insert.js +10 -0
  615. data/vendor/node_modules/browserify/node_modules/insert-module-globals/index.js +102 -0
  616. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/README.markdown +45 -0
  617. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/example/base.js +3 -0
  618. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/example/dir.js +3 -0
  619. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/index.js +29 -0
  620. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/package.json +50 -0
  621. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/test/dirs.js +66 -0
  622. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/LICENSE +18 -0
  623. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/jquery.js +4 -0
  624. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/results.txt +15 -0
  625. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/run.js +7 -0
  626. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/detect.js +6 -0
  627. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/src.js +27 -0
  628. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/index.js +166 -0
  629. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/LICENSE +18 -0
  630. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/example/types.js +8 -0
  631. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/index.js +42 -0
  632. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/ChangeLog +18 -0
  633. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/LICENSE.BSD +19 -0
  634. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/README.md +73 -0
  635. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/bin/esparse.js +117 -0
  636. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/bin/esvalidate.js +177 -0
  637. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/component.json +14 -0
  638. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/doc/index.html +473 -0
  639. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/esprima.js +3895 -0
  640. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/examples/detectnestedternary.js +106 -0
  641. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/examples/findbooleantrap.js +173 -0
  642. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/examples/tokendist.js +33 -0
  643. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/index.html +102 -0
  644. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/package.json +47 -0
  645. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/benchmarks.html +58 -0
  646. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/benchmarks.js +334 -0
  647. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/compare.html +69 -0
  648. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/compare.js +328 -0
  649. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/compat.html +40 -0
  650. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/compat.js +239 -0
  651. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/coverage.footer.html +3 -0
  652. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/coverage.header.html +37 -0
  653. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/coverage.html +4676 -0
  654. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/index.html +37 -0
  655. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/module.html +36 -0
  656. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/module.js +129 -0
  657. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/reflect.js +422 -0
  658. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/run.js +66 -0
  659. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/runner.js +387 -0
  660. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/test.js +19764 -0
  661. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/package.json +57 -0
  662. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/readme.markdown +52 -0
  663. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/test/parent.js +25 -0
  664. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/package.json +68 -0
  665. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/readme.markdown +99 -0
  666. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/argument.js +17 -0
  667. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/assign_implicit.js +13 -0
  668. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/detect.js +17 -0
  669. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/argument.js +6 -0
  670. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/assign_implicit.js +2 -0
  671. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/detect.js +32 -0
  672. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/named_arg.js +6 -0
  673. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/obj.js +1 -0
  674. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/return_hash.js +5 -0
  675. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/right_hand.js +2 -0
  676. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/named_arg.js +17 -0
  677. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/obj.js +16 -0
  678. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/package.json +5 -0
  679. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/return_hash.js +13 -0
  680. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/right_hand.js +16 -0
  681. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/shebang.js +19 -0
  682. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/2132fedf7e11adbdb654aea08615ffea7b84cbf0.patch +25 -0
  683. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/README.md +15 -0
  684. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js +52 -0
  685. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/index.js +2 -0
  686. data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/package.json +33 -0
  687. data/vendor/node_modules/browserify/node_modules/insert-module-globals/package.json +59 -0
  688. data/vendor/node_modules/browserify/node_modules/insert-module-globals/readme.markdown +86 -0
  689. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/always/main.js +6 -0
  690. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/always.js +23 -0
  691. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/global/filename.js +2 -0
  692. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/global/main.js +2 -0
  693. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/global.js +49 -0
  694. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert/buffer.js +1 -0
  695. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert/foo/buf.js +4 -0
  696. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert/foo/index.js +4 -0
  697. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert/main.js +4 -0
  698. data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert.js +35 -0
  699. data/vendor/node_modules/browserify/node_modules/module-deps/LICENSE +18 -0
  700. data/vendor/node_modules/browserify/node_modules/module-deps/cmd.js +8 -0
  701. data/vendor/node_modules/browserify/node_modules/module-deps/example/deps.js +8 -0
  702. data/vendor/node_modules/browserify/node_modules/module-deps/example/files/bar.js +3 -0
  703. data/vendor/node_modules/browserify/node_modules/module-deps/example/files/foo.js +5 -0
  704. data/vendor/node_modules/browserify/node_modules/module-deps/example/files/main.js +2 -0
  705. data/vendor/node_modules/browserify/node_modules/module-deps/example/files/xyz.js +2 -0
  706. data/vendor/node_modules/browserify/node_modules/module-deps/index.js +177 -0
  707. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/LICENSE +18 -0
  708. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/example/strings.js +6 -0
  709. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/example/strings_src.js +3 -0
  710. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/index.js +66 -0
  711. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/LICENSE.BSD +19 -0
  712. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/LICENSE.source-map +27 -0
  713. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/README.md +99 -0
  714. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/bin/escodegen.js +43 -0
  715. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/bin/esgenerate.js +43 -0
  716. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/escodegen.js +2245 -0
  717. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +58 -0
  718. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/LICENSE +28 -0
  719. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +166 -0
  720. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/README.md +347 -0
  721. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +56 -0
  722. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/mini-require.js +152 -0
  723. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  724. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +18 -0
  725. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +8 -0
  726. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  727. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +21 -0
  728. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +8 -0
  729. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +3 -0
  730. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +96 -0
  731. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  732. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +42 -0
  733. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  734. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  735. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  736. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +353 -0
  737. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +91 -0
  738. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map.js +8 -0
  739. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  740. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  741. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  742. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +40 -0
  743. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/package.json +81 -0
  744. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/run-tests.js +73 -0
  745. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +26 -0
  746. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +71 -0
  747. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  748. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +35 -0
  749. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  750. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  751. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  752. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  753. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  754. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +152 -0
  755. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/package.json +55 -0
  756. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/ChangeLog +18 -0
  757. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/LICENSE.BSD +19 -0
  758. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/README.md +73 -0
  759. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/bin/esparse.js +117 -0
  760. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/bin/esvalidate.js +177 -0
  761. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/component.json +14 -0
  762. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/doc/index.html +473 -0
  763. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/esprima.js +3895 -0
  764. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/detectnestedternary.js +106 -0
  765. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/findbooleantrap.js +173 -0
  766. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/tokendist.js +33 -0
  767. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/index.html +102 -0
  768. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/package.json +47 -0
  769. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
  770. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/benchmarks.js +334 -0
  771. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compare.html +69 -0
  772. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compare.js +328 -0
  773. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
  774. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compat.js +239 -0
  775. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.footer.html +3 -0
  776. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
  777. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.html +4676 -0
  778. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/index.html +37 -0
  779. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/module.html +36 -0
  780. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/module.js +129 -0
  781. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/reflect.js +422 -0
  782. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/run.js +66 -0
  783. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/runner.js +387 -0
  784. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/test.js +19764 -0
  785. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/package.json +43 -0
  786. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/readme.markdown +73 -0
  787. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/both.js +26 -0
  788. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/chained.js +9 -0
  789. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/both.js +4 -0
  790. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/chained.js +5 -0
  791. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/nested.js +22 -0
  792. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/shebang.js +5 -0
  793. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/sparse-array.js +3 -0
  794. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/strings.js +13 -0
  795. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/word.js +13 -0
  796. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/nested.js +9 -0
  797. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/return.js +9 -0
  798. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/shebang.js +9 -0
  799. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/sparse-array.js +14 -0
  800. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/strings.js +9 -0
  801. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/word.js +12 -0
  802. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/LICENSE +18 -0
  803. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/example/async.js +5 -0
  804. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/example/sync.js +3 -0
  805. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/index.js +5 -0
  806. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/async.js +131 -0
  807. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/core.js +4 -0
  808. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/core.json +38 -0
  809. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/sync.js +99 -0
  810. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/package.json +39 -0
  811. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/readme.markdown +134 -0
  812. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/core.js +12 -0
  813. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/filter.js +17 -0
  814. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/filter_sync.js +15 -0
  815. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/mock.js +68 -0
  816. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/mock_sync.js +68 -0
  817. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
  818. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  819. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/baz/package.json +3 -0
  820. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  821. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
  822. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
  823. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/cup.coffee +1 -0
  824. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/foo.js +1 -0
  825. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/mug.coffee +0 -0
  826. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/mug.js +0 -0
  827. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  828. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  829. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver.js +144 -0
  830. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver_sync.js +157 -0
  831. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/LICENSE.APACHE2 +15 -0
  832. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/LICENSE.MIT +24 -0
  833. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/index.js +108 -0
  834. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/package.json +50 -0
  835. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/readme.markdown +63 -0
  836. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/test/auto-destroy.js +30 -0
  837. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/test/buffering.js +71 -0
  838. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/test/end.js +45 -0
  839. data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/test/index.js +114 -0
  840. data/vendor/node_modules/browserify/node_modules/module-deps/package.json +55 -0
  841. data/vendor/node_modules/browserify/node_modules/module-deps/readme.markdown +135 -0
  842. data/vendor/node_modules/browserify/node_modules/module-deps/test/bundle.js +21 -0
  843. data/vendor/node_modules/browserify/node_modules/module-deps/test/deps.js +42 -0
  844. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/bar.js +3 -0
  845. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/filterable.js +10 -0
  846. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/foo.js +5 -0
  847. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/main.js +2 -0
  848. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/f.js +1 -0
  849. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/main.js +7 -0
  850. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/g/index.js +1 -0
  851. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/g/node_modules/insert-ggg/index.js +7 -0
  852. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/g/package.json +6 -0
  853. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/insert-aaa/index.js +7 -0
  854. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/insert-bbb/index.js +7 -0
  855. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/m/index.js +3 -0
  856. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/f.js +1 -0
  857. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/main.js +7 -0
  858. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/index.js +1 -0
  859. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/package.json +6 -0
  860. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/tr_g.js +6 -0
  861. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/m/index.js +3 -0
  862. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_a.js +6 -0
  863. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_b.js +6 -0
  864. data/vendor/node_modules/browserify/node_modules/module-deps/test/files/xyz.js +2 -0
  865. data/vendor/node_modules/browserify/node_modules/module-deps/test/filter.js +37 -0
  866. data/vendor/node_modules/browserify/node_modules/module-deps/test/noparse.js +37 -0
  867. data/vendor/node_modules/browserify/node_modules/module-deps/test/tr_fn.js +29 -0
  868. data/vendor/node_modules/browserify/node_modules/module-deps/test/tr_module.js +21 -0
  869. data/vendor/node_modules/browserify/node_modules/module-deps/test/tr_sh.js +21 -0
  870. data/vendor/node_modules/browserify/node_modules/optimist/LICENSE +21 -0
  871. data/vendor/node_modules/browserify/node_modules/optimist/example/bool.js +10 -0
  872. data/vendor/node_modules/browserify/node_modules/optimist/example/boolean_double.js +7 -0
  873. data/vendor/node_modules/browserify/node_modules/optimist/example/boolean_single.js +7 -0
  874. data/vendor/node_modules/browserify/node_modules/optimist/example/default_hash.js +8 -0
  875. data/vendor/node_modules/browserify/node_modules/optimist/example/default_singles.js +7 -0
  876. data/vendor/node_modules/browserify/node_modules/optimist/example/divide.js +8 -0
  877. data/vendor/node_modules/browserify/node_modules/optimist/example/line_count.js +20 -0
  878. data/vendor/node_modules/browserify/node_modules/optimist/example/line_count_options.js +29 -0
  879. data/vendor/node_modules/browserify/node_modules/optimist/example/line_count_wrap.js +29 -0
  880. data/vendor/node_modules/browserify/node_modules/optimist/example/nonopt.js +4 -0
  881. data/vendor/node_modules/browserify/node_modules/optimist/example/reflect.js +2 -0
  882. data/vendor/node_modules/browserify/node_modules/optimist/example/short.js +3 -0
  883. data/vendor/node_modules/browserify/node_modules/optimist/example/string.js +11 -0
  884. data/vendor/node_modules/browserify/node_modules/optimist/example/usage-options.js +19 -0
  885. data/vendor/node_modules/browserify/node_modules/optimist/example/xup.js +10 -0
  886. data/vendor/node_modules/browserify/node_modules/optimist/index.js +478 -0
  887. data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
  888. data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
  889. data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
  890. data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
  891. data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/package.json +44 -0
  892. data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
  893. data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
  894. data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
  895. data/vendor/node_modules/browserify/node_modules/optimist/package.json +45 -0
  896. data/vendor/node_modules/browserify/node_modules/optimist/readme.markdown +487 -0
  897. data/vendor/node_modules/browserify/node_modules/optimist/test/_/argv.js +2 -0
  898. data/vendor/node_modules/browserify/node_modules/optimist/test/_/bin.js +3 -0
  899. data/vendor/node_modules/browserify/node_modules/optimist/test/_.js +71 -0
  900. data/vendor/node_modules/browserify/node_modules/optimist/test/parse.js +446 -0
  901. data/vendor/node_modules/browserify/node_modules/optimist/test/usage.js +292 -0
  902. data/vendor/node_modules/browserify/node_modules/shell-quote/README.markdown +72 -0
  903. data/vendor/node_modules/browserify/node_modules/shell-quote/example/parse.js +3 -0
  904. data/vendor/node_modules/browserify/node_modules/shell-quote/example/quote.js +3 -0
  905. data/vendor/node_modules/browserify/node_modules/shell-quote/index.js +33 -0
  906. data/vendor/node_modules/browserify/node_modules/shell-quote/package.json +46 -0
  907. data/vendor/node_modules/browserify/node_modules/shell-quote/test/parse.js +14 -0
  908. data/vendor/node_modules/browserify/node_modules/shell-quote/test/quote.js +15 -0
  909. data/vendor/node_modules/browserify/node_modules/syntax-error/LICENSE +18 -0
  910. data/vendor/node_modules/browserify/node_modules/syntax-error/example/check.js +12 -0
  911. data/vendor/node_modules/browserify/node_modules/syntax-error/example/src.js +9 -0
  912. data/vendor/node_modules/browserify/node_modules/syntax-error/index.js +54 -0
  913. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/LICENSE.BSD +19 -0
  914. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/README.md +74 -0
  915. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
  916. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
  917. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/javascript.js +360 -0
  918. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/json2.js +487 -0
  919. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/style.css +164 -0
  920. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-min.js +12 -0
  921. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
  922. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview.css +7 -0
  923. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
  924. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/bin/esparse.js +42 -0
  925. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/changes +92 -0
  926. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/cm +696 -0
  927. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/checkenv.js +42 -0
  928. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.html +82 -0
  929. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.js +170 -0
  930. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.html +106 -0
  931. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.js +123 -0
  932. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.css +82 -0
  933. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.html +352 -0
  934. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/precedence.html +225 -0
  935. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.html +120 -0
  936. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.js +71 -0
  937. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/esprima.js +3577 -0
  938. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/index.html +103 -0
  939. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/package.json +42 -0
  940. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
  941. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
  942. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
  943. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
  944. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
  945. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
  946. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
  947. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
  948. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
  949. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
  950. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
  951. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
  952. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
  953. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jslex.js +588 -0
  954. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
  955. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
  956. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
  957. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
  958. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/platform.js +878 -0
  959. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
  960. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
  961. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
  962. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.html +58 -0
  963. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.js +328 -0
  964. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.html +140 -0
  965. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.js +270 -0
  966. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.html +40 -0
  967. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.js +239 -0
  968. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.footer.html +3 -0
  969. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.header.html +37 -0
  970. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.html +3617 -0
  971. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/index.html +36 -0
  972. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/reflect.js +403 -0
  973. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/run.js +66 -0
  974. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/test.js +16659 -0
  975. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
  976. data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/update-coverage.sh +28 -0
  977. data/vendor/node_modules/browserify/node_modules/syntax-error/package.json +53 -0
  978. data/vendor/node_modules/browserify/node_modules/syntax-error/readme.markdown +87 -0
  979. data/vendor/node_modules/browserify/node_modules/syntax-error/test/check.js +17 -0
  980. data/vendor/node_modules/browserify/node_modules/syntax-error/test/sources/check.js +9 -0
  981. data/vendor/node_modules/browserify/node_modules/through/LICENSE.APACHE2 +15 -0
  982. data/vendor/node_modules/browserify/node_modules/through/LICENSE.MIT +24 -0
  983. data/vendor/node_modules/browserify/node_modules/through/index.js +103 -0
  984. data/vendor/node_modules/browserify/node_modules/through/package.json +50 -0
  985. data/vendor/node_modules/browserify/node_modules/through/readme.markdown +43 -0
  986. data/vendor/node_modules/browserify/node_modules/through/test/buffering.js +71 -0
  987. data/vendor/node_modules/browserify/node_modules/through/test/end.js +26 -0
  988. data/vendor/node_modules/browserify/node_modules/through/test/index.js +114 -0
  989. data/vendor/node_modules/browserify/node_modules/umd/README.md +46 -0
  990. data/vendor/node_modules/browserify/node_modules/umd/index.js +63 -0
  991. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/README.md +81 -0
  992. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/index.js +39 -0
  993. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/History.md +10 -0
  994. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/Makefile +6 -0
  995. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/Readme.md +44 -0
  996. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/index.js +10 -0
  997. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/package.json +31 -0
  998. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/LICENSE +18 -0
  999. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/example/async.js +5 -0
  1000. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/example/sync.js +3 -0
  1001. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/index.js +5 -0
  1002. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/async.js +131 -0
  1003. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/core.js +4 -0
  1004. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/core.json +38 -0
  1005. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/sync.js +99 -0
  1006. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/package.json +39 -0
  1007. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/readme.markdown +134 -0
  1008. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/core.js +12 -0
  1009. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/filter.js +17 -0
  1010. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/filter_sync.js +15 -0
  1011. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/mock.js +68 -0
  1012. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/mock_sync.js +68 -0
  1013. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
  1014. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  1015. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/package.json +3 -0
  1016. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  1017. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
  1018. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
  1019. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/cup.coffee +1 -0
  1020. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/foo.js +1 -0
  1021. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/mug.coffee +0 -0
  1022. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/mug.js +0 -0
  1023. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  1024. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  1025. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver.js +144 -0
  1026. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver_sync.js +157 -0
  1027. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/package.json +43 -0
  1028. data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/test/index.js +43 -0
  1029. data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/README.md +26 -0
  1030. data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/index.js +9 -0
  1031. data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/package.json +46 -0
  1032. data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/fixture/jquery.js +9597 -0
  1033. data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/fixture/jquery.min.js +3 -0
  1034. data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/index.js +8 -0
  1035. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/LICENSE.APACHE2 +15 -0
  1036. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/LICENSE.MIT +24 -0
  1037. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/index.js +108 -0
  1038. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/package.json +50 -0
  1039. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/readme.markdown +63 -0
  1040. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/test/auto-destroy.js +30 -0
  1041. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/test/buffering.js +71 -0
  1042. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/test/end.js +45 -0
  1043. data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/test/index.js +114 -0
  1044. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/README.md +544 -0
  1045. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/bin/uglifyjs +370 -0
  1046. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/ast.js +964 -0
  1047. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/compress.js +1968 -0
  1048. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/mozilla-ast.js +265 -0
  1049. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/output.js +1220 -0
  1050. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/parse.js +1407 -0
  1051. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/scope.js +580 -0
  1052. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/sourcemap.js +81 -0
  1053. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/transform.js +218 -0
  1054. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/utils.js +288 -0
  1055. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +58 -0
  1056. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/LICENSE +28 -0
  1057. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +166 -0
  1058. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/README.md +347 -0
  1059. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +56 -0
  1060. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +152 -0
  1061. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  1062. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +18 -0
  1063. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +8 -0
  1064. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  1065. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +21 -0
  1066. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +8 -0
  1067. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +3 -0
  1068. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +96 -0
  1069. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  1070. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +42 -0
  1071. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  1072. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
  1073. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
  1074. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +353 -0
  1075. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +91 -0
  1076. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +8 -0
  1077. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  1078. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +119 -0
  1079. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  1080. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +40 -0
  1081. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/package.json +81 -0
  1082. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +73 -0
  1083. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +26 -0
  1084. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +71 -0
  1085. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  1086. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +35 -0
  1087. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  1088. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  1089. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
  1090. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
  1091. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +282 -0
  1092. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +152 -0
  1093. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/package.json +48 -0
  1094. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/arrays.js +12 -0
  1095. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/blocks.js +49 -0
  1096. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/conditionals.js +143 -0
  1097. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/dead-code.js +89 -0
  1098. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/debugger.js +24 -0
  1099. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/drop-unused.js +97 -0
  1100. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-105.js +17 -0
  1101. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-12.js +11 -0
  1102. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-22.js +17 -0
  1103. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-44.js +31 -0
  1104. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-59.js +30 -0
  1105. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/labels.js +163 -0
  1106. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/loops.js +123 -0
  1107. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/properties.js +25 -0
  1108. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/sequences.js +161 -0
  1109. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/switch.js +210 -0
  1110. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/run-tests.js +170 -0
  1111. data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/tools/node.js +164 -0
  1112. data/vendor/node_modules/browserify/node_modules/umd/package.json +39 -0
  1113. data/vendor/node_modules/browserify/node_modules/umd/template.js +33 -0
  1114. data/vendor/node_modules/browserify/package.json +65 -0
  1115. data/vendor/node_modules/browserify/readme.markdown +426 -0
  1116. data/vendor/node_modules/browserify/test/backbone.js +22 -0
  1117. data/vendor/node_modules/browserify/test/bin.js +31 -0
  1118. data/vendor/node_modules/browserify/test/bin_entry.js +31 -0
  1119. data/vendor/node_modules/browserify/test/buffer.js +118 -0
  1120. data/vendor/node_modules/browserify/test/bundle_sourcemap.js +30 -0
  1121. data/vendor/node_modules/browserify/test/catch/main.js +1 -0
  1122. data/vendor/node_modules/browserify/test/catch.js +22 -0
  1123. data/vendor/node_modules/browserify/test/circular/a.js +3 -0
  1124. data/vendor/node_modules/browserify/test/circular/b.js +1 -0
  1125. data/vendor/node_modules/browserify/test/circular/main.js +1 -0
  1126. data/vendor/node_modules/browserify/test/circular.js +34 -0
  1127. data/vendor/node_modules/browserify/test/coffee_bin/main.coffee +2 -0
  1128. data/vendor/node_modules/browserify/test/coffee_bin/x.coffee +1 -0
  1129. data/vendor/node_modules/browserify/test/coffee_bin.js +36 -0
  1130. data/vendor/node_modules/browserify/test/comment/main.js +2 -0
  1131. data/vendor/node_modules/browserify/test/comment.js +16 -0
  1132. data/vendor/node_modules/browserify/test/crypto.js +37 -0
  1133. data/vendor/node_modules/browserify/test/dnode.js +27 -0
  1134. data/vendor/node_modules/browserify/test/dollar/dollar/index.js +7 -0
  1135. data/vendor/node_modules/browserify/test/dollar.js +18 -0
  1136. data/vendor/node_modules/browserify/test/entry/main.js +1 -0
  1137. data/vendor/node_modules/browserify/test/entry/one.js +1 -0
  1138. data/vendor/node_modules/browserify/test/entry/two.js +1 -0
  1139. data/vendor/node_modules/browserify/test/entry.js +19 -0
  1140. data/vendor/node_modules/browserify/test/entry_exec/fail.js +1 -0
  1141. data/vendor/node_modules/browserify/test/entry_exec/main.js +1 -0
  1142. data/vendor/node_modules/browserify/test/entry_exec.js +15 -0
  1143. data/vendor/node_modules/browserify/test/error_code/src.js +2 -0
  1144. data/vendor/node_modules/browserify/test/error_code.js +22 -0
  1145. data/vendor/node_modules/browserify/test/export/entry.js +1 -0
  1146. data/vendor/node_modules/browserify/test/export.js +35 -0
  1147. data/vendor/node_modules/browserify/test/fake/fake_fs.js +1 -0
  1148. data/vendor/node_modules/browserify/test/fake/main.js +2 -0
  1149. data/vendor/node_modules/browserify/test/fake.js +15 -0
  1150. data/vendor/node_modules/browserify/test/field/miss.js +1 -0
  1151. data/vendor/node_modules/browserify/test/field/node_modules/z-miss/browser.js +1 -0
  1152. data/vendor/node_modules/browserify/test/field/node_modules/z-miss/main.js +1 -0
  1153. data/vendor/node_modules/browserify/test/field/node_modules/z-miss/package.json +4 -0
  1154. data/vendor/node_modules/browserify/test/field/node_modules/z-object/browser.js +1 -0
  1155. data/vendor/node_modules/browserify/test/field/node_modules/z-object/main.js +1 -0
  1156. data/vendor/node_modules/browserify/test/field/node_modules/z-object/package.json +4 -0
  1157. data/vendor/node_modules/browserify/test/field/node_modules/z-string/browser.js +1 -0
  1158. data/vendor/node_modules/browserify/test/field/node_modules/z-string/main.js +1 -0
  1159. data/vendor/node_modules/browserify/test/field/node_modules/z-string/package.json +4 -0
  1160. data/vendor/node_modules/browserify/test/field/node_modules/z-sub/browser/a.js +1 -0
  1161. data/vendor/node_modules/browserify/test/field/node_modules/z-sub/browser/b.js +1 -0
  1162. data/vendor/node_modules/browserify/test/field/node_modules/z-sub/main.js +1 -0
  1163. data/vendor/node_modules/browserify/test/field/node_modules/z-sub/package.json +4 -0
  1164. data/vendor/node_modules/browserify/test/field/object.js +1 -0
  1165. data/vendor/node_modules/browserify/test/field/string.js +1 -0
  1166. data/vendor/node_modules/browserify/test/field/sub.js +1 -0
  1167. data/vendor/node_modules/browserify/test/field.js +64 -0
  1168. data/vendor/node_modules/browserify/test/file_event.js +33 -0
  1169. data/vendor/node_modules/browserify/test/global/buffer.js +2 -0
  1170. data/vendor/node_modules/browserify/test/global/filename.js +2 -0
  1171. data/vendor/node_modules/browserify/test/global/main.js +2 -0
  1172. data/vendor/node_modules/browserify/test/global/tick.js +3 -0
  1173. data/vendor/node_modules/browserify/test/global.js +54 -0
  1174. data/vendor/node_modules/browserify/test/ignore/main.js +1 -0
  1175. data/vendor/node_modules/browserify/test/ignore/skip.js +1 -0
  1176. data/vendor/node_modules/browserify/test/ignore.js +16 -0
  1177. data/vendor/node_modules/browserify/test/json/beep.json +4 -0
  1178. data/vendor/node_modules/browserify/test/json/main.js +1 -0
  1179. data/vendor/node_modules/browserify/test/json.js +18 -0
  1180. data/vendor/node_modules/browserify/test/maxlisteners/main.js +3 -0
  1181. data/vendor/node_modules/browserify/test/maxlisteners.js +13 -0
  1182. data/vendor/node_modules/browserify/test/multi_bundle/a.js +2 -0
  1183. data/vendor/node_modules/browserify/test/multi_bundle/b.js +5 -0
  1184. data/vendor/node_modules/browserify/test/multi_bundle.js +44 -0
  1185. data/vendor/node_modules/browserify/test/multi_entry/a.js +2 -0
  1186. data/vendor/node_modules/browserify/test/multi_entry/b.js +2 -0
  1187. data/vendor/node_modules/browserify/test/multi_entry/c.js +2 -0
  1188. data/vendor/node_modules/browserify/test/multi_entry.js +25 -0
  1189. data/vendor/node_modules/browserify/test/node_modules/beep/index.js +1 -0
  1190. data/vendor/node_modules/browserify/test/process/main.js +3 -0
  1191. data/vendor/node_modules/browserify/test/process/one.js +1 -0
  1192. data/vendor/node_modules/browserify/test/process/two.js +1 -0
  1193. data/vendor/node_modules/browserify/test/process.js +20 -0
  1194. data/vendor/node_modules/browserify/test/require_cache.js +19 -0
  1195. data/vendor/node_modules/browserify/test/retarget.js +23 -0
  1196. data/vendor/node_modules/browserify/test/reverse_multi_bundle/app.js +22 -0
  1197. data/vendor/node_modules/browserify/test/reverse_multi_bundle/lazy.js +4 -0
  1198. data/vendor/node_modules/browserify/test/reverse_multi_bundle/shared.js +4 -0
  1199. data/vendor/node_modules/browserify/test/reverse_multi_bundle.js +43 -0
  1200. data/vendor/node_modules/browserify/test/shebang/foo.js +2 -0
  1201. data/vendor/node_modules/browserify/test/shebang/main.js +4 -0
  1202. data/vendor/node_modules/browserify/test/shebang.js +11 -0
  1203. data/vendor/node_modules/browserify/test/standalone/main.js +3 -0
  1204. data/vendor/node_modules/browserify/test/standalone/one.js +1 -0
  1205. data/vendor/node_modules/browserify/test/standalone/two.js +1 -0
  1206. data/vendor/node_modules/browserify/test/standalone.js +73 -0
  1207. data/vendor/node_modules/browserify/test/subdep/index.js +1 -0
  1208. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/b.js +1 -0
  1209. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/ignore_me.js +1 -0
  1210. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/a/index.js +1 -0
  1211. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/a/package.json +5 -0
  1212. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/c/index.js +1 -0
  1213. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/c/package.json +5 -0
  1214. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/f/index.js +1 -0
  1215. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/z/index.js +1 -0
  1216. data/vendor/node_modules/browserify/test/subdep/node_modules/qq/package.json +3 -0
  1217. data/vendor/node_modules/browserify/test/subdep/package.json +6 -0
  1218. data/vendor/node_modules/browserify/test/subdep.js +16 -0
  1219. data/vendor/node_modules/browserify/test/tr/f.js +1 -0
  1220. data/vendor/node_modules/browserify/test/tr/main.js +7 -0
  1221. data/vendor/node_modules/browserify/test/tr/node_modules/g/index.js +1 -0
  1222. data/vendor/node_modules/browserify/test/tr/node_modules/g/node_modules/insert-ggg/index.js +7 -0
  1223. data/vendor/node_modules/browserify/test/tr/node_modules/g/package.json +6 -0
  1224. data/vendor/node_modules/browserify/test/tr/node_modules/insert-aaa/index.js +7 -0
  1225. data/vendor/node_modules/browserify/test/tr/node_modules/insert-bbb/index.js +7 -0
  1226. data/vendor/node_modules/browserify/test/tr/node_modules/m/index.js +3 -0
  1227. data/vendor/node_modules/browserify/test/tr.js +21 -0
  1228. data/vendor/node_modules/browserify/test/util.js +62 -0
  1229. data/vendor/node_modules/wisp/History.md +152 -0
  1230. data/vendor/node_modules/wisp/LICENSE +24 -0
  1231. data/vendor/node_modules/wisp/Makefile +80 -0
  1232. data/vendor/node_modules/wisp/Readme.md +615 -0
  1233. data/vendor/node_modules/wisp/analyzer.js +385 -0
  1234. data/vendor/node_modules/wisp/ast.js +214 -0
  1235. data/vendor/node_modules/wisp/backend/javascript/writer.js +212 -0
  1236. data/vendor/node_modules/wisp/bin/wisp.js +2 -0
  1237. data/vendor/node_modules/wisp/compiler.js +1028 -0
  1238. data/vendor/node_modules/wisp/design.md +114 -0
  1239. data/vendor/node_modules/wisp/engine/browser.js +65 -0
  1240. data/vendor/node_modules/wisp/engine/node.js +20 -0
  1241. data/vendor/node_modules/wisp/index.html +405 -0
  1242. data/vendor/node_modules/wisp/interactivate/Makefile +38 -0
  1243. data/vendor/node_modules/wisp/interactivate/Readme.md +24 -0
  1244. data/vendor/node_modules/wisp/interactivate/build/cache.manifest +12 -0
  1245. data/vendor/node_modules/wisp/interactivate/build/codemirror-compressed.js +4 -0
  1246. data/vendor/node_modules/wisp/interactivate/build/codemirror.css +248 -0
  1247. data/vendor/node_modules/wisp/interactivate/build/main.js +5430 -0
  1248. data/vendor/node_modules/wisp/interactivate/build/solarized.css +207 -0
  1249. data/vendor/node_modules/wisp/interactivate/host.wisp +83 -0
  1250. data/vendor/node_modules/wisp/interactivate/index.html +392 -0
  1251. data/vendor/node_modules/wisp/interactivate/main.wisp +37 -0
  1252. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-activine/License.md +18 -0
  1253. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-activine/Readme.md +22 -0
  1254. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-activine/core.js +33 -0
  1255. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-activine/package.json +36 -0
  1256. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-hashare/License.md +18 -0
  1257. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-hashare/Readme.md +23 -0
  1258. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-hashare/core.js +31 -0
  1259. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-hashare/package.json +37 -0
  1260. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-persist/License.md +18 -0
  1261. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-persist/Readme.md +22 -0
  1262. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-persist/core.js +25 -0
  1263. data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-persist/package.json +34 -0
  1264. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/History.md +47 -0
  1265. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/License.md +18 -0
  1266. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/Readme.md +11 -0
  1267. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/Readme.md +24 -0
  1268. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/cache.manifest +12 -0
  1269. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/codemirror-compressed.js +4 -0
  1270. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/codemirror.css +248 -0
  1271. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/main.js +267 -0
  1272. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/solarized.css +207 -0
  1273. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/index.html +115 -0
  1274. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/main.js +39 -0
  1275. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/License.md +18 -0
  1276. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/Readme.md +22 -0
  1277. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/core.js +33 -0
  1278. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/package.json +36 -0
  1279. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/License.md +18 -0
  1280. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/Readme.md +23 -0
  1281. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/core.js +31 -0
  1282. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/package.json +37 -0
  1283. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/License.md +18 -0
  1284. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/Readme.md +22 -0
  1285. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/core.js +25 -0
  1286. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/package.json +34 -0
  1287. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/package.json +21 -0
  1288. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/host/window.js +19 -0
  1289. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/interactivate.js +187 -0
  1290. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/History.md +10 -0
  1291. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/License.md +18 -0
  1292. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/Readme.md +68 -0
  1293. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/diff.js +45 -0
  1294. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/index.js +5 -0
  1295. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/package.json +53 -0
  1296. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/patch.js +21 -0
  1297. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/rebase.js +33 -0
  1298. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/diff.js +62 -0
  1299. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/index.js +16 -0
  1300. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/patch.js +54 -0
  1301. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/History.md +15 -0
  1302. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/License.md +18 -0
  1303. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/Readme.md +54 -0
  1304. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/event.js +39 -0
  1305. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/index.js +3 -0
  1306. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/History.md +20 -0
  1307. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/License.md +18 -0
  1308. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/Readme.md +45 -0
  1309. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/end.js +3 -0
  1310. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/index.js +8 -0
  1311. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-error.js +9 -0
  1312. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-reduced.js +9 -0
  1313. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/package.json +57 -0
  1314. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduce.js +59 -0
  1315. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduced.js +15 -0
  1316. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reducible.js +87 -0
  1317. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/index.js +6 -0
  1318. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reduce.js +116 -0
  1319. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reducible.js +106 -0
  1320. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/package.json +56 -0
  1321. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/test/index.js +91 -0
  1322. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/History.md +60 -0
  1323. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/License.md +18 -0
  1324. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/Readme.md +125 -0
  1325. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/core.js +227 -0
  1326. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/package.json +93 -0
  1327. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/browser.js +18 -0
  1328. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/common-index.js +3 -0
  1329. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/common.js +270 -0
  1330. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/index.js +3 -0
  1331. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/phantom-index.js +3 -0
  1332. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/tap-index.js +3 -0
  1333. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/testling-index.js +3 -0
  1334. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/History.md +139 -0
  1335. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/License.md +19 -0
  1336. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/Readme.md +253 -0
  1337. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/capture.js +34 -0
  1338. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/concat.js +37 -0
  1339. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/debug/print.js +45 -0
  1340. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/delay.js +29 -0
  1341. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/drop-while.js +39 -0
  1342. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/drop.js +40 -0
  1343. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/expand.js +25 -0
  1344. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/filter.js +21 -0
  1345. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/fold.js +55 -0
  1346. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/hub.js +102 -0
  1347. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/index.js +33 -0
  1348. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/into.js +16 -0
  1349. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/map.js +19 -0
  1350. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/merge.js +50 -0
  1351. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/History.md +20 -0
  1352. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/License.md +18 -0
  1353. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/Readme.md +45 -0
  1354. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/end.js +3 -0
  1355. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/index.js +8 -0
  1356. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-error.js +9 -0
  1357. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-reduced.js +9 -0
  1358. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/package.json +57 -0
  1359. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduce.js +59 -0
  1360. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduced.js +15 -0
  1361. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reducible.js +87 -0
  1362. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/index.js +6 -0
  1363. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reduce.js +116 -0
  1364. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reducible.js +106 -0
  1365. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/package.json +60 -0
  1366. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/reducer.js +51 -0
  1367. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/reductions.js +31 -0
  1368. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/take-while.js +23 -0
  1369. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/take.js +40 -0
  1370. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/benchmark.js +32 -0
  1371. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/capture.js +108 -0
  1372. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/concat.js +104 -0
  1373. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js +29 -0
  1374. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/drop-while.js +118 -0
  1375. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/drop.js +89 -0
  1376. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/errors.js +222 -0
  1377. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/filter.js +72 -0
  1378. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/fold.js +111 -0
  1379. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/hub.js +222 -0
  1380. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/index.js +23 -0
  1381. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/into.js +22 -0
  1382. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/map.js +67 -0
  1383. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/merge.js +75 -0
  1384. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/reductions.js +105 -0
  1385. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/take-while.js +134 -0
  1386. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/take.js +82 -0
  1387. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/event.js +25 -0
  1388. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/lazy.js +9 -0
  1389. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/test.js +34 -0
  1390. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/output.js +60 -0
  1391. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/package.json +30 -0
  1392. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/render.js +23 -0
  1393. data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/view.js +79 -0
  1394. data/vendor/node_modules/wisp/interactivate/package.json +22 -0
  1395. data/vendor/node_modules/wisp/package.json +61 -0
  1396. data/vendor/node_modules/wisp/reader.js +785 -0
  1397. data/vendor/node_modules/wisp/repl.js +121 -0
  1398. data/vendor/node_modules/wisp/runtime.js +609 -0
  1399. data/vendor/node_modules/wisp/sequence.js +553 -0
  1400. data/vendor/node_modules/wisp/src/ast.wisp +160 -0
  1401. data/vendor/node_modules/wisp/src/backend/javascript/writer.wisp +161 -0
  1402. data/vendor/node_modules/wisp/src/backend/js/generator.wisp +939 -0
  1403. data/vendor/node_modules/wisp/src/compiler.wisp +1185 -0
  1404. data/vendor/node_modules/wisp/src/drafts.wisp +50 -0
  1405. data/vendor/node_modules/wisp/src/drft.wisp +329 -0
  1406. data/vendor/node_modules/wisp/src/engine/browser.wisp +73 -0
  1407. data/vendor/node_modules/wisp/src/engine/node.wisp +23 -0
  1408. data/vendor/node_modules/wisp/src/extra.wisp +36 -0
  1409. data/vendor/node_modules/wisp/src/reader.wisp +615 -0
  1410. data/vendor/node_modules/wisp/src/repl.wisp +79 -0
  1411. data/vendor/node_modules/wisp/src/runtime.wisp +511 -0
  1412. data/vendor/node_modules/wisp/src/sequence.wisp +416 -0
  1413. data/vendor/node_modules/wisp/src/string.wisp +110 -0
  1414. data/vendor/node_modules/wisp/src/type.wisp +51 -0
  1415. data/vendor/node_modules/wisp/src/wisp.wisp +57 -0
  1416. data/vendor/node_modules/wisp/string.js +96 -0
  1417. data/vendor/node_modules/wisp/support/ambiance.css +119 -0
  1418. data/vendor/node_modules/wisp/support/app.js +3669 -0
  1419. data/vendor/node_modules/wisp/support/codemirror-compressed.js +1 -0
  1420. data/vendor/node_modules/wisp/support/codemirror.css +173 -0
  1421. data/vendor/node_modules/wisp/support/embed.js +71 -0
  1422. data/vendor/node_modules/wisp/support/embed.wisp +74 -0
  1423. data/vendor/node_modules/wisp/support/require.js +35 -0
  1424. data/vendor/node_modules/wisp/test/ast.wisp +58 -0
  1425. data/vendor/node_modules/wisp/test/compiler.wisp +549 -0
  1426. data/vendor/node_modules/wisp/test/reader.wisp +228 -0
  1427. data/vendor/node_modules/wisp/test/runtime.wisp +180 -0
  1428. data/vendor/node_modules/wisp/test/sequence.wisp +338 -0
  1429. data/vendor/node_modules/wisp/test/string.wisp +44 -0
  1430. data/vendor/node_modules/wisp/test/test.wisp +8 -0
  1431. data/vendor/node_modules/wisp/wisp.js +60 -0
  1432. data/vendor/package.json +39 -0
  1433. data/vendor/reader.js +784 -0
  1434. data/vendor/repl.js +116 -0
  1435. data/vendor/runtime.js +613 -0
  1436. data/vendor/sequence.js +555 -0
  1437. data/vendor/src/ast.wisp +162 -0
  1438. data/vendor/src/backend/escodegen/writer.wisp +939 -0
  1439. data/vendor/src/backend/javascript/writer.wisp +164 -0
  1440. data/vendor/src/compiler.wisp +1191 -0
  1441. data/vendor/src/drafts/drafts.wisp +50 -0
  1442. data/vendor/src/drafts/drft.wisp +329 -0
  1443. data/vendor/src/drafts/extra.wisp +36 -0
  1444. data/vendor/src/engine/browser.wisp +67 -0
  1445. data/vendor/src/engine/node.wisp +16 -0
  1446. data/vendor/src/functional-reader.wisp +96 -0
  1447. data/vendor/src/reader.wisp +619 -0
  1448. data/vendor/src/repl.wisp +80 -0
  1449. data/vendor/src/runtime.wisp +512 -0
  1450. data/vendor/src/sequence.wisp +417 -0
  1451. data/vendor/src/string.wisp +111 -0
  1452. data/vendor/src/type.wisp +54 -0
  1453. data/vendor/src/wisp.wisp +58 -0
  1454. data/vendor/string.js +97 -0
  1455. data/vendor/test/ast.wisp +60 -0
  1456. data/vendor/test/compiler.wisp +552 -0
  1457. data/vendor/test/reader.wisp +228 -0
  1458. data/vendor/test/runtime.wisp +180 -0
  1459. data/vendor/test/sequence.wisp +337 -0
  1460. data/vendor/test/string.wisp +45 -0
  1461. data/vendor/test/test.wisp +9 -0
  1462. data/vendor/try/Makefile +27 -0
  1463. data/vendor/try/Readme.md +25 -0
  1464. data/vendor/try/build/codemirror-compressed.js +4 -0
  1465. data/vendor/try/build/codemirror.css +248 -0
  1466. data/vendor/try/build/main.js +3742 -0
  1467. data/vendor/try/build/require.js +35 -0
  1468. data/vendor/try/build/solarized.css +203 -0
  1469. data/vendor/try/index.html +399 -0
  1470. data/vendor/try/node_modules/codemirror-activine/License.md +18 -0
  1471. data/vendor/try/node_modules/codemirror-activine/Readme.md +22 -0
  1472. data/vendor/try/node_modules/codemirror-activine/core.js +33 -0
  1473. data/vendor/try/node_modules/codemirror-activine/package.json +36 -0
  1474. data/vendor/try/node_modules/codemirror-persist/License.md +18 -0
  1475. data/vendor/try/node_modules/codemirror-persist/Readme.md +22 -0
  1476. data/vendor/try/node_modules/codemirror-persist/core.js +25 -0
  1477. data/vendor/try/node_modules/codemirror-persist/package.json +34 -0
  1478. data/vendor/try/node_modules/~wisp/History.md +152 -0
  1479. data/vendor/try/node_modules/~wisp/LICENSE +24 -0
  1480. data/vendor/try/node_modules/~wisp/Makefile +80 -0
  1481. data/vendor/try/node_modules/~wisp/Readme.md +615 -0
  1482. data/vendor/try/node_modules/~wisp/analyzer.js +385 -0
  1483. data/vendor/try/node_modules/~wisp/ast.js +214 -0
  1484. data/vendor/try/node_modules/~wisp/backend/javascript/writer.js +212 -0
  1485. data/vendor/try/node_modules/~wisp/bin/wisp.js +2 -0
  1486. data/vendor/try/node_modules/~wisp/compiler.js +1028 -0
  1487. data/vendor/try/node_modules/~wisp/design.md +114 -0
  1488. data/vendor/try/node_modules/~wisp/engine/browser.js +65 -0
  1489. data/vendor/try/node_modules/~wisp/engine/node.js +20 -0
  1490. data/vendor/try/node_modules/~wisp/index.html +405 -0
  1491. data/vendor/try/node_modules/~wisp/interactivate/Makefile +38 -0
  1492. data/vendor/try/node_modules/~wisp/interactivate/Readme.md +24 -0
  1493. data/vendor/try/node_modules/~wisp/interactivate/build/cache.manifest +12 -0
  1494. data/vendor/try/node_modules/~wisp/interactivate/build/codemirror-compressed.js +4 -0
  1495. data/vendor/try/node_modules/~wisp/interactivate/build/codemirror.css +248 -0
  1496. data/vendor/try/node_modules/~wisp/interactivate/build/main.js +5430 -0
  1497. data/vendor/try/node_modules/~wisp/interactivate/build/solarized.css +207 -0
  1498. data/vendor/try/node_modules/~wisp/interactivate/host.wisp +83 -0
  1499. data/vendor/try/node_modules/~wisp/interactivate/index.html +392 -0
  1500. data/vendor/try/node_modules/~wisp/interactivate/main.wisp +37 -0
  1501. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-activine/License.md +18 -0
  1502. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-activine/Readme.md +22 -0
  1503. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-activine/core.js +33 -0
  1504. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-activine/package.json +36 -0
  1505. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-hashare/License.md +18 -0
  1506. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-hashare/Readme.md +23 -0
  1507. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-hashare/core.js +31 -0
  1508. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-hashare/package.json +37 -0
  1509. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-persist/License.md +18 -0
  1510. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-persist/Readme.md +22 -0
  1511. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-persist/core.js +25 -0
  1512. data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-persist/package.json +34 -0
  1513. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/History.md +47 -0
  1514. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/License.md +18 -0
  1515. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/Readme.md +11 -0
  1516. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/Readme.md +24 -0
  1517. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/cache.manifest +12 -0
  1518. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/codemirror-compressed.js +4 -0
  1519. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/codemirror.css +248 -0
  1520. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/main.js +267 -0
  1521. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/solarized.css +207 -0
  1522. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/index.html +115 -0
  1523. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/main.js +39 -0
  1524. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/License.md +18 -0
  1525. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/Readme.md +22 -0
  1526. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/core.js +33 -0
  1527. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/package.json +36 -0
  1528. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/License.md +18 -0
  1529. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/Readme.md +23 -0
  1530. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/core.js +31 -0
  1531. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/package.json +37 -0
  1532. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/License.md +18 -0
  1533. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/Readme.md +22 -0
  1534. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/core.js +25 -0
  1535. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/package.json +34 -0
  1536. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/package.json +21 -0
  1537. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/host/window.js +19 -0
  1538. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/interactivate.js +187 -0
  1539. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/History.md +10 -0
  1540. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/License.md +18 -0
  1541. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/Readme.md +68 -0
  1542. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/diff.js +45 -0
  1543. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/index.js +5 -0
  1544. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/package.json +53 -0
  1545. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/patch.js +21 -0
  1546. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/rebase.js +33 -0
  1547. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/diff.js +62 -0
  1548. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/index.js +16 -0
  1549. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/patch.js +54 -0
  1550. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/History.md +15 -0
  1551. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/License.md +18 -0
  1552. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/Readme.md +54 -0
  1553. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/event.js +39 -0
  1554. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/index.js +3 -0
  1555. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/History.md +20 -0
  1556. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/License.md +18 -0
  1557. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/Readme.md +45 -0
  1558. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/end.js +3 -0
  1559. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/index.js +8 -0
  1560. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-error.js +9 -0
  1561. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-reduced.js +9 -0
  1562. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/package.json +57 -0
  1563. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduce.js +59 -0
  1564. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduced.js +15 -0
  1565. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reducible.js +87 -0
  1566. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/index.js +6 -0
  1567. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reduce.js +116 -0
  1568. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reducible.js +106 -0
  1569. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/package.json +56 -0
  1570. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/test/index.js +91 -0
  1571. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/History.md +60 -0
  1572. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/License.md +18 -0
  1573. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/Readme.md +125 -0
  1574. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/core.js +227 -0
  1575. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/package.json +93 -0
  1576. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/browser.js +18 -0
  1577. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/common-index.js +3 -0
  1578. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/common.js +270 -0
  1579. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/index.js +3 -0
  1580. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/phantom-index.js +3 -0
  1581. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/tap-index.js +3 -0
  1582. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/testling-index.js +3 -0
  1583. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/History.md +139 -0
  1584. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/License.md +19 -0
  1585. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/Readme.md +253 -0
  1586. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/capture.js +34 -0
  1587. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/concat.js +37 -0
  1588. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/debug/print.js +45 -0
  1589. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/delay.js +29 -0
  1590. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/drop-while.js +39 -0
  1591. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/drop.js +40 -0
  1592. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/expand.js +25 -0
  1593. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/filter.js +21 -0
  1594. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/fold.js +55 -0
  1595. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/hub.js +102 -0
  1596. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/index.js +33 -0
  1597. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/into.js +16 -0
  1598. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/map.js +19 -0
  1599. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/merge.js +50 -0
  1600. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/History.md +20 -0
  1601. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/License.md +18 -0
  1602. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/Readme.md +45 -0
  1603. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/end.js +3 -0
  1604. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/index.js +8 -0
  1605. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-error.js +9 -0
  1606. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-reduced.js +9 -0
  1607. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/package.json +57 -0
  1608. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduce.js +59 -0
  1609. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduced.js +15 -0
  1610. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reducible.js +87 -0
  1611. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/index.js +6 -0
  1612. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reduce.js +116 -0
  1613. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reducible.js +106 -0
  1614. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/package.json +60 -0
  1615. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/reducer.js +51 -0
  1616. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/reductions.js +31 -0
  1617. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/take-while.js +23 -0
  1618. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/take.js +40 -0
  1619. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/benchmark.js +32 -0
  1620. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/capture.js +108 -0
  1621. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/concat.js +104 -0
  1622. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js +29 -0
  1623. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/drop-while.js +118 -0
  1624. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/drop.js +89 -0
  1625. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/errors.js +222 -0
  1626. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/filter.js +72 -0
  1627. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/fold.js +111 -0
  1628. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/hub.js +222 -0
  1629. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/index.js +23 -0
  1630. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/into.js +22 -0
  1631. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/map.js +67 -0
  1632. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/merge.js +75 -0
  1633. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/reductions.js +105 -0
  1634. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/take-while.js +134 -0
  1635. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/take.js +82 -0
  1636. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/event.js +25 -0
  1637. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/lazy.js +9 -0
  1638. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/test.js +34 -0
  1639. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/output.js +60 -0
  1640. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/package.json +30 -0
  1641. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/render.js +23 -0
  1642. data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/view.js +79 -0
  1643. data/vendor/try/node_modules/~wisp/interactivate/package.json +22 -0
  1644. data/vendor/try/node_modules/~wisp/package.json +57 -0
  1645. data/vendor/try/node_modules/~wisp/reader.js +785 -0
  1646. data/vendor/try/node_modules/~wisp/repl.js +121 -0
  1647. data/vendor/try/node_modules/~wisp/runtime.js +609 -0
  1648. data/vendor/try/node_modules/~wisp/sequence.js +553 -0
  1649. data/vendor/try/node_modules/~wisp/src/ast.wisp +160 -0
  1650. data/vendor/try/node_modules/~wisp/src/backend/javascript/writer.wisp +161 -0
  1651. data/vendor/try/node_modules/~wisp/src/backend/js/generator.wisp +939 -0
  1652. data/vendor/try/node_modules/~wisp/src/compiler.wisp +1185 -0
  1653. data/vendor/try/node_modules/~wisp/src/drafts.wisp +50 -0
  1654. data/vendor/try/node_modules/~wisp/src/drft.wisp +329 -0
  1655. data/vendor/try/node_modules/~wisp/src/engine/browser.wisp +73 -0
  1656. data/vendor/try/node_modules/~wisp/src/engine/node.wisp +23 -0
  1657. data/vendor/try/node_modules/~wisp/src/extra.wisp +36 -0
  1658. data/vendor/try/node_modules/~wisp/src/reader.wisp +615 -0
  1659. data/vendor/try/node_modules/~wisp/src/repl.wisp +79 -0
  1660. data/vendor/try/node_modules/~wisp/src/runtime.wisp +511 -0
  1661. data/vendor/try/node_modules/~wisp/src/sequence.wisp +416 -0
  1662. data/vendor/try/node_modules/~wisp/src/string.wisp +110 -0
  1663. data/vendor/try/node_modules/~wisp/src/type.wisp +51 -0
  1664. data/vendor/try/node_modules/~wisp/src/wisp.wisp +57 -0
  1665. data/vendor/try/node_modules/~wisp/string.js +96 -0
  1666. data/vendor/try/node_modules/~wisp/support/ambiance.css +119 -0
  1667. data/vendor/try/node_modules/~wisp/support/app.js +3669 -0
  1668. data/vendor/try/node_modules/~wisp/support/codemirror-compressed.js +1 -0
  1669. data/vendor/try/node_modules/~wisp/support/codemirror.css +173 -0
  1670. data/vendor/try/node_modules/~wisp/support/embed.js +71 -0
  1671. data/vendor/try/node_modules/~wisp/support/embed.wisp +74 -0
  1672. data/vendor/try/node_modules/~wisp/support/require.js +35 -0
  1673. data/vendor/try/node_modules/~wisp/test/ast.wisp +58 -0
  1674. data/vendor/try/node_modules/~wisp/test/compiler.wisp +549 -0
  1675. data/vendor/try/node_modules/~wisp/test/reader.wisp +228 -0
  1676. data/vendor/try/node_modules/~wisp/test/runtime.wisp +180 -0
  1677. data/vendor/try/node_modules/~wisp/test/sequence.wisp +338 -0
  1678. data/vendor/try/node_modules/~wisp/test/string.wisp +44 -0
  1679. data/vendor/try/node_modules/~wisp/test/test.wisp +8 -0
  1680. data/vendor/try/node_modules/~wisp/wisp.js +60 -0
  1681. data/vendor/try/package.json +19 -0
  1682. data/vendor/try/src/main.wisp +89 -0
  1683. data/vendor/wisp.js +55 -0
  1684. metadata +1727 -0
@@ -0,0 +1,3742 @@
1
+ ;(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(require,module,exports){
2
+ (function(){var _ns_ = "wisp.runtime";
3
+ module.namespace = _ns_;
4
+ module.description = "Core primitives required for runtime";;
5
+
6
+ var identity = function identity(x) {
7
+ return x;
8
+ };
9
+ exports.identity = identity;
10
+
11
+ var isOdd = function isOdd(n) {
12
+ return n % 2 === 1;
13
+ };
14
+ exports.isOdd = isOdd;
15
+
16
+ var isEven = function isEven(n) {
17
+ return n % 2 === 0;
18
+ };
19
+ exports.isEven = isEven;
20
+
21
+ var isDictionary = function isDictionary(form) {
22
+ return (isObject(form)) && (isObject(Object.getPrototypeOf(form))) && (isNil(Object.getPrototypeOf(Object.getPrototypeOf(form))));
23
+ };
24
+ exports.isDictionary = isDictionary;
25
+
26
+ var dictionary = function dictionary() {
27
+ return (function loop(keyValues, result) {
28
+ var recur = loop;
29
+ while (recur === loop) {
30
+ recur = keyValues.length ?
31
+ (function() {
32
+ (result || 0)[(keyValues || 0)[0]] = (keyValues || 0)[1];
33
+ return (keyValues = keyValues.slice(2), result = result, loop);
34
+ })() :
35
+ result;
36
+ };
37
+ return recur;
38
+ })(Array.prototype.slice.call(arguments), {});
39
+ };
40
+ exports.dictionary = dictionary;
41
+
42
+ var keys = function keys(dictionary) {
43
+ return Object.keys(dictionary);
44
+ };
45
+ exports.keys = keys;
46
+
47
+ var vals = function vals(dictionary) {
48
+ return keys(dictionary).map(function(key) {
49
+ return (dictionary || 0)[key];
50
+ });
51
+ };
52
+ exports.vals = vals;
53
+
54
+ var keyValues = function keyValues(dictionary) {
55
+ return keys(dictionary).map(function(key) {
56
+ return [key, (dictionary || 0)[key]];
57
+ });
58
+ };
59
+ exports.keyValues = keyValues;
60
+
61
+ var merge = function merge() {
62
+ return Object.create(Object.prototype, Array.prototype.slice.call(arguments).reduce(function(descriptor, dictionary) {
63
+ isObject(dictionary) ?
64
+ Object.keys(dictionary).forEach(function(key) {
65
+ return (descriptor || 0)[key] = Object.getOwnPropertyDescriptor(dictionary, key);
66
+ }) :
67
+ void(0);
68
+ return descriptor;
69
+ }, Object.create(Object.prototype)));
70
+ };
71
+ exports.merge = merge;
72
+
73
+ var isContainsVector = function isContainsVector(vector, element) {
74
+ return vector.indexOf(element) >= 0;
75
+ };
76
+ exports.isContainsVector = isContainsVector;
77
+
78
+ var mapDictionary = function mapDictionary(source, f) {
79
+ return Object.keys(source).reduce(function(target, key) {
80
+ (target || 0)[key] = f((source || 0)[key]);
81
+ return target;
82
+ }, {});
83
+ };
84
+ exports.mapDictionary = mapDictionary;
85
+
86
+ var toString = Object.prototype.toString;
87
+ exports.toString = toString;
88
+
89
+ var isFn = typeof(/./) === "function" ?
90
+ function isFn(x) {
91
+ return toString.call(x) === "[object Function]";
92
+ } :
93
+ function isFn(x) {
94
+ return typeof(x) === "function";
95
+ };
96
+ exports.isFn = isFn;
97
+
98
+ var isString = function isString(x) {
99
+ return (typeof(x) === "string") || (toString.call(x) === "[object String]");
100
+ };
101
+ exports.isString = isString;
102
+
103
+ var isNumber = function isNumber(x) {
104
+ return (typeof(x) === "number") || (toString.call(x) === "[object Number]");
105
+ };
106
+ exports.isNumber = isNumber;
107
+
108
+ var isVector = isFn(Array.isArray) ?
109
+ Array.isArray :
110
+ function isVector(x) {
111
+ return toString.call(x) === "[object Array]";
112
+ };
113
+ exports.isVector = isVector;
114
+
115
+ var isDate = function isDate(x) {
116
+ return toString.call(x) === "[object Date]";
117
+ };
118
+ exports.isDate = isDate;
119
+
120
+ var isBoolean = function isBoolean(x) {
121
+ return (x === true) || (x === false) || (toString.call(x) === "[object Boolean]");
122
+ };
123
+ exports.isBoolean = isBoolean;
124
+
125
+ var isRePattern = function isRePattern(x) {
126
+ return toString.call(x) === "[object RegExp]";
127
+ };
128
+ exports.isRePattern = isRePattern;
129
+
130
+ var isObject = function isObject(x) {
131
+ return x && (typeof(x) === "object");
132
+ };
133
+ exports.isObject = isObject;
134
+
135
+ var isNil = function isNil(x) {
136
+ return (x === void(0)) || (x === null);
137
+ };
138
+ exports.isNil = isNil;
139
+
140
+ var isTrue = function isTrue(x) {
141
+ return x === true;
142
+ };
143
+ exports.isTrue = isTrue;
144
+
145
+ var isFalse = function isFalse(x) {
146
+ return x === true;
147
+ };
148
+ exports.isFalse = isFalse;
149
+
150
+ var reFind = function reFind(re, s) {
151
+ var matches = re.exec(s);
152
+ return !(isNil(matches)) ?
153
+ matches.length === 1 ?
154
+ (matches || 0)[0] :
155
+ matches :
156
+ void(0);
157
+ };
158
+ exports.reFind = reFind;
159
+
160
+ var reMatches = function reMatches(pattern, source) {
161
+ var matches = pattern.exec(source);
162
+ return (!(isNil(matches))) && ((matches || 0)[0] === source) ?
163
+ matches.length === 1 ?
164
+ (matches || 0)[0] :
165
+ matches :
166
+ void(0);
167
+ };
168
+ exports.reMatches = reMatches;
169
+
170
+ var rePattern = function rePattern(s) {
171
+ var match = reFind(/^(?:\(\?([idmsux]*)\))?(.*)/, s);
172
+ return new RegExp((match || 0)[2], (match || 0)[1]);
173
+ };
174
+ exports.rePattern = rePattern;
175
+
176
+ var inc = function inc(x) {
177
+ return x + 1;
178
+ };
179
+ exports.inc = inc;
180
+
181
+ var dec = function dec(x) {
182
+ return x - 1;
183
+ };
184
+ exports.dec = dec;
185
+
186
+ var str = function str() {
187
+ return String.prototype.concat.apply("", arguments);
188
+ };
189
+ exports.str = str;
190
+
191
+ var char = function char(code) {
192
+ return String.fromCharCode(code);
193
+ };
194
+ exports.char = char;
195
+
196
+ var int = function int(x) {
197
+ return isNumber(x) ?
198
+ x >= 0 ?
199
+ Math.floor(x) :
200
+ Math.floor(x) :
201
+ x.charCodeAt(0);
202
+ };
203
+ exports.int = int;
204
+
205
+ var subs = function subs(string, start, end) {
206
+ return string.substring(start, end);
207
+ };
208
+ exports.subs = subs;
209
+
210
+ var isPatternEqual = function isPatternEqual(x, y) {
211
+ return (isRePattern(x)) && (isRePattern(y)) && (x.source === y.source) && (x.global === y.global) && (x.multiline === y.multiline) && (x.ignoreCase === y.ignoreCase);
212
+ };
213
+
214
+ var isDateEqual = function isDateEqual(x, y) {
215
+ return (isDate(x)) && (isDate(y)) && (Number(x) === Number(y));
216
+ };
217
+
218
+ var isDictionaryEqual = function isDictionaryEqual(x, y) {
219
+ return (isObject(x)) && (isObject(y)) && ((function() {
220
+ var xKeys = keys(x);
221
+ var yKeys = keys(y);
222
+ var xCount = xKeys.length;
223
+ var yCount = yKeys.length;
224
+ return (xCount === yCount) && ((function loop(index, count, keys) {
225
+ var recur = loop;
226
+ while (recur === loop) {
227
+ recur = index < count ?
228
+ isEquivalent((x || 0)[(keys || 0)[index]], (y || 0)[(keys || 0)[index]]) ?
229
+ (index = inc(index), count = count, keys = keys, loop) :
230
+ false :
231
+ true;
232
+ };
233
+ return recur;
234
+ })(0, xCount, xKeys));
235
+ })());
236
+ };
237
+
238
+ var isVectorEqual = function isVectorEqual(x, y) {
239
+ return (isVector(x)) && (isVector(y)) && (x.length === y.length) && ((function loop(xs, ys, index, count) {
240
+ var recur = loop;
241
+ while (recur === loop) {
242
+ recur = index < count ?
243
+ isEquivalent((xs || 0)[index], (ys || 0)[index]) ?
244
+ (xs = xs, ys = ys, index = inc(index), count = count, loop) :
245
+ false :
246
+ true;
247
+ };
248
+ return recur;
249
+ })(x, y, 0, x.length));
250
+ };
251
+
252
+ var isEquivalent = function isEquivalent(x, y) {
253
+ switch (arguments.length) {
254
+ case 1:
255
+ return true;
256
+ case 2:
257
+ return (x === y) || (isNil(x) ?
258
+ isNil(y) :
259
+ isNil(y) ?
260
+ isNil(x) :
261
+ isString(x) ?
262
+ false :
263
+ isNumber(x) ?
264
+ false :
265
+ isFn(x) ?
266
+ false :
267
+ isBoolean(x) ?
268
+ false :
269
+ isDate(x) ?
270
+ isDateEqual(x, y) :
271
+ isVector(x) ?
272
+ isVectorEqual(x, y, [], []) :
273
+ isRePattern(x) ?
274
+ isPatternEqual(x, y) :
275
+ "else" ?
276
+ isDictionaryEqual(x, y) :
277
+ void(0));
278
+
279
+ default:
280
+ var more = Array.prototype.slice.call(arguments, 2);
281
+ return (function loop(previous, current, index, count) {
282
+ var recur = loop;
283
+ while (recur === loop) {
284
+ recur = (isEquivalent(previous, current)) && (index < count ?
285
+ (previous = current, current = (more || 0)[index], index = inc(index), count = count, loop) :
286
+ true);
287
+ };
288
+ return recur;
289
+ })(x, y, 0, more.length);
290
+ };
291
+ return void(0);
292
+ };
293
+
294
+ var isEqual = isEquivalent;
295
+ exports.isEqual = isEqual;
296
+
297
+ var isStrictEqual = function isStrictEqual(x, y) {
298
+ switch (arguments.length) {
299
+ case 1:
300
+ return true;
301
+ case 2:
302
+ return x === y;
303
+
304
+ default:
305
+ var more = Array.prototype.slice.call(arguments, 2);
306
+ return (function loop(previous, current, index, count) {
307
+ var recur = loop;
308
+ while (recur === loop) {
309
+ recur = (previous === current) && (index < count ?
310
+ (previous = current, current = (more || 0)[index], index = inc(index), count = count, loop) :
311
+ true);
312
+ };
313
+ return recur;
314
+ })(x, y, 0, more.length);
315
+ };
316
+ return void(0);
317
+ };
318
+ exports.isStrictEqual = isStrictEqual;
319
+
320
+ var greaterThan = function greaterThan(x, y) {
321
+ switch (arguments.length) {
322
+ case 1:
323
+ return true;
324
+ case 2:
325
+ return x > y;
326
+
327
+ default:
328
+ var more = Array.prototype.slice.call(arguments, 2);
329
+ return (function loop(previous, current, index, count) {
330
+ var recur = loop;
331
+ while (recur === loop) {
332
+ recur = (previous > current) && (index < count ?
333
+ (previous = current, current = (more || 0)[index], index = inc(index), count = count, loop) :
334
+ true);
335
+ };
336
+ return recur;
337
+ })(x, y, 0, more.length);
338
+ };
339
+ return void(0);
340
+ };
341
+ exports.greaterThan = greaterThan;
342
+
343
+ var notLessThan = function notLessThan(x, y) {
344
+ switch (arguments.length) {
345
+ case 1:
346
+ return true;
347
+ case 2:
348
+ return x >= y;
349
+
350
+ default:
351
+ var more = Array.prototype.slice.call(arguments, 2);
352
+ return (function loop(previous, current, index, count) {
353
+ var recur = loop;
354
+ while (recur === loop) {
355
+ recur = (previous >= current) && (index < count ?
356
+ (previous = current, current = (more || 0)[index], index = inc(index), count = count, loop) :
357
+ true);
358
+ };
359
+ return recur;
360
+ })(x, y, 0, more.length);
361
+ };
362
+ return void(0);
363
+ };
364
+ exports.notLessThan = notLessThan;
365
+
366
+ var lessThan = function lessThan(x, y) {
367
+ switch (arguments.length) {
368
+ case 1:
369
+ return true;
370
+ case 2:
371
+ return x < y;
372
+
373
+ default:
374
+ var more = Array.prototype.slice.call(arguments, 2);
375
+ return (function loop(previous, current, index, count) {
376
+ var recur = loop;
377
+ while (recur === loop) {
378
+ recur = (previous < current) && (index < count ?
379
+ (previous = current, current = (more || 0)[index], index = inc(index), count = count, loop) :
380
+ true);
381
+ };
382
+ return recur;
383
+ })(x, y, 0, more.length);
384
+ };
385
+ return void(0);
386
+ };
387
+ exports.lessThan = lessThan;
388
+
389
+ var notGreaterThan = function notGreaterThan(x, y) {
390
+ switch (arguments.length) {
391
+ case 1:
392
+ return true;
393
+ case 2:
394
+ return x <= y;
395
+
396
+ default:
397
+ var more = Array.prototype.slice.call(arguments, 2);
398
+ return (function loop(previous, current, index, count) {
399
+ var recur = loop;
400
+ while (recur === loop) {
401
+ recur = (previous <= current) && (index < count ?
402
+ (previous = current, current = (more || 0)[index], index = inc(index), count = count, loop) :
403
+ true);
404
+ };
405
+ return recur;
406
+ })(x, y, 0, more.length);
407
+ };
408
+ return void(0);
409
+ };
410
+ exports.notGreaterThan = notGreaterThan;
411
+
412
+ var sum = function sum(a, b, c, d, e, f) {
413
+ switch (arguments.length) {
414
+ case 0:
415
+ return 0;
416
+ case 1:
417
+ return a;
418
+ case 2:
419
+ return a + b;
420
+ case 3:
421
+ return a + b + c;
422
+ case 4:
423
+ return a + b + c + d;
424
+ case 5:
425
+ return a + b + c + d + e;
426
+ case 6:
427
+ return a + b + c + d + e + f;
428
+
429
+ default:
430
+ var more = Array.prototype.slice.call(arguments, 6);
431
+ return (function loop(value, index, count) {
432
+ var recur = loop;
433
+ while (recur === loop) {
434
+ recur = index < count ?
435
+ (value = value + ((more || 0)[index]), index = inc(index), count = count, loop) :
436
+ value;
437
+ };
438
+ return recur;
439
+ })(a + b + c + d + e + f, 0, more.length);
440
+ };
441
+ return void(0);
442
+ };
443
+ exports.sum = sum;
444
+
445
+ var subtract = function subtract(a, b, c, d, e, f) {
446
+ switch (arguments.length) {
447
+ case 0:
448
+ return (function() { throw TypeError("Wrong number of args passed to: -"); })();
449
+ case 1:
450
+ return 0 - a;
451
+ case 2:
452
+ return a - b;
453
+ case 3:
454
+ return a - b - c;
455
+ case 4:
456
+ return a - b - c - d;
457
+ case 5:
458
+ return a - b - c - d - e;
459
+ case 6:
460
+ return a - b - c - d - e - f;
461
+
462
+ default:
463
+ var more = Array.prototype.slice.call(arguments, 6);
464
+ return (function loop(value, index, count) {
465
+ var recur = loop;
466
+ while (recur === loop) {
467
+ recur = index < count ?
468
+ (value = value - ((more || 0)[index]), index = inc(index), count = count, loop) :
469
+ value;
470
+ };
471
+ return recur;
472
+ })(a - b - c - d - e - f, 0, more.length);
473
+ };
474
+ return void(0);
475
+ };
476
+ exports.subtract = subtract;
477
+
478
+ var divide = function divide(a, b, c, d, e, f) {
479
+ switch (arguments.length) {
480
+ case 0:
481
+ return (function() { throw TypeError("Wrong number of args passed to: /"); })();
482
+ case 1:
483
+ return 1 / a;
484
+ case 2:
485
+ return a / b;
486
+ case 3:
487
+ return a / b / c;
488
+ case 4:
489
+ return a / b / c / d;
490
+ case 5:
491
+ return a / b / c / d / e;
492
+ case 6:
493
+ return a / b / c / d / e / f;
494
+
495
+ default:
496
+ var more = Array.prototype.slice.call(arguments, 6);
497
+ return (function loop(value, index, count) {
498
+ var recur = loop;
499
+ while (recur === loop) {
500
+ recur = index < count ?
501
+ (value = value / ((more || 0)[index]), index = inc(index), count = count, loop) :
502
+ value;
503
+ };
504
+ return recur;
505
+ })(a / b / c / d / e / f, 0, more.length);
506
+ };
507
+ return void(0);
508
+ };
509
+ exports.divide = divide;
510
+
511
+ var multiply = function multiply(a, b, c, d, e, f) {
512
+ switch (arguments.length) {
513
+ case 0:
514
+ return 1;
515
+ case 1:
516
+ return a;
517
+ case 2:
518
+ return a * b;
519
+ case 3:
520
+ return a * b * c;
521
+ case 4:
522
+ return a * b * c * d;
523
+ case 5:
524
+ return a * b * c * d * e;
525
+ case 6:
526
+ return a * b * c * d * e * f;
527
+
528
+ default:
529
+ var more = Array.prototype.slice.call(arguments, 6);
530
+ return (function loop(value, index, count) {
531
+ var recur = loop;
532
+ while (recur === loop) {
533
+ recur = index < count ?
534
+ (value = value * ((more || 0)[index]), index = inc(index), count = count, loop) :
535
+ value;
536
+ };
537
+ return recur;
538
+ })(a * b * c * d * e * f, 0, more.length);
539
+ };
540
+ return void(0);
541
+ };
542
+ exports.multiply = multiply;
543
+
544
+ var and = function and(a, b, c, d, e, f) {
545
+ switch (arguments.length) {
546
+ case 0:
547
+ return true;
548
+ case 1:
549
+ return a;
550
+ case 2:
551
+ return a && b;
552
+ case 3:
553
+ return a && b && c;
554
+ case 4:
555
+ return a && b && c && d;
556
+ case 5:
557
+ return a && b && c && d && e;
558
+ case 6:
559
+ return a && b && c && d && e && f;
560
+
561
+ default:
562
+ var more = Array.prototype.slice.call(arguments, 6);
563
+ return (function loop(value, index, count) {
564
+ var recur = loop;
565
+ while (recur === loop) {
566
+ recur = index < count ?
567
+ (value = value && ((more || 0)[index]), index = inc(index), count = count, loop) :
568
+ value;
569
+ };
570
+ return recur;
571
+ })(a && b && c && d && e && f, 0, more.length);
572
+ };
573
+ return void(0);
574
+ };
575
+ exports.and = and;
576
+
577
+ var or = function or(a, b, c, d, e, f) {
578
+ switch (arguments.length) {
579
+ case 0:
580
+ return void(0);
581
+ case 1:
582
+ return a;
583
+ case 2:
584
+ return a || b;
585
+ case 3:
586
+ return a || b || c;
587
+ case 4:
588
+ return a || b || c || d;
589
+ case 5:
590
+ return a || b || c || d || e;
591
+ case 6:
592
+ return a || b || c || d || e || f;
593
+
594
+ default:
595
+ var more = Array.prototype.slice.call(arguments, 6);
596
+ return (function loop(value, index, count) {
597
+ var recur = loop;
598
+ while (recur === loop) {
599
+ recur = index < count ?
600
+ (value = value || ((more || 0)[index]), index = inc(index), count = count, loop) :
601
+ value;
602
+ };
603
+ return recur;
604
+ })(a || b || c || d || e || f, 0, more.length);
605
+ };
606
+ return void(0);
607
+ };
608
+ exports.or = or;
609
+
610
+ var print = function print() {
611
+ var more = Array.prototype.slice.call(arguments, 0);
612
+ return console.log.apply(console.log, more);
613
+ };
614
+ exports.print = print
615
+
616
+ })()
617
+ },{}],2:[function(require,module,exports){
618
+ var _ns_ = "try-wisp.main";
619
+ module.namespace = _ns_;
620
+ var activine = require("codemirror-activine");
621
+ var persist = require("codemirror-persist");
622
+ require("wisp/engine/browser");
623
+ var rest = (require("wisp/sequence")).rest;
624
+ var cons = (require("wisp/sequence")).cons;
625
+ var vec = (require("wisp/sequence")).vec;
626
+ var str = (require("wisp/runtime")).str;
627
+ var read_ = (require("wisp/reader")).read_;
628
+ var compile_ = (require("wisp/compiler")).compile_;;
629
+
630
+ persist(CodeMirror);
631
+
632
+ var throttle = function throttle(lambda, ms) {
633
+ var id = 0;
634
+ return function throttled() {
635
+ var params = Array.prototype.slice.call(arguments, 0);
636
+ clearTimeout(id, throttled);
637
+ return id = setTimeout.apply(window, vec(cons(lambda, cons(ms, params))));
638
+ };
639
+ };
640
+ exports.throttle = throttle;
641
+
642
+ var tooglePreview = function tooglePreview() {
643
+ var output = document.getElementById("output");
644
+ var input = document.getElementById("input");
645
+ output.hidden = !(output.hidden);
646
+ return input.style.width = output.hidden ?
647
+ "100%" :
648
+ "50%";
649
+ };
650
+ exports.tooglePreview = tooglePreview;
651
+
652
+ var _errorMarker_ = (function() {
653
+ var view = document.createElement("span");
654
+ view.textContent = "●";
655
+ view.style.color = "black";
656
+ view.style.opacity = "0.5";
657
+ return view;
658
+ })();
659
+ exports._errorMarker_ = _errorMarker_;
660
+
661
+ var updatePreview = throttle(function(editor) {
662
+ var code = editor.getValue();
663
+ localStorage.buffer = code;
664
+ return (function() {
665
+ try {
666
+ editor.clearGutter("error-gutter");
667
+ return output.setValue(compile_(read_(code, "scratch.wisp")));
668
+ } catch (error) {
669
+ _errorMarker_.setAttribute("title", error.message);
670
+ return editor.setGutterMarker(error.line || 0, "error-gutter", _errorMarker_);
671
+ }})();
672
+ }, 200);
673
+ exports.updatePreview = updatePreview;
674
+
675
+ var input = CodeMirror(document.getElementById("input"), {
676
+ "lineNumbers": true,
677
+ "matchBrackets": true,
678
+ "electricChars": true,
679
+ "persist": true,
680
+ "styleActiveLine": true,
681
+ "autofocus": true,
682
+ "value": (document.getElementById("examples")).innerHTML,
683
+ "theme": "solarized dark",
684
+ "mode": "clojure",
685
+ "autoClearEmptyLines": true,
686
+ "fixedGutter": true,
687
+ "gutters": ["error-gutter"],
688
+ "extraKeys": {
689
+ "Tab": "indentSelection"
690
+ },
691
+ "onChange": updatePreview,
692
+ "onGutterClick": tooglePreview
693
+ });
694
+ exports.input = input;
695
+
696
+ input.on("change", updatePreview);
697
+
698
+ input.on("gutterClick", tooglePreview);
699
+
700
+ updatePreview(input);
701
+
702
+ var output = CodeMirror(document.getElementById("output"), {
703
+ "lineNumbers": true,
704
+ "fixedGutter": true,
705
+ "matchBrackets": true,
706
+ "mode": "javascript",
707
+ "theme": "solarized dark",
708
+ "readOnly": true
709
+ });
710
+ exports.output = output
711
+
712
+ },{"wisp/engine/browser":3,"wisp/sequence":4,"wisp/runtime":1,"wisp/reader":5,"wisp/compiler":6,"codemirror-activine":7,"codemirror-persist":8}],7:[function(require,module,exports){
713
+ "use strict";
714
+
715
+ var activeLine = "line@activine"
716
+
717
+ function onCursorActivity(editor) {
718
+ var line = editor.getLineHandle(editor.getCursor().line)
719
+ var active = editor[activeLine]
720
+ if (line != active) {
721
+ editor.removeLineClass(active, "background", "activeline")
722
+ editor[activeLine] = editor.addLineClass(line, "background", "activeline")
723
+ }
724
+ }
725
+
726
+ function setup(editor, value) {
727
+ /**
728
+ Takes editor and enables persists changes to the buffer across the sessions.
729
+ **/
730
+ if (value) {
731
+ editor[activeLine] = editor.addLineClass(0, "background", "activeline")
732
+ editor.on("cursorActivity", onCursorActivity)
733
+ onCursorActivity(editor)
734
+ } else if (activeLine in editor) {
735
+ editor.removeLineClass(editor[activeLine], "background", "activeline")
736
+ delete editor[activeLine]
737
+ editor.off("cursorActivity", onCursorActivity)
738
+ }
739
+ }
740
+
741
+ function plugin(CodeMirror) {
742
+ CodeMirror.defineOption("activeLine", false, setup)
743
+ }
744
+
745
+ module.exports = plugin
746
+
747
+ },{}],8:[function(require,module,exports){
748
+ "use strict";
749
+
750
+ function onChange(editor) {
751
+ localStorage[window.location.href.split("#")[0]] = editor.getValue()
752
+ }
753
+
754
+ function setup(editor, value) {
755
+ /**
756
+ Takes editor and enables persists changes to the buffer across the sessions.
757
+ **/
758
+ if (value) {
759
+ var address = window.location.href.split("#")[0]
760
+ var persisted = localStorage[address] || editor.getValue()
761
+ editor.setValue(persisted)
762
+ editor.on("change", onChange)
763
+ } else {
764
+ editor.off("change", onChange)
765
+ }
766
+ }
767
+
768
+ function plugin(CodeMirror) {
769
+ CodeMirror.defineOption("persist", false, setup)
770
+ }
771
+
772
+ module.exports = plugin
773
+
774
+ },{}],4:[function(require,module,exports){
775
+ var _ns_ = "wisp.sequence";
776
+ module.namespace = _ns_;
777
+ var isNil = (require("./runtime")).isNil;
778
+ var isVector = (require("./runtime")).isVector;
779
+ var isFn = (require("./runtime")).isFn;
780
+ var isNumber = (require("./runtime")).isNumber;
781
+ var isString = (require("./runtime")).isString;
782
+ var isDictionary = (require("./runtime")).isDictionary;
783
+ var keyValues = (require("./runtime")).keyValues;
784
+ var str = (require("./runtime")).str;
785
+ var dec = (require("./runtime")).dec;
786
+ var inc = (require("./runtime")).inc;
787
+ var merge = (require("./runtime")).merge;;
788
+
789
+ var List = function List(head, tail) {
790
+ this.head = head;
791
+ this.tail = tail || (list());
792
+ this.length = inc(count(this.tail));
793
+ return this;
794
+ };
795
+
796
+ List.prototype.length = 0;
797
+
798
+ List.type = "wisp.list";
799
+
800
+ List.prototype.type = List.type;
801
+
802
+ List.prototype.tail = Object.create(List.prototype);
803
+
804
+ List.prototype.toString = function() {
805
+ return (function loop(result, list) {
806
+ var recur = loop;
807
+ while (recur === loop) {
808
+ recur = isEmpty(list) ?
809
+ "" + "(" + (result.substr(1)) + ")" :
810
+ (result = "" + result + " " + (isVector(first(list)) ?
811
+ "" + "[" + (first(list).join(" ")) + "]" :
812
+ isNil(first(list)) ?
813
+ "nil" :
814
+ isString(first(list)) ?
815
+ JSON.stringify(first(list)) :
816
+ isNumber(first(list)) ?
817
+ JSON.stringify(first(list)) :
818
+ first(list)), list = rest(list), loop);
819
+ };
820
+ return recur;
821
+ })("", this);
822
+ };
823
+
824
+ var lazySeqValue = function lazySeqValue(lazySeq) {
825
+ return !(lazySeq.realized) ?
826
+ (lazySeq.realized = true) && (lazySeq.x = lazySeq.x()) :
827
+ lazySeq.x;
828
+ };
829
+
830
+ var LazySeq = function LazySeq(realized, x) {
831
+ this.realized = realized || false;
832
+ this.x = x;
833
+ return this;
834
+ };
835
+
836
+ LazySeq.type = "wisp.lazy.seq";
837
+
838
+ LazySeq.prototype.type = LazySeq.type;
839
+
840
+ var lazySeq = function lazySeq(realized, body) {
841
+ return new LazySeq(realized, body);
842
+ };
843
+ exports.lazySeq = lazySeq;
844
+
845
+ var isLazySeq = function isLazySeq(value) {
846
+ return value && (LazySeq.type === value.type);
847
+ };
848
+ exports.isLazySeq = isLazySeq;
849
+
850
+ undefined;
851
+
852
+ var isList = function isList(value) {
853
+ return value && (List.type === value.type);
854
+ };
855
+ exports.isList = isList;
856
+
857
+ var list = function list() {
858
+ return arguments.length === 0 ?
859
+ Object.create(List.prototype) :
860
+ Array.prototype.slice.call(arguments).reduceRight(function(tail, head) {
861
+ return cons(head, tail);
862
+ }, list());
863
+ };
864
+ exports.list = list;
865
+
866
+ var cons = function cons(head, tail) {
867
+ return new List(head, tail);
868
+ };
869
+ exports.cons = cons;
870
+
871
+ var reverseList = function reverseList(sequence) {
872
+ return (function loop(items, source) {
873
+ var recur = loop;
874
+ while (recur === loop) {
875
+ recur = isEmpty(source) ?
876
+ list.apply(list, items) :
877
+ (items = [first(source)].concat(items), source = rest(source), loop);
878
+ };
879
+ return recur;
880
+ })([], sequence);
881
+ };
882
+
883
+ var isSequential = function isSequential(x) {
884
+ return (isList(x)) || (isVector(x)) || (isLazySeq(x)) || (isDictionary(x)) || (isString(x));
885
+ };
886
+ exports.isSequential = isSequential;
887
+
888
+ var reverse = function reverse(sequence) {
889
+ return isList(sequence) ?
890
+ reverseList(sequence) :
891
+ isVector(sequence) ?
892
+ sequence.reverse() :
893
+ isNil(sequence) ?
894
+ list() :
895
+ "else" ?
896
+ reverse(seq(sequence)) :
897
+ void(0);
898
+ };
899
+ exports.reverse = reverse;
900
+
901
+ var map = function map(f, sequence) {
902
+ return isVector(sequence) ?
903
+ sequence.map(f) :
904
+ isList(sequence) ?
905
+ mapList(f, sequence) :
906
+ isNil(sequence) ?
907
+ list() :
908
+ "else" ?
909
+ map(f, seq(sequence)) :
910
+ void(0);
911
+ };
912
+ exports.map = map;
913
+
914
+ var mapList = function mapList(f, sequence) {
915
+ return (function loop(result, items) {
916
+ var recur = loop;
917
+ while (recur === loop) {
918
+ recur = isEmpty(items) ?
919
+ reverse(result) :
920
+ (result = cons(f(first(items)), result), items = rest(items), loop);
921
+ };
922
+ return recur;
923
+ })(list(), sequence);
924
+ };
925
+
926
+ var filter = function filter(isF, sequence) {
927
+ return isVector(sequence) ?
928
+ sequence.filter(isF) :
929
+ isList(sequence) ?
930
+ filterList(isF, sequence) :
931
+ isNil(sequence) ?
932
+ list() :
933
+ "else" ?
934
+ filter(isF, seq(sequence)) :
935
+ void(0);
936
+ };
937
+ exports.filter = filter;
938
+
939
+ var filterList = function filterList(isF, sequence) {
940
+ return (function loop(result, items) {
941
+ var recur = loop;
942
+ while (recur === loop) {
943
+ recur = isEmpty(items) ?
944
+ reverse(result) :
945
+ (result = isF(first(items)) ?
946
+ cons(first(items), result) :
947
+ result, items = rest(items), loop);
948
+ };
949
+ return recur;
950
+ })(list(), sequence);
951
+ };
952
+
953
+ var reduce = function reduce(f) {
954
+ var params = Array.prototype.slice.call(arguments, 1);
955
+ return (function() {
956
+ var hasInitial = count(params) >= 2;
957
+ var initial = hasInitial ?
958
+ first(params) :
959
+ void(0);
960
+ var sequence = hasInitial ?
961
+ second(params) :
962
+ first(params);
963
+ return isNil(sequence) ?
964
+ initial :
965
+ isVector(sequence) ?
966
+ hasInitial ?
967
+ sequence.reduce(f, initial) :
968
+ sequence.reduce(f) :
969
+ isList(sequence) ?
970
+ hasInitial ?
971
+ reduceList(f, initial, sequence) :
972
+ reduceList(f, first(sequence), rest(sequence)) :
973
+ "else" ?
974
+ reduce(f, initial, seq(sequence)) :
975
+ void(0);
976
+ })();
977
+ };
978
+ exports.reduce = reduce;
979
+
980
+ var reduceList = function reduceList(f, initial, sequence) {
981
+ return (function loop(result, items) {
982
+ var recur = loop;
983
+ while (recur === loop) {
984
+ recur = isEmpty(items) ?
985
+ result :
986
+ (result = f(result, first(items)), items = rest(items), loop);
987
+ };
988
+ return recur;
989
+ })(initial, sequence);
990
+ };
991
+
992
+ var count = function count(sequence) {
993
+ return isNil(sequence) ?
994
+ 0 :
995
+ (seq(sequence)).length;
996
+ };
997
+ exports.count = count;
998
+
999
+ var isEmpty = function isEmpty(sequence) {
1000
+ return count(sequence) === 0;
1001
+ };
1002
+ exports.isEmpty = isEmpty;
1003
+
1004
+ var first = function first(sequence) {
1005
+ return isNil(sequence) ?
1006
+ void(0) :
1007
+ isList(sequence) ?
1008
+ sequence.head :
1009
+ (isVector(sequence)) || (isString(sequence)) ?
1010
+ (sequence || 0)[0] :
1011
+ isLazySeq(sequence) ?
1012
+ first(lazySeqValue(sequence)) :
1013
+ "else" ?
1014
+ first(seq(sequence)) :
1015
+ void(0);
1016
+ };
1017
+ exports.first = first;
1018
+
1019
+ var second = function second(sequence) {
1020
+ return isNil(sequence) ?
1021
+ void(0) :
1022
+ isList(sequence) ?
1023
+ first(rest(sequence)) :
1024
+ (isVector(sequence)) || (isString(sequence)) ?
1025
+ (sequence || 0)[1] :
1026
+ isLazySeq(sequence) ?
1027
+ second(lazySeqValue(sequence)) :
1028
+ "else" ?
1029
+ first(rest(seq(sequence))) :
1030
+ void(0);
1031
+ };
1032
+ exports.second = second;
1033
+
1034
+ var third = function third(sequence) {
1035
+ return isNil(sequence) ?
1036
+ void(0) :
1037
+ isList(sequence) ?
1038
+ first(rest(rest(sequence))) :
1039
+ (isVector(sequence)) || (isString(sequence)) ?
1040
+ (sequence || 0)[2] :
1041
+ isLazySeq(sequence) ?
1042
+ third(lazySeqValue(sequence)) :
1043
+ "else" ?
1044
+ second(rest(seq(sequence))) :
1045
+ void(0);
1046
+ };
1047
+ exports.third = third;
1048
+
1049
+ var rest = function rest(sequence) {
1050
+ return isNil(sequence) ?
1051
+ list() :
1052
+ isList(sequence) ?
1053
+ sequence.tail :
1054
+ (isVector(sequence)) || (isString(sequence)) ?
1055
+ sequence.slice(1) :
1056
+ isLazySeq(sequence) ?
1057
+ rest(lazySeqValue(sequence)) :
1058
+ "else" ?
1059
+ rest(seq(sequence)) :
1060
+ void(0);
1061
+ };
1062
+ exports.rest = rest;
1063
+
1064
+ var lastOfList = function lastOfList(list) {
1065
+ return (function loop(item, items) {
1066
+ var recur = loop;
1067
+ while (recur === loop) {
1068
+ recur = isEmpty(items) ?
1069
+ item :
1070
+ (item = first(items), items = rest(items), loop);
1071
+ };
1072
+ return recur;
1073
+ })(first(list), rest(list));
1074
+ };
1075
+
1076
+ var last = function last(sequence) {
1077
+ return (isVector(sequence)) || (isString(sequence)) ?
1078
+ (sequence || 0)[dec(count(sequence))] :
1079
+ isList(sequence) ?
1080
+ lastOfList(sequence) :
1081
+ isNil(sequence) ?
1082
+ void(0) :
1083
+ isLazySeq(sequence) ?
1084
+ last(lazySeqValue(sequence)) :
1085
+ "else" ?
1086
+ last(seq(sequence)) :
1087
+ void(0);
1088
+ };
1089
+ exports.last = last;
1090
+
1091
+ var butlast = function butlast(sequence) {
1092
+ var items = isNil(sequence) ?
1093
+ void(0) :
1094
+ isString(sequence) ?
1095
+ subs(sequence, 0, dec(count(sequence))) :
1096
+ isVector(sequence) ?
1097
+ sequence.slice(0, dec(count(sequence))) :
1098
+ isList(sequence) ?
1099
+ list.apply(list, butlast(vec(sequence))) :
1100
+ isLazySeq(sequence) ?
1101
+ butlast(lazySeqValue(sequence)) :
1102
+ "else" ?
1103
+ butlast(seq(sequence)) :
1104
+ void(0);
1105
+ return !((isNil(items)) || (isEmpty(items))) ?
1106
+ items :
1107
+ void(0);
1108
+ };
1109
+ exports.butlast = butlast;
1110
+
1111
+ var take = function take(n, sequence) {
1112
+ return isNil(sequence) ?
1113
+ list() :
1114
+ isVector(sequence) ?
1115
+ takeFromVector(n, sequence) :
1116
+ isList(sequence) ?
1117
+ takeFromList(n, sequence) :
1118
+ isLazySeq(sequence) ?
1119
+ take(n, lazySeqValue(sequence)) :
1120
+ "else" ?
1121
+ take(n, seq(sequence)) :
1122
+ void(0);
1123
+ };
1124
+ exports.take = take;
1125
+
1126
+ var takeVectorWhile = function takeVectorWhile(predicate, vector) {
1127
+ return (function loop(result, tail, head) {
1128
+ var recur = loop;
1129
+ while (recur === loop) {
1130
+ recur = (!(isEmpty(tail))) && (predicate(head)) ?
1131
+ (result = conj(result, head), tail = rest(tail), head = first(tail), loop) :
1132
+ result;
1133
+ };
1134
+ return recur;
1135
+ })([], vector, first(vector));
1136
+ };
1137
+
1138
+ var takeListWhile = function takeListWhile(predicate, items) {
1139
+ return (function loop(result, tail, head) {
1140
+ var recur = loop;
1141
+ while (recur === loop) {
1142
+ recur = (!(isEmpty(tail))) && (isPredicate(head)) ?
1143
+ (result = conj(result, head), tail = rest(tail), head = first(tail), loop) :
1144
+ list.apply(list, result);
1145
+ };
1146
+ return recur;
1147
+ })([], items, first(items));
1148
+ };
1149
+
1150
+ var takeWhile = function takeWhile(predicate, sequence) {
1151
+ return isNil(sequence) ?
1152
+ list() :
1153
+ isVector(sequence) ?
1154
+ takeVectorWhile(predicate, sequence) :
1155
+ isList(sequence) ?
1156
+ takeVectorWhile(predicate, sequence) :
1157
+ "else" ?
1158
+ takeWhile(predicate, lazySeqValue(sequence)) :
1159
+ void(0);
1160
+ };
1161
+ exports.takeWhile = takeWhile;
1162
+
1163
+ var takeFromVector = function takeFromVector(n, vector) {
1164
+ return vector.slice(0, n);
1165
+ };
1166
+
1167
+ var takeFromList = function takeFromList(n, sequence) {
1168
+ return (function loop(taken, items, n) {
1169
+ var recur = loop;
1170
+ while (recur === loop) {
1171
+ recur = (n === 0) || (isEmpty(items)) ?
1172
+ reverse(taken) :
1173
+ (taken = cons(first(items), taken), items = rest(items), n = dec(n), loop);
1174
+ };
1175
+ return recur;
1176
+ })(list(), sequence, n);
1177
+ };
1178
+
1179
+ var dropFromList = function dropFromList(n, sequence) {
1180
+ return (function loop(left, items) {
1181
+ var recur = loop;
1182
+ while (recur === loop) {
1183
+ recur = (left < 1) || (isEmpty(items)) ?
1184
+ items :
1185
+ (left = dec(left), items = rest(items), loop);
1186
+ };
1187
+ return recur;
1188
+ })(n, sequence);
1189
+ };
1190
+
1191
+ var drop = function drop(n, sequence) {
1192
+ return n <= 0 ?
1193
+ sequence :
1194
+ isString(sequence) ?
1195
+ sequence.substr(n) :
1196
+ isVector(sequence) ?
1197
+ sequence.slice(n) :
1198
+ isList(sequence) ?
1199
+ dropFromList(n, sequence) :
1200
+ isNil(sequence) ?
1201
+ list() :
1202
+ isLazySeq(sequence) ?
1203
+ drop(n, lazySeqValue(sequence)) :
1204
+ "else" ?
1205
+ drop(n, seq(sequence)) :
1206
+ void(0);
1207
+ };
1208
+ exports.drop = drop;
1209
+
1210
+ var conjList = function conjList(sequence, items) {
1211
+ return reduce(function(result, item) {
1212
+ return cons(item, result);
1213
+ }, sequence, items);
1214
+ };
1215
+
1216
+ var conj = function conj(sequence) {
1217
+ var items = Array.prototype.slice.call(arguments, 1);
1218
+ return isVector(sequence) ?
1219
+ sequence.concat(items) :
1220
+ isString(sequence) ?
1221
+ "" + sequence + (str.apply(str, items)) :
1222
+ isNil(sequence) ?
1223
+ list.apply(list, reverse(items)) :
1224
+ (isList(sequence)) || (isLazySeq()) ?
1225
+ conjList(sequence, items) :
1226
+ isDictionary(sequence) ?
1227
+ merge(sequence, merge.apply(merge, items)) :
1228
+ "else" ?
1229
+ (function() { throw TypeError("" + "Type can't be conjoined " + sequence); })() :
1230
+ void(0);
1231
+ };
1232
+ exports.conj = conj;
1233
+
1234
+ var concat = function concat() {
1235
+ var sequences = Array.prototype.slice.call(arguments, 0);
1236
+ return reverse(reduce(function(result, sequence) {
1237
+ return reduce(function(result, item) {
1238
+ return cons(item, result);
1239
+ }, result, seq(sequence));
1240
+ }, list(), sequences));
1241
+ };
1242
+ exports.concat = concat;
1243
+
1244
+ var seq = function seq(sequence) {
1245
+ return isNil(sequence) ?
1246
+ void(0) :
1247
+ (isVector(sequence)) || (isList(sequence)) || (isLazySeq(sequence)) ?
1248
+ sequence :
1249
+ isString(sequence) ?
1250
+ Array.prototype.slice.call(sequence) :
1251
+ isDictionary(sequence) ?
1252
+ keyValues(sequence) :
1253
+ "default" ?
1254
+ (function() { throw TypeError("" + "Can not seq " + sequence); })() :
1255
+ void(0);
1256
+ };
1257
+ exports.seq = seq;
1258
+
1259
+ var isSeq = function isSeq(sequence) {
1260
+ return (isList(sequence)) || (isLazySeq(sequence));
1261
+ };
1262
+ exports.isSeq = isSeq;
1263
+
1264
+ var listToVector = function listToVector(source) {
1265
+ return (function loop(result, list) {
1266
+ var recur = loop;
1267
+ while (recur === loop) {
1268
+ recur = isEmpty(list) ?
1269
+ result :
1270
+ (result = (function() {
1271
+ result.push(first(list));
1272
+ return result;
1273
+ })(), list = rest(list), loop);
1274
+ };
1275
+ return recur;
1276
+ })([], source);
1277
+ };
1278
+
1279
+ var vec = function vec(sequence) {
1280
+ return isNil(sequence) ?
1281
+ [] :
1282
+ isVector(sequence) ?
1283
+ sequence :
1284
+ isList(sequence) ?
1285
+ listToVector(sequence) :
1286
+ "else" ?
1287
+ vec(seq(sequence)) :
1288
+ void(0);
1289
+ };
1290
+ exports.vec = vec;
1291
+
1292
+ var sort = function sort(f, items) {
1293
+ var hasComparator = isFn(f);
1294
+ var items = (!(hasComparator)) && (isNil(items)) ?
1295
+ f :
1296
+ items;
1297
+ var compare = hasComparator ?
1298
+ function(a, b) {
1299
+ return f(a, b) ?
1300
+ 0 :
1301
+ 1;
1302
+ } :
1303
+ void(0);
1304
+ return isNil(items) ?
1305
+ list() :
1306
+ isVector(items) ?
1307
+ items.sort(compare) :
1308
+ isList(items) ?
1309
+ list.apply(list, vec(items).sort(compare)) :
1310
+ isDictionary(items) ?
1311
+ seq(items).sort(compare) :
1312
+ "else" ?
1313
+ sort(f, seq(items)) :
1314
+ void(0);
1315
+ };
1316
+ exports.sort = sort;
1317
+
1318
+ var repeat = function repeat(n, x) {
1319
+ return (function loop(n, result) {
1320
+ var recur = loop;
1321
+ while (recur === loop) {
1322
+ recur = n <= 0 ?
1323
+ result :
1324
+ (n = dec(n), result = conj(result, x), loop);
1325
+ };
1326
+ return recur;
1327
+ })(n, []);
1328
+ };
1329
+ exports.repeat = repeat
1330
+
1331
+ },{"./runtime":1}],5:[function(require,module,exports){
1332
+ var _ns_ = "wisp.reader";
1333
+ module.namespace = _ns_;
1334
+ module.description = "Reader module provides functions for reading text input\n as wisp data structures";
1335
+ var list = (require("./sequence")).list;
1336
+ var isList = (require("./sequence")).isList;
1337
+ var count = (require("./sequence")).count;
1338
+ var isEmpty = (require("./sequence")).isEmpty;
1339
+ var first = (require("./sequence")).first;
1340
+ var second = (require("./sequence")).second;
1341
+ var third = (require("./sequence")).third;
1342
+ var rest = (require("./sequence")).rest;
1343
+ var map = (require("./sequence")).map;
1344
+ var vec = (require("./sequence")).vec;
1345
+ var cons = (require("./sequence")).cons;
1346
+ var conj = (require("./sequence")).conj;
1347
+ var rest = (require("./sequence")).rest;
1348
+ var concat = (require("./sequence")).concat;
1349
+ var last = (require("./sequence")).last;
1350
+ var butlast = (require("./sequence")).butlast;
1351
+ var sort = (require("./sequence")).sort;
1352
+ var lazySeq = (require("./sequence")).lazySeq;
1353
+ var isOdd = (require("./runtime")).isOdd;
1354
+ var dictionary = (require("./runtime")).dictionary;
1355
+ var keys = (require("./runtime")).keys;
1356
+ var isNil = (require("./runtime")).isNil;
1357
+ var inc = (require("./runtime")).inc;
1358
+ var dec = (require("./runtime")).dec;
1359
+ var isVector = (require("./runtime")).isVector;
1360
+ var isString = (require("./runtime")).isString;
1361
+ var isNumber = (require("./runtime")).isNumber;
1362
+ var isBoolean = (require("./runtime")).isBoolean;
1363
+ var isObject = (require("./runtime")).isObject;
1364
+ var isDictionary = (require("./runtime")).isDictionary;
1365
+ var rePattern = (require("./runtime")).rePattern;
1366
+ var reMatches = (require("./runtime")).reMatches;
1367
+ var reFind = (require("./runtime")).reFind;
1368
+ var str = (require("./runtime")).str;
1369
+ var subs = (require("./runtime")).subs;
1370
+ var char = (require("./runtime")).char;
1371
+ var vals = (require("./runtime")).vals;
1372
+ var isEqual = (require("./runtime")).isEqual;
1373
+ var isSymbol = (require("./ast")).isSymbol;
1374
+ var symbol = (require("./ast")).symbol;
1375
+ var isKeyword = (require("./ast")).isKeyword;
1376
+ var keyword = (require("./ast")).keyword;
1377
+ var meta = (require("./ast")).meta;
1378
+ var withMeta = (require("./ast")).withMeta;
1379
+ var name = (require("./ast")).name;
1380
+ var gensym = (require("./ast")).gensym;
1381
+ var split = (require("./string")).split;
1382
+ var join = (require("./string")).join;;
1383
+
1384
+ var pushBackReader = function pushBackReader(source, uri) {
1385
+ return {
1386
+ "lines": split(source, "\n"),
1387
+ "buffer": "",
1388
+ "uri": uri,
1389
+ "column": -1,
1390
+ "line": 0
1391
+ };
1392
+ };
1393
+ exports.pushBackReader = pushBackReader;
1394
+
1395
+ var peekChar = function peekChar(reader) {
1396
+ var line = ((reader || 0)["lines"])[(reader || 0)["line"]];
1397
+ var column = inc((reader || 0)["column"]);
1398
+ return isNil(line) ?
1399
+ void(0) :
1400
+ (line[column]) || "\n";
1401
+ };
1402
+ exports.peekChar = peekChar;
1403
+
1404
+ var readChar = function readChar(reader) {
1405
+ var ch = peekChar(reader);
1406
+ isNewline(peekChar(reader)) ?
1407
+ (function() {
1408
+ (reader || 0)["line"] = inc((reader || 0)["line"]);
1409
+ return (reader || 0)["column"] = -1;
1410
+ })() :
1411
+ (reader || 0)["column"] = inc((reader || 0)["column"]);
1412
+ return ch;
1413
+ };
1414
+ exports.readChar = readChar;
1415
+
1416
+ var isNewline = function isNewline(ch) {
1417
+ return "\n" === ch;
1418
+ };
1419
+ exports.isNewline = isNewline;
1420
+
1421
+ var isBreakingWhitespace = function isBreakingWhitespace(ch) {
1422
+ return (ch === " ") || (ch === "\t") || (ch === "\n") || (ch === "\r");
1423
+ };
1424
+ exports.isBreakingWhitespace = isBreakingWhitespace;
1425
+
1426
+ var isWhitespace = function isWhitespace(ch) {
1427
+ return (isBreakingWhitespace(ch)) || ("," === ch);
1428
+ };
1429
+ exports.isWhitespace = isWhitespace;
1430
+
1431
+ var isNumeric = function isNumeric(ch) {
1432
+ return (ch === "0") || (ch === "1") || (ch === "2") || (ch === "3") || (ch === "4") || (ch === "5") || (ch === "6") || (ch === "7") || (ch === "8") || (ch === "9");
1433
+ };
1434
+ exports.isNumeric = isNumeric;
1435
+
1436
+ var isCommentPrefix = function isCommentPrefix(ch) {
1437
+ return ";" === ch;
1438
+ };
1439
+ exports.isCommentPrefix = isCommentPrefix;
1440
+
1441
+ var isNumberLiteral = function isNumberLiteral(reader, initch) {
1442
+ return (isNumeric(initch)) || ((("+" === initch) || ("-" === initch)) && (isNumeric(peekChar(reader))));
1443
+ };
1444
+ exports.isNumberLiteral = isNumberLiteral;
1445
+
1446
+ var readerError = function readerError(reader, message) {
1447
+ var text = "" + message + "\n" + "line:" + ((reader || 0)["line"]) + "\n" + "column:" + ((reader || 0)["column"]);
1448
+ var error = SyntaxError(text, (reader || 0)["uri"]);
1449
+ error.line = (reader || 0)["line"];
1450
+ error.column = (reader || 0)["column"];
1451
+ error.uri = (reader || 0)["uri"];
1452
+ return (function() { throw error; })();
1453
+ };
1454
+ exports.readerError = readerError;
1455
+
1456
+ var isMacroTerminating = function isMacroTerminating(ch) {
1457
+ return (!(ch === "#")) && (!(ch === "'")) && (!(ch === ":")) && (macros(ch));
1458
+ };
1459
+ exports.isMacroTerminating = isMacroTerminating;
1460
+
1461
+ var readToken = function readToken(reader, initch) {
1462
+ return (function loop(buffer, ch) {
1463
+ var recur = loop;
1464
+ while (recur === loop) {
1465
+ recur = (isNil(ch)) || (isWhitespace(ch)) || (isMacroTerminating(ch)) ?
1466
+ buffer :
1467
+ (buffer = "" + buffer + (readChar(reader)), ch = peekChar(reader), loop);
1468
+ };
1469
+ return recur;
1470
+ })(initch, peekChar(reader));
1471
+ };
1472
+ exports.readToken = readToken;
1473
+
1474
+ var skipLine = function skipLine(reader, _) {
1475
+ return (function loop() {
1476
+ var recur = loop;
1477
+ while (recur === loop) {
1478
+ recur = (function() {
1479
+ var ch = readChar(reader);
1480
+ return (ch === "\n") || (ch === "\r") || (isNil(ch)) ?
1481
+ reader :
1482
+ (loop);
1483
+ })();
1484
+ };
1485
+ return recur;
1486
+ })();
1487
+ };
1488
+ exports.skipLine = skipLine;
1489
+
1490
+ var intPattern = rePattern("^([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?$");
1491
+ exports.intPattern = intPattern;
1492
+
1493
+ var ratioPattern = rePattern("([-+]?[0-9]+)/([0-9]+)");
1494
+ exports.ratioPattern = ratioPattern;
1495
+
1496
+ var floatPattern = rePattern("([-+]?[0-9]+(\\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?");
1497
+ exports.floatPattern = floatPattern;
1498
+
1499
+ var matchInt = function matchInt(s) {
1500
+ var groups = reFind(intPattern, s);
1501
+ var group3 = groups[2];
1502
+ return !((isNil(group3)) || (count(group3) < 1)) ?
1503
+ 0 :
1504
+ (function() {
1505
+ var negate = "-" === groups[1] ?
1506
+ -1 :
1507
+ 1;
1508
+ var a = groups[3] ?
1509
+ [groups[3], 10] :
1510
+ groups[4] ?
1511
+ [groups[4], 16] :
1512
+ groups[5] ?
1513
+ [groups[5], 8] :
1514
+ groups[7] ?
1515
+ [groups[7], parseInt(groups[7])] :
1516
+ "else" ?
1517
+ [void(0), void(0)] :
1518
+ void(0);
1519
+ var n = a[0];
1520
+ var radix = a[1];
1521
+ return isNil(n) ?
1522
+ void(0) :
1523
+ negate * (parseInt(n, radix));
1524
+ })();
1525
+ };
1526
+ exports.matchInt = matchInt;
1527
+
1528
+ var matchRatio = function matchRatio(s) {
1529
+ var groups = reFind(ratioPattern, s);
1530
+ var numinator = groups[1];
1531
+ var denominator = groups[2];
1532
+ return (parseInt(numinator)) / (parseInt(denominator));
1533
+ };
1534
+ exports.matchRatio = matchRatio;
1535
+
1536
+ var matchFloat = function matchFloat(s) {
1537
+ return parseFloat(s);
1538
+ };
1539
+ exports.matchFloat = matchFloat;
1540
+
1541
+ var matchNumber = function matchNumber(s) {
1542
+ return reMatches(intPattern, s) ?
1543
+ matchInt(s) :
1544
+ reMatches(ratioPattern, s) ?
1545
+ matchRatio(s) :
1546
+ reMatches(floatPattern, s) ?
1547
+ matchFloat(s) :
1548
+ void(0);
1549
+ };
1550
+ exports.matchNumber = matchNumber;
1551
+
1552
+ var escapeCharMap = function escapeCharMap(c) {
1553
+ return c === "t" ?
1554
+ "\t" :
1555
+ c === "r" ?
1556
+ "\r" :
1557
+ c === "n" ?
1558
+ "\n" :
1559
+ c === "\\" ?
1560
+ "\\" :
1561
+ c === "\"" ?
1562
+ "\"" :
1563
+ c === "b" ?
1564
+ "" :
1565
+ c === "f" ?
1566
+ " " :
1567
+ "else" ?
1568
+ void(0) :
1569
+ void(0);
1570
+ };
1571
+ exports.escapeCharMap = escapeCharMap;
1572
+
1573
+ var read2Chars = function read2Chars(reader) {
1574
+ return "" + (readChar(reader)) + (readChar(reader));
1575
+ };
1576
+ exports.read2Chars = read2Chars;
1577
+
1578
+ var read4Chars = function read4Chars(reader) {
1579
+ return "" + (readChar(reader)) + (readChar(reader)) + (readChar(reader)) + (readChar(reader));
1580
+ };
1581
+ exports.read4Chars = read4Chars;
1582
+
1583
+ var unicode2Pattern = rePattern("[0-9A-Fa-f]{2}");
1584
+ exports.unicode2Pattern = unicode2Pattern;
1585
+
1586
+ var unicode4Pattern = rePattern("[0-9A-Fa-f]{4}");
1587
+ exports.unicode4Pattern = unicode4Pattern;
1588
+
1589
+ var validateUnicodeEscape = function validateUnicodeEscape(unicodePattern, reader, escapeChar, unicodeStr) {
1590
+ return reMatches(unicodePattern, unicodeStr) ?
1591
+ unicodeStr :
1592
+ readerError(reader, "" + "Unexpected unicode escape " + "\\" + escapeChar + unicodeStr);
1593
+ };
1594
+ exports.validateUnicodeEscape = validateUnicodeEscape;
1595
+
1596
+ var makeUnicodeChar = function makeUnicodeChar(codeStr, base) {
1597
+ var base = base || 16;
1598
+ var code = parseInt(codeStr, base);
1599
+ return char(code);
1600
+ };
1601
+ exports.makeUnicodeChar = makeUnicodeChar;
1602
+
1603
+ var escapeChar = function escapeChar(buffer, reader) {
1604
+ var ch = readChar(reader);
1605
+ var mapresult = escapeCharMap(ch);
1606
+ return mapresult ?
1607
+ mapresult :
1608
+ ch === "x" ?
1609
+ makeUnicodeChar(validateUnicodeEscape(unicode2Pattern, reader, ch, read2Chars(reader))) :
1610
+ ch === "u" ?
1611
+ makeUnicodeChar(validateUnicodeEscape(unicode4Pattern, reader, ch, read4Chars(reader))) :
1612
+ isNumeric(ch) ?
1613
+ char(ch) :
1614
+ "else" ?
1615
+ readerError(reader, "" + "Unexpected unicode escape " + "\\" + ch) :
1616
+ void(0);
1617
+ };
1618
+ exports.escapeChar = escapeChar;
1619
+
1620
+ var readPast = function readPast(predicate, reader) {
1621
+ return (function loop(_) {
1622
+ var recur = loop;
1623
+ while (recur === loop) {
1624
+ recur = predicate(peekChar(reader)) ?
1625
+ (_ = readChar(reader), loop) :
1626
+ peekChar(reader);
1627
+ };
1628
+ return recur;
1629
+ })(void(0));
1630
+ };
1631
+ exports.readPast = readPast;
1632
+
1633
+ var readDelimitedList = function readDelimitedList(delim, reader, isRecursive) {
1634
+ return (function loop(form) {
1635
+ var recur = loop;
1636
+ while (recur === loop) {
1637
+ recur = (function() {
1638
+ var ch = readPast(isWhitespace, reader);
1639
+ !(ch) ?
1640
+ readerError(reader, "EOF") :
1641
+ void(0);
1642
+ return delim === ch ?
1643
+ (function() {
1644
+ readChar(reader);
1645
+ return form;
1646
+ })() :
1647
+ (function() {
1648
+ var macro = macros(ch);
1649
+ return macro ?
1650
+ (function() {
1651
+ var result = macro(reader, readChar(reader));
1652
+ return (form = result === reader ?
1653
+ form :
1654
+ conj(form, result), loop);
1655
+ })() :
1656
+ (function() {
1657
+ var o = read(reader, true, void(0), isRecursive);
1658
+ return (form = o === reader ?
1659
+ form :
1660
+ conj(form, o), loop);
1661
+ })();
1662
+ })();
1663
+ })();
1664
+ };
1665
+ return recur;
1666
+ })([]);
1667
+ };
1668
+ exports.readDelimitedList = readDelimitedList;
1669
+
1670
+ var notImplemented = function notImplemented(reader, ch) {
1671
+ return readerError(reader, "" + "Reader for " + ch + " not implemented yet");
1672
+ };
1673
+ exports.notImplemented = notImplemented;
1674
+
1675
+ var readDispatch = function readDispatch(reader, _) {
1676
+ var ch = readChar(reader);
1677
+ var dm = dispatchMacros(ch);
1678
+ return dm ?
1679
+ dm(reader, _) :
1680
+ (function() {
1681
+ var object = maybeReadTaggedType(reader, ch);
1682
+ return object ?
1683
+ object :
1684
+ readerError(reader, "No dispatch macro for ", ch);
1685
+ })();
1686
+ };
1687
+ exports.readDispatch = readDispatch;
1688
+
1689
+ var readUnmatchedDelimiter = function readUnmatchedDelimiter(rdr, ch) {
1690
+ return readerError(rdr, "Unmached delimiter ", ch);
1691
+ };
1692
+ exports.readUnmatchedDelimiter = readUnmatchedDelimiter;
1693
+
1694
+ var readList = function readList(reader, _) {
1695
+ var form = readDelimitedList(")", reader, true);
1696
+ return withMeta(list.apply(list, form), meta(form));
1697
+ };
1698
+ exports.readList = readList;
1699
+
1700
+ var readComment = function readComment(reader, _) {
1701
+ return (function loop(buffer, ch) {
1702
+ var recur = loop;
1703
+ while (recur === loop) {
1704
+ recur = (isNil(ch)) || ("\n" === ch) ?
1705
+ reader || (list(symbol(void(0), "comment"), buffer)) :
1706
+ ("\\" === ch) ?
1707
+ (buffer = "" + buffer + (escapeChar(buffer, reader)), ch = readChar(reader), loop) :
1708
+ "else" ?
1709
+ (buffer = "" + buffer + ch, ch = readChar(reader), loop) :
1710
+ void(0);
1711
+ };
1712
+ return recur;
1713
+ })("", readChar(reader));
1714
+ };
1715
+ exports.readComment = readComment;
1716
+
1717
+ var readVector = function readVector(reader) {
1718
+ return readDelimitedList("]", reader, true);
1719
+ };
1720
+ exports.readVector = readVector;
1721
+
1722
+ var readMap = function readMap(reader) {
1723
+ var form = readDelimitedList("}", reader, true);
1724
+ return isOdd(count(form)) ?
1725
+ readerError(reader, "Map literal must contain an even number of forms") :
1726
+ withMeta(dictionary.apply(dictionary, form), meta(form));
1727
+ };
1728
+ exports.readMap = readMap;
1729
+
1730
+ var readSet = function readSet(reader, _) {
1731
+ var form = readDelimitedList("}", reader, true);
1732
+ return withMeta(concat([symbol(void(0), "set")], form), meta(form));
1733
+ };
1734
+ exports.readSet = readSet;
1735
+
1736
+ var readNumber = function readNumber(reader, initch) {
1737
+ return (function loop(buffer, ch) {
1738
+ var recur = loop;
1739
+ while (recur === loop) {
1740
+ recur = (isNil(ch)) || (isWhitespace(ch)) || (macros(ch)) ?
1741
+ (function() {
1742
+ var match = matchNumber(buffer);
1743
+ return isNil(match) ?
1744
+ readerError(reader, "Invalid number format [", buffer, "]") :
1745
+ match;
1746
+ })() :
1747
+ (buffer = "" + buffer + (readChar(reader)), ch = peekChar(reader), loop);
1748
+ };
1749
+ return recur;
1750
+ })(initch, peekChar(reader));
1751
+ };
1752
+ exports.readNumber = readNumber;
1753
+
1754
+ var readString = function readString(reader) {
1755
+ return (function loop(buffer, ch) {
1756
+ var recur = loop;
1757
+ while (recur === loop) {
1758
+ recur = isNil(ch) ?
1759
+ readerError(reader, "EOF while reading string") :
1760
+ "\\" === ch ?
1761
+ (buffer = "" + buffer + (escapeChar(buffer, reader)), ch = readChar(reader), loop) :
1762
+ "\"" === ch ?
1763
+ buffer :
1764
+ "default" ?
1765
+ (buffer = "" + buffer + ch, ch = readChar(reader), loop) :
1766
+ void(0);
1767
+ };
1768
+ return recur;
1769
+ })("", readChar(reader));
1770
+ };
1771
+ exports.readString = readString;
1772
+
1773
+ var readUnquote = function readUnquote(reader) {
1774
+ var ch = peekChar(reader);
1775
+ return !(ch) ?
1776
+ readerError(reader, "EOF while reading character") :
1777
+ ch === "@" ?
1778
+ (function() {
1779
+ readChar(reader);
1780
+ return list(symbol(void(0), "unquote-splicing"), read(reader, true, void(0), true));
1781
+ })() :
1782
+ list(symbol(void(0), "unquote"), read(reader, true, void(0), true));
1783
+ };
1784
+ exports.readUnquote = readUnquote;
1785
+
1786
+ var specialSymbols = function specialSymbols(text, notFound) {
1787
+ return text === "nil" ?
1788
+ void(0) :
1789
+ text === "true" ?
1790
+ true :
1791
+ text === "false" ?
1792
+ false :
1793
+ "else" ?
1794
+ notFound :
1795
+ void(0);
1796
+ };
1797
+ exports.specialSymbols = specialSymbols;
1798
+
1799
+ var readSymbol = function readSymbol(reader, initch) {
1800
+ var token = readToken(reader, initch);
1801
+ var parts = split(token, "/");
1802
+ var hasNs = (count(parts) > 1) && (count(token) > 1);
1803
+ var ns = first(parts);
1804
+ var name = join("/", rest(parts));
1805
+ return hasNs ?
1806
+ symbol(ns, name) :
1807
+ specialSymbols(token, symbol(token));
1808
+ };
1809
+ exports.readSymbol = readSymbol;
1810
+
1811
+ var readKeyword = function readKeyword(reader, initch) {
1812
+ var token = readToken(reader, readChar(reader));
1813
+ var parts = split(token, "/");
1814
+ var name = last(parts);
1815
+ var ns = count(parts) > 1 ?
1816
+ join("/", butlast(parts)) :
1817
+ void(0);
1818
+ var issue = last(ns) === ":" ?
1819
+ "namespace can't ends with \":\"" :
1820
+ last(name) === ":" ?
1821
+ "name can't end with \":\"" :
1822
+ last(name) === "/" ?
1823
+ "name can't end with \"/\"" :
1824
+ count(split(token, "::")) > 1 ?
1825
+ "name can't contain \"::\"" :
1826
+ void(0);
1827
+ return issue ?
1828
+ readerError(reader, "Invalid token (", issue, "): ", token) :
1829
+ (!(ns)) && (first(name) === ":") ?
1830
+ keyword(rest(name)) :
1831
+ keyword(ns, name);
1832
+ };
1833
+ exports.readKeyword = readKeyword;
1834
+
1835
+ var desugarMeta = function desugarMeta(f) {
1836
+ return isKeyword(f) ?
1837
+ dictionary(name(f), true) :
1838
+ isSymbol(f) ?
1839
+ {
1840
+ "tag": f
1841
+ } :
1842
+ isString(f) ?
1843
+ {
1844
+ "tag": f
1845
+ } :
1846
+ "else" ?
1847
+ f :
1848
+ void(0);
1849
+ };
1850
+ exports.desugarMeta = desugarMeta;
1851
+
1852
+ var wrappingReader = function wrappingReader(prefix) {
1853
+ return function(reader) {
1854
+ return list(prefix, read(reader, true, void(0), true));
1855
+ };
1856
+ };
1857
+ exports.wrappingReader = wrappingReader;
1858
+
1859
+ var throwingReader = function throwingReader(msg) {
1860
+ return function(reader) {
1861
+ return readerError(reader, msg);
1862
+ };
1863
+ };
1864
+ exports.throwingReader = throwingReader;
1865
+
1866
+ var readMeta = function readMeta(reader, _) {
1867
+ var metadata = desugarMeta(read(reader, true, void(0), true));
1868
+ !(isDictionary(metadata)) ?
1869
+ readerError(reader, "Metadata must be Symbol, Keyword, String or Map") :
1870
+ void(0);
1871
+ return (function() {
1872
+ var form = read(reader, true, void(0), true);
1873
+ return isObject(form) ?
1874
+ withMeta(form, conj(metadata, meta(form))) :
1875
+ form;
1876
+ })();
1877
+ };
1878
+ exports.readMeta = readMeta;
1879
+
1880
+ var readRegex = function readRegex(reader) {
1881
+ return (function loop(buffer, ch) {
1882
+ var recur = loop;
1883
+ while (recur === loop) {
1884
+ recur = isNil(ch) ?
1885
+ readerError(reader, "EOF while reading string") :
1886
+ "\\" === ch ?
1887
+ (buffer = "" + buffer + ch + (readChar(reader)), ch = readChar(reader), loop) :
1888
+ "\"" === ch ?
1889
+ rePattern(buffer) :
1890
+ "default" ?
1891
+ (buffer = "" + buffer + ch, ch = readChar(reader), loop) :
1892
+ void(0);
1893
+ };
1894
+ return recur;
1895
+ })("", readChar(reader));
1896
+ };
1897
+ exports.readRegex = readRegex;
1898
+
1899
+ var readParam = function readParam(reader, initch) {
1900
+ var form = readSymbol(reader, initch);
1901
+ return isEqual(form, symbol("%")) ?
1902
+ symbol("%1") :
1903
+ form;
1904
+ };
1905
+ exports.readParam = readParam;
1906
+
1907
+ var isParam = function isParam(form) {
1908
+ return (isSymbol(form)) && ("%" === first(name(form)));
1909
+ };
1910
+ exports.isParam = isParam;
1911
+
1912
+ var lambdaParamsHash = function lambdaParamsHash(form) {
1913
+ return isParam(form) ?
1914
+ dictionary(form, form) :
1915
+ (isDictionary(form)) || (isVector(form)) || (isList(form)) ?
1916
+ conj.apply(conj, map(lambdaParamsHash, vec(form))) :
1917
+ "else" ?
1918
+ {} :
1919
+ void(0);
1920
+ };
1921
+ exports.lambdaParamsHash = lambdaParamsHash;
1922
+
1923
+ var lambdaParams = function lambdaParams(body) {
1924
+ var names = sort(vals(lambdaParamsHash(body)));
1925
+ var variadic = isEqual(first(names), symbol("%&"));
1926
+ var n = variadic && (count(names) === 1) ?
1927
+ 0 :
1928
+ parseInt(rest(name(last(names))));
1929
+ var params = (function loop(names, i) {
1930
+ var recur = loop;
1931
+ while (recur === loop) {
1932
+ recur = i <= n ?
1933
+ (names = conj(names, symbol("" + "%" + i)), i = inc(i), loop) :
1934
+ names;
1935
+ };
1936
+ return recur;
1937
+ })([], 1);
1938
+ return variadic ?
1939
+ conj(params, symbol(void(0), "&"), symbol(void(0), "%&")) :
1940
+ names;
1941
+ };
1942
+ exports.lambdaParams = lambdaParams;
1943
+
1944
+ var readLambda = function readLambda(reader) {
1945
+ var body = readList(reader);
1946
+ return list(symbol(void(0), "fn"), lambdaParams(body), body);
1947
+ };
1948
+ exports.readLambda = readLambda;
1949
+
1950
+ var readDiscard = function readDiscard(reader, _) {
1951
+ read(reader, true, void(0), true);
1952
+ return reader;
1953
+ };
1954
+ exports.readDiscard = readDiscard;
1955
+
1956
+ var macros = function macros(c) {
1957
+ return c === "\"" ?
1958
+ readString :
1959
+ c === ":" ?
1960
+ readKeyword :
1961
+ c === ";" ?
1962
+ readComment :
1963
+ c === "'" ?
1964
+ wrappingReader(symbol(void(0), "quote")) :
1965
+ c === "@" ?
1966
+ wrappingReader(symbol(void(0), "deref")) :
1967
+ c === "^" ?
1968
+ readMeta :
1969
+ c === "`" ?
1970
+ wrappingReader(symbol(void(0), "syntax-quote")) :
1971
+ c === "~" ?
1972
+ readUnquote :
1973
+ c === "(" ?
1974
+ readList :
1975
+ c === ")" ?
1976
+ readUnmatchedDelimiter :
1977
+ c === "[" ?
1978
+ readVector :
1979
+ c === "]" ?
1980
+ readUnmatchedDelimiter :
1981
+ c === "{" ?
1982
+ readMap :
1983
+ c === "}" ?
1984
+ readUnmatchedDelimiter :
1985
+ c === "\\" ?
1986
+ readChar :
1987
+ c === "%" ?
1988
+ readParam :
1989
+ c === "#" ?
1990
+ readDispatch :
1991
+ "else" ?
1992
+ void(0) :
1993
+ void(0);
1994
+ };
1995
+ exports.macros = macros;
1996
+
1997
+ var dispatchMacros = function dispatchMacros(s) {
1998
+ return s === "{" ?
1999
+ readSet :
2000
+ s === "(" ?
2001
+ readLambda :
2002
+ s === "<" ?
2003
+ throwingReader("Unreadable form") :
2004
+ s === "\"" ?
2005
+ readRegex :
2006
+ s === "!" ?
2007
+ readComment :
2008
+ s === "_" ?
2009
+ readDiscard :
2010
+ "else" ?
2011
+ void(0) :
2012
+ void(0);
2013
+ };
2014
+ exports.dispatchMacros = dispatchMacros;
2015
+
2016
+ var readForm = function readForm(reader, ch) {
2017
+ var start = {
2018
+ "line": (reader || 0)["line"],
2019
+ "column": (reader || 0)["column"]
2020
+ };
2021
+ var readMacro = macros(ch);
2022
+ var form = readMacro ?
2023
+ readMacro(reader, ch) :
2024
+ isNumberLiteral(reader, ch) ?
2025
+ readNumber(reader, ch) :
2026
+ "else" ?
2027
+ readSymbol(reader, ch) :
2028
+ void(0);
2029
+ return form === reader ?
2030
+ form :
2031
+ !((isString(form)) || (isNumber(form)) || (isBoolean(form)) || (isNil(form)) || (isKeyword(form))) ?
2032
+ withMeta(form, conj({
2033
+ "start": start,
2034
+ "end": {
2035
+ "line": (reader || 0)["line"],
2036
+ "column": (reader || 0)["column"]
2037
+ }
2038
+ }, meta(form))) :
2039
+ "else" ?
2040
+ form :
2041
+ void(0);
2042
+ };
2043
+ exports.readForm = readForm;
2044
+
2045
+ var read = function read(reader, eofIsError, sentinel, isRecursive) {
2046
+ return (function loop() {
2047
+ var recur = loop;
2048
+ while (recur === loop) {
2049
+ recur = (function() {
2050
+ var ch = readChar(reader);
2051
+ var form = isNil(ch) ?
2052
+ eofIsError ?
2053
+ readerError(reader, "EOF") :
2054
+ sentinel :
2055
+ isWhitespace(ch) ?
2056
+ reader :
2057
+ isCommentPrefix(ch) ?
2058
+ read(readComment(reader, ch), eofIsError, sentinel, isRecursive) :
2059
+ "else" ?
2060
+ readForm(reader, ch) :
2061
+ void(0);
2062
+ return form === reader ?
2063
+ (loop) :
2064
+ form;
2065
+ })();
2066
+ };
2067
+ return recur;
2068
+ })();
2069
+ };
2070
+ exports.read = read;
2071
+
2072
+ var read_ = function read_(source, uri) {
2073
+ var reader = pushBackReader(source, uri);
2074
+ var eof = gensym();
2075
+ return (function loop(forms, form) {
2076
+ var recur = loop;
2077
+ while (recur === loop) {
2078
+ recur = form === eof ?
2079
+ forms :
2080
+ (forms = conj(forms, form), form = read(reader, false, eof, false), loop);
2081
+ };
2082
+ return recur;
2083
+ })([], read(reader, false, eof, false));
2084
+ };
2085
+ exports.read_ = read_;
2086
+
2087
+ var readFromString = function readFromString(source, uri) {
2088
+ var reader = pushBackReader(source, uri);
2089
+ return read(reader, true, void(0), false);
2090
+ };
2091
+ exports.readFromString = readFromString;
2092
+
2093
+ var readUuid = function readUuid(uuid) {
2094
+ return isString(uuid) ?
2095
+ list(symbol(void(0), "UUID."), uuid) :
2096
+ readerError(void(0), "UUID literal expects a string as its representation.");
2097
+ };
2098
+
2099
+ var readQueue = function readQueue(items) {
2100
+ return isVector(items) ?
2101
+ list(symbol(void(0), "PersistentQueue."), items) :
2102
+ readerError(void(0), "Queue literal expects a vector for its elements.");
2103
+ };
2104
+
2105
+ var __tagTable__ = dictionary("uuid", readUuid, "queue", readQueue);
2106
+ exports.__tagTable__ = __tagTable__;
2107
+
2108
+ var maybeReadTaggedType = function maybeReadTaggedType(reader, initch) {
2109
+ var tag = readSymbol(reader, initch);
2110
+ var pfn = (__tagTable__ || 0)[name(tag)];
2111
+ return pfn ?
2112
+ pfn(read(reader, true, void(0), false)) :
2113
+ readerError(reader, "" + "Could not find tag parser for " + (name(tag)) + " in " + ("" + (keys(__tagTable__))));
2114
+ };
2115
+ exports.maybeReadTaggedType = maybeReadTaggedType
2116
+
2117
+ },{"./sequence":4,"./runtime":1,"./ast":9,"./string":10}],6:[function(require,module,exports){
2118
+ var _ns_ = "wisp.compiler";
2119
+ module.namespace = _ns_;
2120
+ module.description = "wisp language compiler";
2121
+ var readFromString = (require("./reader")).readFromString;
2122
+ var meta = (require("./ast")).meta;
2123
+ var withMeta = (require("./ast")).withMeta;
2124
+ var isSymbol = (require("./ast")).isSymbol;
2125
+ var symbol = (require("./ast")).symbol;
2126
+ var isKeyword = (require("./ast")).isKeyword;
2127
+ var keyword = (require("./ast")).keyword;
2128
+ var namespace = (require("./ast")).namespace;
2129
+ var isUnquote = (require("./ast")).isUnquote;
2130
+ var isUnquoteSplicing = (require("./ast")).isUnquoteSplicing;
2131
+ var isQuote = (require("./ast")).isQuote;
2132
+ var isSyntaxQuote = (require("./ast")).isSyntaxQuote;
2133
+ var name = (require("./ast")).name;
2134
+ var gensym = (require("./ast")).gensym;
2135
+ var prStr = (require("./ast")).prStr;
2136
+ var isEmpty = (require("./sequence")).isEmpty;
2137
+ var count = (require("./sequence")).count;
2138
+ var isList = (require("./sequence")).isList;
2139
+ var list = (require("./sequence")).list;
2140
+ var first = (require("./sequence")).first;
2141
+ var second = (require("./sequence")).second;
2142
+ var third = (require("./sequence")).third;
2143
+ var rest = (require("./sequence")).rest;
2144
+ var cons = (require("./sequence")).cons;
2145
+ var conj = (require("./sequence")).conj;
2146
+ var reverse = (require("./sequence")).reverse;
2147
+ var reduce = (require("./sequence")).reduce;
2148
+ var vec = (require("./sequence")).vec;
2149
+ var last = (require("./sequence")).last;
2150
+ var repeat = (require("./sequence")).repeat;
2151
+ var map = (require("./sequence")).map;
2152
+ var filter = (require("./sequence")).filter;
2153
+ var take = (require("./sequence")).take;
2154
+ var concat = (require("./sequence")).concat;
2155
+ var isOdd = (require("./runtime")).isOdd;
2156
+ var isDictionary = (require("./runtime")).isDictionary;
2157
+ var dictionary = (require("./runtime")).dictionary;
2158
+ var merge = (require("./runtime")).merge;
2159
+ var keys = (require("./runtime")).keys;
2160
+ var vals = (require("./runtime")).vals;
2161
+ var isContainsVector = (require("./runtime")).isContainsVector;
2162
+ var mapDictionary = (require("./runtime")).mapDictionary;
2163
+ var isString = (require("./runtime")).isString;
2164
+ var isNumber = (require("./runtime")).isNumber;
2165
+ var isVector = (require("./runtime")).isVector;
2166
+ var isBoolean = (require("./runtime")).isBoolean;
2167
+ var subs = (require("./runtime")).subs;
2168
+ var reFind = (require("./runtime")).reFind;
2169
+ var isTrue = (require("./runtime")).isTrue;
2170
+ var isFalse = (require("./runtime")).isFalse;
2171
+ var isNil = (require("./runtime")).isNil;
2172
+ var isRePattern = (require("./runtime")).isRePattern;
2173
+ var inc = (require("./runtime")).inc;
2174
+ var dec = (require("./runtime")).dec;
2175
+ var str = (require("./runtime")).str;
2176
+ var char = (require("./runtime")).char;
2177
+ var int = (require("./runtime")).int;
2178
+ var isEqual = (require("./runtime")).isEqual;
2179
+ var isStrictEqual = (require("./runtime")).isStrictEqual;
2180
+ var split = (require("./string")).split;
2181
+ var join = (require("./string")).join;
2182
+ var upperCase = (require("./string")).upperCase;
2183
+ var replace = (require("./string")).replace;
2184
+ var writeReference = (require("./backend/javascript/writer")).writeReference;
2185
+ var writeKeywordReference = (require("./backend/javascript/writer")).writeKeywordReference;
2186
+ var writeKeyword = (require("./backend/javascript/writer")).writeKeyword;
2187
+ var writeSymbol = (require("./backend/javascript/writer")).writeSymbol;
2188
+ var writeNil = (require("./backend/javascript/writer")).writeNil;
2189
+ var writeComment = (require("./backend/javascript/writer")).writeComment;
2190
+ var writeNumber = (require("./backend/javascript/writer")).writeNumber;
2191
+ var writeString = (require("./backend/javascript/writer")).writeString;
2192
+ var writeNumber = (require("./backend/javascript/writer")).writeNumber;
2193
+ var writeBoolean = (require("./backend/javascript/writer")).writeBoolean;;
2194
+
2195
+ var isSelfEvaluating = function isSelfEvaluating(form) {
2196
+ return (isNumber(form)) || ((isString(form)) && (!(isSymbol(form))) && (!(isKeyword(form)))) || (isBoolean(form)) || (isNil(form)) || (isRePattern(form));
2197
+ };
2198
+ exports.isSelfEvaluating = isSelfEvaluating;
2199
+
2200
+ var __macros__ = {};
2201
+ exports.__macros__ = __macros__;
2202
+
2203
+ var executeMacro = function executeMacro(name, form) {
2204
+ return (__macros__ || 0)[name].apply((__macros__ || 0)[name], vec(form));
2205
+ };
2206
+ exports.executeMacro = executeMacro;
2207
+
2208
+ var installMacro = function installMacro(name, macroFn) {
2209
+ return (__macros__ || 0)[name] = macroFn;
2210
+ };
2211
+ exports.installMacro = installMacro;
2212
+
2213
+ var isMacro = function isMacro(name) {
2214
+ return (isSymbol(name)) && ((__macros__ || 0)[name]) && true;
2215
+ };
2216
+ exports.isMacro = isMacro;
2217
+
2218
+ var makeMacro = function makeMacro(pattern, body) {
2219
+ var macroFn = concat(list(symbol(void(0), "fn"), pattern), body);
2220
+ return eval("" + "(" + (compile(macroexpand(macroFn))) + ")");
2221
+ };
2222
+ exports.makeMacro = makeMacro;
2223
+
2224
+ installMacro(symbol(void(0), "defmacro"), function(name, signature) {
2225
+ var body = Array.prototype.slice.call(arguments, 2);
2226
+ return installMacro(name, makeMacro(signature, body));
2227
+ });
2228
+
2229
+ var __specials__ = {};
2230
+ exports.__specials__ = __specials__;
2231
+
2232
+ var installSpecial = function installSpecial(name, f, validator) {
2233
+ return (__specials__ || 0)[name] = function(form) {
2234
+ validator ?
2235
+ validator(form) :
2236
+ void(0);
2237
+ return f(withMeta(rest(form), meta(form)));
2238
+ };
2239
+ };
2240
+ exports.installSpecial = installSpecial;
2241
+
2242
+ var isSpecial = function isSpecial(name) {
2243
+ return (isSymbol(name)) && ((__specials__ || 0)[name]) && true;
2244
+ };
2245
+ exports.isSpecial = isSpecial;
2246
+
2247
+ var executeSpecial = function executeSpecial(name, form) {
2248
+ return ((__specials__ || 0)[name])(form);
2249
+ };
2250
+ exports.executeSpecial = executeSpecial;
2251
+
2252
+ var opt = function opt(argument, fallback) {
2253
+ return (isNil(argument)) || (isEmpty(argument)) ?
2254
+ fallback :
2255
+ first(argument);
2256
+ };
2257
+ exports.opt = opt;
2258
+
2259
+ var applyForm = function applyForm(fnName, form, isQuoted) {
2260
+ return cons(fnName, isQuoted ?
2261
+ map(function(e) {
2262
+ return list(symbol(void(0), "quote"), e);
2263
+ }, form) :
2264
+ form, form);
2265
+ };
2266
+ exports.applyForm = applyForm;
2267
+
2268
+ var applyUnquotedForm = function applyUnquotedForm(fnName, form) {
2269
+ return cons(fnName, map(function(e) {
2270
+ return isUnquote(e) ?
2271
+ second(e) :
2272
+ (isList(e)) && (isKeyword(first(e))) ?
2273
+ list(symbol(void(0), "syntax-quote"), second(e)) :
2274
+ list(symbol(void(0), "syntax-quote"), e);
2275
+ }, form));
2276
+ };
2277
+ exports.applyUnquotedForm = applyUnquotedForm;
2278
+
2279
+ var splitSplices = function splitSplices(form, fnName) {
2280
+ var makeSplice = function makeSplice(form) {
2281
+ return (isSelfEvaluating(form)) || (isSymbol(form)) ?
2282
+ applyUnquotedForm(fnName, list(form)) :
2283
+ applyUnquotedForm(fnName, form);
2284
+ };
2285
+ return (function loop(nodes, slices, acc) {
2286
+ var recur = loop;
2287
+ while (recur === loop) {
2288
+ recur = isEmpty(nodes) ?
2289
+ reverse(isEmpty(acc) ?
2290
+ slices :
2291
+ cons(makeSplice(reverse(acc)), slices)) :
2292
+ (function() {
2293
+ var node = first(nodes);
2294
+ return isUnquoteSplicing(node) ?
2295
+ (nodes = rest(nodes), slices = cons(second(node), isEmpty(acc) ?
2296
+ slices :
2297
+ cons(makeSplice(reverse(acc)), slices)), acc = list(), loop) :
2298
+ (nodes = rest(nodes), slices = slices, acc = cons(node, acc), loop);
2299
+ })();
2300
+ };
2301
+ return recur;
2302
+ })(form, list(), list());
2303
+ };
2304
+ exports.splitSplices = splitSplices;
2305
+
2306
+ var syntaxQuoteSplit = function syntaxQuoteSplit(appendName, fnName, form) {
2307
+ var slices = splitSplices(form, fnName);
2308
+ var n = count(slices);
2309
+ return n === 0 ?
2310
+ list(fnName) :
2311
+ n === 1 ?
2312
+ first(slices) :
2313
+ "default" ?
2314
+ applyForm(appendName, slices) :
2315
+ void(0);
2316
+ };
2317
+ exports.syntaxQuoteSplit = syntaxQuoteSplit;
2318
+
2319
+ var compileObject = function compileObject(form, isQuoted) {
2320
+ return isKeyword(form) ?
2321
+ writeKeyword(form) :
2322
+ isSymbol(form) ?
2323
+ writeSymbol(form) :
2324
+ isNumber(form) ?
2325
+ writeNumber(form) :
2326
+ isString(form) ?
2327
+ writeString(form) :
2328
+ isBoolean(form) ?
2329
+ writeBoolean(form) :
2330
+ isNil(form) ?
2331
+ writeNil(form) :
2332
+ isRePattern(form) ?
2333
+ compileRePattern(form) :
2334
+ isVector(form) ?
2335
+ compile(applyForm(symbol(void(0), "vector"), list.apply(list, form), isQuoted)) :
2336
+ isList(form) ?
2337
+ compile(applyForm(symbol(void(0), "list"), form, isQuoted)) :
2338
+ isDictionary(form) ?
2339
+ compileDictionary(isQuoted ?
2340
+ mapDictionary(form, function(x) {
2341
+ return list(symbol(void(0), "quote"), x);
2342
+ }) :
2343
+ form) :
2344
+ void(0);
2345
+ };
2346
+ exports.compileObject = compileObject;
2347
+
2348
+ var compileSyntaxQuotedVector = function compileSyntaxQuotedVector(form) {
2349
+ var concatForm = syntaxQuoteSplit(symbol(void(0), "concat"), symbol(void(0), "vector"), list.apply(list, form));
2350
+ return compile(count(concatForm) > 1 ?
2351
+ list(symbol(void(0), "vec"), concatForm) :
2352
+ concatForm);
2353
+ };
2354
+ exports.compileSyntaxQuotedVector = compileSyntaxQuotedVector;
2355
+
2356
+ var compileSyntaxQuoted = function compileSyntaxQuoted(form) {
2357
+ return isList(form) ?
2358
+ compile(syntaxQuoteSplit(symbol(void(0), "concat"), symbol(void(0), "list"), form)) :
2359
+ isVector(form) ?
2360
+ compileSyntaxQuotedVector(form) :
2361
+ "else" ?
2362
+ compileObject(form) :
2363
+ void(0);
2364
+ };
2365
+ exports.compileSyntaxQuoted = compileSyntaxQuoted;
2366
+
2367
+ var compile = function compile(form) {
2368
+ return isSelfEvaluating(form) ?
2369
+ compileObject(form) :
2370
+ isSymbol(form) ?
2371
+ writeReference(form) :
2372
+ isKeyword(form) ?
2373
+ writeKeywordReference(form) :
2374
+ isVector(form) ?
2375
+ compileObject(form) :
2376
+ isDictionary(form) ?
2377
+ compileObject(form) :
2378
+ isList(form) ?
2379
+ (function() {
2380
+ var head = first(form);
2381
+ return isEmpty(form) ?
2382
+ compileObject(form, true) :
2383
+ isQuote(form) ?
2384
+ compileObject(second(form), true) :
2385
+ isSyntaxQuote(form) ?
2386
+ compileSyntaxQuoted(second(form)) :
2387
+ isSpecial(head) ?
2388
+ executeSpecial(head, form) :
2389
+ isKeyword(head) ?
2390
+ compile(list(symbol(void(0), "get"), second(form), head)) :
2391
+ "else" ?
2392
+ (function() {
2393
+ return !((isSymbol(head)) || (isList(head))) ?
2394
+ (function() { throw compilerError(form, "" + "operator is not a procedure: " + head); })() :
2395
+ compileInvoke(form);
2396
+ })() :
2397
+ void(0);
2398
+ })() :
2399
+ void(0);
2400
+ };
2401
+ exports.compile = compile;
2402
+
2403
+ var compile_ = function compile_(forms) {
2404
+ return reduce(function(result, form) {
2405
+ return "" + result + (isEmpty(result) ?
2406
+ "" :
2407
+ ";\n\n") + (compile(isList(form) ?
2408
+ withMeta(macroexpand(form), conj({
2409
+ "top": true
2410
+ }, meta(form))) :
2411
+ form));
2412
+ }, "", forms);
2413
+ };
2414
+ exports.compile_ = compile_;
2415
+
2416
+ var compileProgram = function compileProgram(forms) {
2417
+ return reduce(function(result, form) {
2418
+ return "" + result + (isEmpty(result) ?
2419
+ "" :
2420
+ ";\n\n") + (compile(isList(form) ?
2421
+ withMeta(macroexpand(form), conj({
2422
+ "top": true
2423
+ }, meta(form))) :
2424
+ form));
2425
+ }, "", forms);
2426
+ };
2427
+ exports.compileProgram = compileProgram;
2428
+
2429
+ var macroexpand1 = function macroexpand1(form) {
2430
+ return isList(form) ?
2431
+ (function() {
2432
+ var op = first(form);
2433
+ var id = isSymbol(op) ?
2434
+ name(op) :
2435
+ void(0);
2436
+ return isSpecial(op) ?
2437
+ form :
2438
+ isMacro(op) ?
2439
+ executeMacro(op, rest(form)) :
2440
+ (isSymbol(op)) && (!(id === ".")) ?
2441
+ first(id) === "." ?
2442
+ count(form) < 2 ?
2443
+ (function() { throw Error("Malformed member expression, expecting (.member target ...)"); })() :
2444
+ cons(symbol(void(0), "."), cons(second(form), cons(symbol(subs(id, 1)), rest(rest(form))))) :
2445
+ last(id) === "." ?
2446
+ cons(symbol(void(0), "new"), cons(symbol(subs(id, 0, dec(count(id)))), rest(form))) :
2447
+ form :
2448
+ "else" ?
2449
+ form :
2450
+ void(0);
2451
+ })() :
2452
+ form;
2453
+ };
2454
+ exports.macroexpand1 = macroexpand1;
2455
+
2456
+ var macroexpand = function macroexpand(form) {
2457
+ return (function loop(original, expanded) {
2458
+ var recur = loop;
2459
+ while (recur === loop) {
2460
+ recur = original === expanded ?
2461
+ original :
2462
+ (original = expanded, expanded = macroexpand1(expanded), loop);
2463
+ };
2464
+ return recur;
2465
+ })(form, macroexpand1(form));
2466
+ };
2467
+ exports.macroexpand = macroexpand;
2468
+
2469
+ var _lineBreakPattern_ = /\n(?=[^\n])/m;
2470
+ exports._lineBreakPattern_ = _lineBreakPattern_;
2471
+
2472
+ var indent = function indent(code, indentation) {
2473
+ return join(indentation, split(code, _lineBreakPattern_));
2474
+ };
2475
+ exports.indent = indent;
2476
+
2477
+ var compileTemplate = function compileTemplate(form) {
2478
+ var indentPattern = /\n *$/;
2479
+ var getIndentation = function(code) {
2480
+ return (reFind(indentPattern, code)) || "\n";
2481
+ };
2482
+ return (function loop(code, parts, values) {
2483
+ var recur = loop;
2484
+ while (recur === loop) {
2485
+ recur = count(parts) > 1 ?
2486
+ (code = "" + code + (first(parts)) + (indent("" + (first(values)), getIndentation(first(parts)))), parts = rest(parts), values = rest(values), loop) :
2487
+ "" + code + (first(parts));
2488
+ };
2489
+ return recur;
2490
+ })("", split(first(form), "~{}"), rest(form));
2491
+ };
2492
+ exports.compileTemplate = compileTemplate;
2493
+
2494
+ var compileDef = function compileDef(form) {
2495
+ var id = first(form);
2496
+ var isExport = ((((meta(form)) || {}) || 0)["top"]) && (!((((meta(id)) || {}) || 0)["private"]));
2497
+ var attribute = symbol(namespace(id), "" + "-" + (name(id)));
2498
+ return isExport ?
2499
+ compileTemplate(list("var ~{};\n~{}", compile(cons(symbol(void(0), "set!"), form)), compile(list(symbol(void(0), "set!"), list(symbol(void(0), "."), symbol(void(0), "exports"), attribute), id)))) :
2500
+ compileTemplate(list("var ~{}", compile(cons(symbol(void(0), "set!"), form))));
2501
+ };
2502
+ exports.compileDef = compileDef;
2503
+
2504
+ var compileIfElse = function compileIfElse(form) {
2505
+ var condition = macroexpand(first(form));
2506
+ var thenExpression = macroexpand(second(form));
2507
+ var elseExpression = macroexpand(third(form));
2508
+ return compileTemplate(list((isList(elseExpression)) && (isEqual(first(elseExpression), symbol(void(0), "if"))) ?
2509
+ "~{} ?\n ~{} :\n~{}" :
2510
+ "~{} ?\n ~{} :\n ~{}", compile(condition), compile(thenExpression), compile(elseExpression)));
2511
+ };
2512
+ exports.compileIfElse = compileIfElse;
2513
+
2514
+ var compileDictionary = function compileDictionary(form) {
2515
+ var body = (function loop(body, names) {
2516
+ var recur = loop;
2517
+ while (recur === loop) {
2518
+ recur = isEmpty(names) ?
2519
+ body :
2520
+ (body = "" + (isNil(body) ?
2521
+ "" :
2522
+ "" + body + ",\n") + (compileTemplate(list("~{}: ~{}", compile(first(names)), compile(macroexpand((form || 0)[first(names)]))))), names = rest(names), loop);
2523
+ };
2524
+ return recur;
2525
+ })(void(0), keys(form));
2526
+ return isNil(body) ?
2527
+ "{}" :
2528
+ compileTemplate(list("{\n ~{}\n}", body));
2529
+ };
2530
+ exports.compileDictionary = compileDictionary;
2531
+
2532
+ var desugarFnName = function desugarFnName(form) {
2533
+ return (isSymbol(first(form))) || (isNil(first(form))) ?
2534
+ form :
2535
+ cons(void(0), form);
2536
+ };
2537
+ exports.desugarFnName = desugarFnName;
2538
+
2539
+ var desugarFnDoc = function desugarFnDoc(form) {
2540
+ return (isString(second(form))) || (isNil(second(form))) ?
2541
+ form :
2542
+ cons(first(form), cons(void(0), rest(form)));
2543
+ };
2544
+ exports.desugarFnDoc = desugarFnDoc;
2545
+
2546
+ var desugarFnAttrs = function desugarFnAttrs(form) {
2547
+ return (isDictionary(third(form))) || (isNil(third(form))) ?
2548
+ form :
2549
+ cons(first(form), cons(second(form), cons(void(0), rest(rest(form)))));
2550
+ };
2551
+ exports.desugarFnAttrs = desugarFnAttrs;
2552
+
2553
+ var compileDesugaredFn = function compileDesugaredFn(name, doc, attrs, params, body) {
2554
+ return compileTemplate(isNil(name) ?
2555
+ list("function(~{}) {\n ~{}\n}", join(", ", map(compile, (params || 0)["names"])), compileFnBody(map(macroexpand, body), params)) :
2556
+ list("function ~{}(~{}) {\n ~{}\n}", compile(name), join(", ", map(compile, (params || 0)["names"])), compileFnBody(map(macroexpand, body), params)));
2557
+ };
2558
+ exports.compileDesugaredFn = compileDesugaredFn;
2559
+
2560
+ var compileStatements = function compileStatements(form, prefix) {
2561
+ return (function loop(result, expression, expressions) {
2562
+ var recur = loop;
2563
+ while (recur === loop) {
2564
+ recur = isEmpty(expressions) ?
2565
+ "" + result + (isNil(prefix) ?
2566
+ "" :
2567
+ prefix) + (compile(macroexpand(expression))) + ";" :
2568
+ (result = "" + result + (compile(macroexpand(expression))) + ";\n", expression = first(expressions), expressions = rest(expressions), loop);
2569
+ };
2570
+ return recur;
2571
+ })("", first(form), rest(form));
2572
+ };
2573
+ exports.compileStatements = compileStatements;
2574
+
2575
+ var compileFnBody = function compileFnBody(form, params) {
2576
+ return (isDictionary(params)) && ((params || 0)["rest"]) ?
2577
+ compileStatements(cons(list(symbol(void(0), "def"), (params || 0)["rest"], list(symbol(void(0), "Array.prototype.slice.call"), symbol(void(0), "arguments"), (params || 0)["arity"])), form), "return ") :
2578
+ (count(form) === 1) && (isList(first(form))) && (isEqual(first(first(form)), symbol(void(0), "do"))) ?
2579
+ compileFnBody(rest(first(form)), params) :
2580
+ compileStatements(form, "return ");
2581
+ };
2582
+ exports.compileFnBody = compileFnBody;
2583
+
2584
+ var desugarParams = function desugarParams(params) {
2585
+ return (function loop(names, params) {
2586
+ var recur = loop;
2587
+ while (recur === loop) {
2588
+ recur = isEmpty(params) ?
2589
+ {
2590
+ "names": names,
2591
+ "arity": count(names),
2592
+ "rest": void(0)
2593
+ } :
2594
+ isEqual(first(params), symbol(void(0), "&")) ?
2595
+ isEqual(count(params), 1) ?
2596
+ {
2597
+ "names": names,
2598
+ "arity": count(names),
2599
+ "rest": void(0)
2600
+ } :
2601
+ isEqual(count(params), 2) ?
2602
+ {
2603
+ "names": names,
2604
+ "arity": count(names),
2605
+ "rest": second(params)
2606
+ } :
2607
+ "else" ?
2608
+ (function() { throw TypeError("Unexpected number of parameters after &"); })() :
2609
+ void(0) :
2610
+ "else" ?
2611
+ (names = conj(names, first(params)), params = rest(params), loop) :
2612
+ void(0);
2613
+ };
2614
+ return recur;
2615
+ })([], params);
2616
+ };
2617
+ exports.desugarParams = desugarParams;
2618
+
2619
+ var analyzeOverloadedFn = function analyzeOverloadedFn(name, doc, attrs, overloads) {
2620
+ return map(function(overload) {
2621
+ var params = desugarParams(first(overload));
2622
+ return {
2623
+ "rest": (params || 0)["rest"],
2624
+ "names": (params || 0)["names"],
2625
+ "arity": (params || 0)["arity"],
2626
+ "body": rest(overload)
2627
+ };
2628
+ }, overloads);
2629
+ };
2630
+ exports.analyzeOverloadedFn = analyzeOverloadedFn;
2631
+
2632
+ var compileOverloadedFn = function compileOverloadedFn(name, doc, attrs, overloads) {
2633
+ var methods = analyzeOverloadedFn(name, doc, attrs, overloads);
2634
+ var fixedMethods = filter(function(method) {
2635
+ return !((method || 0)["rest"]);
2636
+ }, methods);
2637
+ var variadic = first(filter(function(method) {
2638
+ return (method || 0)["rest"];
2639
+ }, methods));
2640
+ var names = reduce(function(names, params) {
2641
+ return count(names) > (params || 0)["arity"] ?
2642
+ names :
2643
+ (params || 0)["names"];
2644
+ }, [], methods);
2645
+ return list(symbol(void(0), "fn"), name, doc, attrs, names, list(symbol(void(0), "raw*"), compileSwitch(symbol(void(0), "arguments.length"), map(function(method) {
2646
+ return cons((method || 0)["arity"], list(symbol(void(0), "raw*"), compileFnBody(concat(compileRebind(names, (method || 0)["names"]), (method || 0)["body"]))));
2647
+ }, fixedMethods), isNil(variadic) ?
2648
+ list(symbol(void(0), "throw"), list(symbol(void(0), "Error"), "Invalid arity")) :
2649
+ list(symbol(void(0), "raw*"), compileFnBody(concat(compileRebind(cons(list(symbol(void(0), "Array.prototype.slice.call"), symbol(void(0), "arguments"), (variadic || 0)["arity"]), names), cons((variadic || 0)["rest"], (variadic || 0)["names"])), (variadic || 0)["body"]))))), void(0));
2650
+ };
2651
+ exports.compileOverloadedFn = compileOverloadedFn;
2652
+
2653
+ var compileRebind = function compileRebind(bindings, names) {
2654
+ return (function loop(form, bindings, names) {
2655
+ var recur = loop;
2656
+ while (recur === loop) {
2657
+ recur = isEmpty(names) ?
2658
+ reverse(form) :
2659
+ (form = isEqual(first(names), first(bindings)) ?
2660
+ form :
2661
+ cons(list(symbol(void(0), "def"), first(names), first(bindings)), form), bindings = rest(bindings), names = rest(names), loop);
2662
+ };
2663
+ return recur;
2664
+ })(list(), bindings, names);
2665
+ };
2666
+ exports.compileRebind = compileRebind;
2667
+
2668
+ var compileSwitchCases = function compileSwitchCases(cases) {
2669
+ return reduce(function(form, caseExpression) {
2670
+ return "" + form + (compileTemplate(list("case ~{}:\n ~{}\n", compile(macroexpand(first(caseExpression))), compile(macroexpand(rest(caseExpression))))));
2671
+ }, "", cases);
2672
+ };
2673
+ exports.compileSwitchCases = compileSwitchCases;
2674
+
2675
+ var compileSwitch = function compileSwitch(value, cases, defaultCase) {
2676
+ return compileTemplate(list("switch (~{}) {\n ~{}\n default:\n ~{}\n}", compile(macroexpand(value)), compileSwitchCases(cases), compile(macroexpand(defaultCase))));
2677
+ };
2678
+ exports.compileSwitch = compileSwitch;
2679
+
2680
+ var compileFn = function compileFn(form) {
2681
+ var signature = desugarFnAttrs(desugarFnDoc(desugarFnName(form)));
2682
+ var name = first(signature);
2683
+ var doc = second(signature);
2684
+ var attrs = third(signature);
2685
+ return isVector(third(rest(signature))) ?
2686
+ compileDesugaredFn(name, doc, attrs, desugarParams(third(rest(signature))), rest(rest(rest(rest(signature))))) :
2687
+ compile(compileOverloadedFn(name, doc, attrs, rest(rest(rest(signature)))));
2688
+ };
2689
+ exports.compileFn = compileFn;
2690
+
2691
+ var compileInvoke = function compileInvoke(form) {
2692
+ return compileTemplate(list(isList(first(form)) ?
2693
+ "(~{})(~{})" :
2694
+ "~{}(~{})", compile(first(form)), compileGroup(rest(form))));
2695
+ };
2696
+ exports.compileInvoke = compileInvoke;
2697
+
2698
+ var compileGroup = function compileGroup(form, wrap) {
2699
+ return wrap ?
2700
+ "" + "(" + (compileGroup(form)) + ")" :
2701
+ join(", ", vec(map(compile, map(macroexpand, form))));
2702
+ };
2703
+ exports.compileGroup = compileGroup;
2704
+
2705
+ var compileDo = function compileDo(form) {
2706
+ return compile(list(cons(symbol(void(0), "fn"), cons([], form))));
2707
+ };
2708
+ exports.compileDo = compileDo;
2709
+
2710
+ var defineBindings = function defineBindings(form) {
2711
+ return (function loop(defs, bindings) {
2712
+ var recur = loop;
2713
+ while (recur === loop) {
2714
+ recur = count(bindings) === 0 ?
2715
+ reverse(defs) :
2716
+ (defs = cons(list(symbol(void(0), "def"), (bindings || 0)[0], (bindings || 0)[1]), defs), bindings = rest(rest(bindings)), loop);
2717
+ };
2718
+ return recur;
2719
+ })(list(), form);
2720
+ };
2721
+ exports.defineBindings = defineBindings;
2722
+
2723
+ var compileThrow = function compileThrow(form) {
2724
+ return compileTemplate(list("(function() { throw ~{}; })()", compile(macroexpand(first(form)))));
2725
+ };
2726
+ exports.compileThrow = compileThrow;
2727
+
2728
+ var compileSet = function compileSet(form) {
2729
+ return compileTemplate(list("~{} = ~{}", compile(macroexpand(first(form))), compile(macroexpand(second(form)))));
2730
+ };
2731
+ exports.compileSet = compileSet;
2732
+
2733
+ var compileVector = function compileVector(form) {
2734
+ return compileTemplate(list("[~{}]", compileGroup(form)));
2735
+ };
2736
+ exports.compileVector = compileVector;
2737
+
2738
+ var compileTry = function compileTry(form) {
2739
+ return (function loop(tryExprs, catchExprs, finallyExprs, exprs) {
2740
+ var recur = loop;
2741
+ while (recur === loop) {
2742
+ recur = isEmpty(exprs) ?
2743
+ isEmpty(catchExprs) ?
2744
+ compileTemplate(list("(function() {\ntry {\n ~{}\n} finally {\n ~{}\n}})()", compileFnBody(tryExprs), compileFnBody(finallyExprs))) :
2745
+ isEmpty(finallyExprs) ?
2746
+ compileTemplate(list("(function() {\ntry {\n ~{}\n} catch (~{}) {\n ~{}\n}})()", compileFnBody(tryExprs), compile(first(catchExprs)), compileFnBody(rest(catchExprs)))) :
2747
+ compileTemplate(list("(function() {\ntry {\n ~{}\n} catch (~{}) {\n ~{}\n} finally {\n ~{}\n}})()", compileFnBody(tryExprs), compile(first(catchExprs)), compileFnBody(rest(catchExprs)), compileFnBody(finallyExprs))) :
2748
+ isEqual(first(first(exprs)), symbol(void(0), "catch")) ?
2749
+ (tryExprs = tryExprs, catchExprs = rest(first(exprs)), finallyExprs = finallyExprs, exprs = rest(exprs), loop) :
2750
+ isEqual(first(first(exprs)), symbol(void(0), "finally")) ?
2751
+ (tryExprs = tryExprs, catchExprs = catchExprs, finallyExprs = rest(first(exprs)), exprs = rest(exprs), loop) :
2752
+ (tryExprs = cons(first(exprs), tryExprs), catchExprs = catchExprs, finallyExprs = finallyExprs, exprs = rest(exprs), loop);
2753
+ };
2754
+ return recur;
2755
+ })(list(), list(), list(), reverse(form));
2756
+ };
2757
+ exports.compileTry = compileTry;
2758
+
2759
+ var compileProperty = function compileProperty(form) {
2760
+ return (name(second(form)))[0] === "-" ?
2761
+ compileTemplate(list(isList(first(form)) ?
2762
+ "(~{}).~{}" :
2763
+ "~{}.~{}", compile(macroexpand(first(form))), compile(macroexpand(symbol(subs(name(second(form)), 1)))))) :
2764
+ compileTemplate(list("~{}.~{}(~{})", compile(macroexpand(first(form))), compile(macroexpand(second(form))), compileGroup(rest(rest(form)))));
2765
+ };
2766
+ exports.compileProperty = compileProperty;
2767
+
2768
+ var compileApply = function compileApply(form) {
2769
+ return compile(list(symbol(void(0), "."), first(form), symbol(void(0), "apply"), first(form), second(form)));
2770
+ };
2771
+ exports.compileApply = compileApply;
2772
+
2773
+ var compileNew = function compileNew(form) {
2774
+ return compileTemplate(list("new ~{}", compile(form)));
2775
+ };
2776
+ exports.compileNew = compileNew;
2777
+
2778
+ var compileAget = function compileAget(form) {
2779
+ var target = macroexpand(first(form));
2780
+ var attribute = macroexpand(second(form));
2781
+ var notFound = third(form);
2782
+ var template = isList(target) ?
2783
+ "(~{})[~{}]" :
2784
+ "~{}[~{}]";
2785
+ return notFound ?
2786
+ compile(list(symbol(void(0), "or"), list(symbol(void(0), "get"), first(form), second(form)), macroexpand(notFound))) :
2787
+ compileTemplate(list(template, compile(target), compile(attribute)));
2788
+ };
2789
+ exports.compileAget = compileAget;
2790
+
2791
+ var compileGet = function compileGet(form) {
2792
+ return compileAget(cons(list(symbol(void(0), "or"), first(form), 0), rest(form)));
2793
+ };
2794
+ exports.compileGet = compileGet;
2795
+
2796
+ var compileInstance = function compileInstance(form) {
2797
+ return compileTemplate(list("~{} instanceof ~{}", compile(macroexpand(second(form))), compile(macroexpand(first(form)))));
2798
+ };
2799
+ exports.compileInstance = compileInstance;
2800
+
2801
+ var compileNot = function compileNot(form) {
2802
+ return compileTemplate(list("!(~{})", compile(macroexpand(first(form)))));
2803
+ };
2804
+ exports.compileNot = compileNot;
2805
+
2806
+ var compileLoop = function compileLoop(form) {
2807
+ var bindings = (function loop(names, values, tokens) {
2808
+ var recur = loop;
2809
+ while (recur === loop) {
2810
+ recur = isEmpty(tokens) ?
2811
+ {
2812
+ "names": names,
2813
+ "values": values
2814
+ } :
2815
+ (names = conj(names, first(tokens)), values = conj(values, second(tokens)), tokens = rest(rest(tokens)), loop);
2816
+ };
2817
+ return recur;
2818
+ })([], [], first(form));
2819
+ var names = (bindings || 0)["names"];
2820
+ var values = (bindings || 0)["values"];
2821
+ var body = rest(form);
2822
+ return compile(cons(cons(symbol(void(0), "fn"), cons(symbol(void(0), "loop"), cons(names, compileRecur(names, body)))), list.apply(list, values)));
2823
+ };
2824
+ exports.compileLoop = compileLoop;
2825
+
2826
+ var rebindBindings = function rebindBindings(names, values) {
2827
+ return (function loop(result, names, values) {
2828
+ var recur = loop;
2829
+ while (recur === loop) {
2830
+ recur = isEmpty(names) ?
2831
+ reverse(result) :
2832
+ (result = cons(list(symbol(void(0), "set!"), first(names), first(values)), result), names = rest(names), values = rest(values), loop);
2833
+ };
2834
+ return recur;
2835
+ })(list(), names, values);
2836
+ };
2837
+ exports.rebindBindings = rebindBindings;
2838
+
2839
+ var expandRecur = function expandRecur(names, body) {
2840
+ return map(function(form) {
2841
+ return isList(form) ?
2842
+ isEqual(first(form), symbol(void(0), "recur")) ?
2843
+ list(symbol(void(0), "raw*"), compileGroup(concat(rebindBindings(names, rest(form)), list(symbol(void(0), "loop"))), true)) :
2844
+ expandRecur(names, form) :
2845
+ form;
2846
+ }, body);
2847
+ };
2848
+ exports.expandRecur = expandRecur;
2849
+
2850
+ var compileRecur = function compileRecur(names, body) {
2851
+ return list(list(symbol(void(0), "raw*"), compileTemplate(list("var recur = loop;\nwhile (recur === loop) {\n recur = ~{}\n}", compileStatements(expandRecur(names, body))))), symbol(void(0), "recur"));
2852
+ };
2853
+ exports.compileRecur = compileRecur;
2854
+
2855
+ var compileRaw = function compileRaw(form) {
2856
+ return first(form);
2857
+ };
2858
+ exports.compileRaw = compileRaw;
2859
+
2860
+ installSpecial(symbol(void(0), "set!"), compileSet);
2861
+
2862
+ installSpecial(symbol(void(0), "get"), compileGet);
2863
+
2864
+ installSpecial(symbol(void(0), "aget"), compileAget);
2865
+
2866
+ installSpecial(symbol(void(0), "def"), compileDef);
2867
+
2868
+ installSpecial(symbol(void(0), "if"), compileIfElse);
2869
+
2870
+ installSpecial(symbol(void(0), "do"), compileDo);
2871
+
2872
+ installSpecial(symbol(void(0), "do*"), compileStatements);
2873
+
2874
+ installSpecial(symbol(void(0), "fn"), compileFn);
2875
+
2876
+ installSpecial(symbol(void(0), "throw"), compileThrow);
2877
+
2878
+ installSpecial(symbol(void(0), "vector"), compileVector);
2879
+
2880
+ installSpecial(symbol(void(0), "try"), compileTry);
2881
+
2882
+ installSpecial(symbol(void(0), "."), compileProperty);
2883
+
2884
+ installSpecial(symbol(void(0), "apply"), compileApply);
2885
+
2886
+ installSpecial(symbol(void(0), "new"), compileNew);
2887
+
2888
+ installSpecial(symbol(void(0), "instance?"), compileInstance);
2889
+
2890
+ installSpecial(symbol(void(0), "not"), compileNot);
2891
+
2892
+ installSpecial(symbol(void(0), "loop"), compileLoop);
2893
+
2894
+ installSpecial(symbol(void(0), "raw*"), compileRaw);
2895
+
2896
+ installSpecial(symbol(void(0), "comment"), writeComment);
2897
+
2898
+ var compileRePattern = function compileRePattern(form) {
2899
+ return "" + form;
2900
+ };
2901
+ exports.compileRePattern = compileRePattern;
2902
+
2903
+ var installNative = function installNative(alias, operator, validator, fallback) {
2904
+ return installSpecial(alias, function(form) {
2905
+ return isEmpty(form) ?
2906
+ fallback :
2907
+ reduce(function(left, right) {
2908
+ return compileTemplate(list("~{} ~{} ~{}", left, name(operator), right));
2909
+ }, map(function(operand) {
2910
+ return compileTemplate(list(isList(operand) ?
2911
+ "(~{})" :
2912
+ "~{}", compile(macroexpand(operand))));
2913
+ }, form));
2914
+ }, validator);
2915
+ };
2916
+ exports.installNative = installNative;
2917
+
2918
+ var installOperator = function installOperator(alias, operator) {
2919
+ return installSpecial(alias, function(form) {
2920
+ return (function loop(result, left, right, operands) {
2921
+ var recur = loop;
2922
+ while (recur === loop) {
2923
+ recur = isEmpty(operands) ?
2924
+ "" + result + (compileTemplate(list("~{} ~{} ~{}", compile(macroexpand(left)), name(operator), compile(macroexpand(right))))) :
2925
+ (result = "" + result + (compileTemplate(list("~{} ~{} ~{} && ", compile(macroexpand(left)), name(operator), compile(macroexpand(right))))), left = right, right = first(operands), operands = rest(operands), loop);
2926
+ };
2927
+ return recur;
2928
+ })("", first(form), second(form), rest(rest(form)));
2929
+ }, verifyTwo);
2930
+ };
2931
+ exports.installOperator = installOperator;
2932
+
2933
+ var compilerError = function compilerError(form, message) {
2934
+ var error = Error("" + message);
2935
+ error.line = 1;
2936
+ return (function() { throw error; })();
2937
+ };
2938
+ exports.compilerError = compilerError;
2939
+
2940
+ var verifyTwo = function verifyTwo(form) {
2941
+ return (isEmpty(rest(form))) || (isEmpty(rest(rest(form)))) ?
2942
+ (function() { throw compilerError(form, "" + (first(form)) + " form requires at least two operands"); })() :
2943
+ void(0);
2944
+ };
2945
+ exports.verifyTwo = verifyTwo;
2946
+
2947
+ installNative(symbol(void(0), "+"), symbol(void(0), "+"), void(0), 0);
2948
+
2949
+ installNative(symbol(void(0), "-"), symbol(void(0), "-"), void(0), "NaN");
2950
+
2951
+ installNative(symbol(void(0), "*"), symbol(void(0), "*"), void(0), 1);
2952
+
2953
+ installNative(symbol(void(0), "/"), symbol(void(0), "/"), verifyTwo);
2954
+
2955
+ installNative(symbol(void(0), "mod"), symbol("%"), verifyTwo);
2956
+
2957
+ installNative(symbol(void(0), "and"), symbol(void(0), "&&"));
2958
+
2959
+ installNative(symbol(void(0), "or"), symbol(void(0), "||"));
2960
+
2961
+ installOperator(symbol(void(0), "not="), symbol(void(0), "!="));
2962
+
2963
+ installOperator(symbol(void(0), "=="), symbol(void(0), "==="));
2964
+
2965
+ installOperator(symbol(void(0), "identical?"), symbol(void(0), "==="));
2966
+
2967
+ installOperator(symbol(void(0), ">"), symbol(void(0), ">"));
2968
+
2969
+ installOperator(symbol(void(0), ">="), symbol(void(0), ">="));
2970
+
2971
+ installOperator(symbol(void(0), "<"), symbol(void(0), "<"));
2972
+
2973
+ installOperator(symbol(void(0), "<="), symbol(void(0), "<="));
2974
+
2975
+ installNative(symbol(void(0), "bit-and"), symbol(void(0), "&"), verifyTwo);
2976
+
2977
+ installNative(symbol(void(0), "bit-or"), symbol(void(0), "|"), verifyTwo);
2978
+
2979
+ installNative(symbol(void(0), "bit-xor"), symbol("^"));
2980
+
2981
+ installNative(symbol(void(0), "bit-not"), symbol("~"), verifyTwo);
2982
+
2983
+ installNative(symbol(void(0), "bit-shift-left"), symbol(void(0), "<<"), verifyTwo);
2984
+
2985
+ installNative(symbol(void(0), "bit-shift-right"), symbol(void(0), ">>"), verifyTwo);
2986
+
2987
+ installNative(symbol(void(0), "bit-shift-right-zero-fil"), symbol(void(0), ">>>"), verifyTwo);
2988
+
2989
+ installMacro(symbol(void(0), "str"), function str() {
2990
+ var forms = Array.prototype.slice.call(arguments, 0);
2991
+ return concat(list(symbol(void(0), "+"), ""), forms);
2992
+ });
2993
+
2994
+ installMacro(symbol(void(0), "let"), function letMacro(bindings) {
2995
+ var body = Array.prototype.slice.call(arguments, 1);
2996
+ return cons(symbol(void(0), "do"), concat(defineBindings(bindings), body));
2997
+ });
2998
+
2999
+ installMacro(symbol(void(0), "cond"), function cond() {
3000
+ var clauses = Array.prototype.slice.call(arguments, 0);
3001
+ return !(isEmpty(clauses)) ?
3002
+ list(symbol(void(0), "if"), first(clauses), isEmpty(rest(clauses)) ?
3003
+ (function() { throw Error("cond requires an even number of forms"); })() :
3004
+ second(clauses), cons(symbol(void(0), "cond"), rest(rest(clauses)))) :
3005
+ void(0);
3006
+ });
3007
+
3008
+ installMacro(symbol(void(0), "defn"), function defn(name) {
3009
+ var body = Array.prototype.slice.call(arguments, 1);
3010
+ return list(symbol(void(0), "def"), name, concat(list(symbol(void(0), "fn"), name), body));
3011
+ });
3012
+
3013
+ installMacro(symbol(void(0), "defn-"), function defn(name) {
3014
+ var body = Array.prototype.slice.call(arguments, 1);
3015
+ return concat(list(symbol(void(0), "defn"), withMeta(name, conj({
3016
+ "private": true
3017
+ }, meta(name)))), body);
3018
+ });
3019
+
3020
+ installMacro(symbol(void(0), "assert"), function assert(x, message) {
3021
+ var title = message || "";
3022
+ var assertion = prStr(x);
3023
+ var uri = (x || 0)["uri"];
3024
+ var form = isList(x) ?
3025
+ second(x) :
3026
+ x;
3027
+ return list(symbol(void(0), "do"), list(symbol(void(0), "if"), list(symbol(void(0), "and"), list(symbol(void(0), "not"), list(symbol(void(0), "identical?"), list(symbol(void(0), "typeof"), symbol(void(0), "**verbose**")), "undefined")), symbol(void(0), "**verbose**")), list(symbol(void(0), ".log"), symbol(void(0), "console"), "Assert:", assertion)), list(symbol(void(0), "if"), list(symbol(void(0), "not"), x), list(symbol(void(0), "throw"), list(symbol(void(0), "Error."), list(symbol(void(0), "str"), "Assert failed: ", title, "\n\nAssertion:\n\n", assertion, "\n\nActual:\n\n", form, "\n--------------\n"), uri))));
3028
+ });
3029
+
3030
+ installMacro(symbol(void(0), "import"), function(imports, path) {
3031
+ return isNil(path) ?
3032
+ list(symbol(void(0), "require"), imports) :
3033
+ isSymbol(imports) ?
3034
+ list(symbol(void(0), "def"), withMeta(imports, {
3035
+ "private": true
3036
+ }), list(symbol(void(0), "require"), path)) :
3037
+ (function loop(form, names) {
3038
+ var recur = loop;
3039
+ while (recur === loop) {
3040
+ recur = isEmpty(names) ?
3041
+ concat(list(symbol(void(0), "do*")), form) :
3042
+ (function() {
3043
+ var alias = first(names);
3044
+ var id = symbol("" + ".-" + (name(alias)));
3045
+ return (form = cons(list(symbol(void(0), "def"), withMeta(alias, {
3046
+ "private": true
3047
+ }), list(id, list(symbol(void(0), "require"), path))), form), names = rest(names), loop);
3048
+ })();
3049
+ };
3050
+ return recur;
3051
+ })(list(), imports);
3052
+ });
3053
+
3054
+ var expandNs = function expandNs(id) {
3055
+ var params = Array.prototype.slice.call(arguments, 1);
3056
+ return (function() {
3057
+ var ns = "" + id;
3058
+ var requirer = split(ns, ".");
3059
+ var doc = isString(first(params)) ?
3060
+ first(params) :
3061
+ void(0);
3062
+ var args = doc ?
3063
+ rest(params) :
3064
+ params;
3065
+ var parseReferences = function(forms) {
3066
+ return reduce(function(references, form) {
3067
+ (references || 0)[name(first(form))] = vec(rest(form));
3068
+ return references;
3069
+ }, {}, forms);
3070
+ };
3071
+ var references = parseReferences(args);
3072
+ var idToPath = function idToPath(id) {
3073
+ var requirement = split("" + id, ".");
3074
+ var isRelative = first(requirer) === first(requirement);
3075
+ return isRelative ?
3076
+ (function loop(from, to) {
3077
+ var recur = loop;
3078
+ while (recur === loop) {
3079
+ recur = first(from) === first(to) ?
3080
+ (from = rest(from), to = rest(to), loop) :
3081
+ join("/", concat(["."], repeat(dec(count(from)), ".."), to));
3082
+ };
3083
+ return recur;
3084
+ })(requirer, requirement) :
3085
+ join("/", requirement);
3086
+ };
3087
+ var makeRequire = function(from, as, name) {
3088
+ var path = idToPath(from);
3089
+ var requirement = name ?
3090
+ list(symbol(void(0), "."), list(symbol(void(0), "require"), path), symbol(void(0), "" + "-" + name)) :
3091
+ list(symbol(void(0), "require"), path);
3092
+ return as ?
3093
+ list(symbol(void(0), "def"), as, requirement) :
3094
+ requirement;
3095
+ };
3096
+ var expandRequirement = function(form) {
3097
+ var from = first(form);
3098
+ var as = ("꞉as" === second(form)) && (third(form));
3099
+ return makeRequire(from, as);
3100
+ };
3101
+ var expandUse = function(form) {
3102
+ var from = first(form);
3103
+ var directives = dictionary.apply(dictionary, vec(rest(form)));
3104
+ var names = (directives || 0)["꞉only"];
3105
+ var renames = (directives || 0)["꞉rename"];
3106
+ var namedImports = names && (map(function(name) {
3107
+ return makeRequire(from, name, name);
3108
+ }, names));
3109
+ var renamedImports = renames && (map(function(pair) {
3110
+ return makeRequire(from, second(pair), first(pair));
3111
+ }, renames));
3112
+ (function() {
3113
+ (!(typeof(__verbose__) === "undefined")) && __verbose__ ?
3114
+ console.log("Assert:", "(or names renames)") :
3115
+ void(0);
3116
+ return !(names || renames) ?
3117
+ (function() { throw new Error("" + "Assert failed: " + ("" + "Only [my.lib :only [foo bar]] form & " + "[clojure.string :rename {replace str-replace} are supported") + "\n\nAssertion:\n\n" + "(or names renames)" + "\n\nActual:\n\n" + names + "\n--------------\n", void(0)); })() :
3118
+ void(0);
3119
+ })();
3120
+ return concat([], namedImports, renamedImports);
3121
+ };
3122
+ var requireForms = (references || 0)["require"];
3123
+ var useForms = (references || 0)["use"];
3124
+ var requirements = requireForms ?
3125
+ map(expandRequirement, requireForms) :
3126
+ void(0);
3127
+ var uses = useForms ?
3128
+ concat.apply(concat, map(expandUse, useForms)) :
3129
+ void(0);
3130
+ return concat(list(symbol(void(0), "do*"), list(symbol(void(0), "def"), symbol(void(0), "*ns*"), ns), list(symbol(void(0), "set!"), list(symbol(void(0), ".-namespace"), symbol(void(0), "module")), symbol(void(0), "*ns*"))), doc ?
3131
+ [list(symbol(void(0), "set!"), list(symbol(void(0), ".-description"), symbol(void(0), "module")), doc)] :
3132
+ void(0), requirements, uses);
3133
+ })();
3134
+ };
3135
+ exports.expandNs = expandNs;
3136
+
3137
+ installMacro(symbol(void(0), "ns"), expandNs);
3138
+
3139
+ installMacro(symbol(void(0), "print"), function() {
3140
+ var more = Array.prototype.slice.call(arguments, 0);
3141
+ "Prints the object(s) to the output for human consumption.";
3142
+ return concat(list(symbol(void(0), ".log"), symbol(void(0), "console")), more);
3143
+ })
3144
+
3145
+ },{"./reader":5,"./ast":9,"./sequence":4,"./runtime":1,"./string":10,"./backend/javascript/writer":11}],3:[function(require,module,exports){
3146
+ var _ns_ = "wisp.engine.browser";
3147
+ module.namespace = _ns_;
3148
+ var str = (require("./../runtime")).str;
3149
+ var rest = (require("./../sequence")).rest;
3150
+ var readFromString = (require("./../reader")).readFromString;
3151
+ var compileProgram = (require("./../compiler")).compileProgram;;
3152
+
3153
+ var transpile = function transpile(source, uri) {
3154
+ return "" + (compileProgram(rest(readFromString("" + "(do " + source + ")", uri)))) + "\n";
3155
+ };
3156
+ exports.transpile = transpile;
3157
+
3158
+ var evaluate = function evaluate(code, url) {
3159
+ return eval(transpile(code, url));
3160
+ };
3161
+ exports.evaluate = evaluate;
3162
+
3163
+ var run = function run(code, url) {
3164
+ return (Function(transpile(code, url)))();
3165
+ };
3166
+ exports.run = run;
3167
+
3168
+ var load = function load(url, callback) {
3169
+ var request = window.XMLHttpRequest ?
3170
+ new XMLHttpRequest() :
3171
+ new ActiveXObject("Microsoft.XMLHTTP");
3172
+ request.open("GET", url, true);
3173
+ request.overrideMimeType ?
3174
+ request.overrideMimeType("application/wisp") :
3175
+ void(0);
3176
+ request.onreadystatechange = function() {
3177
+ return request.readyState === 4 ?
3178
+ (request.status === 0) || (request.status === 200) ?
3179
+ callback(run(request.responseText, url)) :
3180
+ callback("Could not load") :
3181
+ void(0);
3182
+ };
3183
+ return request.send(null);
3184
+ };
3185
+ exports.load = load;
3186
+
3187
+ var runScripts = function runScripts() {
3188
+ var scripts = Array.prototype.filter.call(document.getElementsByTagName("script"), function(script) {
3189
+ return script.type === "application/wisp";
3190
+ });
3191
+ var next = function next() {
3192
+ return scripts.length ?
3193
+ (function() {
3194
+ var script = scripts.shift();
3195
+ return script.src ?
3196
+ load(script.src, next) :
3197
+ next(run(script.innerHTML));
3198
+ })() :
3199
+ void(0);
3200
+ };
3201
+ return next();
3202
+ };
3203
+ exports.runScripts = runScripts;
3204
+
3205
+ (document.readyState === "complete") || (document.readyState === "interactive") ?
3206
+ runScripts() :
3207
+ window.addEventListener ?
3208
+ window.addEventListener("DOMContentLoaded", runScripts, false) :
3209
+ window.attachEvent("onload", runScripts)
3210
+
3211
+ },{"./../runtime":1,"./../sequence":4,"./../reader":5,"./../compiler":6}],9:[function(require,module,exports){
3212
+ var _ns_ = "wisp.ast";
3213
+ module.namespace = _ns_;
3214
+ var isList = (require("./sequence")).isList;
3215
+ var isSequential = (require("./sequence")).isSequential;
3216
+ var first = (require("./sequence")).first;
3217
+ var second = (require("./sequence")).second;
3218
+ var count = (require("./sequence")).count;
3219
+ var last = (require("./sequence")).last;
3220
+ var map = (require("./sequence")).map;
3221
+ var vec = (require("./sequence")).vec;
3222
+ var split = (require("./string")).split;
3223
+ var join = (require("./string")).join;
3224
+ var isNil = (require("./runtime")).isNil;
3225
+ var isVector = (require("./runtime")).isVector;
3226
+ var isNumber = (require("./runtime")).isNumber;
3227
+ var isString = (require("./runtime")).isString;
3228
+ var isBoolean = (require("./runtime")).isBoolean;
3229
+ var isObject = (require("./runtime")).isObject;
3230
+ var isDate = (require("./runtime")).isDate;
3231
+ var isRePattern = (require("./runtime")).isRePattern;
3232
+ var isDictionary = (require("./runtime")).isDictionary;
3233
+ var str = (require("./runtime")).str;
3234
+ var inc = (require("./runtime")).inc;
3235
+ var subs = (require("./runtime")).subs;
3236
+ var isEqual = (require("./runtime")).isEqual;;
3237
+
3238
+ var withMeta = function withMeta(value, metadata) {
3239
+ Object.defineProperty(value, "metadata", {
3240
+ "value": metadata,
3241
+ "configurable": true
3242
+ });
3243
+ return value;
3244
+ };
3245
+ exports.withMeta = withMeta;
3246
+
3247
+ var meta = function meta(value) {
3248
+ return isObject(value) ?
3249
+ value.metadata :
3250
+ void(0);
3251
+ };
3252
+ exports.meta = meta;
3253
+
3254
+ var __nsSeparator__ = "⁄";
3255
+ exports.__nsSeparator__ = __nsSeparator__;
3256
+
3257
+ var Symbol = function Symbol(namespace, name) {
3258
+ this.namespace = namespace;
3259
+ this.name = name;
3260
+ return this;
3261
+ };
3262
+
3263
+ Symbol.type = "wisp.symbol";
3264
+
3265
+ Symbol.prototype.type = Symbol.type;
3266
+
3267
+ Symbol.prototype.toString = function() {
3268
+ var ns = namespace(this);
3269
+ return ns ?
3270
+ "" + ns + "/" + (name(this)) :
3271
+ "" + (name(this));
3272
+ };
3273
+
3274
+ var symbol = function symbol(ns, id) {
3275
+ return isSymbol(ns) ?
3276
+ ns :
3277
+ isKeyword(ns) ?
3278
+ new Symbol(namespace(ns), name(ns)) :
3279
+ isNil(id) ?
3280
+ new Symbol(void(0), ns) :
3281
+ "else" ?
3282
+ new Symbol(ns, id) :
3283
+ void(0);
3284
+ };
3285
+ exports.symbol = symbol;
3286
+
3287
+ var isSymbol = function isSymbol(x) {
3288
+ return x && (Symbol.type === x.type);
3289
+ };
3290
+ exports.isSymbol = isSymbol;
3291
+
3292
+ var isKeyword = function isKeyword(x) {
3293
+ return (isString(x)) && (count(x) > 1) && (first(x) === "꞉");
3294
+ };
3295
+ exports.isKeyword = isKeyword;
3296
+
3297
+ var keyword = function keyword(ns, id) {
3298
+ return isKeyword(ns) ?
3299
+ ns :
3300
+ isSymbol(ns) ?
3301
+ "" + "꞉" + (name(ns)) :
3302
+ isNil(id) ?
3303
+ "" + "꞉" + ns :
3304
+ isNil(ns) ?
3305
+ "" + "꞉" + id :
3306
+ "else" ?
3307
+ "" + "꞉" + ns + __nsSeparator__ + id :
3308
+ void(0);
3309
+ };
3310
+ exports.keyword = keyword;
3311
+
3312
+ var keywordName = function keywordName(value) {
3313
+ return last(split(subs(value, 1), __nsSeparator__));
3314
+ };
3315
+
3316
+ var name = function name(value) {
3317
+ return isSymbol(value) ?
3318
+ value.name :
3319
+ isKeyword(value) ?
3320
+ keywordName(value) :
3321
+ isString(value) ?
3322
+ value :
3323
+ "else" ?
3324
+ (function() { throw new TypeError("" + "Doesn't support name: " + value); })() :
3325
+ void(0);
3326
+ };
3327
+ exports.name = name;
3328
+
3329
+ var keywordNamespace = function keywordNamespace(x) {
3330
+ var parts = split(subs(x, 1), __nsSeparator__);
3331
+ return count(parts) > 1 ?
3332
+ (parts || 0)[0] :
3333
+ void(0);
3334
+ };
3335
+
3336
+ var namespace = function namespace(x) {
3337
+ return isSymbol(x) ?
3338
+ x.namespace :
3339
+ isKeyword(x) ?
3340
+ keywordNamespace(x) :
3341
+ "else" ?
3342
+ (function() { throw new TypeError("" + "Doesn't supports namespace: " + x); })() :
3343
+ void(0);
3344
+ };
3345
+ exports.namespace = namespace;
3346
+
3347
+ var gensym = function gensym(prefix) {
3348
+ return symbol("" + (isNil(prefix) ?
3349
+ "G__" :
3350
+ prefix) + (gensym.base = gensym.base + 1));
3351
+ };
3352
+ exports.gensym = gensym;
3353
+
3354
+ gensym.base = 0;
3355
+
3356
+ var isUnquote = function isUnquote(form) {
3357
+ return (isList(form)) && (isEqual(first(form), symbol(void(0), "unquote")));
3358
+ };
3359
+ exports.isUnquote = isUnquote;
3360
+
3361
+ var isUnquoteSplicing = function isUnquoteSplicing(form) {
3362
+ return (isList(form)) && (isEqual(first(form), symbol(void(0), "unquote-splicing")));
3363
+ };
3364
+ exports.isUnquoteSplicing = isUnquoteSplicing;
3365
+
3366
+ var isQuote = function isQuote(form) {
3367
+ return (isList(form)) && (isEqual(first(form), symbol(void(0), "quote")));
3368
+ };
3369
+ exports.isQuote = isQuote;
3370
+
3371
+ var isSyntaxQuote = function isSyntaxQuote(form) {
3372
+ return (isList(form)) && (isEqual(first(form), symbol(void(0), "syntax-quote")));
3373
+ };
3374
+ exports.isSyntaxQuote = isSyntaxQuote;
3375
+
3376
+ var normalize = function normalize(n, len) {
3377
+ return (function loop(ns) {
3378
+ var recur = loop;
3379
+ while (recur === loop) {
3380
+ recur = count(ns) < len ?
3381
+ (ns = "" + "0" + ns, loop) :
3382
+ ns;
3383
+ };
3384
+ return recur;
3385
+ })("" + n);
3386
+ };
3387
+
3388
+ var quoteString = function quoteString(s) {
3389
+ s = join("\\\"", split(s, "\""));
3390
+ s = join("\\\\", split(s, "\\"));
3391
+ s = join("\\b", split(s, ""));
3392
+ s = join("\\f", split(s, " "));
3393
+ s = join("\\n", split(s, "\n"));
3394
+ s = join("\\r", split(s, "\r"));
3395
+ s = join("\\t", split(s, "\t"));
3396
+ return "" + "\"" + s + "\"";
3397
+ };
3398
+ exports.quoteString = quoteString;
3399
+
3400
+ var prStr = function prStr(x) {
3401
+ return isNil(x) ?
3402
+ "nil" :
3403
+ isKeyword(x) ?
3404
+ namespace(x) ?
3405
+ "" + ":" + (namespace(x)) + "/" + (name(x)) :
3406
+ "" + ":" + (name(x)) :
3407
+ isString(x) ?
3408
+ quoteString(x) :
3409
+ isDate(x) ?
3410
+ "" + "#inst \"" + (x.getUTCFullYear()) + "-" + (normalize(inc(x.getUTCMonth()), 2)) + "-" + (normalize(x.getUTCDate(), 2)) + "T" + (normalize(x.getUTCHours(), 2)) + ":" + (normalize(x.getUTCMinutes(), 2)) + ":" + (normalize(x.getUTCSeconds(), 2)) + "." + (normalize(x.getUTCMilliseconds(), 3)) + "-" + "00:00\"" :
3411
+ isVector(x) ?
3412
+ "" + "[" + (join(" ", map(prStr, vec(x)))) + "]" :
3413
+ isDictionary(x) ?
3414
+ "" + "{" + (join(", ", map(function(pair) {
3415
+ return "" + (prStr(first(pair))) + " " + (prStr(second(pair)));
3416
+ }, x))) + "}" :
3417
+ isSequential(x) ?
3418
+ "" + "(" + (join(" ", map(prStr, vec(x)))) + ")" :
3419
+ isRePattern(x) ?
3420
+ "" + "#\"" + (join("\\/", split(x.source, "/"))) + "\"" :
3421
+ "else" ?
3422
+ "" + x :
3423
+ void(0);
3424
+ };
3425
+ exports.prStr = prStr
3426
+
3427
+ },{"./sequence":4,"./string":10,"./runtime":1}],10:[function(require,module,exports){
3428
+ var _ns_ = "wisp.string";
3429
+ module.namespace = _ns_;
3430
+ var str = (require("./runtime")).str;
3431
+ var subs = (require("./runtime")).subs;
3432
+ var reMatches = (require("./runtime")).reMatches;
3433
+ var isNil = (require("./runtime")).isNil;
3434
+ var isString = (require("./runtime")).isString;
3435
+ var vec = (require("./sequence")).vec;
3436
+ var isEmpty = (require("./sequence")).isEmpty;;
3437
+
3438
+ var split = function split(string, pattern, limit) {
3439
+ return string.split(pattern, limit);
3440
+ };
3441
+ exports.split = split;
3442
+
3443
+ var join = function join(separator, coll) {
3444
+ switch (arguments.length) {
3445
+ case 1:
3446
+ var coll = separator;
3447
+ return str.apply(str, vec(coll));
3448
+ case 2:
3449
+ return vec(coll).join(separator);
3450
+
3451
+ default:
3452
+ (function() { throw Error("Invalid arity"); })()
3453
+ };
3454
+ return void(0);
3455
+ };
3456
+ exports.join = join;
3457
+
3458
+ var upperCase = function upperCase(string) {
3459
+ return string.toUpperCase();
3460
+ };
3461
+ exports.upperCase = upperCase;
3462
+
3463
+ var upperCase = function upperCase(string) {
3464
+ return string.toUpperCase();
3465
+ };
3466
+ exports.upperCase = upperCase;
3467
+
3468
+ var lowerCase = function lowerCase(string) {
3469
+ return string.toLowerCase();
3470
+ };
3471
+ exports.lowerCase = lowerCase;
3472
+
3473
+ var capitalize = function capitalize(string) {
3474
+ return count(string) < 2 ?
3475
+ upperCase(string) :
3476
+ "" + (upperCase(subs(s, 0, 1))) + (lowerCase(subs(s, 1)));
3477
+ };
3478
+ exports.capitalize = capitalize;
3479
+
3480
+ var replace = function replace(string, match, replacement) {
3481
+ return string.replace(match, replacement);
3482
+ };
3483
+ exports.replace = replace;
3484
+
3485
+ var __LEFTSPACES__ = /^\s\s*/;
3486
+ exports.__LEFTSPACES__ = __LEFTSPACES__;
3487
+
3488
+ var __RIGHTSPACES__ = /\s\s*$/;
3489
+ exports.__RIGHTSPACES__ = __RIGHTSPACES__;
3490
+
3491
+ var __SPACES__ = /^\s\s*$/;
3492
+ exports.__SPACES__ = __SPACES__;
3493
+
3494
+ var triml = isNil("".trimLeft) ?
3495
+ function(string) {
3496
+ return string.replace(__LEFTSPACES__, "");
3497
+ } :
3498
+ function triml(string) {
3499
+ return string.trimLeft();
3500
+ };
3501
+ exports.triml = triml;
3502
+
3503
+ var trimr = isNil("".trimRight) ?
3504
+ function(string) {
3505
+ return string.replace(__RIGHTSPACES__, "");
3506
+ } :
3507
+ function trimr(string) {
3508
+ return string.trimRight();
3509
+ };
3510
+ exports.trimr = trimr;
3511
+
3512
+ var trim = isNil("".trim) ?
3513
+ function(string) {
3514
+ return string.replace(__LEFTSPACES__).replace(__RIGHTSPACES__);
3515
+ } :
3516
+ function trim(string) {
3517
+ return string.trim();
3518
+ };
3519
+ exports.trim = trim;
3520
+
3521
+ var isBlank = function isBlank(string) {
3522
+ return (isNil(string)) || (isEmpty(string)) || (reMatches(__SPACES__, string));
3523
+ };
3524
+ exports.isBlank = isBlank
3525
+
3526
+ },{"./runtime":1,"./sequence":4}],11:[function(require,module,exports){
3527
+ var _ns_ = "wisp.backend.javascript.writer";
3528
+ module.namespace = _ns_;
3529
+ module.description = "Compiler backend for for writing JS output";
3530
+ var name = (require("./../../ast")).name;
3531
+ var namespace = (require("./../../ast")).namespace;
3532
+ var symbol = (require("./../../ast")).symbol;
3533
+ var isSymbol = (require("./../../ast")).isSymbol;
3534
+ var isKeyword = (require("./../../ast")).isKeyword;
3535
+ var list = (require("./../../sequence")).list;
3536
+ var first = (require("./../../sequence")).first;
3537
+ var rest = (require("./../../sequence")).rest;
3538
+ var isList = (require("./../../sequence")).isList;
3539
+ var vec = (require("./../../sequence")).vec;
3540
+ var map = (require("./../../sequence")).map;
3541
+ var count = (require("./../../sequence")).count;
3542
+ var last = (require("./../../sequence")).last;
3543
+ var reduce = (require("./../../sequence")).reduce;
3544
+ var isEmpty = (require("./../../sequence")).isEmpty;
3545
+ var isTrue = (require("./../../runtime")).isTrue;
3546
+ var isNil = (require("./../../runtime")).isNil;
3547
+ var isString = (require("./../../runtime")).isString;
3548
+ var isNumber = (require("./../../runtime")).isNumber;
3549
+ var isVector = (require("./../../runtime")).isVector;
3550
+ var isDictionary = (require("./../../runtime")).isDictionary;
3551
+ var isBoolean = (require("./../../runtime")).isBoolean;
3552
+ var isRePattern = (require("./../../runtime")).isRePattern;
3553
+ var reFind = (require("./../../runtime")).reFind;
3554
+ var dec = (require("./../../runtime")).dec;
3555
+ var subs = (require("./../../runtime")).subs;
3556
+ var replace = (require("./../../string")).replace;
3557
+ var join = (require("./../../string")).join;
3558
+ var split = (require("./../../string")).split;
3559
+ var upperCase = (require("./../../string")).upperCase;;
3560
+
3561
+ var writeReference = function writeReference(form) {
3562
+ "Translates references from clojure convention to JS:\n\n **macros** __macros__\n list->vector listToVector\n set! set\n foo_bar foo_bar\n number? isNumber\n create-server createServer";
3563
+ return (function() {
3564
+ var id = name(form);
3565
+ id = id === "*" ?
3566
+ "multiply" :
3567
+ id === "/" ?
3568
+ "divide" :
3569
+ id === "+" ?
3570
+ "sum" :
3571
+ id === "-" ?
3572
+ "subtract" :
3573
+ id === "=" ?
3574
+ "equal?" :
3575
+ id === "==" ?
3576
+ "strict-equal?" :
3577
+ id === "<=" ?
3578
+ "not-greater-than" :
3579
+ id === ">=" ?
3580
+ "not-less-than" :
3581
+ id === ">" ?
3582
+ "greater-than" :
3583
+ id === "<" ?
3584
+ "less-than" :
3585
+ "else" ?
3586
+ id :
3587
+ void(0);
3588
+ id = join("_", split(id, "*"));
3589
+ id = join("-to-", split(id, "->"));
3590
+ id = join(split(id, "!"));
3591
+ id = join("$", split(id, "%"));
3592
+ id = join("-plus-", split(id, "+"));
3593
+ id = join("-and-", split(id, "&"));
3594
+ id = last(id) === "?" ?
3595
+ "" + "is-" + (subs(id, 0, dec(count(id)))) :
3596
+ id;
3597
+ id = reduce(function(result, key) {
3598
+ return "" + result + ((!(isEmpty(result))) && (!(isEmpty(key))) ?
3599
+ "" + (upperCase((key || 0)[0])) + (subs(key, 1)) :
3600
+ key);
3601
+ }, "", split(id, "-"));
3602
+ return id;
3603
+ })();
3604
+ };
3605
+ exports.writeReference = writeReference;
3606
+
3607
+ var writeKeywordReference = function writeKeywordReference(form) {
3608
+ return "" + "\"" + (name(form)) + "\"";
3609
+ };
3610
+ exports.writeKeywordReference = writeKeywordReference;
3611
+
3612
+ var writeKeyword = function writeKeyword(form) {
3613
+ return "" + "\"" + "꞉" + (name(form)) + "\"";
3614
+ };
3615
+ exports.writeKeyword = writeKeyword;
3616
+
3617
+ var writeSymbol = function writeSymbol(form) {
3618
+ return write(list(symbol(void(0), "symbol"), namespace(form), name(form)));
3619
+ };
3620
+ exports.writeSymbol = writeSymbol;
3621
+
3622
+ var writeNil = function writeNil(form) {
3623
+ return "void(0)";
3624
+ };
3625
+ exports.writeNil = writeNil;
3626
+
3627
+ var writeNumber = function writeNumber(form) {
3628
+ return form;
3629
+ };
3630
+ exports.writeNumber = writeNumber;
3631
+
3632
+ var writeBoolean = function writeBoolean(form) {
3633
+ return isTrue(form) ?
3634
+ "true" :
3635
+ "false";
3636
+ };
3637
+ exports.writeBoolean = writeBoolean;
3638
+
3639
+ var writeString = function writeString(form) {
3640
+ form = replace(form, RegExp("\\\\", "g"), "\\\\");
3641
+ form = replace(form, RegExp("\n", "g"), "\\n");
3642
+ form = replace(form, RegExp("\r", "g"), "\\r");
3643
+ form = replace(form, RegExp("\t", "g"), "\\t");
3644
+ form = replace(form, RegExp("\"", "g"), "\\\"");
3645
+ return "" + "\"" + form + "\"";
3646
+ };
3647
+ exports.writeString = writeString;
3648
+
3649
+ var writeTemplate = function writeTemplate() {
3650
+ var form = Array.prototype.slice.call(arguments, 0);
3651
+ return (function() {
3652
+ var indentPattern = /\n *$/;
3653
+ var lineBreakPatter = RegExp("\n", "g");
3654
+ var getIndentation = function(code) {
3655
+ return (reFind(indentPattern, code)) || "\n";
3656
+ };
3657
+ return (function loop(code, parts, values) {
3658
+ var recur = loop;
3659
+ while (recur === loop) {
3660
+ recur = count(parts) > 1 ?
3661
+ (code = "" + code + (first(parts)) + (replace("" + "" + (first(values)), lineBreakPatter, getIndentation(first(parts)))), parts = rest(parts), values = rest(values), loop) :
3662
+ "" + code + (first(parts));
3663
+ };
3664
+ return recur;
3665
+ })("", split(first(form), "~{}"), rest(form));
3666
+ })();
3667
+ };
3668
+ exports.writeTemplate = writeTemplate;
3669
+
3670
+ var writeGroup = function writeGroup() {
3671
+ var forms = Array.prototype.slice.call(arguments, 0);
3672
+ return join(", ", forms);
3673
+ };
3674
+ exports.writeGroup = writeGroup;
3675
+
3676
+ var writeInvoke = function writeInvoke(callee) {
3677
+ var params = Array.prototype.slice.call(arguments, 1);
3678
+ return writeTemplate("~{}(~{})", callee, writeGroup.apply(writeGroup, params));
3679
+ };
3680
+ exports.writeInvoke = writeInvoke;
3681
+
3682
+ var writeError = function writeError(message) {
3683
+ return function() {
3684
+ return (function() { throw Error(message); })();
3685
+ };
3686
+ };
3687
+ exports.writeError = writeError;
3688
+
3689
+ var writeVector = writeError("Vectors are not supported");
3690
+ exports.writeVector = writeVector;
3691
+
3692
+ var writeDictionary = writeError("Dictionaries are not supported");
3693
+ exports.writeDictionary = writeDictionary;
3694
+
3695
+ var writePattern = writeError("Regular expressions are not supported");
3696
+ exports.writePattern = writePattern;
3697
+
3698
+ var compileComment = function compileComment(form) {
3699
+ return compileTemplate(list("//~{}\n", first(form)));
3700
+ };
3701
+ exports.compileComment = compileComment;
3702
+
3703
+ var writeDef = function writeDef(form) {
3704
+ var id = first(form);
3705
+ var isExport = ((((meta(form)) || {}) || 0)["top"]) && (!((((meta(id)) || {}) || 0)["private"]));
3706
+ var attribute = symbol(namespace(id), "" + "-" + (name(id)));
3707
+ return isExport ?
3708
+ compileTemplate(list("var ~{};\n~{}", compile(cons(symbol(void(0), "set!"), form)), compile(list(symbol(void(0), "set!"), list(symbol(void(0), "."), symbol(void(0), "exports"), attribute), id)))) :
3709
+ compileTemplate(list("var ~{}", compile(cons(symbol(void(0), "set!"), form))));
3710
+ };
3711
+ exports.writeDef = writeDef;
3712
+
3713
+ var write = function write(form) {
3714
+ return isNil(form) ?
3715
+ writeNil(form) :
3716
+ isSymbol(form) ?
3717
+ writeReference(form) :
3718
+ isKeyword(form) ?
3719
+ writeKeywordReference(form) :
3720
+ isString(form) ?
3721
+ writeString(form) :
3722
+ isNumber(form) ?
3723
+ writeNumber(form) :
3724
+ isBoolean(form) ?
3725
+ writeBoolean(form) :
3726
+ isRePattern(form) ?
3727
+ writePattern(form) :
3728
+ isVector(form) ?
3729
+ writeVector(form) :
3730
+ isDictionary(form) ?
3731
+ writeDictionary() :
3732
+ isList(form) ?
3733
+ writeInvoke.apply(writeInvoke, map(write, vec(form))) :
3734
+ "else" ?
3735
+ writeError("Unsupported form") :
3736
+ void(0);
3737
+ };
3738
+ exports.write = write
3739
+
3740
+ },{"./../../ast":9,"./../../sequence":4,"./../../runtime":1,"./../../string":10}]},{},[2])
3741
+ //@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlcyI6WyIvVXNlcnMvZ296YWxhL1Byb2plY3RzL3dpc3AvdHJ5L25vZGVfbW9kdWxlcy93aXNwL3J1bnRpbWUuanMiLCIvVXNlcnMvZ296YWxhL1Byb2plY3RzL3dpc3AvdHJ5L21haW4uanMiLCIvVXNlcnMvZ296YWxhL1Byb2plY3RzL3dpc3AvdHJ5L25vZGVfbW9kdWxlcy9jb2RlbWlycm9yLWFjdGl2aW5lL2NvcmUuanMiLCIvVXNlcnMvZ296YWxhL1Byb2plY3RzL3dpc3AvdHJ5L25vZGVfbW9kdWxlcy9jb2RlbWlycm9yLXBlcnNpc3QvY29yZS5qcyIsIi9Vc2Vycy9nb3phbGEvUHJvamVjdHMvd2lzcC90cnkvbm9kZV9tb2R1bGVzL3dpc3Avc2VxdWVuY2UuanMiLCIvVXNlcnMvZ296YWxhL1Byb2plY3RzL3dpc3AvdHJ5L25vZGVfbW9kdWxlcy93aXNwL3JlYWRlci5qcyIsIi9Vc2Vycy9nb3phbGEvUHJvamVjdHMvd2lzcC90cnkvbm9kZV9tb2R1bGVzL3dpc3AvY29tcGlsZXIuanMiLCIvVXNlcnMvZ296YWxhL1Byb2plY3RzL3dpc3AvdHJ5L25vZGVfbW9kdWxlcy93aXNwL2VuZ2luZS9icm93c2VyLmpzIiwiL1VzZXJzL2dvemFsYS9Qcm9qZWN0cy93aXNwL3RyeS9ub2RlX21vZHV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vcChwcmV2aW91cywgY3VycmVudCwgaW5kZXgsIGNvdW50KSB7XG4gICAgICAgIHZhciByZWN1ciA9IGxvb3A7XG4gICAgICAgIHdoaWxlIChyZWN1ciA9PT0gbG9vcCkge1xuICAgICAgICAgIHJlY3VyID0gKGlzRXF1aXZhbGVudChwcmV2aW91cywgY3VycmVudCkpICYmIChpbmRleCA8IGNvdW50ID9cbiAgICAgICAgICAocHJldmlvdXMgPSBjdXJyZW50LCBjdXJyZW50ID0gKG1vcmUgfHwgMClbaW5kZXhdLCBpbmRleCA9IGluYyhpbmRleCksIGNvdW50ID0gY291bnQsIGxvb3ApIDpcbiAgICAgICAgICB0cnVlKTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIHJlY3VyO1xuICAgICAgfSkoeCwgeSwgMCwgbW9yZS5sZW5ndGgpO1xuICB9O1xuICByZXR1cm4gdm9pZCgwKTtcbn07XG5cbnZhciBpc0VxdWFsID0gaXNFcXVpdmFsZW50O1xuZXhwb3J0cy5pc0VxdWFsID0gaXNFcXVhbDtcblxudmFyIGlzU3RyaWN0RXF1YWwgPSBmdW5jdGlvbiBpc1N0cmljdEVxdWFsKHgsIHkpIHtcbiAgc3dpdGNoIChhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgY2FzZSAxOlxuICAgICAgcmV0dXJuIHRydWU7XG4gICAgY2FzZSAyOlxuICAgICAgcmV0dXJuIHggPT09IHk7XG5cbiAgICBkZWZhdWx0OlxuICAgICAgdmFyIG1vcmUgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDIpO1xuICAgICAgcmV0dXJuIChmdW5jdGlvbiBsb29wKHByZXZpb3VzLCBjdXJyZW50LCBpbmRleCwgY291bnQpIHtcbiAgICAgICAgdmFyIHJlY3VyID0gbG9vcDtcbiAgICAgICAgd2hpbGUgKHJlY3VyID09PSBsb29wKSB7XG4gICAgICAgICAgcmVjdXIgPSAocHJldmlvdXMgPT09IGN1cnJlbnQpICYmIChpbmRleCA8IGNvdW50ID9cbiAgICAgICAgICAocHJldmlvdXMgPSBjdXJyZW50LCBjdXJyZW50ID0gKG1vcmUgfHwgMClbaW5kZXhdLCBpbmRleCA9IGluYyhpbmRleCksIGNvdW50ID0gY291bnQsIGxvb3ApIDpcbiAgICAgICAgICB0cnVlKTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIHJlY3VyO1xuICAgICAgfSkoeCwgeSwgMCwgbW9yZS5sZW5ndGgpO1xuICB9O1xuICByZXR1cm4gdm9pZCgwKTtcbn07XG5leHBvcnRzLmlzU3RyaWN0RXF1YWwgPSBpc1N0cmljdEVxdWFsO1xuXG52YXIgZ3JlYXRlclRoYW4gPSBmdW5jdGlvbiBncmVhdGVyVGhhbih4LCB5KSB7XG4gIHN3aXRjaCAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgIGNhc2UgMTpcbiAgICAgIHJldHVybiB0cnVlO1xuICAgIGNhc2UgMjpcbiAgICAgIHJldHVybiB4ID4geTtcblxuICAgIGRlZmF1bHQ6XG4gICAgICB2YXIgbW9yZSA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMik7XG4gICAgICByZXR1cm4gKGZ1bmN0aW9uIGxvb3AocHJldmlvdXMsIGN1cnJlbnQsIGluZGV4LCBjb3VudCkge1xuICAgICAgICB2YXIgcmVjdXIgPSBsb29wO1xuICAgICAgICB3aGlsZSAocmVjdXIgPT09IGxvb3ApIHtcbiAgICAgICAgICByZWN1ciA9IChwcmV2aW91cyA+IGN1cnJlbnQpICYmIChpbmRleCA8IGNvdW50ID9cbiAgICAgICAgICAocHJldmlvdXMgPSBjdXJyZW50LCBjdXJyZW50ID0gKG1vcmUgfHwgMClbaW5kZXhdLCBpbmRleCA9IGluYyhpbmRleCksIGNvdW50ID0gY291bnQsIGxvb3ApIDpcbiAgICAgICAgICB0cnVlKTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIHJlY3V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ICAgKGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHZhciBtYWNybyA9IG1hY3JvcyhjaCk7XG4gICAgICAgICAgcmV0dXJuIG1hY3JvID9cbiAgICAgICAgICAgIChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IG1hY3JvKHJlYWRlciwgcmVhZENoYXIocmVhZGVyKSk7XG4gICAgICAgICAgICAgIHJldHVybiAoZm9ybSA9IHJlc3VsdCA9PT0gcmVhZGVyID9cbiAgICAgICAgICAgICAgICBmb3JtIDpcbiAgICAgICAgICAgICAgICBjb25qKGZvcm0sIHJlc3VsdCksIGxvb3ApO1xuICAgICAgICAgICAgfSkoKSA6XG4gICAgICAgICAgICAoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgIHZhciBvID0gcmVhZChyZWFkZXIsIHRydWUsIHZvaWQoMCksIGlzUmVjdXJzaXZlKTtcbiAgICAgICAgICAgICAgcmV0dXJuIChmb3JtID0gbyA9PT0gcmVhZGVyID9cbiAgICAgICAgICAgICAgICBmb3JtIDpcbiAgICAgICAgICAgICAgICBjb25qKGZvcm0sIG8pLCBsb29wKTtcbiAgICAgICAgICAgIH0pKCk7XG4gICAgICAgIH0pKCk7XG4gICAgfSkoKTtcbiAgICB9O1xuICAgIHJldHVybiByZWN1cjtcbiAgfSkoW10pO1xufTtcbmV4cG9ydHMucmVhZERlbGltaXRlZExpc3QgPSByZWFkRGVsaW1pdGVkTGlzdDtcblxudmFyIG5vdEltcGxlbWVudGVkID0gZnVuY3Rpb24gbm90SW1wbGVtZW50ZWQocmVhZGVyLCBjaCkge1xuICByZXR1cm4gcmVhZGVyRXJyb3IocmVhZGVyLCBcIlwiICsgXCJSZWFkZXIgZm9yIFwiICsgY2ggKyBcIiBub3QgaW1wbGVtZW50ZWQgeWV0XCIpO1xufTtcbmV4cG9ydHMubm90SW1wbGVtZW50ZWQgPSBub3RJbXBsZW1lbnRlZDtcblxudmFyIHJlYWREaXNwYXRjaCA9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0gbG9vcDtcbiAgICB3aGlsZSAocmVjdXIgPT09IGxvb3ApIHtcbiAgICAgIHJlY3VyID0gaXNFbXB0eShwYXJhbXMpID9cbiAgICAgIHtcbiAgICAgICAgXCJuYW1lc1wiOiBuYW1lcyxcbiAgICAgICAgXCJhcml0eVwiOiBjb3VudChuYW1lcyksXG4gICAgICAgIFwicmVzdFwiOiB2b2lkKDApXG4gICAgICB9IDpcbiAgICBpc0VxdWFsKGZpcnN0KHBhcmFtcyksIHN5bWJvbCh2b2lkKDApLCBcIiZcIikpID9cbiAgICAgIGlzRXF1YWwoY291bnQocGFyYW1zKSwgMSkgP1xuICAgICAgICB7XG4gICAgICAgICAgXCJuYW1lc1wiOiBuYW1lcyxcbiAgICAgICAgICBcImFyaXR5XCI6IGNvdW50KG5hbWVzKSxcbiAgICAgICAgICBcInJlc3RcIjogdm9pZCgwKVxuICAgICAgICB9IDpcbiAgICAgIGlzRXF1YWwoY291bnQocGFyYW1zKSwgMikgP1xuICAgICAgICB7XG4gICAgICAgICAgXCJuYW1lc1wiOiBuYW1lcyxcbiAgICAgICAgICBcImFyaXR5XCI6IGNvdW50KG5hbWVzKSxcbiAgICAgICAgICBcInJlc3RcIjogc2Vjb25kKHBhcmFtcylcbiAgICAgICAgfSA6XG4gICAgICBcImVsc2VcIiA/XG4gICAgICAgIChmdW5jdGlvbigpIHsgdGhyb3cgVHlwZUVycm9yKFwiVW5leHBlY3RlZCBudW1iZXIgb2YgcGFyYW1ldGVycyBhZnRlciAmXCIpOyB9KSgpIDpcbiAgICAgICAgdm9pZCgwKSA6XG4gICAgXCJlbHNlXCIgP1xuICAgICAgKG5hbWVzID0gY29uaihuYW1lcywgZmlyc3QocGFyYW1zKSksIHBhcmFtcyA9IHJlc3QocGFyYW1zKSwgbG9vcCkgOlxuICAgICAgdm9pZCgwKTtcbiAgICB9O1xuICAgIHJldHVybiByZWN1cjtcbiAgfSkoW10sIHBhcmFtcyk7XG59O1xuZXhwb3J0cy5kZXN1Z2Fy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