spade 0.0.8.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (346) hide show
  1. data/.gitignore +0 -1
  2. data/.gitmodules +4 -4
  3. data/README.md +4 -0
  4. data/bin/spade +1 -1
  5. data/lib/spade.rb +0 -51
  6. data/lib/spade/cli.rb +10 -4
  7. data/lib/spade/version.rb +1 -1
  8. data/spade.gemspec +4 -21
  9. metadata +13 -482
  10. data/Gemfile +0 -3
  11. data/Gemfile.lock +0 -40
  12. data/lib/index.js +0 -14
  13. data/lib/node/loader.js +0 -146
  14. data/lib/node/sandbox.js +0 -44
  15. data/lib/spade.js +0 -1130
  16. data/lib/spade/bundle.rb +0 -171
  17. data/lib/spade/cli/base.rb +0 -354
  18. data/lib/spade/cli/owner.rb +0 -45
  19. data/lib/spade/cli/project_generator.rb +0 -58
  20. data/lib/spade/compiler.rb +0 -34
  21. data/lib/spade/console.rb +0 -39
  22. data/lib/spade/context.rb +0 -116
  23. data/lib/spade/credentials.rb +0 -36
  24. data/lib/spade/dependency_installer.rb +0 -103
  25. data/lib/spade/environment.rb +0 -35
  26. data/lib/spade/exports.rb +0 -71
  27. data/lib/spade/installer.rb +0 -40
  28. data/lib/spade/loader.rb +0 -238
  29. data/lib/spade/local.rb +0 -46
  30. data/lib/spade/package.rb +0 -157
  31. data/lib/spade/reactor.rb +0 -159
  32. data/lib/spade/remote.rb +0 -99
  33. data/lib/spade/repository.rb +0 -18
  34. data/lib/spade/server.rb +0 -66
  35. data/lib/spade/shell.rb +0 -36
  36. data/lib/spade/templates/project/LICENSE +0 -19
  37. data/lib/spade/templates/project/README.md +0 -21
  38. data/lib/spade/templates/project/lib/main.js +0 -9
  39. data/lib/spade/templates/project/project.json +0 -31
  40. data/lib/spade/templates/project/tests/main-test.js +0 -8
  41. data/package.json +0 -27
  42. data/packages/coffee-script/.gitignore +0 -8
  43. data/packages/coffee-script/.npmignore +0 -11
  44. data/packages/coffee-script/Cakefile +0 -229
  45. data/packages/coffee-script/LICENSE +0 -22
  46. data/packages/coffee-script/README +0 -47
  47. data/packages/coffee-script/Rakefile +0 -78
  48. data/packages/coffee-script/bin/cake +0 -7
  49. data/packages/coffee-script/bin/coffee +0 -7
  50. data/packages/coffee-script/documentation/coffee/aliases.coffee +0 -11
  51. data/packages/coffee-script/documentation/coffee/array_comprehensions.coffee +0 -2
  52. data/packages/coffee-script/documentation/coffee/block_comment.coffee +0 -6
  53. data/packages/coffee-script/documentation/coffee/cake_tasks.coffee +0 -9
  54. data/packages/coffee-script/documentation/coffee/classes.coffee +0 -25
  55. data/packages/coffee-script/documentation/coffee/comparisons.coffee +0 -5
  56. data/packages/coffee-script/documentation/coffee/conditionals.coffee +0 -13
  57. data/packages/coffee-script/documentation/coffee/default_args.coffee +0 -8
  58. data/packages/coffee-script/documentation/coffee/do.coffee +0 -4
  59. data/packages/coffee-script/documentation/coffee/embedded.coffee +0 -5
  60. data/packages/coffee-script/documentation/coffee/existence.coffee +0 -10
  61. data/packages/coffee-script/documentation/coffee/expressions.coffee +0 -9
  62. data/packages/coffee-script/documentation/coffee/expressions_assignment.coffee +0 -3
  63. data/packages/coffee-script/documentation/coffee/expressions_comprehension.coffee +0 -3
  64. data/packages/coffee-script/documentation/coffee/expressions_try.coffee +0 -7
  65. data/packages/coffee-script/documentation/coffee/fat_arrow.coffee +0 -6
  66. data/packages/coffee-script/documentation/coffee/functions.coffee +0 -2
  67. data/packages/coffee-script/documentation/coffee/heredocs.coffee +0 -7
  68. data/packages/coffee-script/documentation/coffee/heregexes.coffee +0 -11
  69. data/packages/coffee-script/documentation/coffee/interpolation.coffee +0 -6
  70. data/packages/coffee-script/documentation/coffee/multiple_return_values.coffee +0 -7
  71. data/packages/coffee-script/documentation/coffee/object_comprehensions.coffee +0 -4
  72. data/packages/coffee-script/documentation/coffee/object_extraction.coffee +0 -13
  73. data/packages/coffee-script/documentation/coffee/objects_and_arrays.coffee +0 -19
  74. data/packages/coffee-script/documentation/coffee/objects_reserved.coffee +0 -5
  75. data/packages/coffee-script/documentation/coffee/overview.coffee +0 -28
  76. data/packages/coffee-script/documentation/coffee/parallel_assignment.coffee +0 -6
  77. data/packages/coffee-script/documentation/coffee/patterns_and_splats.coffee +0 -7
  78. data/packages/coffee-script/documentation/coffee/prototypes.coffee +0 -3
  79. data/packages/coffee-script/documentation/coffee/range_comprehensions.coffee +0 -2
  80. data/packages/coffee-script/documentation/coffee/scope.coffee +0 -5
  81. data/packages/coffee-script/documentation/coffee/slices.coffee +0 -7
  82. data/packages/coffee-script/documentation/coffee/soaks.coffee +0 -1
  83. data/packages/coffee-script/documentation/coffee/splats.coffee +0 -27
  84. data/packages/coffee-script/documentation/coffee/splices.coffee +0 -5
  85. data/packages/coffee-script/documentation/coffee/strings.coffee +0 -8
  86. data/packages/coffee-script/documentation/coffee/switch.coffee +0 -10
  87. data/packages/coffee-script/documentation/coffee/try.coffee +0 -8
  88. data/packages/coffee-script/documentation/coffee/while.coffee +0 -10
  89. data/packages/coffee-script/documentation/css/docs.css +0 -374
  90. data/packages/coffee-script/documentation/css/idle.css +0 -64
  91. data/packages/coffee-script/documentation/docs/browser.html +0 -25
  92. data/packages/coffee-script/documentation/docs/cake.html +0 -43
  93. data/packages/coffee-script/documentation/docs/coffee-script.html +0 -51
  94. data/packages/coffee-script/documentation/docs/command.html +0 -161
  95. data/packages/coffee-script/documentation/docs/docco.css +0 -186
  96. data/packages/coffee-script/documentation/docs/grammar.html +0 -399
  97. data/packages/coffee-script/documentation/docs/helpers.html +0 -31
  98. data/packages/coffee-script/documentation/docs/index.html +0 -3
  99. data/packages/coffee-script/documentation/docs/lexer.html +0 -490
  100. data/packages/coffee-script/documentation/docs/nodes.html +0 -1338
  101. data/packages/coffee-script/documentation/docs/optparse.html +0 -78
  102. data/packages/coffee-script/documentation/docs/repl.html +0 -24
  103. data/packages/coffee-script/documentation/docs/rewriter.html +0 -251
  104. data/packages/coffee-script/documentation/docs/scope.html +0 -54
  105. data/packages/coffee-script/documentation/docs/underscore.html +0 -295
  106. data/packages/coffee-script/documentation/images/background.png +0 -0
  107. data/packages/coffee-script/documentation/images/banding.png +0 -0
  108. data/packages/coffee-script/documentation/images/button_bg.png +0 -0
  109. data/packages/coffee-script/documentation/images/button_bg_dark.gif +0 -0
  110. data/packages/coffee-script/documentation/images/button_bg_green.gif +0 -0
  111. data/packages/coffee-script/documentation/images/favicon.ico +0 -0
  112. data/packages/coffee-script/documentation/images/logo.png +0 -0
  113. data/packages/coffee-script/documentation/images/screenshadow.png +0 -0
  114. data/packages/coffee-script/documentation/index.html.erb +0 -1607
  115. data/packages/coffee-script/documentation/js/aliases.js +0 -17
  116. data/packages/coffee-script/documentation/js/array_comprehensions.js +0 -6
  117. data/packages/coffee-script/documentation/js/block_comment.js +0 -4
  118. data/packages/coffee-script/documentation/js/cake_tasks.js +0 -10
  119. data/packages/coffee-script/documentation/js/classes.js +0 -44
  120. data/packages/coffee-script/documentation/js/comparisons.js +0 -3
  121. data/packages/coffee-script/documentation/js/conditionals.js +0 -12
  122. data/packages/coffee-script/documentation/js/default_args.js +0 -7
  123. data/packages/coffee-script/documentation/js/do.js +0 -10
  124. data/packages/coffee-script/documentation/js/embedded.js +0 -4
  125. data/packages/coffee-script/documentation/js/existence.js +0 -6
  126. data/packages/coffee-script/documentation/js/expressions.js +0 -15
  127. data/packages/coffee-script/documentation/js/expressions_assignment.js +0 -2
  128. data/packages/coffee-script/documentation/js/expressions_comprehension.js +0 -9
  129. data/packages/coffee-script/documentation/js/expressions_try.js +0 -7
  130. data/packages/coffee-script/documentation/js/fat_arrow.js +0 -9
  131. data/packages/coffee-script/documentation/js/functions.js +0 -7
  132. data/packages/coffee-script/documentation/js/heredocs.js +0 -2
  133. data/packages/coffee-script/documentation/js/heregexes.js +0 -2
  134. data/packages/coffee-script/documentation/js/interpolation.js +0 -4
  135. data/packages/coffee-script/documentation/js/multiple_return_values.js +0 -5
  136. data/packages/coffee-script/documentation/js/object_comprehensions.js +0 -15
  137. data/packages/coffee-script/documentation/js/object_extraction.js +0 -10
  138. data/packages/coffee-script/documentation/js/objects_and_arrays.js +0 -17
  139. data/packages/coffee-script/documentation/js/objects_reserved.js +0 -4
  140. data/packages/coffee-script/documentation/js/overview.js +0 -35
  141. data/packages/coffee-script/documentation/js/parallel_assignment.js +0 -4
  142. data/packages/coffee-script/documentation/js/patterns_and_splats.js +0 -4
  143. data/packages/coffee-script/documentation/js/prototypes.js +0 -3
  144. data/packages/coffee-script/documentation/js/range_comprehensions.js +0 -9
  145. data/packages/coffee-script/documentation/js/scope.js +0 -8
  146. data/packages/coffee-script/documentation/js/slices.js +0 -4
  147. data/packages/coffee-script/documentation/js/soaks.js +0 -2
  148. data/packages/coffee-script/documentation/js/splats.js +0 -15
  149. data/packages/coffee-script/documentation/js/splices.js +0 -3
  150. data/packages/coffee-script/documentation/js/strings.js +0 -2
  151. data/packages/coffee-script/documentation/js/switch.js +0 -23
  152. data/packages/coffee-script/documentation/js/try.js +0 -8
  153. data/packages/coffee-script/documentation/js/while.js +0 -18
  154. data/packages/coffee-script/documentation/vendor/jquery-1.4.2.js +0 -6240
  155. data/packages/coffee-script/examples/beautiful_code/binary_search.coffee +0 -16
  156. data/packages/coffee-script/examples/beautiful_code/quicksort_runtime.coffee +0 -13
  157. data/packages/coffee-script/examples/beautiful_code/regular_expression_matcher.coffee +0 -34
  158. data/packages/coffee-script/examples/blocks.coffee +0 -54
  159. data/packages/coffee-script/examples/code.coffee +0 -167
  160. data/packages/coffee-script/examples/computer_science/README +0 -4
  161. data/packages/coffee-script/examples/computer_science/binary_search.coffee +0 -25
  162. data/packages/coffee-script/examples/computer_science/bubble_sort.coffee +0 -11
  163. data/packages/coffee-script/examples/computer_science/linked_list.coffee +0 -108
  164. data/packages/coffee-script/examples/computer_science/luhn_algorithm.coffee +0 -36
  165. data/packages/coffee-script/examples/computer_science/merge_sort.coffee +0 -19
  166. data/packages/coffee-script/examples/computer_science/selection_sort.coffee +0 -23
  167. data/packages/coffee-script/examples/poignant.coffee +0 -181
  168. data/packages/coffee-script/examples/potion.coffee +0 -206
  169. data/packages/coffee-script/examples/underscore.coffee +0 -682
  170. data/packages/coffee-script/examples/web_server.coffee +0 -12
  171. data/packages/coffee-script/extras/EXTRAS +0 -7
  172. data/packages/coffee-script/extras/coffee-script.js +0 -8
  173. data/packages/coffee-script/extras/jsl.conf +0 -44
  174. data/packages/coffee-script/index.html +0 -2515
  175. data/packages/coffee-script/lib/browser.js +0 -52
  176. data/packages/coffee-script/lib/cake.js +0 -76
  177. data/packages/coffee-script/lib/coffee-script.js +0 -82
  178. data/packages/coffee-script/lib/command.js +0 -263
  179. data/packages/coffee-script/lib/grammar.js +0 -581
  180. data/packages/coffee-script/lib/helpers.js +0 -66
  181. data/packages/coffee-script/lib/index.js +0 -8
  182. data/packages/coffee-script/lib/lexer.js +0 -633
  183. data/packages/coffee-script/lib/nodes.js +0 -2165
  184. data/packages/coffee-script/lib/optparse.js +0 -111
  185. data/packages/coffee-script/lib/parser.js +0 -649
  186. data/packages/coffee-script/lib/repl.js +0 -42
  187. data/packages/coffee-script/lib/rewriter.js +0 -353
  188. data/packages/coffee-script/lib/scope.js +0 -120
  189. data/packages/coffee-script/lib/spade-format.js +0 -45
  190. data/packages/coffee-script/package.json +0 -26
  191. data/packages/coffee-script/src/browser.coffee +0 -43
  192. data/packages/coffee-script/src/cake.coffee +0 -69
  193. data/packages/coffee-script/src/coffee-script.coffee +0 -92
  194. data/packages/coffee-script/src/command.coffee +0 -214
  195. data/packages/coffee-script/src/grammar.coffee +0 -590
  196. data/packages/coffee-script/src/helpers.coffee +0 -56
  197. data/packages/coffee-script/src/index.coffee +0 -2
  198. data/packages/coffee-script/src/lexer.coffee +0 -653
  199. data/packages/coffee-script/src/nodes.coffee +0 -1754
  200. data/packages/coffee-script/src/optparse.coffee +0 -99
  201. data/packages/coffee-script/src/repl.coffee +0 -42
  202. data/packages/coffee-script/src/rewriter.coffee +0 -326
  203. data/packages/coffee-script/src/scope.coffee +0 -94
  204. data/packages/coffee-script/test/arguments.coffee +0 -127
  205. data/packages/coffee-script/test/assignment.coffee +0 -98
  206. data/packages/coffee-script/test/break.coffee +0 -18
  207. data/packages/coffee-script/test/comments.coffee +0 -201
  208. data/packages/coffee-script/test/conditionals.coffee +0 -181
  209. data/packages/coffee-script/test/exception_handling.coffee +0 -90
  210. data/packages/coffee-script/test/helpers.coffee +0 -96
  211. data/packages/coffee-script/test/importing.coffee +0 -18
  212. data/packages/coffee-script/test/operators.coffee +0 -225
  213. data/packages/coffee-script/test/ranges_slices_and_splices.coffee +0 -186
  214. data/packages/coffee-script/test/regular_expressions.coffee +0 -56
  215. data/packages/coffee-script/test/test.html +0 -123
  216. data/packages/coffee-script/test/test_chaining.coffee +0 -77
  217. data/packages/coffee-script/test/test_classes.coffee +0 -372
  218. data/packages/coffee-script/test/test_compilation.coffee +0 -26
  219. data/packages/coffee-script/test/test_comprehensions.coffee +0 -318
  220. data/packages/coffee-script/test/test_existence.coffee +0 -165
  221. data/packages/coffee-script/test/test_functions.coffee +0 -379
  222. data/packages/coffee-script/test/test_heredocs.coffee +0 -111
  223. data/packages/coffee-script/test/test_literals.coffee +0 -270
  224. data/packages/coffee-script/test/test_option_parser.coffee +0 -27
  225. data/packages/coffee-script/test/test_pattern_matching.coffee +0 -162
  226. data/packages/coffee-script/test/test_returns.coffee +0 -63
  227. data/packages/coffee-script/test/test_splats.coffee +0 -102
  228. data/packages/coffee-script/test/test_strings.coffee +0 -118
  229. data/packages/coffee-script/test/test_switch.coffee +0 -103
  230. data/packages/coffee-script/test/test_while.coffee +0 -71
  231. data/packages/ivory/LICENSE.txt +0 -1
  232. data/packages/ivory/README.md +0 -19
  233. data/packages/ivory/lib/buffer.js +0 -111
  234. data/packages/ivory/lib/events.js +0 -137
  235. data/packages/ivory/lib/fs.js +0 -266
  236. data/packages/ivory/lib/main.js +0 -13
  237. data/packages/ivory/lib/path.js +0 -158
  238. data/packages/ivory/lib/ruby/buffer.rb +0 -145
  239. data/packages/ivory/lib/ruby/constants.rb +0 -585
  240. data/packages/ivory/lib/ruby/events.rb +0 -32
  241. data/packages/ivory/lib/ruby/fs.rb +0 -245
  242. data/packages/ivory/lib/ruby/process.rb +0 -28
  243. data/packages/ivory/lib/stream.js +0 -115
  244. data/packages/ivory/lib/util.js +0 -414
  245. data/packages/ivory/package.json +0 -11
  246. data/packages/jquery/main.js +0 -7179
  247. data/packages/jquery/package.json +0 -10
  248. data/packages/json/lib/main.js +0 -14
  249. data/packages/json/package.json +0 -8
  250. data/packages/lproj/README.md +0 -77
  251. data/packages/lproj/examples/demo-app/en.lproj/localized.strings +0 -2
  252. data/packages/lproj/examples/demo-app/fr.lproj/localized.strings +0 -3
  253. data/packages/lproj/examples/demo-app/index.html +0 -8
  254. data/packages/lproj/examples/demo-app/lib/main.js +0 -7
  255. data/packages/lproj/examples/demo-app/package.json +0 -9
  256. data/packages/lproj/lib/main.js +0 -78
  257. data/packages/lproj/lib/strings-format.js +0 -6
  258. data/packages/lproj/package.json +0 -9
  259. data/packages/optparse/README.md +0 -161
  260. data/packages/optparse/TODO +0 -1
  261. data/packages/optparse/examples/browser-test.html +0 -75
  262. data/packages/optparse/examples/nodejs-test.js +0 -90
  263. data/packages/optparse/lib/optparse.js +0 -309
  264. data/packages/optparse/package.json +0 -13
  265. data/packages/optparse/seed.yml +0 -5
  266. data/packages/text/lib/main.js +0 -8
  267. data/packages/text/package.json +0 -9
  268. data/packages/web-file/README.md +0 -7
  269. data/packages/web-file/lib/errors.js +0 -32
  270. data/packages/web-file/lib/file-reader.js +0 -10
  271. data/packages/web-file/lib/file-system.js +0 -234
  272. data/packages/web-file/lib/file-writer.js +0 -10
  273. data/packages/web-file/lib/file.js +0 -9
  274. data/packages/web-file/lib/main.js +0 -34
  275. data/packages/web-file/lib/platform.js +0 -25
  276. data/packages/web-file/lib/ruby/file.rb +0 -252
  277. data/packages/web-file/lib/ruby/file_reader.rb +0 -69
  278. data/packages/web-file/lib/ruby/file_system.rb +0 -134
  279. data/packages/web-file/lib/ruby/file_writer.rb +0 -78
  280. data/packages/web-file/package.json +0 -12
  281. data/packages/web-typed-array/README.md +0 -7
  282. data/packages/web-typed-array/lib/array-buffer-view.js +0 -9
  283. data/packages/web-typed-array/lib/array-buffer.js +0 -7
  284. data/packages/web-typed-array/lib/main.js +0 -33
  285. data/packages/web-typed-array/lib/platform.js +0 -20
  286. data/packages/web-typed-array/lib/ruby/array_buffer.rb +0 -31
  287. data/packages/web-typed-array/lib/ruby/array_buffer_view.rb +0 -130
  288. data/packages/web-typed-array/lib/ruby/typed_array.rb +0 -133
  289. data/packages/web-typed-array/lib/typed-array.js +0 -26
  290. data/packages/web-typed-array/package.json +0 -9
  291. data/spec/cli/build_spec.rb +0 -59
  292. data/spec/cli/install_spec.rb +0 -120
  293. data/spec/cli/installed_spec.rb +0 -55
  294. data/spec/cli/list_spec.rb +0 -75
  295. data/spec/cli/login_spec.rb +0 -76
  296. data/spec/cli/new_spec.rb +0 -5
  297. data/spec/cli/owner_spec.rb +0 -115
  298. data/spec/cli/push_spec.rb +0 -74
  299. data/spec/cli/uninstall_spec.rb +0 -58
  300. data/spec/cli/unpack_spec.rb +0 -73
  301. data/spec/cli/unyank_spec.rb +0 -74
  302. data/spec/cli/update_spec.rb +0 -8
  303. data/spec/cli/yank_spec.rb +0 -74
  304. data/spec/credentials_spec.rb +0 -24
  305. data/spec/fixtures/coffee-1.0.1.pre.spd +0 -0
  306. data/spec/fixtures/core-test-0.4.3.spd +0 -0
  307. data/spec/fixtures/core-test/bin/cot +0 -3
  308. data/spec/fixtures/core-test/lib/main.js +0 -1
  309. data/spec/fixtures/core-test/resources/runner.css +0 -0
  310. data/spec/fixtures/core-test/tests/test.js +0 -1
  311. data/spec/fixtures/ivory-0.0.1.spd +0 -0
  312. data/spec/fixtures/jquery-1.4.3.spd +0 -0
  313. data/spec/fixtures/optparse-1.0.1.spd +0 -0
  314. data/spec/fixtures/package.json +0 -30
  315. data/spec/gauntlet_spec.rb +0 -27
  316. data/spec/javascript/async-test.js +0 -123
  317. data/spec/javascript/compiler/javascript.js +0 -13
  318. data/spec/javascript/compiler/ruby.js +0 -14
  319. data/spec/javascript/loader-test.js +0 -64
  320. data/spec/javascript/normalize-test.js +0 -73
  321. data/spec/javascript/packages-test.js +0 -44
  322. data/spec/javascript/relative-require-test.js +0 -72
  323. data/spec/javascript/require-test.js +0 -117
  324. data/spec/javascript/sandbox/compile.js +0 -37
  325. data/spec/javascript/sandbox/creation.js +0 -44
  326. data/spec/javascript/sandbox/format.js +0 -79
  327. data/spec/javascript/sandbox/misc.js +0 -57
  328. data/spec/javascript/sandbox/preprocessor.js +0 -81
  329. data/spec/javascript/sandbox/require.js +0 -48
  330. data/spec/javascript/sandbox/run-command.js +0 -21
  331. data/spec/javascript/spade/externs.js +0 -14
  332. data/spec/javascript/spade/load-factory.js +0 -15
  333. data/spec/javascript/spade/misc.js +0 -23
  334. data/spec/javascript/spade/ready.js +0 -12
  335. data/spec/javascript/spade/register.js +0 -13
  336. data/spec/javascript_spec.rb +0 -7
  337. data/spec/package_spec.rb +0 -267
  338. data/spec/spec_helper.rb +0 -30
  339. data/spec/support/cli.rb +0 -94
  340. data/spec/support/core_test.rb +0 -59
  341. data/spec/support/fake.rb +0 -44
  342. data/spec/support/fake_gem_server.rb +0 -66
  343. data/spec/support/fake_gemcutter.rb +0 -49
  344. data/spec/support/matchers.rb +0 -31
  345. data/spec/support/path.rb +0 -54
  346. data/test-spade.html +0 -8
@@ -1,12 +0,0 @@
1
- # Contributed by Jason Huggins
2
-
3
- http = require 'http'
4
-
5
- server = http.createServer (req, res) ->
6
- res.writeHeader 200, 'Content-Type': 'text/plain'
7
- res.write 'Hello, World!'
8
- res.end()
9
-
10
- server.listen 3000
11
-
12
- console.log "Server running at http://localhost:3000/"
@@ -1,7 +0,0 @@
1
- EXTRAS:
2
-
3
- "extras/coffee-script.js" is a concatenated and compressed version of the
4
- CoffeeScript compiler. To use it in the browser, include the script after any
5
- inline script tags of type "text/coffeescript" on the page. It will compile
6
- and evaluate all of the scripts in order.
7
-
@@ -1,8 +0,0 @@
1
- /**
2
- * CoffeeScript Compiler v1.0.0
3
- * http://coffeescript.org
4
- *
5
- * Copyright 2010, Jeremy Ashkenas
6
- * Released under the MIT License
7
- */
8
- this.CoffeeScript=function(){function require(a){return require[a]}require["./helpers"]=new function(){var a=this;(function(){var b,c;a.starts=function(a,b,c){return b===a.substr(c,b.length)},a.ends=function(a,b,c){var d;d=b.length;return b===a.substr(a.length-d-(c||0),d)},a.compact=function(a){var b,c,d,e;e=[];for(c=0,d=a.length;c<d;c++)b=a[c],b&&e.push(b);return e},a.count=function(a,b){var c,d;c=d=0;if(!b.length)return 1/0;while(d=1+a.indexOf(b,d))c++;return c},a.merge=function(a,c){return b(b({},a),c)},b=a.extend=function(a,b){var c,d;for(c in b)d=b[c],a[c]=d;return a},a.flatten=c=function(a){var b,d,e,f;d=[];for(e=0,f=a.length;e<f;e++)b=a[e],b instanceof Array?d=d.concat(c(b)):d.push(b);return d},a.del=function(a,b){var c;c=a[b],delete a[b];return c},a.last=function(a,b){return a[a.length-(b||0)-1]}}).call(this)},require["./rewriter"]=new function(){var a=this;(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;var t=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]===a)return b;return-1},u=Array.prototype.slice;a.Rewriter=function(){function a(){}a.prototype.rewrite=function(a){this.tokens=a,this.removeLeadingNewlines(),this.removeMidExpressionNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.addImplicitIndentation(),this.tagPostfixConditionals(),this.addImplicitBraces(),this.addImplicitParentheses(),this.ensureBalance(b),this.rewriteClosingParens();return this.tokens},a.prototype.scanTokens=function(a){var b,c,d;d=this.tokens,b=0;while(c=d[b])b+=a.call(this,c,b,d);return true},a.prototype.detectEnd=function(a,b,c){var f,g,h,i,j;h=this.tokens,f=0;while(g=h[a]){if(f===0&&b.call(this,g,a))return c.call(this,g,a);if(!g||f<0)return c.call(this,g,a-1);if(i=g[0],t.call(e,i)>=0)f+=1;else if(j=g[0],t.call(d,j)>=0)f-=1;a+=1}return a-1},a.prototype.removeLeadingNewlines=function(){var a,b,c,d;d=this.tokens;for(a=0,c=d.length;a<c;a++){b=d[a][0];if(b!=="TERMINATOR")break}if(a)return this.tokens.splice(0,a)},a.prototype.removeMidExpressionNewlines=function(){return this.scanTokens(function(a,b,d){var e;if(!(a[0]==="TERMINATOR"&&(e=this.tag(b+1),t.call(c,e)>=0)))return 1;d.splice(b,1);return 0})},a.prototype.closeOpenCalls=function(){var a,b;b=function(a,b){var c;return(c=a[0])===")"||c==="CALL_END"||a[0]==="OUTDENT"&&this.tag(b-1)===")"},a=function(a,b){return this.tokens[a[0]==="OUTDENT"?b-1:b][0]="CALL_END"};return this.scanTokens(function(c,d){c[0]==="CALL_START"&&this.detectEnd(d+1,b,a);return 1})},a.prototype.closeOpenIndexes=function(){var a,b;b=function(a,b){var c;return(c=a[0])==="]"||c==="INDEX_END"},a=function(a,b){return a[0]="INDEX_END"};return this.scanTokens(function(c,d){c[0]==="INDEX_START"&&this.detectEnd(d+1,b,a);return 1})},a.prototype.addImplicitBraces=function(){var a,b,c,f,g;c=[],f=null,g=0,b=function(a,b){var c,d,e,f,g,h;g=this.tokens.slice(b+1,b+3+1||9e9),c=g[0],f=g[1],e=g[2];if("HERECOMMENT"===(c!=null?c[0]:void 0))return false;d=a[0];return(d==="TERMINATOR"||d==="OUTDENT")&&!((f!=null?f[0]:void 0)===":"||(c!=null?c[0]:void 0)==="@"&&(e!=null?e[0]:void 0)===":")||d===","&&c&&((h=c[0])!=="IDENTIFIER"&&h!=="NUMBER"&&h!=="STRING"&&h!=="@"&&h!=="TERMINATOR"&&h!=="OUTDENT")},a=function(a,b){return this.tokens.splice(b,0,["}","}",a[2]])};return this.scanTokens(function(g,h,i){var j,k,l,m,n,o,p;if(o=l=g[0],t.call(e,o)>=0){c.push([l==="INDENT"&&this.tag(h-1)==="{"?"{":l,h]);return 1}if(t.call(d,l)>=0){f=c.pop();return 1}if(!(l===":"&&((j=this.tag(h-2))===":"||((p=c[c.length-1])!=null?p[0]:void 0)!=="{")))return 1;c.push(["{"]),k=j==="@"?h-2:h-1;while(this.tag(k-2)==="HERECOMMENT")k-=2;n=new String("{"),n.generated=true,m=["{",n,g[2]],m.generated=true,i.splice(k,0,m),this.detectEnd(h+2,b,a);return 2})},a.prototype.addImplicitParentheses=function(){var a,b;b=false,a=function(a,b){var c;c=a[0]==="OUTDENT"?b+1:b;return this.tokens.splice(c,0,["CALL_END",")",a[2]])};return this.scanTokens(function(c,d,e){var k,m,n,o,p,q,r,s,u;q=c[0];if(q==="CLASS"||q==="IF")b=true;r=e.slice(d-1,d+1+1||9e9),o=r[0],m=r[1],n=r[2],k=!b&&q==="INDENT"&&n&&n.generated&&n[0]==="{"&&o&&(s=o[0],t.call(i,s)>=0),p=false,t.call(l,q)>=0&&(b=false),o&&!o.spaced&&q==="?"&&(c.call=true);if(!(k||(o!=null?o.spaced:void 0)&&(o.call||(u=o[0],t.call(i,u)>=0))&&(t.call(g,q)>=0||!(c.spaced||c.newLine)&&t.call(j,q)>=0)))return 1;e.splice(d,0,["CALL_START","(",c[2]]),this.detectEnd(d+1,function(a,b){var c,d;q=a[0];if(!p&&a.fromThen)return true;if(q==="IF"||q==="ELSE"||q==="->"||q==="=>")p=true;if((q==="."||q==="?."||q==="::")&&this.tag(b-1)==="OUTDENT")return true;return!a.generated&&this.tag(b-1)!==","&&t.call(h,q)>=0&&(q!=="INDENT"||this.tag(b-2)!=="CLASS"&&(d=this.tag(b-1),t.call(f,d)<0)&&!((c=this.tokens[b+1])&&c.generated&&c[0]==="{"))},a),o[0]==="?"&&(o[0]="FUNC_EXIST");return 2})},a.prototype.addImplicitIndentation=function(){return this.scanTokens(function(a,b,c){var d,e,f,g,h,i,j,k;i=a[0];if(i==="TERMINATOR"&&this.tag(b+1)==="THEN"){c.splice(b,1);return 0}if(i==="ELSE"&&this.tag(b-1)!=="OUTDENT"){c.splice.apply(c,[b,0].concat(u.call(this.indentation(a))));return 2}if(i==="CATCH"&&((j=this.tag(b+2))==="OUTDENT"||j==="TERMINATOR"||j==="FINALLY")){c.splice.apply(c,[b+2,0].concat(u.call(this.indentation(a))));return 4}if(t.call(n,i)>=0&&this.tag(b+1)!=="INDENT"&&!(i==="ELSE"&&this.tag(b+1)==="IF")){h=i,k=this.indentation(a),f=k[0],g=k[1],h==="THEN"&&(f.fromThen=true),f.generated=g.generated=true,c.splice(b+1,0,f),e=function(a,b){var c;return a[1]!==";"&&(c=a[0],t.call(m,c)>=0)&&!(a[0]==="ELSE"&&(h!=="IF"&&h!=="THEN"))},d=function(a,b){return this.tokens.splice(this.tag(b-1)===","?b-1:b,0,g)},this.detectEnd(b+2,e,d),i==="THEN"&&c.splice(b,1);return 1}return 1})},a.prototype.tagPostfixConditionals=function(){var a;a=function(a,b){var c;return(c=a[0])==="TERMINATOR"||c==="INDENT"};return this.scanTokens(function(b,c){var d;if(b[0]!=="IF")return 1;d=b,this.detectEnd(c+1,a,function(a,b){if(a[0]!=="INDENT")return d[0]="POST_"+d[0]});return 1})},a.prototype.ensureBalance=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;d={},f={},m=this.tokens;for(i=0,k=m.length;i<k;i++){h=m[i],g=h[0];for(j=0,l=a.length;j<l;j++){n=a[j],e=n[0],b=n[1],d[e]|=0;if(g===e)d[e]++===0&&(f[e]=h[2]);else if(g===b&&--d[e]<0)throw Error("too many "+h[1]+" on line "+(h[2]+1))}}for(e in d){c=d[e];if(c>0)throw Error("unclosed "+e+" on line "+(f[e]+1))}return this},a.prototype.rewriteClosingParens=function(){var a,b,c;c=[],a={};for(b in k)a[b]=0;return this.scanTokens(function(b,f,g){var h,i,j,l,m,n,o;if(o=m=b[0],t.call(e,o)>=0){c.push(b);return 1}if(t.call(d,m)<0)return 1;if(a[h=k[m]]>0){a[h]-=1,g.splice(f,1);return 0}i=c.pop(),j=i[0],l=k[j];if(m===l)return 1;a[j]+=1,n=[l,j==="INDENT"?i[1]:l],this.tag(f+2)===j?(g.splice(f+3,0,n),c.push(i)):g.splice(f,0,n);return 1})},a.prototype.indentation=function(a){return[["INDENT",2,a[2]],["OUTDENT",2,a[2]]]},a.prototype.tag=function(a){var b;return(b=this.tokens[a])!=null?b[0]:void 0};return a}(),b=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"]],k={},e=[],d=[];for(q=0,r=b.length;q<r;q++)s=b[q],o=s[0],p=s[1],e.push(k[p]=o),d.push(k[o]=p);c=["CATCH","WHEN","ELSE","FINALLY"].concat(d),i=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],g=["IDENTIFIER","NUMBER","STRING","JS","REGEX","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","UNARY","SUPER","@","->","=>","[","(","{","--","++"],j=["+","-"],f=["->","=>","{","[",","],h=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR","INDENT"],n=["ELSE","->","=>","TRY","FINALLY","THEN"],m=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],l=["TERMINATOR","INDENT","OUTDENT"]}).call(this)},require["./lexer"]=new function(){var a=this;(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T;var U=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]===a)return b;return-1};I=require("./rewriter").Rewriter,T=require("./helpers"),P=T.count,S=T.starts,O=T.compact,Q=T.last,a.Lexer=w=function(){function a(){}a.prototype.tokenize=function(a,b){var c;b==null&&(b={}),a=a.replace(/\r/g,"").replace(L,""),this.code=a,this.line=b.line||0,this.indent=0,this.indebt=0,this.outdebt=0,this.indents=[],this.tokens=[],c=0;while(this.chunk=a.slice(c))c+=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.heredocToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken();this.closeIndentation();if(b.rewrite===false)return this.tokens;return(new I).rewrite(this.tokens)},a.prototype.identifierToken=function(){var a,b,c,d,e,h,i,j,k;if(!(e=o.exec(this.chunk)))return 0;d=e[0],c=e[1],a=e[2];if(c==="own"&&this.tag()==="FOR"){this.token("OWN",c);return c.length}b=a||(h=Q(this.tokens))&&!h.spaced&&((j=h[0])==="."||j==="?."||j==="@"||j==="::"),i="IDENTIFIER";if(U.call(s,c)>=0||!b&&U.call(g,c)>=0)i=c.toUpperCase(),i==="WHEN"&&(k=this.tag(),U.call(t,k)>=0)?i="LEADING_WHEN":i==="FOR"?this.seenFor=true:i==="UNLESS"?i="IF":U.call(M,i)>=0?i="UNARY":U.call(G,i)>=0&&(i!=="INSTANCEOF"&&this.seenFor?(i="FOR"+i,this.seenFor=false):(i="RELATION",this.value()==="!"&&(this.tokens.pop(),c="!"+c)));U.call(r,c)>=0&&(b?(i="IDENTIFIER",c=new String(c),c.reserved=true):U.call(H,c)>=0&&this.identifierError(c)),b||(f.hasOwnProperty(c)&&(c=f[c]),i=function(){switch(c){case"!":return"UNARY";case"==":case"!=":return"COMPARE";case"&&":case"||":return"LOGIC";case"true":case"false":case"null":case"undefined":return"BOOL";case"break":case"continue":case"debugger":return"STATEMENT";default:return i}}()),this.token(i,c),a&&this.token(":",":");return d.length},a.prototype.numberToken=function(){var a,b;if(!(a=D.exec(this.chunk)))return 0;b=a[0],this.token("NUMBER",b);return b.length},a.prototype.stringToken=function(){var a,b;switch(this.chunk.charAt(0)){case"'":if(!(a=K.exec(this.chunk)))return 0;this.token("STRING",(b=a[0]).replace(y,"\\\n"));break;case"\"":if(!(b=this.balancedString(this.chunk,"\"")))return 0;0<b.indexOf("#{",1)?this.interpolateString(b.slice(1,-1)):this.token("STRING",this.escapeLines(b));break;default:return 0}this.line+=P(b,"\n");return b.length},a.prototype.heredocToken=function(){var a,b,c,d;if(!(c=k.exec(this.chunk)))return 0;b=c[0],d=b.charAt(0),a=this.sanitizeHeredoc(c[2],{quote:d,indent:null}),d==="\""&&0<=a.indexOf("#{")?this.interpolateString(a,{heredoc:true}):this.token("STRING",this.makeString(a,d,true)),this.line+=P(b,"\n");return b.length},a.prototype.commentToken=function(){var a,b,c;if(!(c=this.chunk.match(h)))return 0;a=c[0],b=c[1],this.line+=P(a,"\n"),b&&(this.token("HERECOMMENT",this.sanitizeHeredoc(b,{herecomment:true,indent:Array(this.indent+1).join(" ")})),this.token("TERMINATOR","\n"));return a.length},a.prototype.jsToken=function(){var a,b;if(!(this.chunk.charAt(0)==="`"&&(a=q.exec(this.chunk))))return 0;this.token("JS",(b=a[0]).slice(1,-1));return b.length},a.prototype.regexToken=function(){var a,b,c,d;if(this.chunk.charAt(0)!=="/")return 0;if(a=m.exec(this.chunk))return this.heregexToken(a);b=Q(this.tokens);if(b&&(d=b[0],U.call(b.spaced?A:B,d)>=0))return 0;if(!(a=F.exec(this.chunk)))return 0;c=a[0],this.token("REGEX",c==="//"?"/(?:)/":c);return c.length},a.prototype.heregexToken=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o;d=a[0],b=a[1],c=a[2];if(0>b.indexOf("#{")){e=b.replace(n,"").replace(/\//g,"\\/"),this.token("REGEX","/"+(e||"(?:)")+"/"+c);return d.length}this.token("IDENTIFIER","RegExp"),this.tokens.push(["CALL_START","("]),g=[],k=this.interpolateString(b,{regex:true});for(i=0,j=k.length;i<j;i++){l=k[i],f=l[0],h=l[1];if(f==="TOKENS")g.push.apply(g,h);else{if(!(h=h.replace(n,"")))continue;h=h.replace(/\\/g,"\\\\"),g.push(["STRING",this.makeString(h,"\"",true)])}g.push(["+","+"])}g.pop(),((m=g[0])!=null?m[0]:void 0)!=="STRING"&&this.tokens.push(["STRING","\"\""],["+","+"]),(o=this.tokens).push.apply(o,g),c&&this.tokens.push([",",","],["STRING","\""+c+"\""]),this.token(")",")");return d.length},a.prototype.lineToken=function(){var a,b,c,d,e,f;if(!(c=z.exec(this.chunk)))return 0;b=c[0],this.line+=P(b,"\n"),e=Q(this.tokens,1),f=b.length-1-b.lastIndexOf("\n"),d=this.unfinished();if(f-this.indebt===this.indent){d?this.suppressNewlines():this.newlineToken();return b.length}if(f>this.indent){if(d){this.indebt=f-this.indent,this.suppressNewlines();return b.length}a=f-this.indent+this.outdebt,this.token("INDENT",a),this.indents.push(a),this.outdebt=this.indebt=0}else this.indebt=0,this.outdentToken(this.indent-f,d);this.indent=f;return b.length},a.prototype.outdentToken=function(a,b,c){var d,e;while(a>0)e=this.indents.length-1,this.indents[e]===void 0?a=0:this.indents[e]===this.outdebt?(a-=this.outdebt,this.outdebt=0):this.indents[e]<this.outdebt?(this.outdebt-=this.indents[e],a-=this.indents[e]):(d=this.indents.pop()-this.outdebt,a-=d,this.outdebt=0,this.token("OUTDENT",d));d&&(this.outdebt-=a),this.tag()==="TERMINATOR"||b||this.token("TERMINATOR","\n");return this},a.prototype.whitespaceToken=function(){var a,b,c;if(!((a=N.exec(this.chunk))||(b=this.chunk.charAt(0)==="\n")))return 0;c=Q(this.tokens),c&&(c[a?"spaced":"newLine"]=true);return a?a[0].length:0},a.prototype.newlineToken=function(){this.tag()!=="TERMINATOR"&&this.token("TERMINATOR","\n");return this},a.prototype.suppressNewlines=function(){this.value()==="\\"&&this.tokens.pop();return this},a.prototype.literalToken=function(){var a,b,c,f,g,h,k,l;(a=E.exec(this.chunk))?(f=a[0],e.test(f)&&this.tagParameters()):f=this.chunk.charAt(0),c=f,b=Q(this.tokens);if(f==="="&&b){!b[1].reserved&&(g=b[1],U.call(r,g)>=0)&&this.assignmentError();if((h=b[1])==="||"||h==="&&"){b[0]="COMPOUND_ASSIGN",b[1]+="=";return f.length}}if(f===";")c="TERMINATOR";else if(U.call(x,f)>=0)c="MATH";else if(U.call(i,f)>=0)c="COMPARE";else if(U.call(j,f)>=0)c="COMPOUND_ASSIGN";else if(U.call(M,f)>=0)c="UNARY";else if(U.call(J,f)>=0)c="SHIFT";else if(U.call(v,f)>=0||f==="?"&&(b!=null?b.spaced:void 0))c="LOGIC";else if(b&&!b.spaced)if(f==="("&&(k=b[0],U.call(d,k)>=0))b[0]==="?"&&(b[0]="FUNC_EXIST"),c="CALL_START";else if(f==="["&&(l=b[0],U.call(p,l)>=0)){c="INDEX_START";switch(b[0]){case"?":b[0]="INDEX_SOAK";break;case"::":b[0]="INDEX_PROTO"}}this.token(c,f);return f.length},a.prototype.sanitizeHeredoc=function(a,b){var c,d,e,f,g;e=b.indent,d=b.herecomment;if(d&&0>a.indexOf("\n"))return a;if(!d)while(f=l.exec(a)){c=f[1];if(e===null||0<(g=c.length)&&g<e.length)e=c}e&&(a=a.replace(RegExp("\\n"+e,"g"),"\n")),d||(a=a.replace(/^\n/,""));return a},a.prototype.tagParameters=function(){var a,b,c,d;if(this.tag()!==")")return this;b=[],d=this.tokens,a=d.length,d[--a][0]="PARAM_END";while(c=d[--a])switch(c[0]){case")":b.push(c);break;case"(":case"CALL_START":if(b.length)b.pop();else{c[0]="PARAM_START";return this}}return this},a.prototype.closeIndentation=function(){return this.outdentToken(this.indent)},a.prototype.identifierError=function(a){throw SyntaxError("Reserved word \""+a+"\" on line "+(this.line+1))},a.prototype.assignmentError=function(){throw SyntaxError("Reserved word \""+this.value()+"\" on line "+(this.line+1)+" can't be assigned")},a.prototype.balancedString=function(a,b){var c,d,e,f,g;f=[b];for(c=1,g=a.length;1<=g?c<g:c>g;1<=g?c+=1:c-=1){switch(d=a.charAt(c)){case"\\":c++;continue;case b:f.pop();if(!f.length)return a.slice(0,c+1);b=f[f.length-1];continue}b==="}"&&(d==="\""||d==="'")?f.push(b=d):b==="}"&&d==="{"?f.push(b="}"):b==="\""&&e==="#"&&d==="{"&&f.push(b="}"),e=d}throw new Error("missing "+f.pop()+", starting on line "+(this.line+1))},a.prototype.interpolateString=function(b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;c==null&&(c={}),e=c.heredoc,l=c.regex,n=[],k=0,f=-1;while(i=b.charAt(f+=1)){if(i==="\\"){f+=1;continue}if(!(i==="#"&&b.charAt(f+1)==="{"&&(d=this.balancedString(b.slice(f+1),"}"))))continue;k<f&&n.push(["NEOSTRING",b.slice(k,f)]),g=d.slice(1,-1),g.length&&(j=(new a).tokenize(g,{line:this.line,rewrite:false}),j.pop(),((q=j[0])!=null?q[0]:void 0)==="TERMINATOR"&&j.shift(),j.length>1&&(j.unshift(["(","("]),j.push([")",")"])),n.push(["TOKENS",j])),f+=d.length,k=f+1}f>k&&k<b.length&&n.push(["NEOSTRING",b.slice(k)]);if(l)return n;if(!n.length)return this.token("STRING","\"\"");n[0][0]!=="NEOSTRING"&&n.unshift(["",""]),(h=n.length>1)&&this.token("(","(");for(f=0,p=n.length;f<p;f++)r=n[f],m=r[0],o=r[1],f&&this.token("+","+"),m==="TOKENS"?(s=this.tokens).push.apply(s,o):this.token("STRING",this.makeString(o,"\"",e));h&&this.token(")",")");return n},a.prototype.token=function(a,b){return this.tokens.push([a,b,this.line])},a.prototype.tag=function(a,b){var c;return(c=Q(this.tokens,a))&&(b?c[0]=b:c[0])},a.prototype.value=function(a,b){var c;return(c=Q(this.tokens,a))&&(b?c[1]=b:c[1])},a.prototype.unfinished=function(){var a,c;return u.test(this.chunk)||(a=Q(this.tokens,1))&&a[0]!=="."&&(c=this.value())&&!c.reserved&&C.test(c)&&!e.test(c)&&!b.test(this.chunk)},a.prototype.escapeLines=function(a,b){return a.replace(y,b?"\\n":"")},a.prototype.makeString=function(a,b,c){if(!a)return b+b;a=a.replace(/\\([\s\S])/g,function(a,c){return c==="\n"||c===b?c:a}),a=a.replace(RegExp(""+b,"g"),"\\$&");return b+this.escapeLines(a,c)+b};return a}(),s=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super"],g=["undefined","then","unless","until","loop","of","by","when"];for(R in f={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"})g.push(R);H=["case","default","function","var","void","with","const","let","enum","export","import","native","__hasProp","__extends","__slice","__bind","__indexOf"],r=s.concat(H),a.RESERVED=H.concat(s).concat(g),o=/^([$A-Za-z_][$\w]*)([^\n\S]*:(?!:))?/,D=/^0x[\da-f]+|^(?:\d+(\.\d+)?|\.\d+)(?:e[+-]?\d+)?/i,k=/^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/,E=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/,N=/^[^\n\S]+/,h=/^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)?$)|^(?:\s*#(?!##[^#]).*)+/,e=/^[-=]>/,z=/^(?:\n[^\n\S]*)+/,K=/^'[^\\']*(?:\\.[^\\']*)*'/,q=/^`[^\\`]*(?:\\.[^\\`]*)*`/,F=/^\/(?!\s)[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4}(?!\w)/,m=/^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/,n=/\s+(?:#.*)?/g,y=/\n/g,l=/\n+([^\n\S]*)/g,b=/^\s*@?([$A-Za-z_][$\w]*|['"].*['"])[^\n\S]*?[:=][^:=>]/,u=/^\s*(?:,|\??\.(?!\.)|::)/,L=/\s+$/,C=/^(?:[-+*&|\/%=<>!.\\][<>=&|]*|and|or|is(?:nt)?|n(?:ot|ew)|delete|typeof|instanceof)$/,j=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|="],M=["!","~","NEW","TYPEOF","DELETE","DO"],v=["&&","||","&","|","^"],J=["<<",">>",">>>"],i=["==","!=","<",">","<=",">="],x=["*","/","%"],G=["IN","OF","INSTANCEOF"],c=["TRUE","FALSE","NULL","UNDEFINED"],A=["NUMBER","REGEX","BOOL","++","--","]"],B=A.concat(")","}","THIS","IDENTIFIER","STRING"),d=["IDENTIFIER","STRING","REGEX",")","]","}","?","::","@","THIS","SUPER"],p=d.concat("NUMBER","BOOL"),t=["INDENT","OUTDENT","TERMINATOR"]}).call(this)},require["./parser"]=new function(){var a=this;var b=function(){var a={trace:function b(){},yy:{},symbols_:{error:2,Root:3,Body:4,Block:5,TERMINATOR:6,Line:7,Expression:8,Statement:9,Return:10,Throw:11,Comment:12,STATEMENT:13,Value:14,Invocation:15,Code:16,Operation:17,Assign:18,If:19,Try:20,While:21,For:22,Switch:23,Class:24,INDENT:25,OUTDENT:26,Identifier:27,IDENTIFIER:28,AlphaNumeric:29,NUMBER:30,STRING:31,Literal:32,JS:33,REGEX:34,BOOL:35,Assignable:36,"=":37,AssignObj:38,ObjAssignable:39,":":40,ThisProperty:41,RETURN:42,HERECOMMENT:43,PARAM_START:44,ParamList:45,PARAM_END:46,FuncGlyph:47,"->":48,"=>":49,OptComma:50,",":51,Param:52,ParamVar:53,"...":54,Array:55,Object:56,Splat:57,SimpleAssignable:58,Accessor:59,Parenthetical:60,Range:61,This:62,".":63,"?.":64,"::":65,Index:66,Slice:67,INDEX_START:68,INDEX_END:69,INDEX_SOAK:70,INDEX_PROTO:71,"{":72,AssignList:73,"}":74,CLASS:75,EXTENDS:76,OptFuncExist:77,Arguments:78,SUPER:79,FUNC_EXIST:80,CALL_START:81,CALL_END:82,ArgList:83,THIS:84,"@":85,"[":86,"]":87,RangeDots:88,"..":89,Arg:90,SimpleArgs:91,TRY:92,Catch:93,FINALLY:94,CATCH:95,THROW:96,"(":97,")":98,WhileSource:99,WHILE:100,WHEN:101,UNTIL:102,Loop:103,LOOP:104,ForBody:105,FOR:106,ForStart:107,ForSource:108,ForVariables:109,OWN:110,ForValue:111,FORIN:112,FOROF:113,BY:114,SWITCH:115,Whens:116,ELSE:117,When:118,LEADING_WHEN:119,IfBlock:120,IF:121,POST_IF:122,UNARY:123,"-":124,"+":125,"--":126,"++":127,"?":128,MATH:129,SHIFT:130,COMPARE:131,LOGIC:132,RELATION:133,COMPOUND_ASSIGN:134,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",13:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"BOOL",37:"=",40:":",42:"RETURN",43:"HERECOMMENT",44:"PARAM_START",46:"PARAM_END",48:"->",49:"=>",51:",",54:"...",63:".",64:"?.",65:"::",68:"INDEX_START",69:"INDEX_END",70:"INDEX_SOAK",71:"INDEX_PROTO",72:"{",74:"}",75:"CLASS",76:"EXTENDS",79:"SUPER",80:"FUNC_EXIST",81:"CALL_START",82:"CALL_END",84:"THIS",85:"@",86:"[",87:"]",89:"..",92:"TRY",94:"FINALLY",95:"CATCH",96:"THROW",97:"(",98:")",100:"WHILE",101:"WHEN",102:"UNTIL",104:"LOOP",106:"FOR",110:"OWN",112:"FORIN",113:"FOROF",114:"BY",115:"SWITCH",117:"ELSE",119:"LEADING_WHEN",121:"IF",122:"POST_IF",123:"UNARY",124:"-",125:"+",126:"--",127:"++",128:"?",129:"MATH",130:"SHIFT",131:"COMPARE",132:"LOGIC",133:"RELATION",134:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[18,3],[18,5],[38,1],[38,3],[38,5],[38,1],[39,1],[39,1],[39,1],[10,2],[10,1],[12,1],[16,5],[16,2],[47,1],[47,1],[50,0],[50,1],[45,0],[45,1],[45,3],[52,1],[52,2],[52,3],[53,1],[53,1],[53,1],[53,1],[57,2],[58,1],[58,2],[58,2],[58,1],[36,1],[36,1],[36,1],[14,1],[14,1],[14,1],[14,1],[14,1],[59,2],[59,2],[59,2],[59,1],[59,1],[59,1],[66,3],[66,2],[66,2],[56,4],[73,0],[73,1],[73,3],[73,4],[73,6],[24,1],[24,2],[24,3],[24,4],[24,2],[24,3],[24,4],[24,5],[15,3],[15,3],[15,1],[15,2],[77,0],[77,1],[78,2],[78,4],[62,1],[62,1],[41,2],[55,2],[55,4],[88,1],[88,1],[61,5],[67,5],[67,4],[67,4],[83,1],[83,3],[83,4],[83,4],[83,6],[90,1],[90,1],[91,1],[91,3],[20,2],[20,3],[20,4],[20,5],[93,3],[11,2],[60,3],[60,5],[99,2],[99,4],[99,2],[99,4],[21,2],[21,2],[21,2],[21,1],[103,2],[103,2],[22,2],[22,2],[22,2],[105,2],[105,2],[107,2],[107,3],[111,1],[111,1],[111,1],[109,1],[109,3],[108,2],[108,2],[108,4],[108,4],[108,4],[108,6],[108,6],[23,5],[23,7],[23,4],[23,6],[116,1],[116,2],[118,3],[118,4],[120,3],[120,5],[120,3],[19,1],[19,3],[19,3],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,5],[17,3]],performAction:function c(a,b,c,d,e,f){var g=f.length-1;switch(e){case 1:return this.$=new d.Expressions;case 2:return this.$=f[g];case 3:return this.$=f[g-1];case 4:this.$=d.Expressions.wrap([f[g]]);break;case 5:this.$=f[g-2].push(f[g]);break;case 6:this.$=f[g-1];break;case 7:this.$=f[g];break;case 8:this.$=f[g];break;case 9:this.$=f[g];break;case 10:this.$=f[g];break;case 11:this.$=f[g];break;case 12:this.$=new d.Literal(f[g]);break;case 13:this.$=f[g];break;case 14:this.$=f[g];break;case 15:this.$=f[g];break;case 16:this.$=f[g];break;case 17:this.$=f[g];break;case 18:this.$=f[g];break;case 19:this.$=f[g];break;case 20:this.$=f[g];break;case 21:this.$=f[g];break;case 22:this.$=f[g];break;case 23:this.$=f[g];break;case 24:this.$=new d.Expressions;break;case 25:this.$=f[g-1];break;case 26:this.$=new d.Literal(f[g]);break;case 27:this.$=new d.Literal(f[g]);break;case 28:this.$=new d.Literal(f[g]);break;case 29:this.$=f[g];break;case 30:this.$=new d.Literal(f[g]);break;case 31:this.$=new d.Literal(f[g]);break;case 32:this.$=new d.Literal(f[g]==="undefined"?"void 0":f[g]);break;case 33:this.$=new d.Assign(f[g-2],f[g]);break;case 34:this.$=new d.Assign(f[g-4],f[g-1]);break;case 35:this.$=new d.Value(f[g]);break;case 36:this.$=new d.Assign(new d.Value(f[g-2]),f[g],"object");break;case 37:this.$=new d.Assign(new d.Value(f[g-4]),f[g-1],"object");break;case 38:this.$=f[g];break;case 39:this.$=f[g];break;case 40:this.$=f[g];break;case 41:this.$=f[g];break;case 42:this.$=new d.Return(f[g]);break;case 43:this.$=new d.Return;break;case 44:this.$=new d.Comment(f[g]);break;case 45:this.$=new d.Code(f[g-3],f[g],f[g-1]);break;case 46:this.$=new d.Code([],f[g],f[g-1]);break;case 47:this.$="func";break;case 48:this.$="boundfunc";break;case 49:this.$=f[g];break;case 50:this.$=f[g];break;case 51:this.$=[];break;case 52:this.$=[f[g]];break;case 53:this.$=f[g-2].concat(f[g]);break;case 54:this.$=new d.Param(f[g]);break;case 55:this.$=new d.Param(f[g-1],null,true);break;case 56:this.$=new d.Param(f[g-2],f[g]);break;case 57:this.$=f[g];break;case 58:this.$=f[g];break;case 59:this.$=f[g];break;case 60:this.$=f[g];break;case 61:this.$=new d.Splat(f[g-1]);break;case 62:this.$=new d.Value(f[g]);break;case 63:this.$=f[g-1].push(f[g]);break;case 64:this.$=new d.Value(f[g-1],[f[g]]);break;case 65:this.$=f[g];break;case 66:this.$=f[g];break;case 67:this.$=new d.Value(f[g]);break;case 68:this.$=new d.Value(f[g]);break;case 69:this.$=f[g];break;case 70:this.$=new d.Value(f[g]);break;case 71:this.$=new d.Value(f[g]);break;case 72:this.$=new d.Value(f[g]);break;case 73:this.$=f[g];break;case 74:this.$=new d.Access(f[g]);break;case 75:this.$=new d.Access(f[g],"soak");break;case 76:this.$=new d.Access(f[g],"proto");break;case 77:this.$=new d.Access(new d.Literal("prototype"));break;case 78:this.$=f[g];break;case 79:this.$=new d.Slice(f[g]);break;case 80:this.$=new d.Index(f[g-1]);break;case 81:this.$=d.extend(f[g],{soak:true});break;case 82:this.$=d.extend(f[g],{proto:true});break;case 83:this.$=new d.Obj(f[g-2],f[g-3].generated);break;case 84:this.$=[];break;case 85:this.$=[f[g]];break;case 86:this.$=f[g-2].concat(f[g]);break;case 87:this.$=f[g-3].concat(f[g]);break;case 88:this.$=f[g-5].concat(f[g-2]);break;case 89:this.$=new d.Class;break;case 90:this.$=new d.Class(null,null,f[g]);break;case 91:this.$=new d.Class(null,f[g]);break;case 92:this.$=new d.Class(null,f[g-1],f[g]);break;case 93:this.$=new d.Class(f[g]);break;case 94:this.$=new d.Class(f[g-1],null,f[g]);break;case 95:this.$=new d.Class(f[g-2],f[g]);break;case 96:this.$=new d.Class(f[g-3],f[g-1],f[g]);break;case 97:this.$=new d.Call(f[g-2],f[g],f[g-1]);break;case 98:this.$=new d.Call(f[g-2],f[g],f[g-1]);break;case 99:this.$=new d.Call("super",[new d.Splat(new d.Literal("arguments"))]);break;case 100:this.$=new d.Call("super",f[g]);break;case 101:this.$=false;break;case 102:this.$=true;break;case 103:this.$=[];break;case 104:this.$=f[g-2];break;case 105:this.$=new d.Value(new d.Literal("this"));break;case 106:this.$=new d.Value(new d.Literal("this"));break;case 107:this.$=new d.Value(new d.Literal("this"),[new d.Access(f[g])],"this");break;case 108:this.$=new d.Arr([]);break;case 109:this.$=new d.Arr(f[g-2]);break;case 110:this.$="inclusive";break;case 111:this.$="exclusive";break;case 112:this.$=new d.Range(f[g-3],f[g-1],f[g-2]);break;case 113:this.$=new d.Range(f[g-3],f[g-1],f[g-2]);break;case 114:this.$=new d.Range(f[g-2],null,f[g-1]);break;case 115:this.$=new d.Range(null,f[g-1],f[g-2]);break;case 116:this.$=[f[g]];break;case 117:this.$=f[g-2].concat(f[g]);break;case 118:this.$=f[g-3].concat(f[g]);break;case 119:this.$=f[g-2];break;case 120:this.$=f[g-5].concat(f[g-2]);break;case 121:this.$=f[g];break;case 122:this.$=f[g];break;case 123:this.$=f[g];break;case 124:this.$=[].concat(f[g-2],f[g]);break;case 125:this.$=new d.Try(f[g]);break;case 126:this.$=new d.Try(f[g-1],f[g][0],f[g][1]);break;case 127:this.$=new d.Try(f[g-2],null,null,f[g]);break;case 128:this.$=new d.Try(f[g-3],f[g-2][0],f[g-2][1],f[g]);break;case 129:this.$=[f[g-1],f[g]];break;case 130:this.$=new d.Throw(f[g]);break;case 131:this.$=new d.Parens(f[g-1]);break;case 132:this.$=new d.Parens(f[g-2]);break;case 133:this.$=new d.While(f[g]);break;case 134:this.$=new d.While(f[g-2],{guard:f[g]});break;case 135:this.$=new d.While(f[g],{invert:true});break;case 136:this.$=new d.While(f[g-2],{invert:true,guard:f[g]});break;case 137:this.$=f[g-1].addBody(f[g]);break;case 138:this.$=f[g].addBody(d.Expressions.wrap([f[g-1]]));break;case 139:this.$=f[g].addBody(d.Expressions.wrap([f[g-1]]));break;case 140:this.$=f[g];break;case 141:this.$=(new d.While(new d.Literal("true"))).addBody(f[g]);break;case 142:this.$=(new d.While(new d.Literal("true"))).addBody(d.Expressions.wrap([f[g]]));break;case 143:this.$=new d.For(f[g-1],f[g]);break;case 144:this.$=new d.For(f[g-1],f[g]);break;case 145:this.$=new d.For(f[g],f[g-1]);break;case 146:this.$={source:new d.Value(f[g])};break;case 147:this.$=function(){f[g].own=f[g-1].own,f[g].name=f[g-1][0],f[g].index=f[g-1][1];return f[g]}();break;case 148:this.$=f[g];break;case 149:this.$=function(){f[g].own=true;return f[g]}();break;case 150:this.$=f[g];break;case 151:this.$=new d.Value(f[g]);break;case 152:this.$=new d.Value(f[g]);break;case 153:this.$=[f[g]];break;case 154:this.$=[f[g-2],f[g]];break;case 155:this.$={source:f[g]};break;case 156:this.$={source:f[g],object:true};break;case 157:this.$={source:f[g-2],guard:f[g]};break;case 158:this.$={source:f[g-2],guard:f[g],object:true};break;case 159:this.$={source:f[g-2],step:f[g]};break;case 160:this.$={source:f[g-4],guard:f[g-2],step:f[g]};break;case 161:this.$={source:f[g-4],step:f[g-2],guard:f[g]};break;case 162:this.$=new d.Switch(f[g-3],f[g-1]);break;case 163:this.$=new d.Switch(f[g-5],f[g-3],f[g-1]);break;case 164:this.$=new d.Switch(null,f[g-1]);break;case 165:this.$=new d.Switch(null,f[g-3],f[g-1]);break;case 166:this.$=f[g];break;case 167:this.$=f[g-1].concat(f[g]);break;case 168:this.$=[[f[g-1],f[g]]];break;case 169:this.$=[[f[g-2],f[g-1]]];break;case 170:this.$=new d.If(f[g-1],f[g],{type:f[g-2]});break;case 171:this.$=f[g-4].addElse(new d.If(f[g-1],f[g],{type:f[g-2]}));break;case 172:this.$=f[g-2].addElse(f[g]);break;case 173:this.$=f[g];break;case 174:this.$=new d.If(f[g],d.Expressions.wrap([f[g-2]]),{type:f[g-1],statement:true});break;case 175:this.$=new d.If(f[g],d.Expressions.wrap([f[g-2]]),{type:f[g-1],statement:true});break;case 176:this.$=new d.Op(f[g-1],f[g]);break;case 177:this.$=new d.Op("-",f[g]);break;case 178:this.$=new d.Op("+",f[g]);break;case 179:this.$=new d.Op("--",f[g]);break;case 180:this.$=new d.Op("++",f[g]);break;case 181:this.$=new d.Op("--",f[g-1],null,true);break;case 182:this.$=new d.Op("++",f[g-1],null,true);break;case 183:this.$=new d.Existence(f[g-1]);break;case 184:this.$=new d.Op("+",f[g-2],f[g]);break;case 185:this.$=new d.Op("-",f[g-2],f[g]);break;case 186:this.$=new d.Op(f[g-1],f[g-2],f[g]);break;case 187:this.$=new d.Op(f[g-1],f[g-2],f[g]);break;case 188:this.$=new d.Op(f[g-1],f[g-2],f[g]);break;case 189:this.$=new d.Op(f[g-1],f[g-2],f[g]);break;case 190:this.$=function(){return f[g-1].charAt(0)==="!"?(new d.Op(f[g-1].slice(1),f[g-2],f[g])).invert():new d.Op(f[g-1],f[g-2],f[g])}();break;case 191:this.$=new d.Assign(f[g-2],f[g],f[g-1]);break;case 192:this.$=new d.Assign(f[g-4],f[g-1],f[g-3]);break;case 193:this.$=new d.Extends(f[g-2],f[g])}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,5],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[3]},{1:[2,2],6:[1,71]},{6:[1,72]},{1:[2,4],6:[2,4],26:[2,4],98:[2,4]},{4:74,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[1,73],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,7],6:[2,7],26:[2,7],98:[2,7],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,8],6:[2,8],26:[2,8],98:[2,8],99:87,100:[1,62],102:[1,63],105:88,106:[1,65],107:66,122:[1,86]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],46:[2,13],51:[2,13],54:[2,13],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:96,68:[1,97],69:[2,13],70:[1,98],71:[1,99],74:[2,13],77:89,80:[1,91],81:[2,101],82:[2,13],87:[2,13],89:[2,13],98:[2,13],100:[2,13],101:[2,13],102:[2,13],106:[2,13],114:[2,13],122:[2,13],124:[2,13],125:[2,13],128:[2,13],129:[2,13],130:[2,13],131:[2,13],132:[2,13],133:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],46:[2,14],51:[2,14],54:[2,14],59:101,63:[1,92],64:[1,93],65:[1,94],66:95,67:96,68:[1,97],69:[2,14],70:[1,98],71:[1,99],74:[2,14],77:100,80:[1,91],81:[2,101],82:[2,14],87:[2,14],89:[2,14],98:[2,14],100:[2,14],101:[2,14],102:[2,14],106:[2,14],114:[2,14],122:[2,14],124:[2,14],125:[2,14],128:[2,14],129:[2,14],130:[2,14],131:[2,14],132:[2,14],133:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],46:[2,15],51:[2,15],54:[2,15],69:[2,15],74:[2,15],82:[2,15],87:[2,15],89:[2,15],98:[2,15],100:[2,15],101:[2,15],102:[2,15],106:[2,15],114:[2,15],122:[2,15],124:[2,15],125:[2,15],128:[2,15],129:[2,15],130:[2,15],131:[2,15],132:[2,15],133:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],46:[2,16],51:[2,16],54:[2,16],69:[2,16],74:[2,16],82:[2,16],87:[2,16],89:[2,16],98:[2,16],100:[2,16],101:[2,16],102:[2,16],106:[2,16],114:[2,16],122:[2,16],124:[2,16],125:[2,16],128:[2,16],129:[2,16],130:[2,16],131:[2,16],132:[2,16],133:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],46:[2,17],51:[2,17],54:[2,17],69:[2,17],74:[2,17],82:[2,17],87:[2,17],89:[2,17],98:[2,17],100:[2,17],101:[2,17],102:[2,17],106:[2,17],114:[2,17],122:[2,17],124:[2,17],125:[2,17],128:[2,17],129:[2,17],130:[2,17],131:[2,17],132:[2,17],133:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],46:[2,18],51:[2,18],54:[2,18],69:[2,18],74:[2,18],82:[2,18],87:[2,18],89:[2,18],98:[2,18],100:[2,18],101:[2,18],102:[2,18],106:[2,18],114:[2,18],122:[2,18],124:[2,18],125:[2,18],128:[2,18],129:[2,18],130:[2,18],131:[2,18],132:[2,18],133:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],46:[2,19],51:[2,19],54:[2,19],69:[2,19],74:[2,19],82:[2,19],87:[2,19],89:[2,19],98:[2,19],100:[2,19],101:[2,19],102:[2,19],106:[2,19],114:[2,19],122:[2,19],124:[2,19],125:[2,19],128:[2,19],129:[2,19],130:[2,19],131:[2,19],132:[2,19],133:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],46:[2,20],51:[2,20],54:[2,20],69:[2,20],74:[2,20],82:[2,20],87:[2,20],89:[2,20],98:[2,20],100:[2,20],101:[2,20],102:[2,20],106:[2,20],114:[2,20],122:[2,20],124:[2,20],125:[2,20],128:[2,20],129:[2,20],130:[2,20],131:[2,20],132:[2,20],133:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],46:[2,21],51:[2,21],54:[2,21],69:[2,21],74:[2,21],82:[2,21],87:[2,21],89:[2,21],98:[2,21],100:[2,21],101:[2,21],102:[2,21],106:[2,21],114:[2,21],122:[2,21],124:[2,21],125:[2,21],128:[2,21],129:[2,21],130:[2,21],131:[2,21],132:[2,21],133:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],46:[2,22],51:[2,22],54:[2,22],69:[2,22],74:[2,22],82:[2,22],87:[2,22],89:[2,22],98:[2,22],100:[2,22],101:[2,22],102:[2,22],106:[2,22],114:[2,22],122:[2,22],124:[2,22],125:[2,22],128:[2,22],129:[2,22],130:[2,22],131:[2,22],132:[2,22],133:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],46:[2,23],51:[2,23],54:[2,23],69:[2,23],74:[2,23],82:[2,23],87:[2,23],89:[2,23],98:[2,23],100:[2,23],101:[2,23],102:[2,23],106:[2,23],114:[2,23],122:[2,23],124:[2,23],125:[2,23],128:[2,23],129:[2,23],130:[2,23],131:[2,23],132:[2,23],133:[2,23]},{1:[2,9],6:[2,9],26:[2,9],98:[2,9],100:[2,9],102:[2,9],106:[2,9],122:[2,9]},{1:[2,10],6:[2,10],26:[2,10],98:[2,10],100:[2,10],102:[2,10],106:[2,10],122:[2,10]},{1:[2,11],6:[2,11],26:[2,11],98:[2,11],100:[2,11],102:[2,11],106:[2,11],122:[2,11]},{1:[2,12],6:[2,12],26:[2,12],98:[2,12],100:[2,12],102:[2,12],106:[2,12],122:[2,12]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],37:[1,102],46:[2,69],51:[2,69],54:[2,69],63:[2,69],64:[2,69],65:[2,69],68:[2,69],69:[2,69],70:[2,69],71:[2,69],74:[2,69],80:[2,69],81:[2,69],82:[2,69],87:[2,69],89:[2,69],98:[2,69],100:[2,69],101:[2,69],102:[2,69],106:[2,69],114:[2,69],122:[2,69],124:[2,69],125:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],46:[2,70],51:[2,70],54:[2,70],63:[2,70],64:[2,70],65:[2,70],68:[2,70],69:[2,70],70:[2,70],71:[2,70],74:[2,70],80:[2,70],81:[2,70],82:[2,70],87:[2,70],89:[2,70],98:[2,70],100:[2,70],101:[2,70],102:[2,70],106:[2,70],114:[2,70],122:[2,70],124:[2,70],125:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],46:[2,71],51:[2,71],54:[2,71],63:[2,71],64:[2,71],65:[2,71],68:[2,71],69:[2,71],70:[2,71],71:[2,71],74:[2,71],80:[2,71],81:[2,71],82:[2,71],87:[2,71],89:[2,71],98:[2,71],100:[2,71],101:[2,71],102:[2,71],106:[2,71],114:[2,71],122:[2,71],124:[2,71],125:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],46:[2,72],51:[2,72],54:[2,72],63:[2,72],64:[2,72],65:[2,72],68:[2,72],69:[2,72],70:[2,72],71:[2,72],74:[2,72],80:[2,72],81:[2,72],82:[2,72],87:[2,72],89:[2,72],98:[2,72],100:[2,72],101:[2,72],102:[2,72],106:[2,72],114:[2,72],122:[2,72],124:[2,72],125:[2,72],128:[2,72],129:[2,72],130:[2,72],131:[2,72],132:[2,72],133:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],46:[2,73],51:[2,73],54:[2,73],63:[2,73],64:[2,73],65:[2,73],68:[2,73],69:[2,73],70:[2,73],71:[2,73],74:[2,73],80:[2,73],81:[2,73],82:[2,73],87:[2,73],89:[2,73],98:[2,73],100:[2,73],101:[2,73],102:[2,73],106:[2,73],114:[2,73],122:[2,73],124:[2,73],125:[2,73],128:[2,73],129:[2,73],130:[2,73],131:[2,73],132:[2,73],133:[2,73]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],46:[2,99],51:[2,99],54:[2,99],63:[2,99],64:[2,99],65:[2,99],68:[2,99],69:[2,99],70:[2,99],71:[2,99],74:[2,99],78:103,80:[2,99],81:[1,104],82:[2,99],87:[2,99],89:[2,99],98:[2,99],100:[2,99],101:[2,99],102:[2,99],106:[2,99],114:[2,99],122:[2,99],124:[2,99],125:[2,99],128:[2,99],129:[2,99],130:[2,99],131:[2,99],132:[2,99],133:[2,99]},{27:108,28:[1,70],41:109,45:105,46:[2,51],51:[2,51],52:106,53:107,55:110,56:111,72:[1,67],85:[1,112],86:[1,113]},{5:114,25:[1,5]},{8:115,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:117,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:118,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{14:120,15:121,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:122,41:60,55:47,56:48,58:119,60:25,61:26,62:27,72:[1,67],79:[1,28],84:[1,55],85:[1,56],86:[1,54],97:[1,53]},{14:120,15:121,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:122,41:60,55:47,56:48,58:123,60:25,61:26,62:27,72:[1,67],79:[1,28],84:[1,55],85:[1,56],86:[1,54],97:[1,53]},{1:[2,66],6:[2,66],25:[2,66],26:[2,66],37:[2,66],46:[2,66],51:[2,66],54:[2,66],63:[2,66],64:[2,66],65:[2,66],68:[2,66],69:[2,66],70:[2,66],71:[2,66],74:[2,66],76:[1,127],80:[2,66],81:[2,66],82:[2,66],87:[2,66],89:[2,66],98:[2,66],100:[2,66],101:[2,66],102:[2,66],106:[2,66],114:[2,66],122:[2,66],124:[2,66],125:[2,66],126:[1,124],127:[1,125],128:[2,66],129:[2,66],130:[2,66],131:[2,66],132:[2,66],133:[2,66],134:[1,126]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],46:[2,173],51:[2,173],54:[2,173],69:[2,173],74:[2,173],82:[2,173],87:[2,173],89:[2,173],98:[2,173],100:[2,173],101:[2,173],102:[2,173],106:[2,173],114:[2,173],117:[1,128],122:[2,173],124:[2,173],125:[2,173],128:[2,173],129:[2,173],130:[2,173],131:[2,173],132:[2,173],133:[2,173]},{5:129,25:[1,5]},{5:130,25:[1,5]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],46:[2,140],51:[2,140],54:[2,140],69:[2,140],74:[2,140],82:[2,140],87:[2,140],89:[2,140],98:[2,140],100:[2,140],101:[2,140],102:[2,140],106:[2,140],114:[2,140],122:[2,140],124:[2,140],125:[2,140],128:[2,140],129:[2,140],130:[2,140],131:[2,140],132:[2,140],133:[2,140]},{5:131,25:[1,5]},{8:132,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,133],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,89],5:134,6:[2,89],14:120,15:121,25:[1,5],26:[2,89],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:122,41:60,46:[2,89],51:[2,89],54:[2,89],55:47,56:48,58:136,60:25,61:26,62:27,69:[2,89],72:[1,67],74:[2,89],76:[1,135],79:[1,28],82:[2,89],84:[1,55],85:[1,56],86:[1,54],87:[2,89],89:[2,89],97:[1,53],98:[2,89],100:[2,89],101:[2,89],102:[2,89],106:[2,89],114:[2,89],122:[2,89],124:[2,89],125:[2,89],128:[2,89],129:[2,89],130:[2,89],131:[2,89],132:[2,89],133:[2,89]},{1:[2,43],6:[2,43],8:137,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[2,43],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],98:[2,43],99:39,100:[2,43],102:[2,43],103:40,104:[1,64],105:41,106:[2,43],107:66,115:[1,42],120:37,121:[1,61],122:[2,43],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:138,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,44],6:[2,44],25:[2,44],26:[2,44],51:[2,44],74:[2,44],98:[2,44],100:[2,44],102:[2,44],106:[2,44],122:[2,44]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],37:[2,67],46:[2,67],51:[2,67],54:[2,67],63:[2,67],64:[2,67],65:[2,67],68:[2,67],69:[2,67],70:[2,67],71:[2,67],74:[2,67],80:[2,67],81:[2,67],82:[2,67],87:[2,67],89:[2,67],98:[2,67],100:[2,67],101:[2,67],102:[2,67],106:[2,67],114:[2,67],122:[2,67],124:[2,67],125:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],37:[2,68],46:[2,68],51:[2,68],54:[2,68],63:[2,68],64:[2,68],65:[2,68],68:[2,68],69:[2,68],70:[2,68],71:[2,68],74:[2,68],80:[2,68],81:[2,68],82:[2,68],87:[2,68],89:[2,68],98:[2,68],100:[2,68],101:[2,68],102:[2,68],106:[2,68],114:[2,68],122:[2,68],124:[2,68],125:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],46:[2,29],51:[2,29],54:[2,29],63:[2,29],64:[2,29],65:[2,29],68:[2,29],69:[2,29],70:[2,29],71:[2,29],74:[2,29],80:[2,29],81:[2,29],82:[2,29],87:[2,29],89:[2,29],98:[2,29],100:[2,29],101:[2,29],102:[2,29],106:[2,29],114:[2,29],122:[2,29],124:[2,29],125:[2,29],128:[2,29],129:[2,29],130:[2,29],131:[2,29],132:[2,29],133:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],46:[2,30],51:[2,30],54:[2,30],63:[2,30],64:[2,30],65:[2,30],68:[2,30],69:[2,30],70:[2,30],71:[2,30],74:[2,30],80:[2,30],81:[2,30],82:[2,30],87:[2,30],89:[2,30],98:[2,30],100:[2,30],101:[2,30],102:[2,30],106:[2,30],114:[2,30],122:[2,30],124:[2,30],125:[2,30],128:[2,30],129:[2,30],130:[2,30],131:[2,30],132:[2,30],133:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],46:[2,31],51:[2,31],54:[2,31],63:[2,31],64:[2,31],65:[2,31],68:[2,31],69:[2,31],70:[2,31],71:[2,31],74:[2,31],80:[2,31],81:[2,31],82:[2,31],87:[2,31],89:[2,31],98:[2,31],100:[2,31],101:[2,31],102:[2,31],106:[2,31],114:[2,31],122:[2,31],124:[2,31],125:[2,31],128:[2,31],129:[2,31],130:[2,31],131:[2,31],132:[2,31],133:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],46:[2,32],51:[2,32],54:[2,32],63:[2,32],64:[2,32],65:[2,32],68:[2,32],69:[2,32],70:[2,32],71:[2,32],74:[2,32],80:[2,32],81:[2,32],82:[2,32],87:[2,32],89:[2,32],98:[2,32],100:[2,32],101:[2,32],102:[2,32],106:[2,32],114:[2,32],122:[2,32],124:[2,32],125:[2,32],128:[2,32],129:[2,32],130:[2,32],131:[2,32],132:[2,32],133:[2,32]},{4:139,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,140],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:141,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,145],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:146,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],83:143,84:[1,55],85:[1,56],86:[1,54],87:[1,142],90:144,92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],46:[2,105],51:[2,105],54:[2,105],63:[2,105],64:[2,105],65:[2,105],68:[2,105],69:[2,105],70:[2,105],71:[2,105],74:[2,105],80:[2,105],81:[2,105],82:[2,105],87:[2,105],89:[2,105],98:[2,105],100:[2,105],101:[2,105],102:[2,105],106:[2,105],114:[2,105],122:[2,105],124:[2,105],125:[2,105],128:[2,105],129:[2,105],130:[2,105],131:[2,105],132:[2,105],133:[2,105]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],27:147,28:[1,70],46:[2,106],51:[2,106],54:[2,106],63:[2,106],64:[2,106],65:[2,106],68:[2,106],69:[2,106],70:[2,106],71:[2,106],74:[2,106],80:[2,106],81:[2,106],82:[2,106],87:[2,106],89:[2,106],98:[2,106],100:[2,106],101:[2,106],102:[2,106],106:[2,106],114:[2,106],122:[2,106],124:[2,106],125:[2,106],128:[2,106],129:[2,106],130:[2,106],131:[2,106],132:[2,106],133:[2,106]},{25:[2,47]},{25:[2,48]},{1:[2,62],6:[2,62],25:[2,62],26:[2,62],37:[2,62],46:[2,62],51:[2,62],54:[2,62],63:[2,62],64:[2,62],65:[2,62],68:[2,62],69:[2,62],70:[2,62],71:[2,62],74:[2,62],76:[2,62],80:[2,62],81:[2,62],82:[2,62],87:[2,62],89:[2,62],98:[2,62],100:[2,62],101:[2,62],102:[2,62],106:[2,62],114:[2,62],122:[2,62],124:[2,62],125:[2,62],126:[2,62],127:[2,62],128:[2,62],129:[2,62],130:[2,62],131:[2,62],132:[2,62],133:[2,62],134:[2,62]},{1:[2,65],6:[2,65],25:[2,65],26:[2,65],37:[2,65],46:[2,65],51:[2,65],54:[2,65],63:[2,65],64:[2,65],65:[2,65],68:[2,65],69:[2,65],70:[2,65],71:[2,65],74:[2,65],76:[2,65],80:[2,65],81:[2,65],82:[2,65],87:[2,65],89:[2,65],98:[2,65],100:[2,65],101:[2,65],102:[2,65],106:[2,65],114:[2,65],122:[2,65],124:[2,65],125:[2,65],126:[2,65],127:[2,65],128:[2,65],129:[2,65],130:[2,65],131:[2,65],132:[2,65],133:[2,65],134:[2,65]},{8:148,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:149,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:150,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{5:151,8:152,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,5],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{27:157,28:[1,70],55:158,56:159,61:153,72:[1,67],86:[1,54],109:154,110:[1,155],111:156},{108:160,112:[1,161],113:[1,162]},{6:[2,84],12:166,25:[2,84],27:167,28:[1,70],29:168,30:[1,68],31:[1,69],38:164,39:165,41:169,43:[1,46],51:[2,84],73:163,74:[2,84],85:[1,112]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],40:[2,27],46:[2,27],51:[2,27],54:[2,27],63:[2,27],64:[2,27],65:[2,27],68:[2,27],69:[2,27],70:[2,27],71:[2,27],74:[2,27],80:[2,27],81:[2,27],82:[2,27],87:[2,27],89:[2,27],98:[2,27],100:[2,27],101:[2,27],102:[2,27],106:[2,27],114:[2,27],122:[2,27],124:[2,27],125:[2,27],128:[2,27],129:[2,27],130:[2,27],131:[2,27],132:[2,27],133:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],40:[2,28],46:[2,28],51:[2,28],54:[2,28],63:[2,28],64:[2,28],65:[2,28],68:[2,28],69:[2,28],70:[2,28],71:[2,28],74:[2,28],80:[2,28],81:[2,28],82:[2,28],87:[2,28],89:[2,28],98:[2,28],100:[2,28],101:[2,28],102:[2,28],106:[2,28],114:[2,28],122:[2,28],124:[2,28],125:[2,28],128:[2,28],129:[2,28],130:[2,28],131:[2,28],132:[2,28],133:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],37:[2,26],40:[2,26],46:[2,26],51:[2,26],54:[2,26],63:[2,26],64:[2,26],65:[2,26],68:[2,26],69:[2,26],70:[2,26],71:[2,26],74:[2,26],76:[2,26],80:[2,26],81:[2,26],82:[2,26],87:[2,26],89:[2,26],98:[2,26],100:[2,26],101:[2,26],102:[2,26],106:[2,26],112:[2,26],113:[2,26],114:[2,26],122:[2,26],124:[2,26],125:[2,26],126:[2,26],127:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26]},{1:[2,6],6:[2,6],7:170,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[2,6],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],98:[2,6],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],46:[2,24],51:[2,24],54:[2,24],69:[2,24],74:[2,24],82:[2,24],87:[2,24],89:[2,24],94:[2,24],95:[2,24],98:[2,24],100:[2,24],101:[2,24],102:[2,24],106:[2,24],114:[2,24],117:[2,24],119:[2,24],122:[2,24],124:[2,24],125:[2,24],128:[2,24],129:[2,24],130:[2,24],131:[2,24],132:[2,24],133:[2,24]},{6:[1,71],26:[1,171]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],46:[2,183],51:[2,183],54:[2,183],69:[2,183],74:[2,183],82:[2,183],87:[2,183],89:[2,183],98:[2,183],100:[2,183],101:[2,183],102:[2,183],106:[2,183],114:[2,183],122:[2,183],124:[2,183],125:[2,183],128:[2,183],129:[2,183],130:[2,183],131:[2,183],132:[2,183],133:[2,183]},{8:172,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:173,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:174,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:175,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:176,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:177,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:178,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:179,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],46:[2,139],51:[2,139],54:[2,139],69:[2,139],74:[2,139],82:[2,139],87:[2,139],89:[2,139],98:[2,139],100:[2,139],101:[2,139],102:[2,139],106:[2,139],114:[2,139],122:[2,139],124:[2,139],125:[2,139],128:[2,139],129:[2,139],130:[2,139],131:[2,139],132:[2,139],133:[2,139]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],46:[2,144],51:[2,144],54:[2,144],69:[2,144],74:[2,144],82:[2,144],87:[2,144],89:[2,144],98:[2,144],100:[2,144],101:[2,144],102:[2,144],106:[2,144],114:[2,144],122:[2,144],124:[2,144],125:[2,144],128:[2,144],129:[2,144],130:[2,144],131:[2,144],132:[2,144],133:[2,144]},{8:180,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],46:[2,138],51:[2,138],54:[2,138],69:[2,138],74:[2,138],82:[2,138],87:[2,138],89:[2,138],98:[2,138],100:[2,138],101:[2,138],102:[2,138],106:[2,138],114:[2,138],122:[2,138],124:[2,138],125:[2,138],128:[2,138],129:[2,138],130:[2,138],131:[2,138],132:[2,138],133:[2,138]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],46:[2,143],51:[2,143],54:[2,143],69:[2,143],74:[2,143],82:[2,143],87:[2,143],89:[2,143],98:[2,143],100:[2,143],101:[2,143],102:[2,143],106:[2,143],114:[2,143],122:[2,143],124:[2,143],125:[2,143],128:[2,143],129:[2,143],130:[2,143],131:[2,143],132:[2,143],133:[2,143]},{78:181,81:[1,104]},{1:[2,63],6:[2,63],25:[2,63],26:[2,63],37:[2,63],46:[2,63],51:[2,63],54:[2,63],63:[2,63],64:[2,63],65:[2,63],68:[2,63],69:[2,63],70:[2,63],71:[2,63],74:[2,63],76:[2,63],80:[2,63],81:[2,63],82:[2,63],87:[2,63],89:[2,63],98:[2,63],100:[2,63],101:[2,63],102:[2,63],106:[2,63],114:[2,63],122:[2,63],124:[2,63],125:[2,63],126:[2,63],127:[2,63],128:[2,63],129:[2,63],130:[2,63],131:[2,63],132:[2,63],133:[2,63],134:[2,63]},{81:[2,102]},{27:182,28:[1,70]},{27:183,28:[1,70]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],27:184,28:[1,70],37:[2,77],46:[2,77],51:[2,77],54:[2,77],63:[2,77],64:[2,77],65:[2,77],68:[2,77],69:[2,77],70:[2,77],71:[2,77],74:[2,77],76:[2,77],80:[2,77],81:[2,77],82:[2,77],87:[2,77],89:[2,77],98:[2,77],100:[2,77],101:[2,77],102:[2,77],106:[2,77],114:[2,77],122:[2,77],124:[2,77],125:[2,77],126:[2,77],127:[2,77],128:[2,77],129:[2,77],130:[2,77],131:[2,77],132:[2,77],133:[2,77],134:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],37:[2,78],46:[2,78],51:[2,78],54:[2,78],63:[2,78],64:[2,78],65:[2,78],68:[2,78],69:[2,78],70:[2,78],71:[2,78],74:[2,78],76:[2,78],80:[2,78],81:[2,78],82:[2,78],87:[2,78],89:[2,78],98:[2,78],100:[2,78],101:[2,78],102:[2,78],106:[2,78],114:[2,78],122:[2,78],124:[2,78],125:[2,78],126:[2,78],127:[2,78],128:[2,78],129:[2,78],130:[2,78],131:[2,78],132:[2,78],133:[2,78],134:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],37:[2,79],46:[2,79],51:[2,79],54:[2,79],63:[2,79],64:[2,79],65:[2,79],68:[2,79],69:[2,79],70:[2,79],71:[2,79],74:[2,79],76:[2,79],80:[2,79],81:[2,79],82:[2,79],87:[2,79],89:[2,79],98:[2,79],100:[2,79],101:[2,79],102:[2,79],106:[2,79],114:[2,79],122:[2,79],124:[2,79],125:[2,79],126:[2,79],127:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79]},{8:185,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],54:[1,188],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],88:186,89:[1,187],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{66:189,68:[1,190],70:[1,98],71:[1,99]},{66:191,68:[1,190],70:[1,98],71:[1,99]},{78:192,81:[1,104]},{1:[2,64],6:[2,64],25:[2,64],26:[2,64],37:[2,64],46:[2,64],51:[2,64],54:[2,64],63:[2,64],64:[2,64],65:[2,64],68:[2,64],69:[2,64],70:[2,64],71:[2,64],74:[2,64],76:[2,64],80:[2,64],81:[2,64],82:[2,64],87:[2,64],89:[2,64],98:[2,64],100:[2,64],101:[2,64],102:[2,64],106:[2,64],114:[2,64],122:[2,64],124:[2,64],125:[2,64],126:[2,64],127:[2,64],128:[2,64],129:[2,64],130:[2,64],131:[2,64],132:[2,64],133:[2,64],134:[2,64]},{8:193,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,194],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],46:[2,100],51:[2,100],54:[2,100],63:[2,100],64:[2,100],65:[2,100],68:[2,100],69:[2,100],70:[2,100],71:[2,100],74:[2,100],80:[2,100],81:[2,100],82:[2,100],87:[2,100],89:[2,100],98:[2,100],100:[2,100],101:[2,100],102:[2,100],106:[2,100],114:[2,100],122:[2,100],124:[2,100],125:[2,100],128:[2,100],129:[2,100],130:[2,100],131:[2,100],132:[2,100],133:[2,100]},{8:197,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,145],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:146,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],82:[1,195],83:196,84:[1,55],85:[1,56],86:[1,54],90:144,92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{46:[1,198],51:[1,199]},{46:[2,52],51:[2,52]},{37:[1,201],46:[2,54],51:[2,54],54:[1,200]},{37:[2,57],46:[2,57],51:[2,57],54:[2,57]},{37:[2,58],46:[2,58],51:[2,58],54:[2,58]},{37:[2,59],46:[2,59],51:[2,59],54:[2,59]},{37:[2,60],46:[2,60],51:[2,60],54:[2,60]},{27:147,28:[1,70]},{8:197,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,145],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:146,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],83:143,84:[1,55],85:[1,56],86:[1,54],87:[1,142],90:144,92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,46],6:[2,46],25:[2,46],26:[2,46],46:[2,46],51:[2,46],54:[2,46],69:[2,46],74:[2,46],82:[2,46],87:[2,46],89:[2,46],98:[2,46],100:[2,46],101:[2,46],102:[2,46],106:[2,46],114:[2,46],122:[2,46],124:[2,46],125:[2,46],128:[2,46],129:[2,46],130:[2,46],131:[2,46],132:[2,46],133:[2,46]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],46:[2,176],51:[2,176],54:[2,176],69:[2,176],74:[2,176],82:[2,176],87:[2,176],89:[2,176],98:[2,176],99:84,100:[2,176],101:[2,176],102:[2,176],105:85,106:[2,176],107:66,114:[2,176],122:[2,176],124:[2,176],125:[2,176],128:[1,75],129:[2,176],130:[2,176],131:[2,176],132:[2,176],133:[2,176]},{99:87,100:[1,62],102:[1,63],105:88,106:[1,65],107:66,122:[1,86]},{1:[2,177],6:[2,177],25:[2,177],26:[2,177],46:[2,177],51:[2,177],54:[2,177],69:[2,177],74:[2,177],82:[2,177],87:[2,177],89:[2,177],98:[2,177],99:84,100:[2,177],101:[2,177],102:[2,177],105:85,106:[2,177],107:66,114:[2,177],122:[2,177],124:[2,177],125:[2,177],128:[1,75],129:[2,177],130:[2,177],131:[2,177],132:[2,177],133:[2,177]},{1:[2,178],6:[2,178],25:[2,178],26:[2,178],46:[2,178],51:[2,178],54:[2,178],69:[2,178],74:[2,178],82:[2,178],87:[2,178],89:[2,178],98:[2,178],99:84,100:[2,178],101:[2,178],102:[2,178],105:85,106:[2,178],107:66,114:[2,178],122:[2,178],124:[2,178],125:[2,178],128:[1,75],129:[2,178],130:[2,178],131:[2,178],132:[2,178],133:[2,178]},{1:[2,179],6:[2,179],25:[2,179],26:[2,179],46:[2,179],51:[2,179],54:[2,179],63:[2,66],64:[2,66],65:[2,66],68:[2,66],69:[2,179],70:[2,66],71:[2,66],74:[2,179],80:[2,66],81:[2,66],82:[2,179],87:[2,179],89:[2,179],98:[2,179],100:[2,179],101:[2,179],102:[2,179],106:[2,179],114:[2,179],122:[2,179],124:[2,179],125:[2,179],128:[2,179],129:[2,179],130:[2,179],131:[2,179],132:[2,179],133:[2,179]},{59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:96,68:[1,97],70:[1,98],71:[1,99],77:89,80:[1,91],81:[2,101]},{59:101,63:[1,92],64:[1,93],65:[1,94],66:95,67:96,68:[1,97],70:[1,98],71:[1,99],77:100,80:[1,91],81:[2,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],46:[2,69],51:[2,69],54:[2,69],63:[2,69],64:[2,69],65:[2,69],68:[2,69],69:[2,69],70:[2,69],71:[2,69],74:[2,69],80:[2,69],81:[2,69],82:[2,69],87:[2,69],89:[2,69],98:[2,69],100:[2,69],101:[2,69],102:[2,69],106:[2,69],114:[2,69],122:[2,69],124:[2,69],125:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],46:[2,180],51:[2,180],54:[2,180],63:[2,66],64:[2,66],65:[2,66],68:[2,66],69:[2,180],70:[2,66],71:[2,66],74:[2,180],80:[2,66],81:[2,66],82:[2,180],87:[2,180],89:[2,180],98:[2,180],100:[2,180],101:[2,180],102:[2,180],106:[2,180],114:[2,180],122:[2,180],124:[2,180],125:[2,180],128:[2,180],129:[2,180],130:[2,180],131:[2,180],132:[2,180],133:[2,180]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],46:[2,181],51:[2,181],54:[2,181],69:[2,181],74:[2,181],82:[2,181],87:[2,181],89:[2,181],98:[2,181],100:[2,181],101:[2,181],102:[2,181],106:[2,181],114:[2,181],122:[2,181],124:[2,181],125:[2,181],128:[2,181],129:[2,181],130:[2,181],131:[2,181],132:[2,181],133:[2,181]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],46:[2,182],51:[2,182],54:[2,182],69:[2,182],74:[2,182],82:[2,182],87:[2,182],89:[2,182],98:[2,182],100:[2,182],101:[2,182],102:[2,182],106:[2,182],114:[2,182],122:[2,182],124:[2,182],125:[2,182],128:[2,182],129:[2,182],130:[2,182],131:[2,182],132:[2,182],133:[2,182]},{8:202,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,203],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:204,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{5:206,25:[1,5],121:[1,205]},{1:[2,125],6:[2,125],25:[2,125],26:[2,125],46:[2,125],51:[2,125],54:[2,125],69:[2,125],74:[2,125],82:[2,125],87:[2,125],89:[2,125],93:207,94:[1,208],95:[1,209],98:[2,125],100:[2,125],101:[2,125],102:[2,125],106:[2,125],114:[2,125],122:[2,125],124:[2,125],125:[2,125],128:[2,125],129:[2,125],130:[2,125],131:[2,125],132:[2,125],133:[2,125]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],46:[2,137],51:[2,137],54:[2,137],69:[2,137],74:[2,137],82:[2,137],87:[2,137],89:[2,137],98:[2,137],100:[2,137],101:[2,137],102:[2,137],106:[2,137],114:[2,137],122:[2,137],124:[2,137],125:[2,137],128:[2,137],129:[2,137],130:[2,137],131:[2,137],132:[2,137],133:[2,137]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],46:[2,145],51:[2,145],54:[2,145],69:[2,145],74:[2,145],82:[2,145],87:[2,145],89:[2,145],98:[2,145],100:[2,145],101:[2,145],102:[2,145],106:[2,145],114:[2,145],122:[2,145],124:[2,145],125:[2,145],128:[2,145],129:[2,145],130:[2,145],131:[2,145],132:[2,145],133:[2,145]},{25:[1,210],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{116:211,118:212,119:[1,213]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],46:[2,90],51:[2,90],54:[2,90],69:[2,90],74:[2,90],82:[2,90],87:[2,90],89:[2,90],98:[2,90],100:[2,90],101:[2,90],102:[2,90],106:[2,90],114:[2,90],122:[2,90],124:[2,90],125:[2,90],128:[2,90],129:[2,90],130:[2,90],131:[2,90],132:[2,90],133:[2,90]},{14:214,15:121,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:122,41:60,55:47,56:48,58:215,60:25,61:26,62:27,72:[1,67],79:[1,28],84:[1,55],85:[1,56],86:[1,54],97:[1,53]},{1:[2,93],5:216,6:[2,93],25:[1,5],26:[2,93],46:[2,93],51:[2,93],54:[2,93],63:[2,66],64:[2,66],65:[2,66],68:[2,66],69:[2,93],70:[2,66],71:[2,66],74:[2,93],76:[1,217],80:[2,66],81:[2,66],82:[2,93],87:[2,93],89:[2,93],98:[2,93],100:[2,93],101:[2,93],102:[2,93],106:[2,93],114:[2,93],122:[2,93],124:[2,93],125:[2,93],128:[2,93],129:[2,93],130:[2,93],131:[2,93],132:[2,93],133:[2,93]},{1:[2,42],6:[2,42],26:[2,42],98:[2,42],99:84,100:[2,42],102:[2,42],105:85,106:[2,42],107:66,122:[2,42],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,130],6:[2,130],26:[2,130],98:[2,130],99:84,100:[2,130],102:[2,130],105:85,106:[2,130],107:66,122:[2,130],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{6:[1,71],98:[1,218]},{4:219,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{6:[2,121],25:[2,121],51:[2,121],54:[1,221],87:[2,121],88:220,89:[1,187],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,108],6:[2,108],25:[2,108],26:[2,108],37:[2,108],46:[2,108],51:[2,108],54:[2,108],63:[2,108],64:[2,108],65:[2,108],68:[2,108],69:[2,108],70:[2,108],71:[2,108],74:[2,108],80:[2,108],81:[2,108],82:[2,108],87:[2,108],89:[2,108],98:[2,108],100:[2,108],101:[2,108],102:[2,108],106:[2,108],112:[2,108],113:[2,108],114:[2,108],122:[2,108],124:[2,108],125:[2,108],128:[2,108],129:[2,108],130:[2,108],131:[2,108],132:[2,108],133:[2,108]},{6:[2,49],25:[2,49],50:222,51:[1,223],87:[2,49]},{6:[2,116],25:[2,116],26:[2,116],51:[2,116],82:[2,116],87:[2,116]},{8:197,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,145],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:146,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],83:224,84:[1,55],85:[1,56],86:[1,54],90:144,92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{6:[2,122],25:[2,122],26:[2,122],51:[2,122],82:[2,122],87:[2,122]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],37:[2,107],40:[2,107],46:[2,107],51:[2,107],54:[2,107],63:[2,107],64:[2,107],65:[2,107],68:[2,107],69:[2,107],70:[2,107],71:[2,107],74:[2,107],76:[2,107],80:[2,107],81:[2,107],82:[2,107],87:[2,107],89:[2,107],98:[2,107],100:[2,107],101:[2,107],102:[2,107],106:[2,107],114:[2,107],122:[2,107],124:[2,107],125:[2,107],126:[2,107],127:[2,107],128:[2,107],129:[2,107],130:[2,107],131:[2,107],132:[2,107],133:[2,107],134:[2,107]},{5:225,25:[1,5],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],46:[2,133],51:[2,133],54:[2,133],69:[2,133],74:[2,133],82:[2,133],87:[2,133],89:[2,133],98:[2,133],99:84,100:[1,62],101:[1,226],102:[1,63],105:85,106:[1,65],107:66,114:[2,133],122:[2,133],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],46:[2,135],51:[2,135],54:[2,135],69:[2,135],74:[2,135],82:[2,135],87:[2,135],89:[2,135],98:[2,135],99:84,100:[1,62],101:[1,227],102:[1,63],105:85,106:[1,65],107:66,114:[2,135],122:[2,135],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],46:[2,141],51:[2,141],54:[2,141],69:[2,141],74:[2,141],82:[2,141],87:[2,141],89:[2,141],98:[2,141],100:[2,141],101:[2,141],102:[2,141],106:[2,141],114:[2,141],122:[2,141],124:[2,141],125:[2,141],128:[2,141],129:[2,141],130:[2,141],131:[2,141],132:[2,141],133:[2,141]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],46:[2,142],51:[2,142],54:[2,142],69:[2,142],74:[2,142],82:[2,142],87:[2,142],89:[2,142],98:[2,142],99:84,100:[1,62],101:[2,142],102:[1,63],105:85,106:[1,65],107:66,114:[2,142],122:[2,142],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],46:[2,146],51:[2,146],54:[2,146],69:[2,146],74:[2,146],82:[2,146],87:[2,146],89:[2,146],98:[2,146],100:[2,146],101:[2,146],102:[2,146],106:[2,146],114:[2,146],122:[2,146],124:[2,146],125:[2,146],128:[2,146],129:[2,146],130:[2,146],131:[2,146],132:[2,146],133:[2,146]},{112:[2,148],113:[2,148]},{27:157,28:[1,70],55:158,56:159,72:[1,67],86:[1,113],109:228,111:156},{51:[1,229],112:[2,153],113:[2,153]},{51:[2,150],112:[2,150],113:[2,150]},{51:[2,151],112:[2,151],113:[2,151]},{51:[2,152],112:[2,152],113:[2,152]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],46:[2,147],51:[2,147],54:[2,147],69:[2,147],74:[2,147],82:[2,147],87:[2,147],89:[2,147],98:[2,147],100:[2,147],101:[2,147],102:[2,147],106:[2,147],114:[2,147],122:[2,147],124:[2,147],125:[2,147],128:[2,147],129:[2,147],130:[2,147],131:[2,147],132:[2,147],133:[2,147]},{8:230,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:231,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{6:[2,49],25:[2,49],50:232,51:[1,233],74:[2,49]},{6:[2,85],25:[2,85],26:[2,85],51:[2,85],74:[2,85]},{6:[2,35],25:[2,35],26:[2,35],40:[1,234],51:[2,35],74:[2,35]},{6:[2,38],25:[2,38],26:[2,38],51:[2,38],74:[2,38]},{6:[2,39],25:[2,39],26:[2,39],40:[2,39],51:[2,39],74:[2,39]},{6:[2,40],25:[2,40],26:[2,40],40:[2,40],51:[2,40],74:[2,40]},{6:[2,41],25:[2,41],26:[2,41],40:[2,41],51:[2,41],74:[2,41]},{1:[2,5],6:[2,5],26:[2,5],98:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],46:[2,25],51:[2,25],54:[2,25],69:[2,25],74:[2,25],82:[2,25],87:[2,25],89:[2,25],94:[2,25],95:[2,25],98:[2,25],100:[2,25],101:[2,25],102:[2,25],106:[2,25],114:[2,25],117:[2,25],119:[2,25],122:[2,25],124:[2,25],125:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],46:[2,184],51:[2,184],54:[2,184],69:[2,184],74:[2,184],82:[2,184],87:[2,184],89:[2,184],98:[2,184],99:84,100:[2,184],101:[2,184],102:[2,184],105:85,106:[2,184],107:66,114:[2,184],122:[2,184],124:[2,184],125:[2,184],128:[1,75],129:[1,78],130:[2,184],131:[2,184],132:[2,184],133:[2,184]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],46:[2,185],51:[2,185],54:[2,185],69:[2,185],74:[2,185],82:[2,185],87:[2,185],89:[2,185],98:[2,185],99:84,100:[2,185],101:[2,185],102:[2,185],105:85,106:[2,185],107:66,114:[2,185],122:[2,185],124:[2,185],125:[2,185],128:[1,75],129:[1,78],130:[2,185],131:[2,185],132:[2,185],133:[2,185]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],46:[2,186],51:[2,186],54:[2,186],69:[2,186],74:[2,186],82:[2,186],87:[2,186],89:[2,186],98:[2,186],99:84,100:[2,186],101:[2,186],102:[2,186],105:85,106:[2,186],107:66,114:[2,186],122:[2,186],124:[2,186],125:[2,186],128:[1,75],129:[2,186],130:[2,186],131:[2,186],132:[2,186],133:[2,186]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],46:[2,187],51:[2,187],54:[2,187],69:[2,187],74:[2,187],82:[2,187],87:[2,187],89:[2,187],98:[2,187],99:84,100:[2,187],101:[2,187],102:[2,187],105:85,106:[2,187],107:66,114:[2,187],122:[2,187],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[2,187],131:[2,187],132:[2,187],133:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],46:[2,188],51:[2,188],54:[2,188],69:[2,188],74:[2,188],82:[2,188],87:[2,188],89:[2,188],98:[2,188],99:84,100:[2,188],101:[2,188],102:[2,188],105:85,106:[2,188],107:66,114:[2,188],122:[2,188],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[2,188],132:[2,188],133:[1,82]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],46:[2,189],51:[2,189],54:[2,189],69:[2,189],74:[2,189],82:[2,189],87:[2,189],89:[2,189],98:[2,189],99:84,100:[2,189],101:[2,189],102:[2,189],105:85,106:[2,189],107:66,114:[2,189],122:[2,189],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[2,189],133:[1,82]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],46:[2,190],51:[2,190],54:[2,190],69:[2,190],74:[2,190],82:[2,190],87:[2,190],89:[2,190],98:[2,190],99:84,100:[2,190],101:[2,190],102:[2,190],105:85,106:[2,190],107:66,114:[2,190],122:[2,190],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[2,190],132:[2,190],133:[2,190]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],46:[2,175],51:[2,175],54:[2,175],69:[2,175],74:[2,175],82:[2,175],87:[2,175],89:[2,175],98:[2,175],99:84,100:[1,62],101:[2,175],102:[1,63],105:85,106:[1,65],107:66,114:[2,175],122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],46:[2,174],51:[2,174],54:[2,174],69:[2,174],74:[2,174],82:[2,174],87:[2,174],89:[2,174],98:[2,174],99:84,100:[1,62],101:[2,174],102:[1,63],105:85,106:[1,65],107:66,114:[2,174],122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],46:[2,97],51:[2,97],54:[2,97],63:[2,97],64:[2,97],65:[2,97],68:[2,97],69:[2,97],70:[2,97],71:[2,97],74:[2,97],80:[2,97],81:[2,97],82:[2,97],87:[2,97],89:[2,97],98:[2,97],100:[2,97],101:[2,97],102:[2,97],106:[2,97],114:[2,97],122:[2,97],124:[2,97],125:[2,97],128:[2,97],129:[2,97],130:[2,97],131:[2,97],132:[2,97],133:[2,97]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],37:[2,74],46:[2,74],51:[2,74],54:[2,74],63:[2,74],64:[2,74],65:[2,74],68:[2,74],69:[2,74],70:[2,74],71:[2,74],74:[2,74],76:[2,74],80:[2,74],81:[2,74],82:[2,74],87:[2,74],89:[2,74],98:[2,74],100:[2,74],101:[2,74],102:[2,74],106:[2,74],114:[2,74],122:[2,74],124:[2,74],125:[2,74],126:[2,74],127:[2,74],128:[2,74],129:[2,74],130:[2,74],131:[2,74],132:[2,74],133:[2,74],134:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],37:[2,75],46:[2,75],51:[2,75],54:[2,75],63:[2,75],64:[2,75],65:[2,75],68:[2,75],69:[2,75],70:[2,75],71:[2,75],74:[2,75],76:[2,75],80:[2,75],81:[2,75],82:[2,75],87:[2,75],89:[2,75],98:[2,75],100:[2,75],101:[2,75],102:[2,75],106:[2,75],114:[2,75],122:[2,75],124:[2,75],125:[2,75],126:[2,75],127:[2,75],128:[2,75],129:[2,75],130:[2,75],131:[2,75],132:[2,75],133:[2,75],134:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],37:[2,76],46:[2,76],51:[2,76],54:[2,76],63:[2,76],64:[2,76],65:[2,76],68:[2,76],69:[2,76],70:[2,76],71:[2,76],74:[2,76],76:[2,76],80:[2,76],81:[2,76],82:[2,76],87:[2,76],89:[2,76],98:[2,76],100:[2,76],101:[2,76],102:[2,76],106:[2,76],114:[2,76],122:[2,76],124:[2,76],125:[2,76],126:[2,76],127:[2,76],128:[2,76],129:[2,76],130:[2,76],131:[2,76],132:[2,76],133:[2,76],134:[2,76]},{54:[1,188],69:[1,235],88:236,89:[1,187],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{8:237,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{13:[2,110],28:[2,110],30:[2,110],31:[2,110],33:[2,110],34:[2,110],35:[2,110],42:[2,110],43:[2,110],44:[2,110],48:[2,110],49:[2,110],69:[2,110],72:[2,110],75:[2,110],79:[2,110],84:[2,110],85:[2,110],86:[2,110],92:[2,110],96:[2,110],97:[2,110],100:[2,110],102:[2,110],104:[2,110],106:[2,110],115:[2,110],121:[2,110],123:[2,110],124:[2,110],125:[2,110],126:[2,110],127:[2,110]},{13:[2,111],28:[2,111],30:[2,111],31:[2,111],33:[2,111],34:[2,111],35:[2,111],42:[2,111],43:[2,111],44:[2,111],48:[2,111],49:[2,111],69:[2,111],72:[2,111],75:[2,111],79:[2,111],84:[2,111],85:[2,111],86:[2,111],92:[2,111],96:[2,111],97:[2,111],100:[2,111],102:[2,111],104:[2,111],106:[2,111],115:[2,111],121:[2,111],123:[2,111],124:[2,111],125:[2,111],126:[2,111],127:[2,111]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],37:[2,81],46:[2,81],51:[2,81],54:[2,81],63:[2,81],64:[2,81],65:[2,81],68:[2,81],69:[2,81],70:[2,81],71:[2,81],74:[2,81],76:[2,81],80:[2,81],81:[2,81],82:[2,81],87:[2,81],89:[2,81],98:[2,81],100:[2,81],101:[2,81],102:[2,81],106:[2,81],114:[2,81],122:[2,81],124:[2,81],125:[2,81],126:[2,81],127:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81]},{8:238,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],37:[2,82],46:[2,82],51:[2,82],54:[2,82],63:[2,82],64:[2,82],65:[2,82],68:[2,82],69:[2,82],70:[2,82],71:[2,82],74:[2,82],76:[2,82],80:[2,82],81:[2,82],82:[2,82],87:[2,82],89:[2,82],98:[2,82],100:[2,82],101:[2,82],102:[2,82],106:[2,82],114:[2,82],122:[2,82],124:[2,82],125:[2,82],126:[2,82],127:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],46:[2,98],51:[2,98],54:[2,98],63:[2,98],64:[2,98],65:[2,98],68:[2,98],69:[2,98],70:[2,98],71:[2,98],74:[2,98],80:[2,98],81:[2,98],82:[2,98],87:[2,98],89:[2,98],98:[2,98],100:[2,98],101:[2,98],102:[2,98],106:[2,98],114:[2,98],122:[2,98],124:[2,98],125:[2,98],128:[2,98],129:[2,98],130:[2,98],131:[2,98],132:[2,98],133:[2,98]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],46:[2,33],51:[2,33],54:[2,33],69:[2,33],74:[2,33],82:[2,33],87:[2,33],89:[2,33],98:[2,33],99:84,100:[2,33],101:[2,33],102:[2,33],105:85,106:[2,33],107:66,114:[2,33],122:[2,33],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{8:239,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],46:[2,103],51:[2,103],54:[2,103],63:[2,103],64:[2,103],65:[2,103],68:[2,103],69:[2,103],70:[2,103],71:[2,103],74:[2,103],80:[2,103],81:[2,103],82:[2,103],87:[2,103],89:[2,103],98:[2,103],100:[2,103],101:[2,103],102:[2,103],106:[2,103],114:[2,103],122:[2,103],124:[2,103],125:[2,103],128:[2,103],129:[2,103],130:[2,103],131:[2,103],132:[2,103],133:[2,103]},{6:[2,49],25:[2,49],50:240,51:[1,223],82:[2,49]},{6:[2,121],25:[2,121],26:[2,121],51:[2,121],54:[1,241],82:[2,121],87:[2,121],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{47:242,48:[1,57],49:[1,58]},{27:108,28:[1,70],41:109,52:243,53:107,55:110,56:111,72:[1,67],85:[1,112],86:[1,113]},{46:[2,55],51:[2,55]},{8:244,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],46:[2,191],51:[2,191],54:[2,191],69:[2,191],74:[2,191],82:[2,191],87:[2,191],89:[2,191],98:[2,191],99:84,100:[2,191],101:[2,191],102:[2,191],105:85,106:[2,191],107:66,114:[2,191],122:[2,191],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{8:245,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],46:[2,193],51:[2,193],54:[2,193],69:[2,193],74:[2,193],82:[2,193],87:[2,193],89:[2,193],98:[2,193],99:84,100:[2,193],101:[2,193],102:[2,193],105:85,106:[2,193],107:66,114:[2,193],122:[2,193],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{8:246,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],46:[2,172],51:[2,172],54:[2,172],69:[2,172],74:[2,172],82:[2,172],87:[2,172],89:[2,172],98:[2,172],100:[2,172],101:[2,172],102:[2,172],106:[2,172],114:[2,172],117:[2,172],122:[2,172],124:[2,172],125:[2,172],128:[2,172],129:[2,172],130:[2,172],131:[2,172],132:[2,172],133:[2,172]},{1:[2,126],6:[2,126],25:[2,126],26:[2,126],46:[2,126],51:[2,126],54:[2,126],69:[2,126],74:[2,126],82:[2,126],87:[2,126],89:[2,126],94:[1,247],98:[2,126],100:[2,126],101:[2,126],102:[2,126],106:[2,126],114:[2,126],122:[2,126],124:[2,126],125:[2,126],128:[2,126],129:[2,126],130:[2,126],131:[2,126],132:[2,126],133:[2,126]},{5:248,25:[1,5]},{27:249,28:[1,70]},{116:250,118:212,119:[1,213]},{26:[1,251],117:[1,252],118:253,119:[1,213]},{26:[2,166],117:[2,166],119:[2,166]},{8:255,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],91:254,92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,91],5:256,6:[2,91],25:[1,5],26:[2,91],46:[2,91],51:[2,91],54:[2,91],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:96,68:[1,97],69:[2,91],70:[1,98],71:[1,99],74:[2,91],77:89,80:[1,91],81:[2,101],82:[2,91],87:[2,91],89:[2,91],98:[2,91],100:[2,91],101:[2,91],102:[2,91],106:[2,91],114:[2,91],122:[2,91],124:[2,91],125:[2,91],128:[2,91],129:[2,91],130:[2,91],131:[2,91],132:[2,91],133:[2,91]},{1:[2,66],6:[2,66],25:[2,66],26:[2,66],46:[2,66],51:[2,66],54:[2,66],63:[2,66],64:[2,66],65:[2,66],68:[2,66],69:[2,66],70:[2,66],71:[2,66],74:[2,66],80:[2,66],81:[2,66],82:[2,66],87:[2,66],89:[2,66],98:[2,66],100:[2,66],101:[2,66],102:[2,66],106:[2,66],114:[2,66],122:[2,66],124:[2,66],125:[2,66],128:[2,66],129:[2,66],130:[2,66],131:[2,66],132:[2,66],133:[2,66]},{1:[2,94],6:[2,94],25:[2,94],26:[2,94],46:[2,94],51:[2,94],54:[2,94],69:[2,94],74:[2,94],82:[2,94],87:[2,94],89:[2,94],98:[2,94],100:[2,94],101:[2,94],102:[2,94],106:[2,94],114:[2,94],122:[2,94],124:[2,94],125:[2,94],128:[2,94],129:[2,94],130:[2,94],131:[2,94],132:[2,94],133:[2,94]},{14:257,15:121,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:122,41:60,55:47,56:48,58:215,60:25,61:26,62:27,72:[1,67],79:[1,28],84:[1,55],85:[1,56],86:[1,54],97:[1,53]},{1:[2,131],6:[2,131],25:[2,131],26:[2,131],46:[2,131],51:[2,131],54:[2,131],63:[2,131],64:[2,131],65:[2,131],68:[2,131],69:[2,131],70:[2,131],71:[2,131],74:[2,131],80:[2,131],81:[2,131],82:[2,131],87:[2,131],89:[2,131],98:[2,131],100:[2,131],101:[2,131],102:[2,131],106:[2,131],114:[2,131],122:[2,131],124:[2,131],125:[2,131],128:[2,131],129:[2,131],130:[2,131],131:[2,131],132:[2,131],133:[2,131]},{6:[1,71],26:[1,258]},{8:259,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{6:[2,61],13:[2,111],25:[2,61],28:[2,111],30:[2,111],31:[2,111],33:[2,111],34:[2,111],35:[2,111],42:[2,111],43:[2,111],44:[2,111],48:[2,111],49:[2,111],51:[2,61],72:[2,111],75:[2,111],79:[2,111],84:[2,111],85:[2,111],86:[2,111],87:[2,61],92:[2,111],96:[2,111],97:[2,111],100:[2,111],102:[2,111],104:[2,111],106:[2,111],115:[2,111],121:[2,111],123:[2,111],124:[2,111],125:[2,111],126:[2,111],127:[2,111]},{6:[1,261],25:[1,262],87:[1,260]},{6:[2,50],8:197,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[2,50],26:[2,50],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:146,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],82:[2,50],84:[1,55],85:[1,56],86:[1,54],87:[2,50],90:263,92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{6:[2,49],25:[2,49],26:[2,49],50:264,51:[1,223]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],46:[2,170],51:[2,170],54:[2,170],69:[2,170],74:[2,170],82:[2,170],87:[2,170],89:[2,170],98:[2,170],100:[2,170],101:[2,170],102:[2,170],106:[2,170],114:[2,170],117:[2,170],122:[2,170],124:[2,170],125:[2,170],128:[2,170],129:[2,170],130:[2,170],131:[2,170],132:[2,170],133:[2,170]},{8:265,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:266,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{112:[2,149],113:[2,149]},{27:157,28:[1,70],55:158,56:159,72:[1,67],86:[1,113],111:267},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],46:[2,155],51:[2,155],54:[2,155],69:[2,155],74:[2,155],82:[2,155],87:[2,155],89:[2,155],98:[2,155],99:84,100:[2,155],101:[1,268],102:[2,155],105:85,106:[2,155],107:66,114:[1,269],122:[2,155],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],46:[2,156],51:[2,156],54:[2,156],69:[2,156],74:[2,156],82:[2,156],87:[2,156],89:[2,156],98:[2,156],99:84,100:[2,156],101:[1,270],102:[2,156],105:85,106:[2,156],107:66,114:[2,156],122:[2,156],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{6:[1,272],25:[1,273],74:[1,271]},{6:[2,50],12:166,25:[2,50],26:[2,50],27:167,28:[1,70],29:168,30:[1,68],31:[1,69],38:274,39:165,41:169,43:[1,46],74:[2,50],85:[1,112]},{8:275,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,276],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],37:[2,80],46:[2,80],51:[2,80],54:[2,80],63:[2,80],64:[2,80],65:[2,80],68:[2,80],69:[2,80],70:[2,80],71:[2,80],74:[2,80],76:[2,80],80:[2,80],81:[2,80],82:[2,80],87:[2,80],89:[2,80],98:[2,80],100:[2,80],101:[2,80],102:[2,80],106:[2,80],114:[2,80],122:[2,80],124:[2,80],125:[2,80],126:[2,80],127:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80]},{8:277,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,69:[1,278],72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{69:[1,279],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{69:[1,235],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{26:[1,280],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{6:[1,261],25:[1,262],82:[1,281]},{6:[2,61],25:[2,61],26:[2,61],51:[2,61],82:[2,61],87:[2,61]},{5:282,25:[1,5]},{46:[2,53],51:[2,53]},{46:[2,56],51:[2,56],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{26:[1,283],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{5:284,25:[1,5],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{5:285,25:[1,5]},{1:[2,127],6:[2,127],25:[2,127],26:[2,127],46:[2,127],51:[2,127],54:[2,127],69:[2,127],74:[2,127],82:[2,127],87:[2,127],89:[2,127],98:[2,127],100:[2,127],101:[2,127],102:[2,127],106:[2,127],114:[2,127],122:[2,127],124:[2,127],125:[2,127],128:[2,127],129:[2,127],130:[2,127],131:[2,127],132:[2,127],133:[2,127]},{5:286,25:[1,5]},{26:[1,287],117:[1,288],118:253,119:[1,213]},{1:[2,164],6:[2,164],25:[2,164],26:[2,164],46:[2,164],51:[2,164],54:[2,164],69:[2,164],74:[2,164],82:[2,164],87:[2,164],89:[2,164],98:[2,164],100:[2,164],101:[2,164],102:[2,164],106:[2,164],114:[2,164],122:[2,164],124:[2,164],125:[2,164],128:[2,164],129:[2,164],130:[2,164],131:[2,164],132:[2,164],133:[2,164]},{5:289,25:[1,5]},{26:[2,167],117:[2,167],119:[2,167]},{5:290,25:[1,5],51:[1,291]},{25:[2,123],51:[2,123],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,92],6:[2,92],25:[2,92],26:[2,92],46:[2,92],51:[2,92],54:[2,92],69:[2,92],74:[2,92],82:[2,92],87:[2,92],89:[2,92],98:[2,92],100:[2,92],101:[2,92],102:[2,92],106:[2,92],114:[2,92],122:[2,92],124:[2,92],125:[2,92],128:[2,92],129:[2,92],130:[2,92],131:[2,92],132:[2,92],133:[2,92]},{1:[2,95],5:292,6:[2,95],25:[1,5],26:[2,95],46:[2,95],51:[2,95],54:[2,95],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:96,68:[1,97],69:[2,95],70:[1,98],71:[1,99],74:[2,95],77:89,80:[1,91],81:[2,101],82:[2,95],87:[2,95],89:[2,95],98:[2,95],100:[2,95],101:[2,95],102:[2,95],106:[2,95],114:[2,95],122:[2,95],124:[2,95],125:[2,95],128:[2,95],129:[2,95],130:[2,95],131:[2,95],132:[2,95],133:[2,95]},{98:[1,293]},{87:[1,294],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],37:[2,109],46:[2,109],51:[2,109],54:[2,109],63:[2,109],64:[2,109],65:[2,109],68:[2,109],69:[2,109],70:[2,109],71:[2,109],74:[2,109],80:[2,109],81:[2,109],82:[2,109],87:[2,109],89:[2,109],98:[2,109],100:[2,109],101:[2,109],102:[2,109],106:[2,109],112:[2,109],113:[2,109],114:[2,109],122:[2,109],124:[2,109],125:[2,109],128:[2,109],129:[2,109],130:[2,109],131:[2,109],132:[2,109],133:[2,109]},{8:197,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:146,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],90:295,92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:197,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,145],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:146,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],83:296,84:[1,55],85:[1,56],86:[1,54],90:144,92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{6:[2,117],25:[2,117],26:[2,117],51:[2,117],82:[2,117],87:[2,117]},{6:[1,261],25:[1,262],26:[1,297]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],46:[2,134],51:[2,134],54:[2,134],69:[2,134],74:[2,134],82:[2,134],87:[2,134],89:[2,134],98:[2,134],99:84,100:[1,62],101:[2,134],102:[1,63],105:85,106:[1,65],107:66,114:[2,134],122:[2,134],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],46:[2,136],51:[2,136],54:[2,136],69:[2,136],74:[2,136],82:[2,136],87:[2,136],89:[2,136],98:[2,136],99:84,100:[1,62],101:[2,136],102:[1,63],105:85,106:[1,65],107:66,114:[2,136],122:[2,136],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{112:[2,154],113:[2,154]},{8:298,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:299,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:300,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],37:[2,83],46:[2,83],51:[2,83],54:[2,83],63:[2,83],64:[2,83],65:[2,83],68:[2,83],69:[2,83],70:[2,83],71:[2,83],74:[2,83],80:[2,83],81:[2,83],82:[2,83],87:[2,83],89:[2,83],98:[2,83],100:[2,83],101:[2,83],102:[2,83],106:[2,83],112:[2,83],113:[2,83],114:[2,83],122:[2,83],124:[2,83],125:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83]},{12:166,27:167,28:[1,70],29:168,30:[1,68],31:[1,69],38:301,39:165,41:169,43:[1,46],85:[1,112]},{6:[2,84],12:166,25:[2,84],26:[2,84],27:167,28:[1,70],29:168,30:[1,68],31:[1,69],38:164,39:165,41:169,43:[1,46],51:[2,84],73:302,85:[1,112]},{6:[2,86],25:[2,86],26:[2,86],51:[2,86],74:[2,86]},{6:[2,36],25:[2,36],26:[2,36],51:[2,36],74:[2,36],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{8:303,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{69:[1,304],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],37:[2,114],46:[2,114],51:[2,114],54:[2,114],63:[2,114],64:[2,114],65:[2,114],68:[2,114],69:[2,114],70:[2,114],71:[2,114],74:[2,114],76:[2,114],80:[2,114],81:[2,114],82:[2,114],87:[2,114],89:[2,114],98:[2,114],100:[2,114],101:[2,114],102:[2,114],106:[2,114],114:[2,114],122:[2,114],124:[2,114],125:[2,114],126:[2,114],127:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],37:[2,115],46:[2,115],51:[2,115],54:[2,115],63:[2,115],64:[2,115],65:[2,115],68:[2,115],69:[2,115],70:[2,115],71:[2,115],74:[2,115],76:[2,115],80:[2,115],81:[2,115],82:[2,115],87:[2,115],89:[2,115],98:[2,115],100:[2,115],101:[2,115],102:[2,115],106:[2,115],114:[2,115],122:[2,115],124:[2,115],125:[2,115],126:[2,115],127:[2,115],128:[2,115],129:[2,115],130:[2,115],131:[2,115],132:[2,115],133:[2,115],134:[2,115]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],46:[2,34],51:[2,34],54:[2,34],69:[2,34],74:[2,34],82:[2,34],87:[2,34],89:[2,34],98:[2,34],100:[2,34],101:[2,34],102:[2,34],106:[2,34],114:[2,34],122:[2,34],124:[2,34],125:[2,34],128:[2,34],129:[2,34],130:[2,34],131:[2,34],132:[2,34],133:[2,34]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],46:[2,104],51:[2,104],54:[2,104],63:[2,104],64:[2,104],65:[2,104],68:[2,104],69:[2,104],70:[2,104],71:[2,104],74:[2,104],80:[2,104],81:[2,104],82:[2,104],87:[2,104],89:[2,104],98:[2,104],100:[2,104],101:[2,104],102:[2,104],106:[2,104],114:[2,104],122:[2,104],124:[2,104],125:[2,104],128:[2,104],129:[2,104],130:[2,104],131:[2,104],132:[2,104],133:[2,104]},{1:[2,45],6:[2,45],25:[2,45],26:[2,45],46:[2,45],51:[2,45],54:[2,45],69:[2,45],74:[2,45],82:[2,45],87:[2,45],89:[2,45],98:[2,45],100:[2,45],101:[2,45],102:[2,45],106:[2,45],114:[2,45],122:[2,45],124:[2,45],125:[2,45],128:[2,45],129:[2,45],130:[2,45],131:[2,45],132:[2,45],133:[2,45]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],46:[2,192],51:[2,192],54:[2,192],69:[2,192],74:[2,192],82:[2,192],87:[2,192],89:[2,192],98:[2,192],100:[2,192],101:[2,192],102:[2,192],106:[2,192],114:[2,192],122:[2,192],124:[2,192],125:[2,192],128:[2,192],129:[2,192],130:[2,192],131:[2,192],132:[2,192],133:[2,192]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],46:[2,171],51:[2,171],54:[2,171],69:[2,171],74:[2,171],82:[2,171],87:[2,171],89:[2,171],98:[2,171],100:[2,171],101:[2,171],102:[2,171],106:[2,171],114:[2,171],117:[2,171],122:[2,171],124:[2,171],125:[2,171],128:[2,171],129:[2,171],130:[2,171],131:[2,171],132:[2,171],133:[2,171]},{1:[2,128],6:[2,128],25:[2,128],26:[2,128],46:[2,128],51:[2,128],54:[2,128],69:[2,128],74:[2,128],82:[2,128],87:[2,128],89:[2,128],98:[2,128],100:[2,128],101:[2,128],102:[2,128],106:[2,128],114:[2,128],122:[2,128],124:[2,128],125:[2,128],128:[2,128],129:[2,128],130:[2,128],131:[2,128],132:[2,128],133:[2,128]},{1:[2,129],6:[2,129],25:[2,129],26:[2,129],46:[2,129],51:[2,129],54:[2,129],69:[2,129],74:[2,129],82:[2,129],87:[2,129],89:[2,129],94:[2,129],98:[2,129],100:[2,129],101:[2,129],102:[2,129],106:[2,129],114:[2,129],122:[2,129],124:[2,129],125:[2,129],128:[2,129],129:[2,129],130:[2,129],131:[2,129],132:[2,129],133:[2,129]},{1:[2,162],6:[2,162],25:[2,162],26:[2,162],46:[2,162],51:[2,162],54:[2,162],69:[2,162],74:[2,162],82:[2,162],87:[2,162],89:[2,162],98:[2,162],100:[2,162],101:[2,162],102:[2,162],106:[2,162],114:[2,162],122:[2,162],124:[2,162],125:[2,162],128:[2,162],129:[2,162],130:[2,162],131:[2,162],132:[2,162],133:[2,162]},{5:305,25:[1,5]},{26:[1,306]},{6:[1,307],26:[2,168],117:[2,168],119:[2,168]},{8:308,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],46:[2,96],51:[2,96],54:[2,96],69:[2,96],74:[2,96],82:[2,96],87:[2,96],89:[2,96],98:[2,96],100:[2,96],101:[2,96],102:[2,96],106:[2,96],114:[2,96],122:[2,96],124:[2,96],125:[2,96],128:[2,96],129:[2,96],130:[2,96],131:[2,96],132:[2,96],133:[2,96]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],46:[2,132],51:[2,132],54:[2,132],63:[2,132],64:[2,132],65:[2,132],68:[2,132],69:[2,132],70:[2,132],71:[2,132],74:[2,132],80:[2,132],81:[2,132],82:[2,132],87:[2,132],89:[2,132],98:[2,132],100:[2,132],101:[2,132],102:[2,132],106:[2,132],114:[2,132],122:[2,132],124:[2,132],125:[2,132],128:[2,132],129:[2,132],130:[2,132],131:[2,132],132:[2,132],133:[2,132]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],46:[2,112],51:[2,112],54:[2,112],63:[2,112],64:[2,112],65:[2,112],68:[2,112],69:[2,112],70:[2,112],71:[2,112],74:[2,112],80:[2,112],81:[2,112],82:[2,112],87:[2,112],89:[2,112],98:[2,112],100:[2,112],101:[2,112],102:[2,112],106:[2,112],114:[2,112],122:[2,112],124:[2,112],125:[2,112],128:[2,112],129:[2,112],130:[2,112],131:[2,112],132:[2,112],133:[2,112]},{6:[2,118],25:[2,118],26:[2,118],51:[2,118],82:[2,118],87:[2,118]},{6:[2,49],25:[2,49],26:[2,49],50:309,51:[1,223]},{6:[2,119],25:[2,119],26:[2,119],51:[2,119],82:[2,119],87:[2,119]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],46:[2,157],51:[2,157],54:[2,157],69:[2,157],74:[2,157],82:[2,157],87:[2,157],89:[2,157],98:[2,157],99:84,100:[2,157],101:[2,157],102:[2,157],105:85,106:[2,157],107:66,114:[1,310],122:[2,157],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,159],6:[2,159],25:[2,159],26:[2,159],46:[2,159],51:[2,159],54:[2,159],69:[2,159],74:[2,159],82:[2,159],87:[2,159],89:[2,159],98:[2,159],99:84,100:[2,159],101:[1,311],102:[2,159],105:85,106:[2,159],107:66,114:[2,159],122:[2,159],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,158],6:[2,158],25:[2,158],26:[2,158],46:[2,158],51:[2,158],54:[2,158],69:[2,158],74:[2,158],82:[2,158],87:[2,158],89:[2,158],98:[2,158],99:84,100:[2,158],101:[2,158],102:[2,158],105:85,106:[2,158],107:66,114:[2,158],122:[2,158],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{6:[2,87],25:[2,87],26:[2,87],51:[2,87],74:[2,87]},{6:[2,49],25:[2,49],26:[2,49],50:312,51:[1,233]},{26:[1,313],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],37:[2,113],46:[2,113],51:[2,113],54:[2,113],63:[2,113],64:[2,113],65:[2,113],68:[2,113],69:[2,113],70:[2,113],71:[2,113],74:[2,113],76:[2,113],80:[2,113],81:[2,113],82:[2,113],87:[2,113],89:[2,113],98:[2,113],100:[2,113],101:[2,113],102:[2,113],106:[2,113],114:[2,113],122:[2,113],124:[2,113],125:[2,113],126:[2,113],127:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113]},{26:[1,314]},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],46:[2,165],51:[2,165],54:[2,165],69:[2,165],74:[2,165],82:[2,165],87:[2,165],89:[2,165],98:[2,165],100:[2,165],101:[2,165],102:[2,165],106:[2,165],114:[2,165],122:[2,165],124:[2,165],125:[2,165],128:[2,165],129:[2,165],130:[2,165],131:[2,165],132:[2,165],133:[2,165]},{26:[2,169],117:[2,169],119:[2,169]},{25:[2,124],51:[2,124],99:84,100:[1,62],102:[1,63],105:85,106:[1,65],107:66,122:[1,83],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{6:[1,261],25:[1,262],26:[1,315]},{8:316,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{8:317,9:116,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,72:[1,67],75:[1,43],79:[1,28],84:[1,55],85:[1,56],86:[1,54],92:[1,38],96:[1,45],97:[1,53],99:39,100:[1,62],102:[1,63],103:40,104:[1,64],105:41,106:[1,65],107:66,115:[1,42],120:37,121:[1,61],123:[1,31],124:[1,32],125:[1,33],126:[1,34],127:[1,35]},{6:[1,272],25:[1,273],26:[1,318]},{6:[2,37],25:[2,37],26:[2,37],51:[2,37],74:[2,37]},{1:[2,163],6:[2,163],25:[2,163],26:[2,163],46:[2,163],51:[2,163],54:[2,163],69:[2,163],74:[2,163],82:[2,163],87:[2,163],89:[2,163],98:[2,163],100:[2,163],101:[2,163],102:[2,163],106:[2,163],114:[2,163],122:[2,163],124:[2,163],125:[2,163],128:[2,163],129:[2,163],130:[2,163],131:[2,163],132:[2,163],133:[2,163]},{6:[2,120],25:[2,120],26:[2,120],51:[2,120],82:[2,120],87:[2,120]},{1:[2,160],6:[2,160],25:[2,160],26:[2,160],46:[2,160],51:[2,160],54:[2,160],69:[2,160],74:[2,160],82:[2,160],87:[2,160],89:[2,160],98:[2,160],99:84,100:[2,160],101:[2,160],102:[2,160],105:85,106:[2,160],107:66,114:[2,160],122:[2,160],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{1:[2,161],6:[2,161],25:[2,161],26:[2,161],46:[2,161],51:[2,161],54:[2,161],69:[2,161],74:[2,161],82:[2,161],87:[2,161],89:[2,161],98:[2,161],99:84,100:[2,161],101:[2,161],102:[2,161],105:85,106:[2,161],107:66,114:[2,161],122:[2,161],124:[1,77],125:[1,76],128:[1,75],129:[1,78],130:[1,79],131:[1,80],132:[1,81],133:[1,82]},{6:[2,88],25:[2,88],26:[2,88],51:[2,88],74:[2,88]}],defaultActions:{57:[2,47],58:[2,48],72:[2,3],91:[2,102]},parseError:function d(a,b){throw new Error(a)},parse:function e(a){var b=this,c=[0],d=[null],e=this.table,f="",g=0,h=0,i=0,j=2,k=1;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.yy.parseError==="function"&&(this.parseError=this.yy.parseError);function l(a){c.length=c.length-2*a,d.length=d.length-a}function m(){var a;a=b.lexer.lex()||1,typeof a!=="number"&&(a=b.symbols_[a]||a);return a}var n,o,p,q,r,s,t={},u,v,w,x;while(true){p=c[c.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(n==null&&(n=m()),q=e[p]&&e[p][n]);if(typeof q==="undefined"||!q.length||!q[0]){if(!i){x=[];for(u in e[p])this.terminals_[u]&&u>2&&x.push("'"+this.terminals_[u]+"'");var y="";this.lexer.showPosition?y="Parse error on line "+(g+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", "):y="Parse error on line "+(g+1)+": Unexpected "+(n==1?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(y,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,expected:x})}if(i==3){if(n==k)throw new Error(y||"Parsing halted.");h=this.lexer.yyleng,f=this.lexer.yytext,g=this.lexer.yylineno,n=m()}while(1){if(j.toString()in e[p])break;if(p==0)throw new Error(y||"Parsing halted.");l(1),p=c[c.length-1]}o=n,n=j,p=c[c.length-1],q=e[p]&&e[p][j],i=3}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:c.push(n),d.push(this.lexer.yytext),c.push(q[1]),n=null,o?(n=o,o=null):(h=this.lexer.yyleng,f=this.lexer.yytext,g=this.lexer.yylineno,i>0&&i--);break;case 2:v=this.productions_[q[1]][1],t.$=d[d.length-v],s=this.performAction.call(t,f,h,g,this.yy,q[1],d);if(typeof s!=="undefined")return s;v&&(c=c.slice(0,-1*v*2),d=d.slice(0,-1*v)),c.push(this.productions_[q[1]][0]),d.push(t.$),w=e[c[c.length-2]][c[c.length-1]],c.push(w);break;case 3:return true}}return true}};return a}();typeof require!=="undefined"&&(a.parser=b,a.parse=function(){return b.parse.apply(b,arguments)},a.main=function c(b){if(!b[1])throw new Error("Usage: "+b[0]+" FILE");if(typeof process!=="undefined")var c=require("fs").readFileSync(require("path").join(process.cwd(),b[1]),"utf8");else{var d=require("file").path(require("file").cwd());var c=d.join(b[1]).read({charset:"utf-8"})}return a.parser.parse(c)},typeof module!=="undefined"&&require.main===module&&a.main(typeof process!=="undefined"?process.argv.slice(1):require("system").args))},require["./scope"]=new function(){var a=this;(function(){var b,c,d,e;e=require("./helpers"),c=e.extend,d=e.last,a.Scope=b=function(){a.root=null;function a(b,c,d){this.parent=b,this.expressions=c,this.method=d,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(a.root=this)}a.prototype.add=function(a,b,c){var d;if(this.shared&&!c)return this.parent.add(a,b,c);return typeof (d=this.positions[a])==="number"?this.variables[d].type=b:this.positions[a]=this.variables.push({name:a,type:b})-1},a.prototype.find=function(a,b){if(this.check(a,b))return true;this.add(a,"var");return false},a.prototype.parameter=function(a){if(!(this.shared&&this.parent.check(a,true)))return this.add(a,"param")},a.prototype.check=function(a,b){var c,d;c=!!this.type(a);if(c||b)return c;return!!((d=this.parent)!=null?d.check(a):void 0)},a.prototype.temporary=function(a,b){return a.length>1?"_"+a+(b>1?b:""):"_"+(b+parseInt(a,36)).toString(36).replace(/\d/g,"a")},a.prototype.type=function(a){var b,c,d,e;e=this.variables;for(c=0,d=e.length;c<d;c++){b=e[c];if(b.name===a)return b.type}return null},a.prototype.freeVariable=function(a){var b,c;b=0;while(this.check(c=this.temporary(a,b),true))b++;this.add(c,"var",true);return c},a.prototype.assign=function(a,b){this.add(a,{value:b,assigned:true});return this.hasAssignments=true},a.prototype.hasDeclarations=function(){return!!this.declaredVariables().length},a.prototype.declaredVariables=function(){var a,b,c,d,e,f;a=[],b=[],f=this.variables;for(d=0,e=f.length;d<e;d++)c=f[d],c.type==="var"&&(c.name.charAt(0)==="_"?b:a).push(c.name);return a.sort().concat(b.sort())},a.prototype.assignedVariables=function(){var a,b,c,d,e;d=this.variables,e=[];for(b=0,c=d.length;b<c;b++)a=d[b],a.type.assigned&&e.push(""+a.name+" = "+a.type.value);return e};return a}()}).call(this)},require["./nodes"]=new function(){var a=this;(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ba,bb,bc,bd,be,bf,bg;var bh=Object.prototype.hasOwnProperty,bi=function(a,b){for(var c in b)bh.call(b,c)&&(a[c]=b[c]);function d(){this.constructor=a}d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype;return a},bj=function(a,b){return function(){return a.apply(b,arguments)}};K=require("./scope").Scope,bg=require("./helpers"),X=bg.compact,_=bg.flatten,$=bg.extend,bb=bg.merge,Y=bg.del,bd=bg.starts,Z=bg.ends,ba=bg.last,a.extend=$,W=function(){return true},B=function(){return false},P=function(){return this},A=function(){this.negated=!this.negated;return this},a.Base=e=function(){function a(){}a.prototype.compile=function(a,b){var c;a=$({},a),b&&(a.level=b),c=this.unfoldSoak(a)||this,c.tab=a.indent;return a.level===y||!c.isStatement(a)?c.compileNode(a):c.compileClosure(a)},a.prototype.compileClosure=function(a){if(this.jumps())throw SyntaxError("cannot use a pure statement in an expression.");a.sharedScope=true;return h.wrap(this).compileNode(a)},a.prototype.cache=function(a,b,c){var e,f;if(this.isComplex()){e=new z(c||a.scope.freeVariable("ref")),f=new d(e,this);return b?[f.compile(a,b),e.value]:[f,e]}e=b?this.compile(a,b):this;return[e,e]},a.prototype.compileLoopReference=function(a,b){var c,d,e;c=d=this.compile(a,v),-Infinity<(e=+c)&&e<Infinity||o.test(c)&&a.scope.check(c,true)||(c=""+(d=a.scope.freeVariable(b))+" = "+c);return[c,d]},a.prototype.makeReturn=function(){return new I(this)},a.prototype.contains=function(a){var b;b=false,this.traverseChildren(false,function(c){if(a(c)){b=true;return false}});return b},a.prototype.containsType=function(a){return this instanceof a||this.contains(function(b){return b instanceof a})},a.prototype.lastNonComment=function(a){var b;b=a.length;while(b--)if(!(a[b]instanceof j))return a[b];return null},a.prototype.toString=function(a,b){var c;a==null&&(a=""),b==null&&(b=this.constructor.name),c="\n"+a+b,this.soak&&(c+="?"),this.eachChild(function(b){return c+=b.toString(a+O)});return c},a.prototype.eachChild=function(a){var b,c,d,e,f,g,h,i;if(!this.children)return this;h=this.children;for(d=0,f=h.length;d<f;d++){b=h[d];if(this[b]){i=_([this[b]]);for(e=0,g=i.length;e<g;e++){c=i[e];if(a(c)===false)return this}}}return this},a.prototype.traverseChildren=function(a,b){return this.eachChild(function(c){if(b(c)===false)return false;return c.traverseChildren(a,b)})},a.prototype.invert=function(){return new D("!",this)},a.prototype.unwrapAll=function(){var a;a=this;while(a!==(a=a.unwrap()))continue;return a},a.prototype.children=[],a.prototype.isStatement=B,a.prototype.jumps=B,a.prototype.isComplex=W,a.prototype.isChainable=B,a.prototype.isAssignable=B,a.prototype.unwrap=P,a.prototype.unfoldSoak=B,a.prototype.assigns=B;return a}(),a.Expressions=l=function(){bi(a,e);function a(a){this.expressions=X(_(a||[]))}a.prototype.children=["expressions"],a.prototype.push=function(a){this.expressions.push(a);return this},a.prototype.pop=function(){return this.expressions.pop()},a.prototype.unshift=function(a){this.expressions.unshift(a);return this},a.prototype.unwrap=function(){return this.expressions.length===1?this.expressions[0]:this},a.prototype.isEmpty=function(){return!this.expressions.length},a.prototype.isStatement=function(a){var b,c,d,e;e=this.expressions;for(c=0,d=e.length;c<d;c++){b=e[c];if(b.isStatement(a))return true}return false},a.prototype.jumps=function(a){var b,c,d,e;e=this.expressions;for(c=0,d=e.length;c<d;c++){b=e[c];if(b.jumps(a))return b}},a.prototype.makeReturn=function(){var a,b;b=this.expressions.length;while(b--){a=this.expressions[b];if(!(a instanceof j)){this.expressions[b]=a.makeReturn();break}}return this},a.prototype.compile=function(b,c){b==null&&(b={});return b.scope?a.__super__.compile.call(this,b,c):this.compileRoot(b)},a.prototype.compileNode=function(a){var b,c,d,e,f,g,h;this.tab=a.indent,e=a.level===y,c=[],h=this.expressions;for(f=0,g=h.length;f<g;f++)d=h[f],d=d.unwrapAll(),d=d.unfoldSoak(a)||d,e?(d.front=true,b=d.compile(a),c.push(d.isStatement(a)?b:this.tab+b+";")):c.push(d.compile(a,v));if(e)return c.join("\n");b=c.join(", ")||"void 0";return c.length>1&&a.level>=v?"("+b+")":b},a.prototype.compileRoot=function(a){var b;a.indent=this.tab=a.bare?"":O,a.scope=new K(null,this,null),a.level=y,b=this.compileWithDeclarations(a),b=b.replace(Q,"");return a.bare?b:"(function() {\n"+b+"\n}).call(this);\n"},a.prototype.compileWithDeclarations=function(a){var b,c,d,e,f,g,h,i;b=e="",i=this.expressions;for(d=0,h=i.length;d<h;d++){c=i[d],c=c.unwrap();if(!(c instanceof j||c instanceof z))break}a=bb(a,{level:y}),d&&(f=this.expressions.splice(d,this.expressions.length),b=this.compileNode(a),this.expressions=f),e=this.compileNode(a),g=a.scope,g.expressions===this&&(!a.globals&&a.scope.hasDeclarations()&&(b+=""+this.tab+"var "+g.declaredVariables().join(", ")+";\n"),g.hasAssignments&&(b+=""+this.tab+"var "+bc(g.assignedVariables().join(", "),this.tab)+";\n"));return b+e},a.wrap=function(b){if(b.length===1&&b[0]instanceof a)return b[0];return new a(b)};return a}(),a.Literal=z=function(){bi(a,e);function a(a){this.value=a}a.prototype.makeReturn=function(){return this.isStatement()?this:new I(this)},a.prototype.isAssignable=function(){return o.test(this.value)},a.prototype.isStatement=function(){var a;return(a=this.value)==="break"||a==="continue"||a==="debugger"},a.prototype.isComplex=B,a.prototype.assigns=function(a){return a===this.value},a.prototype.jumps=function(a){if(!this.isStatement())return false;return a&&(a.loop||a.block&&this.value!=="continue")?false:this},a.prototype.compileNode=function(a){var b;b=this.value.reserved?"\""+this.value+"\"":this.value;return this.isStatement()?""+this.tab+b+";":b},a.prototype.toString=function(){return" \""+this.value+"\""};return a}(),a.Return=I=function(){bi(a,e);function a(a){this.expression=a}a.prototype.children=["expression"],a.prototype.isStatement=W,a.prototype.makeReturn=P,a.prototype.jumps=P,a.prototype.compile=function(b,c){var d,e;d=(e=this.expression)!=null?e.makeReturn():void 0;return d&&!(d instanceof a)?d.compile(b,c):a.__super__.compile.call(this,b,c)},a.prototype.compileNode=function(a){return this.tab+("return"+(this.expression?" "+this.expression.compile(a,x):"")+";")};return a}(),a.Value=U=function(){bi(a,e);function a(b,c,d){if(!c&&b instanceof a)return b;this.base=b,this.properties=c||[],d&&(this[d]=true);return this}a.prototype.children=["base","properties"],a.prototype.push=function(a){this.properties.push(a);return this},a.prototype.hasProperties=function(){return!!this.properties.length},a.prototype.isArray=function(){return!this.properties.length&&this.base instanceof c},a.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},a.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},a.prototype.isSimpleNumber=function(){return this.base instanceof z&&J.test(this.base.value)},a.prototype.isAtomic=function(){var a,b,c,d;d=this.properties.concat(this.base);for(b=0,c=d.length;b<c;b++){a=d[b];if(a.soak||a instanceof f)return false}return true},a.prototype.isStatement=function(a){return!this.properties.length&&this.base.isStatement(a)},a.prototype.assigns=function(a){return!this.properties.length&&this.base.assigns(a)},a.prototype.jumps=function(a){return!this.properties.length&&this.base.jumps(a)},a.prototype.isObject=function(a){if(this.properties.length)return false;return this.base instanceof C&&(!a||this.base.generated)},a.prototype.isSplice=function(){return ba(this.properties)instanceof L},a.prototype.makeReturn=function(){return this.properties.length?a.__super__.makeReturn.call(this):this.base.makeReturn()},a.prototype.unwrap=function(){return this.properties.length?this:this.base},a.prototype.cacheReference=function(b){var c,e,f,g;f=ba(this.properties);if(this.properties.length<2&&!this.base.isComplex()&&!(f!=null?f.isComplex():void 0))return[this,this];c=new a(this.base,this.properties.slice(0,-1)),c.isComplex()&&(e=new z(b.scope.freeVariable("base")),c=new a(new F(new d(e,c))));if(!f)return[c,e];f.isComplex()&&(g=new z(b.scope.freeVariable("name")),f=new s(new d(g,f.index)),g=new s(g));return[c.push(f),new a(e||c.base,[g||f])]},a.prototype.compileNode=function(a){var c,d,e,f,g;this.base.front=this.front,e=this.properties,c=this.base.compile(a,e.length?t:null),e[0]instanceof b&&this.isSimpleNumber()&&(c="("+c+")");for(f=0,g=e.length;f<g;f++)d=e[f],c+=d.compile(a);return c},a.prototype.unfoldSoak=function(b){var c,e,f,g,h,i,j,l;if(f=this.base.unfoldSoak(b)){Array.prototype.push.apply(f.body.properties,this.properties);return f}l=this.properties;for(e=0,j=l.length;e<j;e++){g=l[e];if(g.soak){g.soak=false,c=new a(this.base,this.properties.slice(0,e)),i=new a(this.base,this.properties.slice(e)),c.isComplex()&&(h=new z(b.scope.freeVariable("ref")),c=new F(new d(h,c)),i.base=h);return new q(new k(c),i,{soak:true})}}return null};return a}(),a.Comment=j=function(){bi(a,e);function a(a){this.comment=a}a.prototype.isStatement=W,a.prototype.makeReturn=P,a.prototype.compileNode=function(a,b){var c;c="/*"+bc(this.comment,this.tab)+"*/",(b||a.level)===y&&(c=a.indent+c);return c};return a}(),a.Call=f=function(){bi(a,e);function a(a,b,c){this.args=b!=null?b:[],this.soak=c,this.isNew=false,this.isSuper=a==="super",this.variable=this.isSuper?null:a}a.prototype.children=["variable","args"],a.prototype.newInstance=function(){var b;b=this.variable.base||this.variable,b instanceof a?b.newInstance():this.isNew=true;return this},a.prototype.superReference=function(a){var b,c;b=a.scope.method;if(!b)throw SyntaxError("cannot call super outside of a function.");c=b.name;if(!c)throw SyntaxError("cannot call super on an anonymous function.");return b.klass?""+b.klass+".__super__."+c:""+c+".__super__.constructor"},a.prototype.unfoldSoak=function(b){var c,d,e,f,g,h,i,j,k;if(this.soak){if(this.variable){if(d=be(b,this,"variable"))return d;j=(new U(this.variable)).cacheReference(b),e=j[0],g=j[1]}else e=new z(this.superReference(b)),g=new U(e);g=new a(g,this.args),g.isNew=this.isNew,e=new z("typeof "+e.compile(b)+" === \"function\"");return new q(e,new U(g),{soak:true})}c=this,f=[];while(true){if(c.variable instanceof a){f.push(c),c=c.variable;continue}if(!(c.variable instanceof U))break;f.push(c);if(!((c=c.variable.base)instanceof a))break}k=f.reverse();for(h=0,i=k.length;h<i;h++)c=k[h],d&&(c.variable instanceof a?c.variable=d:c.variable.base=d),d=be(b,c,"variable");return d},a.prototype.compileNode=function(a){var b,c,d,e;(e=this.variable)!=null&&(e.front=this.front);if(d=M.compileSplattedArray(a,this.args,true))return this.compileSplat(a,d);c=function(){var c,d,e,f;e=this.args,f=[];for(c=0,d=e.length;c<d;c++)b=e[c],f.push(b.compile(a,v));return f}.call(this).join(", ");return this.isSuper?this.superReference(a)+(".call(this"+(c&&", "+c)+")"):(this.isNew?"new ":"")+this.variable.compile(a,t)+("("+c+")")},a.prototype.compileSuper=function(a,b){return""+this.superReference(b)+".call(this"+(a.length?", ":"")+a+")"},a.prototype.compileSplat=function(a,b){var c,d,e,f,g;if(this.isSuper)return""+this.superReference(a)+".apply(this, "+b+")";if(this.isNew){e=this.tab+O;return"(function(func, args, ctor) {\n"+e+"ctor.prototype = func.prototype;\n"+e+"var child = new ctor, result = func.apply(child, args);\n"+e+"return typeof result === \"object\" ? result : child;\n"+this.tab+"})("+this.variable.compile(a,v)+", "+b+", function() {})"}c=new U(this.variable),(f=c.properties.pop())&&c.isComplex()?(g=a.scope.freeVariable("ref"),d="("+g+" = "+c.compile(a,v)+")"+f.compile(a)):(d=c.compile(a,t),f?(g=d,d+=f.compile(a)):g="null");return""+d+".apply("+g+", "+b+")"};return a}(),a.Extends=m=function(){bi(a,e);function a(a,b){this.child=a,this.parent=b}a.prototype.children=["child","parent"],a.prototype.compile=function(a){bf("hasProp");return(new f(new U(new z(bf("extends"))),[this.child,this.parent])).compile(a)};return a}(),a.Access=b=function(){bi(a,e);function a(a,b){this.name=a,this.name.asKey=true,this.proto=b==="proto"?".prototype":"",this.soak=b==="soak"}a.prototype.children=["name"],a.prototype.compile=function(a){var b;b=this.name.compile(a);return this.proto+(p.test(b)?"["+b+"]":"."+b)},a.prototype.isComplex=B;return a}(),a.Index=s=function(){bi(a,e);function a(a){this.index=a}a.prototype.children=["index"],a.prototype.compile=function(a){return(this.proto?".prototype":"")+("["+this.index.compile(a,x)+"]")},a.prototype.isComplex=function(){return this.index.isComplex()};return a}(),a.Range=H=function(){bi(a,e),a.prototype.children=["from","to"];function a(a,b,c){this.from=a,this.to=b,this.exclusive=c==="exclusive",this.equals=this.exclusive?"":"="}a.prototype.compileVariables=function(a){var b,c,d,e;a=bb(a,{top:true}),c=this.from.cache(a,v),this.from=c[0],this.fromVar=c[1],d=this.to.cache(a,v),this.to=d[0],this.toVar=d[1],e=[this.fromVar.match(J),this.toVar.match(J)],this.fromNum=e[0],this.toNum=e[1],b=[],this.from!==this.fromVar&&b.push(this.from);if(this.to!==this.toVar)return b.push(this.to)},a.prototype.compileNode=function(a){var b,c,d,e,f,g,h;this.compileVariables(a);if(!a.index)return this.compileArray(a);if(this.fromNum&&this.toNum)return this.compileSimple(a);c=Y(a,"index"),f=Y(a,"step"),h=""+c+" = "+this.from+(this.to!==this.toVar?", "+this.to:""),e="("+this.fromVar+" <= "+this.toVar+" ? "+c,b=""+e+" <"+this.equals+" "+this.toVar+" : "+c+" >"+this.equals+" "+this.toVar+")",g=f?f.compile(a):"1",d=f?""+c+" += "+g:""+e+" += "+g+" : "+c+" -= "+g+")";return""+h+"; "+b+"; "+d},a.prototype.compileSimple=function(a){var b,c,d,e,f;f=[+this.fromNum,+this.toNum],b=f[0],e=f[1],c=Y(a,"index"),d=Y(a,"step"),d&&(d=""+c+" += "+d.compile(a));return b<=e?""+c+" = "+b+"; "+c+" <"+this.equals+" "+e+"; "+(d||""+c+"++"):""+c+" = "+b+"; "+c+" >"+this.equals+" "+e+"; "+(d||""+c+"--")},a.prototype.compileArray=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;if(this.fromNum&&this.toNum&&Math.abs(this.fromNum-this.toNum)<=20){h=function(){n=[];for(var a=l=+this.fromNum,b=+this.toNum;l<=b?a<=b:a>=b;l<=b?a+=1:a-=1)n.push(a);return n}.call(this),this.exclusive&&h.pop();return"["+h.join(", ")+"]"}e=this.tab+O,d=a.scope.freeVariable("i"),i=a.scope.freeVariable("results"),g="\n"+e+i+" = [];",this.fromNum&&this.toNum?(a.index=d,b=this.compileSimple(a)):(j=""+d+" = "+this.from+(this.to!==this.toVar?", "+this.to:""),c=""+this.fromVar+" <= "+this.toVar+" ?",b="var "+j+"; "+c+" "+d+" <"+this.equals+" "+this.toVar+" : "+d+" >"+this.equals+" "+this.toVar+"; "+c+" "+d+" += 1 : "+d+" -= 1"),f="{ "+i+".push("+d+"); }\n"+e+"return "+i+";\n"+a.indent;return"(function() {"+g+"\n"+e+"for ("+b+")"+f+"}).call(this)"};return a}(),a.Slice=L=function(){bi(a,e),a.prototype.children=["range"];function a(b){this.range=b,a.__super__.constructor.call(this)}a.prototype.compileNode=function(a){var b,c,d,e,f,g;g=this.range,e=g.to,c=g.from,d=c&&c.compile(a,x)||"0",b=e&&e.compile(a,x),e&&!(!this.range.exclusive&&+b===-1)&&(f=", "+(this.range.exclusive?b:J.test(b)?(+b+1).toString():"("+b+" + 1) || 9e9"));return".slice("+d+(f||"")+")"};return a}(),a.Obj=C=function(){bi(a,e);function a(a,b){this.generated=b!=null?b:false,this.objects=this.properties=a||[]}a.prototype.children=["properties"],a.prototype.compileNode=function(a){var b,c,e,f,g,h,i,k;k=this.properties;if(!k.length)return this.front?"({})":"{}";c=a.indent+=O,g=this.lastNonComment(this.properties),k=function(){var h,l;l=[];for(b=0,h=k.length;b<h;b++)i=k[b],f=b===k.length-1?"":i===g||i instanceof j?"\n":",\n",e=i instanceof j?"":c,i instanceof U&&i["this"]&&(i=new d(i.properties[0].name,i,"object")),i instanceof j||(i instanceof d||(i=new d(i,i,"object")),(i.variable.base||i.variable).asKey=true),l.push(e+i.compile(a,y)+f);return l}(),k=k.join(""),h="{"+(k&&"\n"+k+"\n"+this.tab)+"}";return this.front?"("+h+")":h},a.prototype.assigns=function(a){var b,c,d,e;e=this.properties;for(c=0,d=e.length;c<d;c++){b=e[c];if(b.assigns(a))return true}return false};return a}(),a.Arr=c=function(){bi(a,e);function a(a){this.objects=a||[]}a.prototype.children=["objects"],a.prototype.compileNode=function(a){var b,c;if(!this.objects.length)return"[]";a.indent+=O;if(b=M.compileSplattedArray(a,this.objects))return b;b=function(){var b,d,e,f;e=this.objects,f=[];for(b=0,d=e.length;b<d;b++)c=e[b],f.push(c.compile(a,v));return f}.call(this).join(", ");return b.indexOf("\n")>=0?"[\n"+a.indent+b+"\n"+this.tab+"]":"["+b+"]"},a.prototype.assigns=function(a){var b,c,d,e;e=this.objects;for(c=0,d=e.length;c<d;c++){b=e[c];if(b.assigns(a))return true}return false};return a}(),a.Class=g=function(){bi(a,e);function a(a,b,c){this.variable=a,this.parent=b,this.body=c!=null?c:new l,this.boundFuncs=[],this.body.classBody=true}a.prototype.children=["variable","parent","body"],a.prototype.determineName=function(){var a,c;if(!this.variable)return null;a=(c=ba(this.variable.properties))?c instanceof b&&c.name.value:this.variable.base.value;return a&&(a=o.test(a)&&a)},a.prototype.setContext=function(a){return this.body.traverseChildren(false,function(b){if(b.classBody)return false;if(b instanceof z&&b.value==="this")return b.value=a;if(b instanceof i){b.klass=a;if(b.bound)return b.context=a}})},a.prototype.addBoundFunctions=function(a){var b,c,d,e,f,g;if(this.boundFuncs.length){f=this.boundFuncs,g=[];for(d=0,e=f.length;d<e;d++)c=f[d],b=c.compile(a),g.push(this.ctor.body.unshift(new z("this."+b+" = "+bf("bind")+"(this."+b+", this);")));return g}},a.prototype.addProperties=function(a,c){var e,f,g,h,j;h=a.base.properties.slice(0),j=[];while(e=h.shift()){if(e instanceof d){f=e.variable.base,delete e.context,g=e.value;if(f.value==="constructor"){if(this.ctor)throw new Error("cannot define more than one constructor in a class");if(g.bound)throw new Error("cannot define a constructor as a bound function");g instanceof i?e=this.ctor=g:e=this.ctor=new d(new U(new z(c)),g)}else e.variable["this"]||(e.variable=new U(new z(c),[new b(f,"proto")])),g instanceof i&&g.bound&&(this.boundFuncs.push(f),g.bound=false)}j.push(e)}return j},a.prototype.walkBody=function(b){return this.traverseChildren(false,bj(function(c){var d,e,f,g,h;if(c instanceof a)return false;if(c instanceof l){h=d=c.expressions;for(e=0,g=h.length;e<g;e++)f=h[e],f instanceof U&&f.isObject(true)&&(d[e]=this.addProperties(f,b));return c.expressions=d=_(d)}},this))},a.prototype.ensureConstructor=function(a){this.ctor||(this.ctor=new i,this.parent&&this.ctor.body.push(new f("super",[new M(new z("arguments"))])),this.body.expressions.unshift(this.ctor)),this.ctor.ctor=this.ctor.name=a,this.ctor.klass=null;return this.ctor.noReturn=true},a.prototype.compileNode=function(a){var b,c,e,f;b=this.determineName(),f=b||this.name||"_Class",e=new z(f),this.setContext(f),this.walkBody(f),this.parent&&this.body.expressions.unshift(new m(e,this.parent)),this.ensureConstructor(f),this.body.expressions.push(e),this.addBoundFunctions(a),c=new F(h.wrap(this.body),true),this.variable&&(c=new d(this.variable,c));return c.compile(a)};return a}(),a.Assign=d=function(){bi(a,e);function a(a,b,c,d){this.variable=a,this.value=b,this.context=c,this.param=d&&d.param}a.prototype.METHOD_DEF=/^(?:(\S+)\.prototype\.|\S+?)?\b([$A-Za-z_][$\w]*)$/,a.prototype.children=["variable","value"],a.prototype.assigns=function(a){return this[this.context==="object"?"value":"variable"].assigns(a)},a.prototype.unfoldSoak=function(a){return be(a,this,"variable")},a.prototype.compileNode=function(a){var b,c,d,e,f;if(b=this.variable instanceof U){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(a);if(this.variable.isSplice())return this.compileSplice(a);if((f=this.context)==="||="||f==="&&="||f==="?=")return this.compileConditional(a)}d=this.variable.compile(a,v),this.value instanceof i&&(c=this.METHOD_DEF.exec(d))&&(this.value.name=c[2],c[1]&&(this.value.klass=c[1])),e=this.value.compile(a,v);if(this.context==="object")return""+d+": "+e;if(!this.variable.isAssignable())throw SyntaxError("\""+this.variable.compile(a)+"\" cannot be assigned.");this.context||b&&(this.variable.namespaced||this.variable.hasProperties())||(this.param?a.scope.add(d,"var"):a.scope.find(d)),e=d+(" "+(this.context||"=")+" ")+e;return a.level<=v?e:"("+e+")"},a.prototype.compilePatternMatch=function(c){var d,e,f,g,h,i,j,k,l,m,n,p,q,r,t,u,w,x,A,B,C,D;r=c.level===y,u=this.value,l=this.variable.base.objects;if(!(m=l.length))return u.compile(c);i=this.variable.isObject();if(r&&m===1&&!((k=l[0])instanceof M)){k instanceof a?(A=k,h=A.variable.base,k=A.value):k.base instanceof F?(B=(new U(k.unwrapAll())).cacheReference(c),k=B[0],h=B[1]):h=i?k["this"]?k.properties[0].name:k:new z(0),d=o.test(h.unwrap().value||0),u=new U(u),u.properties.push(new(d?b:s)(h));return(new a(k,u)).compile(c)}w=u.compile(c,v),e=[],q=false;if(!o.test(w)||this.variable.assigns(w))e.push(""+(n=c.scope.freeVariable("ref"))+" = "+w),w=n;for(g=0,x=l.length;g<x;g++){k=l[g],h=g,i&&(k instanceof a?(C=k,h=C.variable.base,k=C.value):k.base instanceof F?(D=(new U(k.unwrapAll())).cacheReference(c),k=D[0],h=D[1]):h=k["this"]?k.properties[0].name:k);if(!q&&k instanceof M)t=""+m+" <= "+w+".length ? "+bf("slice")+".call("+w+", "+g,(p=m-g-1)?(j=c.scope.freeVariable("i"),t+=", "+j+" = "+w+".length - "+p+") : ("+j+" = "+g+", [])"):t+=") : []",t=new z(t),q=""+j+"++";else{if(k instanceof M){k=k.name.compile(c);throw SyntaxError("multiple splats are disallowed in an assignment: "+k+" ...")}typeof h==="number"?(h=new z(q||h),d=false):d=i&&o.test(h.unwrap().value||0),t=new U(new z(w),[new(d?b:s)(h)])}e.push((new a(k,t,null,{param:this.param})).compile(c,y))}r||e.push(w),f=e.join(", ");return c.level<v?f:"("+f+")"},a.prototype.compileConditional=function(b){var c,d,e;e=this.variable.cacheReference(b),c=e[0],d=e[1];return(new D(this.context.slice(0,-1),c,new a(d,this.value,"="))).compile(b)},a.prototype.compileSplice=function(a){var b,c,d,e,f,g,h,i,j,k,l,m;k=this.variable.properties.pop().range,d=k.from,h=k.to,c=k.exclusive,g=this.variable.compile(a),l=(d!=null?d.cache(a,w):void 0)||["0","0"],e=l[0],f=l[1],h?(d!=null?d.isSimpleNumber():void 0)&&h.isSimpleNumber()?(h=+h.compile(a)- +f,c||(h+=1)):(h=h.compile(a)+" - "+f,c||(h+=" + 1")):h="9e9",m=this.value.cache(a,v),i=m[0],j=m[1],b="[].splice.apply("+g+", ["+e+", "+h+"].concat("+i+")), "+j;return a.level>y?"("+b+")":b};return a}(),a.Code=i=function(){bi(a,e);function a(a,b,c){this.params=a||[],this.body=b||new l,this.bound=c==="boundfunc",this.bound&&(this.context="this")}a.prototype.children=["params","body"],a.prototype.isStatement=function(){return!!this.ctor},a.prototype.jumps=B,a.prototype.compileNode=function(a){var b,e,f,g,h,i,j,k,l,m,n,o,p,r,s,u,v,w,x,y,A;a.scope=new K(a.scope,this.body,this),a.scope.shared=Y(a,"sharedScope"),a.indent+=O,delete a.bare,delete a.globals,o=[],e=[],x=this.params;for(r=0,u=x.length;r<u;r++){j=x[r];if(j.splat){l=new d(new U(new c(function(){var b,c,d,e;d=this.params,e=[];for(b=0,c=d.length;b<c;b++)i=d[b],e.push(i.asReference(a));return e}.call(this))),new U(new z("arguments")));break}}y=this.params;for(s=0,v=y.length;s<v;s++)j=y[s],j.isComplex()?(n=k=j.asReference(a),j.value&&(n=new D("?",k,j.value)),e.push(new d(new U(j.name),n,"=",{param:true}))):(k=j,j.value&&(h=new z(k.name.value+" == null"),n=new d(new U(j.name),j.value,"="),e.push(new q(h,n)))),l||o.push(k);p=this.body.isEmpty(),l&&e.unshift(l),e.length&&(A=this.body.expressions).unshift.apply(A,e);if(!l)for(f=0,w=o.length;f<w;f++)m=o[f],a.scope.parameter(o[f]=m.compile(a));p||this.noReturn||this.body.makeReturn(),g=a.indent,b="function",this.ctor&&(b+=" "+this.name),b+="("+o.join(", ")+") {",this.body.isEmpty()||(b+="\n"+this.body.compileWithDeclarations(a)+"\n"+this.tab),b+="}";if(this.ctor)return this.tab+b;if(this.bound)return bf("bind")+("("+b+", "+this.context+")");return this.front||a.level>=t?"("+b+")":b},a.prototype.traverseChildren=function(b,c){if(b)return a.__super__.traverseChildren.call(this,b,c)};return a}(),a.Param=E=function(){bi(a,e);function a(a,b,c){this.name=a,this.value=b,this.splat=c}a.prototype.children=["name","value"],a.prototype.compile=function(a){return this.name.compile(a,v)},a.prototype.asReference=function(a){var b;if(this.reference)return this.reference;b=this.name,b["this"]?(b=b.properties[0].name,b.value.reserved&&(b=new z("_"+b.value))):b.isComplex()&&(b=new z(a.scope.freeVariable("arg"))),b=new U(b),this.splat&&(b=new M(b));return this.reference=b},a.prototype.isComplex=function(){return this.name.isComplex()};return a}(),a.Splat=M=function(){bi(a,e),a.prototype.children=["name"],a.prototype.isAssignable=W;function a(a){this.name=a.compile?a:new z(a)}a.prototype.assigns=function(a){return this.name.assigns(a)},a.prototype.compile=function(a){return this.index!=null?this.compileParam(a):this.name.compile(a)},a.compileSplattedArray=function(b,c,d){var e,f,g,h,i,j,k;i=-1;while((j=c[++i])&&!(j instanceof a))continue;if(i>=c.length)return"";if(c.length===1){g=c[0].compile(b,v);if(d)return g;return""+bf("slice")+".call("+g+")"}e=c.slice(i);for(h=0,k=e.length;h<k;h++)j=e[h],g=j.compile(b,v),e[h]=j instanceof a?""+bf("slice")+".call("+g+")":"["+g+"]";if(i===0)return e[0]+(".concat("+e.slice(1).join(", ")+")");f=function(){var a,d,e,f;e=c.slice(0,i),f=[];for(a=0,d=e.length;a<d;a++)j=e[a],f.push(j.compile(b,v));return f}();return"["+f.join(", ")+"].concat("+e.join(", ")+")"};return a}(),a.While=V=function(){bi(a,e);function a(a,b){this.condition=(b!=null?b.invert:void 0)?a.invert():a,this.guard=b!=null?b.guard:void 0}a.prototype.children=["condition","guard","body"],a.prototype.isStatement=W,a.prototype.makeReturn=function(){this.returns=true;return this},a.prototype.addBody=function(a){this.body=a;return this},a.prototype.jumps=function(){var a,b,c,d;a=this.body.expressions;if(!a.length)return false;for(c=0,d=a.length;c<d;c++){b=a[c];if(b.jumps({loop:true}))return b}return false},a.prototype.compileNode=function(a){var b,c,d,e;a.indent+=O,e="",b=this.body;if(b.isEmpty())b="";else{if(a.level>y||this.returns)d=a.scope.freeVariable("results"),e=""+this.tab+d+" = [];\n",b&&(b=G.wrap(d,b));this.guard&&(b=l.wrap([new q(this.guard,b)])),b="\n"+b.compile(a,y)+"\n"+this.tab}c=e+this.tab+("while ("+this.condition.compile(a,x)+") {"+b+"}"),this.returns&&(c+="\n"+this.tab+"return "+d+";");return c};return a}(),a.Op=D=function(){var a,b;bi(c,e);function c(b,c,d,e){if(b==="in")return new r(c,d);if(b==="do")return new f(c,c.params||[]);if(b==="new"){if(c instanceof f)return c.newInstance();c instanceof i&&c.bound&&(c=new F(c))}this.operator=a[b]||b,this.first=c,this.second=d,this.flip=!!e;return this}a={"==":"===","!=":"!==",of:"in"},b={"!==":"===","===":"!=="},c.prototype.children=["first","second"],c.prototype.isSimpleNumber=B,c.prototype.isUnary=function(){return!this.second},c.prototype.isChainable=function(){var a;return(a=this.operator)==="<"||a===">"||a===">="||a==="<="||a==="==="||a==="!=="},c.prototype.invert=function(){var a,d,e,f,g;if(this.isChainable()&&this.first.isChainable()){a=true,d=this;while(d&&d.operator)a&&(a=d.operator in b),d=d.first;if(!a)return(new F(this)).invert();d=this;while(d&&d.operator)d.invert=!d.invert,d.operator=b[d.operator],d=d.first;return this}if(f=b[this.operator]){this.operator=f,this.first.unwrap()instanceof c&&this.first.invert();return this}return this.second?(new F(this)).invert():this.operator==="!"&&(e=this.first.unwrap())instanceof c&&((g=e.operator)==="!"||g==="in"||g==="instanceof")?e:new c("!",this)},c.prototype.unfoldSoak=function(a){var b;return((b=this.operator)==="++"||b==="--"||b==="delete")&&be(a,this,"first")},c.prototype.compileNode=function(a){var b;if(this.isUnary())return this.compileUnary(a);if(this.isChainable()&&this.first.isChainable())return this.compileChain(a);if(this.operator==="?")return this.compileExistence(a);this.first.front=this.front,b=this.first.compile(a,w)+" "+this.operator+" "+this.second.compile(a,w);return a.level<=w?b:"("+b+")"},c.prototype.compileChain=function(a){var b,c,d,e;e=this.first.second.cache(a),this.first.second=e[0],d=e[1],c=this.first.compile(a,w),b=""+c+" "+(this.invert?"&&":"||")+" "+d.compile(a)+" "+this.operator+" "+this.second.compile(a,w);return"("+b+")"},c.prototype.compileExistence=function(a){var b,c;this.first.isComplex()?(c=a.scope.freeVariable("ref"),b=new F(new d(new z(c),this.first))):(b=this.first,c=b.compile(a));return(new k(b)).compile(a)+(" ? "+c+" : "+this.second.compile(a,v))},c.prototype.compileUnary=function(a){var b,d;d=[b=this.operator],(b==="new"||b==="typeof"||b==="delete"||(b==="+"||b==="-")&&this.first instanceof c&&this.first.operator===b)&&d.push(" "),d.push(this.first.compile(a,w)),this.flip&&d.reverse();return d.join("")},c.prototype.toString=function(a){return c.__super__.toString.call(this,a,this.constructor.name+" "+this.operator)};return c}(),a.In=r=function(){bi(a,e);function a(a,b){this.object=a,this.array=b}a.prototype.children=["object","array"],a.prototype.invert=A,a.prototype.compileNode=function(a){return this.array instanceof U&&this.array.isArray()?this.compileOrTest(a):this.compileLoopTest(a)},a.prototype.compileOrTest=function(a){var b,c,d,e,f,g,h,i,j;i=this.object.cache(a,w),g=i[0],f=i[1],j=this.negated?[" !== "," && "]:[" === "," || "],b=j[0],c=j[1],h=function(){var c,h,i;h=this.array.base.objects,i=[];for(d=0,c=h.length;d<c;d++)e=h[d],i.push((d?f:g)+b+e.compile(a,w));return i}.call(this),h=h.join(c);return a.level<w?h:"("+h+")"},a.prototype.compileLoopTest=function(a){var b,c,d,e;e=this.object.cache(a,v),d=e[0],c=e[1],b=bf("indexOf")+(".call("+this.array.compile(a,v)+", "+c+") ")+(this.negated?"< 0":">= 0");if(d===c)return b;b=d+", "+b;return a.level<v?b:"("+b+")"},a.prototype.toString=function(b){return a.__super__.toString.call(this,b,this.constructor.name+(this.negated?"!":""))};return a}(),a.Try=S=function(){bi(a,e);function a(a,b,c,d){this.attempt=a,this.error=b,this.recovery=c,this.ensure=d}a.prototype.children=["attempt","recovery","ensure"],a.prototype.isStatement=W,a.prototype.jumps=function(a){var b;return this.attempt.jumps(a)||((b=this.recovery)!=null?b.jumps(a):void 0)},a.prototype.makeReturn=function(){this.attempt&&(this.attempt=this.attempt.makeReturn()),this.recovery&&(this.recovery=this.recovery.makeReturn());return this},a.prototype.compileNode=function(a){var b,c;a.indent+=O,c=this.error?" ("+this.error.compile(a)+") ":" ",b=this.recovery?" catch"+c+"{\n"+this.recovery.compile(a,y)+"\n"+this.tab+"}":this.ensure||this.recovery?void 0:" catch (_e) {}";return""+this.tab+"try {\n"+this.attempt.compile(a,y)+"\n"+this.tab+"}"+(b||"")+(this.ensure?" finally {\n"+this.ensure.compile(a,y)+"\n"+this.tab+"}":"")};return a}(),a.Throw=R=function(){bi(a,e);function a(a){this.expression=a}a.prototype.children=["expression"],a.prototype.isStatement=W,a.prototype.jumps=B,a.prototype.makeReturn=P,a.prototype.compileNode=function(a){return this.tab+("throw "+this.expression.compile(a)+";")};return a}(),a.Existence=k=function(){bi(a,e);function a(a){this.expression=a}a.prototype.children=["expression"],a.prototype.invert=A,a.prototype.compileNode=function(a){var b,c;b=this.expression.compile(a,w),b=o.test(b)&&!a.scope.check(b)?this.negated?"typeof "+b+" == \"undefined\" || "+b+" === null":"typeof "+b+" != \"undefined\" && "+b+" !== null":(c=this.negated?"==":"!=",""+b+" "+c+" null");return a.level<=u?b:"("+b+")"};return a}(),a.Parens=F=function(){bi(a,e);function a(a){this.body=a}a.prototype.children=["body"],a.prototype.unwrap=function(){return this.body},a.prototype.isComplex=function(){return this.body.isComplex()},a.prototype.makeReturn=function(){return this.body.makeReturn()},a.prototype.compileNode=function(a){var b,c,d;d=this.body.unwrap();if(d instanceof U&&d.isAtomic()){d.front=this.front;return d.compile(a)}c=d.compile(a,x),b=a.level<w&&(d instanceof D||d instanceof f||d instanceof n&&d.returns);return b?c:"("+c+")"};return a}(),a.For=n=function(){bi(a,e);function a(a,b){var c;this.source=b.source,this.guard=b.guard,this.step=b.step,this.name=b.name,this.index=b.index,this.body=l.wrap([a]),this.own=!!b.own,this.object=!!b.object,this.object&&(c=[this.index,this.name],this.name=c[0],this.index=c[1]);if(this.index instanceof U)throw SyntaxError("index cannot be a pattern matching expression");this.range=this.source instanceof U&&this.source.base instanceof H&&!this.source.properties.length,this.pattern=this.name instanceof U;if(this.range&&this.index)throw SyntaxError("indexes do not apply to range loops");if(this.range&&this.pattern)throw SyntaxError("cannot pattern match over range loops");this.returns=false}a.prototype.children=["body","source","guard","step"],a.prototype.isStatement=W,a.prototype.jumps=V.prototype.jumps,a.prototype.makeReturn=function(){this.returns=true;return this},a.prototype.compileNode=function(a){var b,c,e,f,g,h,i,j,k,m,n,p,r,s,t,u,x,A,B,C,D;b=l.wrap([this.body]),j=(D=ba(b.expressions))!=null?D.jumps():void 0,j&&j instanceof I&&(this.returns=false),x=this.range?this.source.base:this.source,u=a.scope,m=this.name&&this.name.compile(a,v),h=this.index&&this.index.compile(a,v),m&&!this.pattern&&u.find(m,{immediate:true}),h&&u.find(h,{immediate:true}),this.returns&&(t=u.freeVariable("results")),i=(this.range?m:h)||u.freeVariable("i"),this.pattern&&(m=i),C="",f="",c="",g=this.tab+O,this.range?e=x.compile(bb(a,{index:i,step:this.step})):(B=this.source.compile(a,v),(m||this.own)&&!o.test(B)&&(c=""+this.tab+(p=u.freeVariable("ref"))+" = "+B+";\n",B=p),m&&!this.pattern&&(n=""+m+" = "+B+"["+i+"]"),this.object||(k=u.freeVariable("len"),A=this.step?""+i+" += "+this.step.compile(a,w):""+i+"++",e=""+i+" = 0, "+k+" = "+B+".length; "+i+" < "+k+"; "+A)),this.returns&&(r=""+this.tab+t+" = [];\n",s="\n"+this.tab+"return "+t+";",b=G.wrap(t,b)),this.guard&&(b=l.wrap([new q(this.guard,b)])),this.pattern&&b.expressions.unshift(new d(this.name,new z(""+B+"["+i+"]"))),c+=this.pluckDirectCall(a,b),n&&(C="\n"+g+n+";"),this.object&&(e=""+i+" in "+B,this.own&&(f="\n"+g+"if (!"+bf("hasProp")+".call("+B+", "+i+")) continue;")),b=b.compile(bb(a,{indent:g}),y),b&&(b="\n"+b+"\n");return""+c+(r||"")+this.tab+"for ("+e+") {"+f+C+b+this.tab+"}"+(s||"")},a.prototype.pluckDirectCall=function(a,b){var c,e,g,h,j,k,l,m,n,o,p,q,r,s;e="",n=b.expressions;for(j=0,m=n.length;j<m;j++){g=n[j],g=g.unwrapAll();if(!(g instanceof f))continue;l=g.variable.unwrapAll();if(!(l instanceof i||l instanceof U&&((o=l.base)!=null?o.unwrapAll():void 0)instanceof i&&l.properties.length===1&&((p=(q=l.properties[0].name)!=null?q.value:void 0)==="call"||p==="apply")))continue;h=((r=l.base)!=null?r.unwrapAll():void 0)||l,k=new z(a.scope.freeVariable("fn")),c=new U(k),l.base&&(s=[c,l],l.base=s[0],c=s[1],args.unshift(new z("this"))),b.expressions[j]=new f(c,g.args),e+=this.tab+(new d(k,h)).compile(a,y)+";\n"}return e};return a}(),a.Switch=N=function(){bi(a,e);function a(a,b,c){this.subject=a,this.cases=b,this.otherwise=c}a.prototype.children=["subject","cases","otherwise"],a.prototype.isStatement=W,a.prototype.jumps=function(a){var b,c,d,e,f,g,h;a==null&&(a={block:true}),f=this.cases;for(d=0,e=f.length;d<e;d++){g=f[d],c=g[0],b=g[1];if(b.jumps(a))return b}return(h=this.otherwise)!=null?h.jumps(a):void 0},a.prototype.makeReturn=function(){var a,b,c,d,e;d=this.cases;for(b=0,c=d.length;b<c;b++)a=d[b],a[1].makeReturn();(e=this.otherwise)!=null&&e.makeReturn();return this},a.prototype.compileNode=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;i=a.indent+O,j=a.indent=i+O,d=this.tab+("switch ("+(((o=this.subject)!=null?o.compile(a,x):void 0)||false)+") {\n"),p=this.cases;for(h=0,m=p.length;h<m;h++){q=p[h],f=q[0],b=q[1],r=_([f]);for(l=0,n=r.length;l<n;l++)e=r[l],this.subject||(e=e.invert()),d+=i+("case "+e.compile(a,x)+":\n");if(c=b.compile(a,y))d+=c+"\n";if(h===this.cases.length-1&&!this.otherwise)break;g=this.lastNonComment(b.expressions),k=g.jumps();if(!g||!k||k instanceof z&&k.value==="debugger")d+=j+"break;\n"}this.otherwise&&this.otherwise.expressions.length&&(d+=i+("default:\n"+this.otherwise.compile(a,y)+"\n"));return d+this.tab+"}"};return a}(),a.If=q=function(){bi(a,e);function a(a,b,c){this.body=b,c==null&&(c={}),this.condition=c.type==="unless"?a.invert():a,this.elseBody=null,this.isChain=false,this.soak=c.soak}a.prototype.children=["condition","body","elseBody"],a.prototype.bodyNode=function(){var a;return(a=this.body)!=null?a.unwrap():void 0},a.prototype.elseBodyNode=function(){var a;return(a=this.elseBody)!=null?a.unwrap():void 0},a.prototype.addElse=function(b){this.isChain?this.elseBodyNode().addElse(b):(this.isChain=b instanceof a,this.elseBody=this.ensureExpressions(b));return this},a.prototype.isStatement=function(a){var b;return(a!=null?a.level:void 0)===y||this.bodyNode().isStatement(a)||((b=this.elseBodyNode())!=null?b.isStatement(a):void 0)},a.prototype.jumps=function(a){var b;return this.body.jumps(a)||((b=this.elseBody)!=null?b.jumps(a):void 0)},a.prototype.compileNode=function(a){return this.isStatement(a)?this.compileStatement(a):this.compileExpression(a)},a.prototype.makeReturn=function(){this.body&&(this.body=new l([this.body.makeReturn()])),this.elseBody&&(this.elseBody=new l([this.elseBody.makeReturn()]));return this},a.prototype.ensureExpressions=function(a){return a instanceof l?a:new l([a])},a.prototype.compileStatement=function(a){var b,c,d,e;c=Y(a,"chainChild"),d=this.condition.compile(a,x),a.indent+=O,b=this.ensureExpressions(this.body).compile(a),b&&(b="\n"+b+"\n"+this.tab),e="if ("+d+") {"+b+"}",c||(e=this.tab+e);if(!this.elseBody)return e;return e+" else "+(this.isChain?(a.indent=this.tab,a.chainChild=true,this.elseBody.unwrap().compile(a,y)):"{\n"+this.elseBody.compile(a,y)+"\n"+this.tab+"}")},a.prototype.compileExpression=function(a){var b,c,d,e;e=this.condition.compile(a,u),c=this.bodyNode().compile(a,v),b=this.elseBodyNode()?this.elseBodyNode().compile(a,v):"void 0",d=""+e+" ? "+c+" : "+b;return a.level>=u?"("+d+")":d},a.prototype.unfoldSoak=function(){return this.soak&&this};return a}(),G={wrap:function(a,c){if(c.isEmpty()||ba(c.expressions).jumps())return c;return c.push(new f(new U(new z(a),[new b(new z("push"))]),[c.pop()]))}},h={wrap:function(a,c,d){var e,g,h,j,k;if(a.jumps())return a;h=new i([],l.wrap([a])),e=[];if((j=a.contains(this.literalArgs))||a.contains(this.literalThis))k=new z(j?"apply":"call"),e=[new z("this")],j&&e.push(new z("arguments")),h=new U(h,[new b(k)]);h.noReturn=d,g=new f(h,e);return c?l.wrap([g]):g},literalArgs:function(a){return a instanceof z&&a.value==="arguments"&&!a.asKey},literalThis:function(a){return a instanceof z&&a.value==="this"&&!a.asKey||a instanceof i&&a.bound}},be=function(a,b,c){var d;if(d=b[c].unfoldSoak(a)){b[c]=d.body,d.body=new U(b);return d}},T={"extends":"function(child, parent) {\n for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor;\n child.__super__ = parent.prototype;\n return child;\n}",bind:"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }",indexOf:"Array.prototype.indexOf || function(item) {\n for (var i = 0, l = this.length; i < l; i++) {\n if (this[i] === item) return i;\n }\n return -1;\n}",hasProp:"Object.prototype.hasOwnProperty",slice:"Array.prototype.slice"},y=1,x=2,v=3,u=4,w=5,t=6,O=" ",Q=/[ \t]+$/gm,o=/^[$A-Za-z_][$\w]*$/,J=/^[+-]?\d+$/,p=/^['"]/,bf=function(a){var b;b="__"+a,K.root.assign(b,T[a]);return b},bc=function(a,b){return a.replace(/\n/g,"$&"+b)}}).call(this)},require["./coffee-script"]=new function(){var exports=this;(function(){var Lexer,RESERVED,compile,fs,lexer,parser,path,_ref;fs=require("fs"),path=require("path"),_ref=require("./lexer"),Lexer=_ref.Lexer,RESERVED=_ref.RESERVED,parser=require("./parser").parser,require.extensions?require.extensions[".coffee"]=function(a,b){var c;c=compile(fs.readFileSync(b,"utf8"));return a._compile(c,b)}:require.registerExtension&&require.registerExtension(".coffee",function(a){return compile(a)}),exports.VERSION="1.0.0",exports.RESERVED=RESERVED,exports.helpers=require("./helpers"),exports.compile=compile=function(a,b){b==null&&(b={});try{return parser.parse(lexer.tokenize(a)).compile(b)}catch(c){b.fileName&&(c.message="In "+b.fileName+", "+c.message);throw c}},exports.tokens=function(a,b){return lexer.tokenize(a,b)},exports.nodes=function(a,b){return typeof a==="string"?parser.parse(lexer.tokenize(a,b)):parser.parse(a)},exports.run=function(a,b){var c;c=module;while(c.parent)c=c.parent;c.filename=fs.realpathSync(b.fileName||"."),c.moduleCache&&(c.moduleCache={});return path.extname(c.filename)!==".coffee"||require.extensions?c._compile(compile(a,b),c.filename):c._compile(a,c.filename)},exports.eval=function(code,options){var __dirname,__filename;__filename=options.fileName,__dirname=path.dirname(__filename);return eval(compile(code,options))},lexer=new Lexer,parser.lexer={lex:function(){var a,b;b=this.tokens[this.pos++]||[""],a=b[0],this.yytext=b[1],this.yylineno=b[2];return a},setInput:function(a){this.tokens=a;return this.pos=0},upcomingInput:function(){return""}},parser.yy=require("./nodes")}).call(this)},require["./browser"]=new function(){var exports=this;(function(){var CoffeeScript,runScripts;CoffeeScript=require("./coffee-script"),CoffeeScript.require=require,CoffeeScript.eval=function(code,options){return eval(CoffeeScript.compile(code,options))},CoffeeScript.run=function(a,b){b==null&&(b={}),b.bare=true;return Function(CoffeeScript.compile(a,b))()};typeof window=="undefined"||window===null||(CoffeeScript.load=function(a,b){var c;c=new(window.ActiveXObject||XMLHttpRequest)("Microsoft.XMLHTTP"),c.open("GET",a,true),"overrideMimeType"in c&&c.overrideMimeType("text/plain"),c.onreadystatechange=function(){if(c.readyState===4)return CoffeeScript.run(c.responseText,b)};return c.send(null)},runScripts=function(){var a,b,c,d;d=document.getElementsByTagName("script");for(b=0,c=d.length;b<c;b++)a=d[b],a.type==="text/coffeescript"&&(a.src?CoffeeScript.load(a.src):CoffeeScript.run(a.innerHTML));return null},window.addEventListener?addEventListener("DOMContentLoaded",runScripts,false):attachEvent("onload",runScripts))}).call(this)};return require["./coffee-script"]}()
@@ -1,44 +0,0 @@
1
- # JavaScriptLint configuration file for CoffeeScript.
2
-
3
- +no_return_value # function {0} does not always return a value
4
- +duplicate_formal # duplicate formal argument {0}
5
- -equal_as_assign # test for equality (==) mistyped as assignment (=)?{0}
6
- +var_hides_arg # variable {0} hides argument
7
- +redeclared_var # redeclaration of {0} {1}
8
- -anon_no_return_value # anonymous function does not always return a value
9
- +missing_semicolon # missing semicolon
10
- +meaningless_block # meaningless block; curly braces have no impact
11
- -comma_separated_stmts # multiple statements separated by commas (use semicolons?)
12
- +unreachable_code # unreachable code
13
- +missing_break # missing break statement
14
- -missing_break_for_last_case # missing break statement for last case in switch
15
- -comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
16
- -inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
17
- -useless_void # use of the void type may be unnecessary (void is always undefined)
18
- +multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
19
- +use_of_label # use of label
20
- -block_without_braces # block statement without curly braces
21
- +leading_decimal_point # leading decimal point may indicate a number or an object member
22
- +trailing_decimal_point # trailing decimal point may indicate a number or an object member
23
- +octal_number # leading zeros make an octal number
24
- +nested_comment # nested comment
25
- +misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
26
- +ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
27
- +empty_statement # empty statement or extra semicolon
28
- -missing_option_explicit # the "option explicit" control comment is missing
29
- +partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
30
- +dup_option_explicit # duplicate "option explicit" control comment
31
- +useless_assign # useless assignment
32
- +ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
33
- +ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent)
34
- -missing_default_case # missing default case in switch statement
35
- +duplicate_case_in_switch # duplicate case in switch statements
36
- +default_not_at_end # the default case is not at the end of the switch statement
37
- +legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
38
- +jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
39
- +useless_comparison # useless comparison; comparing identical expressions
40
- +with_statement # with statement hides undeclared variables; use temporary variable instead
41
- +trailing_comma_in_array # extra comma is not recommended in array initializers
42
- +assign_to_function_call # assignment to a function call
43
- +parseint_missing_radix # parseInt missing radix parameter
44
- +lambda_assign_requires_semicolon
@@ -1,2515 +0,0 @@
1
-
2
-
3
-
4
- <!DOCTYPE html>
5
- <html>
6
- <head>
7
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
8
- <title>CoffeeScript</title>
9
- <link rel="stylesheet" type="text/css" href="documentation/css/docs.css" />
10
- <link rel="stylesheet" type="text/css" href="documentation/css/idle.css" />
11
- <link rel="shortcut icon" href="documentation/images/favicon.ico" />
12
- </head>
13
- <body>
14
-
15
- <div id="fadeout"></div>
16
-
17
- <div id="flybar">
18
- <a id="logo" href="#top"> </a>
19
- <div class="navigation toc">
20
- <div class="button">
21
- Table of Contents
22
- </div>
23
- <div class="contents menu">
24
- <a href="#overview">Overview</a>
25
- <a href="#installation">Installation and Usage</a>
26
- <a href="#language">Language Reference</a>
27
- <a href="#literals">Literals: Functions, Objects and Arrays</a>
28
- <a href="#lexical_scope">Lexical Scoping and Variable Safety</a>
29
- <a href="#conditionals">If, Else, Unless, and Conditional Assignment</a>
30
- <a href="#splats">Splats...</a>
31
- <a href="#loops">Loops and Comprehensions</a>
32
- <a href="#slices">Array Slicing and Splicing</a>
33
- <a href="#expressions">Everything is an Expression</a>
34
- <a href="#operators">Operators and Aliases</a>
35
- <a href="#classes">Classes, Inheritance, and Super</a>
36
- <a href="#destructuring">Destructuring Assignment</a>
37
- <a href="#fat_arrow">Function Binding</a>
38
- <a href="#embedded">Embedded JavaScript</a>
39
- <a href="#switch">Switch and Try/Catch</a>
40
- <a href="#comparisons">Chained Comparisons</a>
41
- <a href="#strings">String Interpolation, Heredocs, and Block Comments</a>
42
- <a href="#regexes">Extended Regular Expressions</a>
43
- <a href="#cake">Cake, and Cakefiles</a>
44
- <a href="#scripts">"text/coffeescript" Script Tags</a>
45
- <a href="#resources">Examples and Resources</a>
46
- <a href="#change_log">Change Log</a>
47
- </div>
48
- </div>
49
- <div class="navigation try">
50
- <div class="button">
51
- Try CoffeeScript
52
- <div class="repl_bridge"></div>
53
- </div>
54
- <div class="contents repl_wrapper">
55
- <div class="code">
56
- <div class="screenshadow tl"></div>
57
- <div class="screenshadow tr"></div>
58
- <div class="screenshadow bl"></div>
59
- <div class="screenshadow br"></div>
60
- <div id="repl_source_wrap">
61
- <textarea id="repl_source" rows="100">alert "Hello CoffeeScript!"</textarea>
62
- </div>
63
- <div id="repl_results_wrap"><pre id="repl_results"></pre></div>
64
- <div class="minibutton dark run">Run</div>
65
- <br class="clear" />
66
- </div>
67
- </div>
68
- </div>
69
- <div class="navigation annotated">
70
- <div class="button">
71
- Annotated Source
72
- </div>
73
- <div class="contents menu">
74
- <a href="documentation/docs/grammar.html">Grammar Rules &mdash; src/grammar</a>
75
- <a href="documentation/docs/lexer.html">Lexing Tokens &mdash; src/lexer</a>
76
- <a href="documentation/docs/rewriter.html">The Rewriter &mdash; src/rewriter</a>
77
- <a href="documentation/docs/nodes.html">The Syntax Tree &mdash; src/nodes</a>
78
- <a href="documentation/docs/scope.html">Lexical Scope &mdash; src/scope</a>
79
- <a href="documentation/docs/helpers.html">Helpers &amp; Utility Functions &mdash; src/helpers</a>
80
- <a href="documentation/docs/coffee-script.html">The CoffeeScript Module &mdash; src/coffee-script</a>
81
- <a href="documentation/docs/cake.html">Cake &amp; Cakefiles &mdash; src/cake</a>
82
- <a href="documentation/docs/command.html">"coffee" Command-Line Utility &mdash; src/command</a>
83
- <a href="documentation/docs/optparse.html">Option Parsing &mdash; src/optparse</a>
84
- <a href="documentation/docs/repl.html">Interactive REPL &mdash; src/repl</a>
85
- </div>
86
- </div>
87
- <div id="error" style="display:none;"></div>
88
- </div>
89
-
90
- <div class="container">
91
- <span class="bookmark" id="top"></span>
92
-
93
- <p>
94
- <b>CoffeeScript is a little language that compiles into JavaScript.</b> Underneath
95
- all of those embarrassing braces and semicolons, JavaScript has always had
96
- a gorgeous object model at its heart. CoffeeScript is an attempt to expose
97
- the good parts of JavaScript in a simple way.
98
- </p>
99
-
100
- <p>
101
- The golden rule of CoffeeScript is: <i>"It's just JavaScript"</i>. The code
102
- compiles one-to-one into the equivalent JS, and there is
103
- no interpretation at runtime. You can use any existing JavaScript library
104
- seamlessly (and vice-versa). The compiled output is readable and pretty-printed,
105
- passes through <a href="http://www.javascriptlint.com/">JavaScript Lint</a>
106
- without warnings, will work in every JavaScript implementation, and tends
107
- to run as fast or faster than the equivalent handwritten JavaScript.
108
- </p>
109
-
110
- <p>
111
- <b>Latest Version:</b>
112
- <a href="http://github.com/jashkenas/coffee-script/tarball/1.0.0">1.0.0</a>
113
- </p>
114
-
115
- <h2>
116
- <span id="overview" class="bookmark"></span>
117
- Overview
118
- </h2>
119
-
120
- <p><i>CoffeeScript on the left, compiled JavaScript output on the right.</i></p>
121
-
122
- <div class='code'><pre class="idle"><span class="Comment"><span class="Comment">#</span> Assignment:</span>
123
- number <span class="Keyword">=</span> <span class="Number">42</span>
124
- opposite <span class="Keyword">=</span> <span class="BuiltInConstant">true</span>
125
-
126
- <span class="Comment"><span class="Comment">#</span> Conditions:</span>
127
- number <span class="Keyword">=</span> <span class="Keyword">-</span><span class="Number">42</span> <span class="Keyword">if</span> opposite
128
-
129
- <span class="Comment"><span class="Comment">#</span> Functions:</span>
130
- <span class="FunctionName">square </span><span class="Keyword">=</span> <span class="FunctionArgument">(x)</span> <span class="Storage">-&gt;</span> x <span class="Keyword">*</span> x
131
-
132
- <span class="Comment"><span class="Comment">#</span> Arrays:</span>
133
- list <span class="Keyword">=</span> [<span class="Number">1</span>, <span class="Number">2</span>, <span class="Number">3</span>, <span class="Number">4</span>, <span class="Number">5</span>]
134
-
135
- <span class="Comment"><span class="Comment">#</span> Objects:</span>
136
- math <span class="Keyword">=</span>
137
- root: Math.sqrt
138
- square: square
139
- <span class="FunctionName">cube</span><span class="Keyword">:</span> <span class="FunctionArgument">(x)</span> <span class="Storage">-&gt;</span> x <span class="Keyword">*</span> square x
140
-
141
- <span class="Comment"><span class="Comment">#</span> Splats:</span>
142
- <span class="FunctionName">race </span><span class="Keyword">=</span> <span class="FunctionArgument">(winner, runners...)</span> <span class="Storage">-&gt;</span>
143
- print winner, runners
144
-
145
- <span class="Comment"><span class="Comment">#</span> Existence:</span>
146
- alert <span class="String"><span class="String">&quot;</span>I knew it!<span class="String">&quot;</span></span> <span class="Keyword">if</span> elvis<span class="Keyword">?</span>
147
-
148
- <span class="Comment"><span class="Comment">#</span> Array comprehensions:</span>
149
- cubes <span class="Keyword">=</span> (math.cube num <span class="Keyword">for</span> num <span class="Keyword">in</span> list)
150
- </pre><pre class="idle"><span class="Storage">var</span> cubes, list, math, num, number, opposite, race, square;
151
- <span class="Storage">var</span> __slice <span class="Keyword">=</span> <span class="LibraryClassType">Array</span>.<span class="LibraryConstant">prototype</span>.slice;
152
- number <span class="Keyword">=</span> <span class="Number">42</span>;
153
- opposite <span class="Keyword">=</span> <span class="BuiltInConstant">true</span>;
154
- <span class="Keyword">if</span> (opposite) {
155
- number <span class="Keyword">=</span> <span class="Keyword">-</span><span class="Number">42</span>;
156
- }
157
- <span class="FunctionName">square</span> = <span class="Storage">function</span>(<span class="FunctionArgument">x</span>) {
158
- <span class="Keyword">return</span> x <span class="Keyword">*</span> x;
159
- };
160
- list <span class="Keyword">=</span> [<span class="Number">1</span>, <span class="Number">2</span>, <span class="Number">3</span>, <span class="Number">4</span>, <span class="Number">5</span>];
161
- math <span class="Keyword">=</span> {
162
- root: <span class="LibraryClassType">Math</span>.sqrt,
163
- square: square,
164
- <span class="FunctionName">cube</span>: <span class="Storage">function</span>(<span class="FunctionArgument">x</span>) {
165
- <span class="Keyword">return</span> x <span class="Keyword">*</span> square(x);
166
- }
167
- };
168
- <span class="FunctionName">race</span> = <span class="Storage">function</span>() {
169
- <span class="Storage">var</span> runners, winner;
170
- winner <span class="Keyword">=</span> arguments[<span class="Number">0</span>], runners <span class="Keyword">=</span> <span class="Number">2</span> <span class="Keyword">&lt;=</span> arguments.<span class="LibraryConstant">length</span> ? __slice.<span class="LibraryFunction">call</span>(arguments, <span class="Number">1</span>) : [];
171
- <span class="Keyword">return</span> <span class="LibraryFunction">print</span>(winner, runners);
172
- };
173
- <span class="Keyword">if</span> (<span class="Keyword">typeof</span> elvis <span class="Keyword">!</span><span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> elvis <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span>) {
174
- <span class="LibraryFunction">alert</span>(<span class="String"><span class="String">&quot;</span>I knew it!<span class="String">&quot;</span></span>);
175
- }
176
- cubes <span class="Keyword">=</span> (<span class="Storage">function</span>() {
177
- <span class="Storage">var</span> _i, _len, _results;
178
- _results <span class="Keyword">=</span> [];
179
- <span class="Keyword">for</span> (_i <span class="Keyword">=</span> <span class="Number">0</span>, _len <span class="Keyword">=</span> list.<span class="LibraryConstant">length</span>; _i <span class="Keyword">&lt;</span> _len; _i<span class="Keyword">++</span>) {
180
- num <span class="Keyword">=</span> list[_i];
181
- _results.<span class="LibraryFunction">push</span>(math.cube(num));
182
- }
183
- <span class="Keyword">return</span> _results;
184
- })();
185
- </pre><script>window.example1 = "# Assignment:\nnumber = 42\nopposite = true\n\n# Conditions:\nnumber = -42 if opposite\n\n# Functions:\nsquare = (x) -> x * x\n\n# Arrays:\nlist = [1, 2, 3, 4, 5]\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)\n\nalert cubes"</script><div class='minibutton ok' onclick='javascript: var cubes, list, math, num, number, opposite, race, square;
186
- var __slice = Array.prototype.slice;
187
- number = 42;
188
- opposite = true;
189
- if (opposite) {
190
- number = -42;
191
- }
192
- square = function(x) {
193
- return x * x;
194
- };
195
- list = [1, 2, 3, 4, 5];
196
- math = {
197
- root: Math.sqrt,
198
- square: square,
199
- cube: function(x) {
200
- return x * square(x);
201
- }
202
- };
203
- race = function() {
204
- var runners, winner;
205
- winner = arguments[0], runners = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
206
- return print(winner, runners);
207
- };
208
- if (typeof elvis != "undefined" && elvis !== null) {
209
- alert("I knew it!");
210
- }
211
- cubes = (function() {
212
- var _i, _len, _results;
213
- _results = [];
214
- for (_i = 0, _len = list.length; _i < _len; _i++) {
215
- num = list[_i];
216
- _results.push(math.cube(num));
217
- }
218
- return _results;
219
- })();;alert(cubes);'>run: cubes</div><br class='clear' /></div>
220
-
221
- <h2>
222
- <span id="installation" class="bookmark"></span>
223
- Installation and Usage
224
- </h2>
225
-
226
- <p>
227
- The CoffeeScript compiler is itself
228
- <a href="documentation/docs/grammar.html">written in CoffeeScript</a>,
229
- using the <a href="http://jison.org">Jison parser generator</a>. The
230
- command-line version of <tt>coffee</tt> is available as a
231
- <a href="http://nodejs.org/">Node.js</a> utility. The
232
- <a href="extras/coffee-script.js">core compiler</a> however, does not
233
- depend on Node, and can be run in any JavaScript environment, or in the
234
- browser (see "Try CoffeeScript", above).
235
- </p>
236
-
237
- <p>
238
- To install, first make sure you have a working copy of the latest stable version of
239
- <a href="http://nodejs.org/">Node.js</a>, and <a href="http://npmjs.org">npm</a>
240
- (the Node Package Manager). You can then install CoffeeScript with npm:
241
- </p>
242
-
243
- <pre>
244
- npm install coffee-script</pre>
245
-
246
- <p>
247
- If you'd prefer to install the latest master version of CoffeeScript, you
248
- can clone the CoffeeScript
249
- <a href="http://github.com/jashkenas/coffee-script">source repository</a>
250
- from GitHub, or download
251
- <a href="http://github.com/jashkenas/coffee-script/tarball/master">the source</a> directly.
252
- To install the CoffeeScript compiler system-wide
253
- under <tt>/usr/local</tt>, open the directory and run:
254
- </p>
255
-
256
- <pre>
257
- sudo bin/cake install</pre>
258
-
259
- <p>
260
- If installing on Ubuntu or Debian,
261
- <a href="http://opinionated-programmer.com/2010/12/installing-coffeescript-on-debian-or-ubuntu/">be
262
- careful not to use the existing out-of-date package</a>. If installing on
263
- Windows, your best bet is probably to run Node.js under Cygwin.
264
- </p>
265
-
266
- <p>
267
- Once installed, you should have access to the <tt>coffee</tt> command,
268
- which can execute scripts, compile <tt>.coffee</tt> files into <tt>.js</tt>,
269
- and provide an interactive REPL. The <tt>coffee</tt> command takes the
270
- following options:
271
- </p>
272
-
273
- <table>
274
- <tr>
275
- <td><code>-c, --compile</code></td>
276
- <td>
277
- Compile a <tt>.coffee</tt> script into a <tt>.js</tt> JavaScript file
278
- of the same name.
279
- </td>
280
- </tr>
281
- <tr>
282
- <td width="25%"><code>-i, --interactive</code></td>
283
- <td>
284
- Launch an interactive CoffeeScript session to try short snippets.
285
- More pleasant if wrapped with
286
- <a href="http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap.html">rlwrap</a>.
287
- </td>
288
- </tr>
289
- <tr>
290
- <td><code>-o, --output [DIR]</code></td>
291
- <td>
292
- Write out all compiled JavaScript files into the specified directory.
293
- Use in conjunction with <tt>--compile</tt> or <tt>--watch</tt>.
294
- </td>
295
- </tr>
296
- <tr>
297
- <td><code>-j, --join</code></td>
298
- <td>
299
- Before compiling, concatenate all scripts together in the order they
300
- were passed. Useful for building large projects.
301
- </td>
302
- </tr>
303
- <tr>
304
- <td><code>-w, --watch</code></td>
305
- <td>
306
- Watch the modification times of the coffee-scripts, recompiling as
307
- soon as a change occurs.
308
- </td>
309
- </tr>
310
- <tr>
311
- <td><code>-p, --print</code></td>
312
- <td>
313
- Instead of writing out the JavaScript as a file, print it
314
- directly to <b>stdout</b>.
315
- </td>
316
- </tr>
317
- <tr>
318
- <td><code>-l, --lint</code></td>
319
- <td>
320
- If the <tt>jsl</tt>
321
- (<a href="http://www.javascriptlint.com/">JavaScript Lint</a>)
322
- command is installed, use it
323
- to check the compilation of a CoffeeScript file. (Handy in
324
- conjunction with <br /> <tt>--watch</tt>)
325
- </td>
326
- </tr>
327
- <tr>
328
- <td><code>-s, --stdio</code></td>
329
- <td>
330
- Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT.
331
- Good for use with processes written in other languages. An example:<br />
332
- <tt>cat src/cake.coffee | coffee -sc</tt>
333
- </td>
334
- </tr>
335
- <tr>
336
- <td><code>-e, --eval</code></td>
337
- <td>
338
- Compile and print a little snippet of CoffeeScript directly from the
339
- command line. For example:<br /><tt>coffee -e "puts num for num in [10..1]"</tt>
340
- </td>
341
- </tr>
342
- <tr>
343
- <td><code>-r, --require</code></td>
344
- <td>
345
- Load a library before compiling or executing your script. Can be used
346
- to hook in to the compiler (to add Growl notifications, for example).
347
- </td>
348
- </tr>
349
- <tr>
350
- <td><code>-b, --bare</code></td>
351
- <td>
352
- Compile the JavaScript without the top-level function safety wrapper.
353
- (Used for CoffeeScript as a Node.js module.)
354
- </td>
355
- </tr>
356
- <tr>
357
- <td><code>-t, --tokens</code></td>
358
- <td>
359
- Instead of parsing the CoffeeScript, just lex it, and print out the
360
- token stream: <tt>[IDENTIFIER square] [ASSIGN =] [PARAM_START (]</tt> ...
361
- </td>
362
- </tr>
363
- <tr>
364
- <td><code>-n, --nodes</code></td>
365
- <td>
366
- Instead of compiling the CoffeeScript, just lex and parse it, and print
367
- out the parse tree:
368
- <pre class="no_bar">
369
- Expressions
370
- Assign
371
- Value "square"
372
- Code "x"
373
- Op *
374
- Value "x"
375
- Value "x"</pre>
376
- </td>
377
- </tr>
378
- <tr>
379
- <td><code>--nodejs</code></td>
380
- <td>
381
- The <tt>node</tt> executable has some useful options you can set,
382
- such as<br /> <tt>--debug</tt> and <tt>--max-stack-size</tt>. Use this
383
- flag to forward options directly to Node.js.
384
- </td>
385
- </tr>
386
- </table>
387
-
388
- <p>
389
- <b>Examples:</b>
390
- </p>
391
-
392
- <ul>
393
- <li>
394
- Compile a directory tree of <tt>.coffee</tt> files into a parallel
395
- tree of <tt>.js</tt>, in <tt>lib</tt>:<br />
396
- <tt>coffee -o lib/ -c src/</tt>
397
- </li>
398
- <li>
399
- Watch a file for changes, and recompile it every time the file is saved:<br />
400
- <tt>coffee --watch --compile experimental.coffee</tt>
401
- </li>
402
- <li>
403
- Concatenate a list of files into a single script:<br />
404
- <tt>coffee -o lib/ --join --compile src/*.coffee</tt>
405
- </li>
406
- <li>
407
- Print out the compiled JS from a one-liner:<br />
408
- <tt>coffee -bpe "alert i for i in [0..10]"</tt>
409
- </li>
410
- <li>
411
- Start the CoffeeScript REPL:<br />
412
- <tt>coffee</tt>
413
- </li>
414
- </ul>
415
-
416
- <h2>
417
- <span id="language" class="bookmark"></span>
418
- Language Reference
419
- </h2>
420
-
421
- <p>
422
- <i>
423
- This reference is structured so that it can be read from top to bottom,
424
- if you like. Later sections use ideas and syntax previously introduced.
425
- Familiarity with JavaScript is assumed.
426
- In all of the following examples, the source CoffeeScript is provided on
427
- the left, and the direct compilation into JavaScript is on the right.
428
- </i>
429
- </p>
430
-
431
- <p>
432
- <i>
433
- Many of the examples can be run (where it makes sense) by pressing the <b>run</b>
434
- button on the right, and can be loaded into the "Try CoffeeScript"
435
- console by pressing the <b>load</b> button on the left.
436
- </i>
437
- <p>
438
- First, the basics: CoffeeScript uses significant whitespace to delimit blocks of code.
439
- You don't need to use semicolons <tt>;</tt> to terminate expressions,
440
- ending the line will do just as well, (although semicolons can still
441
- be used to fit multiple expressions onto a single line.)
442
- Instead of using curly braces
443
- <tt>{ }</tt> to surround blocks of code in <a href="#functions">functions</a>,
444
- <a href="#conditionals">if-statements</a>,
445
- <a href="#switch">switch</a>, and <a href="#try">try/catch</a>,
446
- use indentation.
447
- </p>
448
-
449
- <p>
450
- You don't need to use parentheses to invoke a function if you're passing
451
- arguments. The implicit call wraps forward to the end of the line or block expression.<br />
452
- <tt>console.log sys.inspect object</tt> &rarr; <tt>console.log(sys.inspect(object));</tt>
453
- </p>
454
-
455
- <p>
456
- <span id="literals" class="bookmark"></span>
457
- <b class="header">Functions</b>
458
- Functions are defined by an optional list of parameters in parentheses,
459
- an arrow, and the function body. The empty function looks like this:
460
- <tt>-></tt>
461
- </p>
462
- <div class='code'><pre class="idle"><span class="FunctionName">square </span><span class="Keyword">=</span> <span class="FunctionArgument">(x)</span> <span class="Storage">-&gt;</span> x <span class="Keyword">*</span> x
463
- <span class="FunctionName">cube </span><span class="Keyword">=</span> <span class="FunctionArgument">(x)</span> <span class="Storage">-&gt;</span> square(x) <span class="Keyword">*</span> x
464
- </pre><pre class="idle"><span class="Storage">var</span> cube, square;
465
- <span class="FunctionName">square</span> = <span class="Storage">function</span>(<span class="FunctionArgument">x</span>) {
466
- <span class="Keyword">return</span> x <span class="Keyword">*</span> x;
467
- };
468
- <span class="FunctionName">cube</span> = <span class="Storage">function</span>(<span class="FunctionArgument">x</span>) {
469
- <span class="Keyword">return</span> square(x) <span class="Keyword">*</span> x;
470
- };
471
- </pre><script>window.example2 = "square = (x) -> x * x\ncube = (x) -> square(x) * x\n\nalert cube(5)"</script><div class='minibutton load' onclick='javascript: loadConsole(example2);'>load</div><div class='minibutton ok' onclick='javascript: var cube, square;
472
- square = function(x) {
473
- return x * x;
474
- };
475
- cube = function(x) {
476
- return square(x) * x;
477
- };;alert(cube(5));'>run: cube(5)</div><br class='clear' /></div>
478
- <p>
479
- Functions may also have default values for arguments. Override the default
480
- value by passing a non-null argument.
481
- </p>
482
- <div class='code'><pre class="idle"><span class="FunctionName">fill </span><span class="Keyword">=</span> <span class="FunctionArgument">(container, liquid = &quot;coffee&quot;)</span> <span class="Storage">-&gt;</span>
483
- <span class="String"><span class="String">&quot;</span>Filling the <span class="String"><span class="String">#{</span>container<span class="String">}</span></span> with <span class="String"><span class="String">#{</span>liquid<span class="String">}</span></span>...<span class="String">&quot;</span></span>
484
-
485
-
486
-
487
-
488
-
489
-
490
- </pre><pre class="idle"><span class="Storage">var</span> fill;
491
- <span class="FunctionName">fill</span> = <span class="Storage">function</span>(<span class="FunctionArgument">container, liquid</span>) {
492
- <span class="Keyword">if</span> (liquid <span class="Keyword">==</span> <span class="BuiltInConstant">null</span>) {
493
- liquid <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>coffee<span class="String">&quot;</span></span>;
494
- }
495
- <span class="Keyword">return</span> <span class="String"><span class="String">&quot;</span>Filling the <span class="String">&quot;</span></span> <span class="Keyword">+</span> container <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span> with <span class="String">&quot;</span></span> <span class="Keyword">+</span> liquid <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span>...<span class="String">&quot;</span></span>;
496
- };
497
- </pre><script>window.example3 = "fill = (container, liquid = \"coffee\") ->\n \"Filling the #{container} with #{liquid}...\"\n\nalert fill(\"cup\")"</script><div class='minibutton load' onclick='javascript: loadConsole(example3);'>load</div><div class='minibutton ok' onclick='javascript: var fill;
498
- fill = function(container, liquid) {
499
- if (liquid == null) {
500
- liquid = "coffee";
501
- }
502
- return "Filling the " + container + " with " + liquid + "...";
503
- };;alert(fill("cup"));'>run: fill("cup")</div><br class='clear' /></div>
504
-
505
- <p>
506
- <span id="objects_and_arrays" class="bookmark"></span>
507
- <b class="header">Objects and Arrays</b>
508
- The CoffeeScript literals for objects and arrays look very similar to
509
- their JavaScript cousins. When each property is listed on its own line,
510
- the commas are optional. Objects may be created using indentation instead
511
- of explicit braces, similar to <a href="http://yaml.org">YAML</a>.
512
- </p>
513
- <div class='code'><pre class="idle">song <span class="Keyword">=</span> [<span class="String"><span class="String">&quot;</span>do<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>re<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>mi<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>fa<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>so<span class="String">&quot;</span></span>]
514
-
515
- singers <span class="Keyword">=</span> {Jagger: <span class="String"><span class="String">&quot;</span>Rock<span class="String">&quot;</span></span>, Elvis: <span class="String"><span class="String">&quot;</span>Roll<span class="String">&quot;</span></span>}
516
-
517
- bitlist <span class="Keyword">=</span> [
518
- <span class="Number">1</span>, <span class="Number">0</span>, <span class="Number">1</span>
519
- <span class="Number">0</span>, <span class="Number">0</span>, <span class="Number">1</span>
520
- <span class="Number">1</span>, <span class="Number">1</span>, <span class="Number">0</span>
521
- ]
522
-
523
- kids <span class="Keyword">=</span>
524
- brother:
525
- name: <span class="String"><span class="String">&quot;</span>Max<span class="String">&quot;</span></span>
526
- age: <span class="Number">11</span>
527
- sister:
528
- name: <span class="String"><span class="String">&quot;</span>Ida<span class="String">&quot;</span></span>
529
- age: <span class="Number">9</span>
530
-
531
-
532
- </pre><pre class="idle"><span class="Storage">var</span> bitlist, kids, singers, song;
533
- song <span class="Keyword">=</span> [<span class="String"><span class="String">&quot;</span>do<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>re<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>mi<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>fa<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>so<span class="String">&quot;</span></span>];
534
- singers <span class="Keyword">=</span> {
535
- Jagger: <span class="String"><span class="String">&quot;</span>Rock<span class="String">&quot;</span></span>,
536
- Elvis: <span class="String"><span class="String">&quot;</span>Roll<span class="String">&quot;</span></span>
537
- };
538
- bitlist <span class="Keyword">=</span> [<span class="Number">1</span>, <span class="Number">0</span>, <span class="Number">1</span>, <span class="Number">0</span>, <span class="Number">0</span>, <span class="Number">1</span>, <span class="Number">1</span>, <span class="Number">1</span>, <span class="Number">0</span>];
539
- kids <span class="Keyword">=</span> {
540
- brother: {
541
- name: <span class="String"><span class="String">&quot;</span>Max<span class="String">&quot;</span></span>,
542
- age: <span class="Number">11</span>
543
- },
544
- sister: {
545
- name: <span class="String"><span class="String">&quot;</span>Ida<span class="String">&quot;</span></span>,
546
- age: <span class="Number">9</span>
547
- }
548
- };
549
- </pre><script>window.example4 = "song = [\"do\", \"re\", \"mi\", \"fa\", \"so\"]\n\nsingers = {Jagger: \"Rock\", Elvis: \"Roll\"}\n\nbitlist = [\n 1, 0, 1\n 0, 0, 1\n 1, 1, 0\n]\n\nkids =\n brother:\n name: \"Max\"\n age: 11\n sister:\n name: \"Ida\"\n age: 9\n\nalert song.join(\" ... \")"</script><div class='minibutton load' onclick='javascript: loadConsole(example4);'>load</div><div class='minibutton ok' onclick='javascript: var bitlist, kids, singers, song;
550
- song = ["do", "re", "mi", "fa", "so"];
551
- singers = {
552
- Jagger: "Rock",
553
- Elvis: "Roll"
554
- };
555
- bitlist = [1, 0, 1, 0, 0, 1, 1, 1, 0];
556
- kids = {
557
- brother: {
558
- name: "Max",
559
- age: 11
560
- },
561
- sister: {
562
- name: "Ida",
563
- age: 9
564
- }
565
- };;alert(song.join(" ... "));'>run: song.join(" ... ")</div><br class='clear' /></div>
566
- <p>
567
- In JavaScript, you can't use reserved words, like <tt>class</tt>, as properties
568
- of an object, without quoting them as strings. CoffeeScript notices reserved words
569
- used as keys in objects and quotes them for you, so you don't have to worry
570
- about it (say, when using jQuery).
571
- </p>
572
- <div class='code'><pre class="idle">$(<span class="String"><span class="String">'</span>.account<span class="String">'</span></span>).attr class: <span class="String"><span class="String">'</span>active<span class="String">'</span></span>
573
-
574
- log object.<span class="Storage">class</span>
575
-
576
-
577
- </pre><pre class="idle"><span class="Keyword">$</span>(<span class="String"><span class="String">'</span>.account<span class="String">'</span></span>).attr({
578
- <span class="String"><span class="String">&quot;</span>class<span class="String">&quot;</span></span>: <span class="String"><span class="String">'</span>active<span class="String">'</span></span>
579
- });
580
- <span class="LibraryFunction">log</span>(object[<span class="String"><span class="String">&quot;</span>class<span class="String">&quot;</span></span>]);
581
- </pre><script>window.example5 = "$('.account').attr class: 'active'\n\nlog object.class\n\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example5);'>load</div><br class='clear' /></div>
582
-
583
- <p>
584
- <span id="lexical_scope" class="bookmark"></span>
585
- <b class="header">Lexical Scoping and Variable Safety</b>
586
- The CoffeeScript compiler takes care to make sure that all of your variables
587
- are properly declared within lexical scope &mdash; you never need to write
588
- <tt>var</tt> yourself.
589
- </p>
590
- <div class='code'><pre class="idle">outer <span class="Keyword">=</span> <span class="Number">1</span>
591
- <span class="FunctionName">changeNumbers </span><span class="Keyword">=</span> <span class="Keyword">-</span><span class="Keyword">&gt;</span>
592
- inner <span class="Keyword">=</span> <span class="Keyword">-</span><span class="Number">1</span>
593
- outer <span class="Keyword">=</span> <span class="Number">10</span>
594
- inner <span class="Keyword">=</span> changeNumbers()
595
- </pre><pre class="idle"><span class="Storage">var</span> changeNumbers, inner, outer;
596
- outer <span class="Keyword">=</span> <span class="Number">1</span>;
597
- <span class="FunctionName">changeNumbers</span> = <span class="Storage">function</span>() {
598
- <span class="Storage">var</span> inner;
599
- inner <span class="Keyword">=</span> <span class="Keyword">-</span><span class="Number">1</span>;
600
- <span class="Keyword">return</span> outer <span class="Keyword">=</span> <span class="Number">10</span>;
601
- };
602
- inner <span class="Keyword">=</span> changeNumbers();
603
- </pre><script>window.example6 = "outer = 1\nchangeNumbers = ->\n inner = -1\n outer = 10\ninner = changeNumbers()\n\nalert inner"</script><div class='minibutton load' onclick='javascript: loadConsole(example6);'>load</div><div class='minibutton ok' onclick='javascript: var changeNumbers, inner, outer;
604
- outer = 1;
605
- changeNumbers = function() {
606
- var inner;
607
- inner = -1;
608
- return outer = 10;
609
- };
610
- inner = changeNumbers();;alert(inner);'>run: inner</div><br class='clear' /></div>
611
- <p>
612
- Notice how all of the variable declarations have been pushed up to
613
- the top of the closest scope, the first time they appear.
614
- <b>outer</b> is not redeclared within the inner function, because it's
615
- already in scope; <b>inner</b> within the function, on the other hand,
616
- should not be able to change the value of the external variable of the same name, and
617
- therefore has a declaration of its own.
618
- </p>
619
- <p>
620
- This behavior is effectively identical to Ruby's scope for local variables.
621
- Because you don't have direct access to the <tt>var</tt> keyword,
622
- it's impossible to shadow an outer variable on purpose, you may only refer
623
- to it. So be careful that you're not reusing the name of an external
624
- variable accidentally, if you're writing a deeply nested function.
625
- </p>
626
- <p>
627
- Although suppressed within this documentation for clarity, all
628
- CoffeeScript output is wrapped in an anonymous function:
629
- <tt>(function(){ ... })();</tt> This safety wrapper, combined with the
630
- automatic generation of the <tt>var</tt> keyword, make it exceedingly difficult
631
- to pollute the global namespace by accident.
632
- </p>
633
- <p>
634
- If you'd like to create top-level variables for other scripts to use,
635
- attach them as properties on <b>window</b>, or on the <b>exports</b>
636
- object in CommonJS. The <b>existential operator</b> (covered below), gives you a
637
- reliable way to figure out where to add them, if you're targeting both
638
- CommonJS and the browser: <tt>exports ? this</tt>
639
- </p>
640
-
641
- <p>
642
- <span id="conditionals" class="bookmark"></span>
643
- <b class="header">If, Else, Unless, and Conditional Assignment</b>
644
- <b>If/else</b> statements can be written without the use of parentheses and
645
- curly brackets. As with functions and other block expressions,
646
- multi-line conditionals are delimited by indentation. There's also a handy
647
- postfix form, with the <tt>if</tt> or <tt>unless</tt> at the end.
648
- </p>
649
- <p>
650
- CoffeeScript can compile <b>if</b> statements into JavaScript expressions,
651
- using the ternary operator when possible, and closure wrapping otherwise. There
652
- is no explicit ternary statement in CoffeeScript &mdash; you simply use
653
- a regular <b>if</b> statement on a single line.
654
- </p>
655
- <div class='code'><pre class="idle">mood <span class="Keyword">=</span> greatlyImproved <span class="Keyword">if</span> singing
656
-
657
- <span class="Keyword">if</span> happy <span class="Keyword">and</span> knowsIt
658
- clapsHands()
659
- chaChaCha()
660
- <span class="Keyword">else</span>
661
- showIt()
662
-
663
- date <span class="Keyword">=</span> <span class="Keyword">if</span> friday <span class="Keyword">then</span> sue <span class="Keyword">else</span> jill
664
-
665
- options <span class="Keyword">or=</span> defaults
666
-
667
-
668
- </pre><pre class="idle"><span class="Storage">var</span> date, mood;
669
- <span class="Keyword">if</span> (singing) {
670
- mood <span class="Keyword">=</span> greatlyImproved;
671
- }
672
- <span class="Keyword">if</span> (happy <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> knowsIt) {
673
- clapsHands();
674
- chaChaCha();
675
- } <span class="Keyword">else</span> {
676
- showIt();
677
- }
678
- date <span class="Keyword">=</span> friday ? sue : jill;
679
- options <span class="Keyword">||</span> (options <span class="Keyword">=</span> defaults);
680
- </pre><script>window.example7 = "mood = greatlyImproved if singing\n\nif happy and knowsIt\n clapsHands()\n chaChaCha()\nelse\n showIt()\n\ndate = if friday then sue else jill\n\noptions or= defaults\n\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example7);'>load</div><br class='clear' /></div>
681
-
682
- <p>
683
- <span id="splats" class="bookmark"></span>
684
- <b class="header">Splats...</b>
685
- The JavaScript <b>arguments object</b> is a useful way to work with
686
- functions that accept variable numbers of arguments. CoffeeScript provides
687
- splats <tt>...</tt>, both for function definition as well as invocation,
688
- making variable numbers of arguments a little bit more palatable.
689
- </p>
690
- <div class='code'><pre class="idle">gold <span class="Keyword">=</span> silver <span class="Keyword">=</span> rest <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>unknown<span class="String">&quot;</span></span>
691
-
692
- <span class="FunctionName">awardMedals </span><span class="Keyword">=</span> <span class="FunctionArgument">(first, second, others...)</span> <span class="Storage">-&gt;</span>
693
- gold <span class="Keyword">=</span> first
694
- silver <span class="Keyword">=</span> second
695
- rest <span class="Keyword">=</span> others
696
-
697
- contenders <span class="Keyword">=</span> [
698
- <span class="String"><span class="String">&quot;</span>Michael Phelps<span class="String">&quot;</span></span>
699
- <span class="String"><span class="String">&quot;</span>Liu Xiang<span class="String">&quot;</span></span>
700
- <span class="String"><span class="String">&quot;</span>Yao Ming<span class="String">&quot;</span></span>
701
- <span class="String"><span class="String">&quot;</span>Allyson Felix<span class="String">&quot;</span></span>
702
- <span class="String"><span class="String">&quot;</span>Shawn Johnson<span class="String">&quot;</span></span>
703
- <span class="String"><span class="String">&quot;</span>Roman Sebrle<span class="String">&quot;</span></span>
704
- <span class="String"><span class="String">&quot;</span>Guo Jingjing<span class="String">&quot;</span></span>
705
- <span class="String"><span class="String">&quot;</span>Tyson Gay<span class="String">&quot;</span></span>
706
- <span class="String"><span class="String">&quot;</span>Asafa Powell<span class="String">&quot;</span></span>
707
- <span class="String"><span class="String">&quot;</span>Usain Bolt<span class="String">&quot;</span></span>
708
- ]
709
-
710
- awardMedals contenders...
711
-
712
- alert <span class="String"><span class="String">&quot;</span>Gold: <span class="String">&quot;</span></span> <span class="Keyword">+</span> gold
713
- alert <span class="String"><span class="String">&quot;</span>Silver: <span class="String">&quot;</span></span> <span class="Keyword">+</span> silver
714
- alert <span class="String"><span class="String">&quot;</span>The Field: <span class="String">&quot;</span></span> <span class="Keyword">+</span> rest
715
-
716
-
717
- </pre><pre class="idle"><span class="Storage">var</span> awardMedals, contenders, gold, rest, silver;
718
- <span class="Storage">var</span> __slice <span class="Keyword">=</span> <span class="LibraryClassType">Array</span>.<span class="LibraryConstant">prototype</span>.slice;
719
- gold <span class="Keyword">=</span> silver <span class="Keyword">=</span> rest <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>unknown<span class="String">&quot;</span></span>;
720
- <span class="FunctionName">awardMedals</span> = <span class="Storage">function</span>() {
721
- <span class="Storage">var</span> first, others, second;
722
- first <span class="Keyword">=</span> arguments[<span class="Number">0</span>], second <span class="Keyword">=</span> arguments[<span class="Number">1</span>], others <span class="Keyword">=</span> <span class="Number">3</span> <span class="Keyword">&lt;=</span> arguments.<span class="LibraryConstant">length</span> ? __slice.<span class="LibraryFunction">call</span>(arguments, <span class="Number">2</span>) : [];
723
- gold <span class="Keyword">=</span> first;
724
- silver <span class="Keyword">=</span> second;
725
- <span class="Keyword">return</span> rest <span class="Keyword">=</span> others;
726
- };
727
- contenders <span class="Keyword">=</span> [<span class="String"><span class="String">&quot;</span>Michael Phelps<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Liu Xiang<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Yao Ming<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Allyson Felix<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Shawn Johnson<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Roman Sebrle<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Guo Jingjing<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Tyson Gay<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Asafa Powell<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Usain Bolt<span class="String">&quot;</span></span>];
728
- awardMedals.<span class="LibraryFunction">apply</span>(<span class="BuiltInConstant">null</span>, contenders);
729
- <span class="LibraryFunction">alert</span>(<span class="String"><span class="String">&quot;</span>Gold: <span class="String">&quot;</span></span> <span class="Keyword">+</span> gold);
730
- <span class="LibraryFunction">alert</span>(<span class="String"><span class="String">&quot;</span>Silver: <span class="String">&quot;</span></span> <span class="Keyword">+</span> silver);
731
- <span class="LibraryFunction">alert</span>(<span class="String"><span class="String">&quot;</span>The Field: <span class="String">&quot;</span></span> <span class="Keyword">+</span> rest);
732
- </pre><script>window.example8 = "gold = silver = rest = \"unknown\"\n\nawardMedals = (first, second, others...) ->\n gold = first\n silver = second\n rest = others\n\ncontenders = [\n \"Michael Phelps\"\n \"Liu Xiang\"\n \"Yao Ming\"\n \"Allyson Felix\"\n \"Shawn Johnson\"\n \"Roman Sebrle\"\n \"Guo Jingjing\"\n \"Tyson Gay\"\n \"Asafa Powell\"\n \"Usain Bolt\"\n]\n\nawardMedals contenders...\n\nalert \"Gold: \" + gold\nalert \"Silver: \" + silver\nalert \"The Field: \" + rest\n\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example8);'>load</div><div class='minibutton ok' onclick='javascript: var awardMedals, contenders, gold, rest, silver;
733
- var __slice = Array.prototype.slice;
734
- gold = silver = rest = "unknown";
735
- awardMedals = function() {
736
- var first, others, second;
737
- first = arguments[0], second = arguments[1], others = 3 <= arguments.length ? __slice.call(arguments, 2) : [];
738
- gold = first;
739
- silver = second;
740
- return rest = others;
741
- };
742
- contenders = ["Michael Phelps", "Liu Xiang", "Yao Ming", "Allyson Felix", "Shawn Johnson", "Roman Sebrle", "Guo Jingjing", "Tyson Gay", "Asafa Powell", "Usain Bolt"];
743
- awardMedals.apply(null, contenders);
744
- alert("Gold: " + gold);
745
- alert("Silver: " + silver);
746
- alert("The Field: " + rest);;'>run</div><br class='clear' /></div>
747
-
748
- <p>
749
- <span id="loops" class="bookmark"></span>
750
- <b class="header">Loops and Comprehensions</b>
751
- Most of the loops you'll write in CoffeeScript will be <b>comprehensions</b>
752
- over arrays, objects, and ranges. Comprehensions replace (and compile into)
753
- <b>for</b> loops, with optional guard clauses and the value of the current array index.
754
- Unlike for loops, array comprehensions are expressions, and can be returned
755
- and assigned. They should be able to handle most places where you otherwise
756
- would use a loop, <b>each</b>/<b>forEach</b>, <b>map</b>, or <b>select</b>/<b>filter</b>.
757
- </p>
758
- <div class='code'><pre class="idle"><span class="Comment"><span class="Comment">#</span> Eat lunch.</span>
759
- eat food <span class="Keyword">for</span> food <span class="Keyword">in</span> [<span class="String"><span class="String">'</span>toast<span class="String">'</span></span>, <span class="String"><span class="String">'</span>cheese<span class="String">'</span></span>, <span class="String"><span class="String">'</span>wine<span class="String">'</span></span>]
760
- </pre><pre class="idle"><span class="Storage">var</span> food, _i, _len, _ref;
761
- _ref <span class="Keyword">=</span> [<span class="String"><span class="String">'</span>toast<span class="String">'</span></span>, <span class="String"><span class="String">'</span>cheese<span class="String">'</span></span>, <span class="String"><span class="String">'</span>wine<span class="String">'</span></span>];
762
- <span class="Keyword">for</span> (_i <span class="Keyword">=</span> <span class="Number">0</span>, _len <span class="Keyword">=</span> _ref.<span class="LibraryConstant">length</span>; _i <span class="Keyword">&lt;</span> _len; _i<span class="Keyword">++</span>) {
763
- food <span class="Keyword">=</span> _ref[_i];
764
- eat(food);
765
- }
766
- </pre><script>window.example9 = "# Eat lunch.\neat food for food in ['toast', 'cheese', 'wine']\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example9);'>load</div><br class='clear' /></div>
767
- <p>
768
- If you know the start and end of your loop, or would like to step through
769
- in fixed-size increments, you can use a range to specify the start and
770
- end of your comprehension.
771
- </p>
772
- <div class='code'><pre class="idle">countdown <span class="Keyword">=</span> (num <span class="Keyword">for</span> num <span class="Keyword">in</span> [<span class="Number">10</span>..<span class="Number">1</span>])
773
-
774
- </pre><pre class="idle"><span class="Storage">var</span> countdown, num;
775
- countdown <span class="Keyword">=</span> (<span class="Storage">function</span>() {
776
- <span class="Storage">var</span> _results;
777
- _results <span class="Keyword">=</span> [];
778
- <span class="Keyword">for</span> (num <span class="Keyword">=</span> <span class="Number">10</span>; num <span class="Keyword">&gt;=</span> <span class="Number">1</span>; num<span class="Keyword">--</span>) {
779
- _results.<span class="LibraryFunction">push</span>(num);
780
- }
781
- <span class="Keyword">return</span> _results;
782
- })();
783
- </pre><script>window.example10 = "countdown = (num for num in [10..1])\n\nalert countdown"</script><div class='minibutton load' onclick='javascript: loadConsole(example10);'>load</div><div class='minibutton ok' onclick='javascript: var countdown, num;
784
- countdown = (function() {
785
- var _results;
786
- _results = [];
787
- for (num = 10; num >= 1; num--) {
788
- _results.push(num);
789
- }
790
- return _results;
791
- })();;alert(countdown);'>run: countdown</div><br class='clear' /></div>
792
- <p>
793
- Note how because we are assigning the value of the comprehensions to a
794
- variable in the example above, CoffeeScript is collecting the result of
795
- each iteration into an array. Sometimes functions end with loops that are
796
- intended to run only for their side-effects. Be careful that you're not
797
- accidentally returning the results of the comprehension in these cases,
798
- by adding a meaningful return value, like <tt>true</tt>, or <tt>null</tt>,
799
- to the bottom of your function.
800
- </p>
801
- <p>
802
- To step through a range comprehension in fixed-size chunks,
803
- use <tt>by</tt>, for example:<br />
804
- <tt>evens = (x for x in [0..10] by 2)</tt>
805
- </p>
806
- <p>
807
- Comprehensions can also be used to iterate over the keys and values in
808
- an object. Use <tt>of</tt> to signal comprehension over the properties of
809
- an object instead of the values in an array.
810
- </p>
811
- <div class='code'><pre class="idle">yearsOld <span class="Keyword">=</span> max: <span class="Number">10</span>, ida: <span class="Number">9</span>, tim: <span class="Number">11</span>
812
-
813
- ages <span class="Keyword">=</span> <span class="Keyword">for</span> child, age <span class="Keyword">of</span> yearsOld
814
- child <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span> is <span class="String">&quot;</span></span> <span class="Keyword">+</span> age
815
- </pre><pre class="idle"><span class="Storage">var</span> age, ages, child, yearsOld;
816
- yearsOld <span class="Keyword">=</span> {
817
- max: <span class="Number">10</span>,
818
- ida: <span class="Number">9</span>,
819
- tim: <span class="Number">11</span>
820
- };
821
- ages <span class="Keyword">=</span> (<span class="Storage">function</span>() {
822
- <span class="Storage">var</span> _results;
823
- _results <span class="Keyword">=</span> [];
824
- <span class="Keyword">for</span> (child <span class="Keyword">in</span> yearsOld) {
825
- age <span class="Keyword">=</span> yearsOld[child];
826
- _results.<span class="LibraryFunction">push</span>(child <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span> is <span class="String">&quot;</span></span> <span class="Keyword">+</span> age);
827
- }
828
- <span class="Keyword">return</span> _results;
829
- })();
830
- </pre><script>window.example11 = "yearsOld = max: 10, ida: 9, tim: 11\n\nages = for child, age of yearsOld\n child + \" is \" + age\n\nalert ages.join(\", \")"</script><div class='minibutton load' onclick='javascript: loadConsole(example11);'>load</div><div class='minibutton ok' onclick='javascript: var age, ages, child, yearsOld;
831
- yearsOld = {
832
- max: 10,
833
- ida: 9,
834
- tim: 11
835
- };
836
- ages = (function() {
837
- var _results;
838
- _results = [];
839
- for (child in yearsOld) {
840
- age = yearsOld[child];
841
- _results.push(child + " is " + age);
842
- }
843
- return _results;
844
- })();;alert(ages.join(", "));'>run: ages.join(", ")</div><br class='clear' /></div>
845
- <p>
846
- If you would like to iterate over just the keys that are defined on the
847
- object itself, by adding a <tt>hasOwnProperty</tt>
848
- check to avoid properties that may be interited from the prototype, use<br />
849
- <tt>for own key, value of object</tt>
850
- </p>
851
- <p>
852
- The only low-level loop that CoffeeScript provides is the <b>while</b> loop. The
853
- main difference from JavaScript is that the <b>while</b> loop can be used
854
- as an expression, returning an array containing the result of each iteration
855
- through the loop.
856
- </p>
857
- <div class='code'><pre class="idle"><span class="Comment"><span class="Comment">#</span> Econ 101</span>
858
- <span class="Keyword">if</span> <span class="Variable">this</span>.studyingEconomics
859
- buy() <span class="Keyword">while</span> supply <span class="Keyword">&gt;</span> demand
860
- sell() <span class="Keyword">until</span> supply <span class="Keyword">&gt;</span> demand
861
-
862
- <span class="Comment"><span class="Comment">#</span> Nursery Rhyme</span>
863
- num <span class="Keyword">=</span> <span class="Number">6</span>
864
- lyrics <span class="Keyword">=</span> <span class="Keyword">while</span> num <span class="Keyword">-</span><span class="Keyword">=</span> <span class="Number">1</span>
865
- num <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span> little monkeys, jumping on the bed.</span>
866
- <span class="String"> One fell out and bumped his head.<span class="String">&quot;</span></span>
867
- </pre><pre class="idle"><span class="Storage">var</span> lyrics, num;
868
- <span class="Keyword">if</span> (<span class="Variable">this</span>.studyingEconomics) {
869
- <span class="Keyword">while</span> (supply <span class="Keyword">&gt;</span> demand) {
870
- buy();
871
- }
872
- <span class="Keyword">while</span> (<span class="Keyword">!</span>(supply <span class="Keyword">&gt;</span> demand)) {
873
- sell();
874
- }
875
- }
876
- num <span class="Keyword">=</span> <span class="Number">6</span>;
877
- lyrics <span class="Keyword">=</span> (<span class="Storage">function</span>() {
878
- <span class="Storage">var</span> _results;
879
- _results <span class="Keyword">=</span> [];
880
- <span class="Keyword">while</span> (num <span class="Keyword">-</span><span class="Keyword">=</span> <span class="Number">1</span>) {
881
- _results.<span class="LibraryFunction">push</span>(num <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span> little monkeys, jumping on the bed. One fell out and bumped his head.<span class="String">&quot;</span></span>);
882
- }
883
- <span class="Keyword">return</span> _results;
884
- })();
885
- </pre><script>window.example12 = "# Econ 101\nif this.studyingEconomics\n buy() while supply > demand\n sell() until supply > demand\n\n# Nursery Rhyme\nnum = 6\nlyrics = while num -= 1\n num + \" little monkeys, jumping on the bed.\n One fell out and bumped his head.\"\n\nalert lyrics.join(\"\\n\")"</script><div class='minibutton load' onclick='javascript: loadConsole(example12);'>load</div><div class='minibutton ok' onclick='javascript: var lyrics, num;
886
- if (this.studyingEconomics) {
887
- while (supply > demand) {
888
- buy();
889
- }
890
- while (!(supply > demand)) {
891
- sell();
892
- }
893
- }
894
- num = 6;
895
- lyrics = (function() {
896
- var _results;
897
- _results = [];
898
- while (num -= 1) {
899
- _results.push(num + " little monkeys, jumping on the bed. One fell out and bumped his head.");
900
- }
901
- return _results;
902
- })();;alert(lyrics.join("\n"));'>run: lyrics.join("\n")</div><br class='clear' /></div>
903
- <p>
904
- For readability, the <b>until</b> keyword is equivalent to <tt>while not</tt>,
905
- and the <b>loop</b> keyword is equivalent to <tt>while true</tt>.
906
- </p>
907
- <p>
908
- When using a JavaScript loop to generate functions, it's common to insert
909
- a closure wrapper in order to ensure that loop variables are closed over,
910
- and all the generated functions don't just share the final values. CoffeeScript
911
- provides the <tt>do</tt> keyword, which immediately invokes a passed function,
912
- forwarding any arguments.
913
- </p>
914
- <div class='code'><pre class="idle"><span class="Keyword">for</span> fileName <span class="Keyword">in</span> list
915
- <span class="Keyword">do</span> <span class="FunctionArgument">(fileName)</span> <span class="Storage">-&gt;</span>
916
- fs.readFile fileName, <span class="FunctionArgument">(err, contents)</span> <span class="Storage">-&gt;</span>
917
- compile fileName, contents.toString()
918
- </pre><pre class="idle"><span class="Storage">var</span> fileName, _fn, _i, _len;
919
- <span class="FunctionName">_fn</span> = <span class="Storage">function</span>(<span class="FunctionArgument">fileName</span>) {
920
- <span class="Keyword">return</span> fs.readFile(fileName, <span class="Storage">function</span>(err, contents) {
921
- <span class="Keyword">return</span> <span class="LibraryFunction">compile</span>(fileName, contents.<span class="LibraryFunction">toString</span>());
922
- });
923
- };
924
- <span class="Keyword">for</span> (_i <span class="Keyword">=</span> <span class="Number">0</span>, _len <span class="Keyword">=</span> list.<span class="LibraryConstant">length</span>; _i <span class="Keyword">&lt;</span> _len; _i<span class="Keyword">++</span>) {
925
- fileName <span class="Keyword">=</span> list[_i];
926
- _fn(fileName);
927
- }
928
- </pre><script>window.example13 = "for fileName in list\n do (fileName) ->\n fs.readFile fileName, (err, contents) ->\n compile fileName, contents.toString()"</script><div class='minibutton load' onclick='javascript: loadConsole(example13);'>load</div><br class='clear' /></div>
929
-
930
- <p>
931
- <span id="slices" class="bookmark"></span>
932
- <b class="header">Array Slicing and Splicing with Ranges</b>
933
- Ranges can also be used to extract slices of arrays.
934
- With two dots (<tt>3..6</tt>), the range is inclusive (<tt>3, 4, 5, 6</tt>);
935
- with three docs (<tt>3...6</tt>), the range excludes the end (<tt>3, 4, 5</tt>).
936
- </p>
937
- <div class='code'><pre class="idle">numbers <span class="Keyword">=</span> [<span class="Number">0</span>, <span class="Number">1</span>, <span class="Number">2</span>, <span class="Number">3</span>, <span class="Number">4</span>, <span class="Number">5</span>, <span class="Number">6</span>, <span class="Number">7</span>, <span class="Number">8</span>, <span class="Number">9</span>]
938
-
939
- copy <span class="Keyword">=</span> numbers[<span class="Number">0</span>...numbers.length]
940
-
941
- middle <span class="Keyword">=</span> copy[<span class="Number">3</span>..<span class="Number">6</span>]
942
-
943
-
944
- </pre><pre class="idle"><span class="Storage">var</span> copy, middle, numbers;
945
- numbers <span class="Keyword">=</span> [<span class="Number">0</span>, <span class="Number">1</span>, <span class="Number">2</span>, <span class="Number">3</span>, <span class="Number">4</span>, <span class="Number">5</span>, <span class="Number">6</span>, <span class="Number">7</span>, <span class="Number">8</span>, <span class="Number">9</span>];
946
- copy <span class="Keyword">=</span> numbers.<span class="LibraryFunction">slice</span>(<span class="Number">0</span>, numbers.<span class="LibraryConstant">length</span>);
947
- middle <span class="Keyword">=</span> copy.<span class="LibraryFunction">slice</span>(<span class="Number">3</span>, <span class="Number">7</span>);
948
- </pre><script>window.example14 = "numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\ncopy = numbers[0...numbers.length]\n\nmiddle = copy[3..6]\n\nalert middle"</script><div class='minibutton load' onclick='javascript: loadConsole(example14);'>load</div><div class='minibutton ok' onclick='javascript: var copy, middle, numbers;
949
- numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
950
- copy = numbers.slice(0, numbers.length);
951
- middle = copy.slice(3, 7);;alert(middle);'>run: middle</div><br class='clear' /></div>
952
- <p>
953
- The same syntax can be used with assignment to replace a segment of an array
954
- with new values, splicing it.
955
- </p>
956
- <div class='code'><pre class="idle">numbers <span class="Keyword">=</span> [<span class="Number">0</span>, <span class="Number">1</span>, <span class="Number">2</span>, <span class="Number">3</span>, <span class="Number">4</span>, <span class="Number">5</span>, <span class="Number">6</span>, <span class="Number">7</span>, <span class="Number">8</span>, <span class="Number">9</span>]
957
-
958
- numbers[<span class="Number">3</span>..<span class="Number">6</span>] <span class="Keyword">=</span> [<span class="Keyword">-</span><span class="Number">3</span>, <span class="Keyword">-</span><span class="Number">4</span>, <span class="Keyword">-</span><span class="Number">5</span>, <span class="Keyword">-</span><span class="Number">6</span>]
959
-
960
-
961
- </pre><pre class="idle"><span class="Storage">var</span> numbers, _ref;
962
- numbers <span class="Keyword">=</span> [<span class="Number">0</span>, <span class="Number">1</span>, <span class="Number">2</span>, <span class="Number">3</span>, <span class="Number">4</span>, <span class="Number">5</span>, <span class="Number">6</span>, <span class="Number">7</span>, <span class="Number">8</span>, <span class="Number">9</span>];
963
- [].splice.<span class="LibraryFunction">apply</span>(numbers, [<span class="Number">3</span>, <span class="Number">4</span>].<span class="LibraryFunction">concat</span>(_ref <span class="Keyword">=</span> [<span class="Keyword">-</span><span class="Number">3</span>, <span class="Keyword">-</span><span class="Number">4</span>, <span class="Keyword">-</span><span class="Number">5</span>, <span class="Keyword">-</span><span class="Number">6</span>])), _ref;
964
- </pre><script>window.example15 = "numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\nnumbers[3..6] = [-3, -4, -5, -6]\n\nalert numbers"</script><div class='minibutton load' onclick='javascript: loadConsole(example15);'>load</div><div class='minibutton ok' onclick='javascript: var numbers, _ref;
965
- numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
966
- [].splice.apply(numbers, [3, 4].concat(_ref = [-3, -4, -5, -6])), _ref;;alert(numbers);'>run: numbers</div><br class='clear' /></div>
967
- <p>
968
- Note that JavaScript strings are immutable, and can't be spliced.
969
- </p>
970
- <p>
971
- <span id="expressions" class="bookmark"></span>
972
- <b class="header">Everything is an Expression (at least, as much as possible)</b>
973
- You might have noticed how even though we don't add return statements
974
- to CoffeeScript functions, they nonetheless return their final value.
975
- The CoffeeScript compiler tries to make sure that all statements in the
976
- language can be used as expressions. Watch how the <tt>return</tt> gets
977
- pushed down into each possible branch of execution, in the function
978
- below.
979
- </p>
980
- <div class='code'><pre class="idle"><span class="FunctionName">grade </span><span class="Keyword">=</span> <span class="FunctionArgument">(student)</span> <span class="Storage">-&gt;</span>
981
- <span class="Keyword">if</span> student.excellentWork
982
- <span class="String"><span class="String">&quot;</span>A+<span class="String">&quot;</span></span>
983
- <span class="Keyword">else</span> <span class="Keyword">if</span> student.okayStuff
984
- <span class="Keyword">if</span> student.triedHard <span class="Keyword">then</span> <span class="String"><span class="String">&quot;</span>B<span class="String">&quot;</span></span> <span class="Keyword">else</span> <span class="String"><span class="String">&quot;</span>B-<span class="String">&quot;</span></span>
985
- <span class="Keyword">else</span>
986
- <span class="String"><span class="String">&quot;</span>C<span class="String">&quot;</span></span>
987
-
988
- eldest <span class="Keyword">=</span> <span class="Keyword">if</span> <span class="Number">24</span> <span class="Keyword">&gt;</span> <span class="Number">21</span> <span class="Keyword">then</span> <span class="String"><span class="String">&quot;</span>Liz<span class="String">&quot;</span></span> <span class="Keyword">else</span> <span class="String"><span class="String">&quot;</span>Ike<span class="String">&quot;</span></span>
989
- </pre><pre class="idle"><span class="Storage">var</span> eldest, grade;
990
- <span class="FunctionName">grade</span> = <span class="Storage">function</span>(<span class="FunctionArgument">student</span>) {
991
- <span class="Keyword">if</span> (student.excellentWork) {
992
- <span class="Keyword">return</span> <span class="String"><span class="String">&quot;</span>A+<span class="String">&quot;</span></span>;
993
- } <span class="Keyword">else</span> <span class="Keyword">if</span> (student.okayStuff) {
994
- <span class="Keyword">if</span> (student.triedHard) {
995
- <span class="Keyword">return</span> <span class="String"><span class="String">&quot;</span>B<span class="String">&quot;</span></span>;
996
- } <span class="Keyword">else</span> {
997
- <span class="Keyword">return</span> <span class="String"><span class="String">&quot;</span>B-<span class="String">&quot;</span></span>;
998
- }
999
- } <span class="Keyword">else</span> {
1000
- <span class="Keyword">return</span> <span class="String"><span class="String">&quot;</span>C<span class="String">&quot;</span></span>;
1001
- }
1002
- };
1003
- eldest <span class="Keyword">=</span> <span class="Number">24</span> <span class="Keyword">&gt;</span> <span class="Number">21</span> ? <span class="String"><span class="String">&quot;</span>Liz<span class="String">&quot;</span></span> : <span class="String"><span class="String">&quot;</span>Ike<span class="String">&quot;</span></span>;
1004
- </pre><script>window.example16 = "grade = (student) ->\n if student.excellentWork\n \"A+\"\n else if student.okayStuff\n if student.triedHard then \"B\" else \"B-\"\n else\n \"C\"\n\neldest = if 24 > 21 then \"Liz\" else \"Ike\"\n\nalert eldest"</script><div class='minibutton load' onclick='javascript: loadConsole(example16);'>load</div><div class='minibutton ok' onclick='javascript: var eldest, grade;
1005
- grade = function(student) {
1006
- if (student.excellentWork) {
1007
- return "A+";
1008
- } else if (student.okayStuff) {
1009
- if (student.triedHard) {
1010
- return "B";
1011
- } else {
1012
- return "B-";
1013
- }
1014
- } else {
1015
- return "C";
1016
- }
1017
- };
1018
- eldest = 24 > 21 ? "Liz" : "Ike";;alert(eldest);'>run: eldest</div><br class='clear' /></div>
1019
- <p>
1020
- Even though functions will always return their final value, it's both possible
1021
- and encouraged to return early from a function body writing out the explicit
1022
- return (<tt>return value</tt>), when you know that you're done.
1023
- </p>
1024
- <p>
1025
- Because variable declarations occur at the top of scope, assignment can
1026
- be used within expressions, even for variables that haven't been seen before:
1027
- </p>
1028
- <div class='code'><pre class="idle">six <span class="Keyword">=</span> (one <span class="Keyword">=</span> <span class="Number">1</span>) <span class="Keyword">+</span> (two <span class="Keyword">=</span> <span class="Number">2</span>) <span class="Keyword">+</span> (three <span class="Keyword">=</span> <span class="Number">3</span>)
1029
-
1030
-
1031
- </pre><pre class="idle"><span class="Storage">var</span> one, six, three, two;
1032
- six <span class="Keyword">=</span> (one <span class="Keyword">=</span> <span class="Number">1</span>) <span class="Keyword">+</span> (two <span class="Keyword">=</span> <span class="Number">2</span>) <span class="Keyword">+</span> (three <span class="Keyword">=</span> <span class="Number">3</span>);
1033
- </pre><script>window.example17 = "six = (one = 1) + (two = 2) + (three = 3)\n\nalert six"</script><div class='minibutton load' onclick='javascript: loadConsole(example17);'>load</div><div class='minibutton ok' onclick='javascript: var one, six, three, two;
1034
- six = (one = 1) + (two = 2) + (three = 3);;alert(six);'>run: six</div><br class='clear' /></div>
1035
- <p>
1036
- Things that would otherwise be statements in JavaScript, when used
1037
- as part of an expression in CoffeeScript, are converted into expressions
1038
- by wrapping them in a closure. This lets you do useful things, like assign
1039
- the result of a comprehension to a variable:
1040
- </p>
1041
- <div class='code'><pre class="idle"><span class="Comment"><span class="Comment">#</span> The first ten global properties.</span>
1042
-
1043
- globals <span class="Keyword">=</span> (name <span class="Keyword">for</span> name <span class="Keyword">of</span> window)[<span class="Number">0</span>...<span class="Number">10</span>]
1044
- </pre><pre class="idle"><span class="Storage">var</span> globals, name;
1045
- globals <span class="Keyword">=</span> ((<span class="Storage">function</span>() {
1046
- <span class="Storage">var</span> _results;
1047
- _results <span class="Keyword">=</span> [];
1048
- <span class="Keyword">for</span> (name <span class="Keyword">in</span> <span class="LibraryClassType">window</span>) {
1049
- _results.<span class="LibraryFunction">push</span>(name);
1050
- }
1051
- <span class="Keyword">return</span> _results;
1052
- })()).<span class="LibraryFunction">slice</span>(<span class="Number">0</span>, <span class="Number">10</span>);
1053
- </pre><script>window.example18 = "# The first ten global properties.\n\nglobals = (name for name of window)[0...10]\n\nalert globals"</script><div class='minibutton load' onclick='javascript: loadConsole(example18);'>load</div><div class='minibutton ok' onclick='javascript: var globals, name;
1054
- globals = ((function() {
1055
- var _results;
1056
- _results = [];
1057
- for (name in window) {
1058
- _results.push(name);
1059
- }
1060
- return _results;
1061
- })()).slice(0, 10);;alert(globals);'>run: globals</div><br class='clear' /></div>
1062
- <p>
1063
- As well as silly things, like passing a <b>try/catch</b> statement directly
1064
- into a function call:
1065
- </p>
1066
- <div class='code'><pre class="idle">alert(
1067
- <span class="Keyword">try</span>
1068
- nonexistent <span class="Keyword">/</span> <span class="BuiltInConstant">undefined</span>
1069
- <span class="Keyword">catch</span> error
1070
- <span class="String"><span class="String">&quot;</span>And the error is ... <span class="String">&quot;</span></span> <span class="Keyword">+</span> error
1071
- )
1072
-
1073
- </pre><pre class="idle"><span class="LibraryFunction">alert</span>((<span class="Storage">function</span>() {
1074
- <span class="Keyword">try</span> {
1075
- <span class="Keyword">return</span> nonexistent / <span class="Storage">void</span> <span class="Number">0</span>;
1076
- } <span class="Keyword">catch</span> (error) {
1077
- <span class="Keyword">return</span> <span class="String"><span class="String">&quot;</span>And the error is ... <span class="String">&quot;</span></span> <span class="Keyword">+</span> error;
1078
- }
1079
- })());
1080
- </pre><script>window.example19 = "alert(\n try\n nonexistent / undefined\n catch error\n \"And the error is ... \" + error\n)\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example19);'>load</div><div class='minibutton ok' onclick='javascript: alert((function() {
1081
- try {
1082
- return nonexistent / void 0;
1083
- } catch (error) {
1084
- return "And the error is ... " + error;
1085
- }
1086
- })());;'>run</div><br class='clear' /></div>
1087
- <p>
1088
- There are a handful of statements in JavaScript that can't be meaningfully
1089
- converted into expressions, namely <tt>break</tt>, <tt>continue</tt>,
1090
- and <tt>return</tt>. If you make use of them within a block of code,
1091
- CoffeeScript won't try to perform the conversion.
1092
- </p>
1093
-
1094
- <p>
1095
- <span id="operators" class="bookmark"></span>
1096
- <b class="header">Operators and Aliases</b>
1097
- Because the <tt>==</tt> operator frequently causes undesirable coercion,
1098
- is intransitive, and has a different meaning than in other languages,
1099
- CoffeeScript compiles <tt>==</tt> into <tt>===</tt>, and <tt>!=</tt> into
1100
- <tt>!==</tt>.
1101
- In addition, <tt>is</tt> compiles into <tt>===</tt>,
1102
- and <tt>isnt</tt> into <tt>!==</tt>.
1103
- </p>
1104
- <p>
1105
- You can use <tt>not</tt> as an alias for <tt>!</tt>.
1106
- </p>
1107
- <p>
1108
- For logic, <tt>and</tt> compiles to <tt>&amp;&amp;</tt>, and <tt>or</tt>
1109
- into <tt>||</tt>.
1110
- </p>
1111
- <p>
1112
- Instead of a newline or semicolon, <tt>then</tt> can be used to separate
1113
- conditions from expressions, in <b>while</b>,
1114
- <b>if</b>/<b>else</b>, and <b>switch</b>/<b>when</b> statements.
1115
- </p>
1116
- <p>
1117
- As in <a href="http://yaml.org/">YAML</a>, <tt>on</tt> and <tt>yes</tt>
1118
- are the same as boolean <tt>true</tt>, while <tt>off</tt> and <tt>no</tt> are boolean <tt>false</tt>.
1119
- </p>
1120
- <p>
1121
- For single-line statements, <tt>unless</tt> can be used as the inverse of <tt>if</tt>.
1122
- </p>
1123
- <p>
1124
- As a shortcut for <tt>this.property</tt>, you can use <tt>@property</tt>.
1125
- </p>
1126
- <p>
1127
- You can use <tt>in</tt> to test for array presence, and <tt>of</tt> to
1128
- test for JavaScript object-key presence.
1129
- </p>
1130
-
1131
- <p>
1132
- All together now:
1133
- </p>
1134
-
1135
- <table class="definitions">
1136
- <tr><th>CoffeeScript</th><th>JavaScript</th></tr>
1137
- <tr><td><tt>is</tt></td><td><tt>===</tt></td></tr>
1138
- <tr><td><tt>isnt</tt></td><td><tt>!==</tt></td></tr>
1139
- <tr><td><tt>not</tt></td><td><tt>!</tt></td></tr>
1140
- <tr><td><tt>and</tt></td><td><tt>&amp;&amp;</tt></td></tr>
1141
- <tr><td><tt>or</tt></td><td><tt>||</tt></td></tr>
1142
- <tr><td><tt>true, yes, on</tt></td><td><tt>true</tt></td></tr>
1143
- <tr><td><tt>false, no, off</tt></td><td><tt>false</tt></td></tr>
1144
- <tr><td><tt>@, this</tt></td><td><tt>this</tt></td></tr>
1145
- <tr><td><tt>of</tt></td><td><tt>in</tt></td></tr>
1146
- <tr><td><tt>in</tt></td><td><i><small>no JS equivalent</small></i></td></tr>
1147
- </table>
1148
-
1149
- <div class='code'><pre class="idle">launch() <span class="Keyword">if</span> ignition <span class="Keyword">is</span> <span class="BuiltInConstant">on</span>
1150
-
1151
- volume <span class="Keyword">=</span> <span class="Number">10</span> <span class="Keyword">if</span> band <span class="Keyword">isnt</span> SpinalTap
1152
-
1153
- letTheWildRumpusBegin() <span class="Keyword">unless</span> answer <span class="Keyword">is</span> <span class="BuiltInConstant">no</span>
1154
-
1155
- <span class="Keyword">if</span> car.speed <span class="Keyword">&lt;</span> limit <span class="Keyword">then</span> accelerate()
1156
-
1157
- winner <span class="Keyword">=</span> <span class="BuiltInConstant">yes</span> <span class="Keyword">if</span> pick <span class="Keyword">in</span> [<span class="Number">47</span>, <span class="Number">92</span>, <span class="Number">13</span>]
1158
-
1159
- print inspect <span class="String"><span class="String">&quot;</span>My name is <span class="String">&quot;</span></span> <span class="Keyword">+</span> <span class="Variable">@name</span>
1160
- </pre><pre class="idle"><span class="Storage">var</span> volume, winner;
1161
- <span class="Keyword">if</span> (ignition <span class="Keyword">===</span> <span class="BuiltInConstant">true</span>) {
1162
- launch();
1163
- }
1164
- <span class="Keyword">if</span> (band <span class="Keyword">!</span><span class="Keyword">==</span> SpinalTap) {
1165
- volume <span class="Keyword">=</span> <span class="Number">10</span>;
1166
- }
1167
- <span class="Keyword">if</span> (answer <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">false</span>) {
1168
- letTheWildRumpusBegin();
1169
- }
1170
- <span class="Keyword">if</span> (car.speed <span class="Keyword">&lt;</span> limit) {
1171
- accelerate();
1172
- }
1173
- <span class="Keyword">if</span> (pick <span class="Keyword">===</span> <span class="Number">47</span> <span class="Keyword">||</span> pick <span class="Keyword">===</span> <span class="Number">92</span> <span class="Keyword">||</span> pick <span class="Keyword">===</span> <span class="Number">13</span>) {
1174
- winner <span class="Keyword">=</span> <span class="BuiltInConstant">true</span>;
1175
- }
1176
- <span class="LibraryFunction">print</span>(inspect(<span class="String"><span class="String">&quot;</span>My name is <span class="String">&quot;</span></span> <span class="Keyword">+</span> <span class="Variable">this</span>.<span class="LibraryConstant">name</span>));
1177
- </pre><script>window.example20 = "launch() if ignition is on\n\nvolume = 10 if band isnt SpinalTap\n\nletTheWildRumpusBegin() unless answer is no\n\nif car.speed < limit then accelerate()\n\nwinner = yes if pick in [47, 92, 13]\n\nprint inspect \"My name is \" + @name\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example20);'>load</div><br class='clear' /></div>
1178
-
1179
- <p>
1180
- <b class="header">The Existential Operator</b>
1181
- It's a little difficult to check for the existence of a variable in
1182
- JavaScript. <tt>if (variable) ...</tt> comes close, but fails for zero,
1183
- the empty string, and false. CoffeeScript's existential operator <tt>?</tt> returns true unless
1184
- a variable is <b>null</b> or <b>undefined</b>, which makes it analogous
1185
- to Ruby's <tt>nil?</tt>
1186
- </p>
1187
- <p>
1188
- It can also be used for safer conditional assignment than <tt>||=</tt>
1189
- provides, for cases where you may be handling numbers or strings.
1190
- </p>
1191
- <div class='code'><pre class="idle">solipsism <span class="Keyword">=</span> <span class="BuiltInConstant">true</span> <span class="Keyword">if</span> mind<span class="Keyword">?</span> <span class="Keyword">and</span> <span class="Keyword">not</span> world<span class="Keyword">?</span>
1192
-
1193
- speed <span class="Keyword">?</span><span class="Keyword">=</span> <span class="Number">75</span>
1194
-
1195
- footprints <span class="Keyword">=</span> yeti <span class="Keyword">?</span> <span class="String"><span class="String">&quot;</span>bear<span class="String">&quot;</span></span>
1196
-
1197
-
1198
-
1199
-
1200
-
1201
- </pre><pre class="idle"><span class="Storage">var</span> footprints, solipsism;
1202
- <span class="Keyword">if</span> ((<span class="Keyword">typeof</span> mind <span class="Keyword">!</span><span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> mind <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span>) <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> <span class="Keyword">!</span>(<span class="Keyword">typeof</span> world <span class="Keyword">!</span><span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> world <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span>)) {
1203
- solipsism <span class="Keyword">=</span> <span class="BuiltInConstant">true</span>;
1204
- }
1205
- <span class="Keyword">typeof</span> speed <span class="Keyword">!</span><span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> speed <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span> ? speed : speed <span class="Keyword">=</span> <span class="Number">75</span>;
1206
- footprints <span class="Keyword">=</span> <span class="Keyword">typeof</span> yeti <span class="Keyword">!</span><span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>undefined<span class="String">&quot;</span></span> <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> yeti <span class="Keyword">!</span><span class="Keyword">==</span> <span class="BuiltInConstant">null</span> ? yeti : <span class="String"><span class="String">&quot;</span>bear<span class="String">&quot;</span></span>;
1207
- </pre><script>window.example21 = "solipsism = true if mind? and not world?\n\nspeed ?= 75\n\nfootprints = yeti ? \"bear\"\n\nalert footprints"</script><div class='minibutton load' onclick='javascript: loadConsole(example21);'>load</div><div class='minibutton ok' onclick='javascript: var footprints, solipsism;
1208
- if ((typeof mind != "undefined" && mind !== null) && !(typeof world != "undefined" && world !== null)) {
1209
- solipsism = true;
1210
- }
1211
- typeof speed != "undefined" && speed !== null ? speed : speed = 75;
1212
- footprints = typeof yeti != "undefined" && yeti !== null ? yeti : "bear";;alert(footprints);'>run: footprints</div><br class='clear' /></div>
1213
- <p>
1214
- The accessor variant of the existential operator <tt>?.</tt> can be used to soak
1215
- up null references in a chain of properties. Use it instead
1216
- of the dot accessor <tt>.</tt> in cases where the base value may be <b>null</b>
1217
- or <b>undefined</b>. If all of the properties exist then you'll get the expected
1218
- result, if the chain is broken, <b>undefined</b> is returned instead of
1219
- the <b>TypeError</b> that would be raised otherwise.
1220
- </p>
1221
- <div class='code'><pre class="idle">zip <span class="Keyword">=</span> lottery.drawWinner<span class="Keyword">?</span>().address<span class="Keyword">?</span>.zipcode
1222
- </pre><pre class="idle"><span class="Storage">var</span> zip, _ref;
1223
- zip <span class="Keyword">=</span> <span class="Keyword">typeof</span> lottery.drawWinner <span class="Keyword">===</span> <span class="String"><span class="String">&quot;</span>function<span class="String">&quot;</span></span> ? (_ref <span class="Keyword">=</span> lottery.drawWinner().address) <span class="Keyword">!</span><span class="Keyword">=</span> <span class="BuiltInConstant">null</span> ? _ref.zipcode : <span class="Storage">void</span> <span class="Number">0</span> : <span class="Storage">void</span> <span class="Number">0</span>;
1224
- </pre><script>window.example22 = "zip = lottery.drawWinner?().address?.zipcode\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example22);'>load</div><br class='clear' /></div>
1225
- <p>
1226
- Soaking up nulls is similar to Ruby's
1227
- <a href="http://andand.rubyforge.org/">andand gem</a>, and to the
1228
- <a href="http://groovy.codehaus.org/Operators#Operators-SafeNavigationOperator%28%3F.%29">safe navigation operator</a>
1229
- in Groovy.
1230
- </p>
1231
-
1232
- <p>
1233
- <span id="classes" class="bookmark"></span>
1234
- <b class="header">Classes, Inheritance, and Super</b>
1235
- JavaScript's prototypal inheritance has always been a bit of a
1236
- brain-bender, with a whole family tree of libraries that provide a cleaner
1237
- syntax for classical inheritance on top of JavaScript's prototypes:
1238
- <a href="http://code.google.com/p/base2/">Base2</a>,
1239
- <a href="http://prototypejs.org/">Prototype.js</a>,
1240
- <a href="http://jsclass.jcoglan.com/">JS.Class</a>, etc.
1241
- The libraries provide syntactic sugar, but the built-in inheritance would
1242
- be completely usable if it weren't for a couple of small exceptions:
1243
- it's awkward to call <b>super</b> (the prototype object's
1244
- implementation of the current function), and it's awkward to correctly
1245
- set the prototype chain.
1246
- </p>
1247
- <p>
1248
- Instead of repetitively attaching functions to a prototype, CoffeeScript
1249
- provides a basic <tt>class</tt> structure that allows you to name your class,
1250
- set the superclass, assign prototypal properties, and define the constructor,
1251
- in a single assignable expression.
1252
- </p>
1253
- <p>
1254
- Constructor functions are named, to better support reflection. In the
1255
- example below for the first class, <tt>this.constructor.name is "Animal"</tt>.
1256
- </p>
1257
- <div class='code'><pre class="idle"><span class="Storage">class</span> <span class="TypeName">Animal</span>
1258
- <span class="FunctionName">constructor</span><span class="Keyword">:</span> <span class="FunctionArgument">(@name)</span> <span class="Storage">-&gt;</span>
1259
-
1260
- <span class="FunctionName">move</span><span class="Keyword">:</span> <span class="FunctionArgument">(meters)</span> <span class="Storage">-&gt;</span>
1261
- alert <span class="Variable">@name</span> <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span> moved <span class="String">&quot;</span></span> <span class="Keyword">+</span> meters <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span>m.<span class="String">&quot;</span></span>
1262
-
1263
- <span class="Storage">class</span> <span class="TypeName">Snake</span><span class="InheritedClass"> <span class="Keyword">extends</span> Animal</span>
1264
- <span class="FunctionName">move</span><span class="Keyword">:</span> <span class="Keyword">-</span><span class="Keyword">&gt;</span>
1265
- alert <span class="String"><span class="String">&quot;</span>Slithering...<span class="String">&quot;</span></span>
1266
- <span class="Variable">super</span> <span class="Number">5</span>
1267
-
1268
- <span class="Storage">class</span> <span class="TypeName">Horse</span><span class="InheritedClass"> <span class="Keyword">extends</span> Animal</span>
1269
- <span class="FunctionName">move</span><span class="Keyword">:</span> <span class="Keyword">-</span><span class="Keyword">&gt;</span>
1270
- alert <span class="String"><span class="String">&quot;</span>Galloping...<span class="String">&quot;</span></span>
1271
- <span class="Variable">super</span> <span class="Number">45</span>
1272
-
1273
- sam <span class="Keyword">=</span> <span class="Keyword">new</span> <span class="TypeName">Snake</span> <span class="String"><span class="String">&quot;</span>Sammy the Python<span class="String">&quot;</span></span>
1274
- tom <span class="Keyword">=</span> <span class="Keyword">new</span> <span class="TypeName">Horse</span> <span class="String"><span class="String">&quot;</span>Tommy the Palomino<span class="String">&quot;</span></span>
1275
-
1276
- sam.move()
1277
- tom.move()
1278
-
1279
-
1280
-
1281
-
1282
- </pre><pre class="idle"><span class="Storage">var</span> Animal, Horse, Snake, sam, tom;
1283
- <span class="Storage">var</span> __hasProp <span class="Keyword">=</span> <span class="LibraryClassType">Object</span>.<span class="LibraryConstant">prototype</span>.hasOwnProperty, <span class="FunctionName">__extends</span> = <span class="Storage">function</span>(<span class="FunctionArgument">child, parent</span>) {
1284
- <span class="Keyword">for</span> (<span class="Storage">var</span> key <span class="Keyword">in</span> parent) { <span class="Keyword">if</span> (__hasProp.<span class="LibraryFunction">call</span>(parent, key)) child[key] <span class="Keyword">=</span> parent[key]; }
1285
- <span class="Storage">function</span> <span class="FunctionName">ctor</span>() { <span class="Variable">this</span>.<span class="LibraryConstant">constructor</span> <span class="Keyword">=</span> child; }
1286
- <span class="LibraryClassType">ctor</span>.<span class="LibraryConstant">prototype</span> = parent.<span class="LibraryConstant">prototype</span>;
1287
- <span class="LibraryClassType">child</span>.<span class="LibraryConstant">prototype</span> = <span class="Keyword">new</span> <span class="TypeName">ctor</span>;
1288
- child.__super__ <span class="Keyword">=</span> parent.<span class="LibraryConstant">prototype</span>;
1289
- <span class="Keyword">return</span> child;
1290
- };
1291
- Animal <span class="Keyword">=</span> (<span class="Storage">function</span>() {
1292
- <span class="Storage">function</span> <span class="FunctionName">Animal</span>(<span class="FunctionArgument">name</span>) {
1293
- <span class="Variable">this</span>.<span class="LibraryConstant">name</span> <span class="Keyword">=</span> name;
1294
- }
1295
- <span class="LibraryClassType">Animal</span>.<span class="LibraryConstant">prototype</span>.<span class="FunctionName">move</span> = <span class="Storage">function</span>(<span class="FunctionArgument">meters</span>) {
1296
- <span class="Keyword">return</span> <span class="LibraryFunction">alert</span>(<span class="Variable">this</span>.<span class="LibraryConstant">name</span> <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span> moved <span class="String">&quot;</span></span> <span class="Keyword">+</span> meters <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span>m.<span class="String">&quot;</span></span>);
1297
- };
1298
- <span class="Keyword">return</span> Animal;
1299
- })();
1300
- Snake <span class="Keyword">=</span> (<span class="Storage">function</span>() {
1301
- <span class="Storage">function</span> <span class="FunctionName">Snake</span>() {
1302
- Snake.__super__.<span class="LibraryConstant">constructor</span>.<span class="LibraryFunction">apply</span>(<span class="Variable">this</span>, arguments);
1303
- }
1304
- __extends(Snake, Animal);
1305
- <span class="LibraryClassType">Snake</span>.<span class="LibraryConstant">prototype</span>.<span class="FunctionName">move</span> = <span class="Storage">function</span>() {
1306
- <span class="LibraryFunction">alert</span>(<span class="String"><span class="String">&quot;</span>Slithering...<span class="String">&quot;</span></span>);
1307
- <span class="Keyword">return</span> Snake.__super__.move.<span class="LibraryFunction">call</span>(<span class="Variable">this</span>, <span class="Number">5</span>);
1308
- };
1309
- <span class="Keyword">return</span> Snake;
1310
- })();
1311
- Horse <span class="Keyword">=</span> (<span class="Storage">function</span>() {
1312
- <span class="Storage">function</span> <span class="FunctionName">Horse</span>() {
1313
- Horse.__super__.<span class="LibraryConstant">constructor</span>.<span class="LibraryFunction">apply</span>(<span class="Variable">this</span>, arguments);
1314
- }
1315
- __extends(Horse, Animal);
1316
- <span class="LibraryClassType">Horse</span>.<span class="LibraryConstant">prototype</span>.<span class="FunctionName">move</span> = <span class="Storage">function</span>() {
1317
- <span class="LibraryFunction">alert</span>(<span class="String"><span class="String">&quot;</span>Galloping...<span class="String">&quot;</span></span>);
1318
- <span class="Keyword">return</span> Horse.__super__.move.<span class="LibraryFunction">call</span>(<span class="Variable">this</span>, <span class="Number">45</span>);
1319
- };
1320
- <span class="Keyword">return</span> Horse;
1321
- })();
1322
- sam <span class="Keyword">=</span> <span class="Keyword">new</span> <span class="TypeName">Snake</span>(<span class="String"><span class="String">&quot;</span>Sammy the Python<span class="String">&quot;</span></span>);
1323
- tom <span class="Keyword">=</span> <span class="Keyword">new</span> <span class="TypeName">Horse</span>(<span class="String"><span class="String">&quot;</span>Tommy the Palomino<span class="String">&quot;</span></span>);
1324
- sam.move();
1325
- tom.move();
1326
- </pre><script>window.example23 = "class Animal\n constructor: (@name) ->\n\n move: (meters) ->\n alert @name + \" moved \" + meters + \"m.\"\n\nclass Snake extends Animal\n move: ->\n alert \"Slithering...\"\n super 5\n\nclass Horse extends Animal\n move: ->\n alert \"Galloping...\"\n super 45\n\nsam = new Snake \"Sammy the Python\"\ntom = new Horse \"Tommy the Palomino\"\n\nsam.move()\ntom.move()\n\n\n\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example23);'>load</div><div class='minibutton ok' onclick='javascript: var Animal, Horse, Snake, sam, tom;
1327
- var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
1328
- for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
1329
- function ctor() { this.constructor = child; }
1330
- ctor.prototype = parent.prototype;
1331
- child.prototype = new ctor;
1332
- child.__super__ = parent.prototype;
1333
- return child;
1334
- };
1335
- Animal = (function() {
1336
- function Animal(name) {
1337
- this.name = name;
1338
- }
1339
- Animal.prototype.move = function(meters) {
1340
- return alert(this.name + " moved " + meters + "m.");
1341
- };
1342
- return Animal;
1343
- })();
1344
- Snake = (function() {
1345
- function Snake() {
1346
- Snake.__super__.constructor.apply(this, arguments);
1347
- }
1348
- __extends(Snake, Animal);
1349
- Snake.prototype.move = function() {
1350
- alert("Slithering...");
1351
- return Snake.__super__.move.call(this, 5);
1352
- };
1353
- return Snake;
1354
- })();
1355
- Horse = (function() {
1356
- function Horse() {
1357
- Horse.__super__.constructor.apply(this, arguments);
1358
- }
1359
- __extends(Horse, Animal);
1360
- Horse.prototype.move = function() {
1361
- alert("Galloping...");
1362
- return Horse.__super__.move.call(this, 45);
1363
- };
1364
- return Horse;
1365
- })();
1366
- sam = new Snake("Sammy the Python");
1367
- tom = new Horse("Tommy the Palomino");
1368
- sam.move();
1369
- tom.move();;'>run</div><br class='clear' /></div>
1370
- <p>
1371
- If structuring your prototypes classically isn't your cup of tea, CoffeeScript
1372
- provides a couple of lower-level conveniences. The <tt>extends</tt> operator
1373
- helps with proper prototype setup, <tt>::</tt> gives you
1374
- quick access to an object's prototype, and <tt>super()</tt>
1375
- is converted into a call against the immediate ancestor's method of the same name.
1376
- </p>
1377
- <div class='code'><pre class="idle"><span class="FunctionName">String::dasherize </span><span class="Keyword">=</span> <span class="Keyword">-</span><span class="Keyword">&gt;</span>
1378
- <span class="Variable">this</span>.replace <span class="String">/_/g</span>, <span class="String"><span class="String">&quot;</span>-<span class="String">&quot;</span></span>
1379
-
1380
- </pre><pre class="idle"><span class="LibraryClassType">String</span>.<span class="LibraryConstant">prototype</span>.<span class="FunctionName">dasherize</span> = <span class="Storage">function</span>() {
1381
- <span class="Keyword">return</span> <span class="Variable">this</span>.<span class="LibraryFunction">replace</span>(<span class="String"><span class="String">/</span>_<span class="String">/</span>g</span>, <span class="String"><span class="String">&quot;</span>-<span class="String">&quot;</span></span>);
1382
- };
1383
- </pre><script>window.example24 = "String::dasherize = ->\n this.replace /_/g, \"-\"\n\nalert \"one_two\".dasherize()"</script><div class='minibutton load' onclick='javascript: loadConsole(example24);'>load</div><div class='minibutton ok' onclick='javascript: String.prototype.dasherize = function() {
1384
- return this.replace(/_/g, "-");
1385
- };;alert("one_two".dasherize());'>run: "one_two".dasherize()</div><br class='clear' /></div>
1386
- <p>
1387
- Finally class definitions are blocks of executable code, which make for interesting
1388
- metaprogramming possibilities. Because in the context of a class definition,
1389
- <tt>this</tt> is the class object itself (the constructor function), you
1390
- can assign static properties by using <br /><tt>@property: value</tt>, and call
1391
- functions defined in parent classes: <tt>@attr 'title', type: 'text'</tt>
1392
- </p>
1393
-
1394
- <p>
1395
- <span id="destructuring" class="bookmark"></span>
1396
- <b class="header">Destructuring Assignment</b>
1397
- To make extracting values from complex arrays and objects more convenient,
1398
- CoffeeScript implements ECMAScript Harmony's proposed
1399
- <a href="http://wiki.ecmascript.org/doku.php?id=harmony:destructuring">destructuring assignment</a>
1400
- syntax. When you assign an array or object literal to a value, CoffeeScript
1401
- breaks up and matches both sides against each other, assigning the values
1402
- on the right to the variables on the left. In the simplest case, it can be
1403
- used for parallel assignment:
1404
- </p>
1405
- <div class='code'><pre class="idle">theBait <span class="Keyword">=</span> <span class="Number">1000</span>
1406
- theSwitch <span class="Keyword">=</span> <span class="Number">0</span>
1407
-
1408
- <span class="Keyword">[</span>theBait, theSwitch<span class="Keyword">] =</span> [theSwitch, theBait]
1409
-
1410
-
1411
- </pre><pre class="idle"><span class="Storage">var</span> theBait, theSwitch, _ref;
1412
- theBait <span class="Keyword">=</span> <span class="Number">1000</span>;
1413
- theSwitch <span class="Keyword">=</span> <span class="Number">0</span>;
1414
- _ref <span class="Keyword">=</span> [theSwitch, theBait], theBait <span class="Keyword">=</span> _ref[<span class="Number">0</span>], theSwitch <span class="Keyword">=</span> _ref[<span class="Number">1</span>];
1415
- </pre><script>window.example25 = "theBait = 1000\ntheSwitch = 0\n\n[theBait, theSwitch] = [theSwitch, theBait]\n\nalert theBait"</script><div class='minibutton load' onclick='javascript: loadConsole(example25);'>load</div><div class='minibutton ok' onclick='javascript: var theBait, theSwitch, _ref;
1416
- theBait = 1000;
1417
- theSwitch = 0;
1418
- _ref = [theSwitch, theBait], theBait = _ref[0], theSwitch = _ref[1];;alert(theBait);'>run: theBait</div><br class='clear' /></div>
1419
- <p>
1420
- But it's also helpful for dealing with functions that return multiple
1421
- values.
1422
- </p>
1423
- <div class='code'><pre class="idle"><span class="FunctionName">weatherReport </span><span class="Keyword">=</span> <span class="FunctionArgument">(location)</span> <span class="Storage">-&gt;</span>
1424
- <span class="Comment"><span class="Comment">#</span> Make an Ajax request to fetch the weather...</span>
1425
- [location, <span class="Number">72</span>, <span class="String"><span class="String">&quot;</span>Mostly Sunny<span class="String">&quot;</span></span>]
1426
-
1427
- <span class="Keyword">[</span>city, temp, forecast<span class="Keyword">] =</span> weatherReport <span class="String"><span class="String">&quot;</span>Berkeley, CA<span class="String">&quot;</span></span>
1428
-
1429
-
1430
- </pre><pre class="idle"><span class="Storage">var</span> city, forecast, temp, weatherReport, _ref;
1431
- <span class="FunctionName">weatherReport</span> = <span class="Storage">function</span>(<span class="FunctionArgument">location</span>) {
1432
- <span class="Keyword">return</span> [location, <span class="Number">72</span>, <span class="String"><span class="String">&quot;</span>Mostly Sunny<span class="String">&quot;</span></span>];
1433
- };
1434
- _ref <span class="Keyword">=</span> weatherReport(<span class="String"><span class="String">&quot;</span>Berkeley, CA<span class="String">&quot;</span></span>), city <span class="Keyword">=</span> _ref[<span class="Number">0</span>], temp <span class="Keyword">=</span> _ref[<span class="Number">1</span>], forecast <span class="Keyword">=</span> _ref[<span class="Number">2</span>];
1435
- </pre><script>window.example26 = "weatherReport = (location) ->\n # Make an Ajax request to fetch the weather...\n [location, 72, \"Mostly Sunny\"]\n\n[city, temp, forecast] = weatherReport \"Berkeley, CA\"\n\nalert forecast"</script><div class='minibutton load' onclick='javascript: loadConsole(example26);'>load</div><div class='minibutton ok' onclick='javascript: var city, forecast, temp, weatherReport, _ref;
1436
- weatherReport = function(location) {
1437
- return [location, 72, "Mostly Sunny"];
1438
- };
1439
- _ref = weatherReport("Berkeley, CA"), city = _ref[0], temp = _ref[1], forecast = _ref[2];;alert(forecast);'>run: forecast</div><br class='clear' /></div>
1440
- <p>
1441
- Destructuring assignment can be used with any depth of array and object nesting,
1442
- to help pull out deeply nested properties.
1443
- </p>
1444
- <div class='code'><pre class="idle">futurists <span class="Keyword">=</span>
1445
- sculptor: <span class="String"><span class="String">&quot;</span>Umberto Boccioni<span class="String">&quot;</span></span>
1446
- painter: <span class="String"><span class="String">&quot;</span>Vladimir Burliuk<span class="String">&quot;</span></span>
1447
- poet:
1448
- name: <span class="String"><span class="String">&quot;</span>F.T. Marinetti<span class="String">&quot;</span></span>
1449
- address: [
1450
- <span class="String"><span class="String">&quot;</span>Via Roma 42R<span class="String">&quot;</span></span>
1451
- <span class="String"><span class="String">&quot;</span>Bellagio, Italy 22021<span class="String">&quot;</span></span>
1452
- ]
1453
-
1454
- <span class="Keyword">{</span>poet: {name, address: [street, city]}<span class="Keyword">} =</span> futurists
1455
-
1456
-
1457
- </pre><pre class="idle"><span class="Storage">var</span> city, futurists, name, street, _ref, _ref2;
1458
- futurists <span class="Keyword">=</span> {
1459
- sculptor: <span class="String"><span class="String">&quot;</span>Umberto Boccioni<span class="String">&quot;</span></span>,
1460
- painter: <span class="String"><span class="String">&quot;</span>Vladimir Burliuk<span class="String">&quot;</span></span>,
1461
- poet: {
1462
- name: <span class="String"><span class="String">&quot;</span>F.T. Marinetti<span class="String">&quot;</span></span>,
1463
- address: [<span class="String"><span class="String">&quot;</span>Via Roma 42R<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Bellagio, Italy 22021<span class="String">&quot;</span></span>]
1464
- }
1465
- };
1466
- _ref <span class="Keyword">=</span> futurists.poet, name <span class="Keyword">=</span> _ref.<span class="LibraryConstant">name</span>, _ref2 <span class="Keyword">=</span> _ref.address, street <span class="Keyword">=</span> _ref2[<span class="Number">0</span>], city <span class="Keyword">=</span> _ref2[<span class="Number">1</span>];
1467
- </pre><script>window.example27 = "futurists =\n sculptor: \"Umberto Boccioni\"\n painter: \"Vladimir Burliuk\"\n poet:\n name: \"F.T. Marinetti\"\n address: [\n \"Via Roma 42R\"\n \"Bellagio, Italy 22021\"\n ]\n\n{poet: {name, address: [street, city]}} = futurists\n\nalert name + \" — \" + street"</script><div class='minibutton load' onclick='javascript: loadConsole(example27);'>load</div><div class='minibutton ok' onclick='javascript: var city, futurists, name, street, _ref, _ref2;
1468
- futurists = {
1469
- sculptor: "Umberto Boccioni",
1470
- painter: "Vladimir Burliuk",
1471
- poet: {
1472
- name: "F.T. Marinetti",
1473
- address: ["Via Roma 42R", "Bellagio, Italy 22021"]
1474
- }
1475
- };
1476
- _ref = futurists.poet, name = _ref.name, _ref2 = _ref.address, street = _ref2[0], city = _ref2[1];;alert(name + " — " + street);'>run: name + " — " + street</div><br class='clear' /></div>
1477
- <p>
1478
- Destructuring assignment can even be combined with splats.
1479
- </p>
1480
- <div class='code'><pre class="idle">tag <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>&lt;impossible&gt;<span class="String">&quot;</span></span>
1481
-
1482
- <span class="Keyword">[</span>open, contents..., close<span class="Keyword">] =</span> tag.split(<span class="String"><span class="String">&quot;</span><span class="String">&quot;</span></span>)
1483
-
1484
-
1485
-
1486
-
1487
- </pre><pre class="idle"><span class="Storage">var</span> close, contents, open, tag, _i, _ref;
1488
- <span class="Storage">var</span> __slice <span class="Keyword">=</span> <span class="LibraryClassType">Array</span>.<span class="LibraryConstant">prototype</span>.slice;
1489
- tag <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>&lt;impossible&gt;<span class="String">&quot;</span></span>;
1490
- _ref <span class="Keyword">=</span> tag.<span class="LibraryFunction">split</span>(<span class="String"><span class="String">&quot;</span><span class="String">&quot;</span></span>), open <span class="Keyword">=</span> _ref[<span class="Number">0</span>], contents <span class="Keyword">=</span> <span class="Number">3</span> <span class="Keyword">&lt;=</span> _ref.<span class="LibraryConstant">length</span> ? __slice.<span class="LibraryFunction">call</span>(_ref, <span class="Number">1</span>, _i <span class="Keyword">=</span> _ref.<span class="LibraryConstant">length</span> <span class="Keyword">-</span> <span class="Number">1</span>) : (_i <span class="Keyword">=</span> <span class="Number">1</span>, []), close <span class="Keyword">=</span> _ref[_i<span class="Keyword">++</span>];
1491
- </pre><script>window.example28 = "tag = \"<impossible>\"\n\n[open, contents..., close] = tag.split(\"\")\n\nalert contents.join(\"\")"</script><div class='minibutton load' onclick='javascript: loadConsole(example28);'>load</div><div class='minibutton ok' onclick='javascript: var close, contents, open, tag, _i, _ref;
1492
- var __slice = Array.prototype.slice;
1493
- tag = "<impossible>";
1494
- _ref = tag.split(""), open = _ref[0], contents = 3 <= _ref.length ? __slice.call(_ref, 1, _i = _ref.length - 1) : (_i = 1, []), close = _ref[_i++];;alert(contents.join(""));'>run: contents.join("")</div><br class='clear' /></div>
1495
-
1496
- <p>
1497
- <span id="fat_arrow" class="bookmark"></span>
1498
- <b class="header">Function binding</b>
1499
- In JavaScript, the <tt>this</tt> keyword is dynamically scoped to mean the
1500
- object that the current function is attached to. If you pass a function as
1501
- as callback, or attach it to a different object, the original value of <tt>this</tt>
1502
- will be lost. If you're not familiar with this behavior,
1503
- <a href="http://www.digital-web.com/articles/scope_in_javascript/">this Digital Web article</a>
1504
- gives a good overview of the quirks.
1505
- </p>
1506
- <p>
1507
- The fat arrow <tt>=&gt;</tt> can be used to both define a function, and to bind
1508
- it to the current value of <tt>this</tt>, right on the spot. This is helpful
1509
- when using callback-based libraries like Prototype or jQuery, for creating
1510
- iterator functions to pass to <tt>each</tt>, or event-handler functions
1511
- to use with <tt>bind</tt>. Functions created with the fat arrow are able to access
1512
- properties of the <tt>this</tt> where they're defined.
1513
- </p>
1514
- <div class='code'><pre class="idle"><span class="FunctionName">Account </span><span class="Keyword">=</span> <span class="FunctionArgument">(customer, cart)</span> <span class="Storage">-&gt;</span>
1515
- <span class="Variable">@customer</span> <span class="Keyword">=</span> customer
1516
- <span class="Variable">@cart</span> <span class="Keyword">=</span> cart
1517
-
1518
- $(<span class="String"><span class="String">'</span>.shopping_cart<span class="String">'</span></span>).bind <span class="String"><span class="String">'</span>click<span class="String">'</span></span>, <span class="FunctionArgument">(event)</span> <span class="Storage">=&gt;</span>
1519
- <span class="Variable">@customer</span>.purchase <span class="Variable">@cart</span>
1520
- </pre><pre class="idle"><span class="Storage">var</span> Account;
1521
- <span class="Storage">var</span> <span class="FunctionName">__bind</span> = <span class="Storage">function</span>(<span class="FunctionArgument">fn, me</span>){ <span class="Keyword">return</span> <span class="Storage">function</span>(){ <span class="Keyword">return</span> fn.<span class="LibraryFunction">apply</span>(me, arguments); }; };
1522
- <span class="FunctionName">Account</span> = <span class="Storage">function</span>(<span class="FunctionArgument">customer, cart</span>) {
1523
- <span class="Variable">this</span>.customer <span class="Keyword">=</span> customer;
1524
- <span class="Variable">this</span>.cart <span class="Keyword">=</span> cart;
1525
- <span class="Keyword">return</span> <span class="Keyword">$</span>(<span class="String"><span class="String">'</span>.shopping_cart<span class="String">'</span></span>).bind(<span class="String"><span class="String">'</span>click<span class="String">'</span></span>, __bind(<span class="Storage">function</span>(<span class="LibraryClassType">event</span>) {
1526
- <span class="Keyword">return</span> <span class="Variable">this</span>.customer.purchase(<span class="Variable">this</span>.cart);
1527
- }, <span class="Variable">this</span>));
1528
- };
1529
- </pre><script>window.example29 = "Account = (customer, cart) ->\n @customer = customer\n @cart = cart\n\n $('.shopping_cart').bind 'click', (event) =>\n @customer.purchase @cart"</script><div class='minibutton load' onclick='javascript: loadConsole(example29);'>load</div><br class='clear' /></div>
1530
- <p>
1531
- If we had used <tt>-></tt> in the callback above, <tt>@customer</tt> would
1532
- have referred to the undefined "customer" property of the DOM element,
1533
- and trying to call <tt>purchase()</tt> on it would have raised an exception.
1534
- </p>
1535
-
1536
- <p>
1537
- <span id="embedded" class="bookmark"></span>
1538
- <b class="header">Embedded JavaScript</b>
1539
- Hopefully, you'll never need to use it, but if you ever need to intersperse
1540
- snippets of JavaScript within your CoffeeScript, you can
1541
- use backticks to pass it straight through.
1542
- </p>
1543
- <div class='code'><pre class="idle">hi <span class="Keyword">=</span> <span class="String"><span class="String">`</span>function() {</span>
1544
- <span class="String"> return [document.title, &quot;Hello JavaScript&quot;].join(&quot;: &quot;);</span>
1545
- <span class="String">}<span class="String">`</span></span>
1546
-
1547
-
1548
- </pre><pre class="idle"><span class="Storage">var</span> hi;
1549
- <span class="FunctionName">hi</span> = <span class="Storage">function</span>() {
1550
- <span class="Keyword">return</span> [<span class="LibraryClassType">document</span>.<span class="LibraryConstant">title</span>, <span class="String"><span class="String">&quot;</span>Hello JavaScript<span class="String">&quot;</span></span>].<span class="LibraryFunction">join</span>(<span class="String"><span class="String">&quot;</span>: <span class="String">&quot;</span></span>);
1551
- };
1552
- </pre><script>window.example30 = "hi = `function() {\n return [document.title, \"Hello JavaScript\"].join(\": \");\n}`\n\nalert hi()"</script><div class='minibutton load' onclick='javascript: loadConsole(example30);'>load</div><div class='minibutton ok' onclick='javascript: var hi;
1553
- hi = function() {
1554
- return [document.title, "Hello JavaScript"].join(": ");
1555
- };;alert(hi());'>run: hi()</div><br class='clear' /></div>
1556
-
1557
- <p>
1558
- <span id="switch" class="bookmark"></span>
1559
- <b class="header">Switch/When/Else</b>
1560
- <b>Switch</b> statements in JavaScript are a bit awkward. You need to
1561
- remember to <b>break</b> at the end of every <b>case</b> statement to
1562
- avoid accidentally falling through to the default case.
1563
- CoffeeScript prevents accidental fall-through, and can convert the <tt>switch</tt>
1564
- into a returnable, assignable expression. The format is: <tt>switch</tt> condition,
1565
- <tt>when</tt> clauses, <tt>else</tt> the default case.
1566
- </p>
1567
- <p>
1568
- As in Ruby, <b>switch</b> statements in CoffeeScript can take multiple
1569
- values for each <b>when</b> clause. If any of the values match, the clause
1570
- runs.
1571
- </p>
1572
- <div class='code'><pre class="idle"><span class="Keyword">switch</span> day
1573
- <span class="Keyword">when</span> <span class="String"><span class="String">&quot;</span>Mon<span class="String">&quot;</span></span> <span class="Keyword">then</span> go work
1574
- <span class="Keyword">when</span> <span class="String"><span class="String">&quot;</span>Tue<span class="String">&quot;</span></span> <span class="Keyword">then</span> go relax
1575
- <span class="Keyword">when</span> <span class="String"><span class="String">&quot;</span>Thu<span class="String">&quot;</span></span> <span class="Keyword">then</span> go iceFishing
1576
- <span class="Keyword">when</span> <span class="String"><span class="String">&quot;</span>Fri<span class="String">&quot;</span></span>, <span class="String"><span class="String">&quot;</span>Sat<span class="String">&quot;</span></span>
1577
- <span class="Keyword">if</span> day <span class="Keyword">is</span> bingoDay
1578
- go bingo
1579
- go dancing
1580
- <span class="Keyword">when</span> <span class="String"><span class="String">&quot;</span>Sun<span class="String">&quot;</span></span> <span class="Keyword">then</span> go church
1581
- <span class="Keyword">else</span> go work
1582
- </pre><pre class="idle"><span class="Keyword">switch</span> (day) {
1583
- <span class="Keyword">case</span> <span class="String"><span class="String">&quot;</span>Mon<span class="String">&quot;</span></span>:
1584
- <span class="LibraryFunction">go</span>(work);
1585
- <span class="Keyword">break</span>;
1586
- <span class="Keyword">case</span> <span class="String"><span class="String">&quot;</span>Tue<span class="String">&quot;</span></span>:
1587
- <span class="LibraryFunction">go</span>(relax);
1588
- <span class="Keyword">break</span>;
1589
- <span class="Keyword">case</span> <span class="String"><span class="String">&quot;</span>Thu<span class="String">&quot;</span></span>:
1590
- <span class="LibraryFunction">go</span>(iceFishing);
1591
- <span class="Keyword">break</span>;
1592
- <span class="Keyword">case</span> <span class="String"><span class="String">&quot;</span>Fri<span class="String">&quot;</span></span>:
1593
- <span class="Keyword">case</span> <span class="String"><span class="String">&quot;</span>Sat<span class="String">&quot;</span></span>:
1594
- <span class="Keyword">if</span> (day <span class="Keyword">===</span> bingoDay) {
1595
- <span class="LibraryFunction">go</span>(bingo);
1596
- <span class="LibraryFunction">go</span>(dancing);
1597
- }
1598
- <span class="Keyword">break</span>;
1599
- <span class="Keyword">case</span> <span class="String"><span class="String">&quot;</span>Sun<span class="String">&quot;</span></span>:
1600
- <span class="LibraryFunction">go</span>(church);
1601
- <span class="Keyword">break</span>;
1602
- <span class="Keyword">default</span>:
1603
- <span class="LibraryFunction">go</span>(work);
1604
- }
1605
- </pre><script>window.example31 = "switch day\n when \"Mon\" then go work\n when \"Tue\" then go relax\n when \"Thu\" then go iceFishing\n when \"Fri\", \"Sat\"\n if day is bingoDay\n go bingo\n go dancing\n when \"Sun\" then go church\n else go work"</script><div class='minibutton load' onclick='javascript: loadConsole(example31);'>load</div><br class='clear' /></div>
1606
-
1607
- <p>
1608
- <span id="try" class="bookmark"></span>
1609
- <b class="header">Try/Catch/Finally</b>
1610
- Try/catch statements are just about the same as JavaScript (although
1611
- they work as expressions).
1612
- </p>
1613
- <div class='code'><pre class="idle"><span class="Keyword">try</span>
1614
- allHellBreaksLoose()
1615
- catsAndDogsLivingTogether()
1616
- <span class="Keyword">catch</span> error
1617
- print error
1618
- <span class="Keyword">finally</span>
1619
- cleanUp()
1620
-
1621
- </pre><pre class="idle"><span class="Keyword">try</span> {
1622
- allHellBreaksLoose();
1623
- catsAndDogsLivingTogether();
1624
- } <span class="Keyword">catch</span> (error) {
1625
- <span class="LibraryFunction">print</span>(error);
1626
- } <span class="Keyword">finally</span> {
1627
- cleanUp();
1628
- }
1629
- </pre><script>window.example32 = "try\n allHellBreaksLoose()\n catsAndDogsLivingTogether()\ncatch error\n print error\nfinally\n cleanUp()\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example32);'>load</div><br class='clear' /></div>
1630
-
1631
- <p>
1632
- <span id="comparisons" class="bookmark"></span>
1633
- <b class="header">Chained Comparisons</b>
1634
- CoffeeScript borrows
1635
- <a href="http://docs.python.org/reference/expressions.html#notin">chained comparisons</a>
1636
- from Python &mdash; making it easy to test if a value falls within a
1637
- certain range.
1638
- </p>
1639
- <div class='code'><pre class="idle">cholesterol <span class="Keyword">=</span> <span class="Number">127</span>
1640
-
1641
- healthy <span class="Keyword">=</span> <span class="Number">200</span> <span class="Keyword">&gt;</span> cholesterol <span class="Keyword">&gt;</span> <span class="Number">60</span>
1642
-
1643
-
1644
- </pre><pre class="idle"><span class="Storage">var</span> cholesterol, healthy;
1645
- cholesterol <span class="Keyword">=</span> <span class="Number">127</span>;
1646
- healthy <span class="Keyword">=</span> (<span class="Number">200</span> <span class="Keyword">&gt;</span> cholesterol <span class="Keyword">&amp;</span><span class="Keyword">&amp;</span> cholesterol <span class="Keyword">&gt;</span> <span class="Number">60</span>);
1647
- </pre><script>window.example33 = "cholesterol = 127\n\nhealthy = 200 > cholesterol > 60\n\nalert healthy"</script><div class='minibutton load' onclick='javascript: loadConsole(example33);'>load</div><div class='minibutton ok' onclick='javascript: var cholesterol, healthy;
1648
- cholesterol = 127;
1649
- healthy = (200 > cholesterol && cholesterol > 60);;alert(healthy);'>run: healthy</div><br class='clear' /></div>
1650
-
1651
- <p>
1652
- <span id="strings" class="bookmark"></span>
1653
- <b class="header">String Interpolation, Heredocs, and Block Comments</b>
1654
- Ruby-style string interpolation is included in CoffeeScript. Double-quoted
1655
- strings allow for interpolated values, using <tt>#{ ... }</tt>,
1656
- and single-quoted strings are literal.
1657
- </p>
1658
- <div class='code'><pre class="idle">author <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>Wittgenstein<span class="String">&quot;</span></span>
1659
- quote <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>A picture is a fact. -- <span class="String"><span class="String">#{</span> author <span class="String">}</span></span><span class="String">&quot;</span></span>
1660
-
1661
- sentence <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span><span class="String"><span class="String">#{</span> <span class="Number">22</span> <span class="Keyword">/</span> <span class="Number">7</span> <span class="String">}</span></span> is a decent approximation of π<span class="String">&quot;</span></span>
1662
-
1663
-
1664
- </pre><pre class="idle"><span class="Storage">var</span> author, quote, sentence;
1665
- author <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>Wittgenstein<span class="String">&quot;</span></span>;
1666
- quote <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>A picture is a fact. -- <span class="String">&quot;</span></span> <span class="Keyword">+</span> author;
1667
- sentence <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span><span class="String">&quot;</span></span> <span class="Keyword">+</span> (<span class="Number">22</span> / <span class="Number">7</span>) <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span> is a decent approximation of π<span class="String">&quot;</span></span>;
1668
- </pre><script>window.example34 = "author = \"Wittgenstein\"\nquote = \"A picture is a fact. -- #{ author }\"\n\nsentence = \"#{ 22 / 7 } is a decent approximation of π\"\n\nalert sentence"</script><div class='minibutton load' onclick='javascript: loadConsole(example34);'>load</div><div class='minibutton ok' onclick='javascript: var author, quote, sentence;
1669
- author = "Wittgenstein";
1670
- quote = "A picture is a fact. -- " + author;
1671
- sentence = "" + (22 / 7) + " is a decent approximation of π";;alert(sentence);'>run: sentence</div><br class='clear' /></div>
1672
- <p>
1673
- Multiline strings are allowed in CoffeeScript.
1674
- </p>
1675
- <div class='code'><pre class="idle">mobyDick <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>Call me Ishmael. Some years ago --</span>
1676
- <span class="String"> never mind how long precisely -- having little</span>
1677
- <span class="String"> or no money in my purse, and nothing particular</span>
1678
- <span class="String"> to interest me on shore, I thought I would sail</span>
1679
- <span class="String"> about a little and see the watery part of the</span>
1680
- <span class="String"> world...<span class="String">&quot;</span></span>
1681
-
1682
-
1683
- </pre><pre class="idle"><span class="Storage">var</span> mobyDick;
1684
- mobyDick <span class="Keyword">=</span> <span class="String"><span class="String">&quot;</span>Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world...<span class="String">&quot;</span></span>;
1685
- </pre><script>window.example35 = "mobyDick = \"Call me Ishmael. Some years ago --\n never mind how long precisely -- having little\n or no money in my purse, and nothing particular\n to interest me on shore, I thought I would sail\n about a little and see the watery part of the\n world...\"\n\nalert mobyDick"</script><div class='minibutton load' onclick='javascript: loadConsole(example35);'>load</div><div class='minibutton ok' onclick='javascript: var mobyDick;
1686
- mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world...";;alert(mobyDick);'>run: mobyDick</div><br class='clear' /></div>
1687
- <p>
1688
- Heredocs can be used to hold formatted or indentation-sensitive text
1689
- (or, if you just don't feel like escaping quotes and apostrophes). The
1690
- indentation level that begins the heredoc is maintained throughout, so
1691
- you can keep it all aligned with the body of your code.
1692
- </p>
1693
- <div class='code'><pre class="idle">html <span class="Keyword">=</span> <span class="String"><span class="String">'''</span></span>
1694
- <span class="String"> &lt;strong&gt;</span>
1695
- <span class="String"> cup of coffeescript</span>
1696
- <span class="String"> &lt;/strong&gt;</span>
1697
- <span class="String"> <span class="String">'''</span></span>
1698
-
1699
-
1700
- </pre><pre class="idle"><span class="Storage">var</span> html;
1701
- html <span class="Keyword">=</span> <span class="String"><span class="String">'</span>&lt;strong&gt;<span class="UserDefinedConstant">\n</span> cup of coffeescript<span class="UserDefinedConstant">\n</span>&lt;/strong&gt;<span class="String">'</span></span>;
1702
- </pre><script>window.example36 = "html = '''\n <strong>\n cup of coffeescript\n </strong>\n '''\n\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example36);'>load</div><br class='clear' /></div>
1703
- <p>
1704
- Double-quoted heredocs, like double-quoted strings, allow interpolation.
1705
- </p>
1706
- <p>
1707
- Sometimes you'd like to pass a block comment through to the generated
1708
- JavaScript. For example, when you need to embed a licensing header at
1709
- the top of a file. Block comments, which mirror the synax for heredocs,
1710
- are preserved in the generated code.
1711
- </p>
1712
- <div class='code'><pre class="idle"><span class="Comment"><span class="Comment">###</span></span>
1713
- <span class="Comment">CoffeeScript Compiler v1.0.0</span>
1714
- <span class="Comment">Released under the MIT License</span>
1715
- <span class="Comment"><span class="Comment">###</span></span>
1716
-
1717
-
1718
- </pre><pre class="idle"><span class="Comment"><span class="Comment">/*</span></span>
1719
- <span class="Comment">CoffeeScript Compiler v1.0.0</span>
1720
- <span class="Comment">Released under the MIT License</span>
1721
- <span class="Comment"><span class="Comment">*/</span></span>
1722
- </pre><script>window.example37 = "###\nCoffeeScript Compiler v1.0.0\nReleased under the MIT License\n###\n\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example37);'>load</div><br class='clear' /></div>
1723
-
1724
- <p>
1725
- <span id="regexes" class="bookmark"></span>
1726
- <b class="header">Extended Regular Expressions</b>
1727
- Similar to "heredocs" and "herecomments", CoffeeScript supports "heregexes" &mdash;
1728
- extended regular expressions that ignore internal whitespace and can contain
1729
- comments, after Perl's <tt>/x</tt> modifier, but delimited by <tt>///</tt>.
1730
- They go a long way towards making complex regular expressions readable.
1731
- To quote from the CoffeeScript source:
1732
- </p>
1733
- <div class='code'><pre class="idle">OPERATOR <span class="Keyword">=</span> <span class="String">/// ^ (</span>
1734
- <span class="String"> ?: [-=]&gt; <span class="Comment"><span class="Comment">#</span> function</span></span>
1735
- <span class="String"> | [-+*/%&lt;&gt;&amp;|^!?=]= <span class="Comment"><span class="Comment">#</span> compound assign / compare</span></span>
1736
- <span class="String"> | &gt;&gt;&gt;=? <span class="Comment"><span class="Comment">#</span> zero-fill right shift</span></span>
1737
- <span class="String"> | ([-+:])\1 <span class="Comment"><span class="Comment">#</span> doubles</span></span>
1738
- <span class="String"> | ([&amp;|&lt;&gt;])\2=? <span class="Comment"><span class="Comment">#</span> logic / shift</span></span>
1739
- <span class="String"> | \?\. <span class="Comment"><span class="Comment">#</span> soak access</span></span>
1740
- <span class="String"> | \.{2,3} <span class="Comment"><span class="Comment">#</span> range or splat</span></span>
1741
- <span class="String">) ///</span>
1742
-
1743
-
1744
- </pre><pre class="idle"><span class="Storage">var</span> OPERATOR;
1745
- OPERATOR <span class="Keyword">=</span><span class="String"> <span class="String">/</span>^(?:[-=]&gt;|[-+*<span class="UserDefinedConstant">\/</span>%&lt;&gt;&amp;|^!?=]=|&gt;&gt;&gt;=?|([-+:])<span class="UserDefinedConstant">\1</span>|([&amp;|&lt;&gt;])<span class="UserDefinedConstant">\2</span>=?|<span class="UserDefinedConstant">\?</span><span class="UserDefinedConstant">\.</span>|<span class="UserDefinedConstant">\.</span>{2,3})<span class="String">/</span></span>;
1746
- </pre><script>window.example38 = "OPERATOR = /// ^ (\n ?: [-=]> # function\n | [-+*/%<>&|^!?=]= # compound assign / compare\n | >>>=? # zero-fill right shift\n | ([-+:])\\1 # doubles\n | ([&|<>])\\2=? # logic / shift\n | \\?\\. # soak access\n | \\.{2,3} # range or splat\n) ///\n\n\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example38);'>load</div><br class='clear' /></div>
1747
-
1748
-
1749
- <h2>
1750
- <span id="cake" class="bookmark"></span>
1751
- Cake, and Cakefiles
1752
- </h2>
1753
-
1754
- <p>
1755
- CoffeeScript includes a simple build system similar to
1756
- <a href="http://www.gnu.org/software/make/">Make</a> and
1757
- <a href="http://rake.rubyforge.org/">Rake</a>. Naturally,
1758
- it's called Cake, and is used for the build and test tasks for the CoffeeScript
1759
- language itself. Tasks are defined in a file named <tt>Cakefile</tt>, and
1760
- can be invoked by running <tt>cake taskname</tt> from within the directory.
1761
- To print a list of all the tasks and options, just run <tt>cake</tt>.
1762
- </p>
1763
-
1764
- <p>
1765
- Task definitions are written in CoffeeScript, so you can put arbitrary code
1766
- in your Cakefile. Define a task with a name, a long description, and the
1767
- function to invoke when the task is run. If your task takes a command-line
1768
- option, you can define the option with short and long flags, and it will
1769
- be made available in the <tt>options</tt> object. Here's a task that uses
1770
- the Node.js API to rebuild CoffeeScript's parser:
1771
- </p>
1772
- <div class='code'><pre class="idle">fs <span class="Keyword">=</span> require <span class="String"><span class="String">'</span>fs<span class="String">'</span></span>
1773
-
1774
- option <span class="String"><span class="String">'</span>-o<span class="String">'</span></span>, <span class="String"><span class="String">'</span>--output [DIR]<span class="String">'</span></span>, <span class="String"><span class="String">'</span>directory for compiled code<span class="String">'</span></span>
1775
-
1776
- task <span class="String"><span class="String">'</span>build:parser<span class="String">'</span></span>, <span class="String"><span class="String">'</span>rebuild the Jison parser<span class="String">'</span></span>, <span class="FunctionArgument">(options)</span> <span class="Storage">-&gt;</span>
1777
- require <span class="String"><span class="String">'</span>jison<span class="String">'</span></span>
1778
- code <span class="Keyword">=</span> require(<span class="String"><span class="String">'</span>./lib/grammar<span class="String">'</span></span>).parser.generate()
1779
- dir <span class="Keyword">=</span> options.output <span class="Keyword">or</span> <span class="String"><span class="String">'</span>lib<span class="String">'</span></span>
1780
- fs.writeFile <span class="String"><span class="String">&quot;</span><span class="String"><span class="String">#{</span>dir<span class="String">}</span></span>/parser.js<span class="String">&quot;</span></span>, code
1781
- </pre><pre class="idle"><span class="Storage">var</span> fs;
1782
- fs <span class="Keyword">=</span> require(<span class="String"><span class="String">'</span>fs<span class="String">'</span></span>);
1783
- option(<span class="String"><span class="String">'</span>-o<span class="String">'</span></span>, <span class="String"><span class="String">'</span>--output [DIR]<span class="String">'</span></span>, <span class="String"><span class="String">'</span>directory for compiled code<span class="String">'</span></span>);
1784
- task(<span class="String"><span class="String">'</span>build:parser<span class="String">'</span></span>, <span class="String"><span class="String">'</span>rebuild the Jison parser<span class="String">'</span></span>, <span class="Storage">function</span>(options) {
1785
- <span class="Storage">var</span> code, dir;
1786
- require(<span class="String"><span class="String">'</span>jison<span class="String">'</span></span>);
1787
- code <span class="Keyword">=</span> require(<span class="String"><span class="String">'</span>./lib/grammar<span class="String">'</span></span>).parser.generate();
1788
- dir <span class="Keyword">=</span> options.output <span class="Keyword">||</span> <span class="String"><span class="String">'</span>lib<span class="String">'</span></span>;
1789
- <span class="Keyword">return</span> fs.writeFile(<span class="String"><span class="String">&quot;</span><span class="String">&quot;</span></span> <span class="Keyword">+</span> dir <span class="Keyword">+</span> <span class="String"><span class="String">&quot;</span>/parser.js<span class="String">&quot;</span></span>, code);
1790
- });
1791
- </pre><script>window.example39 = "fs = require 'fs'\n\noption '-o', '--output [DIR]', 'directory for compiled code'\n\ntask 'build:parser', 'rebuild the Jison parser', (options) ->\n require 'jison'\n code = require('./lib/grammar').parser.generate()\n dir = options.output or 'lib'\n fs.writeFile \"#{dir}/parser.js\", code"</script><div class='minibutton load' onclick='javascript: loadConsole(example39);'>load</div><br class='clear' /></div>
1792
- <p>
1793
- If you need to invoke one task before another &mdash; for example, running
1794
- <tt>build</tt> before <tt>test</tt>, you can use the <tt>invoke</tt> function:
1795
- <tt>invoke 'build'</tt>
1796
- </p>
1797
-
1798
- <h2>
1799
- <span id="scripts" class="bookmark"></span>
1800
- "text/coffeescript" Script Tags
1801
- </h2>
1802
-
1803
- <p>
1804
- While it's not recommended for serious use, CoffeeScripts may be included
1805
- directly within the browser using <tt>&lt;script type="text/coffeescript"&gt;</tt>
1806
- tags. The source includes a compressed and minified version of the compiler
1807
- (<a href="extras/coffee-script.js">Download current version here, 39k when gzipped</a>)
1808
- as <tt>extras/coffee-script.js</tt>. Include this file on a page with
1809
- inline CoffeeScript tags, and it will compile and evaluate them in order.
1810
- </p>
1811
-
1812
- <p>
1813
- In fact, the little bit of glue script that runs "Try CoffeeScript" above,
1814
- as well as jQuery for the menu, is implemented in just this way.
1815
- View source and look at the bottom of the page to see the example.
1816
- Including the script also gives you access to <tt>CoffeeScript.compile()</tt>
1817
- so you can pop open Firebug and try compiling some strings.
1818
- </p>
1819
-
1820
- <p>
1821
- The usual caveats about CoffeeScript apply &mdash; your inline scripts will
1822
- run within a closure wrapper, so if you want to expose global variables or
1823
- functions, attach them to the <tt>window</tt> object.
1824
- </p>
1825
-
1826
- <h2>
1827
- <span id="resources" class="bookmark"></span>
1828
- Examples
1829
- </h2>
1830
-
1831
- <ul>
1832
- <li>
1833
- <b>frank06</b>'s <a href="http://riakjs.org/">riak-js</a>, a Node.js client for
1834
- <a href="http://www.basho.com/Riak.html">Riak</a>, with support for HTTP
1835
- and Protocol Buffers.
1836
- </li>
1837
- <li>
1838
- <b>technoweenie</b>'s <a href="https://github.com/technoweenie/coffee-resque">Coffee-Resque</a>,
1839
- a port of <a href="https://github.com/defunkt/resque">Resque</a> for Node.js.
1840
- </li>
1841
- <li>
1842
- <b>jashkenas</b>' <a href="documentation/docs/underscore.html">Underscore.coffee</a>, a port
1843
- of the <a href="http://documentcloud.github.com/underscore/">Underscore.js</a>
1844
- library of helper functions.
1845
- </li>
1846
- <li>
1847
- <b>stephank</b>'s <a href="https://github.com/stephank/orona">Orona</a>, a remake of
1848
- the Bolo tank game for modern browsers.
1849
- </li>
1850
- <li>
1851
- <b>josh</b>'s <a href="http://josh.github.com/nack/">nack</a>, a Node.js-powered
1852
- <a href="http://rack.rubyforge.org/">Rack</a> server.
1853
- </li>
1854
- <li>
1855
- <b>sstephenson</b>'s <a href="http://sstephenson.github.com/strscan-js/">StringScanner</a>,
1856
- a simple tokenizer and lexical scanner for JavaScript strings.
1857
- </li>
1858
- </ul>
1859
-
1860
- <h2>
1861
- Resources
1862
- </h2>
1863
-
1864
- <ul>
1865
- <li>
1866
- <a href="http://github.com/jashkenas/coffee-script/">Source Code</a><br />
1867
- Use <tt>bin/coffee</tt> to test your changes,<br />
1868
- <tt>bin/cake test</tt> to run the test suite,<br />
1869
- <tt>bin/cake build</tt> to rebuild the CoffeeScript compiler, and <br />
1870
- <tt>bin/cake build:parser</tt> to regenerate the Jison parser if you're
1871
- working on the grammar. <br /><br />
1872
- <tt>git checkout lib &amp;&amp; bin/cake build:full</tt> is a good command to run when you're working
1873
- on the core language. It'll refresh the lib directory
1874
- (in case you broke something), build your altered compiler, use that to
1875
- rebuild itself (a good sanity test) and then run all of the tests. If
1876
- they pass, there's a good chance you've made a successful change.
1877
- </li>
1878
- <li>
1879
- <a href="http://github.com/jashkenas/coffee-script/issues">CoffeeScript Issues</a><br />
1880
- Bugs reports, feature requests, and general discussion all belong here.
1881
- </li>
1882
- <li>
1883
- If you'd like to chat, stop by <tt>#coffeescript</tt> on Freenode in the
1884
- IRC client of your choice, or on
1885
- <a href="http://webchat.freenode.net/">webchat.freenode.net</a>.
1886
- </li>
1887
- <li>
1888
- <b>satyr</b>'s <a href="http://github.com/satyr/coco">Coco</a>
1889
- &mdash; An avant-garde dialect of CoffeeScript that frequently pioneers
1890
- features and optimizations, some of which CoffeeScript later adopts.
1891
- Check out the <a href="https://github.com/satyr/coco/wiki/additions">list of additions</a>
1892
- to the language.
1893
- </li>
1894
- <li>
1895
- <b>yeungda</b>'s <a href="http://github.com/yeungda/jcoffeescript">JCoffeeScript</a>
1896
- &mdash; A Java Library that uses Rhino to compile CoffeeScript, allowing
1897
- compilation within Java projects or on systems that Node.js doesn't support.
1898
- </li>
1899
- <li>
1900
- <b>defunkt</b>'s <a href="http://github.com/defunkt/coffee-mode">CoffeeScript Major Mode</a>
1901
- &mdash; a Emacs major mode that provides syntax highlighting, indentation
1902
- support, and some bonus commands.
1903
- </li>
1904
- <li>
1905
- <b>jashkenas</b>' <a href="http://github.com/jashkenas/coffee-script-tmbundle">CoffeeScript TextMate Bundle</a>
1906
- &mdash; which provides syntax highlighting, snippet expansion, and the
1907
- ability to run bits of CoffeeScript from within TextMate itself.
1908
- </li>
1909
- <li>
1910
- <b>kchmck</b>'s <a href="http://github.com/kchmck/vim-coffee-script">Vim CoffeeScript</a>
1911
- &mdash; which adds Vim syntax highlighting and indentation support.
1912
- </li>
1913
- <li>
1914
- <b>wavded</b>'s <a href="http://github.com/wavded/gedit-coffeescript">gedit-coffeescript</a>
1915
- &mdash; a CoffeeScript syntax highlighter for the gedit text editor.
1916
- </li>
1917
- <li>
1918
- <b>yeungda</b>'s <a href="http://yeungda.github.com/coffeescript-idea/">coffeescript-idea</a>
1919
- &mdash; a plugin for IntelliJ IDEA and RubyMine providing syntax highlighting.
1920
- </li>
1921
- <li>
1922
- <b>mattly</b>'s <a href="http://github.com/mattly/rack-coffee">rack-coffee</a>
1923
- &mdash; a small Rack middleware for serving CoffeeScript files as
1924
- compiled JavaScript on the fly.
1925
- </li>
1926
- <li>
1927
- <b>jnicklas</b>'s <a href="http://github.com/jnicklas/bistro_car">BistroCar</a>
1928
- &mdash; a plugin that serves and bundles CoffeeScript from within your
1929
- Rails application.
1930
- </li>
1931
- <li>
1932
- <b>dsc</b>'s <a href="http://github.com/dsc/coffeecup">CoffeeCup</a>
1933
- &mdash; a Python WSGI middleware that compiles CoffeeScript to JavaScript
1934
- on-demand during development.
1935
- </li>
1936
- <li>
1937
- <b>sutto</b>'s <a href="http://github.com/Sutto/barista">Barista</a>
1938
- &mdash; a BistroCar alternative that integrates well with
1939
- <a href="http://documentcloud.github.com/jammit">Jammit</a> and Rails 3.
1940
- </li>
1941
- <li>
1942
- <b>inem</b> and <b>gerad</b>'s <a href="http://github.com/gerad/coffee-haml-filter">coffee-haml-filter</a>
1943
- &mdash; a custom filter for rendering CoffeeScript inline within
1944
- <a href="http://haml-lang.com/">HAML</a> templates.
1945
- </li>
1946
- <li>
1947
- <b>chrislloyd</b>'s <a href="http://github.com/chrislloyd/roast">Roast</a>
1948
- &mdash; a CoffeeScript compiler plug-in that allows you to include external
1949
- source files.
1950
- </li>
1951
- <li>
1952
- <b>andrzejsliwa</b>'s <a href="http://github.com/andrzejsliwa/coffeeapp">CoffeeApp</a>
1953
- &mdash; a CoffeeScript wrapper for CouchApps, web applications served
1954
- directly from CouchDB.
1955
- </li>
1956
- <li>
1957
- <b>sstephenson</b>'s <a href="http://github.com/sstephenson/eco">Eco</a>
1958
- &mdash; high-performance embedded CoffeeScript templates, after EJS and ERB.
1959
- </li>
1960
- <li>
1961
- <b>mauricemach</b>'s <a href="http://github.com/mauricemach/coffeekup">CoffeeKup</a>
1962
- &mdash; Markup as CoffeeScript. After _why's
1963
- <a href="http://markaby.github.com/">Markaby</a>.
1964
- </li>
1965
- <li>
1966
- <b>jashkenas</b>' <a href="http://jashkenas.github.com/docco/">Docco</a>
1967
- &mdash; a quick-and-dirty literate-programming-style documentation generator
1968
- for CoffeeScript. Used to produce the annotated source.
1969
- </li>
1970
- <li>
1971
- <b>naturalethic</b>'s <a href="http://github.com/naturalethic/coffee-mongo">coffee-mongo</a>
1972
- &mdash; an asynchronous MongoDB ORM, for use with Node.js and CoffeeScript.
1973
- </li>
1974
- <li>
1975
- <b>mauricemach</b>'s <a href="https://github.com/mauricemach/zappa">Zappa</a>
1976
- &mdash; a DSL for building web apps, built on top of Express and Socket.IO.
1977
- </li>
1978
- </ul>
1979
-
1980
- <h2>
1981
- <span id="webchat" class="bookmark"></span>
1982
- Web Chat (IRC)
1983
- </h2>
1984
-
1985
- <p>
1986
- Quick help and advice can usually be found in the CoffeeScript IRC room.
1987
- Join <tt>#coffeescript</tt> on <tt>irc.freenode.net</tt>, or click the
1988
- button below to open a webchat session on this page.
1989
- </p>
1990
-
1991
- <p>
1992
- <button id="open_webchat">click to open #coffeescript</button>
1993
- </p>
1994
-
1995
- <h2>
1996
- <span id="change_log" class="bookmark"></span>
1997
- Change Log
1998
- </h2>
1999
-
2000
- <p>
2001
- <b class="header" style="margin-top: 20px;">1.0.0
2002
- <span class="timestamp"> &ndash; <small>Dec 24, 2010</small></span>
2003
- </b>
2004
- CoffeeScript loops no longer try to preserve block scope when functions
2005
- are being generated within the loop body. Instead, you can use the
2006
- <tt>do</tt> keyword to create a convenient closure wrapper.
2007
- Added a <tt>--nodejs</tt> flag for passing through options directly
2008
- to the <tt>node</tt> executable.
2009
- Better behavior around the use of pure statements within expressions.
2010
- Fixed inclusive slicing through <tt>-1</tt>, for all browsers, and splicing
2011
- with arbitrary expressions as endpoints.
2012
- </p>
2013
-
2014
- <p>
2015
- <b class="header" style="margin-top: 20px;">0.9.6
2016
- <span class="timestamp"> &ndash; <small>Dec 6, 2010</small></span>
2017
- </b>
2018
- The REPL now properly formats stacktraces, and stays alive through
2019
- asynchronous exceptions. Using <tt>--watch</tt> now prints timestamps as
2020
- files are compiled. Fixed some accidentally-leaking variables within
2021
- plucked closure-loops. Constructors now maintain their declaration
2022
- location within a class body. Dynamic object keys were removed.
2023
- Nested classes are now supported. Fixes execution context for naked
2024
- splatted functions. Bugfix for inversion of chained comparisons.
2025
- Chained class instantiation now works properly with splats.
2026
- </p>
2027
-
2028
- <p>
2029
- <b class="header" style="margin-top: 20px;">0.9.5
2030
- <span class="timestamp"> &ndash; <small>Nov 21, 2010</small></span>
2031
- </b>
2032
- 0.9.5 should be considered the first release candidate for CoffeeScript 1.0.
2033
- There have been a large number of internal changes since the previous release,
2034
- many contributed from <b>satyr</b>'s <a href="http://github.com/satyr/coco">Coco</a>
2035
- dialect of CoffeeScript. Heregexes (extended regexes) were added. Functions
2036
- can now have default arguments. Class bodies are now executable code.
2037
- Improved syntax errors for invalid CoffeeScript. <tt>undefined</tt> now
2038
- works like <tt>null</tt>, and cannot be assigned a new value.
2039
- There was a precedence change with respect to single-line comprehensions:
2040
- <tt>result = i for i in list</tt><br /> used to parse as <tt>result = (i for i in list)</tt>
2041
- by default ... it now parses as <br /><tt>(result = i) for i in list</tt>.
2042
- </p>
2043
-
2044
- <p>
2045
- <b class="header" style="margin-top: 20px;">0.9.4
2046
- <span class="timestamp"> &ndash; <small>Sep 21, 2010</small></span>
2047
- </b>
2048
- CoffeeScript now uses appropriately-named temporary variables, and recycles
2049
- their references after use. Added <tt>require.extensions</tt> support for
2050
- <b>Node.js 0.3</b>. Loading CoffeeScript in the browser now adds just a
2051
- single <tt>CoffeeScript</tt> object to global scope.
2052
- Fixes for implicit object and block comment edge cases.
2053
- </p>
2054
-
2055
- <p>
2056
- <b class="header" style="margin-top: 20px;">0.9.3
2057
- <span class="timestamp"> &ndash; <small>Sep 16, 2010</small></span>
2058
- </b>
2059
- CoffeeScript <tt>switch</tt> statements now compile into JS <tt>switch</tt>
2060
- statements &mdash; they previously compiled into <tt>if/else</tt> chains
2061
- for JavaScript 1.3 compatibility.
2062
- Soaking a function invocation is now supported. Users of the RubyMine
2063
- editor should now be able to use <tt>--watch</tt> mode.
2064
- </p>
2065
-
2066
- <p>
2067
- <b class="header" style="margin-top: 20px;">0.9.2
2068
- <span class="timestamp"> &ndash; <small>Aug 23, 2010</small></span>
2069
- </b>
2070
- Specifying the start and end of a range literal is now optional, eg. <tt>array[3..]</tt>.
2071
- You can now say <tt>a not instanceof b</tt>.
2072
- Fixed important bugs with nested significant and non-significant indentation (Issue #637).
2073
- Added a <tt>--require</tt> flag that allows you to hook into the <tt>coffee</tt> command.
2074
- Added a custom <tt>jsl.conf</tt> file for our preferred JavaScriptLint setup.
2075
- Sped up Jison grammar compilation time by flattening rules for operations.
2076
- Block comments can now be used with JavaScript-minifier-friendly syntax.
2077
- Added JavaScript's compound assignment bitwise operators. Bugfixes to
2078
- implicit object literals with leading number and string keys, as the subject
2079
- of implicit calls, and as part of compound assignment.
2080
- </p>
2081
-
2082
- <p>
2083
- <b class="header" style="margin-top: 20px;">0.9.1
2084
- <span class="timestamp"> &ndash; <small>Aug 11, 2010</small></span>
2085
- </b>
2086
- Bugfix release for <b>0.9.1</b>. Greatly improves the handling of mixed
2087
- implicit objects, implicit function calls, and implicit indentation.
2088
- String and regex interpolation is now strictly <tt>#{ ... }</tt> (Ruby style).
2089
- The compiler now takes a <tt>--require</tt> flag, which specifies scripts
2090
- to run before compilation.
2091
- </p>
2092
-
2093
- <p>
2094
- <b class="header" style="margin-top: 20px;">0.9.0
2095
- <span class="timestamp"> &ndash; <small>Aug 4, 2010</small></span>
2096
- </b>
2097
- The CoffeeScript <b>0.9</b> series is considered to be a release candidate
2098
- for <b>1.0</b>; let's give her a shakedown cruise. <b>0.9.0</b> introduces a massive
2099
- backwards-incompatible change: Assignment now uses <tt>=</tt>, and object
2100
- literals use <tt>:</tt>, as in JavaScript. This allows us to have implicit
2101
- object literals, and YAML-style object definitions. Half assignments are
2102
- removed, in favor of <tt>+=</tt>, <tt>or=</tt>, and friends.
2103
- Interpolation now uses a hash mark <tt>#</tt> instead of the dollar sign
2104
- <tt>$</tt> &mdash; because dollar signs may be part of a valid JS identifier.
2105
- Downwards range comprehensions are now safe again, and are optimized to
2106
- straight for loops when created with integer endpoints.
2107
- A fast, unguarded form of object comprehension was added:
2108
- <tt>for all key, value of object</tt>. Mentioning the <tt>super</tt> keyword
2109
- with no arguments now forwards all arguments passed to the function,
2110
- as in Ruby. If you extend class <tt>B</tt> from parent class <tt>A</tt>, if
2111
- <tt>A</tt> has an <tt>extended</tt> method defined, it will be called, passing in <tt>B</tt> &mdash;
2112
- this enables static inheritance, among other things. Cleaner output for
2113
- functions bound with the fat arrow. <tt>@variables</tt> can now be used
2114
- in parameter lists, with the parameter being automatically set as a property
2115
- on the object &mdash; useful in constructors and setter functions.
2116
- Constructor functions can now take splats.
2117
- </p>
2118
-
2119
- <p>
2120
- <b class="header" style="margin-top: 20px;">0.7.2
2121
- <span class="timestamp"> &ndash; <small>Jul 12, 2010</small></span>
2122
- </b>
2123
- Quick bugfix (right after 0.7.1) for a problem that prevented <tt>coffee</tt>
2124
- command-line options from being parsed in some circumstances.
2125
- </p>
2126
-
2127
- <p>
2128
- <b class="header" style="margin-top: 20px;">0.7.1
2129
- <span class="timestamp"> &ndash; <small>Jul 11, 2010</small></span>
2130
- </b>
2131
- Block-style comments are now passed through and printed as JavaScript block
2132
- comments -- making them useful for licenses and copyright headers. Better
2133
- support for running coffee scripts standalone via hashbangs.
2134
- Improved syntax errors for tokens that are not in the grammar.
2135
- </p>
2136
-
2137
- <p>
2138
- <b class="header" style="margin-top: 20px;">0.7.0
2139
- <span class="timestamp"> &ndash; <small>Jun 28, 2010</small></span>
2140
- </b>
2141
- Official CoffeeScript variable style is now camelCase, as in JavaScript.
2142
- Reserved words are now allowed as object keys, and will be quoted for you.
2143
- Range comprehensions now generate cleaner code, but you have to specify <tt>by -1</tt>
2144
- if you'd like to iterate downward. Reporting of syntax errors is greatly
2145
- improved from the previous release. Running <tt>coffee</tt> with no arguments
2146
- now launches the REPL, with Readline support. The <tt>&lt;-</tt> bind operator
2147
- has been removed from CoffeeScript. The <tt>loop</tt> keyword was added,
2148
- which is equivalent to a <tt>while true</tt> loop. Comprehensions that contain
2149
- closures will now close over their variables, like the semantics of a <tt>forEach</tt>.
2150
- You can now use bound function in class definitions (bound to the instance).
2151
- For consistency, <tt>a in b</tt> is now an array presence check, and <tt>a of b</tt>
2152
- is an object-key check. Comments are no longer passed through to the generated
2153
- JavaScript.
2154
- </p>
2155
-
2156
- <p>
2157
- <b class="header" style="margin-top: 20px;">0.6.2
2158
- <span class="timestamp"> &ndash; <small>May 15, 2010</small></span>
2159
- </b>
2160
- The <tt>coffee</tt> command will now preserve directory structure when
2161
- compiling a directory full of scripts. Fixed two omissions that were preventing
2162
- the CoffeeScript compiler from running live within Internet Explorer.
2163
- There's now a syntax for block comments, similar in spirit to CoffeeScript's heredocs.
2164
- ECMA Harmony DRY-style pattern matching is now supported, where the name
2165
- of the property is the same as the name of the value: <tt>{name, length}: func</tt>.
2166
- Pattern matching is now allowed within comprehension variables. <tt>unless</tt>
2167
- is now allowed in block form. <tt>until</tt> loops were added, as the inverse
2168
- of <tt>while</tt> loops. <tt>switch</tt> statements are now allowed without
2169
- switch object clauses. Compatible
2170
- with Node.js <b>v0.1.95</b>.
2171
- </p>
2172
-
2173
- <p>
2174
- <b class="header" style="margin-top: 20px;">0.6.1
2175
- <span class="timestamp"> &ndash; <small>Apr 12, 2010</small></span>
2176
- </b>
2177
- Upgraded CoffeeScript for compatibility with the new Node.js <b>v0.1.90</b>
2178
- series.
2179
- </p>
2180
-
2181
- <p>
2182
- <b class="header" style="margin-top: 20px;">0.6.0
2183
- <span class="timestamp"> &ndash; <small>Apr 3, 2010</small></span>
2184
- </b>
2185
- Trailing commas are now allowed, a-la Python. Static
2186
- properties may be assigned directly within class definitions,
2187
- using <tt>@property</tt> notation.
2188
- </p>
2189
-
2190
- <p>
2191
- <b class="header" style="margin-top: 20px;">0.5.6
2192
- <span class="timestamp"> &ndash; <small>Mar 23, 2010</small></span>
2193
- </b>
2194
- Interpolation can now be used within regular expressions and heredocs, as well as
2195
- strings. Added the <tt>&lt;-</tt> bind operator.
2196
- Allowing assignment to half-expressions instead of special <tt>||=</tt>-style
2197
- operators. The arguments object is no longer automatically converted into
2198
- an array. After requiring <tt>coffee-script</tt>, Node.js can now directly
2199
- load <tt>.coffee</tt> files, thanks to <b>registerExtension</b>. Multiple
2200
- splats can now be used in function calls, arrays, and pattern matching.
2201
- </p>
2202
-
2203
- <p>
2204
- <b class="header" style="margin-top: 20px;">0.5.5
2205
- <span class="timestamp"> &ndash; <small>Mar 8, 2010</small></span>
2206
- </b>
2207
- String interpolation, contributed by
2208
- <a href="http://github.com/StanAngeloff">Stan Angeloff</a>.
2209
- Since <tt>--run</tt> has been the default since <b>0.5.3</b>, updating
2210
- <tt>--stdio</tt> and <tt>--eval</tt> to run by default, pass <tt>--compile</tt>
2211
- as well if you'd like to print the result.
2212
- </p>
2213
-
2214
- <p>
2215
- <b class="header" style="margin-top: 20px;">0.5.4
2216
- <span class="timestamp"> &ndash; <small>Mar 3, 2010</small></span>
2217
- </b>
2218
- Bugfix that corrects the Node.js global constants <tt>__filename</tt> and
2219
- <tt>__dirname</tt>. Tweaks for more flexible parsing of nested function
2220
- literals and improperly-indented comments. Updates for the latest Node.js API.
2221
- </p>
2222
-
2223
- <p>
2224
- <b class="header" style="margin-top: 20px;">0.5.3
2225
- <span class="timestamp"> &ndash; <small>Feb 27, 2010</small></span>
2226
- </b>
2227
- CoffeeScript now has a syntax for defining classes. Many of the core
2228
- components (Nodes, Lexer, Rewriter, Scope, Optparse) are using them.
2229
- Cakefiles can use <tt>optparse.coffee</tt> to define options for tasks.
2230
- <tt>--run</tt> is now the default flag for the <tt>coffee</tt> command,
2231
- use <tt>--compile</tt> to save JavaScripts. Bugfix for an ambiguity between
2232
- RegExp literals and chained divisions.
2233
- </p>
2234
-
2235
- <p>
2236
- <b class="header" style="margin-top: 20px;">0.5.2
2237
- <span class="timestamp"> &ndash; <small>Feb 25, 2010</small></span>
2238
- </b>
2239
- Added a compressed version of the compiler for inclusion in web pages as
2240
- <br /><tt>extras/coffee-script.js</tt>. It'll automatically run any script tags
2241
- with type <tt>text/coffeescript</tt> for you. Added a <tt>--stdio</tt> option
2242
- to the <tt>coffee</tt> command, for piped-in compiles.
2243
- </p>
2244
-
2245
-
2246
- <p>
2247
- <b class="header" style="margin-top: 20px;">0.5.1
2248
- <span class="timestamp"> &ndash; <small>Feb 24, 2010</small></span>
2249
- </b>
2250
- Improvements to null soaking with the existential operator, including
2251
- soaks on indexed properties. Added conditions to <tt>while</tt> loops,
2252
- so you can use them as filters with <tt>when</tt>, in the same manner as
2253
- comprehensions.
2254
- </p>
2255
-
2256
- <p>
2257
- <b class="header" style="margin-top: 20px;">0.5.0
2258
- <span class="timestamp"> &ndash; <small>Feb 21, 2010</small></span>
2259
- </b>
2260
- CoffeeScript 0.5.0 is a major release, While there are no language changes,
2261
- the Ruby compiler has been removed in favor of a self-hosting
2262
- compiler written in pure CoffeeScript.
2263
- </p>
2264
-
2265
- <p>
2266
- <b class="header" style="margin-top: 20px;">0.3.2
2267
- <span class="timestamp"> &ndash; <small>Feb 8, 2010</small></span>
2268
- </b>
2269
- <tt>@property</tt> is now a shorthand for <tt>this.property</tt>.<br />
2270
- Switched the default JavaScript engine from Narwhal to Node.js. Pass
2271
- the <tt>--narwhal</tt> flag if you'd like to continue using it.
2272
- </p>
2273
-
2274
- <p>
2275
- <b class="header" style="margin-top: 20px;">0.3.0
2276
- <span class="timestamp"> &ndash; <small>Jan 26, 2010</small></span>
2277
- </b>
2278
- CoffeeScript 0.3 includes major syntax changes:
2279
- <br />
2280
- The function symbol was changed to
2281
- <tt>-></tt>, and the bound function symbol is now <tt>=></tt>.
2282
- <br />
2283
- Parameter lists in function definitions must now be wrapped in parentheses.
2284
- <br />
2285
- Added property soaking, with the <tt>?.</tt> operator.
2286
- <br />
2287
- Made parentheses optional, when invoking functions with arguments.
2288
- <br />
2289
- Removed the obsolete block literal syntax.
2290
- </p>
2291
-
2292
- <p>
2293
- <b class="header" style="margin-top: 20px;">0.2.6
2294
- <span class="timestamp"> &ndash; <small>Jan 17, 2010</small></span>
2295
- </b>
2296
- Added Python-style chained comparisons, the conditional existence
2297
- operator <tt>?=</tt>, and some examples from <i>Beautiful Code</i>.
2298
- Bugfixes relating to statement-to-expression conversion, arguments-to-array
2299
- conversion, and the TextMate syntax highlighter.
2300
- </p>
2301
-
2302
- <p>
2303
- <b class="header" style="margin-top: 20px;">0.2.5
2304
- <span class="timestamp"> &ndash; <small>Jan 13, 2010</small></span>
2305
- </b>
2306
- The conditions in switch statements can now take multiple values at once &mdash;
2307
- If any of them are true, the case will run. Added the long arrow <tt>==></tt>,
2308
- which defines and immediately binds a function to <tt>this</tt>. While loops can
2309
- now be used as expressions, in the same way that comprehensions can. Splats
2310
- can be used within pattern matches to soak up the rest of an array.
2311
- </p>
2312
-
2313
- <p>
2314
- <b class="header" style="margin-top: 20px;">0.2.4
2315
- <span class="timestamp"> &ndash; <small>Jan 12, 2010</small></span>
2316
- </b>
2317
- Added ECMAScript Harmony style destructuring assignment, for dealing with
2318
- extracting values from nested arrays and objects. Added indentation-sensitive
2319
- heredocs for nicely formatted strings or chunks of code.
2320
- </p>
2321
-
2322
- <p>
2323
- <b class="header" style="margin-top: 20px;">0.2.3
2324
- <span class="timestamp"> &ndash; <small>Jan 11, 2010</small></span>
2325
- </b>
2326
- Axed the unsatisfactory <tt>ino</tt> keyword, replacing it with <tt>of</tt> for
2327
- object comprehensions. They now look like: <tt>for prop, value of object</tt>.
2328
- </p>
2329
-
2330
- <p>
2331
- <b class="header" style="margin-top: 20px;">0.2.2
2332
- <span class="timestamp"> &ndash; <small>Jan 10, 2010</small></span>
2333
- </b>
2334
- When performing a comprehension over an object, use <tt>ino</tt>, instead
2335
- of <tt>in</tt>, which helps us generate smaller, more efficient code at
2336
- compile time.
2337
- <br />
2338
- Added <tt>::</tt> as a shorthand for saying <tt>.prototype.</tt>
2339
- <br />
2340
- The "splat" symbol has been changed from a prefix asterisk <tt>*</tt>, to
2341
- a postfix ellipsis <tt>...</tt>
2342
- <br />
2343
- Added JavaScript's <tt>in</tt> operator,
2344
- empty <tt>return</tt> statements, and empty <tt>while</tt> loops.
2345
- <br />
2346
- Constructor functions that start with capital letters now include a
2347
- safety check to make sure that the new instance of the object is returned.
2348
- <br />
2349
- The <tt>extends</tt> keyword now functions identically to <tt>goog.inherits</tt>
2350
- in Google's Closure Library.
2351
- </p>
2352
-
2353
- <p>
2354
- <b class="header" style="margin-top: 20px;">0.2.1
2355
- <span class="timestamp"> &ndash; <small>Jan 5, 2010</small></span>
2356
- </b>
2357
- Arguments objects are now converted into real arrays when referenced.
2358
- </p>
2359
-
2360
- <p>
2361
- <b class="header" style="margin-top: 20px;">0.2.0
2362
- <span class="timestamp"> &ndash; <small>Jan 5, 2010</small></span>
2363
- </b>
2364
- Major release. Significant whitespace. Better statement-to-expression
2365
- conversion. Splats. Splice literals. Object comprehensions. Blocks.
2366
- The existential operator. Many thanks to all the folks who posted issues,
2367
- with special thanks to
2368
- <a href="http://github.com/liamoc">Liam O'Connor-Davis</a> for whitespace
2369
- and expression help.
2370
- </p>
2371
-
2372
- <p>
2373
- <b class="header" style="margin-top: 20px;">0.1.6
2374
- <span class="timestamp"> &ndash; <small>Dec 27, 2009</small></span>
2375
- </b>
2376
- Bugfix for running <tt>coffee --interactive</tt> and <tt>--run</tt>
2377
- from outside of the CoffeeScript directory. Bugfix for nested
2378
- function/if-statements.
2379
- </p>
2380
-
2381
- <p>
2382
- <b class="header" style="margin-top: 20px;">0.1.5
2383
- <span class="timestamp"> &ndash; <small>Dec 26, 2009</small></span>
2384
- </b>
2385
- Array slice literals and array comprehensions can now both take Ruby-style
2386
- ranges to specify the start and end. JavaScript variable declaration is
2387
- now pushed up to the top of the scope, making all assignment statements into
2388
- expressions. You can use <tt>\</tt> to escape newlines.
2389
- The <tt>coffee-script</tt> command is now called <tt>coffee</tt>.
2390
- </p>
2391
-
2392
- <p>
2393
- <b class="header" style="margin-top: 20px;">0.1.4
2394
- <span class="timestamp"> &ndash; <small>Dec 25, 2009</small></span>
2395
- </b>
2396
- The official CoffeeScript extension is now <tt>.coffee</tt> instead of
2397
- <tt>.cs</tt>, which properly belongs to
2398
- <a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a>.
2399
- Due to popular demand, you can now also use <tt>=</tt> to assign. Unlike
2400
- JavaScript, <tt>=</tt> can also be used within object literals, interchangeably
2401
- with <tt>:</tt>. Made a grammatical fix for chained function calls
2402
- like <tt>func(1)(2)(3)(4)</tt>. Inheritance and super no longer use
2403
- <tt>__proto__</tt>, so they should be IE-compatible now.
2404
- </p>
2405
-
2406
- <p>
2407
- <b class="header" style="margin-top: 20px;">0.1.3
2408
- <span class="timestamp"> &ndash; <small>Dec 25, 2009</small></span>
2409
- </b>
2410
- The <tt>coffee</tt> command now includes <tt>--interactive</tt>,
2411
- which launches an interactive CoffeeScript session, and <tt>--run</tt>,
2412
- which directly compiles and executes a script. Both options depend on a
2413
- working installation of Narwhal.
2414
- The <tt>aint</tt> keyword has been replaced by <tt>isnt</tt>, which goes
2415
- together a little smoother with <tt>is</tt>.
2416
- Quoted strings are now allowed as identifiers within object literals: eg.
2417
- <tt>{"5+5": 10}</tt>.
2418
- All assignment operators now use a colon: <tt>+:</tt>, <tt>-:</tt>,
2419
- <tt>*:</tt>, etc.
2420
- </p>
2421
-
2422
- <p>
2423
- <b class="header" style="margin-top: 20px;">0.1.2
2424
- <span class="timestamp"> &ndash; <small>Dec 24, 2009</small></span>
2425
- </b>
2426
- Fixed a bug with calling <tt>super()</tt> through more than one level of
2427
- inheritance, with the re-addition of the <tt>extends</tt> keyword.
2428
- Added experimental <a href="http://narwhaljs.org/">Narwhal</a>
2429
- support (as a Tusk package), contributed by
2430
- <a href="http://tlrobinson.net/">Tom Robinson</a>, including
2431
- <b>bin/cs</b> as a CoffeeScript REPL and interpreter.
2432
- New <tt>--no-wrap</tt> option to suppress the safety function
2433
- wrapper.
2434
- </p>
2435
-
2436
- <p>
2437
- <b class="header" style="margin-top: 20px;">0.1.1
2438
- <span class="timestamp"> &ndash; <small>Dec 24, 2009</small></span>
2439
- </b>
2440
- Added <tt>instanceof</tt> and <tt>typeof</tt> as operators.
2441
- </p>
2442
-
2443
- <p>
2444
- <b class="header" style="margin-top: 20px;">0.1.0
2445
- <span class="timestamp"> &ndash; <small>Dec 24, 2009</small></span>
2446
- </b>
2447
- Initial CoffeeScript release.
2448
- </p>
2449
-
2450
- </div>
2451
-
2452
- <script type="text/coffeescript">
2453
-
2454
- # Set up the compilation function, to run when you stop typing.
2455
- compileSource = ->
2456
- source = $('#repl_source').val()
2457
- window.compiledJS = ''
2458
- try
2459
- window.compiledJS = CoffeeScript.compile source, bare: on
2460
- el = $('#repl_results')[0]
2461
- if el.innerText
2462
- el.innerText = window.compiledJS
2463
- else
2464
- $(el).text window.compiledJS
2465
- $('#error').hide()
2466
- catch error
2467
- $('#error').text(error.message).show()
2468
-
2469
- # Listen for keypresses and recompile.
2470
- $('#repl_source').keyup -> compileSource()
2471
-
2472
- # Eval the compiled js.
2473
- $('.minibutton.run').click ->
2474
- try
2475
- eval window.compiledJS
2476
- catch error then alert error
2477
-
2478
- # Load the console with a string of CoffeeScript.
2479
- window.loadConsole = (coffee) ->
2480
- $('#repl_source').val coffee
2481
- compileSource()
2482
- $('.navigation.try').addClass('active')
2483
- false
2484
-
2485
- # Helper to hide the menus.
2486
- closeMenus = ->
2487
- $('.navigation.active').removeClass 'active'
2488
-
2489
- # Bind navigation buttons to open the menus.
2490
- $('.navigation').click (e) ->
2491
- return if e.target.tagName.toLowerCase() is 'a'
2492
- return false if $(e.target).closest('.repl_wrapper').length
2493
- if $(this).hasClass('active')
2494
- closeMenus()
2495
- else
2496
- closeMenus()
2497
- $(this).addClass 'active'
2498
- false
2499
-
2500
- $(document.body).click (e) ->
2501
- return false if $(e.target).hasClass('minibutton')
2502
- closeMenus()
2503
-
2504
- $('#open_webchat').click ->
2505
- $(this).replaceWith $('<iframe src="http://webchat.freenode.net/?channels=coffeescript" width="625" height="400"></iframe>')
2506
-
2507
- compileSource()
2508
-
2509
- </script>
2510
-
2511
- <script src="documentation/vendor/jquery-1.4.2.js"></script>
2512
- <script src="extras/coffee-script.js"></script>
2513
-
2514
- </body>
2515
- </html>