Compare commits

..

99 Commits

Author SHA1 Message Date
Geoffrey Booth
704924c3cd 2.0.0-beta3 (#4594)
* Don’t confuse the syntax highlighter

* Comment Assign::compilePatternMatch a bit

* Assignment expressions in conditionals are a bad practice

* Rename `wrapInBraces` to `wrapInParentheses`, to set the stage for future `wrapInBraces` that uses `{` and `wrapInBrackets` that uses `[`

* Correct comment

* object destructuring

* Allow custom position of the rest element.

* Output simple array destructuring assignments to ES2015

* Output simple object destructured assignments to ES2015

* Compile shorthand object properties to ES2015 shorthand properties

This dramatically improves the appearance of destructured imports.

* Don’t confuse the syntax highlighter

* Comment Assign::compilePatternMatch a bit

* Assignment expressions in conditionals are a bad practice

* Rename `wrapInBraces` to `wrapInParentheses`, to set the stage for future `wrapInBraces` that uses `{` and `wrapInBrackets` that uses `[`

* object destructuring

* Allow custom position of the rest element.

* rest element in object destructuring

* rest element in object destructuring

* fix string interpolation

* merging

* fixing splats in object literal

* Rest element in parameter destructuring

* merging with CS2

* merged with CS2

* Add support for the object spread initializer. https://github.com/tc39/proposal-object-rest-spread/blob/master/Spread.md

* Fix misspellings, trailing whitespace, other minor details

* merging with beta2

* refactor object spread properties

* small fix

* - Fixed object spread function parameters.
- Clean up "Assign" and moved all logic for object rest properties in single method (compileObjectDestruct).
- Add helper function "objectWithoutKeys" to the "UTILITIES" for use with object rest properties,
  e.g. {a, b, r...} = obj => {a, b} = obj, r = objectWithoutKeys(...)
- Clean up "Obj" and moved all logic for object spread properties in single method (compileSpread).
- Clean up "Code".
- Add method "hasSplat" to "Obj" and "Value" for checking if Obj contains the splat.
- Enable placing spread syntax triple dots on either right or left, per #85 (https://github.com/coffeescript6/discuss/issues/85)

* Fixed typos

* Remove unused code

* Removed dots (e.g. splat) on the left side from the grammar

* Initial release for deep spread properties, e.g. obj2 = {obj.b..., a: 1} or {obj[b][c]..., d: 7}
Tests need to be prepared!

* 1. Object literal spread properties

Object literals:
- obj = { {b:{c:{d:1}}}..., a:1 }

Parenthetical:
- obj = { ( body ), a:1 }
- obj = { ( body )..., a:1 }

Invocation:
- obj = { ( (args) -> ... )(params), a:1 }
- obj = { ( (args) -> ... )(params)..., a:1 }
- obj = { foo(), a:1 }
- obj = { foo()..., a:1 }

2. Refactor, cleanup & other optimizations.

* Merged with 2.0

* Cleanup

* Some more cleanup.

* Fixed error with freeVariable and object destructuring.

* Fixed errors with object spread properties.

* Improvements, fixed errors.

* Minor improvement.

* Minor improvements.

* Typo.

* Remove unnecessary whitespace.

* Remove unnecessary whitespace.

* Changed few "assertErrorFormat" tests since parentheses are now allowed in the Obj.

* Whitespace cleanup

* Comments cleanup

* fix destructured obj param declarations

* refine fix; add test

* Refactor function args ({a, b...})

* Additional tests for object destructuring in function argument.

* Minor improvement for object destructuring variable declaration.

* refactor function args ({a, b...}) and ({a, b...} = {}); Obj And Param cleanup

* fix comment

* Fix object destructuring variable declaration.

* more tests with default values

* fix typo

* Fixed default values in object destructuring.

* small fix

* Babel’s tests for object rest spread

* Style: spaces after colons in object declarations

* Cleanup comments

* Simplify Babel tests

* Fix comments

* Fix destructuring with splats in multiple objects

* Add test for default values in detsructuring assignment with splats

* Handle default values when assigning to object splats

* Rewrite traverseRest to fix handling of dynamic keys

* Fix double parens around destructuring with splats

* Update compileObjectDestruct comments

* Improve formatting of top-level destructures with splats and tidy parens

* Added a bigger destructuring-with-defaults test and fixed a bug

* Refactor destructuring grammar to allow additional forms

* Add a missing case to ObjSpreadExpr

* These tests shouldn’t run in the browser

* Fix test.html

* Fix docs scroll position getting screwed up by CodeMirror initialization

* Breaking change documentation about => (fixes #4593)

* Spread/rest syntax documentation

* Documentation about bound class methods

* 2.0.0-beta3 changelog

* Add note about ‘lib’

* Fix accidentally converting this to tabs

* Bump version to 2.0.0-beta3

* Update annotated source and test.html
2017-06-30 09:58:05 -07:00
Geoffrey Booth
a7a6006533 [CS2] Destructuring object spreads (#4493)
* Don’t confuse the syntax highlighter

* Comment Assign::compilePatternMatch a bit

* Assignment expressions in conditionals are a bad practice

* Rename `wrapInBraces` to `wrapInParentheses`, to set the stage for future `wrapInBraces` that uses `{` and `wrapInBrackets` that uses `[`

* Correct comment

* object destructuring

* Allow custom position of the rest element.

* Output simple array destructuring assignments to ES2015

* Output simple object destructured assignments to ES2015

* Compile shorthand object properties to ES2015 shorthand properties

This dramatically improves the appearance of destructured imports.

* Don’t confuse the syntax highlighter

* Comment Assign::compilePatternMatch a bit

* Assignment expressions in conditionals are a bad practice

* Rename `wrapInBraces` to `wrapInParentheses`, to set the stage for future `wrapInBraces` that uses `{` and `wrapInBrackets` that uses `[`

* object destructuring

* Allow custom position of the rest element.

* rest element in object destructuring

* rest element in object destructuring

* fix string interpolation

* merging

* fixing splats in object literal

* Rest element in parameter destructuring

* merging with CS2

* merged with CS2

* Add support for the object spread initializer. https://github.com/tc39/proposal-object-rest-spread/blob/master/Spread.md

* Fix misspellings, trailing whitespace, other minor details

* merging with beta2

* refactor object spread properties

* small fix

* - Fixed object spread function parameters.
- Clean up "Assign" and moved all logic for object rest properties in single method (compileObjectDestruct).
- Add helper function "objectWithoutKeys" to the "UTILITIES" for use with object rest properties,
  e.g. {a, b, r...} = obj => {a, b} = obj, r = objectWithoutKeys(...)
- Clean up "Obj" and moved all logic for object spread properties in single method (compileSpread).
- Clean up "Code".
- Add method "hasSplat" to "Obj" and "Value" for checking if Obj contains the splat.
- Enable placing spread syntax triple dots on either right or left, per #85 (https://github.com/coffeescript6/discuss/issues/85)

* Fixed typos

* Remove unused code

* Removed dots (e.g. splat) on the left side from the grammar

* Initial release for deep spread properties, e.g. obj2 = {obj.b..., a: 1} or {obj[b][c]..., d: 7}
Tests need to be prepared!

* 1. Object literal spread properties

Object literals:
- obj = { {b:{c:{d:1}}}..., a:1 }

Parenthetical:
- obj = { ( body ), a:1 }
- obj = { ( body )..., a:1 }

Invocation:
- obj = { ( (args) -> ... )(params), a:1 }
- obj = { ( (args) -> ... )(params)..., a:1 }
- obj = { foo(), a:1 }
- obj = { foo()..., a:1 }

2. Refactor, cleanup & other optimizations.

* Merged with 2.0

* Cleanup

* Some more cleanup.

* Fixed error with freeVariable and object destructuring.

* Fixed errors with object spread properties.

* Improvements, fixed errors.

* Minor improvement.

* Minor improvements.

* Typo.

* Remove unnecessary whitespace.

* Remove unnecessary whitespace.

* Changed few "assertErrorFormat" tests since parentheses are now allowed in the Obj.

* Whitespace cleanup

* Comments cleanup

* fix destructured obj param declarations

* refine fix; add test

* Refactor function args ({a, b...})

* Additional tests for object destructuring in function argument.

* Minor improvement for object destructuring variable declaration.

* refactor function args ({a, b...}) and ({a, b...} = {}); Obj And Param cleanup

* fix comment

* Fix object destructuring variable declaration.

* more tests with default values

* fix typo

* Fixed default values in object destructuring.

* small fix

* Babel’s tests for object rest spread

* Style: spaces after colons in object declarations

* Cleanup comments

* Simplify Babel tests

* Fix comments

* Fix destructuring with splats in multiple objects

* Add test for default values in detsructuring assignment with splats

* Handle default values when assigning to object splats

* Rewrite traverseRest to fix handling of dynamic keys

* Fix double parens around destructuring with splats

* Update compileObjectDestruct comments

* Improve formatting of top-level destructures with splats and tidy parens

* Added a bigger destructuring-with-defaults test and fixed a bug

* Refactor destructuring grammar to allow additional forms

* Add a missing case to ObjSpreadExpr

* These tests shouldn’t run in the browser

* Fix test.html
2017-06-29 22:57:42 -07:00
Julian Rosse
58c608620e disallow inline chained call after func glyph (#4590) 2017-06-29 19:00:01 -07:00
Julian Rosse
b1d2061cbc [CS2] Fix #3906: handle indentation inside indented chain (#4587)
* safe missing end token error [Fixes #3906]

* handle indentation inside indented chain [Fixes #3906]
2017-06-29 18:39:05 -07:00
Geoffrey Booth
1f31073201 [CS2] JSX documentation, Try CoffeeScript improvements (#4583)
* Update browser compiler

* Argument parsing tests require CommonJS environment

* JSX section in the docs

* Breaking change note for < and > operators

* Fix JSX example

* Try CoffeeScript improvements: set the hash automatically, remove ‘link’ button, automatically save code in localStorage

* Fix the code editors’ handling of tab-indented code

* Fix JSX example to work with React

* Compiled, not rendered
2017-06-25 23:53:35 -07:00
Julian Rosse
a3a1fb0dd7 [CS2] Fix for comma after function glyph [#1043] (#4588)
* comma after function glyph [#1043]

* test fat arrow

* chain after function glyph [#3446] [#3845]
2017-06-25 23:46:54 -07:00
Julian Rosse
26f6fa6570 [CS2] destructured nested defaults [fixes #4566] (#4574)
* destructured nested defaults [fixes #4566]

* don't parenthesize nested assigns
2017-06-20 21:53:37 -07:00
Julian Rosse
0619a7a76c Fix #4579: postfix for in object literals (#4581)
* postfix for on first line of implicit object

* issue numbers

* handle until and while similarly
2017-06-20 21:50:50 -07:00
Danny McClanahan
31cd782ba7 [CS2] CLI: Test option parsing for current CLI (#4565)
* intermediate save

* add note saying where OptionParser is used in coffee command

* add some more work

* fix flatten functions

* refactor tests

* add basic test

* remove unused file

* compilation now hangs

* remove unnecessary changes

* add tests!!!

* clarify a test
2017-06-15 09:09:02 -07:00
Julian Rosse
5e90b224c2 Fix #4564: indent closes implicit object (#4570)
* indent closes implicit object [Fixes #4564]

* add test for just implicit object

* remove stray lib file
2017-06-15 09:07:36 -07:00
Julian Rosse
9a48566b24 [CS2] Restore bound class methods via runtime check to avoid premature calling of bound method before binding (#4561)
* bound method runtime check

* restore bound method tests

* bound method tests

* test bound method in prop-named class

* run check against parent class

* dummy commit

* remove comment

* rename to boundMethodCheck

* fixes from code review

* use ref to own class for check

* fixes from code review

* remove unneeded param
2017-06-14 15:11:53 -07:00
Chris Connelly
76e70a6c81 Fix immediately invoked named classes (#4569)
Fixes #4436.
2017-06-12 23:11:39 -07:00
Geoffrey
5b7a7779fb Merge branch 'master' of github.com:jashkenas/coffeescript into 2 2017-06-08 21:57:01 -07:00
Michal Srb
48c7debe5a Fix REPL assignment (#4559) 2017-06-07 11:37:25 -07:00
Michal Srb
dc0fb85fd3 [CS2] Support for CSX - equivalent of JSX (#4551)
* CSX implementation

* fixed comment, used toJS, added error tests, fixed error in identifier regex, fixed interpolation inside attributes value and added test

* added missing test for bare attributes, split attribute and indentifier regex, fixed checking for closing tags closing angle bracket

* Refactor tests that compare expected generated JavaScript with actual generated JavaScript to use common helper; add colors to error message to make differences easier to read

* Better match the style of the rest of the codebase

* Remove unused function

* More style fixes

* Allow unspaced less-than operator when not using CSX

* Replace includesCSX with a counter and simplify the unspaced operator logic

* Fixed indexing and realized that I completely enabled the tight spacing, added a test for it too

* Style fixes
2017-06-06 23:33:46 -07:00
Julian Rosse
63b109a4f5 Fix #4544: postfix conditional on first line of implicit object (#4554)
* support postfix conditional on first line of implicit object

* cleanup cleanup

* also fixes #2051, added test
2017-05-29 17:29:45 -07:00
Geoffrey Booth
cd6daf0b79 2.0.0-beta2 docs 2017-05-16 18:59:02 -07:00
Geoffrey Booth
d756bd6851 [CS2] 2.0.0-beta2 (#4550)
* Breaking changes note about bound class methods

* Changelog for 2.0.0-beta2, including renaming “Change Log” to “Changelog” (the preferred spelling per Wikipedia)

* Update version to 2.0.0-beta2

* 2.0.0-beta2 generated output
2017-05-16 11:53:22 -07:00
Geoffrey Booth
8c9e24841e Merge branch 'master' into 2
# Conflicts:
#	bin/cake
#	bin/coffee
#	documentation/sections/changelog.md
#	documentation/sections/installation.md
#	documentation/sections/introduction.md
#	lib/coffee-script/index.js
#	lib/coffee-script/nodes.js
#	lib/coffee-script/rewriter.js
#	lib/coffee-script/sourcemap.js
#	lib/coffeescript/browser.js
#	lib/coffeescript/cake.js
#	lib/coffeescript/coffeescript.js
#	lib/coffeescript/command.js
#	lib/coffeescript/grammar.js
#	lib/coffeescript/helpers.js
#	lib/coffeescript/lexer.js
#	lib/coffeescript/optparse.js
#	lib/coffeescript/register.js
#	lib/coffeescript/repl.js
#	lib/coffeescript/scope.js
#	package.json
2017-05-14 22:05:37 -07:00
Geoffrey Booth
f0e9837dca 1.12.6 missing updated output 2017-05-14 21:22:48 -07:00
Geoffrey Booth
b449e1be60 Comments and style fixes 2017-05-14 12:30:49 -07:00
Geoffrey Booth
f661f91323 1.12.6 (#4548)
* Un-prefer global (#4543)

* 1.12.6 changelog; update NPM module in documentation to be `coffeescript` instead of `coffee-script`; update installation to add note about global vs local `coffee` command

* Update packages

* Updated output

* Simplify changelog
2017-05-14 11:12:50 -07:00
Geoffrey Booth
7134856df2 Merge branch 'master' of github.com:jashkenas/coffeescript into 2
# Conflicts:
#	lib/coffee-script/rewriter.js
2017-05-13 21:23:05 -07:00
AKFish
8407dd885a [CS2] Module should be require-able in non-Node environments like Webpack and Browserify (#4546)
* Add webpack support

* Move Node.js-only code from src/coffee-script.coffee to src/index.coffee
* Use lib/coffee-script/index.js as npm package's "main" script
* Export CoffeeScript from src/browser.coffee
* Set package.json's "browser" field to lib/coffee-script/browser.js (used by webpack as entry point)
* Use lib/coffee-script/browser.js as bower package's "main" script

* Use NOP moduleMain when generating parser with Jison

* Remove legacy debug code from browser.coffee

* Improve comments, style

* Fix path

* Remove stub that was only to avoid breaking browser tests; compensate for the lack of stub when running the browser tests in Node

* Update output

* Add test:webpack task to Cakefile

* Update output files

* Run browser tests against webpack build

* Fix newline at end of file

* Export webpack test bundle as CommonJS module

* Remove build:webpack task

* Save webpack build to tmpdir; suppress build output unless it fails
2017-05-13 21:20:36 -07:00
Michal Srb
e00fa5d5f8 Fix #4533: chained calls incorrectly wrapping enclosing implicit objects (#4534) 2017-05-12 06:12:06 -07:00
Geoffrey Booth
993347bb8a [CS2] Un-prefer global (#4543)
* Don’t prefer global installation; the `coffee` or `cake` commands should try to run the locally-installed module if it exists, or the global version otherwise

* Style
2017-05-08 23:35:11 -07:00
Geoffrey Booth
e381e48a79 Fix typo; closes #4187 (#4539) 2017-05-06 06:11:21 -07:00
Geoffrey Booth
22d0cc1012 Fix #4020: No need for break; after a switch case that throws (#4538) 2017-05-06 01:38:20 -07:00
Geoffrey Booth
b28e398396 [CS2] Docs updates (#4536)
* Docs: named functions and function declarations

* No more prototypal `extends`; update docs and example

* More comprehensive documentation of the existential operator; closes #1631

* Better document operators, including `from`

* No fat arrow class methods anymore

* Destructuring shouldn’t say that default values are applied in case of undefined or null

* Spinoff generator and async functions into their own sections; reorder things so that the sections on functions come just before classes, and destructuring goes next to the operators (which discuss assignment)

* Rewrite “CoffeeScript 2” section, making it less practical and more explanatory; move practical info into “Usage”

* Update “Variable Scoping and Lexical Safety” section to remove incorrect reference to Ruby (fixes #2360), add missing details about the safety wrapper, add note about `let`/`const`.

* Updated browser compiler

* Updated docs

* Rewrite Literate CoffeeScript breaking changes

* Split apart the “Breaking Changes” and “Unsupported Features” sections into separate sidebar items and files

* Add example of `not in`, closes #3281

* Fix words in bold that should be in backticks

* Consolidate some breaking changes sections

* Add Node API documentation; closes #3551

* Move the chaining documentation out of the changelog into its own section
2017-05-05 19:44:11 -07:00
Geoffrey Booth
eba271db5b Merge branch 'master' of github.com:jashkenas/coffeescript into 2
# Conflicts:
#	lib/coffee-script/rewriter.js
#	lib/coffeescript/lexer.js
2017-05-02 23:03:37 -07:00
Michal Srb
51c06574a0 Fix #4150: Correctly outdent ternary followed by method call (#4535) 2017-05-02 23:00:21 -07:00
Geoffrey Booth
26cb24acc8 return and export default can now accept implicit objects (#4532) 2017-05-01 19:34:19 -07:00
Geoffrey Booth
2f9ab1d328 [CS2] return and export default can now accept implicit objects (#4532)
* Start with the test I want to pass: return an implicit (braces-less) object

* Update Rewriter class to follow pattern of nodes.coffee; move debugging snippet to where it’ll work in CS2

* Allow export default implicit object

* `return` assumes a continuation onto the next line *if* the next line is indented

* Fix comment; improve test
2017-05-01 19:26:24 -07:00
Chris Connelly
3e70d31e5d Remove support for bound instance methods (#4530)
Bound methods are implemented as assignments to `this` in the
constructor. In derived classes, where `this` is unavailable until
after `super` has been called, the binding is applied and assigned after
the `super` call. This means that any references to 'bound' methods
reachable from the parent constructor will actually point to the unbound
prototype methods.

This can lead to very subtle bugs where a method that is thought to be
bound is handed off and later called with an incorrect context, and the
only defence is for users to be vigilant about referencing bound methods
in constructors.
2017-04-27 23:03:01 -07:00
Geoffrey Booth
277975e33a [CS2] Replace Closure Compiler with Babili, transform browser compiler into ES5-ish (#4523)
* Swap Google Closure Compiler for Babili

* Browser compiler, minified by Babili

* Use Babel to transform, not just to minify; add process.env.TRANSFORM to disable transforming if we only want to minify. Unfortunately several browser tests fail when transformed . . .

* Move `super()` calls so that the Babel-transformed browser compiler passes all the browser tests (in Node, at least)

* Updated browser build

* Update browser tests
2017-04-26 16:21:29 -07:00
Julian Rosse
7ef5cb4a1f Keep unicode code point escapes as is when possible (#4520) 2017-04-25 19:15:08 +02:00
Geoffrey Booth
07ae1edb44 [CS2] Remove unnecessary utility helper functions (#4526)
* Uncomment module test that was waiting for classes to be supported

* Rely on native indexOf

* Replace `bind` helper with native `bind` (no shortcut necessary)

* Update output

* Update modules class tests

* Remove helper for prototype extends

* Update docs to reflect removed extends operator

* Add shortcut for splice, like we have for slice
2017-04-25 07:10:42 -07:00
Geoffrey Booth
7e35c2c3da We no longer need to wrap in quotes JavaScript reserved words used as properties (#4527) 2017-04-24 09:23:42 -07:00
Geoffrey Booth
5651b8b14b [CS2] Fix non-bare get set when called with @ argument (#4525)
* Fixes #4524: `get` and `set` should be usable without parentheses when accessed via a period

* More get/set tests
2017-04-23 11:23:36 -07:00
Julian Rosse
ac1b2b5c30 Iss4248 unicode code point escapes (cleanup) (#4522)
* Fix #4248: Unicode code point escapes

* rewrite unicode code point escapes as unicode escapes

* smarter defaults

* and resimplify

* correct surrogate pairs

* fixes from code review

* handle adjacent code point escapes

* smarter regex

* fix from code review

* refactor toJS() to shared test helper
2017-04-22 11:10:10 -07:00
Geoffrey Booth
3058eedf47 Merge pull request #4521 from helixbass/2_merged_master
merge `master` into `2`
2017-04-20 14:54:07 -07:00
Julian Rosse
89db842c3d merge master 2017-04-20 14:41:28 -05:00
Julian Rosse
96b6c5f65a Fix #4248: Unicode code point escapes (#4498) 2017-04-20 08:03:06 +02:00
Geoffrey Booth
bfce05438b Fix parenthesized conditions in if-else assignment (#4519)
* Fix parenthesized conditions in if-else assignment

* Add compiled output

* Use ‘is’ instead of ‘==‘; ‘right’ is a poor name when you mean ‘correct,’ not the right-hand side of the assignments in this test
2017-04-19 00:10:20 -07:00
Geoffrey Booth
ff60e6a6ce fix 'future reserved words' test (#4518)
Added the missing '#'s for correct string interpolation. Seems like this went unnoticed because in these test cases, the `check` function tests if the compilation fails, which it does either way.
2017-04-19 08:48:02 +02:00
jessaustin
e215a2d280 Write .coffee_history in $XDG_CACHE_HOME (#4472)
* Write .coffee_history in $XDG_CACHE_HOME

Previously, if the $HOME environmental variable was set, the
.coffee_history file was written there. This is still the case, but
first we check if $XDG_CACHE_HOME is set, and if so we write it
there instead. This allows users who want to follow the XDG Base
Directory Specification [0] to do so. Actually, this helps out *all*
users who want to keep their home directory a bit cleaner. It seems
that using this standardized environmental variable is the cleanest
way to do this, rather than involving configuration files or command
line flags or anything else.

Fixes #3705.

[0] https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

* Stylistic corrections

Corrected some style deficiencies, thanks to helpful advice from
@GeoffreyBooth.
2017-04-18 10:52:02 -07:00
Geoffrey Booth
0e8feb7ee9 [CS2] Literate CoffeeScript without dependencies (#4509)
* Reimplement `invertLiterate` without any dependency, tracking indentation levels (including inside lists); update literate test files to also check that no tests are skipped

* Drop Literate CoffeeScript’s support for executable code blocks inside list items (and also for second paragraphs or blockquotes in list items)

* Update Literate CoffeeScript docs to reflect current supported syntax
2017-04-17 23:30:40 -07:00
Geoffrey Booth
ae096a331a Merge branch 'master' into 2
# Conflicts:
#	Cakefile
#	documentation/sections/changelog.md
#	documentation/sections/classes.md
#	documentation/sections/fat_arrow.md
#	documentation/sections/installation.md
#	documentation/sections/introduction.md
#	documentation/sections/resources.md
#	documentation/sections/scripts.md
#	lib/coffeescript/repl.js
#	src/lexer.coffee
2017-04-17 19:52:34 -07:00
Geoffrey Booth
d7e096aeee [CS2] Fix links in v2 docs (#4506)
* Update 2.0.0-beta1 docs

* Fix broken links, update redirected links

* Rebuild v2 docs with updated links

* A few more fixed links
2017-04-17 19:43:22 -07:00
Geoffrey Booth
0da9d711c5 Fix broken links, update redirected links (#4505)
* Fix broken links, update redirected links

* A few more fixed links

* Update v2 docs
2017-04-17 19:43:10 -07:00
Geoffrey Booth
fecdbac291 A particular REPL test is broken in Node 4.8.2 because of a regression that was fixed in Node 5.11.0; just disable the test for Node < 6. Fixes #4502. (#4510) 2017-04-17 12:49:30 -07:00
Simon Lydell
473e8a1841 Merge pull request #4507 from GeoffreyBooth/tests-exit-code
Failing tests exit code; separate building and testing browser compiler
2017-04-16 09:40:08 +02:00
Geoffrey Booth
faf6d179be cake build:browser should just assemble the browser build, not also test it; add cake build:browser:full to additionally run the tests 2017-04-15 13:51:11 -07:00
Geoffrey Booth
d141d5c9ae If the tests fail, return a non-zero exit code 2017-04-15 13:44:14 -07:00
Geoffrey Booth
a36b45434f Merge branch 'master' of github.com:jashkenas/coffeescript 2017-04-13 20:40:24 -07:00
Geoffrey Booth
2ec1a1851d Update 2.0.0-beta1 docs 2017-04-13 20:37:55 -07:00
Geoffrey Booth
db216ec384 [CS2] 2.0.0-beta1 (#4499)
* Fix browser build to incorporate Markdown-It, not Marked

* Update Google Closure Compiler; recompile browser build but with MINIFY=false, because Closure Compiler throws an error on our current code; see https://github.com/google/closure-compiler-js/issues/59

* Bump version to 2.0.0-beta1; do release build, with updated docs and annotated source
2017-04-13 10:42:32 -07:00
Geoffrey Booth
9b77371ea8 Merge commit '72cf485dceb6a88abb3b83493032734409c3591a' into 2
# Conflicts:
#	Cakefile
#	docs/v1/index.html
#	documentation/sections/changelog.md
#	documentation/sections/installation.md
#	documentation/sections/introduction.md
#	lib/coffee-script/nodes.js
#	lib/coffee-script/rewriter.js
#	lib/coffee-script/sourcemap.js
#	lib/coffeescript/browser.js
#	lib/coffeescript/cake.js
#	lib/coffeescript/coffeescript.js
#	lib/coffeescript/command.js
#	lib/coffeescript/grammar.js
#	lib/coffeescript/helpers.js
#	lib/coffeescript/index.js
#	lib/coffeescript/lexer.js
#	lib/coffeescript/optparse.js
#	lib/coffeescript/register.js
#	lib/coffeescript/repl.js
#	lib/coffeescript/scope.js
#	package.json
2017-04-12 20:27:57 -07:00
Geoffrey Booth
72cf485dce 1.12.5 (#4495)
* Use Markdown-It instead of Marked for generating the docs; update package versions

* Fix links to v2 docs

* Bump version to 1.12.5; update changelog and compiled docs output

* Update compiled output for 1.12.5

* Improve styling for tables
2017-04-10 09:30:36 -07:00
Geoffrey Booth
d20f54967e [CS2] 2.0.0-beta1 docs (#4494)
* Update package versions; remove marked

* Revise docs to use Markdown-It: tables are now GitHub-Flavored Markdown tables, avoid hack of blockquoted code blocks

* Add anchors for sub-sections

* Add syntax highlighting to uneducable code blocks; fix missing italics variant for comments font

* Update docs about breaking changes in Literate CoffeeScript, move Breaking Changes section below Literate CoffeeScript section

* Update docs regarding destructuring default values breaking change

* Update changelog, with spitball release date for beta1

* Fix highlight function return statement
2017-04-09 23:07:58 -07:00
Julian Rosse
fb60070647 Fix #4491: import- and export-specific lexing should stop (#4492)
* Fix #4491: import- and export-specific lexing should stop

* split up tests

* fixes from code review
2017-04-09 02:53:43 -07:00
Geoffrey Booth
be7c1be75f Merge branch 'get-set-warning' into 2 2017-04-08 21:59:53 -07:00
Geoffrey Booth
8292d25d29 [CS2] Throw an error for ambiguous get or set keywords or function calls (#4484)
* Throw an error for ambiguous `get` or `set` function calls or ES5 getter/setter keywords, to warn the user to use parentheses if they intend a function call (or to inform them that `get` or `set` cannot be used as a keyword)

* Code golf

* Catch get or set keyword before static method

* DRY up getting the previous token

* Throw an error if get or set are used as keywords before what looks like a function or method with an interpolated/dynamic name

* Allow `get` or `set` parentheses-less function calls when first argument is a string without a colon (so a plain string, not a property accessor)

* Revert "Allow `get` or `set` parentheses-less function calls when first argument is a string without a colon (so a plain string, not a property accessor)"

This reverts commit 2d1addf5a4.

* Optimization

* No longer throw an error on `get` or `set` function calls to objects with dynamic property names (introduces a way to circumvent our check for trying to avoid the `get` or `set` keywords, but not worth the complications for this tiny edge case)
2017-04-08 21:59:09 -07:00
Julian Rosse
76945ab458 Fix #4487: Outdentation bug (#4488) 2017-04-08 13:12:55 -07:00
Simon Lydell
90ec761f95 Merge pull request #4490 from helixbass/iss4489_regex_octal_escape_sequence_bug
Fix #4489: Regex octal escape sequence bug
2017-04-07 10:40:11 +02:00
Julian Rosse
050aaa40f8 Fix #4489: Regex octal escape sequence bug 2017-04-06 19:39:13 -04:00
Geoffrey Booth
0576eb3a10 No longer throw an error on get or set function calls to objects with dynamic property names (introduces a way to circumvent our check for trying to avoid the get or set keywords, but not worth the complications for this tiny edge case) 2017-04-06 15:23:14 -07:00
Geoffrey Booth
7129f8347e Merge branch '2' into get-set-warning
# Conflicts:
#	lib/coffeescript/lexer.js
2017-04-06 10:12:46 -07:00
Geoffrey Booth
4d25907155 Optimization 2017-04-06 10:11:29 -07:00
Geoffrey Booth
b192e215a5 [CS2] Destructuring (#4478)
* Output simple array destructuring assignments to ES2015

* Output simple object destructured assignments to ES2015

* Compile shorthand object properties to ES2015 shorthand properties

This dramatically improves the appearance of destructured imports.

* Compile default values in destructured assignment to ES2015

* Rename `wrapInBraces` to `wrapInParentheses`, and `compilePatternMatch` to `compileDestructuring`, for clarity; style improvements (no `==` or `!=`, etc.)

* Don’t confuse the syntax highlighter

* Comment Assign::compilePatternMatch a bit

* Assignment expressions in conditionals are a bad practice

* Optional check for existence that only checks `!== undefined`, not `!= null`, to follow ES convention that default values only apply when a variable is undefined, not falsy

* Add comments; remove unnecessary array splats in function tests

* The fallback destructuring code should apply default values only if `undefined`, not falsy, to follow ES spec

* Support destructuring in function parameters (first pass); catch destructured reserved words

* Destructured variables in function parameter lists shouldn’t be added to the function body with `var` declarations; treat splat array function parameters the legacy way to avoid rethinking #4005

* Remove redundancy in undefined-only check for existence; fix passing option to check

* Fix undefined redundancy

* Simplify getting the variable name

* Reimplement “check for existence if not undefined” without creating a new operator

* `Obj::isAssignable` should not mutate; pass `lhs` property in from `Assign` or `Code` to child arrays and objects so that those child nodes are set as allowable for destructuring

* Revert changes to tests

* Restore revised test for empty destructuring assignment
2017-04-06 10:06:45 -07:00
Geoffrey Booth
5e1d978946 [CS2] Fix handling of tabbed code blocks in .litcoffee files (#4485)
* Add tabbed literate test; modernize Markdown title heading

* Better parsing of Literate CoffeeScript files, including now correct parsing of tabbed .litcoffee files; and more accurate stack traces (assuming you don’t do your own word wrapping within list items)

* Swap Marked for MarkdownIt for parsing the Markdown of Literate CoffeeScript files; use MarkdownIt’s `map` property to preserve correct line numbers

* Literate CoffeeScript tests: remove trailing whitespace, fix spelling

* Literate CoffeeScript tests: add block quote test

* Literate CoffeeScript (tabbed, at least) seems to need a consistent starting indentation

* Restore test

* Reference links work now in MarkdownIt

* Breaking change in Literate CoffeeScript: code blocks within HTML tags must be unindented

* Breaking change in Literate CoffeeScript: code blocks within lists need a blank line separating them from the list item text
2017-04-06 09:59:11 -07:00
Geoffrey Booth
a7447d5bba Revert "Allow get or set parentheses-less function calls when first argument is a string without a colon (so a plain string, not a property accessor)"
This reverts commit 2d1addf5a4.
2017-04-06 09:28:23 -07:00
Geoffrey Booth
2d1addf5a4 Allow get or set parentheses-less function calls when first argument is a string without a colon (so a plain string, not a property accessor) 2017-04-06 00:47:06 -07:00
Geoffrey Booth
962374aec1 Throw an error if get or set are used as keywords before what looks like a function or method with an interpolated/dynamic name 2017-04-04 17:03:11 -07:00
Geoffrey Booth
ed4c8286a2 DRY up getting the previous token 2017-04-04 17:00:43 -07:00
Geoffrey Booth
fcf7ddaf45 Catch get or set keyword before static method 2017-04-04 16:31:52 -07:00
Geoffrey Booth
725fe8e018 Code golf 2017-04-04 00:05:14 -07:00
Geoffrey Booth
5596dac5e1 Throw an error for ambiguous get or set function calls or ES5 getter/setter keywords, to warn the user to use parentheses if they intend a function call (or to inform them that get or set cannot be used as a keyword) 2017-04-03 22:43:50 -07:00
Geoffrey Booth
57c0b16eeb Merge pull request #4469 from mrmowgli/2-docs
[CS2] An explanation of why we don’t currently support certain features
2017-04-03 22:40:56 -07:00
Geoffrey Booth
0c06fb2b9f Merge branch '2' into 2-docs 2017-04-02 23:13:00 -07:00
Geoffrey Booth
cfdec64958 Merge branch 'master' of github.com:jashkenas/coffeescript into 2
# Conflicts:
#	lib/coffee-script/parser.js
#	lib/coffeescript/lexer.js
2017-04-02 23:10:31 -07:00
Geoffrey Booth
d0c6e53b83 Merge branch '2' into 2-docs
# Conflicts:
#	documentation/sections/coffeescript_2.md
2017-04-02 22:55:31 -07:00
Geoffrey Booth
27caf62322 Merge discussion of CoffeeScript’s benefits into expanded CoffeeScript 2 section and revised Contributing section 2017-04-02 22:53:18 -07:00
Geoffrey Booth
b8df321058 Merge unsupported let/const and get/set sections, shorten 2017-04-02 22:52:37 -07:00
Simon Lydell
c1e3c02d13 Merge pull request #4483 from GeoffreyBooth/fix-export-default
Fix #4451 and 4481: `default` in `export` statements
2017-04-03 07:42:50 +02:00
Geoffrey Booth
06f6efa6d5 Bump minimum Node version to 7.6, which has non-harmony support for async/await; make async tests always enabled, not just for harmony mode 2017-04-02 22:05:09 -07:00
7anshuai
c035d53fb0 Fix broken links in 2 docs (#4480)
Thanks!
2017-04-02 20:09:13 -07:00
Geoffrey Booth
dde7b0d98a Fix #4481: Export an imported member named default 2017-04-02 17:56:51 -07:00
Geoffrey Booth
98d1644c5b Fix #4451: Treat default as a keyword in an export statement only when it follows export or as 2017-04-02 17:36:25 -07:00
mrmowgli
5888ac56d8 Added example, simplified text via suggestion from GeoffreyBooth 2017-03-22 05:16:55 -04:00
mrmowgli
a6bf72a791 Remove language and add link to Wiki article- In the Wild. 2017-03-22 01:51:07 -04:00
mrmowgli
3aa177c88f Reduced overall size per section, cleaned up some style issues and fixed some spelling issues. 2017-03-21 04:59:25 -04:00
mrmowgli
608799f5d0 Looking for comments, Documentation of unsupported features, and suggested menu locations. Separated Why Coffeescript out. Yes I know I need to trim let/const down. 2017-03-19 06:33:15 -04:00
mrmowgli
97aef9b30d An explanation of why we don't currently support certain features within CS2. First draft. 2017-03-16 07:05:30 -04:00
Geoffrey Booth
ca0fd229e1 Update v2 NPM installation instructions 2017-02-22 10:58:10 -08:00
Jeremy Ashkenas
a9bd53d77f Merge pull request #4448 from GeoffreyBooth/2-docs-on-master
2 docs on master
2017-02-22 13:16:44 -05:00
Geoffrey
ccbf3152af Update NPM installation instructions 2017-02-21 21:12:40 -08:00
Geoffrey
f8ce1a8183 Teaser for CoffeeScript 2, link to 2 docs 2017-02-21 20:58:31 -08:00
Geoffrey Booth
cee1076e1d Copy the generated output CS2 docs onto master so that GitHub pages can publish them 2017-02-21 08:35:58 -08:00
151 changed files with 14165 additions and 6790 deletions

1
.gitignore vendored
View File

@@ -8,3 +8,4 @@ test/*.js
parser.output
/node_modules
npm-debug.log*
yarn.lock

View File

@@ -6,4 +6,4 @@
* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffeescript/tree/master/src). If youre just getting started with CoffeeScript, theres a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide).
* In your pull request, do not add documentation to `index.html` or re-build the minified `coffeescript.js` file. Well do those things before cutting a new release.
* In your pull request, do not add documentation to `index.html` or re-build the minified `coffeescript.js` file. Well do those things before cutting a new release. You _should,_ however, commit the updated compiled JavaScript files in `lib`.

116
Cakefile
View File

@@ -1,4 +1,5 @@
fs = require 'fs'
os = require 'os'
path = require 'path'
_ = require 'underscore'
{ spawn, exec, execSync } = require 'child_process'
@@ -51,14 +52,8 @@ run = (args, callback) ->
buildParser = ->
helpers.extend global, require 'util'
require 'jison'
parser = require('./lib/coffeescript/grammar').parser.generate()
# Patch Jisons output, until https://github.com/zaach/jison/pull/339 is accepted,
# to ensure that require('fs') is only called where it exists.
parser = parser.replace "var source = require('fs')", """
var source = '';
var fs = require('fs');
if (typeof fs !== 'undefined' && fs !== null)
source = fs"""
# We don't need `moduleMain`, since the parser is unlikely to be run standalone.
parser = require('./lib/coffeescript/grammar').parser.generate(moduleMain: ->)
fs.writeFileSync 'lib/coffeescript/parser.js', parser
buildExceptParser = (callback) ->
@@ -116,20 +111,12 @@ task 'build:full', 'build the CoffeeScript compiler from source twice, and run t
build ->
build testBuiltCode
task 'build:browser', 'build the merged script for inclusion in the browser', ->
task 'build:browser', 'merge the built scripts into a single file for use in a browser', ->
code = """
require['../../package.json'] = (function() {
return #{fs.readFileSync "./package.json"};
})();
"""
for {name, src} in [{name: 'marked', src: 'lib/marked.js'}]
code += """
require['#{name}'] = (function() {
var exports = {}, module = {exports: exports};
#{fs.readFileSync "node_modules/#{name}/#{src}"}
return module.exports;
})();
"""
for name in ['helpers', 'rewriter', 'lexer', 'parser', 'scope', 'nodes', 'sourcemap', 'coffeescript', 'browser']
code += """
require['./#{name}'] = (function() {
@@ -143,7 +130,7 @@ task 'build:browser', 'build the merged script for inclusion in the browser', ->
var CoffeeScript = function() {
function require(path){ return require[path]; }
#{code}
return require['./coffeescript'];
return require['./browser'];
}();
if (typeof define === 'function' && define.amd) {
@@ -153,15 +140,23 @@ task 'build:browser', 'build the merged script for inclusion in the browser', ->
}
}(this));
"""
unless process.env.MINIFY is 'false'
{compiledCode: code} = require('google-closure-compiler-js').compile
jsCode: [
src: code
languageOut: if majorVersion is 1 then 'ES5' else 'ES6'
]
babel = require 'babel-core'
presets = []
# Exclude the `modules` plugin in order to not break the `}(this));`
# at the end of the above code block.
presets.push ['env', {modules: no}] unless process.env.TRANSFORM is 'false'
presets.push 'babili' unless process.env.MINIFY is 'false'
babelOptions =
compact: process.env.MINIFY isnt 'false'
presets: presets
sourceType: 'script'
{ code } = babel.transform code, babelOptions unless presets.length is 0
outputFolder = "docs/v#{majorVersion}/browser-compiler"
fs.mkdirSync outputFolder unless fs.existsSync outputFolder
fs.writeFileSync "#{outputFolder}/coffeescript.js", header + '\n' + code
task 'build:browser:full', 'merge the built scripts into a single file for use in a browser, and test it', ->
invoke 'build:browser'
console.log "built ... running browser tests:"
invoke 'test:browser'
@@ -199,22 +194,36 @@ buildDocs = (watch = no) ->
codeFor = require "./documentation/v#{majorVersion}/code.coffee"
htmlFor = ->
marked = require 'marked'
markdownRenderer = new marked.Renderer()
markdownRenderer.heading = (text, level) ->
"<h#{level}>#{text}</h#{level}>" # Dont let marked add an id
markdownRenderer.code = (code) ->
hljs = require 'highlight.js'
hljs.configure classPrefix: ''
markdownRenderer = require('markdown-it')
html: yes
typographer: yes
highlight: (str, lang) ->
# From https://github.com/markdown-it/markdown-it#syntax-highlighting
if lang and hljs.getLanguage(lang)
try
return hljs.highlight(lang, str).value
catch ex
return '' # No syntax highlighting
# Add some custom overrides to Markdown-Its rendering, per
# https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer
defaultFence = markdownRenderer.renderer.rules.fence
markdownRenderer.renderer.rules.fence = (tokens, idx, options, env, slf) ->
code = tokens[idx].content
if code.indexOf('codeFor(') is 0 or code.indexOf('releaseHeader(') is 0
"<%= #{code} %>"
else
"<pre><code>#{code}</code></pre>" # Default
"<blockquote class=\"uneditable-code-block\">#{defaultFence.apply @, arguments}</blockquote>"
(file, bookmark) ->
md = fs.readFileSync "#{sectionsSourceFolder}/#{file}.md", 'utf-8'
md = md.replace /<%= releaseHeader %>/g, releaseHeader
md = md.replace /<%= majorVersion %>/g, majorVersion
md = md.replace /<%= fullVersion %>/g, CoffeeScript.VERSION
html = marked md, renderer: markdownRenderer
html = markdownRenderer.render md
html = _.template(html)
codeFor: codeFor()
releaseHeader: releaseHeader
@@ -325,7 +334,7 @@ task 'doc:source:watch', 'watch and continually rebuild the annotated source doc
task 'release', 'build and test the CoffeeScript source, and build the documentation', ->
invoke 'build:full'
invoke 'build:browser'
invoke 'build:browser:full'
invoke 'doc:site'
invoke 'doc:test'
invoke 'doc:source'
@@ -354,7 +363,7 @@ task 'bench', 'quick benchmark of compilation time', ->
# Run the CoffeeScript test suite.
runTests = (CoffeeScript) ->
CoffeeScript.register()
CoffeeScript.register() unless global.testingBrowser
startTime = Date.now()
# These are attached to `global` so that theyre accessible from within
@@ -369,6 +378,10 @@ runTests = (CoffeeScript) ->
# Convenience aliases.
global.CoffeeScript = CoffeeScript
global.Repl = require './lib/coffeescript/repl'
global.bold = bold
global.red = red
global.green = green
global.reset = reset
# Our test helper function for delimiting different test cases.
global.test = (description, fn) ->
@@ -403,11 +416,6 @@ runTests = (CoffeeScript) ->
# Run every test in the `test` folder, recording failures.
files = fs.readdirSync 'test'
# Ignore async test file if async/await is not available
asyncSupported = parseInt(process.versions.node.split('.')[0]) >= 7 and
('--harmony' in process.execArgv or '--harmony-async-await' in process.execArgv)
files.splice files.indexOf('async.coffee'), 1 unless asyncSupported
for file in files when helpers.isCoffee file
literate = helpers.isLiterate file
currentFile = filename = path.join 'test', file
@@ -420,7 +428,8 @@ runTests = (CoffeeScript) ->
task 'test', 'run the CoffeeScript language test suite', ->
runTests CoffeeScript
testResults = runTests CoffeeScript
process.exit 1 unless testResults
task 'test:browser', 'run the test suite against the merged browser script', ->
@@ -428,4 +437,31 @@ task 'test:browser', 'run the test suite against the merged browser script', ->
result = {}
global.testingBrowser = yes
(-> eval source).call result
runTests result.CoffeeScript
testResults = runTests result.CoffeeScript
process.exit 1 unless testResults
task 'test:integrations', 'test the module integrated with other libraries and environments', ->
# Tools like Webpack and Browserify generate builds intended for a browser
# environment where Node modules are not available. We want to ensure that
# the CoffeeScript module as presented by the `browser` key in `package.json`
# can be built by such tools; if such a build succeeds, it verifies that no
# Node modules are required as part of the compiler (as opposed to the tests)
# and that therefore the compiler will run in a browser environment.
tmpdir = os.tmpdir()
try
buildLog = execSync "./node_modules/webpack/bin/webpack.js
--entry=./
--output-library=CoffeeScript
--output-library-target=commonjs2
--output-path=#{tmpdir}
--output-filename=coffeescript.js"
catch exception
console.error buildLog.toString()
throw exception
builtCompiler = path.join tmpdir, 'coffeescript.js'
CoffeeScript = require builtCompiler
global.testingBrowser = yes
testResults = runTests CoffeeScript
fs.unlinkSync builtCompiler
process.exit 1 unless testResults

View File

@@ -22,10 +22,10 @@ CoffeeScript is a little language that compiles into JavaScript.
## Installation
If you have the node package manager, npm, installed:
Once you have Node.js installed:
```shell
npm install --global coffee-script
npm install --global coffeescript
```
Leave off the `--global` if you dont wish to install globally.
@@ -46,7 +46,7 @@ coffee -c /path/to/script.coffee
For documentation, usage, and examples, see: http://coffeescript.org/
To suggest a feature or report a bug: http://github.com/jashkenas/coffeescript/issues
To suggest a feature or report a bug: https://github.com/jashkenas/coffeescript/issues
If youd like to chat, drop by #coffeescript on Freenode IRC.
@@ -54,4 +54,4 @@ The source repository: https://github.com/jashkenas/coffeescript.git
Changelog: http://coffeescript.org/#changelog
Our lovely and talented contributors are listed here: http://github.com/jashkenas/coffeescript/contributors
Our lovely and talented contributors are listed here: https://github.com/jashkenas/coffeescript/contributors

View File

@@ -2,6 +2,17 @@
var path = require('path');
var fs = require('fs');
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require(lib + '/coffeescript/cake').run();
var potentialPaths = [
path.join(process.cwd(), 'node_modules/coffeescript/lib/coffeescript'),
path.join(process.cwd(), 'node_modules/coffeescript/lib/coffee-script'),
path.join(process.cwd(), 'node_modules/coffee-script/lib/coffee-script'),
path.join(__dirname, '../lib/coffeescript')
];
for (var i = 0, len = potentialPaths.length; i < len; i++) {
if (fs.existsSync(potentialPaths[i])) {
require(potentialPaths[i] + '/cake').run();
break;
}
}

View File

@@ -2,6 +2,17 @@
var path = require('path');
var fs = require('fs');
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require(lib + '/coffeescript/command').run();
var potentialPaths = [
path.join(process.cwd(), 'node_modules/coffeescript/lib/coffeescript'),
path.join(process.cwd(), 'node_modules/coffeescript/lib/coffee-script'),
path.join(process.cwd(), 'node_modules/coffee-script/lib/coffee-script'),
path.join(__dirname, '../lib/coffeescript')
];
for (var i = 0, len = potentialPaths.length; i < len; i++) {
if (fs.existsSync(potentialPaths[i])) {
require(potentialPaths[i] + '/command').run();
break;
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "coffeescript",
"main": [
"lib/coffeescript/coffeescript.js"
"lib/coffeescript/browser.js"
],
"description": "Unfancy JavaScript",
"keywords": [

View File

@@ -116,7 +116,7 @@
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p><code>cake</code> is a simplified version of <a href="http://www.gnu.org/software/make/">Make</a>
(<a href="http://rake.rubyforge.org/">Rake</a>, <a href="http://github.com/280north/jake">Jake</a>)
(<a href="http://rake.rubyforge.org/">Rake</a>, <a href="https://github.com/280north/jake">Jake</a>)
for CoffeeScript. You define tasks with names and descriptions in a Cakefile,
and can call them from the command line, or invoke them from other tasks.</p>
<p>Running <code>cake</code> with no arguments will print out a list of all the tasks in the

View File

@@ -115,17 +115,17 @@
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>The CoffeeScript parser is generated by <a href="http://github.com/zaach/jison">Jison</a>
<p>The CoffeeScript parser is generated by <a href="https://github.com/zaach/jison">Jison</a>
from this grammar file. Jison is a bottom-up parser generator, similar in
style to <a href="http://www.gnu.org/software/bison">Bison</a>, implemented in JavaScript.
It can recognize <a href="http://en.wikipedia.org/wiki/LR_grammar">LALR(1), LR(0), SLR(1), and LR(1)</a>
It can recognize <a href="https://en.wikipedia.org/wiki/LR_grammar">LALR(1), LR(0), SLR(1), and LR(1)</a>
type grammars. To create the Jison parser, we list the pattern to match
on the left-hand side, and the action to take (usually the creation of syntax
tree nodes) on the right. As the parser runs, it
shifts tokens from our token stream, from left to right, and
<a href="http://en.wikipedia.org/wiki/Bottom-up_parsing">attempts to match</a>
<a href="https://en.wikipedia.org/wiki/Bottom-up_parsing">attempts to match</a>
the token sequence against the rules below. When a match can be made, it
reduces into the <a href="http://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols">nonterminal</a>
reduces into the <a href="https://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols">nonterminal</a>
(the enclosing name at the top), and we proceed from there.</p>
<p>If you run the <code>cake build:parser</code> command, Jison constructs a parse table
from our rules and saves it into <code>lib/parser.js</code>.</p>
@@ -199,7 +199,7 @@ wrapper and just returning the value directly.</p>
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Our handy DSL for Jison grammar generation, thanks to
<a href="http://github.com/creationix">Tim Caswell</a>. For every rule in the grammar,
<a href="https://github.com/creationix">Tim Caswell</a>. For every rule in the grammar,
we pass the pattern-defining string, the action to run, and extra options,
optionally. If no action is specified, we simply pass the value of the
previous nonterminal.</p>
@@ -968,6 +968,7 @@ and optional references to the superclass.</p>
o <span class="hljs-string">'Identifier AS Identifier'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> ExportSpecifier $<span class="hljs-number">1</span>, $<span class="hljs-number">3</span>
o <span class="hljs-string">'Identifier AS DEFAULT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> ExportSpecifier $<span class="hljs-number">1</span>, <span class="hljs-keyword">new</span> Literal $<span class="hljs-number">3</span>
o <span class="hljs-string">'DEFAULT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> ExportSpecifier <span class="hljs-keyword">new</span> Literal $<span class="hljs-number">1</span>
o <span class="hljs-string">'DEFAULT AS Identifier'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> ExportSpecifier <span class="hljs-keyword">new</span> Literal($<span class="hljs-number">1</span>), $<span class="hljs-number">3</span>
]</pre></div></div>
</li>

View File

@@ -121,7 +121,7 @@ a token is produced, we consume the match, and start again. Tokens are in the
form:</p>
<pre><code>[tag, value, locationData]
</code></pre><p>where locationData is {first_line, first_column, last_line, last_column}, which is a
format that can be fed directly into <a href="http://github.com/zaach/jison">Jison</a>. These
format that can be fed directly into <a href="https://github.com/zaach/jison">Jison</a>. These
are read by jison in the <code>parser.lexer</code> function defined in coffee-script.coffee.</p>
</div>
@@ -219,6 +219,7 @@ it has consumed.</p>
@seenFor = <span class="hljs-literal">no</span> <span class="hljs-comment"># Used to recognize FORIN, FOROF and FORFROM tokens.</span>
@seenImport = <span class="hljs-literal">no</span> <span class="hljs-comment"># Used to recognize IMPORT FROM? AS? tokens.</span>
@seenExport = <span class="hljs-literal">no</span> <span class="hljs-comment"># Used to recognize EXPORT FROM? AS? tokens.</span>
@importSpecifierList = <span class="hljs-literal">no</span> <span class="hljs-comment"># Used to identify when in an IMPORT {...} FROM? ...</span>
@exportSpecifierList = <span class="hljs-literal">no</span> <span class="hljs-comment"># Used to identify when in an EXPORT {...} FROM? ...</span>
@chunkLine =
@@ -380,10 +381,10 @@ though <code>is</code> means <code>===</code> otherwise.</p>
<span class="hljs-keyword">if</span> @tag() <span class="hljs-keyword">in</span> [<span class="hljs-string">'DEFAULT'</span>, <span class="hljs-string">'IMPORT_ALL'</span>, <span class="hljs-string">'IDENTIFIER'</span>]
@token <span class="hljs-string">'AS'</span>, id
<span class="hljs-keyword">return</span> id.length
<span class="hljs-keyword">if</span> id <span class="hljs-keyword">is</span> <span class="hljs-string">'as'</span> <span class="hljs-keyword">and</span> @seenExport <span class="hljs-keyword">and</span> @tag() <span class="hljs-keyword">is</span> <span class="hljs-string">'IDENTIFIER'</span>
<span class="hljs-keyword">if</span> id <span class="hljs-keyword">is</span> <span class="hljs-string">'as'</span> <span class="hljs-keyword">and</span> @seenExport <span class="hljs-keyword">and</span> @tag() <span class="hljs-keyword">in</span> [<span class="hljs-string">'IDENTIFIER'</span>, <span class="hljs-string">'DEFAULT'</span>]
@token <span class="hljs-string">'AS'</span>, id
<span class="hljs-keyword">return</span> id.length
<span class="hljs-keyword">if</span> id <span class="hljs-keyword">is</span> <span class="hljs-string">'default'</span> <span class="hljs-keyword">and</span> @seenExport
<span class="hljs-keyword">if</span> id <span class="hljs-keyword">is</span> <span class="hljs-string">'default'</span> <span class="hljs-keyword">and</span> @seenExport <span class="hljs-keyword">and</span> @tag() <span class="hljs-keyword">in</span> [<span class="hljs-string">'EXPORT'</span>, <span class="hljs-string">'AS'</span>]
@token <span class="hljs-string">'DEFAULT'</span>, id
<span class="hljs-keyword">return</span> id.length
@@ -565,14 +566,14 @@ properly tag the <code>from</code>.</p>
indent = attempt <span class="hljs-keyword">if</span> indent <span class="hljs-keyword">is</span> <span class="hljs-literal">null</span> <span class="hljs-keyword">or</span> <span class="hljs-number">0</span> &lt; attempt.length &lt; indent.length
indentRegex = <span class="hljs-regexp">/// \n<span class="hljs-subst">#{indent}</span> ///</span>g <span class="hljs-keyword">if</span> indent
@mergeInterpolationTokens tokens, {delimiter}, <span class="hljs-function"><span class="hljs-params">(value, i)</span> =&gt;</span>
value = @formatString value
value = @formatString value, delimiter: quote
value = value.replace indentRegex, <span class="hljs-string">'\n'</span> <span class="hljs-keyword">if</span> indentRegex
value = value.replace LEADING_BLANK_LINE, <span class="hljs-string">''</span> <span class="hljs-keyword">if</span> i <span class="hljs-keyword">is</span> <span class="hljs-number">0</span>
value = value.replace TRAILING_BLANK_LINE, <span class="hljs-string">''</span> <span class="hljs-keyword">if</span> i <span class="hljs-keyword">is</span> $
value
<span class="hljs-keyword">else</span>
@mergeInterpolationTokens tokens, {delimiter}, <span class="hljs-function"><span class="hljs-params">(value, i)</span> =&gt;</span>
value = @formatString value
value = @formatString value, delimiter: quote
value = value.replace SIMPLE_STRING_OMIT, <span class="hljs-function"><span class="hljs-params">(match, offset)</span> -&gt;</span>
<span class="hljs-keyword">if</span> (i <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">and</span> offset <span class="hljs-keyword">is</span> <span class="hljs-number">0</span>) <span class="hljs-keyword">or</span>
(i <span class="hljs-keyword">is</span> $ <span class="hljs-keyword">and</span> offset + match.length <span class="hljs-keyword">is</span> value.length)
@@ -684,6 +685,7 @@ borrow some basic heuristics from JavaScript and Ruby.</p>
<span class="hljs-keyword">when</span> match = REGEX.exec @chunk
[regex, body, closed] = match
@validateEscapes body, isRegex: <span class="hljs-literal">yes</span>, offsetInChunk: <span class="hljs-number">1</span>
body = @formatRegex body, delimiter: <span class="hljs-string">'/'</span>
index = regex.length
[..., prev] = @tokens
<span class="hljs-keyword">if</span> prev
@@ -742,6 +744,8 @@ can close multiple indents, so we need to know how far in we happen to be.</p>
indent = match[<span class="hljs-number">0</span>]
@seenFor = <span class="hljs-literal">no</span>
@seenImport = <span class="hljs-literal">no</span> <span class="hljs-keyword">unless</span> @importSpecifierList
@seenExport = <span class="hljs-literal">no</span> <span class="hljs-keyword">unless</span> @exportSpecifierList
size = indent.length - <span class="hljs-number">1</span> - indent.lastIndexOf <span class="hljs-string">'\n'</span>
noNewlines = @unfinished()
@@ -751,7 +755,7 @@ can close multiple indents, so we need to know how far in we happen to be.</p>
<span class="hljs-keyword">return</span> indent.length
<span class="hljs-keyword">if</span> size &gt; @indent
<span class="hljs-keyword">if</span> noNewlines
<span class="hljs-keyword">if</span> noNewlines <span class="hljs-keyword">or</span> @tag() <span class="hljs-keyword">is</span> <span class="hljs-string">'RETURN'</span>
@indebt = size - @indent
@suppressNewlines()
<span class="hljs-keyword">return</span> indent.length
@@ -923,7 +927,11 @@ parentheses that indicate a method call from regular parentheses, and so on.</p>
@error message, origin[<span class="hljs-number">2</span>] <span class="hljs-keyword">if</span> message
<span class="hljs-keyword">return</span> value.length <span class="hljs-keyword">if</span> skipToken
<span class="hljs-keyword">if</span> value <span class="hljs-keyword">is</span> <span class="hljs-string">'{'</span> <span class="hljs-keyword">and</span> prev?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'EXPORT'</span>
<span class="hljs-keyword">if</span> value <span class="hljs-keyword">is</span> <span class="hljs-string">'{'</span> <span class="hljs-keyword">and</span> @seenImport
@importSpecifierList = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> @importSpecifierList <span class="hljs-keyword">and</span> value <span class="hljs-keyword">is</span> <span class="hljs-string">'}'</span>
@importSpecifierList = <span class="hljs-literal">no</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> value <span class="hljs-keyword">is</span> <span class="hljs-string">'{'</span> <span class="hljs-keyword">and</span> prev?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'EXPORT'</span>
@exportSpecifierList = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> @exportSpecifierList <span class="hljs-keyword">and</span> value <span class="hljs-keyword">is</span> <span class="hljs-string">'}'</span>
@exportSpecifierList = <span class="hljs-literal">no</span>
@@ -1255,7 +1263,7 @@ sane location data.</p>
</div>
<div class="content"><div class='highlight'><pre> converted = fn token[<span class="hljs-number">1</span>], i</pre></div></div>
<div class="content"><div class='highlight'><pre> converted = fn.call <span class="hljs-keyword">this</span>, token[<span class="hljs-number">1</span>], i</pre></div></div>
</li>
@@ -1549,13 +1557,22 @@ not specified, the length of <code>value</code> will be used.</p>
LINE_CONTINUER.test(@chunk) <span class="hljs-keyword">or</span>
@tag() <span class="hljs-keyword">in</span> [<span class="hljs-string">'\\'</span>, <span class="hljs-string">'.'</span>, <span class="hljs-string">'?.'</span>, <span class="hljs-string">'?::'</span>, <span class="hljs-string">'UNARY'</span>, <span class="hljs-string">'MATH'</span>, <span class="hljs-string">'UNARY_MATH'</span>, <span class="hljs-string">'+'</span>, <span class="hljs-string">'-'</span>,
<span class="hljs-string">'**'</span>, <span class="hljs-string">'SHIFT'</span>, <span class="hljs-string">'RELATION'</span>, <span class="hljs-string">'COMPARE'</span>, <span class="hljs-string">'&amp;'</span>, <span class="hljs-string">'^'</span>, <span class="hljs-string">'|'</span>, <span class="hljs-string">'&amp;&amp;'</span>, <span class="hljs-string">'||'</span>,
<span class="hljs-string">'BIN?'</span>, <span class="hljs-string">'THROW'</span>, <span class="hljs-string">'EXTENDS'</span>]
<span class="hljs-string">'BIN?'</span>, <span class="hljs-string">'THROW'</span>, <span class="hljs-string">'EXTENDS'</span>, <span class="hljs-string">'DEFAULT'</span>]
formatString: <span class="hljs-function"><span class="hljs-params">(str)</span> -&gt;</span>
str.replace STRING_OMIT, <span class="hljs-string">'$1'</span>
formatString: <span class="hljs-function"><span class="hljs-params">(str, options)</span> -&gt;</span>
@replaceUnicodeCodePointEscapes str.replace(STRING_OMIT, <span class="hljs-string">'$1'</span>), options
formatHeregex: <span class="hljs-function"><span class="hljs-params">(str)</span> -&gt;</span>
str.replace HEREGEX_OMIT, <span class="hljs-string">'$1$2'</span></pre></div></div>
@formatRegex str.replace(HEREGEX_OMIT, <span class="hljs-string">'$1$2'</span>), delimiter: <span class="hljs-string">'///'</span>
formatRegex: <span class="hljs-function"><span class="hljs-params">(str, options)</span> -&gt;</span>
@replaceUnicodeCodePointEscapes str, options
unicodeCodePointToUnicodeEscapes: <span class="hljs-function"><span class="hljs-params">(codePoint)</span> -&gt;</span>
<span class="hljs-function"> <span class="hljs-title">toUnicodeEscape</span> = <span class="hljs-params">(val)</span> -&gt;</span>
str = val.toString <span class="hljs-number">16</span>
<span class="hljs-string">"\\u<span class="hljs-subst">#{repeat <span class="hljs-string">'0'</span>, <span class="hljs-number">4</span> - str.length}</span><span class="hljs-subst">#{str}</span>"</span>
<span class="hljs-keyword">return</span> toUnicodeEscape(codePoint) <span class="hljs-keyword">if</span> codePoint &lt; <span class="hljs-number">0x10000</span></pre></div></div>
</li>
@@ -1566,24 +1583,13 @@ not specified, the length of <code>value</code> will be used.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-59">&#182;</a>
</div>
<p>Validates escapes in strings and regexes.</p>
<p>surrogate pair</p>
</div>
<div class="content"><div class='highlight'><pre> validateEscapes: <span class="hljs-function"><span class="hljs-params">(str, options = {})</span> -&gt;</span>
match = INVALID_ESCAPE.exec str
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> match
[[], before, octal, hex, unicode] = match
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> options.isRegex <span class="hljs-keyword">and</span> octal <span class="hljs-keyword">and</span> octal.charAt(<span class="hljs-number">0</span>) <span class="hljs-keyword">isnt</span> <span class="hljs-string">'0'</span>
message =
<span class="hljs-keyword">if</span> octal
<span class="hljs-string">"octal escape sequences are not allowed"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"invalid escape sequence"</span>
invalidEscape = <span class="hljs-string">"\\<span class="hljs-subst">#{octal <span class="hljs-keyword">or</span> hex <span class="hljs-keyword">or</span> unicode}</span>"</span>
@error <span class="hljs-string">"<span class="hljs-subst">#{message}</span> <span class="hljs-subst">#{invalidEscape}</span>"</span>,
offset: (options.offsetInChunk ? <span class="hljs-number">0</span>) + match.index + before.length
length: invalidEscape.length</pre></div></div>
<div class="content"><div class='highlight'><pre> high = Math.floor((codePoint - <span class="hljs-number">0x10000</span>) / <span class="hljs-number">0x400</span>) + <span class="hljs-number">0xD800</span>
low = (codePoint - <span class="hljs-number">0x10000</span>) % <span class="hljs-number">0x400</span> + <span class="hljs-number">0xDC00</span>
<span class="hljs-string">"<span class="hljs-subst">#{toUnicodeEscape(high)}</span><span class="hljs-subst">#{toUnicodeEscape(low)}</span>"</span></pre></div></div>
</li>
@@ -1594,6 +1600,63 @@ not specified, the length of <code>value</code> will be used.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-60">&#182;</a>
</div>
<p>Replace \u{…} with \uxxxx[\uxxxx] in strings and regexes</p>
</div>
<div class="content"><div class='highlight'><pre> replaceUnicodeCodePointEscapes: <span class="hljs-function"><span class="hljs-params">(str, options)</span> -&gt;</span>
str.replace UNICODE_CODE_POINT_ESCAPE, <span class="hljs-function"><span class="hljs-params">(match, escapedBackslash, codePointHex, offset)</span> =&gt;</span>
<span class="hljs-keyword">return</span> escapedBackslash <span class="hljs-keyword">if</span> escapedBackslash
codePointDecimal = parseInt codePointHex, <span class="hljs-number">16</span>
<span class="hljs-keyword">if</span> codePointDecimal &gt; <span class="hljs-number">0x10ffff</span>
@error <span class="hljs-string">"unicode code point escapes greater than \\u{10ffff} are not allowed"</span>,
offset: offset + options.delimiter.length
length: codePointHex.length + <span class="hljs-number">4</span>
@unicodeCodePointToUnicodeEscapes codePointDecimal</pre></div></div>
</li>
<li id="section-61">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-61">&#182;</a>
</div>
<p>Validates escapes in strings and regexes.</p>
</div>
<div class="content"><div class='highlight'><pre> validateEscapes: <span class="hljs-function"><span class="hljs-params">(str, options = {})</span> -&gt;</span>
invalidEscapeRegex =
<span class="hljs-keyword">if</span> options.isRegex
REGEX_INVALID_ESCAPE
<span class="hljs-keyword">else</span>
STRING_INVALID_ESCAPE
match = invalidEscapeRegex.exec str
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> match
[[], before, octal, hex, unicodeCodePoint, unicode] = match
message =
<span class="hljs-keyword">if</span> octal
<span class="hljs-string">"octal escape sequences are not allowed"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"invalid escape sequence"</span>
invalidEscape = <span class="hljs-string">"\\<span class="hljs-subst">#{octal <span class="hljs-keyword">or</span> hex <span class="hljs-keyword">or</span> unicodeCodePoint <span class="hljs-keyword">or</span> unicode}</span>"</span>
@error <span class="hljs-string">"<span class="hljs-subst">#{message}</span> <span class="hljs-subst">#{invalidEscape}</span>"</span>,
offset: (options.offsetInChunk ? <span class="hljs-number">0</span>) + match.index + before.length
length: invalidEscape.length</pre></div></div>
</li>
<li id="section-62">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-62">&#182;</a>
</div>
<p>Constructs a string or regex by escaping certain characters.</p>
</div>
@@ -1612,11 +1675,11 @@ not specified, the length of <code>value</code> will be used.</p>
</li>
<li id="section-61">
<li id="section-63">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-61">&#182;</a>
<a class="pilcrow" href="#section-63">&#182;</a>
</div>
<p>Ignore escaped backslashes.</p>
@@ -1635,11 +1698,11 @@ not specified, the length of <code>value</code> will be used.</p>
</li>
<li id="section-62">
<li id="section-64">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-62">&#182;</a>
<a class="pilcrow" href="#section-64">&#182;</a>
</div>
<p>Throws an error at either a given offset from the current chunk or at the
location of a token (<code>token[2]</code>).</p>
@@ -1658,11 +1721,11 @@ location of a token (<code>token[2]</code>).</p>
</li>
<li id="section-63">
<li id="section-65">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-63">&#182;</a>
<a class="pilcrow" href="#section-65">&#182;</a>
</div>
<h2 id="helper-functions">Helper functions</h2>
@@ -1671,11 +1734,11 @@ location of a token (<code>token[2]</code>).</p>
</li>
<li id="section-64">
<li id="section-66">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-64">&#182;</a>
<a class="pilcrow" href="#section-66">&#182;</a>
</div>
</div>
@@ -1696,11 +1759,11 @@ exports.isUnassignable = isUnassignable</pre></div></div>
</li>
<li id="section-65">
<li id="section-67">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-65">&#182;</a>
<a class="pilcrow" href="#section-67">&#182;</a>
</div>
<p><code>from</code> isnt a CoffeeScript keyword, but it behaves like one in <code>import</code> and
<code>export</code> statements (handled above) and in the declaration line of a <code>for</code>
@@ -1715,11 +1778,11 @@ loop. Try to detect when <code>from</code> is a variable identifier and when it
</li>
<li id="section-66">
<li id="section-68">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-66">&#182;</a>
<a class="pilcrow" href="#section-68">&#182;</a>
</div>
<p><code>for i from from</code>, <code>for from from iterable</code></p>
@@ -1732,11 +1795,11 @@ loop. Try to detect when <code>from</code> is a variable identifier and when it
</li>
<li id="section-67">
<li id="section-69">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-67">&#182;</a>
<a class="pilcrow" href="#section-69">&#182;</a>
</div>
<p><code>for i from iterable</code></p>
@@ -1747,11 +1810,11 @@ loop. Try to detect when <code>from</code> is a variable identifier and when it
</li>
<li id="section-68">
<li id="section-70">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-68">&#182;</a>
<a class="pilcrow" href="#section-70">&#182;</a>
</div>
<p><code>for from…</code></p>
@@ -1763,11 +1826,11 @@ loop. Try to detect when <code>from</code> is a variable identifier and when it
</li>
<li id="section-69">
<li id="section-71">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-69">&#182;</a>
<a class="pilcrow" href="#section-71">&#182;</a>
</div>
<p><code>for {from}…</code>, <code>for [from]…</code>, <code>for {a, from}…</code>, <code>for {a: from}…</code></p>
@@ -1781,11 +1844,11 @@ loop. Try to detect when <code>from</code> is a variable identifier and when it
</li>
<li id="section-70">
<li id="section-72">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-70">&#182;</a>
<a class="pilcrow" href="#section-72">&#182;</a>
</div>
<h2 id="constants">Constants</h2>
@@ -1794,11 +1857,11 @@ loop. Try to detect when <code>from</code> is a variable identifier and when it
</li>
<li id="section-71">
<li id="section-73">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-71">&#182;</a>
<a class="pilcrow" href="#section-73">&#182;</a>
</div>
</div>
@@ -1806,11 +1869,11 @@ loop. Try to detect when <code>from</code> is a variable identifier and when it
</li>
<li id="section-72">
<li id="section-74">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-72">&#182;</a>
<a class="pilcrow" href="#section-74">&#182;</a>
</div>
<p>Keywords that CoffeeScript shares in common with JavaScript.</p>
@@ -1828,11 +1891,11 @@ loop. Try to detect when <code>from</code> is a variable identifier and when it
</li>
<li id="section-73">
<li id="section-75">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-73">&#182;</a>
<a class="pilcrow" href="#section-75">&#182;</a>
</div>
<p>CoffeeScript-only keywords.</p>
@@ -1860,11 +1923,11 @@ COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat COFFEE_ALIASES</pre></div></div>
</li>
<li id="section-74">
<li id="section-76">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-74">&#182;</a>
<a class="pilcrow" href="#section-76">&#182;</a>
</div>
<p>The list of keywords that are reserved by JavaScript, but not used, or are
used by CoffeeScript internally. We throw an error when these are encountered,
@@ -1883,11 +1946,11 @@ STRICT_PROSCRIBED = [<span class="hljs-string">'arguments'</span>, <span class="
</li>
<li id="section-75">
<li id="section-77">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-75">&#182;</a>
<a class="pilcrow" href="#section-77">&#182;</a>
</div>
<p>The superset of both JavaScript keywords and reserved words, none of which may
be used as identifiers or properties.</p>
@@ -1899,11 +1962,11 @@ be used as identifiers or properties.</p>
</li>
<li id="section-76">
<li id="section-78">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-76">&#182;</a>
<a class="pilcrow" href="#section-78">&#182;</a>
</div>
<p>The character code of the nasty Microsoft madness otherwise known as the BOM.</p>
@@ -1914,11 +1977,11 @@ be used as identifiers or properties.</p>
</li>
<li id="section-77">
<li id="section-79">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-77">&#182;</a>
<a class="pilcrow" href="#section-79">&#182;</a>
</div>
<p>Token matching regexes.</p>
@@ -1961,11 +2024,11 @@ HERE_JSTOKEN = <span class="hljs-regexp">///^ ``` ((?: [^`\\] | \\[\s\S] | `
</li>
<li id="section-78">
<li id="section-80">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-78">&#182;</a>
<a class="pilcrow" href="#section-80">&#182;</a>
</div>
<p>String-matching-regexes.</p>
@@ -1988,11 +2051,11 @@ HEREDOC_INDENT = <span class="hljs-regexp">/\n+([^\n\S]*)(?=\S)/g</span></pr
</li>
<li id="section-79">
<li id="section-81">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-79">&#182;</a>
<a class="pilcrow" href="#section-81">&#182;</a>
</div>
<p>Regex-matching-regexes.</p>
@@ -2009,7 +2072,7 @@ HEREDOC_INDENT = <span class="hljs-regexp">/\n+([^\n\S]*)(?=\S)/g</span></pr
///</span>
REGEX_FLAGS = <span class="hljs-regexp">/^\w*/</span>
VALID_FLAGS = <span class="hljs-regexp">/^(?!.*(.).*\1)[imgy]*$/</span>
VALID_FLAGS = <span class="hljs-regexp">/^(?!.*(.).*\1)[imguy]*$/</span>
HEREGEX = <span class="hljs-regexp">/// ^(?: [^\\/<span class="hljs-comment">#] | \\[\s\S] | /(?!//) | \#(?!\{) )* ///</span>
@@ -2026,11 +2089,11 @@ POSSIBLY_DIVISION = <span class="hljs-regexp">/// ^ /=?\s ///</span></pre></di
</li>
<li id="section-80">
<li id="section-82">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-80">&#182;</a>
<a class="pilcrow" href="#section-82">&#182;</a>
</div>
<p>Other regexes.</p>
@@ -2040,14 +2103,30 @@ POSSIBLY_DIVISION = <span class="hljs-regexp">/// ^ /=?\s ///</span></pre></di
LINE_CONTINUER = <span class="hljs-regexp">/// ^ \s* (?: , | \??\.(?![.\d]) | :: ) ///</span>
INVALID_ESCAPE = <span class="hljs-regexp">///
STRING_INVALID_ESCAPE = <span class="hljs-regexp">///
( (?:^|[^\\]) (?:\\\\)* ) <span class="hljs-comment"># make sure the escape isnt escaped</span>
\\ (
?: (0[0-7]|[1-7]) <span class="hljs-comment"># octal escape</span>
| (x(?![\da-fA-F]{2}).{0,2}) <span class="hljs-comment"># hex escape</span>
| (u(?![\da-fA-F]{4}).{0,4}) <span class="hljs-comment"># unicode escape</span>
| (u\{(?![\da-fA-F]{1,}\})[^}]*\}?) <span class="hljs-comment"># unicode code point escape</span>
| (u(?!\{|[\da-fA-F]{4}).{0,4}) <span class="hljs-comment"># unicode escape</span>
)
///</span>
REGEX_INVALID_ESCAPE = <span class="hljs-regexp">///
( (?:^|[^\\]) (?:\\\\)* ) <span class="hljs-comment"># make sure the escape isnt escaped</span>
\\ (
?: (0[0-7]) <span class="hljs-comment"># octal escape</span>
| (x(?![\da-fA-F]{2}).{0,2}) <span class="hljs-comment"># hex escape</span>
| (u\{(?![\da-fA-F]{1,}\})[^}]*\}?) <span class="hljs-comment"># unicode code point escape</span>
| (u(?!\{|[\da-fA-F]{4}).{0,4}) <span class="hljs-comment"># unicode escape</span>
)
///</span>
UNICODE_CODE_POINT_ESCAPE = <span class="hljs-regexp">///
( \\\\ ) <span class="hljs-comment"># make sure the escape isnt escaped</span>
|
\\u\{ ( [\da-fA-F]+ ) \}
///</span>g
LEADING_BLANK_LINE = <span class="hljs-regexp">/^[^\n\S]*\n/</span>
TRAILING_BLANK_LINE = <span class="hljs-regexp">/\n[^\n\S]*$/</span>
@@ -2057,11 +2136,11 @@ TRAILING_SPACES = <span class="hljs-regexp">/\s+$/</span></pre></div></div>
</li>
<li id="section-81">
<li id="section-83">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-81">&#182;</a>
<a class="pilcrow" href="#section-83">&#182;</a>
</div>
<p>Compound assignment tokens.</p>
@@ -2075,11 +2154,11 @@ TRAILING_SPACES = <span class="hljs-regexp">/\s+$/</span></pre></div></div>
</li>
<li id="section-82">
<li id="section-84">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-82">&#182;</a>
<a class="pilcrow" href="#section-84">&#182;</a>
</div>
<p>Unary tokens.</p>
@@ -2092,11 +2171,11 @@ UNARY_MATH = [<span class="hljs-string">'!'</span>, <span class="hljs-string">'~
</li>
<li id="section-83">
<li id="section-85">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-83">&#182;</a>
<a class="pilcrow" href="#section-85">&#182;</a>
</div>
<p>Bit-shifting tokens.</p>
@@ -2107,11 +2186,11 @@ UNARY_MATH = [<span class="hljs-string">'!'</span>, <span class="hljs-string">'~
</li>
<li id="section-84">
<li id="section-86">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-84">&#182;</a>
<a class="pilcrow" href="#section-86">&#182;</a>
</div>
<p>Comparison tokens.</p>
@@ -2122,11 +2201,11 @@ UNARY_MATH = [<span class="hljs-string">'!'</span>, <span class="hljs-string">'~
</li>
<li id="section-85">
<li id="section-87">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-85">&#182;</a>
<a class="pilcrow" href="#section-87">&#182;</a>
</div>
<p>Mathematical tokens.</p>
@@ -2137,11 +2216,11 @@ UNARY_MATH = [<span class="hljs-string">'!'</span>, <span class="hljs-string">'~
</li>
<li id="section-86">
<li id="section-88">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-86">&#182;</a>
<a class="pilcrow" href="#section-88">&#182;</a>
</div>
<p>Relational tokens that are negatable with <code>not</code> prefix.</p>
@@ -2152,11 +2231,11 @@ UNARY_MATH = [<span class="hljs-string">'!'</span>, <span class="hljs-string">'~
</li>
<li id="section-87">
<li id="section-89">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-87">&#182;</a>
<a class="pilcrow" href="#section-89">&#182;</a>
</div>
<p>Boolean tokens.</p>
@@ -2167,11 +2246,11 @@ UNARY_MATH = [<span class="hljs-string">'!'</span>, <span class="hljs-string">'~
</li>
<li id="section-88">
<li id="section-90">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-88">&#182;</a>
<a class="pilcrow" href="#section-90">&#182;</a>
</div>
<p>Tokens which could legitimately be invoked or indexed. An opening
parentheses or bracket following these tokens will be recorded as the start
@@ -2188,11 +2267,11 @@ INDEXABLE = CALLABLE.concat [
</li>
<li id="section-89">
<li id="section-91">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-89">&#182;</a>
<a class="pilcrow" href="#section-91">&#182;</a>
</div>
<p>Tokens which a regular expression will never immediately follow (except spaced
CALLABLEs in some cases), but which a division operator can.</p>
@@ -2205,11 +2284,11 @@ CALLABLEs in some cases), but which a division operator can.</p>
</li>
<li id="section-90">
<li id="section-92">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-90">&#182;</a>
<a class="pilcrow" href="#section-92">&#182;</a>
</div>
<p>Tokens that, when immediately preceding a <code>WHEN</code>, indicate that the <code>WHEN</code>
occurs at the start of a line. We disambiguate these from trailing whens to
@@ -2222,11 +2301,11 @@ avoid an ambiguity in the grammar.</p>
</li>
<li id="section-91">
<li id="section-93">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-91">&#182;</a>
<a class="pilcrow" href="#section-93">&#182;</a>
</div>
<p>Additional indent in front of these is ignored.</p>

View File

@@ -3941,7 +3941,7 @@ CoffeeScript operations into their JavaScript equivalents.</p>
<a class="pilcrow" href="#section-155">&#182;</a>
</div>
<p>Am I capable of
<a href="http://docs.python.org/reference/expressions.html#notin">Python-style comparison chaining</a>?</p>
<a href="https://docs.python.org/3/reference/expressions.html#not-in">Python-style comparison chaining</a>?</p>
</div>
@@ -4450,7 +4450,8 @@ parentheses, but no longer you can put in as many as you please.</p>
<span class="hljs-keyword">return</span> expr.compileToFragments o
fragments = expr.compileToFragments o, LEVEL_PAREN
bare = o.level &lt; LEVEL_OP <span class="hljs-keyword">and</span> (expr <span class="hljs-keyword">instanceof</span> Op <span class="hljs-keyword">or</span> expr <span class="hljs-keyword">instanceof</span> Call <span class="hljs-keyword">or</span>
(expr <span class="hljs-keyword">instanceof</span> For <span class="hljs-keyword">and</span> expr.returns))
(expr <span class="hljs-keyword">instanceof</span> For <span class="hljs-keyword">and</span> expr.returns)) <span class="hljs-keyword">and</span> (o.level &lt; LEVEL_COND <span class="hljs-keyword">or</span>
fragments.length &lt;= <span class="hljs-number">3</span>)
<span class="hljs-keyword">if</span> bare <span class="hljs-keyword">then</span> fragments <span class="hljs-keyword">else</span> @wrapInBraces fragments</pre></div></div>
</li>

View File

@@ -585,7 +585,7 @@ Unwrap that too.</p>
<span class="hljs-built_in">module</span>.exports =
start: <span class="hljs-function"><span class="hljs-params">(opts = {})</span> -&gt;</span>
[major, minor, build] = process.versions.node.split(<span class="hljs-string">'.'</span>).map (n) -&gt; parseInt(n)
[major, minor, build] = process.versions.node.split(<span class="hljs-string">'.'</span>).map (n) -&gt; parseInt(n, <span class="hljs-number">10</span>)
<span class="hljs-keyword">if</span> major <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">and</span> minor &lt; <span class="hljs-number">8</span>
<span class="hljs-built_in">console</span>.warn <span class="hljs-string">"Node 0.8.0+ required for CoffeeScript REPL"</span>

View File

@@ -157,7 +157,7 @@ its internal array of tokens.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">exports</span>.<span class="hljs-title">Rewriter</span></span></pre></div></div>
<div class="content"><div class='highlight'><pre>exports.Rewriter = <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Rewriter</span></span></pre></div></div>
</li>
@@ -168,11 +168,16 @@ its internal array of tokens.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Helpful snippet for debugging:</p>
<pre><code><span class="hljs-built_in">console</span>.log (t[<span class="hljs-number">0</span>] + <span class="hljs-string">'/'</span> + t[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> @tokens).join <span class="hljs-string">' '</span>
</code></pre>
<p>Rewrite the token stream in multiple passes, one logical filter at
a time. This could certainly be changed into a single pass through the
stream, with a big ol efficient switch, but its much nicer to work with
like this. The order of these passes matters indentation must be
corrected before implicit parentheses can be wrapped around blocks of code.</p>
</div>
<div class="content"><div class='highlight'><pre> rewrite: <span class="hljs-function"><span class="hljs-params">(@tokens)</span> -&gt;</span></pre></div></div>
</li>
@@ -182,16 +187,12 @@ its internal array of tokens.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Rewrite the token stream in multiple passes, one logical filter at
a time. This could certainly be changed into a single pass through the
stream, with a big ol efficient switch, but its much nicer to work with
like this. The order of these passes matters indentation must be
corrected before implicit parentheses can be wrapped around blocks of code.</p>
<p>Helpful snippet for debugging:
console.log (t[0] + / + t[1] for t in @tokens).join </p>
</div>
<div class="content"><div class='highlight'><pre> rewrite: <span class="hljs-function"><span class="hljs-params">(@tokens)</span> -&gt;</span>
@removeLeadingNewlines()
<div class="content"><div class='highlight'><pre> @removeLeadingNewlines()
@closeOpenCalls()
@closeOpenIndexes()
@normalizeLines()
@@ -449,9 +450,12 @@ and spliced, when returning for getting a new token.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">inImplicit</span> = -&gt;</span> stackTop()?[<span class="hljs-number">2</span>]?.ours
<span class="hljs-function"> <span class="hljs-title">inImplicitCall</span> = -&gt;</span> inImplicit() <span class="hljs-keyword">and</span> stackTop()?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'('</span>
<span class="hljs-function"> <span class="hljs-title">inImplicitObject</span> = -&gt;</span> inImplicit() <span class="hljs-keyword">and</span> stackTop()?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'{'</span></pre></div></div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">isImplicit</span> = <span class="hljs-params">(stackItem)</span> -&gt;</span> stackItem?[<span class="hljs-number">2</span>]?.ours
<span class="hljs-function"> <span class="hljs-title">isImplicitObject</span> = <span class="hljs-params">(stackItem)</span> -&gt;</span> isImplicit(stackItem) <span class="hljs-keyword">and</span> stackItem?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'{'</span>
<span class="hljs-function"> <span class="hljs-title">isImplicitCall</span> = <span class="hljs-params">(stackItem)</span> -&gt;</span> isImplicit(stackItem) <span class="hljs-keyword">and</span> stackItem?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'('</span>
<span class="hljs-function"> <span class="hljs-title">inImplicit</span> = -&gt;</span> isImplicit stackTop()
<span class="hljs-function"> <span class="hljs-title">inImplicitCall</span> = -&gt;</span> isImplicitCall stackTop()
<span class="hljs-function"> <span class="hljs-title">inImplicitObject</span> = -&gt;</span> isImplicitObject stackTop()</pre></div></div>
</li>
@@ -509,7 +513,7 @@ class declaration or if-conditionals)</p>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> inImplicitCall() <span class="hljs-keyword">and</span> tag <span class="hljs-keyword">in</span> [<span class="hljs-string">'IF'</span>, <span class="hljs-string">'TRY'</span>, <span class="hljs-string">'FINALLY'</span>, <span class="hljs-string">'CATCH'</span>,
<span class="hljs-string">'CLASS'</span>, <span class="hljs-string">'SWITCH'</span>]
stack.push [<span class="hljs-string">'CONTROL'</span>, i, ours: <span class="hljs-literal">true</span>]
stack.push [<span class="hljs-string">'CONTROL'</span>, i, ours: <span class="hljs-literal">yes</span>]
<span class="hljs-keyword">return</span> forward(<span class="hljs-number">1</span>)
<span class="hljs-keyword">if</span> tag <span class="hljs-keyword">is</span> <span class="hljs-string">'INDENT'</span> <span class="hljs-keyword">and</span> inImplicit()</pre></div></div>
@@ -734,8 +738,22 @@ like e.g.:</p>
</code></pre>
</div>
<div class="content"><div class='highlight'><pre>
stackTop()[<span class="hljs-number">2</span>].sameLine = <span class="hljs-literal">no</span> <span class="hljs-keyword">if</span> inImplicitObject() <span class="hljs-keyword">and</span> tag <span class="hljs-keyword">in</span> LINEBREAKS
</li>
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>Mark all enclosing objects as not sameLine</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> tag <span class="hljs-keyword">in</span> LINEBREAKS
<span class="hljs-keyword">for</span> stackItem <span class="hljs-keyword">in</span> stack <span class="hljs-keyword">by</span> <span class="hljs-number">-1</span> <span class="hljs-keyword">when</span> isImplicitObject stackItem
stackItem[<span class="hljs-number">2</span>].sameLine = <span class="hljs-literal">no</span>
newLine = prevTag <span class="hljs-keyword">is</span> <span class="hljs-string">'OUTDENT'</span> <span class="hljs-keyword">or</span> prevToken.newLine
<span class="hljs-keyword">if</span> tag <span class="hljs-keyword">in</span> IMPLICIT_END <span class="hljs-keyword">or</span> tag <span class="hljs-keyword">in</span> CALL_CLOSERS <span class="hljs-keyword">and</span> newLine
@@ -745,11 +763,11 @@ like e.g.:</p>
</li>
<li id="section-29">
<li id="section-30">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
<a class="pilcrow" href="#section-30">&#182;</a>
</div>
<p>Close implicit calls when reached end of argument list</p>
@@ -761,11 +779,11 @@ like e.g.:</p>
</li>
<li id="section-30">
<li id="section-31">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-30">&#182;</a>
<a class="pilcrow" href="#section-31">&#182;</a>
</div>
<p>Close implicit objects such as:
return a: 1, b: 2 unless true</p>
@@ -779,11 +797,11 @@ return a: 1, b: 2 unless true</p>
</li>
<li id="section-31">
<li id="section-32">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-31">&#182;</a>
<a class="pilcrow" href="#section-32">&#182;</a>
</div>
<p>Close implicit objects when at end of line, line didnt end with a comma
and the implicit object didnt start the line or the next line doesnt look like
@@ -801,11 +819,11 @@ the continuation of an object.</p>
</li>
<li id="section-32">
<li id="section-33">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-32">&#182;</a>
<a class="pilcrow" href="#section-33">&#182;</a>
</div>
<p>Close implicit object if comma is the last character
and what comes after doesnt look like it belongs.
@@ -826,11 +844,11 @@ e = <span class="hljs-number">2</span>
</li>
<li id="section-33">
<li id="section-34">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-33">&#182;</a>
<a class="pilcrow" href="#section-34">&#182;</a>
</div>
<p>When nextTag is OUTDENT the comma is insignificant and
should just be ignored so embed it in the implicit object.</p>
@@ -848,11 +866,11 @@ array further up the stack, so give it a chance.</p>
</li>
<li id="section-34">
<li id="section-35">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-34">&#182;</a>
<a class="pilcrow" href="#section-35">&#182;</a>
</div>
<p>Add location data to all tokens generated by the rewriter.</p>
@@ -878,11 +896,11 @@ array further up the stack, so give it a chance.</p>
</li>
<li id="section-35">
<li id="section-36">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-35">&#182;</a>
<a class="pilcrow" href="#section-36">&#182;</a>
</div>
<p>OUTDENT tokens should always be positioned at the last character of the
previous token, so that AST nodes ending in an OUTDENT token end up with a
@@ -906,11 +924,11 @@ location corresponding to the last “real” token under the node.</p>
</li>
<li id="section-36">
<li id="section-37">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-36">&#182;</a>
<a class="pilcrow" href="#section-37">&#182;</a>
</div>
<p>Because our grammar is LALR(1), it cant handle some single-line
expressions that lack ending delimiters. The <strong>Rewriter</strong> adds the implicit
@@ -928,7 +946,8 @@ blocks are added.</p>
<span class="hljs-keyword">not</span> (token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'TERMINATOR'</span> <span class="hljs-keyword">and</span> @tag(i + <span class="hljs-number">1</span>) <span class="hljs-keyword">in</span> EXPRESSION_CLOSE) <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> (token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'ELSE'</span> <span class="hljs-keyword">and</span> starter <span class="hljs-keyword">isnt</span> <span class="hljs-string">'THEN'</span>) <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> (token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> [<span class="hljs-string">'CATCH'</span>, <span class="hljs-string">'FINALLY'</span>] <span class="hljs-keyword">and</span> starter <span class="hljs-keyword">in</span> [<span class="hljs-string">'-&gt;'</span>, <span class="hljs-string">'=&gt;'</span>]) <span class="hljs-keyword">or</span>
token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> CALL_CLOSERS <span class="hljs-keyword">and</span> @tokens[i - <span class="hljs-number">1</span>].newLine
token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> CALL_CLOSERS <span class="hljs-keyword">and</span>
(@tokens[i - <span class="hljs-number">1</span>].newLine <span class="hljs-keyword">or</span> @tokens[i - <span class="hljs-number">1</span>][<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'OUTDENT'</span>)
<span class="hljs-function">
<span class="hljs-title">action</span> = <span class="hljs-params">(token, i)</span> -&gt;</span>
@tokens.splice (<span class="hljs-keyword">if</span> @tag(i - <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">','</span> <span class="hljs-keyword">then</span> i - <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> i), <span class="hljs-number">0</span>, outdent
@@ -960,11 +979,11 @@ blocks are added.</p>
</li>
<li id="section-37">
<li id="section-38">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-37">&#182;</a>
<a class="pilcrow" href="#section-38">&#182;</a>
</div>
<p>Tag postfix conditionals as such, so that we can parse them with a
different precedence.</p>
@@ -993,11 +1012,11 @@ different precedence.</p>
</li>
<li id="section-38">
<li id="section-39">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-38">&#182;</a>
<a class="pilcrow" href="#section-39">&#182;</a>
</div>
<p>Generate the indentation tokens, based on another token on the same line.</p>
@@ -1018,11 +1037,11 @@ different precedence.</p>
</li>
<li id="section-39">
<li id="section-40">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-39">&#182;</a>
<a class="pilcrow" href="#section-40">&#182;</a>
</div>
<p>Look up a tag by token index.</p>
@@ -1033,26 +1052,14 @@ different precedence.</p>
</li>
<li id="section-40">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-40">&#182;</a>
</div>
<h2 id="constants">Constants</h2>
</div>
</li>
<li id="section-41">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-41">&#182;</a>
</div>
<h2 id="constants">Constants</h2>
</div>
</li>
@@ -1064,6 +1071,18 @@ different precedence.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-42">&#182;</a>
</div>
</div>
</li>
<li id="section-43">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-43">&#182;</a>
</div>
<p>List of the token pairs that must be balanced.</p>
</div>
@@ -1083,11 +1102,11 @@ different precedence.</p>
</li>
<li id="section-43">
<li id="section-44">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-43">&#182;</a>
<a class="pilcrow" href="#section-44">&#182;</a>
</div>
<p>The inverse mappings of <code>BALANCED_PAIRS</code> were trying to fix up, so we can
look things up from either end.</p>
@@ -1099,11 +1118,11 @@ look things up from either end.</p>
</li>
<li id="section-44">
<li id="section-45">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-44">&#182;</a>
<a class="pilcrow" href="#section-45">&#182;</a>
</div>
<p>The tokens that signal the start/end of a balanced pair.</p>
@@ -1119,11 +1138,11 @@ EXPRESSION_END = []
</li>
<li id="section-45">
<li id="section-46">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-45">&#182;</a>
<a class="pilcrow" href="#section-46">&#182;</a>
</div>
<p>Tokens that indicate the close of a clause of an expression.</p>
@@ -1134,11 +1153,11 @@ EXPRESSION_END = []
</li>
<li id="section-46">
<li id="section-47">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-46">&#182;</a>
<a class="pilcrow" href="#section-47">&#182;</a>
</div>
<p>Tokens that, if followed by an <code>IMPLICIT_CALL</code>, indicate a function invocation.</p>
@@ -1149,11 +1168,11 @@ EXPRESSION_END = []
</li>
<li id="section-47">
<li id="section-48">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-47">&#182;</a>
<a class="pilcrow" href="#section-48">&#182;</a>
</div>
<p>If preceded by an <code>IMPLICIT_FUNC</code>, indicates a function invocation.</p>
@@ -1173,11 +1192,11 @@ IMPLICIT_UNSPACED_CALL = [<span class="hljs-string">'+'</span>, <span class="hlj
</li>
<li id="section-48">
<li id="section-49">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-48">&#182;</a>
<a class="pilcrow" href="#section-49">&#182;</a>
</div>
<p>Tokens that always mark the end of an implicit call for single-liners.</p>
@@ -1189,11 +1208,11 @@ IMPLICIT_UNSPACED_CALL = [<span class="hljs-string">'+'</span>, <span class="hlj
</li>
<li id="section-49">
<li id="section-50">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-49">&#182;</a>
<a class="pilcrow" href="#section-50">&#182;</a>
</div>
<p>Single-line flavors of block expressions that have unclosed endings.
The grammar cant disambiguate them, so we insert the implicit indentation.</p>
@@ -1206,11 +1225,11 @@ SINGLE_CLOSERS = [<span class="hljs-string">'TERMINATOR'</span>, <span class="
</li>
<li id="section-50">
<li id="section-51">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-50">&#182;</a>
<a class="pilcrow" href="#section-51">&#182;</a>
</div>
<p>Tokens that end a line.</p>
@@ -1221,11 +1240,11 @@ SINGLE_CLOSERS = [<span class="hljs-string">'TERMINATOR'</span>, <span class="
</li>
<li id="section-51">
<li id="section-52">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-51">&#182;</a>
<a class="pilcrow" href="#section-52">&#182;</a>
</div>
<p>Tokens that close open calls when they follow a newline.</p>

View File

@@ -406,7 +406,7 @@ column for the current line:</p>
</div>
<p>Note that SourceMap VLQ encoding is “backwards”. MIDI-style VLQ encoding puts
the most-significant-bit (MSB) from the original value into the MSB of the VLQ
encoded value (see <a href="http://en.wikipedia.org/wiki/File:Uintvar_coding.svg">Wikipedia</a>).
encoded value (see <a href="https://en.wikipedia.org/wiki/File:Uintvar_coding.svg">Wikipedia</a>).
SourceMap VLQ does things the other way around, with the least significat four
bits of the original value encoded into the first byte of the VLQ encoded value.</p>

View File

@@ -1,399 +1,405 @@
/**
* CoffeeScript Compiler v1.12.4
* CoffeeScript Compiler v1.12.6
* http://coffeescript.org
*
* Copyright 2011, Jeremy Ashkenas
* Released under the MIT License
*/
var $jscomp={scope:{},checkStringArgs:function(u,ya,qa){if(null==u)throw new TypeError("The 'this' value for String.prototype."+qa+" must not be null or undefined");if(ya instanceof RegExp)throw new TypeError("First argument to String.prototype."+qa+" must not be a regular expression");return u+""}};
$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(u,ya,qa){if(qa.get||qa.set)throw new TypeError("ES3 does not support getters and setters.");u!=Array.prototype&&u!=Object.prototype&&(u[ya]=qa.value)};$jscomp.getGlobal=function(u){return"undefined"!=typeof window&&window===u?u:"undefined"!=typeof global&&null!=global?global:u};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(u,ya,qa,g){if(ya){qa=$jscomp.global;u=u.split(".");for(g=0;g<u.length-1;g++){var ua=u[g];ua in qa||(qa[ua]={});qa=qa[ua]}u=u[u.length-1];g=qa[u];ya=ya(g);ya!=g&&null!=ya&&$jscomp.defineProperty(qa,u,{configurable:!0,writable:!0,value:ya})}};
$jscomp.polyfill("String.prototype.repeat",function(u){return u?u:function(u){var qa=$jscomp.checkStringArgs(this,null,"repeat");if(0>u||1342177279<u)throw new RangeError("Invalid count value");u|=0;for(var g="";u;)if(u&1&&(g+=qa),u>>>=1)qa+=qa;return g}},"es6-impl","es3");$jscomp.findInternal=function(u,ya,qa){u instanceof String&&(u=String(u));for(var g=u.length,ua=0;ua<g;ua++){var xa=u[ua];if(ya.call(qa,xa,ua,u))return{i:ua,v:xa}}return{i:-1,v:void 0}};
$jscomp.polyfill("Array.prototype.find",function(u){return u?u:function(u,qa){return $jscomp.findInternal(this,u,qa).v}},"es6-impl","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(u){return $jscomp.SYMBOL_PREFIX+(u||"")+$jscomp.symbolCounter_++};
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(u,xa,va){if(null==u)throw new TypeError("The 'this' value for String.prototype."+va+" must not be null or undefined");if(xa instanceof RegExp)throw new TypeError("First argument to String.prototype."+va+" must not be a regular expression");return u+""};
$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(u,xa,va){if(va.get||va.set)throw new TypeError("ES3 does not support getters and setters.");u!=Array.prototype&&u!=Object.prototype&&(u[xa]=va.value)};$jscomp.getGlobal=function(u){return"undefined"!=typeof window&&window===u?u:"undefined"!=typeof global&&null!=global?global:u};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(u,xa,va,f){if(xa){va=$jscomp.global;u=u.split(".");for(f=0;f<u.length-1;f++){var qa=u[f];qa in va||(va[qa]={});va=va[qa]}u=u[u.length-1];f=va[u];xa=xa(f);xa!=f&&null!=xa&&$jscomp.defineProperty(va,u,{configurable:!0,writable:!0,value:xa})}};
$jscomp.polyfill("String.prototype.repeat",function(u){return u?u:function(u){var va=$jscomp.checkStringArgs(this,null,"repeat");if(0>u||1342177279<u)throw new RangeError("Invalid count value");u|=0;for(var f="";u;)if(u&1&&(f+=va),u>>>=1)va+=va;return f}},"es6-impl","es3");$jscomp.findInternal=function(u,xa,va){u instanceof String&&(u=String(u));for(var f=u.length,qa=0;qa<f;qa++){var q=u[qa];if(xa.call(va,q,qa,u))return{i:qa,v:q}}return{i:-1,v:void 0}};
$jscomp.polyfill("Array.prototype.find",function(u){return u?u:function(u,va){return $jscomp.findInternal(this,u,va).v}},"es6-impl","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(u){return $jscomp.SYMBOL_PREFIX+(u||"")+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var u=$jscomp.global.Symbol.iterator;u||(u=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[u]&&$jscomp.defineProperty(Array.prototype,u,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.arrayIterator=function(u){var ya=0;return $jscomp.iteratorPrototype(function(){return ya<u.length?{done:!1,value:u[ya++]}:{done:!0}})};$jscomp.iteratorPrototype=function(u){$jscomp.initSymbolIterator();u={next:u};u[$jscomp.global.Symbol.iterator]=function(){return this};return u};$jscomp.array=$jscomp.array||{};
$jscomp.iteratorFromArray=function(u,ya){$jscomp.initSymbolIterator();u instanceof String&&(u+="");var qa=0,g={next:function(){if(qa<u.length){var ua=qa++;return{value:ya(ua,u[ua]),done:!1}}g.next=function(){return{done:!0,value:void 0}};return g.next()}};g[Symbol.iterator]=function(){return g};return g};$jscomp.polyfill("Array.prototype.keys",function(u){return u?u:function(){return $jscomp.iteratorFromArray(this,function(u){return u})}},"es6-impl","es3");
(function(u){var ya=function(){function u(g){return u[g]}u["../../package.json"]={name:"coffee-script",description:"Unfancy JavaScript",keywords:["javascript","language","coffeescript","compiler"],author:"Jeremy Ashkenas",version:"1.12.4",license:"MIT",engines:{node:"\x3e\x3d0.8.0"},directories:{lib:"./lib/coffee-script"},main:"./lib/coffee-script/coffee-script",bin:{coffee:"./bin/coffee",cake:"./bin/cake"},files:["bin","lib","register.js","repl.js"],preferGlobal:!0,scripts:{test:"node ./bin/cake test",
"test-harmony":"node --harmony ./bin/cake test"},homepage:"http://coffeescript.org",bugs:"https://github.com/jashkenas/coffeescript/issues",repository:{type:"git",url:"git://github.com/jashkenas/coffeescript.git"},devDependencies:{docco:"~0.7.0","google-closure-compiler-js":"^20170124.0.0","highlight.js":"~9.9.0",jison:"\x3e\x3d0.4.17",marked:"^0.3.6",underscore:"~1.8.3"}};u["./helpers"]=function(){var g={};(function(){var u,xa,q,a,c,Ca;g.starts=function(a,c,l){return c===a.substr(l,c.length)};g.ends=
function(a,c,l){var f;f=c.length;return c===a.substr(a.length-f-(l||0),f)};g.repeat=c=function(a,c){var f;for(f="";0<c;)c&1&&(f+=a),c>>>=1,a+=a;return f};g.compact=function(a){var f,c,g,q;q=[];f=0;for(g=a.length;f<g;f++)(c=a[f])&&q.push(c);return q};g.count=function(a,c){var f,D;f=D=0;if(!c.length)return 1/0;for(;D=1+a.indexOf(c,D);)f++;return f};g.merge=function(a,c){return xa(xa({},a),c)};xa=g.extend=function(a,c){var f,D;for(f in c)D=c[f],a[f]=D;return a};g.flatten=q=function(a){var f,c,g,G;c=
[];g=0;for(G=a.length;g<G;g++)f=a[g],"[object Array]"===Object.prototype.toString.call(f)?c=c.concat(q(f)):c.push(f);return c};g.del=function(a,c){var f;f=a[c];delete a[c];return f};g.some=null!=(a=Array.prototype.some)?a:function(a){var f,c,g;c=0;for(g=this.length;c<g;c++)if(f=this[c],a(f))return!0;return!1};g.invertLiterate=function(a){var f;f=!0;var c,g,q,F;q=a.split("\n");F=[];c=0;for(g=q.length;c<g;c++)a=q[c],f&&/^([ ]{4}|[ ]{0,3}\t)/.test(a)?F.push(a):(f=/^\s*$/.test(a))?F.push(a):F.push("# "+
a);return F.join("\n")};u=function(a,c){return c?{first_line:a.first_line,first_column:a.first_column,last_line:c.last_line,last_column:c.last_column}:a};g.addLocationDataFn=function(a,c){return function(f){"object"===typeof f&&f.updateLocationDataIfMissing&&f.updateLocationDataIfMissing(u(a,c));return f}};g.locationDataToString=function(a){var f;"2"in a&&"first_line"in a[2]?f=a[2]:"first_line"in a&&(f=a);return f?f.first_line+1+":"+(f.first_column+1)+"-"+(f.last_line+1+":"+(f.last_column+1)):"No location data"};
g.baseFileName=function(a,c,g){null==c&&(c=!1);null==g&&(g=!1);a=a.split(g?/\\|\//:/\//);a=a[a.length-1];if(!(c&&0<=a.indexOf(".")))return a;a=a.split(".");a.pop();"coffee"===a[a.length-1]&&1<a.length&&a.pop();return a.join(".")};g.isCoffee=function(a){return/\.((lit)?coffee|coffee\.md)$/.test(a)};g.isLiterate=function(a){return/\.(litcoffee|coffee\.md)$/.test(a)};g.throwSyntaxError=function(a,c){a=new SyntaxError(a);a.location=c;a.toString=Ca;a.stack=a.toString();throw a;};g.updateSyntaxError=function(a,
c,g){a.toString===Ca&&(a.code||(a.code=c),a.filename||(a.filename=g),a.stack=a.toString());return a};Ca=function(){var a,g,l,q,G,F,x,v,M,u;if(!this.code||!this.location)return Error.prototype.toString.call(this);a=this.location;F=a.first_line;G=a.first_column;l=a.last_line;x=a.last_column;null==l&&(l=F);null==x&&(x=G);q=this.filename||"[stdin]";a=this.code.split("\n")[F];l=F===l?x+1:a.length;x=a.slice(0,G).replace(/[^\s]/g," ")+c("^",l-G);"undefined"!==typeof process&&null!==process&&(g=(null!=(v=
process.stdout)?v.isTTY:void 0)&&!(null!=(M=process.env)&&M.NODE_DISABLE_COLORS));if(null!=(u=this.colorful)?u:g)g=function(a){return"\u001b[1;31m"+a+"\u001b[0m"},a=a.slice(0,G)+g(a.slice(G,l))+a.slice(l),x=g(x);return q+":"+(F+1)+":"+(G+1)+": error: "+this.message+"\n"+a+"\n"+x};g.nameWhitespaceCharacter=function(a){switch(a){case " ":return"space";case "\n":return"newline";case "\r":return"carriage return";case "\t":return"tab";default:return a}}}).call(this);return g}();u["./rewriter"]=function(){var g=
{};(function(){var u,xa,q,a,c,Ca,f,D,l,w,G,F,x,v,M,N,J,r,E=[].indexOf||function(a){for(var c=0,f=this.length;c<f;c++)if(c in this&&this[c]===a)return c;return-1},O=[].slice;v=function(a,c,f){a=[a,c];a.generated=!0;f&&(a.origin=f);return a};g.Rewriter=function(){function m(){}m.prototype.rewrite=function(a){this.tokens=a;this.removeLeadingNewlines();this.closeOpenCalls();this.closeOpenIndexes();this.normalizeLines();this.tagPostfixConditionals();this.addImplicitBracesAndParens();this.addLocationDataToGeneratedTokens();
this.fixOutdentLocationData();return this.tokens};m.prototype.scanTokens=function(a){var c,k,h;h=this.tokens;for(c=0;k=h[c];)c+=a.call(this,k,c,h);return!0};m.prototype.detectEnd=function(k,f,p){var h,t,m,g,H;H=this.tokens;for(h=0;g=H[k];){if(0===h&&f.call(this,g,k))return p.call(this,g,k);if(!g||0>h)return p.call(this,g,k-1);(t=g[0],0<=E.call(c,t))?h+=1:(m=g[0],0<=E.call(a,m))&&--h;k+=1}return k-1};m.prototype.removeLeadingNewlines=function(){var a,c,f,h,y;h=this.tokens;a=c=0;for(f=h.length;c<f&&
(y=h[a][0],"TERMINATOR"===y);a=++c);if(a)return this.tokens.splice(0,a)};m.prototype.closeOpenCalls=function(){var a,c;c=function(a,c){var h;return")"===(h=a[0])||"CALL_END"===h||"OUTDENT"===a[0]&&")"===this.tag(c-1)};a=function(a,c){return this.tokens["OUTDENT"===a[0]?c-1:c][0]="CALL_END"};return this.scanTokens(function(f,h){"CALL_START"===f[0]&&this.detectEnd(h+1,c,a);return 1})};m.prototype.closeOpenIndexes=function(){var a,c;c=function(a,c){var h;return"]"===(h=a[0])||"INDEX_END"===h};a=function(a,
c){return a[0]="INDEX_END"};return this.scanTokens(function(f,h){"INDEX_START"===f[0]&&this.detectEnd(h+1,c,a);return 1})};m.prototype.indexOfTag=function(){var a,c,f,h,g,m,A;c=arguments[0];g=2<=arguments.length?O.call(arguments,1):[];f=h=a=0;for(m=g.length;0<=m?h<m:h>m;f=0<=m?++h:--h){for(;"HERECOMMENT"===this.tag(c+f+a);)a+=2;if(null!=g[f]&&("string"===typeof g[f]&&(g[f]=[g[f]]),A=this.tag(c+f+a),0>E.call(g[f],A)))return-1}return c+f+a-1};m.prototype.looksObjectish=function(f){var k;if(-1<this.indexOfTag(f,
"@",null,":")||-1<this.indexOfTag(f,null,":"))return!0;f=this.indexOfTag(f,c);return-1<f&&(k=null,this.detectEnd(f+1,function(c){var h;return h=c[0],0<=E.call(a,h)},function(a,c){return k=c}),":"===this.tag(k+1))?!0:!1};m.prototype.findTagsBackwards=function(f,g){var k,h,m,t,A,H,l;for(k=[];0<=f&&(k.length||(t=this.tag(f),0>E.call(g,t))&&((A=this.tag(f),0>E.call(c,A))||this.tokens[f].generated)&&(H=this.tag(f),0>E.call(G,H)));)(h=this.tag(f),0<=E.call(a,h))&&k.push(this.tag(f)),(m=this.tag(f),0<=E.call(c,
m))&&k.length&&k.pop(),--f;return l=this.tag(f),0<=E.call(g,l)};m.prototype.addImplicitBracesAndParens=function(){var k,g;k=[];g=null;return this.scanTokens(function(m,h,t){var p,A,y,q,r,I,w,x,z,B,u,C,M,F,J,N,O,K;K=m[0];B=(u=0<h?t[h-1]:[])[0];z=(h<t.length-1?t[h+1]:[])[0];J=function(){return k[k.length-1]};N=h;y=function(a){return h-N+a};q=function(){var a,c;return null!=(a=J())?null!=(c=a[2])?c.ours:void 0:void 0};r=function(){var a;return q()&&"("===(null!=(a=J())?a[0]:void 0)};w=function(){var a;
return q()&&"{"===(null!=(a=J())?a[0]:void 0)};I=function(){var a;return q&&"CONTROL"===(null!=(a=J())?a[0]:void 0)};O=function(a){var c;c=null!=a?a:h;k.push(["(",c,{ours:!0}]);t.splice(c,0,v("CALL_START","("));if(null==a)return h+=1};p=function(){k.pop();t.splice(h,0,v("CALL_END",")",["","end of input",m[2]]));return h+=1};x=function(a,c){var f;null==c&&(c=!0);f=null!=a?a:h;k.push(["{",f,{sameLine:!0,startsLine:c,ours:!0}]);c=new String("{");c.generated=!0;t.splice(f,0,v("{",c,m));if(null==a)return h+=
1};A=function(a){a=null!=a?a:h;k.pop();t.splice(a,0,v("}","}",m));return h+=1};if(r()&&("IF"===K||"TRY"===K||"FINALLY"===K||"CATCH"===K||"CLASS"===K||"SWITCH"===K))return k.push(["CONTROL",h,{ours:!0}]),y(1);if("INDENT"===K&&q()){if("\x3d\x3e"!==B&&"-\x3e"!==B&&"["!==B&&"("!==B&&","!==B&&"{"!==B&&"TRY"!==B&&"ELSE"!==B&&"\x3d"!==B)for(;r();)p();I()&&k.pop();k.push([K,h]);return y(1)}if(0<=E.call(c,K))return k.push([K,h]),y(1);if(0<=E.call(a,K)){for(;q();)r()?p():w()?A():k.pop();g=k.pop()}if((0<=E.call(D,
K)&&m.spaced||"?"===K&&0<h&&!t[h-1].spaced)&&(0<=E.call(Ca,z)||0<=E.call(l,z)&&(null==(C=t[h+1])||!C.spaced)&&(null==(M=t[h+1])||!M.newLine)))return"?"===K&&(K=m[0]="FUNC_EXIST"),O(h+1),y(2);if(0<=E.call(D,K)&&-1<this.indexOfTag(h+1,"INDENT")&&this.looksObjectish(h+2)&&!this.findTagsBackwards(h,"CLASS EXTENDS IF CATCH SWITCH LEADING_WHEN FOR WHILE UNTIL".split(" ")))return O(h+1),k.push(["INDENT",h+2]),y(3);if(":"===K){for(A=function(){var c;switch(!1){case c=this.tag(h-1),0>E.call(a,c):return g[1];
case "@"!==this.tag(h-2):return h-2;default:return h-1}}.call(this);"HERECOMMENT"===this.tag(A-2);)A-=2;this.insideForDeclaration="FOR"===z;I=0===A||(F=this.tag(A-1),0<=E.call(G,F))||t[A-1].newLine;if(J()&&(w=J(),F=w[0],u=w[1],("{"===F||"INDENT"===F&&"{"===this.tag(u-1))&&(I||","===this.tag(A-1)||"{"===this.tag(A-1))))return y(1);x(A,!!I);return y(2)}w()&&0<=E.call(G,K)&&(J()[2].sameLine=!1);x="OUTDENT"===B||u.newLine;if(0<=E.call(f,K)||0<=E.call(xa,K)&&x)for(;q();)if(x=J(),F=x[0],u=x[1],F=x[2],x=
F.sameLine,I=F.startsLine,r()&&","!==B)p();else if(w()&&!this.insideForDeclaration&&x&&"TERMINATOR"!==K&&":"!==B)A();else if(!w()||"TERMINATOR"!==K||","===B||I&&this.looksObjectish(h+1))break;else{if("HERECOMMENT"===z)return y(1);A()}if(!(","!==K||this.looksObjectish(h+1)||!w()||this.insideForDeclaration||"TERMINATOR"===z&&this.looksObjectish(h+2)))for(z="OUTDENT"===z?1:0;w();)A(h+z);return y(1)})};m.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(a,c,f){var h,
k,m;if(a[2]||!a.generated&&!a.explicit)return 1;"{"===a[0]&&(h=null!=(m=f[c+1])?m[2]:void 0)?(k=h.first_line,h=h.first_column):(h=null!=(k=f[c-1])?k[2]:void 0)?(k=h.last_line,h=h.last_column):k=h=0;a[2]={first_line:k,first_column:h,last_line:k,last_column:h};return 1})};m.prototype.fixOutdentLocationData=function(){return this.scanTokens(function(a,c,f){if(!("OUTDENT"===a[0]||a.generated&&"CALL_END"===a[0]||a.generated&&"}"===a[0]))return 1;c=f[c-1][2];a[2]={first_line:c.last_line,first_column:c.last_column,
last_line:c.last_line,last_column:c.last_column};return 1})};m.prototype.normalizeLines=function(){var a,c,f,h,m;m=f=h=null;c=function(a,c){var f,h,k,g;return";"!==a[1]&&(f=a[0],0<=E.call(F,f))&&!("TERMINATOR"===a[0]&&(h=this.tag(c+1),0<=E.call(q,h)))&&!("ELSE"===a[0]&&"THEN"!==m)&&!!("CATCH"!==(k=a[0])&&"FINALLY"!==k||"-\x3e"!==m&&"\x3d\x3e"!==m)||(g=a[0],0<=E.call(xa,g))&&this.tokens[c-1].newLine};a=function(a,c){return this.tokens.splice(","===this.tag(c-1)?c-1:c,0,h)};return this.scanTokens(function(k,
g,t){var p,y,l;k=k[0];if("TERMINATOR"===k){if("ELSE"===this.tag(g+1)&&"OUTDENT"!==this.tag(g-1))return t.splice.apply(t,[g,1].concat(O.call(this.indentation()))),1;if(p=this.tag(g+1),0<=E.call(q,p))return t.splice(g,1),0}if("CATCH"===k)for(p=y=1;2>=y;p=++y)if("OUTDENT"===(l=this.tag(g+p))||"TERMINATOR"===l||"FINALLY"===l)return t.splice.apply(t,[g+p,0].concat(O.call(this.indentation()))),2+p;0<=E.call(x,k)&&"INDENT"!==this.tag(g+1)&&("ELSE"!==k||"IF"!==this.tag(g+1))&&(m=k,l=this.indentation(t[g]),
f=l[0],h=l[1],"THEN"===m&&(f.fromThen=!0),t.splice(g+1,0,f),this.detectEnd(g+2,c,a),"THEN"===k&&t.splice(g,1));return 1})};m.prototype.tagPostfixConditionals=function(){var a,c,f;f=null;c=function(a,c){a=a[0];c=this.tokens[c-1][0];return"TERMINATOR"===a||"INDENT"===a&&0>E.call(x,c)};a=function(a,c){if("INDENT"!==a[0]||a.generated&&!a.fromThen)return f[0]="POST_"+f[0]};return this.scanTokens(function(h,k){if("IF"!==h[0])return 1;f=h;this.detectEnd(k+1,c,a);return 1})};m.prototype.indentation=function(a){var c,
f;c=["INDENT",2];f=["OUTDENT",2];a?(c.generated=f.generated=!0,c.origin=f.origin=a):c.explicit=f.explicit=!0;return[c,f]};m.prototype.generate=v;m.prototype.tag=function(a){var c;return null!=(c=this.tokens[a])?c[0]:void 0};return m}();u=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]];g.INVERSES=w={};c=[];a=[];M=0;for(J=u.length;M<J;M++)r=u[M],N=r[0],r=r[1],
c.push(w[r]=N),a.push(w[N]=r);q=["CATCH","THEN","ELSE","FINALLY"].concat(a);D="IDENTIFIER PROPERTY SUPER ) CALL_END ] INDEX_END @ THIS".split(" ");Ca="IDENTIFIER PROPERTY NUMBER INFINITY NAN STRING STRING_START REGEX REGEX_START JS NEW PARAM_START CLASS IF TRY SWITCH THIS UNDEFINED NULL BOOL UNARY YIELD UNARY_MATH SUPER THROW @ -\x3e \x3d\x3e [ ( { -- ++".split(" ");l=["+","-"];f="POST_IF FOR WHILE UNTIL WHEN BY LOOP TERMINATOR".split(" ");x="ELSE -\x3e \x3d\x3e TRY FINALLY THEN".split(" ");F="TERMINATOR CATCH FINALLY ELSE OUTDENT LEADING_WHEN".split(" ");
G=["TERMINATOR","INDENT","OUTDENT"];xa=[".","?.","::","?::"]}).call(this);return g}();u["./lexer"]=function(){var g={};(function(){var ua,xa,q,a,c,Ca,f,D,l,w,G,F,x,v,M,N,J,r,E,O,m,k,t,p,h,y,P,A,H,U,T,I,aa,S,z,B,W,C,Q,X,Y,V,Z,K,ba,R,qa,ya,Xa,ka,ca,ea,ga,ha,la,oa,L,ja,ra,da=[].indexOf||function(a){for(var c=0,f=this.length;c<f;c++)if(c in this&&this[c]===a)return c;return-1},ma=[].slice;L=u("./rewriter");C=L.Rewriter;m=L.INVERSES;L=u("./helpers");ea=L.count;ja=L.repeat;ga=L.invertLiterate;ra=L.throwSyntaxError;
g.Lexer=function(){function g(){}g.prototype.tokenize=function(a,c){var f,ia,h,g;null==c&&(c={});this.literate=c.literate;this.outdebt=this.indebt=this.baseIndent=this.indent=0;this.indents=[];this.ends=[];this.tokens=[];this.exportSpecifierList=this.seenExport=this.seenImport=this.seenFor=!1;this.chunkLine=c.line||0;this.chunkColumn=c.column||0;a=this.clean(a);for(h=0;this.chunk=a.slice(h);)if(f=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||
this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),g=this.getLineAndColumnFromChunk(f),this.chunkLine=g[0],this.chunkColumn=g[1],h+=f,c.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:h};this.closeIndentation();(ia=this.ends.pop())&&this.error("missing "+ia.tag,ia.origin[2]);return!1===c.rewrite?this.tokens:(new C).rewrite(this.tokens)};g.prototype.clean=function(a){a.charCodeAt(0)===ua&&(a=a.slice(1));a=a.replace(/\r/g,"").replace(qa,"");ca.test(a)&&(a=
"\n"+a,this.chunkLine--);this.literate&&(a=ga(a));return a};g.prototype.identifierToken=function(){var f,g,k,m,p,y,l,A,q,v,r;if(!(g=J.exec(this.chunk)))return 0;p=g[0];k=g[1];g=g[2];m=k.length;y=void 0;if("own"===k&&"FOR"===this.tag())return this.token("OWN",k),k.length;if("from"===k&&"YIELD"===this.tag())return this.token("FROM",k),k.length;if("as"===k&&this.seenImport){if("*"===this.value())this.tokens[this.tokens.length-1][0]="IMPORT_ALL";else if(l=this.value(),0<=da.call(Ca,l))this.tokens[this.tokens.length-
1][0]="IDENTIFIER";if("DEFAULT"===(A=this.tag())||"IMPORT_ALL"===A||"IDENTIFIER"===A)return this.token("AS",k),k.length}if("as"===k&&this.seenExport&&"IDENTIFIER"===this.tag())return this.token("AS",k),k.length;if("default"===k&&this.seenExport)return this.token("DEFAULT",k),k.length;l=this.tokens;l=l[l.length-1];r=g||null!=l&&("."===(q=l[0])||"?."===q||"::"===q||"?::"===q||!l.spaced&&"@"===l[0])?"PROPERTY":"IDENTIFIER";"IDENTIFIER"!==r||!(0<=da.call(t,k)||0<=da.call(Ca,k))||this.exportSpecifierList&&
0<=da.call(Ca,k)?"IDENTIFIER"===r&&this.seenFor&&"from"===k&&ha(l)&&(r="FORFROM",this.seenFor=!1):(r=k.toUpperCase(),"WHEN"===r&&(v=this.tag(),0<=da.call(h,v))?r="LEADING_WHEN":"FOR"===r?this.seenFor=!0:"UNLESS"===r?r="IF":"IMPORT"===r?this.seenImport=!0:"EXPORT"===r?this.seenExport=!0:0<=da.call(ya,r)?r="UNARY":0<=da.call(B,r)&&("INSTANCEOF"!==r&&this.seenFor?(r="FOR"+r,this.seenFor=!1):(r="RELATION","!"===this.value()&&(y=this.tokens.pop(),k="!"+k))));"IDENTIFIER"===r&&0<=da.call(W,k)&&this.error("reserved word '"+
k+"'",{length:k.length});"PROPERTY"!==r&&(0<=da.call(a,k)&&(f=k,k=c[k]),r=function(){switch(k){case "!":return"UNARY";case "\x3d\x3d":case "!\x3d":return"COMPARE";case "true":case "false":return"BOOL";case "break":case "continue":case "debugger":return"STATEMENT";case "\x26\x26":case "||":return k;default:return r}}());q=this.token(r,k,0,m);f&&(q.origin=[r,f,q[2]]);y&&(f=[y[2].first_line,y[2].first_column],q[2].first_line=f[0],q[2].first_column=f[1]);g&&(f=p.lastIndexOf(":"),this.token(":",":",f,
g.length));return p.length};g.prototype.numberToken=function(){var a,c,f,g;if(!(c=U.exec(this.chunk)))return 0;f=c[0];c=f.length;switch(!1){case !/^0[BOX]/.test(f):this.error("radix prefix in '"+f+"' must be lowercase",{offset:1});break;case !/^(?!0x).*E/.test(f):this.error("exponential notation in '"+f+"' must be indicated with a lowercase 'e'",{offset:f.indexOf("E")});break;case !/^0\d*[89]/.test(f):this.error("decimal literal '"+f+"' must not be prefixed with '0'",{length:c});break;case !/^0\d+/.test(f):this.error("octal literal '"+
f+"' must be prefixed with '0o'",{length:c})}a=function(){switch(f.charAt(1)){case "b":return 2;case "o":return 8;case "x":return 16;default:return null}}();a=null!=a?parseInt(f.slice(2),a):parseFloat(f);if("b"===(g=f.charAt(1))||"o"===g)f="0x"+a.toString(16);this.token(Infinity===a?"INFINITY":"NUMBER",f,0,c);return c};g.prototype.stringToken=function(){var a,c,f,g,h,k,m,t,l,r,y,q;l=(ba.exec(this.chunk)||[])[0];if(!l)return 0;this.tokens.length&&"from"===this.value()&&(this.seenImport||this.seenExport)&&
(this.tokens[this.tokens.length-1][0]="FROM");f=function(){switch(l){case "'":return K;case '"':return V;case "'''":return x;case '"""':return G}}();g=3===l.length;f=this.matchWithInterpolations(f,l);q=f.tokens;h=f.index;a=q.length-1;f=l.charAt(0);if(g){m=null;for(g=function(){var a,c,f;f=[];k=a=0;for(c=q.length;a<c;k=++a)y=q[k],"NEOSTRING"===y[0]&&f.push(y[1]);return f}().join("#{}");c=F.exec(g);)if(c=c[1],null===m||0<(r=c.length)&&r<m.length)m=c;m&&(t=RegExp("\\n"+m,"g"));this.mergeInterpolationTokens(q,
{delimiter:f},function(c){return function(f,g){f=c.formatString(f);t&&(f=f.replace(t,"\n"));0===g&&(f=f.replace(p,""));g===a&&(f=f.replace(R,""));return f}}(this))}else this.mergeInterpolationTokens(q,{delimiter:f},function(c){return function(f,g){f=c.formatString(f);return f=f.replace(X,function(c,h){return 0===g&&0===h||g===a&&h+c.length===f.length?"":" "})}}(this));return h};g.prototype.commentToken=function(){var a,c,g;if(!(g=this.chunk.match(f)))return 0;a=g[0];if(c=g[1])(g=w.exec(a))&&this.error("block comments cannot contain "+
g[0],{offset:g.index,length:g[0].length}),0<=c.indexOf("\n")&&(c=c.replace(RegExp("\\n"+ja(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",c,0,a.length);return a.length};g.prototype.jsToken=function(){var a,c;if("`"!==this.chunk.charAt(0)||!(a=N.exec(this.chunk)||k.exec(this.chunk)))return 0;c=a[1].replace(/\\+(`|$)/g,function(a){return a.slice(-Math.ceil(a.length/2))});this.token("JS",c,0,a[0].length);return a[0].length};g.prototype.regexToken=function(){var a,c,f,g,h,k,m,t;switch(!1){case !(c=
z.exec(this.chunk)):this.error("regular expressions cannot begin with "+c[2],{offset:c.index+c[1].length});break;case !(c=this.matchWithInterpolations(v,"///")):t=c.tokens;h=c.index;break;case !(c=aa.exec(this.chunk)):m=c[0];a=c[1];c=c[2];this.validateEscapes(a,{isRegex:!0,offsetInChunk:1});h=m.length;k=this.tokens;if(k=k[k.length-1])if(k.spaced&&(f=k[0],0<=da.call(xa,f))){if(!c||I.test(m))return 0}else if(g=k[0],0<=da.call(H,g))return 0;c||this.error("missing / (unclosed regex)");break;default:return 0}g=
S.exec(this.chunk.slice(h))[0];f=h+g.length;c=this.makeToken("REGEX",null,0,f);switch(!1){case !!ka.test(g):this.error("invalid regular expression flags "+g,{offset:h,length:g.length});break;case !(m||1===t.length):null==a&&(a=this.formatHeregex(t[0][1]));this.token("REGEX",""+this.makeDelimitedLiteral(a,{delimiter:"/"})+g,0,f,c);break;default:this.token("REGEX_START","(",0,0,c),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(t,{delimiter:'"',double:!0},
this.formatHeregex),g&&(this.token(",",",",h-1,0),this.token("STRING",'"'+g+'"',h-1,g.length)),this.token(")",")",f-1,0),this.token("REGEX_END",")",f-1,0)}return f};g.prototype.lineToken=function(){var a,c,f;if(!(c=A.exec(this.chunk)))return 0;c=c[0];this.seenFor=!1;f=c.length-1-c.lastIndexOf("\n");a=this.unfinished();if(f-this.indebt===this.indent)return a?this.suppressNewlines():this.newlineToken(0),c.length;if(f>this.indent){if(a)return this.indebt=f-this.indent,this.suppressNewlines(),c.length;
if(!this.tokens.length)return this.baseIndent=this.indent=f,c.length;a=f-this.indent+this.outdebt;this.token("INDENT",a,c.length-f,f);this.indents.push(a);this.ends.push({tag:"OUTDENT"});this.outdebt=this.indebt=0;this.indent=f}else f<this.baseIndent?this.error("missing indentation",{offset:c.length}):(this.indebt=0,this.outdentToken(this.indent-f,a,c.length));return c.length};g.prototype.outdentToken=function(a,c,f){var g,h,k,m;for(g=this.indent-a;0<a;)(k=this.indents[this.indents.length-1])?k===
this.outdebt?(a-=this.outdebt,this.outdebt=0):k<this.outdebt?(this.outdebt-=k,a-=k):(h=this.indents.pop()+this.outdebt,f&&(m=this.chunk[f],0<=da.call(r,m))&&(g-=h-a,a=h),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",a,0,f),a-=h):a=0;h&&(this.outdebt-=a);for(;";"===this.value();)this.tokens.pop();"TERMINATOR"===this.tag()||c||this.token("TERMINATOR","\n",f,0);this.indent=g;return this};g.prototype.whitespaceToken=function(){var a,c;if(!(a=ca.exec(this.chunk))&&"\n"!==this.chunk.charAt(0))return 0;
c=this.tokens;(c=c[c.length-1])&&(c[a?"spaced":"newLine"]=!0);return a?a[0].length:0};g.prototype.newlineToken=function(a){for(;";"===this.value();)this.tokens.pop();"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",a,0);return this};g.prototype.suppressNewlines=function(){"\\"===this.value()&&this.tokens.pop();return this};g.prototype.literalToken=function(){var a,c,f,g,h,k,t,p;(a=T.exec(this.chunk))?(a=a[0],q.test(a)&&this.tagParameters()):a=this.chunk.charAt(0);p=a;g=this.tokens;if((g=g[g.length-
1])&&0<=da.call(["\x3d"].concat(ma.call(l)),a)&&(t=!1,"\x3d"!==a||"||"!==(f=g[1])&&"\x26\x26"!==f||g.spaced||(g[0]="COMPOUND_ASSIGN",g[1]+="\x3d",g=this.tokens[this.tokens.length-2],t=!0),g&&"PROPERTY"!==g[0]&&(f=null!=(c=g.origin)?c:g,(c=la(g[1],f[1]))&&this.error(c,f[2])),t))return a.length;"{"===a&&"EXPORT"===(null!=g?g[0]:void 0)?this.exportSpecifierList=!0:this.exportSpecifierList&&"}"===a&&(this.exportSpecifierList=!1);if(";"===a)this.seenFor=this.seenImport=this.seenExport=!1,p="TERMINATOR";
else if("*"===a&&"EXPORT"===g[0])p="EXPORT_ALL";else if(0<=da.call(P,a))p="MATH";else if(0<=da.call(D,a))p="COMPARE";else if(0<=da.call(l,a))p="COMPOUND_ASSIGN";else if(0<=da.call(ya,a))p="UNARY";else if(0<=da.call(Xa,a))p="UNARY_MATH";else if(0<=da.call(Q,a))p="SHIFT";else if("?"===a&&null!=g&&g.spaced)p="BIN?";else if(g&&!g.spaced)if("("===a&&(h=g[0],0<=da.call(xa,h)))"?"===g[0]&&(g[0]="FUNC_EXIST"),p="CALL_START";else if("["===a&&(k=g[0],0<=da.call(E,k)))switch(p="INDEX_START",g[0]){case "?":g[0]=
"INDEX_SOAK"}h=this.makeToken(p,a);switch(a){case "(":case "{":case "[":this.ends.push({tag:m[a],origin:h});break;case ")":case "}":case "]":this.pair(a)}this.tokens.push(h);return a.length};g.prototype.tagParameters=function(){var a,c,f,g;if(")"!==this.tag())return this;c=[];g=this.tokens;a=g.length;for(g[--a][0]="PARAM_END";f=g[--a];)switch(f[0]){case ")":c.push(f);break;case "(":case "CALL_START":if(c.length)c.pop();else return"("===f[0]&&(f[0]="PARAM_START"),this}return this};g.prototype.closeIndentation=
function(){return this.outdentToken(this.indent)};g.prototype.matchWithInterpolations=function(a,c){var f,h,k,m,t,p,l,r;r=[];t=c.length;if(this.chunk.slice(0,t)!==c)return null;for(l=this.chunk.slice(t);;){m=a.exec(l)[0];this.validateEscapes(m,{isRegex:"/"===c.charAt(0),offsetInChunk:t});r.push(this.makeToken("NEOSTRING",m,t));l=l.slice(m.length);t+=m.length;if("#{"!==l.slice(0,2))break;f=this.getLineAndColumnFromChunk(t+1);m=f[0];f=f[1];f=(new g).tokenize(l.slice(1),{line:m,column:f,untilBalanced:!0});
m=f.tokens;h=f.index;h+=1;p=m[0];f=m[m.length-1];p[0]=p[1]="(";f[0]=f[1]=")";f.origin=["","end of interpolation",f[2]];"TERMINATOR"===(null!=(k=m[1])?k[0]:void 0)&&m.splice(1,1);r.push(["TOKENS",m]);l=l.slice(h);t+=h}l.slice(0,c.length)!==c&&this.error("missing "+c,{length:c.length});a=r[0];k=r[r.length-1];a[2].first_column-=c.length;"\n"===k[1].substr(-1)?(k[2].last_line+=1,k[2].last_column=c.length-1):k[2].last_column+=c.length;0===k[1].length&&--k[2].last_column;return{tokens:r,index:t+c.length}};
g.prototype.mergeInterpolationTokens=function(a,c,f){var g,h,k,m,t,p,l,r,y,q,A,ia;1<a.length&&(r=this.token("STRING_START","(",0,0));k=this.tokens.length;m=t=0;for(p=a.length;t<p;m=++t){q=a[m];g=q[0];ia=q[1];switch(g){case "TOKENS":if(2===ia.length)continue;l=ia[0];A=ia;break;case "NEOSTRING":g=f(q[1],m);if(0===g.length)if(0===m)h=this.tokens.length;else continue;2===m&&null!=h&&this.tokens.splice(h,2);q[0]="STRING";q[1]=this.makeDelimitedLiteral(g,c);l=q;A=[q]}this.tokens.length>k&&(m=this.token("+",
"+"),m[2]={first_line:l[2].first_line,first_column:l[2].first_column,last_line:l[2].first_line,last_column:l[2].first_column});(y=this.tokens).push.apply(y,A)}if(r)return a=a[a.length-1],r.origin=["STRING",null,{first_line:r[2].first_line,first_column:r[2].first_column,last_line:a[2].last_line,last_column:a[2].last_column}],r=this.token("STRING_END",")"),r[2]={first_line:a[2].last_line,first_column:a[2].last_column,last_line:a[2].last_line,last_column:a[2].last_column}};g.prototype.pair=function(a){var c;
c=this.ends;c=c[c.length-1];return a!==(c=null!=c?c.tag:void 0)?("OUTDENT"!==c&&this.error("unmatched "+a),c=this.indents,c=c[c.length-1],this.outdentToken(c,!0),this.pair(a)):this.ends.pop()};g.prototype.getLineAndColumnFromChunk=function(a){var c,f;if(0===a)return[this.chunkLine,this.chunkColumn];f=a>=this.chunk.length?this.chunk:this.chunk.slice(0,+(a-1)+1||9E9);a=ea(f,"\n");c=this.chunkColumn;0<a?(c=f.split("\n"),c=c[c.length-1],c=c.length):c+=f.length;return[this.chunkLine+a,c]};g.prototype.makeToken=
function(a,c,f,g){var h,k;null==f&&(f=0);null==g&&(g=c.length);h={};k=this.getLineAndColumnFromChunk(f);h.first_line=k[0];h.first_column=k[1];f=this.getLineAndColumnFromChunk(f+(0<g?g-1:0));h.last_line=f[0];h.last_column=f[1];return[a,c,h]};g.prototype.token=function(a,c,f,g,h){a=this.makeToken(a,c,f,g);h&&(a.origin=h);this.tokens.push(a);return a};g.prototype.tag=function(){var a;a=this.tokens;a=a[a.length-1];return null!=a?a[0]:void 0};g.prototype.value=function(){var a;a=this.tokens;a=a[a.length-
1];return null!=a?a[1]:void 0};g.prototype.unfinished=function(){var a;return y.test(this.chunk)||"\\"===(a=this.tag())||"."===a||"?."===a||"?::"===a||"UNARY"===a||"MATH"===a||"UNARY_MATH"===a||"+"===a||"-"===a||"**"===a||"SHIFT"===a||"RELATION"===a||"COMPARE"===a||"\x26"===a||"^"===a||"|"===a||"\x26\x26"===a||"||"===a||"BIN?"===a||"THROW"===a||"EXTENDS"===a};g.prototype.formatString=function(a){return a.replace(Z,"$1")};g.prototype.formatHeregex=function(a){return a.replace(M,"$1$2")};g.prototype.validateEscapes=
function(a,c){var f,g,h,k,m;null==c&&(c={});if(g=O.exec(a))if(g[0],a=g[1],h=g[2],f=g[3],m=g[4],!c.isRegex||!h||"0"===h.charAt(0))return f="\\"+(h||f||m),this.error((h?"octal escape sequences are not allowed":"invalid escape sequence")+" "+f,{offset:(null!=(k=c.offsetInChunk)?k:0)+g.index+a.length,length:f.length})};g.prototype.makeDelimitedLiteral=function(a,c){null==c&&(c={});""===a&&"/"===c.delimiter&&(a="(?:)");a=a.replace(RegExp("(\\\\\\\\)|(\\\\0(?\x3d[1-7]))|\\\\?("+c.delimiter+")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)",
"g"),function(a,f,g,h,k,m,t,p,l){switch(!1){case !f:return c.double?f+f:f;case !g:return"\\x00";case !h:return"\\"+h;case !k:return"\\n";case !m:return"\\r";case !t:return"\\u2028";case !p:return"\\u2029";case !l:return c.double?"\\"+l:l}});return""+c.delimiter+a+c.delimiter};g.prototype.error=function(a,c){var f,g,h,k,m;null==c&&(c={});c="first_line"in c?c:(k=this.getLineAndColumnFromChunk(null!=(h=c.offset)?h:0),g=k[0],f=k[1],k,{first_line:g,first_column:f,last_column:f+(null!=(m=c.length)?m:1)-
1});return ra(a,c)};return g}();la=function(a,c){null==c&&(c=a);switch(!1){case 0>da.call(ma.call(t).concat(ma.call(Ca)),a):return"keyword '"+c+"' can't be assigned";case 0>da.call(Y,a):return"'"+c+"' can't be assigned";case 0>da.call(W,a):return"reserved word '"+c+"' can't be assigned";default:return!1}};g.isUnassignable=la;ha=function(a){var c;return"IDENTIFIER"===a[0]?("from"===a[1]&&(a[1][0]="IDENTIFIER",!0),!0):"FOR"===a[0]?!1:"{"===(c=a[1])||"["===c||","===c||":"===c?!1:!0};t="true false null this new delete typeof in instanceof return throw break continue debugger yield if else switch for while do try catch finally class extends super import export default".split(" ");
Ca="undefined Infinity NaN then unless until loop of by when".split(" ");c={and:"\x26\x26",or:"||",is:"\x3d\x3d",isnt:"!\x3d",not:"!",yes:"true",no:"false",on:"true",off:"false"};a=function(){var a;a=[];for(oa in c)a.push(oa);return a}();Ca=Ca.concat(a);W="case function var void with const let enum native implements interface package private protected public static".split(" ");Y=["arguments","eval"];g.JS_FORBIDDEN=t.concat(W).concat(Y);ua=65279;J=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/;
U=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;T=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/;ca=/^[^\n\S]+/;f=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;q=/^[-=]>/;A=/^(?:\n[^\n\S]*)+/;k=/^`(?!``)((?:[^`\\]|\\[\s\S])*)`/;N=/^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/;ba=/^(?:'''|"""|'|")/;K=/^(?:[^\\']|\\[\s\S])*/;V=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/;x=/^(?:[^\\']|\\[\s\S]|'(?!''))*/;G=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/;Z=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g;
X=/\s*\n\s*/g;F=/\n+([^\n\S]*)(?=\S)/g;aa=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;S=/^\w*/;ka=/^(?!.*(.).*\1)[imgy]*$/;v=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/;M=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g;z=/^(\/|\/{3}\s*)(\*)/;I=/^\/=?\s/;w=/\*\//;y=/^\s*(?:,|\??\.(?![.\d])|::)/;O=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/;p=/^[^\n\S]*\n/;R=/\n[^\n\S]*$/;qa=/\s+$/;l="-\x3d +\x3d /\x3d *\x3d %\x3d ||\x3d \x26\x26\x3d ?\x3d \x3c\x3c\x3d \x3e\x3e\x3d \x3e\x3e\x3e\x3d \x26\x3d ^\x3d |\x3d **\x3d //\x3d %%\x3d".split(" ");
ya=["NEW","TYPEOF","DELETE","DO"];Xa=["!","~"];Q=["\x3c\x3c","\x3e\x3e","\x3e\x3e\x3e"];D="\x3d\x3d !\x3d \x3c \x3e \x3c\x3d \x3e\x3d".split(" ");P=["*","/","%","//","%%"];B=["IN","OF","INSTANCEOF"];xa="IDENTIFIER PROPERTY ) ] ? @ THIS SUPER".split(" ");E=xa.concat("NUMBER INFINITY NAN STRING STRING_END REGEX REGEX_END BOOL NULL UNDEFINED } ::".split(" "));H=E.concat(["++","--"]);h=["INDENT","OUTDENT","TERMINATOR"];r=[")","}","]"]}).call(this);return g}();u["./parser"]=function(){var g={},ua={exports:g},
xa=function(){function g(){this.yy={}}var a=function(a,n,pa,b){pa=pa||{};for(b=a.length;b--;pa[a[b]]=n);return pa},c=[1,22],u=[1,25],f=[1,83],D=[1,79],l=[1,84],w=[1,85],G=[1,81],F=[1,82],x=[1,56],v=[1,58],M=[1,59],N=[1,60],J=[1,61],r=[1,62],E=[1,49],O=[1,50],m=[1,32],k=[1,68],t=[1,69],p=[1,78],h=[1,47],y=[1,51],P=[1,52],A=[1,67],H=[1,65],U=[1,66],T=[1,64],I=[1,42],aa=[1,48],S=[1,63],z=[1,73],B=[1,74],W=[1,75],C=[1,76],Q=[1,46],X=[1,72],Y=[1,34],V=[1,35],Z=[1,36],K=[1,37],ba=[1,38],R=[1,39],xa=[1,
86],ua=[1,6,32,42,131],qa=[1,101],ka=[1,89],ca=[1,88],ea=[1,87],ga=[1,90],ha=[1,91],la=[1,92],oa=[1,93],L=[1,94],ja=[1,95],ra=[1,96],da=[1,97],ma=[1,98],sa=[1,99],ia=[1,100],ya=[1,104],ta=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Ja=[2,165],Ta=[1,110],Ga=[1,111],Ua=[1,112],Fa=[1,113],Pa=[1,115],Qa=[1,116],Na=[1,109],za=[1,6,32,42,131,133,135,139,156],na=[2,27],fa=[1,123],Ha=[1,121],Aa=[1,6,31,32,40,41,42,65,70,73,
82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Ia=[2,94],b=[1,6,31,32,42,46,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],n=[2,73],pa=[1,128],e=[1,133],d=[1,134],va=[1,136],Ka=[1,6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,
173,174],wa=[2,91],Gb=[1,6,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],ab=[2,63],Hb=[1,166],bb=[1,178],Wa=[1,180],Ib=[1,175],Oa=[1,182],ub=[1,184],La=[1,6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,96,113,114,115,120,122,131,133,134,135,139,140,156,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],Jb=[2,110],Kb=[1,6,31,32,40,41,42,58,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,
135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Lb=[1,6,31,32,40,41,42,46,58,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Mb=[40,41,114],Nb=[1,241],vb=[1,240],Ma=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156],Ea=[2,71],Ob=[1,250],Va=[6,31,32,65,70],hb=[6,31,32,55,65,70,73],cb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,164,166,
167,168,169,170,171,172,173,174],Pb=[40,41,82,83,84,85,87,90,113,114],ib=[1,269],db=[2,62],jb=[1,279],Ya=[1,281],wb=[1,286],eb=[1,288],Qb=[2,186],xb=[1,6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],kb=[1,297],Ra=[6,31,32,70,115,120],Rb=[1,6,31,32,40,41,42,55,58,65,70,73,82,83,84,85,87,89,90,94,96,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,161,162,163,
164,165,166,167,168,169,170,171,172,173,174,175],Sb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,140,156],Za=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,134,140,156],lb=[146,147,148],mb=[70,146,147,148],nb=[6,31,94],Tb=[1,311],Ba=[6,31,32,70,94],Ub=[6,31,32,58,70,94],yb=[6,31,32,55,58,70,94],Vb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,166,167,168,169,170,171,172,173,174],Wb=[12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,62,63,67,68,89,92,95,97,105,112,117,118,119,
125,129,130,133,135,137,139,149,155,157,158,159,160,161,162],Xb=[2,175],Sa=[6,31,32],fb=[2,72],Yb=[1,323],Zb=[1,324],$b=[1,6,31,32,42,65,70,73,89,94,115,120,122,127,128,131,133,134,135,139,140,151,153,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],ob=[32,151,153],ac=[1,6,32,42,65,70,73,89,94,115,120,122,131,134,140,156],pb=[1,350],zb=[1,356],Ab=[1,6,32,42,131,156],gb=[2,86],qb=[1,366],rb=[1,367],bc=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,151,156,159,160,163,
164,165,166,167,168,169,170,171,172,173,174],Bb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,140,156],cc=[1,380],dc=[1,381],Cb=[6,31,32,94],ec=[6,31,32,70],Db=[1,6,31,32,42,65,70,73,89,94,115,120,122,127,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],fc=[31,70],sb=[1,407],tb=[1,408],Eb=[1,414],Fb=[1,415],gc={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,YieldReturn:9,Return:10,Comment:11,STATEMENT:12,
Import:13,Export:14,Value:15,Invocation:16,Code:17,Operation:18,Assign:19,If:20,Try:21,While:22,For:23,Switch:24,Class:25,Throw:26,Yield:27,YIELD:28,FROM:29,Block:30,INDENT:31,OUTDENT:32,Identifier:33,IDENTIFIER:34,Property:35,PROPERTY:36,AlphaNumeric:37,NUMBER:38,String:39,STRING:40,STRING_START:41,STRING_END:42,Regex:43,REGEX:44,REGEX_START:45,REGEX_END:46,Literal:47,JS:48,UNDEFINED:49,NULL:50,BOOL:51,INFINITY:52,NAN:53,Assignable:54,"\x3d":55,AssignObj:56,ObjAssignable:57,":":58,SimpleObjAssignable:59,
ThisProperty:60,RETURN:61,HERECOMMENT:62,PARAM_START:63,ParamList:64,PARAM_END:65,FuncGlyph:66,"-\x3e":67,"\x3d\x3e":68,OptComma:69,",":70,Param:71,ParamVar:72,"...":73,Array:74,Object:75,Splat:76,SimpleAssignable:77,Accessor:78,Parenthetical:79,Range:80,This:81,".":82,"?.":83,"::":84,"?::":85,Index:86,INDEX_START:87,IndexValue:88,INDEX_END:89,INDEX_SOAK:90,Slice:91,"{":92,AssignList:93,"}":94,CLASS:95,EXTENDS:96,IMPORT:97,ImportDefaultSpecifier:98,ImportNamespaceSpecifier:99,ImportSpecifierList:100,
ImportSpecifier:101,AS:102,DEFAULT:103,IMPORT_ALL:104,EXPORT:105,ExportSpecifierList:106,EXPORT_ALL:107,ExportSpecifier:108,OptFuncExist:109,Arguments:110,Super:111,SUPER:112,FUNC_EXIST:113,CALL_START:114,CALL_END:115,ArgList:116,THIS:117,"@":118,"[":119,"]":120,RangeDots:121,"..":122,Arg:123,SimpleArgs:124,TRY:125,Catch:126,FINALLY:127,CATCH:128,THROW:129,"(":130,")":131,WhileSource:132,WHILE:133,WHEN:134,UNTIL:135,Loop:136,LOOP:137,ForBody:138,FOR:139,BY:140,ForStart:141,ForSource:142,ForVariables:143,
OWN:144,ForValue:145,FORIN:146,FOROF:147,FORFROM:148,SWITCH:149,Whens:150,ELSE:151,When:152,LEADING_WHEN:153,IfBlock:154,IF:155,POST_IF:156,UNARY:157,UNARY_MATH:158,"-":159,"+":160,"--":161,"++":162,"?":163,MATH:164,"**":165,SHIFT:166,COMPARE:167,"\x26":168,"^":169,"|":170,"\x26\x26":171,"||":172,"BIN?":173,RELATION:174,COMPOUND_ASSIGN:175,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",12:"STATEMENT",28:"YIELD",29:"FROM",31:"INDENT",32:"OUTDENT",34:"IDENTIFIER",36:"PROPERTY",38:"NUMBER",40:"STRING",
41:"STRING_START",42:"STRING_END",44:"REGEX",45:"REGEX_START",46:"REGEX_END",48:"JS",49:"UNDEFINED",50:"NULL",51:"BOOL",52:"INFINITY",53:"NAN",55:"\x3d",58:":",61:"RETURN",62:"HERECOMMENT",63:"PARAM_START",65:"PARAM_END",67:"-\x3e",68:"\x3d\x3e",70:",",73:"...",82:".",83:"?.",84:"::",85:"?::",87:"INDEX_START",89:"INDEX_END",90:"INDEX_SOAK",92:"{",94:"}",95:"CLASS",96:"EXTENDS",97:"IMPORT",102:"AS",103:"DEFAULT",104:"IMPORT_ALL",105:"EXPORT",107:"EXPORT_ALL",112:"SUPER",113:"FUNC_EXIST",114:"CALL_START",
115:"CALL_END",117:"THIS",118:"@",119:"[",120:"]",122:"..",125:"TRY",127:"FINALLY",128:"CATCH",129:"THROW",130:"(",131:")",133:"WHILE",134:"WHEN",135:"UNTIL",137:"LOOP",139:"FOR",140:"BY",144:"OWN",146:"FORIN",147:"FOROF",148:"FORFROM",149:"SWITCH",151:"ELSE",153:"LEADING_WHEN",155:"IF",156:"POST_IF",157:"UNARY",158:"UNARY_MATH",159:"-",160:"+",161:"--",162:"++",163:"?",164:"MATH",165:"**",166:"SHIFT",167:"COMPARE",168:"\x26",169:"^",170:"|",171:"\x26\x26",172:"||",173:"BIN?",174:"RELATION",175:"COMPOUND_ASSIGN"},
productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[5,1],[8,1],[8,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[27,1],[27,2],[27,3],[30,2],[30,3],[33,1],[35,1],[37,1],[37,1],[39,1],[39,3],[43,1],[43,3],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[19,3],[19,4],[19,5],[56,1],[56,3],[56,5],[56,3],[56,5],[56,1],[59,1],[59,1],[59,1],[57,1],[57,1],[10,2],[10,1],[9,3],[9,2],[11,1],[17,5],[17,2],[66,1],[66,1],[69,0],[69,1],[64,0],[64,
1],[64,3],[64,4],[64,6],[71,1],[71,2],[71,3],[71,1],[72,1],[72,1],[72,1],[72,1],[76,2],[77,1],[77,2],[77,2],[77,1],[54,1],[54,1],[54,1],[15,1],[15,1],[15,1],[15,1],[15,1],[78,2],[78,2],[78,2],[78,2],[78,1],[78,1],[86,3],[86,2],[88,1],[88,1],[75,4],[93,0],[93,1],[93,3],[93,4],[93,6],[25,1],[25,2],[25,3],[25,4],[25,2],[25,3],[25,4],[25,5],[13,2],[13,4],[13,4],[13,5],[13,7],[13,6],[13,9],[100,1],[100,3],[100,4],[100,4],[100,6],[101,1],[101,3],[101,1],[101,3],[98,1],[99,3],[14,3],[14,5],[14,2],[14,4],
[14,5],[14,6],[14,3],[14,4],[14,7],[106,1],[106,3],[106,4],[106,4],[106,6],[108,1],[108,3],[108,3],[108,1],[16,3],[16,3],[16,3],[16,1],[111,1],[111,2],[109,0],[109,1],[110,2],[110,4],[81,1],[81,1],[60,2],[74,2],[74,4],[121,1],[121,1],[80,5],[91,3],[91,2],[91,2],[91,1],[116,1],[116,3],[116,4],[116,4],[116,6],[123,1],[123,1],[123,1],[124,1],[124,3],[21,2],[21,3],[21,4],[21,5],[126,3],[126,3],[126,2],[26,2],[79,3],[79,5],[132,2],[132,4],[132,2],[132,4],[22,2],[22,2],[22,2],[22,1],[136,2],[136,2],[23,
2],[23,2],[23,2],[138,2],[138,4],[138,2],[141,2],[141,3],[145,1],[145,1],[145,1],[145,1],[143,1],[143,3],[142,2],[142,2],[142,4],[142,4],[142,4],[142,6],[142,6],[142,2],[142,4],[24,5],[24,7],[24,4],[24,6],[150,1],[150,2],[152,3],[152,4],[154,3],[154,5],[20,1],[20,3],[20,3],[20,3],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,5],[18,4],[18,3]],performAction:function(a,n,pa,b,c,e,d){a=
e.length-1;switch(c){case 1:return this.$=b.addLocationDataFn(d[a],d[a])(new b.Block);case 2:return this.$=e[a];case 3:this.$=b.addLocationDataFn(d[a],d[a])(b.Block.wrap([e[a]]));break;case 4:this.$=b.addLocationDataFn(d[a-2],d[a])(e[a-2].push(e[a]));break;case 5:this.$=e[a-1];break;case 6:case 7:case 8:case 9:case 10:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 35:case 40:case 42:case 56:case 57:case 58:case 59:case 60:case 61:case 71:case 72:case 82:case 83:case 84:case 85:case 90:case 91:case 94:case 98:case 104:case 162:case 186:case 187:case 189:case 219:case 220:case 238:case 244:this.$=
e[a];break;case 11:this.$=b.addLocationDataFn(d[a],d[a])(new b.StatementLiteral(e[a]));break;case 27:this.$=b.addLocationDataFn(d[a],d[a])(new b.Op(e[a],new b.Value(new b.Literal(""))));break;case 28:case 248:case 249:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op(e[a-1],e[a]));break;case 29:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op(e[a-2].concat(e[a-1]),e[a]));break;case 30:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Block);break;case 31:case 105:this.$=b.addLocationDataFn(d[a-2],d[a])(e[a-
1]);break;case 32:this.$=b.addLocationDataFn(d[a],d[a])(new b.IdentifierLiteral(e[a]));break;case 33:this.$=b.addLocationDataFn(d[a],d[a])(new b.PropertyName(e[a]));break;case 34:this.$=b.addLocationDataFn(d[a],d[a])(new b.NumberLiteral(e[a]));break;case 36:this.$=b.addLocationDataFn(d[a],d[a])(new b.StringLiteral(e[a]));break;case 37:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.StringWithInterpolations(e[a-1]));break;case 38:this.$=b.addLocationDataFn(d[a],d[a])(new b.RegexLiteral(e[a]));break;
case 39:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.RegexWithInterpolations(e[a-1].args));break;case 41:this.$=b.addLocationDataFn(d[a],d[a])(new b.PassthroughLiteral(e[a]));break;case 43:this.$=b.addLocationDataFn(d[a],d[a])(new b.UndefinedLiteral);break;case 44:this.$=b.addLocationDataFn(d[a],d[a])(new b.NullLiteral);break;case 45:this.$=b.addLocationDataFn(d[a],d[a])(new b.BooleanLiteral(e[a]));break;case 46:this.$=b.addLocationDataFn(d[a],d[a])(new b.InfinityLiteral(e[a]));break;case 47:this.$=
b.addLocationDataFn(d[a],d[a])(new b.NaNLiteral);break;case 48:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(e[a-2],e[a]));break;case 49:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Assign(e[a-3],e[a]));break;case 50:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(e[a-4],e[a-1]));break;case 51:case 87:case 92:case 93:case 95:case 96:case 97:case 221:case 222:this.$=b.addLocationDataFn(d[a],d[a])(new b.Value(e[a]));break;case 52:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(b.addLocationDataFn(d[a-
2])(new b.Value(e[a-2])),e[a],"object",{operatorToken:b.addLocationDataFn(d[a-1])(new b.Literal(e[a-1]))}));break;case 53:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(b.addLocationDataFn(d[a-4])(new b.Value(e[a-4])),e[a-1],"object",{operatorToken:b.addLocationDataFn(d[a-3])(new b.Literal(e[a-3]))}));break;case 54:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(b.addLocationDataFn(d[a-2])(new b.Value(e[a-2])),e[a],null,{operatorToken:b.addLocationDataFn(d[a-1])(new b.Literal(e[a-1]))}));
break;case 55:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(b.addLocationDataFn(d[a-4])(new b.Value(e[a-4])),e[a-1],null,{operatorToken:b.addLocationDataFn(d[a-3])(new b.Literal(e[a-3]))}));break;case 62:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Return(e[a]));break;case 63:this.$=b.addLocationDataFn(d[a],d[a])(new b.Return);break;case 64:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.YieldReturn(e[a]));break;case 65:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.YieldReturn);break;case 66:this.$=
b.addLocationDataFn(d[a],d[a])(new b.Comment(e[a]));break;case 67:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Code(e[a-3],e[a],e[a-1]));break;case 68:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Code([],e[a],e[a-1]));break;case 69:this.$=b.addLocationDataFn(d[a],d[a])("func");break;case 70:this.$=b.addLocationDataFn(d[a],d[a])("boundfunc");break;case 73:case 110:this.$=b.addLocationDataFn(d[a],d[a])([]);break;case 74:case 111:case 130:case 150:case 181:case 223:this.$=b.addLocationDataFn(d[a],
d[a])([e[a]]);break;case 75:case 112:case 131:case 151:case 182:this.$=b.addLocationDataFn(d[a-2],d[a])(e[a-2].concat(e[a]));break;case 76:case 113:case 132:case 152:case 183:this.$=b.addLocationDataFn(d[a-3],d[a])(e[a-3].concat(e[a]));break;case 77:case 114:case 134:case 154:case 185:this.$=b.addLocationDataFn(d[a-5],d[a])(e[a-5].concat(e[a-2]));break;case 78:this.$=b.addLocationDataFn(d[a],d[a])(new b.Param(e[a]));break;case 79:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Param(e[a-1],null,!0));
break;case 80:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Param(e[a-2],e[a]));break;case 81:case 188:this.$=b.addLocationDataFn(d[a],d[a])(new b.Expansion);break;case 86:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Splat(e[a-1]));break;case 88:this.$=b.addLocationDataFn(d[a-1],d[a])(e[a-1].add(e[a]));break;case 89:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Value(e[a-1],[].concat(e[a])));break;case 99:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Access(e[a]));break;case 100:this.$=b.addLocationDataFn(d[a-
1],d[a])(new b.Access(e[a],"soak"));break;case 101:this.$=b.addLocationDataFn(d[a-1],d[a])([b.addLocationDataFn(d[a-1])(new b.Access(new b.PropertyName("prototype"))),b.addLocationDataFn(d[a])(new b.Access(e[a]))]);break;case 102:this.$=b.addLocationDataFn(d[a-1],d[a])([b.addLocationDataFn(d[a-1])(new b.Access(new b.PropertyName("prototype"),"soak")),b.addLocationDataFn(d[a])(new b.Access(e[a]))]);break;case 103:this.$=b.addLocationDataFn(d[a],d[a])(new b.Access(new b.PropertyName("prototype")));
break;case 106:this.$=b.addLocationDataFn(d[a-1],d[a])(b.extend(e[a],{soak:!0}));break;case 107:this.$=b.addLocationDataFn(d[a],d[a])(new b.Index(e[a]));break;case 108:this.$=b.addLocationDataFn(d[a],d[a])(new b.Slice(e[a]));break;case 109:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Obj(e[a-2],e[a-3].generated));break;case 115:this.$=b.addLocationDataFn(d[a],d[a])(new b.Class);break;case 116:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Class(null,null,e[a]));break;case 117:this.$=b.addLocationDataFn(d[a-
2],d[a])(new b.Class(null,e[a]));break;case 118:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Class(null,e[a-1],e[a]));break;case 119:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Class(e[a]));break;case 120:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Class(e[a-1],null,e[a]));break;case 121:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Class(e[a-2],e[a]));break;case 122:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Class(e[a-3],e[a-1],e[a]));break;case 123:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.ImportDeclaration(null,
e[a]));break;case 124:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ImportDeclaration(new b.ImportClause(e[a-2],null),e[a]));break;case 125:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ImportDeclaration(new b.ImportClause(null,e[a-2]),e[a]));break;case 126:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.ImportDeclaration(new b.ImportClause(null,new b.ImportSpecifierList([])),e[a]));break;case 127:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.ImportDeclaration(new b.ImportClause(null,new b.ImportSpecifierList(e[a-
4])),e[a]));break;case 128:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.ImportDeclaration(new b.ImportClause(e[a-4],e[a-2]),e[a]));break;case 129:this.$=b.addLocationDataFn(d[a-8],d[a])(new b.ImportDeclaration(new b.ImportClause(e[a-7],new b.ImportSpecifierList(e[a-4])),e[a]));break;case 133:case 153:case 168:case 184:this.$=b.addLocationDataFn(d[a-3],d[a])(e[a-2]);break;case 135:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportSpecifier(e[a]));break;case 136:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportSpecifier(e[a-
2],e[a]));break;case 137:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportSpecifier(new b.Literal(e[a])));break;case 138:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportSpecifier(new b.Literal(e[a-2]),e[a]));break;case 139:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportDefaultSpecifier(e[a]));break;case 140:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportNamespaceSpecifier(new b.Literal(e[a-2]),e[a]));break;case 141:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportNamedDeclaration(new b.ExportSpecifierList([])));
break;case 142:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.ExportNamedDeclaration(new b.ExportSpecifierList(e[a-2])));break;case 143:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.ExportNamedDeclaration(e[a]));break;case 144:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ExportNamedDeclaration(new b.Assign(e[a-2],e[a],null,{moduleDeclaration:"export"})));break;case 145:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.ExportNamedDeclaration(new b.Assign(e[a-3],e[a],null,{moduleDeclaration:"export"})));
break;case 146:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.ExportNamedDeclaration(new b.Assign(e[a-4],e[a-1],null,{moduleDeclaration:"export"})));break;case 147:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportDefaultDeclaration(e[a]));break;case 148:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ExportAllDeclaration(new b.Literal(e[a-2]),e[a]));break;case 149:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.ExportNamedDeclaration(new b.ExportSpecifierList(e[a-4]),e[a]));break;case 155:this.$=b.addLocationDataFn(d[a],
d[a])(new b.ExportSpecifier(e[a]));break;case 156:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportSpecifier(e[a-2],e[a]));break;case 157:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportSpecifier(e[a-2],new b.Literal(e[a])));break;case 158:this.$=b.addLocationDataFn(d[a],d[a])(new b.ExportSpecifier(new b.Literal(e[a])));break;case 159:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.TaggedTemplateCall(e[a-2],e[a],e[a-1]));break;case 160:case 161:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Call(e[a-
2],e[a],e[a-1]));break;case 163:this.$=b.addLocationDataFn(d[a],d[a])(new b.SuperCall);break;case 164:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.SuperCall(e[a]));break;case 165:this.$=b.addLocationDataFn(d[a],d[a])(!1);break;case 166:this.$=b.addLocationDataFn(d[a],d[a])(!0);break;case 167:this.$=b.addLocationDataFn(d[a-1],d[a])([]);break;case 169:case 170:this.$=b.addLocationDataFn(d[a],d[a])(new b.Value(new b.ThisLiteral));break;case 171:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Value(b.addLocationDataFn(d[a-
1])(new b.ThisLiteral),[b.addLocationDataFn(d[a])(new b.Access(e[a]))],"this"));break;case 172:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Arr([]));break;case 173:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Arr(e[a-2]));break;case 174:this.$=b.addLocationDataFn(d[a],d[a])("inclusive");break;case 175:this.$=b.addLocationDataFn(d[a],d[a])("exclusive");break;case 176:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Range(e[a-3],e[a-1],e[a-2]));break;case 177:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Range(e[a-
2],e[a],e[a-1]));break;case 178:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Range(e[a-1],null,e[a]));break;case 179:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Range(null,e[a],e[a-1]));break;case 180:this.$=b.addLocationDataFn(d[a],d[a])(new b.Range(null,null,e[a]));break;case 190:this.$=b.addLocationDataFn(d[a-2],d[a])([].concat(e[a-2],e[a]));break;case 191:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Try(e[a]));break;case 192:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Try(e[a-1],e[a][0],
e[a][1]));break;case 193:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Try(e[a-2],null,null,e[a]));break;case 194:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Try(e[a-3],e[a-2][0],e[a-2][1],e[a]));break;case 195:this.$=b.addLocationDataFn(d[a-2],d[a])([e[a-1],e[a]]);break;case 196:this.$=b.addLocationDataFn(d[a-2],d[a])([b.addLocationDataFn(d[a-1])(new b.Value(e[a-1])),e[a]]);break;case 197:this.$=b.addLocationDataFn(d[a-1],d[a])([null,e[a]]);break;case 198:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Throw(e[a]));
break;case 199:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Parens(e[a-1]));break;case 200:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Parens(e[a-2]));break;case 201:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.While(e[a]));break;case 202:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.While(e[a-2],{guard:e[a]}));break;case 203:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.While(e[a],{invert:!0}));break;case 204:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.While(e[a-2],{invert:!0,guard:e[a]}));
break;case 205:this.$=b.addLocationDataFn(d[a-1],d[a])(e[a-1].addBody(e[a]));break;case 206:case 207:this.$=b.addLocationDataFn(d[a-1],d[a])(e[a].addBody(b.addLocationDataFn(d[a-1])(b.Block.wrap([e[a-1]]))));break;case 208:this.$=b.addLocationDataFn(d[a],d[a])(e[a]);break;case 209:this.$=b.addLocationDataFn(d[a-1],d[a])((new b.While(b.addLocationDataFn(d[a-1])(new b.BooleanLiteral("true")))).addBody(e[a]));break;case 210:this.$=b.addLocationDataFn(d[a-1],d[a])((new b.While(b.addLocationDataFn(d[a-
1])(new b.BooleanLiteral("true")))).addBody(b.addLocationDataFn(d[a])(b.Block.wrap([e[a]]))));break;case 211:case 212:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.For(e[a-1],e[a]));break;case 213:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.For(e[a],e[a-1]));break;case 214:this.$=b.addLocationDataFn(d[a-1],d[a])({source:b.addLocationDataFn(d[a])(new b.Value(e[a]))});break;case 215:this.$=b.addLocationDataFn(d[a-3],d[a])({source:b.addLocationDataFn(d[a-2])(new b.Value(e[a-2])),step:e[a]});break;
case 216:b=b.addLocationDataFn(d[a-1],d[a]);e[a].own=e[a-1].own;e[a].ownTag=e[a-1].ownTag;e[a].name=e[a-1][0];e[a].index=e[a-1][1];this.$=b(e[a]);break;case 217:this.$=b.addLocationDataFn(d[a-1],d[a])(e[a]);break;case 218:c=b.addLocationDataFn(d[a-2],d[a]);e[a].own=!0;e[a].ownTag=b.addLocationDataFn(d[a-1])(new b.Literal(e[a-1]));this.$=c(e[a]);break;case 224:this.$=b.addLocationDataFn(d[a-2],d[a])([e[a-2],e[a]]);break;case 225:this.$=b.addLocationDataFn(d[a-1],d[a])({source:e[a]});break;case 226:this.$=
b.addLocationDataFn(d[a-1],d[a])({source:e[a],object:!0});break;case 227:this.$=b.addLocationDataFn(d[a-3],d[a])({source:e[a-2],guard:e[a]});break;case 228:this.$=b.addLocationDataFn(d[a-3],d[a])({source:e[a-2],guard:e[a],object:!0});break;case 229:this.$=b.addLocationDataFn(d[a-3],d[a])({source:e[a-2],step:e[a]});break;case 230:this.$=b.addLocationDataFn(d[a-5],d[a])({source:e[a-4],guard:e[a-2],step:e[a]});break;case 231:this.$=b.addLocationDataFn(d[a-5],d[a])({source:e[a-4],step:e[a-2],guard:e[a]});
break;case 232:this.$=b.addLocationDataFn(d[a-1],d[a])({source:e[a],from:!0});break;case 233:this.$=b.addLocationDataFn(d[a-3],d[a])({source:e[a-2],guard:e[a],from:!0});break;case 234:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Switch(e[a-3],e[a-1]));break;case 235:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.Switch(e[a-5],e[a-3],e[a-1]));break;case 236:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Switch(null,e[a-1]));break;case 237:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.Switch(null,e[a-
3],e[a-1]));break;case 239:this.$=b.addLocationDataFn(d[a-1],d[a])(e[a-1].concat(e[a]));break;case 240:this.$=b.addLocationDataFn(d[a-2],d[a])([[e[a-1],e[a]]]);break;case 241:this.$=b.addLocationDataFn(d[a-3],d[a])([[e[a-2],e[a-1]]]);break;case 242:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.If(e[a-1],e[a],{type:e[a-2]}));break;case 243:this.$=b.addLocationDataFn(d[a-4],d[a])(e[a-4].addElse(b.addLocationDataFn(d[a-2],d[a])(new b.If(e[a-1],e[a],{type:e[a-2]}))));break;case 245:this.$=b.addLocationDataFn(d[a-
2],d[a])(e[a-2].addElse(e[a]));break;case 246:case 247:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.If(e[a],b.addLocationDataFn(d[a-2])(b.Block.wrap([e[a-2]])),{type:e[a-1],statement:!0}));break;case 250:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("-",e[a]));break;case 251:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("+",e[a]));break;case 252:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("--",e[a]));break;case 253:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("++",e[a]));break;case 254:this.$=
b.addLocationDataFn(d[a-1],d[a])(new b.Op("--",e[a-1],null,!0));break;case 255:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("++",e[a-1],null,!0));break;case 256:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Existence(e[a-1]));break;case 257:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op("+",e[a-2],e[a]));break;case 258:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op("-",e[a-2],e[a]));break;case 259:case 260:case 261:case 262:case 263:case 264:case 265:case 266:case 267:case 268:this.$=b.addLocationDataFn(d[a-
2],d[a])(new b.Op(e[a-1],e[a-2],e[a]));break;case 269:d=b.addLocationDataFn(d[a-2],d[a]);e="!"===e[a-1].charAt(0)?(new b.Op(e[a-1].slice(1),e[a-2],e[a])).invert():new b.Op(e[a-1],e[a-2],e[a]);this.$=d(e);break;case 270:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(e[a-2],e[a],e[a-1]));break;case 271:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(e[a-4],e[a-1],e[a-3]));break;case 272:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Assign(e[a-3],e[a],e[a-2]));break;case 273:this.$=b.addLocationDataFn(d[a-
2],d[a])(new b.Extends(e[a-2],e[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,
158:V,159:Z,160:K,161:ba,162:R},{1:[3]},{1:[2,2],6:xa},a(ua,[2,3]),a(ua,[2,6],{141:77,132:102,138:103,133:z,135:B,139:C,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(ua,[2,7],{141:77,132:105,138:106,133:z,135:B,139:C,156:ya}),a(ua,[2,8]),a(ta,[2,14],{109:107,78:108,86:114,40:Ja,41:Ja,114:Ja,82:Ta,83:Ga,84:Ua,85:Fa,87:Pa,90:Qa,113:Na}),a(ta,[2,15],{86:114,109:117,78:118,82:Ta,83:Ga,84:Ua,85:Fa,87:Pa,90:Qa,113:Na,114:Ja}),a(ta,[2,16]),a(ta,
[2,17]),a(ta,[2,18]),a(ta,[2,19]),a(ta,[2,20]),a(ta,[2,21]),a(ta,[2,22]),a(ta,[2,23]),a(ta,[2,24]),a(ta,[2,25]),a(ta,[2,26]),a(za,[2,9]),a(za,[2,10]),a(za,[2,11]),a(za,[2,12]),a(za,[2,13]),a([1,6,32,42,131,133,135,139,156,163,164,165,166,167,168,169,170,171,172,173,174],na,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,7:120,
8:122,12:c,28:fa,29:Ha,34:f,38:D,40:l,41:w,44:G,45:F,48:x,49:v,50:M,51:N,52:J,53:r,61:[1,119],62:O,63:m,67:k,68:t,92:p,95:h,97:y,105:P,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,137:W,149:Q,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R}),a(Aa,Ia,{55:[1,124]}),a(Aa,[2,95]),a(Aa,[2,96]),a(Aa,[2,97]),a(Aa,[2,98]),a(b,[2,162]),a([6,31,65,70],n,{64:125,71:126,72:127,33:129,60:130,74:131,75:132,34:f,73:pa,92:p,118:e,119:d}),{30:135,31:va},{7:137,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:138,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,
25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:139,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,
34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:140,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,
43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{15:142,16:143,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:144,60:71,74:53,75:54,77:141,79:28,80:29,81:30,92:p,111:31,112:A,117:H,118:U,119:T,
130:S},{15:142,16:143,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:144,60:71,74:53,75:54,77:145,79:28,80:29,81:30,92:p,111:31,112:A,117:H,118:U,119:T,130:S},a(Ka,wa,{96:[1,149],161:[1,146],162:[1,147],175:[1,148]}),a(ta,[2,244],{151:[1,150]}),{30:151,31:va},{30:152,31:va},a(ta,[2,208]),{30:153,31:va},{7:154,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:[1,155],33:70,34:f,37:55,
38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Gb,[2,115],{47:27,79:28,80:29,81:30,111:31,74:53,75:54,37:55,43:57,33:70,60:71,39:80,15:142,16:143,54:144,30:156,77:158,31:va,34:f,38:D,40:l,41:w,44:G,45:F,48:x,49:v,50:M,
51:N,52:J,53:r,92:p,96:[1,157],112:A,117:H,118:U,119:T,130:S}),{7:159,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,
158:V,159:Z,160:K,161:ba,162:R},a(za,ab,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,7:160,12:c,28:fa,34:f,38:D,40:l,41:w,44:G,45:F,48:x,49:v,50:M,51:N,52:J,53:r,61:E,62:O,63:m,67:k,68:t,92:p,95:h,97:y,105:P,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,137:W,149:Q,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R}),a([1,6,
31,32,42,70,94,131,133,135,139,156],[2,66]),{33:165,34:f,39:161,40:l,41:w,92:[1,164],98:162,99:163,104:Hb},{25:168,33:169,34:f,92:[1,167],95:h,103:[1,170],107:[1,171]},a(Ka,[2,92]),a(Ka,[2,93]),a(Aa,[2,40]),a(Aa,[2,41]),a(Aa,[2,42]),a(Aa,[2,43]),a(Aa,[2,44]),a(Aa,[2,45]),a(Aa,[2,46]),a(Aa,[2,47]),{4:172,5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,31:[1,173],33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,
48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:174,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:bb,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,
53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,73:Wa,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,116:176,117:H,118:U,119:T,120:Ib,123:177,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Aa,[2,169]),a(Aa,[2,170],{35:181,36:Oa}),a([1,6,31,32,42,46,65,70,73,82,83,84,85,87,89,90,94,113,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],[2,163],
{110:183,114:ub}),{31:[2,69]},{31:[2,70]},a(La,[2,87]),a(La,[2,90]),{7:185,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,
157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:186,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,
162:R},{7:187,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:189,8:122,10:20,11:21,
12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,30:188,31:va,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{33:194,34:f,60:195,74:196,75:197,80:190,
92:p,118:e,119:T,143:191,144:[1,192],145:193},{142:198,146:[1,199],147:[1,200],148:[1,201]},a([6,31,70,94],Jb,{39:80,93:202,56:203,57:204,59:205,11:206,37:207,33:208,35:209,60:210,34:f,36:Oa,38:D,40:l,41:w,62:O,118:e}),a(Kb,[2,34]),a(Kb,[2,35]),a(Aa,[2,38]),{15:142,16:211,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:144,60:71,74:53,75:54,77:212,79:28,80:29,81:30,92:p,111:31,112:A,117:H,118:U,119:T,130:S},a([1,6,29,31,32,40,41,42,55,58,65,70,73,82,83,
84,85,87,89,90,94,96,102,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],[2,32]),a(Lb,[2,36]),{4:213,5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,
112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(ua,[2,5],{7:4,8:5,9:6,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,5:214,12:c,28:u,34:f,38:D,40:l,41:w,44:G,45:F,48:x,49:v,50:M,51:N,52:J,53:r,61:E,62:O,63:m,67:k,68:t,
92:p,95:h,97:y,105:P,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,133:z,135:B,137:W,139:C,149:Q,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R}),a(ta,[2,256]),{7:215,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,
129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:216,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,
136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:217,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,
149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:218,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,
159:Z,160:K,161:ba,162:R},{7:219,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:220,
8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:221,8:122,10:20,11:21,12:c,13:23,
14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:222,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:223,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,
25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:224,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,
34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:225,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,
43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:226,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,
50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:227,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,
61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:228,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,
74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(ta,[2,207]),a(ta,[2,212]),{7:229,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,
75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(ta,[2,206]),a(ta,[2,211]),{39:230,40:l,41:w,110:231,114:ub},a(La,[2,88]),a(Mb,[2,166]),{35:232,36:Oa},{35:233,36:Oa},a(La,[2,103],{35:234,36:Oa}),{35:235,36:Oa},a(La,[2,104]),{7:237,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,
28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,73:Nb,74:53,75:54,77:40,79:28,80:29,81:30,88:236,91:238,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,121:239,122:vb,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{86:242,87:Pa,90:Qa},{110:243,114:ub},a(La,[2,89]),a(ua,[2,65],{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,
24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,7:244,12:c,28:fa,34:f,38:D,40:l,41:w,44:G,45:F,48:x,49:v,50:M,51:N,52:J,53:r,61:E,62:O,63:m,67:k,68:t,92:p,95:h,97:y,105:P,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,133:ab,135:ab,139:ab,156:ab,137:W,149:Q,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R}),a(Ma,[2,28],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,
166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{7:245,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,
158:V,159:Z,160:K,161:ba,162:R},{132:105,133:z,135:B,138:106,139:C,141:77,156:ya},a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,163,164,165,166,167,168,169,170,171,172,173,174],na,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,7:120,8:122,12:c,28:fa,29:Ha,34:f,38:D,40:l,41:w,44:G,45:F,48:x,49:v,50:M,
51:N,52:J,53:r,61:E,62:O,63:m,67:k,68:t,92:p,95:h,97:y,105:P,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,137:W,149:Q,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R}),{6:[1,247],7:246,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:[1,248],33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,
112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a([6,31],Ea,{69:251,65:[1,249],70:Ob}),a(Va,[2,74]),a(Va,[2,78],{55:[1,253],73:[1,252]}),a(Va,[2,81]),a(hb,[2,82]),a(hb,[2,83]),a(hb,[2,84]),a(hb,[2,85]),{35:181,36:Oa},{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:bb,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,
47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,73:Wa,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,116:176,117:H,118:U,119:T,120:Ib,123:177,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(ta,[2,68]),{4:256,5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,32:[1,255],33:70,34:f,37:55,
38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,164,165,166,167,168,169,170,171,172,173,174],[2,248],{141:77,132:102,138:103,163:ea}),a(cb,
[2,249],{141:77,132:102,138:103,163:ea,165:ha}),a(cb,[2,250],{141:77,132:102,138:103,163:ea,165:ha}),a(cb,[2,251],{141:77,132:102,138:103,163:ea,165:ha}),a(ta,[2,252],{40:wa,41:wa,82:wa,83:wa,84:wa,85:wa,87:wa,90:wa,113:wa,114:wa}),a(Mb,Ja,{109:107,78:108,86:114,82:Ta,83:Ga,84:Ua,85:Fa,87:Pa,90:Qa,113:Na}),{78:118,82:Ta,83:Ga,84:Ua,85:Fa,86:114,87:Pa,90:Qa,109:117,113:Na,114:Ja},a(Pb,Ia),a(ta,[2,253],{40:wa,41:wa,82:wa,83:wa,84:wa,85:wa,87:wa,90:wa,113:wa,114:wa}),a(ta,[2,254]),a(ta,[2,255]),{6:[1,
259],7:257,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:[1,258],33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:260,8:122,10:20,
11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{30:261,31:va,155:[1,262]},a(ta,[2,191],{126:263,
127:[1,264],128:[1,265]}),a(ta,[2,205]),a(ta,[2,213]),{31:[1,266],132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},{150:267,152:268,153:ib},a(ta,[2,116]),{7:270,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,
68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Gb,[2,119],{30:271,31:va,40:wa,41:wa,82:wa,83:wa,84:wa,85:wa,87:wa,90:wa,113:wa,114:wa,96:[1,272]}),a(Ma,[2,198],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(za,db,{141:77,132:102,138:103,159:ka,160:ca,
163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(za,[2,123]),{29:[1,273],70:[1,274]},{29:[1,275]},{31:jb,33:280,34:f,94:[1,276],100:277,101:278,103:Ya},a([29,70],[2,139]),{102:[1,282]},{31:wb,33:287,34:f,94:[1,283],103:eb,106:284,108:285},a(za,[2,143]),{55:[1,289]},{7:290,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,
51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{29:[1,291]},{6:xa,131:[1,292]},{4:293,5:3,7:4,8:5,9:6,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,
49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a([6,31,70,120],Qb,{141:77,132:102,138:103,121:294,73:[1,295],122:vb,133:z,135:B,139:C,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(xb,[2,172]),a([6,31,120],
Ea,{69:296,70:kb}),a(Ra,[2,181]),{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:bb,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,73:Wa,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,116:298,117:H,118:U,119:T,123:177,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,
157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Ra,[2,187]),a(Ra,[2,188]),a(Rb,[2,171]),a(Rb,[2,33]),a(b,[2,164]),{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:bb,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,73:Wa,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,115:[1,299],116:300,117:H,118:U,119:T,123:177,125:I,
129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{30:301,31:va,132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},a(Sb,[2,201],{141:77,132:102,138:103,133:z,134:[1,302],135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Sb,[2,203],{141:77,132:102,138:103,133:z,134:[1,303],
135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(ta,[2,209]),a(Za,[2,210],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],[2,214],{140:[1,304]}),a(lb,[2,217]),{33:194,34:f,60:195,74:196,75:197,92:p,118:e,119:d,143:305,145:193},
a(lb,[2,223],{70:[1,306]}),a(mb,[2,219]),a(mb,[2,220]),a(mb,[2,221]),a(mb,[2,222]),a(ta,[2,216]),{7:307,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,
141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:308,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,
158:V,159:Z,160:K,161:ba,162:R},{7:309,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},
a(nb,Ea,{69:310,70:Tb}),a(Ba,[2,111]),a(Ba,[2,51],{58:[1,312]}),a(Ub,[2,60],{55:[1,313]}),a(Ba,[2,56]),a(Ub,[2,61]),a(yb,[2,57]),a(yb,[2,58]),a(yb,[2,59]),{46:[1,314],78:118,82:Ta,83:Ga,84:Ua,85:Fa,86:114,87:Pa,90:Qa,109:117,113:Na,114:Ja},a(Pb,wa),{6:xa,42:[1,315]},a(ua,[2,4]),a(Vb,[2,257],{141:77,132:102,138:103,163:ea,164:ga,165:ha}),a(Vb,[2,258],{141:77,132:102,138:103,163:ea,164:ga,165:ha}),a(cb,[2,259],{141:77,132:102,138:103,163:ea,165:ha}),a(cb,[2,260],{141:77,132:102,138:103,163:ea,165:ha}),
a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,166,167,168,169,170,171,172,173,174],[2,261],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,167,168,169,170,171,172,173],[2,262],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,174:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,168,169,170,171,172,173],[2,263],{141:77,132:102,138:103,159:ka,160:ca,
163:ea,164:ga,165:ha,166:la,167:oa,174:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,169,170,171,172,173],[2,264],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,174:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,170,171,172,173],[2,265],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,174:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,171,172,
173],[2,266],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,174:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,172,173],[2,267],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,174:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,173],[2,268],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,
174:ia}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,167,168,169,170,171,172,173,174],[2,269],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la}),a(Za,[2,247],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Za,[2,246],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(b,
[2,159]),a(b,[2,160]),a(La,[2,99]),a(La,[2,100]),a(La,[2,101]),a(La,[2,102]),{89:[1,316]},{73:Nb,89:[2,107],121:317,122:vb,132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},{89:[2,108]},{7:318,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,
60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,180],92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Wb,[2,174]),a(Wb,Xb),a(La,[2,106]),a(b,[2,161]),a(ua,[2,64],{141:77,132:102,138:103,133:db,135:db,139:db,156:db,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Ma,[2,29],{141:77,132:102,
138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Ma,[2,48],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{7:319,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,
75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:320,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,
92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{66:321,67:k,68:t},a(Sa,fb,{72:127,33:129,60:130,74:131,75:132,71:322,34:f,73:pa,92:p,118:e,119:d}),{6:Yb,31:Zb},a(Va,[2,79]),{7:325,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,
51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Ra,Qb,{141:77,132:102,138:103,73:[1,326],133:z,135:B,139:C,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a($b,[2,30]),{6:xa,32:[1,327]},a(Ma,[2,270],{141:77,132:102,
138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{7:328,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,
138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:329,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,
155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Ma,[2,273],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(ta,[2,245]),{7:330,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,
105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(ta,[2,192],{127:[1,331]}),{30:332,31:va},{30:335,31:va,33:333,34:f,75:334,92:p},{150:336,152:268,153:ib},{32:[1,337],151:[1,338],152:339,153:ib},a(ob,[2,238]),{7:341,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,
47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,124:340,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(ac,[2,117],{141:77,132:102,138:103,30:342,31:va,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(ta,[2,120]),{7:343,8:122,10:20,
11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{39:344,40:l,41:w},{92:[1,346],99:345,104:Hb},{39:347,
40:l,41:w},{29:[1,348]},a(nb,Ea,{69:349,70:pb}),a(Ba,[2,130]),{31:jb,33:280,34:f,100:351,101:278,103:Ya},a(Ba,[2,135],{102:[1,352]}),a(Ba,[2,137],{102:[1,353]}),{33:354,34:f},a(za,[2,141]),a(nb,Ea,{69:355,70:zb}),a(Ba,[2,150]),{31:wb,33:287,34:f,103:eb,106:357,108:285},a(Ba,[2,155],{102:[1,358]}),a(Ba,[2,158]),{6:[1,360],7:359,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:[1,361],33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,
45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Ab,[2,147],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{39:362,40:l,41:w},a(Aa,[2,199]),{6:xa,32:[1,363]},
{7:364,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a([12,28,34,38,40,41,44,45,48,
49,50,51,52,53,61,62,63,67,68,92,95,97,105,112,117,118,119,125,129,130,133,135,137,139,149,155,157,158,159,160,161,162],Xb,{6:gb,31:gb,70:gb,120:gb}),{6:qb,31:rb,120:[1,365]},a([6,31,32,115,120],fb,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,76:179,7:254,123:368,12:c,28:fa,34:f,38:D,40:l,41:w,44:G,45:F,48:x,49:v,
50:M,51:N,52:J,53:r,61:E,62:O,63:m,67:k,68:t,73:Wa,92:p,95:h,97:y,105:P,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,133:z,135:B,137:W,139:C,149:Q,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R}),a(Sa,Ea,{69:369,70:kb}),a(b,[2,167]),a([6,31,115],Ea,{69:370,70:kb}),a(bc,[2,242]),{7:371,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,
62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:372,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,
75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:373,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,
92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(lb,[2,218]),{33:194,34:f,60:195,74:196,75:197,92:p,118:e,119:d,145:374},a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,156],[2,225],{141:77,132:102,138:103,134:[1,375],140:[1,376],159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Bb,[2,226],{141:77,132:102,
138:103,134:[1,377],159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Bb,[2,232],{141:77,132:102,138:103,134:[1,378],159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{6:cc,31:dc,94:[1,379]},a(Cb,fb,{39:80,57:204,59:205,11:206,37:207,33:208,35:209,60:210,56:382,34:f,36:Oa,38:D,40:l,41:w,62:O,118:e}),{7:383,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,
26:18,27:19,28:fa,31:[1,384],33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:385,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,
31:[1,386],33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Aa,[2,39]),a(Lb,[2,37]),a(La,[2,105]),{7:387,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,
26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,178],92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{89:[2,179],132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,
171:da,172:ma,173:sa,174:ia},a(Ma,[2,49],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{32:[1,388],132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},{30:389,31:va},a(Va,[2,75]),{33:129,34:f,60:130,71:390,72:127,73:pa,74:131,75:132,92:p,118:e,119:d},a(ec,n,{71:126,72:127,33:129,60:130,74:131,75:132,64:391,34:f,73:pa,92:p,118:e,
119:d}),a(Va,[2,80],{141:77,132:102,138:103,133:z,135:B,139:C,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Ra,gb),a($b,[2,31]),{32:[1,392],132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},a(Ma,[2,272],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{30:393,31:va,132:102,
133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},{30:394,31:va},a(ta,[2,193]),{30:395,31:va},{30:396,31:va},a(Db,[2,197]),{32:[1,397],151:[1,398],152:339,153:ib},a(ta,[2,236]),{30:399,31:va},a(ob,[2,239]),{30:400,31:va,70:[1,401]},a(fc,[2,189],{141:77,132:102,138:103,133:z,135:B,139:C,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(ta,[2,118]),a(ac,[2,
121],{141:77,132:102,138:103,30:402,31:va,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(za,[2,124]),{29:[1,403]},{31:jb,33:280,34:f,100:404,101:278,103:Ya},a(za,[2,125]),{39:405,40:l,41:w},{6:sb,31:tb,94:[1,406]},a(Cb,fb,{33:280,101:409,34:f,103:Ya}),a(Sa,Ea,{69:410,70:pb}),{33:411,34:f},{33:412,34:f},{29:[2,140]},{6:Eb,31:Fb,94:[1,413]},a(Cb,fb,{33:287,108:416,34:f,103:eb}),a(Sa,Ea,{69:417,70:zb}),{33:418,34:f,103:[1,419]},
a(Ab,[2,144],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{7:420,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,
129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:421,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,
136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(za,[2,148]),{131:[1,422]},{120:[1,423],132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},a(xb,[2,173]),{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,
54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,73:Wa,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,123:424,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:254,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,31:bb,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,
60:71,61:E,62:O,63:m,66:33,67:k,68:t,73:Wa,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,116:425,117:H,118:U,119:T,123:177,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Ra,[2,182]),{6:qb,31:rb,32:[1,426]},{6:qb,31:rb,115:[1,427]},a(Za,[2,202],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Za,
[2,204],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Za,[2,215],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(lb,[2,224]),{7:428,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,
49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:429,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,
60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:430,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,
68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:431,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,
80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(xb,[2,109]),{11:206,33:208,34:f,35:209,36:Oa,37:207,38:D,39:80,40:l,41:w,56:432,57:204,59:205,60:210,62:O,118:e},a(ec,Jb,{39:80,56:203,57:204,59:205,11:206,37:207,33:208,35:209,60:210,93:433,34:f,36:Oa,38:D,40:l,41:w,62:O,118:e}),a(Ba,[2,112]),a(Ba,[2,52],{141:77,132:102,138:103,133:z,135:B,139:C,156:qa,159:ka,
160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{7:434,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,
149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},a(Ba,[2,54],{141:77,132:102,138:103,133:z,135:B,139:C,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{7:435,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,
81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{89:[2,177],132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},a(ta,[2,50]),a(ta,[2,67]),a(Va,[2,76]),a(Sa,Ea,{69:436,70:Ob}),a(ta,[2,271]),a(bc,[2,243]),a(ta,[2,194]),a(Db,[2,195]),a(Db,[2,196]),a(ta,[2,234]),{30:437,31:va},
{32:[1,438]},a(ob,[2,240],{6:[1,439]}),{7:440,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,
162:R},a(ta,[2,122]),{39:441,40:l,41:w},a(nb,Ea,{69:442,70:pb}),a(za,[2,126]),{29:[1,443]},{33:280,34:f,101:444,103:Ya},{31:jb,33:280,34:f,100:445,101:278,103:Ya},a(Ba,[2,131]),{6:sb,31:tb,32:[1,446]},a(Ba,[2,136]),a(Ba,[2,138]),a(za,[2,142],{29:[1,447]}),{33:287,34:f,103:eb,108:448},{31:wb,33:287,34:f,103:eb,106:449,108:285},a(Ba,[2,151]),{6:Eb,31:Fb,32:[1,450]},a(Ba,[2,156]),a(Ba,[2,157]),a(Ab,[2,145],{141:77,132:102,138:103,133:z,135:B,139:C,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,
169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),{32:[1,451],132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},a(Aa,[2,200]),a(Aa,[2,176]),a(Ra,[2,183]),a(Sa,Ea,{69:452,70:kb}),a(Ra,[2,184]),a(b,[2,168]),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,156],[2,227],{141:77,132:102,138:103,140:[1,453],159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),
a(Bb,[2,229],{141:77,132:102,138:103,134:[1,454],159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Ma,[2,228],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Ma,[2,233],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Ba,[2,113]),a(Sa,Ea,{69:455,70:Tb}),{32:[1,456],132:102,133:z,135:B,138:103,139:C,
141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},{32:[1,457],132:102,133:z,135:B,138:103,139:C,141:77,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia},{6:Yb,31:Zb,32:[1,458]},{32:[1,459]},a(ta,[2,237]),a(ob,[2,241]),a(fc,[2,190],{141:77,132:102,138:103,133:z,135:B,139:C,156:qa,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(za,
[2,128]),{6:sb,31:tb,94:[1,460]},{39:461,40:l,41:w},a(Ba,[2,132]),a(Sa,Ea,{69:462,70:pb}),a(Ba,[2,133]),{39:463,40:l,41:w},a(Ba,[2,152]),a(Sa,Ea,{69:464,70:zb}),a(Ba,[2,153]),a(za,[2,146]),{6:qb,31:rb,32:[1,465]},{7:466,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,
92:p,95:h,97:y,105:P,111:31,112:A,117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{7:467,8:122,10:20,11:21,12:c,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:fa,33:70,34:f,37:55,38:D,39:80,40:l,41:w,43:57,44:G,45:F,47:27,48:x,49:v,50:M,51:N,52:J,53:r,54:26,60:71,61:E,62:O,63:m,66:33,67:k,68:t,74:53,75:54,77:40,79:28,80:29,81:30,92:p,95:h,97:y,105:P,111:31,112:A,
117:H,118:U,119:T,125:I,129:aa,130:S,132:43,133:z,135:B,136:44,137:W,138:45,139:C,141:77,149:Q,154:41,155:X,157:Y,158:V,159:Z,160:K,161:ba,162:R},{6:cc,31:dc,32:[1,468]},a(Ba,[2,53]),a(Ba,[2,55]),a(Va,[2,77]),a(ta,[2,235]),{29:[1,469]},a(za,[2,127]),{6:sb,31:tb,32:[1,470]},a(za,[2,149]),{6:Eb,31:Fb,32:[1,471]},a(Ra,[2,185]),a(Ma,[2,230],{141:77,132:102,138:103,159:ka,160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Ma,[2,231],{141:77,132:102,138:103,159:ka,
160:ca,163:ea,164:ga,165:ha,166:la,167:oa,168:L,169:ja,170:ra,171:da,172:ma,173:sa,174:ia}),a(Ba,[2,114]),{39:472,40:l,41:w},a(Ba,[2,134]),a(Ba,[2,154]),a(za,[2,129])],defaultActions:{68:[2,69],69:[2,70],238:[2,108],354:[2,140]},parseError:function(a,b){if(b.recoverable)this.trace(a);else{var d=function(a,b){this.message=a;this.hash=b};d.prototype=Error;throw new d(a,b);}},parse:function(a){var b=[0],d=[null],e=[],n=this.table,pa="",c=0,f=0,g=0,h=e.slice.call(arguments,1),va=Object.create(this.lexer),
k={},Ka;for(Ka in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ka)&&(k[Ka]=this.yy[Ka]);va.setInput(a,k);k.lexer=va;k.parser=this;"undefined"==typeof va.yylloc&&(va.yylloc={});Ka=va.yylloc;e.push(Ka);var m=va.options&&va.options.ranges;this.parseError="function"===typeof k.parseError?k.parseError:Object.getPrototypeOf(this).parseError;for(var t,p,Ia,l,r={},y,q;;){Ia=b[b.length-1];if(this.defaultActions[Ia])l=this.defaultActions[Ia];else{if(null===t||"undefined"==typeof t)t=va.lex()||1,"number"!==
typeof t&&(t=this.symbols_[t]||t);l=n[Ia]&&n[Ia][t]}if("undefined"===typeof l||!l.length||!l[0]){var wa;q=[];for(y in n[Ia])this.terminals_[y]&&2<y&&q.push("'"+this.terminals_[y]+"'");wa=va.showPosition?"Parse error on line "+(c+1)+":\n"+va.showPosition()+"\nExpecting "+q.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'");this.parseError(wa,{text:va.match,token:this.terminals_[t]||t,line:va.yylineno,loc:Ka,
expected:q})}if(l[0]instanceof Array&&1<l.length)throw Error("Parse Error: multiple actions possible at state: "+Ia+", token: "+t);switch(l[0]){case 1:b.push(t);d.push(va.yytext);e.push(va.yylloc);b.push(l[1]);t=null;p?(t=p,p=null):(f=va.yyleng,pa=va.yytext,c=va.yylineno,Ka=va.yylloc,0<g&&g--);break;case 2:q=this.productions_[l[1]][1];r.$=d[d.length-q];r._$={first_line:e[e.length-(q||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(q||1)].first_column,last_column:e[e.length-
1].last_column};m&&(r._$.range=[e[e.length-(q||1)].range[0],e[e.length-1].range[1]]);Ia=this.performAction.apply(r,[pa,f,c,k,l[1],d,e].concat(h));if("undefined"!==typeof Ia)return Ia;q&&(b=b.slice(0,-2*q),d=d.slice(0,-1*q),e=e.slice(0,-1*q));b.push(this.productions_[l[1]][0]);d.push(r.$);e.push(r._$);l=n[b[b.length-2]][b[b.length-1]];b.push(l);break;case 3:return!0}}}};g.prototype=gc;gc.Parser=g;return new g}();"undefined"!==typeof u&&"undefined"!==typeof g&&(g.parser=xa,g.Parser=xa.Parser,g.parse=
function(){return xa.parse.apply(xa,arguments)},g.main=function(q){q[1]||(console.log("Usage: "+q[0]+" FILE"),process.exit(1));var a="",c=u("fs");"undefined"!==typeof c&&null!==c&&(a=c.readFileSync(u("path").normalize(q[1]),"utf8"));return g.parser.parse(a)},"undefined"!==typeof ua&&u.main===ua&&g.main(process.argv.slice(1)));return ua.exports}();u["./scope"]=function(){var g={};(function(){var u=[].indexOf||function(g){for(var q=0,a=this.length;q<a;q++)if(q in this&&this[q]===g)return q;return-1};
g.Scope=function(){function g(g,a,c,u){var f,q;this.parent=g;this.expressions=a;this.method=c;this.referencedVars=u;this.variables=[{name:"arguments",type:"arguments"}];this.positions={};this.parent||(this.utilities={});this.root=null!=(f=null!=(q=this.parent)?q.root:void 0)?f:this}g.prototype.add=function(g,a,c){return this.shared&&!c?this.parent.add(g,a,c):Object.prototype.hasOwnProperty.call(this.positions,g)?this.variables[this.positions[g]].type=a:this.positions[g]=this.variables.push({name:g,
type:a})-1};g.prototype.namedMethod=function(){var g;return null!=(g=this.method)&&g.name||!this.parent?this.method:this.parent.namedMethod()};g.prototype.find=function(g,a){null==a&&(a="var");if(this.check(g))return!0;this.add(g,a);return!1};g.prototype.parameter=function(g){if(!this.shared||!this.parent.check(g,!0))return this.add(g,"param")};g.prototype.check=function(g){var a;return!!(this.type(g)||null!=(a=this.parent)&&a.check(g))};g.prototype.temporary=function(g,a,c){null==c&&(c=!1);return c?
(c=g.charCodeAt(0),g=122-c,c=String.fromCharCode(c+a%(g+1)),a=Math.floor(a/(g+1)),""+c+(a||"")):""+g+(a||"")};g.prototype.type=function(g){var a,c,q,f;q=this.variables;a=0;for(c=q.length;a<c;a++)if(f=q[a],f.name===g)return f.type;return null};g.prototype.freeVariable=function(g,a){var c,q,f;null==a&&(a={});for(c=0;;){f=this.temporary(g,c,a.single);if(!(this.check(f)||0<=u.call(this.root.referencedVars,f)))break;c++}(null!=(q=a.reserve)?q:1)&&this.add(f,"var",!0);return f};g.prototype.assign=function(g,
a){this.add(g,{value:a,assigned:!0},!0);return this.hasAssignments=!0};g.prototype.hasDeclarations=function(){return!!this.declaredVariables().length};g.prototype.declaredVariables=function(){var g,a,c,u,f;u=this.variables;f=[];a=0;for(c=u.length;a<c;a++)g=u[a],"var"===g.type&&f.push(g.name);return f.sort()};g.prototype.assignedVariables=function(){var g,a,c,u,f;c=this.variables;u=[];g=0;for(a=c.length;g<a;g++)f=c[g],f.type.assigned&&u.push(f.name+" \x3d "+f.type.value);return u};return g}()}).call(this);
return g}();u["./nodes"]=function(){var g={};(function(){var ua,qa,q,a,c,Ca,f,D,l,w,G,F,x,v,M,N,J,r,E,O,m,k,t,p,h,y,P,A,H,U,T,I,aa,S,z,B,W,C,Q,X,Y,V,Z,K,ba,R,ya,$a,Xa,ka,ca,ea,ga,ha,la,oa,L,ja,ra,da,ma,sa,ia,Da,ta,Ja,Ta,Ga,Ua,Fa,Pa,Qa,Na,za,na=function(a,b){function n(){this.constructor=a}for(var pa in b)fa.call(b,pa)&&(a[pa]=b[pa]);n.prototype=b.prototype;a.prototype=new n;a.__super__=b.prototype;return a},fa={}.hasOwnProperty,Ha=[].indexOf||function(a){for(var b=0,n=this.length;b<n;b++)if(b in this&&
this[b]===a)return b;return-1},Aa=[].slice;Error.stackTraceLimit=Infinity;K=u("./scope").Scope;a=u("./lexer");Ga=a.isUnassignable;k=a.JS_FORBIDDEN;v=u("./helpers");da=v.compact;ia=v.flatten;sa=v.extend;Fa=v.merge;ma=v.del;a=v.addLocationDataFn;Ua=v.locationDataToString;Qa=v.throwSyntaxError;g.extend=sa;g.addLocationDataFn=a;ja=function(){return!0};I=function(){return!1};ea=function(){return this};T=function(){this.negated=!this.negated;return this};g.CodeFragment=w=function(){function a(a,n){var b;
this.code=""+n;this.locationData=null!=a?a.locationData:void 0;this.type=(null!=a?null!=(b=a.constructor)?b.name:void 0:void 0)||"unknown"}a.prototype.toString=function(){return""+this.code+(this.locationData?": "+Ua(this.locationData):"")};return a}();Da=function(a){var b,n,pa,e;e=[];n=0;for(pa=a.length;n<pa;n++)b=a[n],e.push(b.code);return e.join("")};g.Base=a=function(){function a(){}a.prototype.compile=function(a,n){return Da(this.compileToFragments(a,n))};a.prototype.compileToFragments=function(a,
n){a=sa({},a);n&&(a.level=n);n=this.unfoldSoak(a)||this;n.tab=a.indent;return a.level!==A&&n.isStatement(a)?n.compileClosure(a):n.compileNode(a)};a.prototype.compileClosure=function(a){var b,pa,e,d;(e=this.jumps())&&e.error("cannot use a pure statement in an expression");a.sharedScope=!0;e=new l([],c.wrap([this]));b=[];if((pa=this.contains(Ja))||this.contains(Ta))b=[new ga],pa?(pa="apply",b.push(new r("arguments"))):pa="call",e=new L(e,[new ua(new Q(pa))]);a=(new f(e,b)).compileNode(a);if(e.isGenerator||
null!=(d=e.base)&&d.isGenerator)a.unshift(this.makeCode("(yield* ")),a.push(this.makeCode(")"));return a};a.prototype.cache=function(a,n,pa){var b;if(null!=pa?pa(this):this.isComplex())return pa=new r(a.scope.freeVariable("ref")),b=new q(pa,this),n?[b.compileToFragments(a,n),[this.makeCode(pa.value)]]:[b,pa];pa=n?this.compileToFragments(a,n):this;return[pa,pa]};a.prototype.cacheToCodeFragments=function(a){return[Da(a[0]),Da(a[1])]};a.prototype.makeReturn=function(a){var b;b=this.unwrapAll();return a?
new f(new H(a+".push"),[b]):new V(b)};a.prototype.contains=function(a){var b;b=void 0;this.traverseChildren(!1,function(n){if(a(n))return b=n,!1});return b};a.prototype.lastNonComment=function(a){var b;for(b=a.length;b--;)if(!(a[b]instanceof G))return a[b];return null};a.prototype.toString=function(a,n){var b;null==a&&(a="");null==n&&(n=this.constructor.name);b="\n"+a+n;this.soak&&(b+="?");this.eachChild(function(e){return b+=e.toString(a+ca)});return b};a.prototype.eachChild=function(a){var b,pa,
e,d,c,f,g;if(!this.children)return this;f=this.children;pa=0;for(d=f.length;pa<d;pa++)if(b=f[pa],this[b])for(g=ia([this[b]]),e=0,c=g.length;e<c;e++)if(b=g[e],!1===a(b))return this;return this};a.prototype.traverseChildren=function(a,n){return this.eachChild(function(b){if(!1!==n(b))return b.traverseChildren(a,n)})};a.prototype.invert=function(){return new B("!",this)};a.prototype.unwrapAll=function(){var a;for(a=this;a!==(a=a.unwrap()););return a};a.prototype.children=[];a.prototype.isStatement=I;
a.prototype.jumps=I;a.prototype.isComplex=ja;a.prototype.isChainable=I;a.prototype.isAssignable=I;a.prototype.isNumber=I;a.prototype.unwrap=ea;a.prototype.unfoldSoak=I;a.prototype.assigns=I;a.prototype.updateLocationDataIfMissing=function(a){if(this.locationData)return this;this.locationData=a;return this.eachChild(function(b){return b.updateLocationDataIfMissing(a)})};a.prototype.error=function(a){return Qa(a,this.locationData)};a.prototype.makeCode=function(a){return new w(this,a)};a.prototype.wrapInBraces=
function(a){return[].concat(this.makeCode("("),a,this.makeCode(")"))};a.prototype.joinFragmentArrays=function(a,n){var b,e,d,c,f;b=[];d=c=0;for(f=a.length;c<f;d=++c)e=a[d],d&&b.push(this.makeCode(n)),b=b.concat(e);return b};return a}();g.Block=c=function(a){function b(a){this.expressions=da(ia(a||[]))}na(b,a);b.prototype.children=["expressions"];b.prototype.push=function(a){this.expressions.push(a);return this};b.prototype.pop=function(){return this.expressions.pop()};b.prototype.unshift=function(a){this.expressions.unshift(a);
return this};b.prototype.unwrap=function(){return 1===this.expressions.length?this.expressions[0]:this};b.prototype.isEmpty=function(){return!this.expressions.length};b.prototype.isStatement=function(a){var b,e,d,n;n=this.expressions;e=0;for(d=n.length;e<d;e++)if(b=n[e],b.isStatement(a))return!0;return!1};b.prototype.jumps=function(a){var b,e,d,n;n=this.expressions;e=0;for(d=n.length;e<d;e++)if(b=n[e],b=b.jumps(a))return b};b.prototype.makeReturn=function(a){var b,e;for(e=this.expressions.length;e--;)if(b=
this.expressions[e],!(b instanceof G)){this.expressions[e]=b.makeReturn(a);b instanceof V&&!b.expression&&this.expressions.splice(e,1);break}return this};b.prototype.compileToFragments=function(a,pa){null==a&&(a={});return a.scope?b.__super__.compileToFragments.call(this,a,pa):this.compileRoot(a)};b.prototype.compileNode=function(a){var n,e,d,c,f,g,k;this.tab=a.indent;k=a.level===A;e=[];g=this.expressions;d=n=0;for(c=g.length;n<c;d=++n)f=g[d],f=f.unwrapAll(),f=f.unfoldSoak(a)||f,f instanceof b?e.push(f.compileNode(a)):
k?(f.front=!0,d=f.compileToFragments(a),f.isStatement(a)||(d.unshift(this.makeCode(""+this.tab)),d.push(this.makeCode(";"))),e.push(d)):e.push(f.compileToFragments(a,h));if(k)return this.spaced?[].concat(this.joinFragmentArrays(e,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(e,"\n");n=e.length?this.joinFragmentArrays(e,", "):[this.makeCode("void 0")];return 1<e.length&&a.level>=h?this.wrapInBraces(n):n};b.prototype.compileRoot=function(a){var b,e,d,n,c;a.indent=a.bare?"":ca;a.level=A;this.spaced=
!0;a.scope=new K(null,this,null,null!=(d=a.referencedVars)?d:[]);c=a.locals||[];d=0;for(e=c.length;d<e;d++)n=c[d],a.scope.parameter(n);d=[];if(!a.bare){var f;f=this.expressions;e=[];b=n=0;for(c=f.length;n<c;b=++n){b=f[b];if(!(b.unwrap()instanceof G))break;e.push(b)}n=this.expressions.slice(e.length);this.expressions=e;e.length&&(d=this.compileNode(Fa(a,{indent:""})),d.push(this.makeCode("\n")));this.expressions=n}e=this.compileWithDeclarations(a);return a.bare?e:[].concat(d,this.makeCode("(function() {\n"),
e,this.makeCode("\n}).call(this);\n"))};b.prototype.compileWithDeclarations=function(a){var b,e,d,n,c,f;d=[];f=this.expressions;n=c=0;for(b=f.length;c<b&&(e=f[n],e=e.unwrap(),e instanceof G||e instanceof H);n=++c);a=Fa(a,{level:A});n&&(e=this.expressions.splice(n,9E9),d=[this.spaced,!1],c=d[0],this.spaced=d[1],c=[this.compileNode(a),c],d=c[0],this.spaced=c[1],this.expressions=e);e=this.compileNode(a);c=a.scope;c.expressions===this&&(b=a.scope.hasDeclarations(),a=c.hasAssignments,b||a?(n&&d.push(this.makeCode("\n")),
d.push(this.makeCode(this.tab+"var ")),b&&d.push(this.makeCode(c.declaredVariables().join(", "))),a&&(b&&d.push(this.makeCode(",\n"+(this.tab+ca))),d.push(this.makeCode(c.assignedVariables().join(",\n"+(this.tab+ca))))),d.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):d.length&&e.length&&d.push(this.makeCode("\n")));return d.concat(e)};b.wrap=function(a){return 1===a.length&&a[0]instanceof b?a[0]:new b(a)};return b}(a);g.Literal=H=function(a){function b(a){this.value=a}na(b,a);b.prototype.isComplex=
I;b.prototype.assigns=function(a){return a===this.value};b.prototype.compileNode=function(a){return[this.makeCode(this.value)]};b.prototype.toString=function(){return" "+(this.isStatement()?b.__super__.toString.apply(this,arguments):this.constructor.name)+": "+this.value};return b}(a);g.NumberLiteral=S=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(H);g.InfinityLiteral=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,
a);b.prototype.compileNode=function(){return[this.makeCode("2e308")]};return b}(S);g.NaNLiteral=function(a){function b(){b.__super__.constructor.call(this,"NaN")}na(b,a);b.prototype.compileNode=function(a){var b;b=[this.makeCode("0/0")];return a.level>=y?this.wrapInBraces(b):b};return b}(S);g.StringLiteral=$a=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(H);g.RegexLiteral=Y=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}
na(b,a);return b}(H);g.PassthroughLiteral=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(H);g.IdentifierLiteral=r=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isAssignable=ja;return b}(H);g.PropertyName=Q=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isAssignable=ja;return b}(H);g.StatementLiteral=ya=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);b.prototype.isStatement=ja;b.prototype.makeReturn=ea;b.prototype.jumps=function(a){if("break"===this.value&&!(null!=a&&a.loop||null!=a&&a.block)||"continue"===this.value&&(null==a||!a.loop))return this};b.prototype.compileNode=function(a){return[this.makeCode(""+this.tab+this.value+";")]};return b}(H);g.ThisLiteral=ga=function(a){function b(){b.__super__.constructor.call(this,"this")}na(b,a);b.prototype.compileNode=function(a){var b;a=null!=(b=a.scope.method)&&b.bound?a.scope.method.context:
this.value;return[this.makeCode(a)]};return b}(H);g.UndefinedLiteral=oa=function(a){function b(){b.__super__.constructor.call(this,"undefined")}na(b,a);b.prototype.compileNode=function(a){return[this.makeCode(a.level>=t?"(void 0)":"void 0")]};return b}(H);g.NullLiteral=aa=function(a){function b(){b.__super__.constructor.call(this,"null")}na(b,a);return b}(H);g.BooleanLiteral=Ca=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(H);g.Return=V=function(a){function b(a){this.expression=
a}na(b,a);b.prototype.children=["expression"];b.prototype.isStatement=ja;b.prototype.makeReturn=ea;b.prototype.jumps=ea;b.prototype.compileToFragments=function(a,pa){var e,d;e=null!=(d=this.expression)?d.makeReturn():void 0;return!e||e instanceof b?b.__super__.compileToFragments.call(this,a,pa):e.compileToFragments(a,pa)};b.prototype.compileNode=function(a){var b;b=[];b.push(this.makeCode(this.tab+("return"+(this.expression?" ":""))));this.expression&&(b=b.concat(this.expression.compileToFragments(a,
P)));b.push(this.makeCode(";"));return b};return b}(a);g.YieldReturn=ra=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(a){null==a.scope.parent&&this.error("yield can only occur inside functions");return b.__super__.compileNode.apply(this,arguments)};return b}(V);g.Value=L=function(a){function b(a,pa,e){if(!pa&&a instanceof b)return a;this.base=a;this.properties=pa||[];e&&(this[e]=!0);return this}na(b,a);b.prototype.children=["base",
"properties"];b.prototype.add=function(a){this.properties=this.properties.concat(a);return this};b.prototype.hasProperties=function(){return!!this.properties.length};b.prototype.bareLiteral=function(a){return!this.properties.length&&this.base instanceof a};b.prototype.isArray=function(){return this.bareLiteral(qa)};b.prototype.isRange=function(){return this.bareLiteral(X)};b.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()};b.prototype.isAssignable=function(){return this.hasProperties()||
this.base.isAssignable()};b.prototype.isNumber=function(){return this.bareLiteral(S)};b.prototype.isString=function(){return this.bareLiteral($a)};b.prototype.isRegex=function(){return this.bareLiteral(Y)};b.prototype.isUndefined=function(){return this.bareLiteral(oa)};b.prototype.isNull=function(){return this.bareLiteral(aa)};b.prototype.isBoolean=function(){return this.bareLiteral(Ca)};b.prototype.isAtomic=function(){var a,b,e,d;d=this.properties.concat(this.base);a=0;for(b=d.length;a<b;a++)if(e=
d[a],e.soak||e instanceof f)return!1;return!0};b.prototype.isNotCallable=function(){return this.isNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()||this.isUndefined()||this.isNull()||this.isBoolean()};b.prototype.isStatement=function(a){return!this.properties.length&&this.base.isStatement(a)};b.prototype.assigns=function(a){return!this.properties.length&&this.base.assigns(a)};b.prototype.jumps=function(a){return!this.properties.length&&this.base.jumps(a)};
b.prototype.isObject=function(a){return this.properties.length?!1:this.base instanceof z&&(!a||this.base.generated)};b.prototype.isSplice=function(){var a;a=this.properties;return a[a.length-1]instanceof ba};b.prototype.looksStatic=function(a){var b;return this.base.value===a&&1===this.properties.length&&"prototype"!==(null!=(b=this.properties[0].name)?b.value:void 0)};b.prototype.unwrap=function(){return this.properties.length?this:this.base};b.prototype.cacheReference=function(a){var n,e,d,c;n=
this.properties;d=n[n.length-1];if(2>this.properties.length&&!this.base.isComplex()&&(null==d||!d.isComplex()))return[this,this];n=new b(this.base,this.properties.slice(0,-1));n.isComplex()&&(e=new r(a.scope.freeVariable("base")),n=new b(new C(new q(e,n))));if(!d)return[n,e];d.isComplex()&&(c=new r(a.scope.freeVariable("name")),d=new m(new q(c,d.index)),c=new m(c));return[n.add(d),new b(e||n.base,[c||d])]};b.prototype.compileNode=function(a){var b,e,d,n,c;this.base.front=this.front;c=this.properties;
b=this.base.compileToFragments(a,c.length?t:null);c.length&&Z.test(Da(b))&&b.push(this.makeCode("."));e=0;for(d=c.length;e<d;e++)n=c[e],b.push.apply(b,n.compileToFragments(a));return b};b.prototype.unfoldSoak=function(a){return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(n){return function(){var e,d,c,pa,f;if(d=n.base.unfoldSoak(a))return(e=d.body.properties).push.apply(e,n.properties),d;f=n.properties;d=e=0;for(c=f.length;e<c;d=++e)if(pa=f[d],pa.soak)return pa.soak=!1,e=
new b(n.base,n.properties.slice(0,d)),c=new b(n.base,n.properties.slice(d)),e.isComplex()&&(d=new r(a.scope.freeVariable("ref")),e=new C(new q(d,e)),c.base=d),new E(new F(e),c,{soak:!0});return!1}}(this)()};return b}(a);g.Comment=G=function(a){function b(a){this.comment=a}na(b,a);b.prototype.isStatement=ja;b.prototype.makeReturn=ea;b.prototype.compileNode=function(a,b){var e;e=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *");e="/*"+Pa(e,this.tab)+(0<=Ha.call(e,"\n")?"\n"+this.tab:"")+" */";(b||a.level)===
A&&(e=a.indent+e);return[this.makeCode("\n"),this.makeCode(e)]};return b}(a);g.Call=f=function(a){function b(a,b,e){this.variable=a;this.args=null!=b?b:[];this.soak=e;this.isNew=!1;this.variable instanceof L&&this.variable.isNotCallable()&&this.variable.error("literal is not a function")}na(b,a);b.prototype.children=["variable","args"];b.prototype.updateLocationDataIfMissing=function(a){var n,e;this.locationData&&this.needsUpdatedStartLocation&&(this.locationData.first_line=a.first_line,this.locationData.first_column=
a.first_column,n=(null!=(e=this.variable)?e.base:void 0)||this.variable,n.needsUpdatedStartLocation&&(this.variable.locationData.first_line=a.first_line,this.variable.locationData.first_column=a.first_column,n.updateLocationDataIfMissing(a)),delete this.needsUpdatedStartLocation);return b.__super__.updateLocationDataIfMissing.apply(this,arguments)};b.prototype.newInstance=function(){var a,c;a=(null!=(c=this.variable)?c.base:void 0)||this.variable;a instanceof b&&!a.isNew?a.newInstance():this.isNew=
!0;this.needsUpdatedStartLocation=!0;return this};b.prototype.unfoldSoak=function(a){var n,e,d,c,f;if(this.soak){if(this instanceof ka)n=new H(this.superReference(a)),e=new L(n);else{if(e=Na(a,this,"variable"))return e;e=(new L(this.variable)).cacheReference(a);n=e[0];e=e[1]}e=new b(e,this.args);e.isNew=this.isNew;n=new H("typeof "+n.compile(a)+' \x3d\x3d\x3d "function"');return new E(n,new L(e),{soak:!0})}n=this;for(d=[];;)if(n.variable instanceof b)d.push(n),n=n.variable;else{if(!(n.variable instanceof
L))break;d.push(n);if(!((n=n.variable.base)instanceof b))break}f=d.reverse();d=0;for(c=f.length;d<c;d++)n=f[d],e&&(n.variable instanceof b?n.variable=e:n.variable.base=e),e=Na(a,n,"variable");return e};b.prototype.compileNode=function(a){var b,e,d,n,c,f;null!=(d=this.variable)&&(d.front=this.front);d=R.compileSplattedArray(a,this.args,!0);if(d.length)return this.compileSplat(a,d);d=[];f=this.args;e=n=0;for(c=f.length;n<c;e=++n)b=f[e],e&&d.push(this.makeCode(", ")),d.push.apply(d,b.compileToFragments(a,
h));b=[];this instanceof ka?(a=this.superReference(a)+(".call("+this.superThis(a)),d.length&&(a+=", "),b.push(this.makeCode(a))):(this.isNew&&b.push(this.makeCode("new ")),b.push.apply(b,this.variable.compileToFragments(a,t)),b.push(this.makeCode("(")));b.push.apply(b,d);b.push(this.makeCode(")"));return b};b.prototype.compileSplat=function(a,b){var e,d,n,c;if(this instanceof ka)return[].concat(this.makeCode(this.superReference(a)+".apply("+this.superThis(a)+", "),b,this.makeCode(")"));if(this.isNew)return e=
this.tab+ca,[].concat(this.makeCode("(function(func, args, ctor) {\n"+e+"ctor.prototype \x3d func.prototype;\n"+e+"var child \x3d new ctor, result \x3d func.apply(child, args);\n"+e+"return Object(result) \x3d\x3d\x3d result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(a,h),this.makeCode(", "),b,this.makeCode(", function(){})"));e=[];d=new L(this.variable);(n=d.properties.pop())&&d.isComplex()?(c=a.scope.freeVariable("ref"),e=e.concat(this.makeCode("("+c+" \x3d "),d.compileToFragments(a,
h),this.makeCode(")"),n.compileToFragments(a))):(d=d.compileToFragments(a,t),Z.test(Da(d))&&(d=this.wrapInBraces(d)),n?(c=Da(d),d.push.apply(d,n.compileToFragments(a))):c="null",e=e.concat(d));return e.concat(this.makeCode(".apply("+c+", "),b,this.makeCode(")"))};return b}(a);g.SuperCall=ka=function(a){function b(a){b.__super__.constructor.call(this,null,null!=a?a:[new R(new r("arguments"))]);this.isBare=null!=a}na(b,a);b.prototype.superReference=function(a){var b,e,d,c,n,f,g;c=a.scope.namedMethod();
if(null!=c&&c.klass){d=c.klass;n=c.name;g=c.variable;d.isComplex()&&(e=new r(a.scope.parent.freeVariable("base")),b=new L(new C(new q(e,d))),g.base=b,g.properties.splice(0,d.properties.length));if(n.isComplex()||n instanceof m&&n.index.isAssignable())f=new r(a.scope.parent.freeVariable("name")),n=new m(new q(f,n.index)),g.properties.pop(),g.properties.push(n);b=[new ua(new Q("__super__"))];c["static"]&&b.push(new ua(new Q("constructor")));b.push(null!=f?new m(f):n);return(new L(null!=e?e:d,b)).compile(a)}return null!=
c&&c.ctor?c.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")};b.prototype.superThis=function(a){return(a=a.scope.method)&&!a.klass&&a.context||"this"};return b}(f);g.RegexWithInterpolations=function(a){function b(a){null==a&&(a=[]);b.__super__.constructor.call(this,new L(new r("RegExp")),a,!1)}na(b,a);return b}(f);g.TaggedTemplateCall=function(a){function b(a,pa,e){pa instanceof $a&&(pa=new Xa(c.wrap([new L(pa)])));b.__super__.constructor.call(this,a,[pa],
e)}na(b,a);b.prototype.compileNode=function(a){a.inTaggedTemplateCall=!0;return this.variable.compileToFragments(a,t).concat(this.args[0].compileToFragments(a,h))};return b}(f);g.Extends=N=function(a){function b(a,b){this.child=a;this.parent=b}na(b,a);b.prototype.children=["child","parent"];b.prototype.compileToFragments=function(a){return(new f(new L(new H(za("extend",a))),[this.child,this.parent])).compileToFragments(a)};return b}(a);g.Access=ua=function(a){function b(a,b){this.name=a;this.soak=
"soak"===b}na(b,a);b.prototype.children=["name"];b.prototype.compileToFragments=function(a){var b,e;a=this.name.compileToFragments(a);b=this.name.unwrap();return b instanceof Q?(e=b.value,0<=Ha.call(k,e))?[this.makeCode('["')].concat(Aa.call(a),[this.makeCode('"]')]):[this.makeCode(".")].concat(Aa.call(a)):[this.makeCode("[")].concat(Aa.call(a),[this.makeCode("]")])};b.prototype.isComplex=I;return b}(a);g.Index=m=function(a){function b(a){this.index=a}na(b,a);b.prototype.children=["index"];b.prototype.compileToFragments=
function(a){return[].concat(this.makeCode("["),this.index.compileToFragments(a,P),this.makeCode("]"))};b.prototype.isComplex=function(){return this.index.isComplex()};return b}(a);g.Range=X=function(a){function b(a,b,e){this.from=a;this.to=b;this.equals=(this.exclusive="exclusive"===e)?"":"\x3d"}na(b,a);b.prototype.children=["from","to"];b.prototype.compileVariables=function(a){var b,e;a=Fa(a,{top:!0});b=ma(a,"isComplex");e=this.cacheToCodeFragments(this.from.cache(a,h,b));this.fromC=e[0];this.fromVar=
e[1];e=this.cacheToCodeFragments(this.to.cache(a,h,b));this.toC=e[0];this.toVar=e[1];if(e=ma(a,"step"))a=this.cacheToCodeFragments(e.cache(a,h,b)),this.step=a[0],this.stepVar=a[1];this.fromNum=this.from.isNumber()?Number(this.fromVar):null;this.toNum=this.to.isNumber()?Number(this.toVar):null;return this.stepNum=null!=e&&e.isNumber()?Number(this.stepVar):null};b.prototype.compileNode=function(a){var b,e,d,c,n,f,g,h,k,m;this.fromVar||this.compileVariables(a);if(!a.index)return this.compileArray(a);
f=null!=this.fromNum&&null!=this.toNum;n=ma(a,"index");g=(a=ma(a,"name"))&&a!==n;m=n+" \x3d "+this.fromC;this.toC!==this.toVar&&(m+=", "+this.toC);this.step!==this.stepVar&&(m+=", "+this.step);c=[n+" \x3c"+this.equals,n+" \x3e"+this.equals];e=c[0];c=c[1];e=null!=this.stepNum?0<this.stepNum?e+" "+this.toVar:c+" "+this.toVar:f?(h=[this.fromNum,this.toNum],d=h[0],k=h[1],h,d<=k?e+" "+k:c+" "+k):(b=this.stepVar?this.stepVar+" \x3e 0":this.fromVar+" \x3c\x3d "+this.toVar,b+" ? "+e+" "+this.toVar+" : "+
c+" "+this.toVar);b=this.stepVar?n+" +\x3d "+this.stepVar:f?g?d<=k?"++"+n:"--"+n:d<=k?n+"++":n+"--":g?b+" ? ++"+n+" : --"+n:b+" ? "+n+"++ : "+n+"--";g&&(m=a+" \x3d "+m);g&&(b=a+" \x3d "+b);return[this.makeCode(m+"; "+e+"; "+b)]};b.prototype.compileArray=function(a){var b,e,d,c,n,f,g,h,k;if((e=null!=this.fromNum&&null!=this.toNum)&&20>=Math.abs(this.fromNum-this.toNum))return b=function(){h=[];for(var a=f=this.fromNum,b=this.toNum;f<=b?a<=b:a>=b;f<=b?a++:a--)h.push(a);return h}.apply(this),this.exclusive&&
b.pop(),[this.makeCode("["+b.join(", ")+"]")];c=this.tab+ca;d=a.scope.freeVariable("i",{single:!0});g=a.scope.freeVariable("results");n="\n"+c+g+" \x3d [];";e?(a.index=d,e=Da(this.compileNode(a))):(k=d+" \x3d "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),e=this.fromVar+" \x3c\x3d "+this.toVar,e="var "+k+"; "+e+" ? "+d+" \x3c"+this.equals+" "+this.toVar+" : "+d+" \x3e"+this.equals+" "+this.toVar+"; "+e+" ? "+d+"++ : "+d+"--");d="{ "+g+".push("+d+"); }\n"+c+"return "+g+";\n"+a.indent;a=function(a){return null!=
a?a.contains(Ja):void 0};if(a(this.from)||a(this.to))b=", arguments";return[this.makeCode("(function() {"+n+"\n"+c+"for ("+e+")"+d+"}).apply(this"+(null!=b?b:"")+")")]};return b}(a);g.Slice=ba=function(a){function b(a){this.range=a;b.__super__.constructor.call(this)}na(b,a);b.prototype.children=["range"];b.prototype.compileNode=function(a){var b,e,d,c,n;b=this.range;c=b.to;d=(b=b.from)&&b.compileToFragments(a,P)||[this.makeCode("0")];c&&(b=c.compileToFragments(a,P),e=Da(b),this.range.exclusive||-1!==
+e)&&(n=", "+(this.range.exclusive?e:c.isNumber()?""+(+e+1):(b=c.compileToFragments(a,t),"+"+Da(b)+" + 1 || 9e9")));return[this.makeCode(".slice("+Da(d)+(n||"")+")")]};return b}(a);g.Obj=z=function(a){function b(a,b){this.generated=null!=b?b:!1;this.objects=this.properties=a||[]}na(b,a);b.prototype.children=["properties"];b.prototype.compileNode=function(a){var b,e,d,c,n,f,g,h,k,m,t,l,p;p=this.properties;if(this.generated)for(e=0,b=p.length;e<b;e++)d=p[e],d instanceof L&&d.error("cannot have an implicit value in an implicit object");
e=b=0;for(d=p.length;b<d&&!(l=p[e],(l.variable||l).base instanceof C);e=++b);d=e<p.length;n=a.indent+=ca;k=this.lastNonComment(this.properties);b=[];d&&(t=a.scope.freeVariable("obj"),b.push(this.makeCode("(\n"+n+t+" \x3d ")));b.push(this.makeCode("{"+(0===p.length||0===e?"}":"\n")));c=h=0;for(m=p.length;h<m;c=++h)l=p[c],c===e&&(0!==c&&b.push(this.makeCode("\n"+n+"}")),b.push(this.makeCode(",\n"))),g=c===p.length-1||c===e-1?"":l===k||l instanceof G?"\n":",\n",f=l instanceof G?"":n,d&&c<e&&(f+=ca),
l instanceof q&&("object"!==l.context&&l.operatorToken.error("unexpected "+l.operatorToken.value),l.variable instanceof L&&l.variable.hasProperties()&&l.variable.error("invalid object key")),l instanceof L&&l["this"]&&(l=new q(l.properties[0].name,l,"object")),l instanceof G||(c<e?l instanceof q||(l=new q(l,l,"object")):(l instanceof q?(c=l.variable,l=l.value):(l=l.base.cache(a),c=l[0],l=l[1],c instanceof r&&(c=new Q(c.value))),l=new q(new L(new r(t),[new ua(c)]),l))),f&&b.push(this.makeCode(f)),
b.push.apply(b,l.compileToFragments(a,A)),g&&b.push(this.makeCode(g));d?b.push(this.makeCode(",\n"+n+t+"\n"+this.tab+")")):0!==p.length&&b.push(this.makeCode("\n"+this.tab+"}"));return this.front&&!d?this.wrapInBraces(b):b};b.prototype.assigns=function(a){var b,e,d,c;c=this.properties;b=0;for(e=c.length;b<e;b++)if(d=c[b],d.assigns(a))return!0;return!1};return b}(a);g.Arr=qa=function(a){function b(a){this.objects=a||[]}na(b,a);b.prototype.children=["objects"];b.prototype.compileNode=function(a){var b,
e,d,c,n;if(!this.objects.length)return[this.makeCode("[]")];a.indent+=ca;b=R.compileSplattedArray(a,this.objects);if(b.length)return b;b=[];var f;n=this.objects;f=[];d=0;for(c=n.length;d<c;d++)e=n[d],f.push(e.compileToFragments(a,h));d=c=0;for(n=f.length;c<n;d=++c)e=f[d],d&&b.push(this.makeCode(", ")),b.push.apply(b,e);0<=Da(b).indexOf("\n")?(b.unshift(this.makeCode("[\n"+a.indent)),b.push(this.makeCode("\n"+this.tab+"]"))):(b.unshift(this.makeCode("[")),b.push(this.makeCode("]")));return b};b.prototype.assigns=
function(a){var b,e,d,c;c=this.objects;b=0;for(e=c.length;b<e;b++)if(d=c[b],d.assigns(a))return!0;return!1};return b}(a);g.Class=D=function(a){function b(a,b,e){this.variable=a;this.parent=b;this.body=null!=e?e:new c;this.boundFuncs=[];this.body.classBody=!0}na(b,a);b.prototype.children=["variable","parent","body"];b.prototype.defaultClassVariableName="_Class";b.prototype.determineName=function(){var a,b;if(!this.variable)return this.defaultClassVariableName;b=this.variable.properties;b=(a=b[b.length-
1])?a instanceof ua&&a.name:this.variable.base;if(!(b instanceof r||b instanceof Q))return this.defaultClassVariableName;b=b.value;a||(a=Ga(b))&&this.variable.error(a);return 0<=Ha.call(k,b)?"_"+b:b};b.prototype.setContext=function(a){return this.body.traverseChildren(!1,function(b){if(b.classBody)return!1;if(b instanceof ga)return b.value=a;if(b instanceof l&&b.bound)return b.context=a})};b.prototype.addBoundFunctions=function(a){var b,e,d,c;c=this.boundFuncs;e=0;for(d=c.length;e<d;e++)b=c[e],b=
(new L(new ga,[new ua(b)])).compile(a),this.ctor.body.unshift(new H(b+" \x3d "+za("bind",a)+"("+b+", this)"))};b.prototype.addProperties=function(a,b,e){var d,c,n,f;f=a.base.properties.slice(0);var g;for(g=[];d=f.shift();)d instanceof q&&(c=d.variable.base,delete d.context,n=d.value,"constructor"===c.value?(this.ctor&&d.error("cannot define more than one constructor in a class"),n.bound&&d.error("cannot define a constructor as a bound function"),n instanceof l?d=this.ctor=n:(this.externalCtor=e.classScope.freeVariable("ctor"),
d=new q(new r(this.externalCtor),n))):d.variable["this"]?n["static"]=!0:(a=c.isComplex()?new m(c):new ua(c),d.variable=new L(new r(b),[new ua(new Q("prototype")),a]),n instanceof l&&n.bound&&(this.boundFuncs.push(c),n.bound=!1))),g.push(d);return da(g)};b.prototype.walkBody=function(a,f){return this.traverseChildren(!1,function(e){return function(d){var n,g,pa,h,k,m,l;n=!0;if(d instanceof b)return!1;if(d instanceof c){l=g=d.expressions;pa=h=0;for(k=l.length;h<k;pa=++h)m=l[pa],m instanceof q&&m.variable.looksStatic(a)?
m.value["static"]=!0:m instanceof L&&m.isObject(!0)&&(n=!1,g[pa]=e.addProperties(m,a,f));d.expressions=ia(g)}return n&&!(d instanceof b)}}(this))};b.prototype.hoistDirectivePrologue=function(){var a,b,e;b=0;for(a=this.body.expressions;(e=a[b])&&e instanceof G||e instanceof L&&e.isString();)++b;return this.directives=a.splice(0,b)};b.prototype.ensureConstructor=function(a){this.ctor||(this.ctor=new l,this.externalCtor?this.ctor.body.push(new H(this.externalCtor+".apply(this, arguments)")):this.parent&&
this.ctor.body.push(new H(a+".__super__.constructor.apply(this, arguments)")),this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor));this.ctor.ctor=this.ctor.name=a;this.ctor.klass=null;return this.ctor.noReturn=!0};b.prototype.compileNode=function(a){var b,e,d,n,g;(e=this.body.jumps())&&e.error("Class bodies cannot contain pure statements");(b=this.body.contains(Ja))&&b.error("Class bodies shouldn't reference arguments");g=this.determineName();n=new r(g);e=new l([],c.wrap([this.body]));
b=[];a.classScope=e.makeScope(a.scope);this.hoistDirectivePrologue();this.setContext(g);this.walkBody(g,a);this.ensureConstructor(g);this.addBoundFunctions(a);this.body.spaced=!0;this.body.expressions.push(n);this.parent&&(g=new r(a.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new N(n,g)),e.params.push(new W(g)),b.push(this.parent));(d=this.body.expressions).unshift.apply(d,this.directives);d=new C(new f(e,b));this.variable&&(d=new q(this.variable,d,null,{moduleDeclaration:this.moduleDeclaration}));
return d.compileToFragments(a)};return b}(a);g.ModuleDeclaration=v=function(a){function b(a,b){this.clause=a;this.source=b;this.checkSource()}na(b,a);b.prototype.children=["clause","source"];b.prototype.isStatement=ja;b.prototype.jumps=ea;b.prototype.makeReturn=ea;b.prototype.checkSource=function(){if(null!=this.source&&this.source instanceof Xa)return this.source.error("the name of the module to be imported from must be an uninterpolated string")};b.prototype.checkScope=function(a,b){if(0!==a.indent.length)return this.error(b+
" statements must be at top-level scope")};return b}(a);g.ImportDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(a){var b,e;this.checkScope(a,"import");a.importedSymbols=[];b=[];b.push(this.makeCode(this.tab+"import "));null!=this.clause&&b.push.apply(b,this.clause.compileNode(a));null!=(null!=(e=this.source)?e.value:void 0)&&(null!==this.clause&&b.push(this.makeCode(" from ")),b.push(this.makeCode(this.source.value)));
b.push(this.makeCode(";"));return b};return b}(v);g.ImportClause=function(a){function b(a,b){this.defaultBinding=a;this.namedImports=b}na(b,a);b.prototype.children=["defaultBinding","namedImports"];b.prototype.compileNode=function(a){var b;b=[];null!=this.defaultBinding&&(b.push.apply(b,this.defaultBinding.compileNode(a)),null!=this.namedImports&&b.push(this.makeCode(", ")));null!=this.namedImports&&b.push.apply(b,this.namedImports.compileNode(a));return b};return b}(a);g.ExportDeclaration=v=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);b.prototype.compileNode=function(a){var b,e;this.checkScope(a,"export");b=[];b.push(this.makeCode(this.tab+"export "));this instanceof M&&b.push(this.makeCode("default "));this instanceof M||!(this.clause instanceof q||this.clause instanceof D)||(this.clause instanceof D&&!this.clause.variable&&this.clause.error("anonymous classes cannot be exported"),b.push(this.makeCode("var ")),this.clause.moduleDeclaration="export");b=null!=this.clause.body&&this.clause.body instanceof c?b.concat(this.clause.compileToFragments(a,
A)):b.concat(this.clause.compileNode(a));null!=(null!=(e=this.source)?e.value:void 0)&&b.push(this.makeCode(" from "+this.source.value));b.push(this.makeCode(";"));return b};return b}(v);g.ExportNamedDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(v);g.ExportDefaultDeclaration=M=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(v);g.ExportAllDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(v);g.ModuleSpecifierList=v=function(a){function b(a){this.specifiers=a}na(b,a);b.prototype.children=["specifiers"];b.prototype.compileNode=function(a){var b,e,d,c,f;b=[];a.indent+=ca;var n;f=this.specifiers;n=[];d=0;for(c=f.length;d<c;d++)e=f[d],n.push(e.compileToFragments(a,h));if(0!==this.specifiers.length){b.push(this.makeCode("{\n"+a.indent));d=c=0;for(f=n.length;c<f;d=++c)e=n[d],d&&b.push(this.makeCode(",\n"+a.indent)),b.push.apply(b,e);b.push(this.makeCode("\n}"))}else b.push(this.makeCode("{}"));
return b};return b}(a);g.ImportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(v);g.ExportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(v);g.ModuleSpecifier=U=function(a){function b(a,b,e){this.original=a;this.alias=b;this.moduleDeclarationType=e;this.identifier=null!=this.alias?this.alias.value:this.original.value}na(b,a);b.prototype.children=["original","alias"];b.prototype.compileNode=
function(a){a.scope.find(this.identifier,this.moduleDeclarationType);a=[];a.push(this.makeCode(this.original.value));null!=this.alias&&a.push(this.makeCode(" as "+this.alias.value));return a};return b}(a);g.ImportSpecifier=v=function(a){function b(a,c){b.__super__.constructor.call(this,a,c,"import")}na(b,a);b.prototype.compileNode=function(a){var c;(c=this.identifier,0<=Ha.call(a.importedSymbols,c))||a.scope.check(this.identifier)?this.error("'"+this.identifier+"' has already been declared"):a.importedSymbols.push(this.identifier);
return b.__super__.compileNode.call(this,a)};return b}(U);g.ImportDefaultSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(v);g.ImportNamespaceSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(v);g.ExportSpecifier=function(a){function b(a,c){b.__super__.constructor.call(this,a,c,"export")}na(b,a);return b}(U);g.Assign=q=function(a){function b(a,b,e,d){this.variable=a;this.value=b;this.context=
e;null==d&&(d={});this.param=d.param;this.subpattern=d.subpattern;this.operatorToken=d.operatorToken;this.moduleDeclaration=d.moduleDeclaration}na(b,a);b.prototype.children=["variable","value"];b.prototype.isStatement=function(a){return(null!=a?a.level:void 0)===A&&null!=this.context&&(this.moduleDeclaration||0<=Ha.call(this.context,"?"))};b.prototype.checkAssignability=function(a,b){if(Object.prototype.hasOwnProperty.call(a.scope.positions,b.value)&&"import"===a.scope.variables[a.scope.positions[b.value]].type)return b.error("'"+
b.value+"' is read-only")};b.prototype.assigns=function(a){return this["object"===this.context?"value":"variable"].assigns(a)};b.prototype.unfoldSoak=function(a){return Na(a,this,"variable")};b.prototype.compileNode=function(a){var b,e,d,c,f,g,n;if(e=this.variable instanceof L){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(a);if(this.variable.isSplice())return this.compileSplice(a);if("||\x3d"===(c=this.context)||"\x26\x26\x3d"===c||"?\x3d"===c)return this.compileConditional(a);
if("**\x3d"===(f=this.context)||"//\x3d"===f||"%%\x3d"===f)return this.compileSpecialMath(a)}this.value instanceof l&&(this.value["static"]?(this.value.klass=this.variable.base,this.value.name=this.variable.properties[0],this.value.variable=this.variable):2<=(null!=(g=this.variable.properties)?g.length:void 0)&&(g=this.variable.properties,c=3<=g.length?Aa.call(g,0,d=g.length-2):(d=0,[]),f=g[d++],d=g[d++],"prototype"===(null!=(n=f.name)?n.value:void 0)&&(this.value.klass=new L(this.variable.base,c),
this.value.name=d,this.value.variable=this.variable)));this.context||(n=this.variable.unwrapAll(),n.isAssignable()||this.variable.error("'"+this.variable.compile(a)+"' can't be assigned"),"function"===typeof n.hasProperties&&n.hasProperties()||(this.moduleDeclaration?(this.checkAssignability(a,n),a.scope.add(n.value,this.moduleDeclaration)):this.param?a.scope.add(n.value,"var"):(this.checkAssignability(a,n),a.scope.find(n.value))));n=this.value.compileToFragments(a,h);e&&this.variable.base instanceof
z&&(this.variable.front=!0);e=this.variable.compileToFragments(a,h);if("object"===this.context){if(b=Da(e),0<=Ha.call(k,b))e.unshift(this.makeCode('"')),e.push(this.makeCode('"'));return e.concat(this.makeCode(": "),n)}b=e.concat(this.makeCode(" "+(this.context||"\x3d")+" "),n);return a.level<=h?b:this.wrapInBraces(b)};b.prototype.compilePatternMatch=function(a){var c,e,d,f,g,n,k,l,t,p,q,v,u,w,C,z;w=a.level===A;l=this.value;v=this.variable.base.objects;if(!(u=v.length))return e=l.compileToFragments(a),
a.level>=y?this.wrapInBraces(e):e;q=v[0];1===u&&q instanceof x&&q.error("Destructuring assignment has no target");n=this.variable.isObject();if(w&&1===u&&!(q instanceof R))return d=null,q instanceof b&&"object"===q.context?(e=q,f=e.variable,g=f.base,q=e.value,q instanceof b&&(d=q.value,q=q.variable)):(q instanceof b&&(d=q.value,q=q.variable),g=n?q["this"]?q.properties[0].name:new Q(q.unwrap().value):new S(0)),c=g.unwrap()instanceof Q,l=new L(l),l.properties.push(new (c?ua:m)(g)),(p=Ga(q.unwrap().value))&&
q.error(p),d&&(l=new B("?",l,d)),(new b(q,l,null,{param:this.param})).compileToFragments(a,A);C=l.compileToFragments(a,h);z=Da(C);e=[];f=!1;l.unwrap()instanceof r&&!this.variable.assigns(z)||(e.push([this.makeCode((d=a.scope.freeVariable("ref"))+" \x3d ")].concat(Aa.call(C))),C=[this.makeCode(d)],z=d);d=l=0;for(t=v.length;l<t;d=++l){q=v[d];g=d;if(!f&&q instanceof R)p=q.name.unwrap().value,q=q.unwrap(),g=u+" \x3c\x3d "+z+".length ? "+za("slice",a)+".call("+z+", "+d,(c=u-d-1)?(k=a.scope.freeVariable("i",
{single:!0}),g+=", "+k+" \x3d "+z+".length - "+c+") : ("+k+" \x3d "+d+", [])"):g+=") : []",g=new H(g),f=k+"++";else if(!f&&q instanceof x){if(c=u-d-1)1===c?f=z+".length - 1":(k=a.scope.freeVariable("i",{single:!0}),g=new H(k+" \x3d "+z+".length - "+c),f=k+"++",e.push(g.compileToFragments(a,h)));continue}else(q instanceof R||q instanceof x)&&q.error("multiple splats/expansions are disallowed in an assignment"),d=null,q instanceof b&&"object"===q.context?(g=q.variable,g=g.base,q=q.value,q instanceof
b&&(d=q.value,q=q.variable)):(q instanceof b&&(d=q.value,q=q.variable),g=n?q["this"]?q.properties[0].name:new Q(q.unwrap().value):new H(f||g)),p=q.unwrap().value,c=g.unwrap()instanceof Q,g=new L(new H(z),[new (c?ua:m)(g)]),d&&(g=new B("?",g,d));null!=p&&(p=Ga(p))&&q.error(p);e.push((new b(q,g,null,{param:this.param,subpattern:!0})).compileToFragments(a,h))}w||this.subpattern||e.push(C);e=this.joinFragmentArrays(e,", ");return a.level<h?e:this.wrapInBraces(e)};b.prototype.compileConditional=function(a){var c,
e;e=this.variable.cacheReference(a);c=e[0];e=e[1];c.properties.length||!(c.base instanceof H)||c.base instanceof ga||a.scope.check(c.base.value)||this.variable.error('the variable "'+c.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before");if(0<=Ha.call(this.context,"?"))return a.isExistentialEquals=!0,(new E(new F(c),e,{type:"if"})).addElse(new b(e,this.value,"\x3d")).compileToFragments(a);c=(new B(this.context.slice(0,-1),c,new b(e,this.value,"\x3d"))).compileToFragments(a);
return a.level<=h?c:this.wrapInBraces(c)};b.prototype.compileSpecialMath=function(a){var c,e;e=this.variable.cacheReference(a);c=e[0];e=e[1];return(new b(c,new B(this.context.slice(0,-1),e,this.value))).compileToFragments(a)};b.prototype.compileSplice=function(a){var b,e,d,c,f,g;c=this.variable.properties.pop().range;d=c.from;b=c.to;e=c.exclusive;g=this.variable.compile(a);d?(f=this.cacheToCodeFragments(d.cache(a,y)),c=f[0],f=f[1]):c=f="0";b?null!=d&&d.isNumber()&&b.isNumber()?(b=b.compile(a)-f,e||
(b+=1)):(b=b.compile(a,t)+" - "+f,e||(b+=" + 1")):b="9e9";e=this.value.cache(a,h);d=e[0];e=e[1];b=[].concat(this.makeCode("[].splice.apply("+g+", ["+c+", "+b+"].concat("),d,this.makeCode(")), "),e);return a.level>A?this.wrapInBraces(b):b};return b}(a);g.Code=l=function(a){function b(a,b,e){this.params=a||[];this.body=b||new c;this.bound="boundfunc"===e;this.isGenerator=!!this.body.contains(function(a){return a instanceof B&&a.isYield()||a instanceof ra})}na(b,a);b.prototype.children=["params","body"];
b.prototype.isStatement=function(){return!!this.ctor};b.prototype.jumps=I;b.prototype.makeScope=function(a){return new K(a,this.body,this)};b.prototype.compileNode=function(a){var g,e,d,n,h,k,m,l,p,y,A,u,v;this.bound&&null!=(e=a.scope.method)&&e.bound&&(this.context=a.scope.method.context);if(this.bound&&!this.context)return this.context="_this",e=new b([new W(new r(this.context))],new c([this])),e=new f(e,[new ga]),e.updateLocationDataIfMissing(this.locationData),e.compileNode(a);a.scope=ma(a,"classScope")||
this.makeScope(a.scope);a.scope.shared=ma(a,"sharedScope");a.indent+=ca;delete a.bare;delete a.isExistentialEquals;e=[];g=[];l=this.params;n=0;for(k=l.length;n<k;n++)m=l[n],m instanceof x||a.scope.parameter(m.asReference(a));l=this.params;n=0;for(k=l.length;n<k;n++)if(m=l[n],m.splat||m instanceof x){n=this.params;h=0;for(m=n.length;h<m;h++)p=n[h],p instanceof x||!p.name.value||a.scope.add(p.name.value,"var",!0);h=new q(new L(new qa(function(){var b,d,e,c;e=this.params;c=[];d=0;for(b=e.length;d<b;d++)p=
e[d],c.push(p.asReference(a));return c}.call(this))),new L(new r("arguments")));break}A=this.params;l=0;for(n=A.length;l<n;l++)m=A[l],m.isComplex()?(v=y=m.asReference(a),m.value&&(v=new B("?",y,m.value)),g.push(new q(new L(m.name),v,"\x3d",{param:!0}))):(y=m,m.value&&(k=new H(y.name.value+" \x3d\x3d null"),v=new q(new L(m.name),m.value,"\x3d"),g.push(new E(k,v)))),h||e.push(y);m=this.body.isEmpty();h&&g.unshift(h);g.length&&(d=this.body.expressions).unshift.apply(d,g);d=h=0;for(g=e.length;h<g;d=++h)p=
e[d],e[d]=p.compileToFragments(a),a.scope.parameter(Da(e[d]));u=[];this.eachParamName(function(a,b){0<=Ha.call(u,a)&&b.error("multiple parameters named "+a);return u.push(a)});m||this.noReturn||this.body.makeReturn();d="function";this.isGenerator&&(d+="*");this.ctor&&(d+=" "+this.name);g=[this.makeCode(d+"(")];d=m=0;for(h=e.length;m<h;d=++m)p=e[d],d&&g.push(this.makeCode(", ")),g.push.apply(g,p);g.push(this.makeCode(") {"));this.body.isEmpty()||(g=g.concat(this.makeCode("\n"),this.body.compileWithDeclarations(a),
this.makeCode("\n"+this.tab)));g.push(this.makeCode("}"));return this.ctor?[this.makeCode(this.tab)].concat(Aa.call(g)):this.front||a.level>=t?this.wrapInBraces(g):g};b.prototype.eachParamName=function(a){var b,e,d,c,f;c=this.params;f=[];b=0;for(e=c.length;b<e;b++)d=c[b],f.push(d.eachName(a));return f};b.prototype.traverseChildren=function(a,c){if(a)return b.__super__.traverseChildren.call(this,a,c)};return b}(a);g.Param=W=function(a){function b(a,b,e){this.name=a;this.value=b;this.splat=e;(a=Ga(this.name.unwrapAll().value))&&
this.name.error(a);this.name instanceof z&&this.name.generated&&(a=this.name.objects[0].operatorToken,a.error("unexpected "+a.value))}na(b,a);b.prototype.children=["name","value"];b.prototype.compileToFragments=function(a){return this.name.compileToFragments(a,h)};b.prototype.asReference=function(a){var b;if(this.reference)return this.reference;b=this.name;b["this"]?(b=b.properties[0].name.value,0<=Ha.call(k,b)&&(b="_"+b),b=new r(a.scope.freeVariable(b))):b.isComplex()&&(b=new r(a.scope.freeVariable("arg")));
b=new L(b);this.splat&&(b=new R(b));b.updateLocationDataIfMissing(this.locationData);return this.reference=b};b.prototype.isComplex=function(){return this.name.isComplex()};b.prototype.eachName=function(a,b){var e,d,c,f;null==b&&(b=this.name);e=function(b){return a("@"+b.properties[0].name.value,b)};if(b instanceof H)return a(b.value,b);if(b instanceof L)return e(b);b=null!=(d=b.objects)?d:[];d=0;for(c=b.length;d<c;d++)f=b[d],f instanceof q&&null==f.context&&(f=f.variable),f instanceof q?(f.value instanceof
q&&(f=f.value),this.eachName(a,f.value.unwrap())):f instanceof R?(f=f.name.unwrap(),a(f.value,f)):f instanceof L?f.isArray()||f.isObject()?this.eachName(a,f.base):f["this"]?e(f):a(f.base.value,f.base):f instanceof x||f.error("illegal parameter "+f.compile())};return b}(a);g.Splat=R=function(a){function b(a){this.name=a.compile?a:new H(a)}na(b,a);b.prototype.children=["name"];b.prototype.isAssignable=ja;b.prototype.assigns=function(a){return this.name.assigns(a)};b.prototype.compileToFragments=function(a){return this.name.compileToFragments(a)};
b.prototype.unwrap=function(){return this.name};b.compileSplattedArray=function(a,c,e){var d,f,g,n,k,m;for(n=-1;(d=c[++n])&&!(d instanceof b););if(n>=c.length)return[];if(1===c.length)return d=c[0],c=d.compileToFragments(a,h),e?c:[].concat(d.makeCode(za("slice",a)+".call("),c,d.makeCode(")"));e=c.slice(n);g=k=0;for(m=e.length;k<m;g=++k)d=e[g],f=d.compileToFragments(a,h),e[g]=d instanceof b?[].concat(d.makeCode(za("slice",a)+".call("),f,d.makeCode(")")):[].concat(d.makeCode("["),f,d.makeCode("]"));
if(0===n)return d=c[0],a=d.joinFragmentArrays(e.slice(1),", "),e[0].concat(d.makeCode(".concat("),a,d.makeCode(")"));k=c.slice(0,n);m=[];f=0;for(g=k.length;f<g;f++)d=k[f],m.push(d.compileToFragments(a,h));d=c[0].joinFragmentArrays(m,", ");a=c[n].joinFragmentArrays(e,", ");e=c[c.length-1];return[].concat(c[0].makeCode("["),d,c[n].makeCode("].concat("),a,e.makeCode(")"))};return b}(a);g.Expansion=x=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isComplex=
I;b.prototype.compileNode=function(a){return this.error("Expansion must be used inside a destructuring assignment or parameter list")};b.prototype.asReference=function(a){return this};b.prototype.eachName=function(a){};return b}(a);g.While=v=function(a){function b(a,b){this.condition=null!=b&&b.invert?a.invert():a;this.guard=null!=b?b.guard:void 0}na(b,a);b.prototype.children=["condition","guard","body"];b.prototype.isStatement=ja;b.prototype.makeReturn=function(a){if(a)return b.__super__.makeReturn.apply(this,
arguments);this.returns=!this.jumps({loop:!0});return this};b.prototype.addBody=function(a){this.body=a;return this};b.prototype.jumps=function(){var a,b,e,d;a=this.body.expressions;if(!a.length)return!1;b=0;for(d=a.length;b<d;b++)if(e=a[b],e=e.jumps({loop:!0}))return e;return!1};b.prototype.compileNode=function(a){var b,e,d;a.indent+=ca;d="";b=this.body;b.isEmpty()?b=this.makeCode(""):(this.returns&&(b.makeReturn(e=a.scope.freeVariable("results")),d=""+this.tab+e+" \x3d [];\n"),this.guard&&(1<b.expressions.length?
b.expressions.unshift(new E((new C(this.guard)).invert(),new ya("continue"))):this.guard&&(b=c.wrap([new E(this.guard,b)]))),b=[].concat(this.makeCode("\n"),b.compileToFragments(a,A),this.makeCode("\n"+this.tab)));a=[].concat(this.makeCode(d+this.tab+"while ("),this.condition.compileToFragments(a,P),this.makeCode(") {"),b,this.makeCode("}"));this.returns&&a.push(this.makeCode("\n"+this.tab+"return "+e+";"));return a};return b}(a);g.Op=B=function(a){function b(a,b,g,n){if("in"===a)return new O(b,g);
if("do"===a)return this.generateDo(b);if("new"===a){if(b instanceof f&&!b["do"]&&!b.isNew)return b.newInstance();if(b instanceof l&&b.bound||b["do"])b=new C(b)}this.operator=c[a]||a;this.first=b;this.second=g;this.flip=!!n;return this}var c,g;na(b,a);c={"\x3d\x3d":"\x3d\x3d\x3d","!\x3d":"!\x3d\x3d",of:"in",yieldfrom:"yield*"};g={"!\x3d\x3d":"\x3d\x3d\x3d","\x3d\x3d\x3d":"!\x3d\x3d"};b.prototype.children=["first","second"];b.prototype.isNumber=function(){var a;return this.isUnary()&&("+"===(a=this.operator)||
"-"===a)&&this.first instanceof L&&this.first.isNumber()};b.prototype.isYield=function(){var a;return"yield"===(a=this.operator)||"yield*"===a};b.prototype.isUnary=function(){return!this.second};b.prototype.isComplex=function(){return!this.isNumber()};b.prototype.isChainable=function(){var a;return"\x3c"===(a=this.operator)||"\x3e"===a||"\x3e\x3d"===a||"\x3c\x3d"===a||"\x3d\x3d\x3d"===a||"!\x3d\x3d"===a};b.prototype.invert=function(){var a,d,c;if(this.isChainable()&&this.first.isChainable()){a=!0;
for(d=this;d&&d.operator;)a&&(a=d.operator in g),d=d.first;if(!a)return(new C(this)).invert();for(d=this;d&&d.operator;)d.invert=!d.invert,d.operator=g[d.operator],d=d.first;return this}return(d=g[this.operator])?(this.operator=d,this.first.unwrap()instanceof b&&this.first.invert(),this):this.second?(new C(this)).invert():"!"===this.operator&&(a=this.first.unwrap())instanceof b&&("!"===(c=a.operator)||"in"===c||"instanceof"===c)?a:new b("!",this)};b.prototype.unfoldSoak=function(a){var b;return("++"===
(b=this.operator)||"--"===b||"delete"===b)&&Na(a,this,"first")};b.prototype.generateDo=function(a){var b,e,c,g,n;g=[];n=(a instanceof q&&(b=a.value.unwrap())instanceof l?b:a).params||[];b=0;for(e=n.length;b<e;b++)c=n[b],c.value?(g.push(c.value),delete c.value):g.push(c);a=new f(a,g);a["do"]=!0;return a};b.prototype.compileNode=function(a){var b,e;b=this.isChainable()&&this.first.isChainable();b||(this.first.front=this.front);"delete"===this.operator&&a.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var");
("--"===(e=this.operator)||"++"===e)&&(e=Ga(this.first.unwrapAll().value))&&this.first.error(e);if(this.isYield())return this.compileYield(a);if(this.isUnary())return this.compileUnary(a);if(b)return this.compileChain(a);switch(this.operator){case "?":return this.compileExistence(a);case "**":return this.compilePower(a);case "//":return this.compileFloorDivision(a);case "%%":return this.compileModulo(a);default:return b=this.first.compileToFragments(a,y),e=this.second.compileToFragments(a,y),b=[].concat(b,
this.makeCode(" "+this.operator+" "),e),a.level<=y?b:this.wrapInBraces(b)}};b.prototype.compileChain=function(a){var b;b=this.first.second.cache(a);this.first.second=b[0];b=b[1];a=this.first.compileToFragments(a,y).concat(this.makeCode(" "+(this.invert?"\x26\x26":"||")+" "),b.compileToFragments(a),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(a,y));return this.wrapInBraces(a)};b.prototype.compileExistence=function(a){var b,e;this.first.isComplex()?(e=new r(a.scope.freeVariable("ref")),
b=new C(new q(e,this.first))):e=b=this.first;return(new E(new F(b),e,{type:"if"})).addElse(this.second).compileToFragments(a)};b.prototype.compileUnary=function(a){var d,e,c;e=[];d=this.operator;e.push([this.makeCode(d)]);if("!"===d&&this.first instanceof F)return this.first.negated=!this.first.negated,this.first.compileToFragments(a);if(a.level>=t)return(new C(this)).compileToFragments(a);c="+"===d||"-"===d;("new"===d||"typeof"===d||"delete"===d||c&&this.first instanceof b&&this.first.operator===
d)&&e.push([this.makeCode(" ")]);if(c&&this.first instanceof b||"new"===d&&this.first.isStatement(a))this.first=new C(this.first);e.push(this.first.compileToFragments(a,y));this.flip&&e.reverse();return this.joinFragmentArrays(e,"")};b.prototype.compileYield=function(a){var b,e,c;e=[];b=this.operator;null==a.scope.parent&&this.error("yield can only occur inside functions");0<=Ha.call(Object.keys(this.first),"expression")&&!(this.first instanceof ha)?null!=this.first.expression&&e.push(this.first.expression.compileToFragments(a,
y)):(a.level>=P&&e.push([this.makeCode("(")]),e.push([this.makeCode(b)]),""!==(null!=(c=this.first.base)?c.value:void 0)&&e.push([this.makeCode(" ")]),e.push(this.first.compileToFragments(a,y)),a.level>=P&&e.push([this.makeCode(")")]));return this.joinFragmentArrays(e,"")};b.prototype.compilePower=function(a){var b;b=new L(new r("Math"),[new ua(new Q("pow"))]);return(new f(b,[this.first,this.second])).compileToFragments(a)};b.prototype.compileFloorDivision=function(a){var d,e;e=new L(new r("Math"),
[new ua(new Q("floor"))]);d=this.second.isComplex()?new C(this.second):this.second;d=new b("/",this.first,d);return(new f(e,[d])).compileToFragments(a)};b.prototype.compileModulo=function(a){var b;b=new L(new H(za("modulo",a)));return(new f(b,[this.first,this.second])).compileToFragments(a)};b.prototype.toString=function(a){return b.__super__.toString.call(this,a,this.constructor.name+" "+this.operator)};return b}(a);g.In=O=function(a){function b(a,b){this.object=a;this.array=b}na(b,a);b.prototype.children=
["object","array"];b.prototype.invert=T;b.prototype.compileNode=function(a){var b,e,d,c,f;if(this.array instanceof L&&this.array.isArray()&&this.array.base.objects.length){f=this.array.base.objects;e=0;for(d=f.length;e<d;e++)if(c=f[e],c instanceof R){b=!0;break}if(!b)return this.compileOrTest(a)}return this.compileLoopTest(a)};b.prototype.compileOrTest=function(a){var b,e,d,c,f,g,n,h,k,m;b=this.object.cache(a,y);k=b[0];n=b[1];e=this.negated?[" !\x3d\x3d "," \x26\x26 "]:[" \x3d\x3d\x3d "," || "];b=
e[0];e=e[1];m=[];h=this.array.base.objects;d=f=0;for(g=h.length;f<g;d=++f)c=h[d],d&&m.push(this.makeCode(e)),m=m.concat(d?n:k,this.makeCode(b),c.compileToFragments(a,t));return a.level<y?m:this.wrapInBraces(m)};b.prototype.compileLoopTest=function(a){var b,e,d;b=this.object.cache(a,h);d=b[0];e=b[1];b=[].concat(this.makeCode(za("indexOf",a)+".call("),this.array.compileToFragments(a,h),this.makeCode(", "),e,this.makeCode(") "+(this.negated?"\x3c 0":"\x3e\x3d 0")));if(Da(d)===Da(e))return b;b=d.concat(this.makeCode(", "),
b);return a.level<h?b:this.wrapInBraces(b)};b.prototype.toString=function(a){return b.__super__.toString.call(this,a,this.constructor.name+(this.negated?"!":""))};return b}(a);g.Try=function(a){function b(a,b,e,d){this.attempt=a;this.errorVariable=b;this.recovery=e;this.ensure=d}na(b,a);b.prototype.children=["attempt","recovery","ensure"];b.prototype.isStatement=ja;b.prototype.jumps=function(a){var b;return this.attempt.jumps(a)||(null!=(b=this.recovery)?b.jumps(a):void 0)};b.prototype.makeReturn=
function(a){this.attempt&&(this.attempt=this.attempt.makeReturn(a));this.recovery&&(this.recovery=this.recovery.makeReturn(a));return this};b.prototype.compileNode=function(a){var b,e,d,c,f;a.indent+=ca;f=this.attempt.compileToFragments(a,A);b=this.recovery?(e=a.scope.freeVariable("error",{reserve:!1}),c=new r(e),this.errorVariable?(d=Ga(this.errorVariable.unwrapAll().value),d?this.errorVariable.error(d):void 0,this.recovery.unshift(new q(this.errorVariable,c))):void 0,[].concat(this.makeCode(" catch ("),
c.compileToFragments(a),this.makeCode(") {\n"),this.recovery.compileToFragments(a,A),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:(e=a.scope.freeVariable("error",{reserve:!1}),[this.makeCode(" catch ("+e+") {}")]);a=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(a,A),this.makeCode("\n"+this.tab+"}")):[];return[].concat(this.makeCode(this.tab+"try {\n"),f,this.makeCode("\n"+this.tab+"}"),b,a)};return b}(a);g.Throw=ha=function(a){function b(a){this.expression=
a}na(b,a);b.prototype.children=["expression"];b.prototype.isStatement=ja;b.prototype.jumps=I;b.prototype.makeReturn=ea;b.prototype.compileNode=function(a){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(a),this.makeCode(";"))};return b}(a);g.Existence=F=function(a){function b(a){this.expression=a}na(b,a);b.prototype.children=["expression"];b.prototype.invert=T;b.prototype.compileNode=function(a){var b,e,d;this.expression.front=this.front;d=this.expression.compile(a,
y);this.expression.unwrap()instanceof r&&!a.scope.check(d)?(e=this.negated?["\x3d\x3d\x3d","||"]:["!\x3d\x3d","\x26\x26"],b=e[0],e=e[1],d="typeof "+d+" "+b+' "undefined" '+e+" "+d+" "+b+" null"):d=d+" "+(this.negated?"\x3d\x3d":"!\x3d")+" null";return[this.makeCode(a.level<=p?d:"("+d+")")]};return b}(a);g.Parens=C=function(a){function b(a){this.body=a}na(b,a);b.prototype.children=["body"];b.prototype.unwrap=function(){return this.body};b.prototype.isComplex=function(){return this.body.isComplex()};
b.prototype.compileNode=function(a){var b,e;b=this.body.unwrap();if(b instanceof L&&b.isAtomic())return b.front=this.front,b.compileToFragments(a);e=b.compileToFragments(a,P);return a.level<y&&(b instanceof B||b instanceof f||b instanceof J&&b.returns)?e:this.wrapInBraces(e)};return b}(a);g.StringWithInterpolations=Xa=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(a){var c,e,d,f,g;if(!a.inTaggedTemplateCall)return b.__super__.compileNode.apply(this,
arguments);d=this.body.unwrap();e=[];d.traverseChildren(!1,function(a){if(a instanceof $a)e.push(a);else if(a instanceof C)return e.push(a),!1;return!0});d=[];d.push(this.makeCode("`"));f=0;for(g=e.length;f<g;f++)c=e[f],c instanceof $a?(c=c.value.slice(1,-1),c=c.replace(/(\\*)(`|\$\{)/g,function(a,b,d){return 0===b.length%2?b+"\\"+d:a}),d.push(this.makeCode(c))):(d.push(this.makeCode("${")),d.push.apply(d,c.compileToFragments(a,P)),d.push(this.makeCode("}")));d.push(this.makeCode("`"));return d};
return b}(C);g.For=J=function(a){function b(a,b){this.source=b.source;this.guard=b.guard;this.step=b.step;this.name=b.name;this.index=b.index;this.body=c.wrap([a]);this.own=!!b.own;this.object=!!b.object;(this.from=!!b.from)&&this.index&&this.index.error("cannot use index with for-from");this.own&&!this.object&&b.ownTag.error("cannot use own with for-"+(this.from?"from":"in"));this.object&&(a=[this.index,this.name],this.name=a[0],this.index=a[1]);this.index instanceof L&&!this.index.isAssignable()&&
this.index.error("index cannot be a pattern matching expression");this.range=this.source instanceof L&&this.source.base instanceof X&&!this.source.properties.length&&!this.from;this.pattern=this.name instanceof L;this.range&&this.index&&this.index.error("indexes do not apply to range loops");this.range&&this.pattern&&this.name.error("cannot pattern match over range loops");this.returns=!1}na(b,a);b.prototype.children=["body","source","guard","step"];b.prototype.compileNode=function(a){var b,e,d,f,
g,k,n,m,l,t,p,y,v,u,w,z,B,x,D,I,P;b=c.wrap([this.body]);l=b.expressions;l=l[l.length-1];(null!=l?l.jumps():void 0)instanceof V&&(this.returns=!1);w=this.range?this.source.base:this.source;d=a.scope;this.pattern||(m=this.name&&this.name.compile(a,h));l=this.index&&this.index.compile(a,h);m&&!this.pattern&&d.find(m);!l||this.index instanceof L||d.find(l);this.returns&&(n=d.freeVariable("results"));this.from?this.pattern&&(p=d.freeVariable("x",{single:!0})):p=this.object&&l||d.freeVariable("i",{single:!0});
y=(this.range||this.from)&&m||l||p;v=y!==p?y+" \x3d ":"";this.step&&!this.range&&(l=this.cacheToCodeFragments(this.step.cache(a,h,ta)),g=l[0],D=l[1],this.step.isNumber()&&(x=Number(D)));this.pattern&&(m=p);k=l=P="";t=this.tab+ca;this.range?f=w.compileToFragments(Fa(a,{index:p,name:m,step:this.step,isComplex:ta})):(I=this.source.compile(a,h),!m&&!this.own||this.source.unwrap()instanceof r||(k+=""+this.tab+(w=d.freeVariable("ref"))+" \x3d "+I+";\n",I=w),!m||this.pattern||this.from||(u=m+" \x3d "+I+
"["+y+"]"),this.object||this.from||(g!==D&&(k+=""+this.tab+g+";\n"),m=0>x,this.step&&null!=x&&m||(e=d.freeVariable("len")),f=""+v+p+" \x3d 0, "+e+" \x3d "+I+".length",g=""+v+p+" \x3d "+I+".length - 1",e=p+" \x3c "+e,d=p+" \x3e\x3d 0",this.step?(null!=x?m&&(e=d,f=g):(e=D+" \x3e 0 ? "+e+" : "+d,f="("+D+" \x3e 0 ? ("+f+") : "+g+")"),p=p+" +\x3d "+D):p=""+(y!==p?"++"+p:p+"++"),f=[this.makeCode(f+"; "+e+"; "+v+p)]));this.returns&&(z=""+this.tab+n+" \x3d [];\n",B="\n"+this.tab+"return "+n+";",b.makeReturn(n));
this.guard&&(1<b.expressions.length?b.expressions.unshift(new E((new C(this.guard)).invert(),new ya("continue"))):this.guard&&(b=c.wrap([new E(this.guard,b)])));this.pattern&&b.expressions.unshift(new q(this.name,this.from?new r(y):new H(I+"["+y+"]")));n=[].concat(this.makeCode(k),this.pluckDirectCall(a,b));u&&(P="\n"+t+u+";");this.object?(f=[this.makeCode(y+" in "+I)],this.own&&(l="\n"+t+"if (!"+za("hasProp",a)+".call("+I+", "+y+")) continue;")):this.from&&(f=[this.makeCode(y+" of "+I)]);(a=b.compileToFragments(Fa(a,
{indent:t}),A))&&0<a.length&&(a=[].concat(this.makeCode("\n"),a,this.makeCode("\n")));return[].concat(n,this.makeCode(""+(z||"")+this.tab+"for ("),f,this.makeCode(") {"+l+P),a,this.makeCode(this.tab+"}"+(B||"")))};b.prototype.pluckDirectCall=function(a,b){var c,d,g,k,h,m,n,p,t,y,v,u,w,z,x;d=[];t=b.expressions;h=m=0;for(n=t.length;m<n;h=++m)if(g=t[h],g=g.unwrapAll(),g instanceof f&&(x=null!=(y=g.variable)?y.unwrapAll():void 0,x instanceof l||x instanceof L&&(null!=(v=x.base)?v.unwrapAll():void 0)instanceof
l&&1===x.properties.length&&("call"===(u=null!=(w=x.properties[0].name)?w.value:void 0)||"apply"===u)))k=(null!=(z=x.base)?z.unwrapAll():void 0)||x,p=new r(a.scope.freeVariable("fn")),c=new L(p),x.base&&(c=[c,x],x.base=c[0],c=c[1]),b.expressions[h]=new f(c,g.args),d=d.concat(this.makeCode(this.tab),(new q(p,k)).compileToFragments(a,A),this.makeCode(";\n"));return d};return b}(v);g.Switch=function(a){function b(a,b,c){this.subject=a;this.cases=b;this.otherwise=c}na(b,a);b.prototype.children=["subject",
"cases","otherwise"];b.prototype.isStatement=ja;b.prototype.jumps=function(a){var b,c,d,f,g;null==a&&(a={block:!0});f=this.cases;c=0;for(d=f.length;c<d;c++)if(b=f[c],b=b[1],b=b.jumps(a))return b;return null!=(g=this.otherwise)?g.jumps(a):void 0};b.prototype.makeReturn=function(a){var b,e,d,f,g;f=this.cases;b=0;for(e=f.length;b<e;b++)d=f[b],d[1].makeReturn(a);a&&(this.otherwise||(this.otherwise=new c([new H("void 0")])));null!=(g=this.otherwise)&&g.makeReturn(a);return this};b.prototype.compileNode=
function(a){var b,c,d,f,g,k,h,m,n,l,p,t,q;h=a.indent+ca;m=a.indent=h+ca;k=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(a,P):this.makeCode("false"),this.makeCode(") {\n"));t=this.cases;g=n=0;for(l=t.length;n<l;g=++n){b=t[g];f=b[0];b=b[1];q=ia([f]);f=0;for(p=q.length;f<p;f++)d=q[f],this.subject||(d=d.invert()),k=k.concat(this.makeCode(h+"case "),d.compileToFragments(a,P),this.makeCode(":\n"));0<(c=b.compileToFragments(a,A)).length&&(k=k.concat(c,this.makeCode("\n")));
if(g===this.cases.length-1&&!this.otherwise)break;g=this.lastNonComment(b.expressions);g instanceof V||g instanceof H&&g.jumps()&&"debugger"!==g.value||k.push(d.makeCode(m+"break;\n"))}this.otherwise&&this.otherwise.expressions.length&&k.push.apply(k,[this.makeCode(h+"default:\n")].concat(Aa.call(this.otherwise.compileToFragments(a,A)),[this.makeCode("\n")]));k.push(this.makeCode(this.tab+"}"));return k};return b}(a);g.If=E=function(a){function b(a,b,c){this.body=b;null==c&&(c={});this.condition=
"unless"===c.type?a.invert():a;this.elseBody=null;this.isChain=!1;this.soak=c.soak}na(b,a);b.prototype.children=["condition","body","elseBody"];b.prototype.bodyNode=function(){var a;return null!=(a=this.body)?a.unwrap():void 0};b.prototype.elseBodyNode=function(){var a;return null!=(a=this.elseBody)?a.unwrap():void 0};b.prototype.addElse=function(a){this.isChain?this.elseBodyNode().addElse(a):(this.isChain=a instanceof b,this.elseBody=this.ensureBlock(a),this.elseBody.updateLocationDataIfMissing(a.locationData));
return this};b.prototype.isStatement=function(a){var b;return(null!=a?a.level:void 0)===A||this.bodyNode().isStatement(a)||(null!=(b=this.elseBodyNode())?b.isStatement(a):void 0)};b.prototype.jumps=function(a){var b;return this.body.jumps(a)||(null!=(b=this.elseBody)?b.jumps(a):void 0)};b.prototype.compileNode=function(a){return this.isStatement(a)?this.compileStatement(a):this.compileExpression(a)};b.prototype.makeReturn=function(a){a&&(this.elseBody||(this.elseBody=new c([new H("void 0")])));this.body&&
(this.body=new c([this.body.makeReturn(a)]));this.elseBody&&(this.elseBody=new c([this.elseBody.makeReturn(a)]));return this};b.prototype.ensureBlock=function(a){return a instanceof c?a:new c([a])};b.prototype.compileStatement=function(a){var c,e,d,f;c=ma(a,"chainChild");if(ma(a,"isExistentialEquals"))return(new b(this.condition.invert(),this.elseBodyNode(),{type:"if"})).compileToFragments(a);f=a.indent+ca;d=this.condition.compileToFragments(a,P);e=this.ensureBlock(this.body).compileToFragments(Fa(a,
{indent:f}));e=[].concat(this.makeCode("if ("),d,this.makeCode(") {\n"),e,this.makeCode("\n"+this.tab+"}"));c||e.unshift(this.makeCode(this.tab));if(!this.elseBody)return e;c=e.concat(this.makeCode(" else "));this.isChain?(a.chainChild=!0,c=c.concat(this.elseBody.unwrap().compileToFragments(a,A))):c=c.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(Fa(a,{indent:f}),A),this.makeCode("\n"+this.tab+"}"));return c};b.prototype.compileExpression=function(a){var b,c,d;d=this.condition.compileToFragments(a,
p);c=this.bodyNode().compileToFragments(a,h);b=this.elseBodyNode()?this.elseBodyNode().compileToFragments(a,h):[this.makeCode("void 0")];b=d.concat(this.makeCode(" ? "),c,this.makeCode(" : "),b);return a.level>=p?this.wrapInBraces(b):b};b.prototype.unfoldSoak=function(){return this.soak&&this};return b}(a);la={extend:function(a){return"function(child, parent) { for (var key in parent) { if ("+za("hasProp",a)+".call(parent, key)) child[key] \x3d parent[key]; } function ctor() { this.constructor \x3d child; } ctor.prototype \x3d parent.prototype; child.prototype \x3d new ctor(); child.__super__ \x3d parent.prototype; return child; }"},
bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i \x3d 0, l \x3d this.length; i \x3c l; i++) { if (i in this \x26\x26 this[i] \x3d\x3d\x3d item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b \x3d +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}};A=1;P=2;h=3;p=4;y=5;t=6;ca=" ";Z=/^[+-]?\d+$/;za=
function(a,b){var c,f;f=b.scope.root;if(a in f.utilities)return f.utilities[a];c=f.freeVariable(a);f.assign(c,la[a](b));return f.utilities[a]=c};Pa=function(a,b){a=a.replace(/\n/g,"$\x26"+b);return a.replace(/\s+$/,"")};Ja=function(a){return a instanceof r&&"arguments"===a.value};Ta=function(a){return a instanceof ga||a instanceof l&&a.bound||a instanceof ka};ta=function(a){return a.isComplex()||("function"===typeof a.isAssignable?a.isAssignable():void 0)};Na=function(a,b,c){if(a=b[c].unfoldSoak(a))return b[c]=
a.body,a.body=new L(b),a}}).call(this);return g}();u["./sourcemap"]=function(){var g={};(function(){var u;u=function(){function g(g){this.line=g;this.columns=[]}g.prototype.add=function(g,a,c){var q;q=a[0];a=a[1];null==c&&(c={});if(!this.columns[g]||!c.noReplace)return this.columns[g]={line:this.line,column:g,sourceLine:q,sourceColumn:a}};g.prototype.sourceLocation=function(g){for(var a;!((a=this.columns[g])||0>=g);)g--;return a&&[a.sourceLine,a.sourceColumn]};return g}();g=function(){function g(){this.lines=
[]}g.prototype.add=function(g,a,c){var q,f;null==c&&(c={});f=a[0];a=a[1];return((q=this.lines)[f]||(q[f]=new u(f))).add(a,g,c)};g.prototype.sourceLocation=function(g){var a,c;a=g[0];for(g=g[1];!((c=this.lines[a])||0>=a);)a--;return c&&c.sourceLocation(g)};g.prototype.generate=function(g,a){var c,q,f,u,l,w,G,F,x,v,M,N,J;null==g&&(g={});null==a&&(a=null);l=w=u=J=0;v=!1;c="";M=this.lines;f=q=0;for(G=M.length;q<G;f=++q)if(f=M[f])for(N=f.columns,f=0,F=N.length;f<F;f++)if(x=N[f]){for(;J<x.line;)u=0,v=!1,
c+=";",J++;v&&(c+=",");c+=this.encodeVlq(x.column-u);u=x.column;c+=this.encodeVlq(0);c+=this.encodeVlq(x.sourceLine-w);w=x.sourceLine;c+=this.encodeVlq(x.sourceColumn-l);l=x.sourceColumn;v=!0}c={version:3,file:g.generatedFile||"",sourceRoot:g.sourceRoot||"",sources:g.sourceFiles||[""],names:[],mappings:c};g.inlineMap&&(c.sourcesContent=[a]);return c};g.prototype.encodeVlq=function(g){var a,c;a="";for(c=(Math.abs(g)<<1)+(0>g?1:0);c||!a;)g=c&31,(c>>=5)&&(g|=32),a+=this.encodeBase64(g);return a};g.prototype.encodeBase64=
function(g){var a;if(!(a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[g]))throw Error("Cannot Base64 encode value: "+g);return a};return g}()}).call(this);return g}();u["./coffee-script"]=function(){var g={};(function(){var qa,xa,q,a,c,Ca,f,D,l,w,G,F,x,v,M,N,J,r,E,O={}.hasOwnProperty;D=u("fs");E=u("vm");M=u("path");qa=u("./lexer").Lexer;v=u("./parser").parser;w=u("./helpers");xa=u("./sourcemap");c=u("../../package.json");g.VERSION=c.version;g.FILE_EXTENSIONS=[".coffee",".litcoffee",
".coffee.md"];g.helpers=w;q=function(a){switch(!1){case "function"!==typeof Buffer:return(new Buffer(a)).toString("base64");case "function"!==typeof btoa:return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,c){return String.fromCharCode("0x"+c)}));default:throw Error("Unable to base64 encode inline sourcemap.");}};c=function(a){return function(c,f){null==f&&(f={});try{return a.call(this,c,f)}catch(p){if("string"!==typeof c)throw p;throw w.updateSyntaxError(p,c,f.filename);}}};r=
{};J={};g.compile=a=c(function(a,c){var f,g,h,k,m,l,u,D,E,I,F,G,z;h=w.extend;c=h({},c);l=c.sourceMap||c.inlineMap||null==c.filename;h=c.filename||"\x3canonymous\x3e";r[h]=a;l&&(I=new xa);g=x.tokenize(a,c);k=c;E=[];m=0;for(u=g.length;m<u;m++)f=g[m],"IDENTIFIER"===f[0]&&E.push(f[1]);k.referencedVars=E;if(null==c.bare||!0!==c.bare)for(k=0,m=g.length;k<m;k++)if(f=g[k],"IMPORT"===(D=f[0])||"EXPORT"===D){c.bare=!0;break}m=v.parse(g).compileToFragments(c);g=0;c.header&&(g+=1);c.shiftLine&&(g+=1);f=0;D="";
u=0;for(E=m.length;u<E;u++)k=m[u],l&&(k.locationData&&!/^[;\s]*$/.test(k.code)&&I.add([k.locationData.first_line,k.locationData.first_column],[g,f],{noReplace:!0}),F=w.count(k.code,"\n"),g+=F,f=F?k.code.length-(k.code.lastIndexOf("\n")+1):f+k.code.length),D+=k.code;c.header&&(f="Generated by CoffeeScript "+this.VERSION,D="// "+f+"\n"+D);l&&(z=I.generate(c,a),J[h]=I);c.inlineMap&&(a=q(JSON.stringify(z)),h="//# sourceURL\x3d"+(null!=(G=c.filename)?G:"coffeescript"),D=D+"\n"+("//# sourceMappingURL\x3ddata:application/json;base64,"+
a)+"\n"+h);return c.sourceMap?{js:D,sourceMap:I,v3SourceMap:JSON.stringify(z,null,2)}:D});g.tokens=c(function(a,c){return x.tokenize(a,c)});g.nodes=c(function(a,c){return"string"===typeof a?v.parse(x.tokenize(a,c)):v.parse(a)});g.run=function(c,f){var g,k,h;null==f&&(f={});k=u.main;k.filename=process.argv[1]=f.filename?D.realpathSync(f.filename):"\x3canonymous\x3e";k.moduleCache&&(k.moduleCache={});g=null!=f.filename?M.dirname(D.realpathSync(f.filename)):D.realpathSync(".");k.paths=u("module")._nodeModulePaths(g);
if(!w.isCoffee(k.filename)||u.extensions)c=a(c,f),c=null!=(h=c.js)?h:c;return k._compile(c,k.filename)};g.eval=function(c,f){var g,k,h,m,l,r,q,v,x,w;null==f&&(f={});if(c=c.trim()){m=null!=(l=E.Script.createContext)?l:E.createContext;l=null!=(h=E.isContext)?h:function(a){return f.sandbox instanceof m().constructor};if(m){if(null!=f.sandbox){if(l(f.sandbox))w=f.sandbox;else for(r in w=m(),l=f.sandbox,l)O.call(l,r)&&(h=l[r],w[r]=h);w.global=w.root=w.GLOBAL=w}else w=global;w.__filename=f.filename||"eval";
w.__dirname=M.dirname(w.__filename);if(w===global&&!w.module&&!w.require){g=u("module");w.module=k=new g(f.modulename||"eval");w.require=h=function(a){return g._load(a,k,!0)};k.filename=w.__filename;x=Object.getOwnPropertyNames(u);l=0;for(q=x.length;l<q;l++)v=x[l],"paths"!==v&&"arguments"!==v&&"caller"!==v&&(h[v]=u[v]);h.paths=k.paths=g._nodeModulePaths(process.cwd());h.resolve=function(a){return g._resolveFilename(a,k)}}}l={};for(r in f)O.call(f,r)&&(h=f[r],l[r]=h);l.bare=!0;c=a(c,l);return w===
global?E.runInThisContext(c):E.runInContext(c,w)}};g.register=function(){return u("./register")};if(u.extensions)for(N=this.FILE_EXTENSIONS,Ca=function(a){var c;return null!=(c=u.extensions)[a]?c[a]:c[a]=function(){throw Error("Use CoffeeScript.register() or require the coffee-script/register module to require "+a+" files.");}},G=0,F=N.length;G<F;G++)c=N[G],Ca(c);g._compileFile=function(c,f,g){var k,h;null==f&&(f=!1);null==g&&(g=!1);h=D.readFileSync(c,"utf8");h=65279===h.charCodeAt(0)?h.substring(1):
h;try{k=a(h,{filename:c,sourceMap:f,inlineMap:g,sourceFiles:[c],literate:w.isLiterate(c)})}catch(y){throw w.updateSyntaxError(y,h,c);}return k};x=new qa;v.lexer={lex:function(){var a,c;(c=v.tokens[this.pos++])?(a=c[0],this.yytext=c[1],this.yylloc=c[2],v.errorToken=c.origin||c,this.yylineno=this.yylloc.first_line):a="";return a},setInput:function(a){v.tokens=a;return this.pos=0},upcomingInput:function(){return""}};v.yy=u("./nodes");v.yy.parseError=function(a,c){var f,g,h,k;h=v.errorToken;k=v.tokens;
f=h[0];g=h[1];a=h[2];g=function(){switch(!1){case h!==k[k.length-1]:return"end of input";case "INDENT"!==f&&"OUTDENT"!==f:return"indentation";case "IDENTIFIER"!==f&&"NUMBER"!==f&&"INFINITY"!==f&&"STRING"!==f&&"STRING_START"!==f&&"REGEX"!==f&&"REGEX_START"!==f:return f.replace(/_START$/,"").toLowerCase();default:return w.nameWhitespaceCharacter(g)}}();return w.throwSyntaxError("unexpected "+g,a)};f=function(a,c){var f,g,h,k;a.isNative()?f="native":(a.isEval()?(g=a.getScriptNameOrSourceURL())||a.getEvalOrigin():
g=a.getFileName(),g||(g="\x3canonymous\x3e"),h=a.getLineNumber(),f=a.getColumnNumber(),f=(c=c(g,h,f))?g+":"+c[0]+":"+c[1]:g+":"+h+":"+f);g=a.getFunctionName();h=a.isConstructor();if(a.isToplevel()||h)return h?"new "+(g||"\x3canonymous\x3e")+" ("+f+")":g?g+" ("+f+")":f;h=a.getMethodName();k=a.getTypeName();return g?(c=a="",k&&g.indexOf(k)&&(c=k+"."),h&&g.indexOf("."+h)!==g.length-h.length-1&&(a=" [as "+h+"]"),""+c+g+a+" ("+f+")"):k+"."+(h||"\x3canonymous\x3e")+" ("+f+")"};l=function(c){return null!=
J[c]?J[c]:null!=J["\x3canonymous\x3e"]?J["\x3canonymous\x3e"]:null!=r[c]?(c=a(r[c],{filename:c,sourceMap:!0,literate:w.isLiterate(c)}),c.sourceMap):null};Error.prepareStackTrace=function(a,c){var k,m,h;h=function(a,c,f){var g;a=l(a);null!=a&&(g=a.sourceLocation([c-1,f-1]));return null!=g?[g[0]+1,g[1]+1]:null};m=function(){var a,l,m;m=[];a=0;for(l=c.length;a<l;a++){k=c[a];if(k.getFunction()===g.run)break;m.push(" at "+f(k,h))}return m}();return a.toString()+"\n"+m.join("\n")+"\n"}}).call(this);
return g}();u["./browser"]=function(){(function(){var g,qa,xa,q=[].indexOf||function(a){for(var c=0,g=this.length;c<g;c++)if(c in this&&this[c]===a)return c;return-1};g=u("./coffee-script");g.require=u;qa=g.compile;g.eval=function(a,c){null==c&&(c={});null==c.bare&&(c.bare=!0);return eval(qa(a,c))};g.run=function(a,c){null==c&&(c={});c.bare=!0;c.shiftLine=!0;return Function(qa(a,c))()};"undefined"!==typeof window&&null!==window&&("undefined"!==typeof btoa&&null!==btoa&&"undefined"!==typeof JSON&&
null!==JSON&&(qa=function(a,c){null==c&&(c={});c.inlineMap=!0;return g.compile(a,c)}),g.load=function(a,c,q,f){var u;null==q&&(q={});null==f&&(f=!1);q.sourceFiles=[a];u=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest;u.open("GET",a,!0);"overrideMimeType"in u&&u.overrideMimeType("text/plain");u.onreadystatechange=function(){var l;if(4===u.readyState){if(0===(l=u.status)||200===l)l=[u.responseText,q],f||g.run.apply(g,l);else throw Error("Could not load "+
a);if(c)return c(l)}};return u.send(null)},xa=function(){var a,c,u,f,D,l,w,G,F,x,v;v=window.document.getElementsByTagName("script");c=["text/coffeescript","text/literate-coffeescript"];a=function(){var a,f,g,l;l=[];a=0;for(f=v.length;a<f;a++)F=v[a],(g=F.type,0<=q.call(c,g))&&l.push(F);return l}();l=0;u=function(){var c;c=a[l];if(c instanceof Array)return g.run.apply(g,c),l++,u()};f=function(f,l){var q,r;q={literate:f.type===c[1]};if(r=f.src||f.getAttribute("data-src"))return g.load(r,function(c){a[l]=
c;return u()},q,!0);q.sourceFiles=["embedded"];return a[l]=[f.innerHTML,q]};D=w=0;for(G=a.length;w<G;D=++w)x=a[D],f(x,D);return u()},window.addEventListener?window.addEventListener("DOMContentLoaded",xa,!1):window.attachEvent("onload",xa))}).call(this);return{}}();return u["./coffee-script"]}();"function"===typeof define&&define.amd?define(function(){return ya}):u.CoffeeScript=ya})(this);
$jscomp.arrayIterator=function(u){var xa=0;return $jscomp.iteratorPrototype(function(){return xa<u.length?{done:!1,value:u[xa++]}:{done:!0}})};$jscomp.iteratorPrototype=function(u){$jscomp.initSymbolIterator();u={next:u};u[$jscomp.global.Symbol.iterator]=function(){return this};return u};
$jscomp.iteratorFromArray=function(u,xa){$jscomp.initSymbolIterator();u instanceof String&&(u+="");var va=0,f={next:function(){if(va<u.length){var qa=va++;return{value:xa(qa,u[qa]),done:!1}}f.next=function(){return{done:!0,value:void 0}};return f.next()}};f[Symbol.iterator]=function(){return f};return f};$jscomp.polyfill("Array.prototype.keys",function(u){return u?u:function(){return $jscomp.iteratorFromArray(this,function(u){return u})}},"es6-impl","es3");
(function(u){var xa=function(){function u(f){return u[f]}u["../../package.json"]={name:"coffee-script",description:"Unfancy JavaScript",keywords:["javascript","language","coffeescript","compiler"],author:"Jeremy Ashkenas",version:"1.12.6",license:"MIT",engines:{node:"\x3e\x3d0.8.0"},directories:{lib:"./lib/coffee-script"},main:"./lib/coffee-script/coffee-script",bin:{coffee:"./bin/coffee",cake:"./bin/cake"},files:["bin","lib","register.js","repl.js"],scripts:{test:"node ./bin/cake test","test-harmony":"node --harmony ./bin/cake test"},
homepage:"http://coffeescript.org",bugs:"https://github.com/jashkenas/coffeescript/issues",repository:{type:"git",url:"git://github.com/jashkenas/coffeescript.git"},devDependencies:{docco:"~0.7.0","google-closure-compiler-js":"^20170423.0.0","highlight.js":"~9.11.0",jison:"\x3e\x3d0.4.17","markdown-it":"^8.3.1",underscore:"~1.8.3"}};u["./helpers"]=function(){var f={};(function(){var u,q,y;f.starts=function(a,h,r){return h===a.substr(r,h.length)};f.ends=function(a,h,r){var g=h.length;return h===a.substr(a.length-
g-(r||0),g)};f.repeat=y=function(a,h){var g;for(g="";0<h;)h&1&&(g+=a),h>>>=1,a+=a;return g};f.compact=function(a){var g,b;var n=[];var y=0;for(b=a.length;y<b;y++)(g=a[y])&&n.push(g);return n};f.count=function(a,h){var g;var b=g=0;if(!h.length)return 1/0;for(;g=1+a.indexOf(h,g);)b++;return b};f.merge=function(g,h){return a(a({},g),h)};var a=f.extend=function(a,h){var g;for(g in h){var b=h[g];a[g]=b}return a};f.flatten=u=function(a){var g;var b=[];var y=0;for(g=a.length;y<g;y++){var f=a[y];"[object Array]"===
Object.prototype.toString.call(f)?b=b.concat(u(f)):b.push(f)}return b};f.del=function(a,h){var g=a[h];delete a[h];return g};f.some=null!=(q=Array.prototype.some)?q:function(a){var g;var b=0;for(g=this.length;b<g;b++){var y=this[b];if(a(y))return!0}return!1};f.invertLiterate=function(a){var g=!0;var b;var y=a.split("\n");var f=[];var H=0;for(b=y.length;H<b;H++)a=y[H],g&&/^([ ]{4}|[ ]{0,3}\t)/.test(a)?f.push(a):(g=/^\s*$/.test(a))?f.push(a):f.push("# "+a);return f.join("\n")};var b=function(a,b){return b?
{first_line:a.first_line,first_column:a.first_column,last_line:b.last_line,last_column:b.last_column}:a};f.addLocationDataFn=function(a,h){return function(g){"object"===typeof g&&g.updateLocationDataIfMissing&&g.updateLocationDataIfMissing(b(a,h));return g}};f.locationDataToString=function(a){var g;"2"in a&&"first_line"in a[2]?g=a[2]:"first_line"in a&&(g=a);return g?g.first_line+1+":"+(g.first_column+1)+"-"+(g.last_line+1+":"+(g.last_column+1)):"No location data"};f.baseFileName=function(a,b,y){null==
b&&(b=!1);null==y&&(y=!1);a=a.split(y?/\\|\//:/\//);a=a[a.length-1];if(!(b&&0<=a.indexOf(".")))return a;a=a.split(".");a.pop();"coffee"===a[a.length-1]&&1<a.length&&a.pop();return a.join(".")};f.isCoffee=function(a){return/\.((lit)?coffee|coffee\.md)$/.test(a)};f.isLiterate=function(a){return/\.(litcoffee|coffee\.md)$/.test(a)};f.throwSyntaxError=function(a,b){a=new SyntaxError(a);a.location=b;a.toString=ya;a.stack=a.toString();throw a;};f.updateSyntaxError=function(a,b,y){a.toString===ya&&(a.code||
(a.code=b),a.filename||(a.filename=y),a.stack=a.toString());return a};var ya=function(){var a,b,f;if(!this.code||!this.location)return Error.prototype.toString.call(this);var n=this.location;var B=n.first_line;var H=n.first_column;var I=n.last_line;var F=n.last_column;null==I&&(I=B);null==F&&(F=H);var u=this.filename||"[stdin]";n=this.code.split("\n")[B];I=B===I?F+1:n.length;F=n.slice(0,H).replace(/[^\s]/g," ")+y("^",I-H);if("undefined"!==typeof process&&null!==process)var x=(null!=(a=process.stdout)?
a.isTTY:void 0)&&!(null!=(b=process.env)&&b.NODE_DISABLE_COLORS);if(null!=(f=this.colorful)?f:x)x=function(a){return"\u001b[1;31m"+a+"\u001b[0m"},n=n.slice(0,H)+x(n.slice(H,I))+n.slice(I),F=x(F);return u+":"+(B+1)+":"+(H+1)+": error: "+this.message+"\n"+n+"\n"+F};f.nameWhitespaceCharacter=function(a){switch(a){case " ":return"space";case "\n":return"newline";case "\r":return"carriage return";case "\t":return"tab";default:return a}}}).call(this);return f}();u["./rewriter"]=function(){var f={};(function(){var u,
q,y=[].indexOf||function(a){for(var c=0,b=this.length;c<b;c++)if(c in this&&this[c]===a)return c;return-1},a=[].slice;var b=function(a,c,b){a=[a,c];a.generated=!0;b&&(a.origin=b);return a};f.Rewriter=function(){function l(){}l.prototype.rewrite=function(a){this.tokens=a;this.removeLeadingNewlines();this.closeOpenCalls();this.closeOpenIndexes();this.normalizeLines();this.tagPostfixConditionals();this.addImplicitBracesAndParens();this.addLocationDataToGeneratedTokens();this.fixOutdentLocationData();
return this.tokens};l.prototype.scanTokens=function(a){var c,b;var k=this.tokens;for(c=0;b=k[c];)c+=a.call(this,b,c,k);return!0};l.prototype.detectEnd=function(a,b,m){var c,w,l,L;var f=this.tokens;for(c=0;L=f[a];){if(0===c&&b.call(this,L,a))return m.call(this,L,a);if(!L||0>c)return m.call(this,L,a-1);(w=L[0],0<=y.call(g,w))?c+=1:(l=L[0],0<=y.call(h,l))&&--c;a+=1}return a-1};l.prototype.removeLeadingNewlines=function(){var a,b;var m=this.tokens;var k=a=0;for(b=m.length;a<b;k=++a){var g=m[k][0];if("TERMINATOR"!==
g)break}if(k)return this.tokens.splice(0,k)};l.prototype.closeOpenCalls=function(){var a=function(a,c){var k;return")"===(k=a[0])||"CALL_END"===k||"OUTDENT"===a[0]&&")"===this.tag(c-1)};var b=function(a,c){return this.tokens["OUTDENT"===a[0]?c-1:c][0]="CALL_END"};return this.scanTokens(function(c,k){"CALL_START"===c[0]&&this.detectEnd(k+1,a,b);return 1})};l.prototype.closeOpenIndexes=function(){var a=function(a,c){var k;return"]"===(k=a[0])||"INDEX_END"===k};var b=function(a,c){return a[0]="INDEX_END"};
return this.scanTokens(function(c,k){"INDEX_START"===c[0]&&this.detectEnd(k+1,a,b);return 1})};l.prototype.indexOfTag=function(){var c,b,g,k;var l=arguments[0];var h=2<=arguments.length?a.call(arguments,1):[];var f=b=c=0;for(g=h.length;0<=g?b<g:b>g;f=0<=g?++b:--b){for(;"HERECOMMENT"===this.tag(l+f+c);)c+=2;if(null!=h[f]&&("string"===typeof h[f]&&(h[f]=[h[f]]),k=this.tag(l+f+c),0>y.call(h[f],k)))return-1}return l+f+c-1};l.prototype.looksObjectish=function(a){if(-1<this.indexOfTag(a,"@",null,":")||
-1<this.indexOfTag(a,null,":"))return!0;a=this.indexOfTag(a,g);if(-1<a){var c=null;this.detectEnd(a+1,function(a){var c;return c=a[0],0<=y.call(h,c)},function(a,b){return c=b});if(":"===this.tag(c+1))return!0}return!1};l.prototype.findTagsBackwards=function(a,b){var c,k,l,w,f,n,x;for(c=[];0<=a&&(c.length||(w=this.tag(a),0>y.call(b,w))&&((f=this.tag(a),0>y.call(g,f))||this.tokens[a].generated)&&(n=this.tag(a),0>y.call(R,n)));)(k=this.tag(a),0<=y.call(h,k))&&c.push(this.tag(a)),(l=this.tag(a),0<=y.call(g,
l))&&c.length&&c.pop(),--a;return x=this.tag(a),0<=y.call(b,x)};l.prototype.addImplicitBracesAndParens=function(){var a=[];var l=null;return this.scanTokens(function(c,k,f){var m,w,n,r;var G=c[0];var K=(m=0<k?f[k-1]:[])[0];var u=(k<f.length-1?f[k+1]:[])[0];var B=function(){return a[a.length-1]};var D=k;var A=function(a){return k-D+a};var H=function(a){var b;return null!=a?null!=(b=a[2])?b.ours:void 0:void 0};var E=function(a){return H(a)&&"{"===(null!=a?a[0]:void 0)};var J=function(a){return H(a)&&
"("===(null!=a?a[0]:void 0)};var O=function(){return H(B())};var C=function(){return J(B())};var T=function(){return E(B())};var v=function(){var a;return O&&"CONTROL"===(null!=(a=B())?a[0]:void 0)};var Y=function(c){var g=null!=c?c:k;a.push(["(",g,{ours:!0}]);f.splice(g,0,b("CALL_START","("));if(null==c)return k+=1};var S=function(){a.pop();f.splice(k,0,b("CALL_END",")",["","end of input",c[2]]));return k+=1};var M=function(g,l){null==l&&(l=!0);var m=null!=g?g:k;a.push(["{",m,{sameLine:!0,startsLine:l,
ours:!0}]);l=new String("{");l.generated=!0;f.splice(m,0,b("{",l,c));if(null==g)return k+=1};var q=function(g){g=null!=g?g:k;a.pop();f.splice(g,0,b("}","}",c));return k+=1};if(C()&&("IF"===G||"TRY"===G||"FINALLY"===G||"CATCH"===G||"CLASS"===G||"SWITCH"===G))return a.push(["CONTROL",k,{ours:!0}]),A(1);if("INDENT"===G&&O()){if("\x3d\x3e"!==K&&"-\x3e"!==K&&"["!==K&&"("!==K&&","!==K&&"{"!==K&&"TRY"!==K&&"ELSE"!==K&&"\x3d"!==K)for(;C();)S();v()&&a.pop();a.push([G,k]);return A(1)}if(0<=y.call(g,G))return a.push([G,
k]),A(1);if(0<=y.call(h,G)){for(;O();)C()?S():T()?q():a.pop();l=a.pop()}if((0<=y.call(I,G)&&c.spaced||"?"===G&&0<k&&!f[k-1].spaced)&&(0<=y.call(F,u)||0<=y.call(Q,u)&&(null==(w=f[k+1])||!w.spaced)&&(null==(n=f[k+1])||!n.newLine)))return"?"===G&&(G=c[0]="FUNC_EXIST"),Y(k+1),A(2);if(0<=y.call(I,G)&&-1<this.indexOfTag(k+1,"INDENT")&&this.looksObjectish(k+2)&&!this.findTagsBackwards(k,"CLASS EXTENDS IF CATCH SWITCH LEADING_WHEN FOR WHILE UNTIL".split(" ")))return Y(k+1),a.push(["INDENT",k+2]),A(3);if(":"===
G){for(q=function(){var a;switch(!1){case a=this.tag(k-1),0>y.call(h,a):return l[1];case "@"!==this.tag(k-2):return k-2;default:return k-1}}.call(this);"HERECOMMENT"===this.tag(q-2);)q-=2;this.insideForDeclaration="FOR"===u;m=0===q||(r=this.tag(q-1),0<=y.call(R,r))||f[q-1].newLine;if(B()&&(T=B(),r=T[0],v=T[1],("{"===r||"INDENT"===r&&"{"===this.tag(v-1))&&(m||","===this.tag(q-1)||"{"===this.tag(q-1))))return A(1);M(q,!!m);return A(2)}if(0<=y.call(R,G))for(M=a.length-1;0<=M;M+=-1)r=a[M],E(r)&&(r[2].sameLine=
!1);M="OUTDENT"===K||m.newLine;if(0<=y.call(x,G)||0<=y.call(z,G)&&M)for(;O();)if(M=B(),r=M[0],v=M[1],m=M[2],M=m.sameLine,m=m.startsLine,C()&&","!==K)S();else if(T()&&!this.insideForDeclaration&&M&&"TERMINATOR"!==G&&":"!==K)q();else if(!T()||"TERMINATOR"!==G||","===K||m&&this.looksObjectish(k+1))break;else{if("HERECOMMENT"===u)return A(1);q()}if(!(","!==G||this.looksObjectish(k+1)||!T()||this.insideForDeclaration||"TERMINATOR"===u&&this.looksObjectish(k+2)))for(u="OUTDENT"===u?1:0;T();)q(k+u);return A(1)})};
l.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(a,b,g){var c,l;if(a[2]||!a.generated&&!a.explicit)return 1;if("{"===a[0]&&(c=null!=(l=g[b+1])?l[2]:void 0)){var m=c.first_line;c=c.first_column}else(c=null!=(m=g[b-1])?m[2]:void 0)?(m=c.last_line,c=c.last_column):m=c=0;a[2]={first_line:m,first_column:c,last_line:m,last_column:c};return 1})};l.prototype.fixOutdentLocationData=function(){return this.scanTokens(function(a,b,g){if(!("OUTDENT"===a[0]||a.generated&&
"CALL_END"===a[0]||a.generated&&"}"===a[0]))return 1;b=g[b-1][2];a[2]={first_line:b.last_line,first_column:b.last_column,last_line:b.last_line,last_column:b.last_column};return 1})};l.prototype.normalizeLines=function(){var b,g;var l=b=g=null;var k=function(a,b){var c,g,k,f;return";"!==a[1]&&(c=a[0],0<=y.call(O,c))&&!("TERMINATOR"===a[0]&&(g=this.tag(b+1),0<=y.call(H,g)))&&!("ELSE"===a[0]&&"THEN"!==l)&&!!("CATCH"!==(k=a[0])&&"FINALLY"!==k||"-\x3e"!==l&&"\x3d\x3e"!==l)||(f=a[0],0<=y.call(z,f))&&(this.tokens[b-
1].newLine||"OUTDENT"===this.tokens[b-1][0])};var f=function(a,b){return this.tokens.splice(","===this.tag(b-1)?b-1:b,0,g)};return this.scanTokens(function(c,m,h){var w,n,r;c=c[0];if("TERMINATOR"===c){if("ELSE"===this.tag(m+1)&&"OUTDENT"!==this.tag(m-1))return h.splice.apply(h,[m,1].concat(a.call(this.indentation()))),1;if(w=this.tag(m+1),0<=y.call(H,w))return h.splice(m,1),0}if("CATCH"===c)for(w=n=1;2>=n;w=++n)if("OUTDENT"===(r=this.tag(m+w))||"TERMINATOR"===r||"FINALLY"===r)return h.splice.apply(h,
[m+w,0].concat(a.call(this.indentation()))),2+w;0<=y.call(J,c)&&"INDENT"!==this.tag(m+1)&&("ELSE"!==c||"IF"!==this.tag(m+1))&&(l=c,r=this.indentation(h[m]),b=r[0],g=r[1],"THEN"===l&&(b.fromThen=!0),h.splice(m+1,0,b),this.detectEnd(m+2,k,f),"THEN"===c&&h.splice(m,1));return 1})};l.prototype.tagPostfixConditionals=function(){var a=null;var b=function(a,b){a=a[0];b=this.tokens[b-1][0];return"TERMINATOR"===a||"INDENT"===a&&0>y.call(J,b)};var g=function(b,c){if("INDENT"!==b[0]||b.generated&&!b.fromThen)return a[0]=
"POST_"+a[0]};return this.scanTokens(function(c,l){if("IF"!==c[0])return 1;a=c;this.detectEnd(l+1,b,g);return 1})};l.prototype.indentation=function(a){var b=["INDENT",2];var c=["OUTDENT",2];a?(b.generated=c.generated=!0,b.origin=c.origin=a):b.explicit=c.explicit=!0;return[b,c]};l.prototype.generate=b;l.prototype.tag=function(a){var b;return null!=(b=this.tokens[a])?b[0]:void 0};return l}();var ya=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],
["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]];f.INVERSES=u={};var g=[];var h=[];var r=0;for(q=ya.length;r<q;r++){var n=ya[r];var B=n[0];n=n[1];g.push(u[n]=B);h.push(u[B]=n)}var H=["CATCH","THEN","ELSE","FINALLY"].concat(h);var I="IDENTIFIER PROPERTY SUPER ) CALL_END ] INDEX_END @ THIS".split(" ");var F="IDENTIFIER PROPERTY NUMBER INFINITY NAN STRING STRING_START REGEX REGEX_START JS NEW PARAM_START CLASS IF TRY SWITCH THIS UNDEFINED NULL BOOL UNARY YIELD UNARY_MATH SUPER THROW @ -\x3e \x3d\x3e [ ( { -- ++".split(" ");
var Q=["+","-"];var x="POST_IF FOR WHILE UNTIL WHEN BY LOOP TERMINATOR".split(" ");var J="ELSE -\x3e \x3d\x3e TRY FINALLY THEN".split(" ");var O="TERMINATOR CATCH FINALLY ELSE OUTDENT LEADING_WHEN".split(" ");var R=["TERMINATOR","INDENT","OUTDENT"];var z=[".","?.","::","?::"]}).call(this);return f}();u["./lexer"]=function(){var f={};(function(){var qa,q=[].indexOf||function(a){for(var N=0,b=this.length;N<b;N++)if(N in this&&this[N]===a)return N;return-1},y=[].slice;var a=u("./rewriter");var b=a.Rewriter;
var ya=a.INVERSES;a=u("./helpers");var g=a.count;var h=a.repeat;var r=a.invertLiterate;var n=a.throwSyntaxError;f.Lexer=function(){function a(){}a.prototype.tokenize=function(a,c){var N,g;null==c&&(c={});this.literate=c.literate;this.outdebt=this.indebt=this.baseIndent=this.indent=0;this.indents=[];this.ends=[];this.tokens=[];this.exportSpecifierList=this.importSpecifierList=this.seenExport=this.seenImport=this.seenFor=!1;this.chunkLine=c.line||0;this.chunkColumn=c.column||0;a=this.clean(a);for(g=
0;this.chunk=a.slice(g);){var l=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken();var k=this.getLineAndColumnFromChunk(l);this.chunkLine=k[0];this.chunkColumn=k[1];g+=l;if(c.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:g}}this.closeIndentation();(N=this.ends.pop())&&this.error("missing "+N.tag,N.origin[2]);return!1===c.rewrite?this.tokens:(new b).rewrite(this.tokens)};
a.prototype.clean=function(a){a.charCodeAt(0)===R&&(a=a.slice(1));a=a.replace(/\r/g,"").replace(Z,"");w.test(a)&&(a="\n"+a,this.chunkLine--);this.literate&&(a=r(a));return a};a.prototype.identifierToken=function(){var a,b,c,g,l,k,m;if(!(a=z.exec(this.chunk)))return 0;var f=a[0];var h=a[1];a=a[2];var y=h.length;var w=void 0;if("own"===h&&"FOR"===this.tag())return this.token("OWN",h),h.length;if("from"===h&&"YIELD"===this.tag())return this.token("FROM",h),h.length;if("as"===h&&this.seenImport){if("*"===
this.value())this.tokens[this.tokens.length-1][0]="IMPORT_ALL";else if(b=this.value(),0<=q.call(F,b))this.tokens[this.tokens.length-1][0]="IDENTIFIER";if("DEFAULT"===(c=this.tag())||"IMPORT_ALL"===c||"IDENTIFIER"===c)return this.token("AS",h),h.length}if("as"===h&&this.seenExport&&("IDENTIFIER"===(g=this.tag())||"DEFAULT"===g))return this.token("AS",h),h.length;if("default"===h&&this.seenExport&&("EXPORT"===(l=this.tag())||"AS"===l))return this.token("DEFAULT",h),h.length;b=this.tokens;b=b[b.length-
1];var n=a||null!=b&&("."===(k=b[0])||"?."===k||"::"===k||"?::"===k||!b.spaced&&"@"===b[0])?"PROPERTY":"IDENTIFIER";"IDENTIFIER"!==n||!(0<=q.call(I,h)||0<=q.call(F,h))||this.exportSpecifierList&&0<=q.call(F,h)?"IDENTIFIER"===n&&this.seenFor&&"from"===h&&H(b)&&(n="FORFROM",this.seenFor=!1):(n=h.toUpperCase(),"WHEN"===n&&(m=this.tag(),0<=q.call(ra,m))?n="LEADING_WHEN":"FOR"===n?this.seenFor=!0:"UNLESS"===n?n="IF":"IMPORT"===n?this.seenImport=!0:"EXPORT"===n?this.seenExport=!0:0<=q.call(ia,n)?n="UNARY":
0<=q.call(pa,n)&&("INSTANCEOF"!==n&&this.seenFor?(n="FOR"+n,this.seenFor=!1):(n="RELATION","!"===this.value()&&(w=this.tokens.pop(),h="!"+h))));"IDENTIFIER"===n&&0<=q.call(J,h)&&this.error("reserved word '"+h+"'",{length:h.length});if("PROPERTY"!==n){if(0<=q.call(x,h)){var r=h;h=Q[h]}n=function(){switch(h){case "!":return"UNARY";case "\x3d\x3d":case "!\x3d":return"COMPARE";case "true":case "false":return"BOOL";case "break":case "continue":case "debugger":return"STATEMENT";case "\x26\x26":case "||":return h;
default:return n}}()}k=this.token(n,h,0,y);r&&(k.origin=[n,r,k[2]]);w&&(r=[w[2].first_line,w[2].first_column],k[2].first_line=r[0],k[2].first_column=r[1]);a&&(r=f.lastIndexOf(":"),this.token(":",":",r,a.length));return f.length};a.prototype.numberToken=function(){var a,b;if(!(a=l.exec(this.chunk)))return 0;var c=a[0];a=c.length;switch(!1){case !/^0[BOX]/.test(c):this.error("radix prefix in '"+c+"' must be lowercase",{offset:1});break;case !/^(?!0x).*E/.test(c):this.error("exponential notation in '"+
c+"' must be indicated with a lowercase 'e'",{offset:c.indexOf("E")});break;case !/^0\d*[89]/.test(c):this.error("decimal literal '"+c+"' must not be prefixed with '0'",{length:a});break;case !/^0\d+/.test(c):this.error("octal literal '"+c+"' must be prefixed with '0o'",{length:a})}var g=function(){switch(c.charAt(1)){case "b":return 2;case "o":return 8;case "x":return 16;default:return null}}();g=null!=g?parseInt(c.slice(2),g):parseFloat(c);if("b"===(b=c.charAt(1))||"o"===b)c="0x"+g.toString(16);
this.token(Infinity===g?"INFINITY":"NUMBER",c,0,a);return a};a.prototype.stringToken=function(){var a,b,c,g,l;var k=(V.exec(this.chunk)||[])[0];if(!k)return 0;this.tokens.length&&"from"===this.value()&&(this.seenImport||this.seenExport)&&(this.tokens[this.tokens.length-1][0]="FROM");var h=function(){switch(k){case "'":return X;case '"':return G;case "'''":return aa;case '"""':return U}}();var m=3===k.length;h=this.matchWithInterpolations(h,k);var f=h.tokens;var n=h.index;var y=f.length-1;h=k.charAt(0);
if(m){var w=null;for(m=function(){var a,c;var N=[];b=a=0;for(c=f.length;a<c;b=++a)l=f[b],"NEOSTRING"===l[0]&&N.push(l[1]);return N}().join("#{}");a=A.exec(m);)if(a=a[1],null===w||0<(g=a.length)&&g<w.length)w=a;w&&(c=RegExp("\\n"+w,"g"));this.mergeInterpolationTokens(f,{delimiter:h},function(a){return function(b,N){b=a.formatString(b,{delimiter:k});c&&(b=b.replace(c,"\n"));0===N&&(b=b.replace(za,""));N===y&&(b=b.replace(ma,""));return b}}(this))}else this.mergeInterpolationTokens(f,{delimiter:h},function(a){return function(b,
N){b=a.formatString(b,{delimiter:k});return b=b.replace(D,function(a,p){return 0===N&&0===p||N===y&&p+a.length===b.length?"":" "})}}(this));return n};a.prototype.commentToken=function(){var a,b;if(!(b=this.chunk.match(m)))return 0;var c=b[0];if(a=b[1])(b=Y.exec(c))&&this.error("block comments cannot contain "+b[0],{offset:b.index,length:b[0].length}),0<=a.indexOf("\n")&&(a=a.replace(RegExp("\\n"+h(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",a,0,c.length);return c.length};a.prototype.jsToken=
function(){var a;if("`"!==this.chunk.charAt(0)||!(a=L.exec(this.chunk)||P.exec(this.chunk)))return 0;var b=a[1].replace(/\\+(`|$)/g,function(a){return a.slice(-Math.ceil(a.length/2))});this.token("JS",b,0,a[0].length);return a[0].length};a.prototype.regexToken=function(){var a,b,c;switch(!1){case !(a=T.exec(this.chunk)):this.error("regular expressions cannot begin with "+a[2],{offset:a.index+a[1].length});break;case !(a=this.matchWithInterpolations(ca,"///")):var g=a.tokens;var k=a.index;break;case !(a=
fc.exec(this.chunk)):var l=a[0];var h=a[1];a=a[2];this.validateEscapes(h,{isRegex:!0,offsetInChunk:1});h=this.formatRegex(h,{delimiter:"/"});k=l.length;var m=this.tokens;if(m=m[m.length-1])if(m.spaced&&(b=m[0],0<=q.call(ha,b))){if(!a||v.test(l))return 0}else if(c=m[0],0<=q.call(na,c))return 0;a||this.error("missing / (unclosed regex)");break;default:return 0}c=E.exec(this.chunk.slice(k))[0];b=k+c.length;a=this.makeToken("REGEX",null,0,b);switch(!1){case !!ba.test(c):this.error("invalid regular expression flags "+
c,{offset:k,length:c.length});break;case !(l||1===g.length):null==h&&(h=this.formatHeregex(g[0][1]));this.token("REGEX",""+this.makeDelimitedLiteral(h,{delimiter:"/"})+c,0,b,a);break;default:this.token("REGEX_START","(",0,0,a),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(g,{delimiter:'"',double:!0},this.formatHeregex),c&&(this.token(",",",",k-1,0),this.token("STRING",'"'+c+'"',k-1,c.length)),this.token(")",")",b-1,0),this.token("REGEX_END",")",
b-1,0)}return b};a.prototype.lineToken=function(){var a;if(!(a=K.exec(this.chunk)))return 0;a=a[0];this.seenFor=!1;this.importSpecifierList||(this.seenImport=!1);this.exportSpecifierList||(this.seenExport=!1);var b=a.length-1-a.lastIndexOf("\n");var c=this.unfinished();if(b-this.indebt===this.indent)return c?this.suppressNewlines():this.newlineToken(0),a.length;if(b>this.indent){if(c||"RETURN"===this.tag())return this.indebt=b-this.indent,this.suppressNewlines(),a.length;if(!this.tokens.length)return this.baseIndent=
this.indent=b,a.length;c=b-this.indent+this.outdebt;this.token("INDENT",c,a.length-b,b);this.indents.push(c);this.ends.push({tag:"OUTDENT"});this.outdebt=this.indebt=0;this.indent=b}else b<this.baseIndent?this.error("missing indentation",{offset:a.length}):(this.indebt=0,this.outdentToken(this.indent-b,c,a.length));return a.length};a.prototype.outdentToken=function(a,b,c){var g,N,k;for(g=this.indent-a;0<a;)if(N=this.indents[this.indents.length-1])if(N===this.outdebt)a-=this.outdebt,this.outdebt=0;
else if(N<this.outdebt)this.outdebt-=N,a-=N;else{var h=this.indents.pop()+this.outdebt;c&&(k=this.chunk[c],0<=q.call(da,k))&&(g-=h-a,a=h);this.outdebt=0;this.pair("OUTDENT");this.token("OUTDENT",a,0,c);a-=h}else a=0;h&&(this.outdebt-=a);for(;";"===this.value();)this.tokens.pop();"TERMINATOR"===this.tag()||b||this.token("TERMINATOR","\n",c,0);this.indent=g;return this};a.prototype.whitespaceToken=function(){var a;if(!(a=w.exec(this.chunk))&&"\n"!==this.chunk.charAt(0))return 0;var b=this.tokens;(b=
b[b.length-1])&&(b[a?"spaced":"newLine"]=!0);return a?a[0].length:0};a.prototype.newlineToken=function(a){for(;";"===this.value();)this.tokens.pop();"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",a,0);return this};a.prototype.suppressNewlines=function(){"\\"===this.value()&&this.tokens.pop();return this};a.prototype.literalToken=function(){var a,b,g,h,l;(a=c.exec(this.chunk))?(a=a[0],k.test(a)&&this.tagParameters()):a=this.chunk.charAt(0);var m=a;var f=this.tokens;if((f=f[f.length-1])&&0<=
q.call(["\x3d"].concat(y.call(fa)),a)){var n=!1;"\x3d"!==a||"||"!==(g=f[1])&&"\x26\x26"!==g||f.spaced||(f[0]="COMPOUND_ASSIGN",f[1]+="\x3d",f=this.tokens[this.tokens.length-2],n=!0);f&&"PROPERTY"!==f[0]&&(g=null!=(b=f.origin)?b:f,(b=B(f[1],g[1]))&&this.error(b,g[2]));if(n)return a.length}"{"===a&&this.seenImport?this.importSpecifierList=!0:this.importSpecifierList&&"}"===a?this.importSpecifierList=!1:"{"===a&&"EXPORT"===(null!=f?f[0]:void 0)?this.exportSpecifierList=!0:this.exportSpecifierList&&"}"===
a&&(this.exportSpecifierList=!1);if(";"===a)this.seenFor=this.seenImport=this.seenExport=!1,m="TERMINATOR";else if("*"===a&&"EXPORT"===f[0])m="EXPORT_ALL";else if(0<=q.call(oa,a))m="MATH";else if(0<=q.call(la,a))m="COMPARE";else if(0<=q.call(fa,a))m="COMPOUND_ASSIGN";else if(0<=q.call(ia,a))m="UNARY";else if(0<=q.call(ga,a))m="UNARY_MATH";else if(0<=q.call(ja,a))m="SHIFT";else if("?"===a&&null!=f&&f.spaced)m="BIN?";else if(f&&!f.spaced)if("("===a&&(h=f[0],0<=q.call(ha,h)))"?"===f[0]&&(f[0]="FUNC_EXIST"),
m="CALL_START";else if("["===a&&(l=f[0],0<=q.call(ka,l)))switch(m="INDEX_START",f[0]){case "?":f[0]="INDEX_SOAK"}h=this.makeToken(m,a);switch(a){case "(":case "{":case "[":this.ends.push({tag:ya[a],origin:h});break;case ")":case "}":case "]":this.pair(a)}this.tokens.push(h);return a.length};a.prototype.tagParameters=function(){var a;if(")"!==this.tag())return this;var b=[];var c=this.tokens;var g=c.length;for(c[--g][0]="PARAM_END";a=c[--g];)switch(a[0]){case ")":b.push(a);break;case "(":case "CALL_START":if(b.length)b.pop();
else return"("===a[0]&&(a[0]="PARAM_START"),this}return this};a.prototype.closeIndentation=function(){return this.outdentToken(this.indent)};a.prototype.matchWithInterpolations=function(b,c){var g,h;var k=[];var l=c.length;if(this.chunk.slice(0,l)!==c)return null;for(h=this.chunk.slice(l);;){var f=b.exec(h)[0];this.validateEscapes(f,{isRegex:"/"===c.charAt(0),offsetInChunk:l});k.push(this.makeToken("NEOSTRING",f,l));h=h.slice(f.length);l+=f.length;if("#{"!==h.slice(0,2))break;var m=this.getLineAndColumnFromChunk(l+
1);f=m[0];m=m[1];m=(new a).tokenize(h.slice(1),{line:f,column:m,untilBalanced:!0});f=m.tokens;var N=m.index;N+=1;var n=f[0];m=f[f.length-1];n[0]=n[1]="(";m[0]=m[1]=")";m.origin=["","end of interpolation",m[2]];"TERMINATOR"===(null!=(g=f[1])?g[0]:void 0)&&f.splice(1,1);k.push(["TOKENS",f]);h=h.slice(N);l+=N}h.slice(0,c.length)!==c&&this.error("missing "+c,{length:c.length});b=k[0];g=k[k.length-1];b[2].first_column-=c.length;"\n"===g[1].substr(-1)?(g[2].last_line+=1,g[2].last_column=c.length-1):g[2].last_column+=
c.length;0===g[1].length&&--g[2].last_column;return{tokens:k,index:l+c.length}};a.prototype.mergeInterpolationTokens=function(a,b,c){var g,h,k,f;1<a.length&&(k=this.token("STRING_START","(",0,0));var l=this.tokens.length;var m=g=0;for(h=a.length;g<h;m=++g){var n=a[m];var N=n[0];var y=n[1];switch(N){case "TOKENS":if(2===y.length)continue;var w=y[0];var r=y;break;case "NEOSTRING":N=c.call(this,n[1],m);if(0===N.length)if(0===m)var Ha=this.tokens.length;else continue;2===m&&null!=Ha&&this.tokens.splice(Ha,
2);n[0]="STRING";n[1]=this.makeDelimitedLiteral(N,b);w=n;r=[n]}this.tokens.length>l&&(m=this.token("+","+"),m[2]={first_line:w[2].first_line,first_column:w[2].first_column,last_line:w[2].first_line,last_column:w[2].first_column});(f=this.tokens).push.apply(f,r)}if(k)return a=a[a.length-1],k.origin=["STRING",null,{first_line:k[2].first_line,first_column:k[2].first_column,last_line:a[2].last_line,last_column:a[2].last_column}],k=this.token("STRING_END",")"),k[2]={first_line:a[2].last_line,first_column:a[2].last_column,
last_line:a[2].last_line,last_column:a[2].last_column}};a.prototype.pair=function(a){var b=this.ends;b=b[b.length-1];return a!==(b=null!=b?b.tag:void 0)?("OUTDENT"!==b&&this.error("unmatched "+a),b=this.indents,b=b[b.length-1],this.outdentToken(b,!0),this.pair(a)):this.ends.pop()};a.prototype.getLineAndColumnFromChunk=function(a){if(0===a)return[this.chunkLine,this.chunkColumn];var b=a>=this.chunk.length?this.chunk:this.chunk.slice(0,+(a-1)+1||9E9);a=g(b,"\n");var c=this.chunkColumn;0<a?(c=b.split("\n"),
c=c[c.length-1],c=c.length):c+=b.length;return[this.chunkLine+a,c]};a.prototype.makeToken=function(a,b,c,g){null==c&&(c=0);null==g&&(g=b.length);var k={};var h=this.getLineAndColumnFromChunk(c);k.first_line=h[0];k.first_column=h[1];c=this.getLineAndColumnFromChunk(c+(0<g?g-1:0));k.last_line=c[0];k.last_column=c[1];return[a,b,k]};a.prototype.token=function(a,b,c,g,k){a=this.makeToken(a,b,c,g);k&&(a.origin=k);this.tokens.push(a);return a};a.prototype.tag=function(){var a=this.tokens;a=a[a.length-1];
return null!=a?a[0]:void 0};a.prototype.value=function(){var a=this.tokens;a=a[a.length-1];return null!=a?a[1]:void 0};a.prototype.unfinished=function(){var a;return S.test(this.chunk)||"\\"===(a=this.tag())||"."===a||"?."===a||"?::"===a||"UNARY"===a||"MATH"===a||"UNARY_MATH"===a||"+"===a||"-"===a||"**"===a||"SHIFT"===a||"RELATION"===a||"COMPARE"===a||"\x26"===a||"^"===a||"|"===a||"\x26\x26"===a||"||"===a||"BIN?"===a||"THROW"===a||"EXTENDS"===a||"DEFAULT"===a};a.prototype.formatString=function(a,
b){return this.replaceUnicodeCodePointEscapes(a.replace(W,"$1"),b)};a.prototype.formatHeregex=function(a){return this.formatRegex(a.replace(C,"$1$2"),{delimiter:"///"})};a.prototype.formatRegex=function(a,b){return this.replaceUnicodeCodePointEscapes(a,b)};a.prototype.unicodeCodePointToUnicodeEscapes=function(a){var b=function(a){a=a.toString(16);return"\\u"+h("0",4-a.length)+a};if(65536>a)return b(a);var c=Math.floor((a-65536)/1024)+55296;a=(a-65536)%1024+56320;return""+b(c)+b(a)};a.prototype.replaceUnicodeCodePointEscapes=
function(a,b){return a.replace(sa,function(a){return function(c,g,k,h){if(g)return g;c=parseInt(k,16);1114111<c&&a.error("unicode code point escapes greater than \\u{10ffff} are not allowed",{offset:h+b.delimiter.length,length:k.length+4});return a.unicodeCodePointToUnicodeEscapes(c)}}(this))};a.prototype.validateEscapes=function(a,b){var c,g;null==b&&(b={});if(c=(b.isRegex?va:M).exec(a)){c[0];a=c[1];var k=c[2];var h=c[3];var f=c[4];var l=c[5];h="\\"+(k||h||f||l);return this.error((k?"octal escape sequences are not allowed":
"invalid escape sequence")+" "+h,{offset:(null!=(g=b.offsetInChunk)?g:0)+c.index+a.length,length:h.length})}};a.prototype.makeDelimitedLiteral=function(a,b){null==b&&(b={});""===a&&"/"===b.delimiter&&(a="(?:)");a=a.replace(RegExp("(\\\\\\\\)|(\\\\0(?\x3d[1-7]))|\\\\?("+b.delimiter+")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)","g"),function(a,c,g,k,h,f,l,m,n){switch(!1){case !c:return b.double?c+c:c;case !g:return"\\x00";case !k:return"\\"+k;case !h:return"\\n";case !f:return"\\r";case !l:return"\\u2028";
case !m:return"\\u2029";case !n:return b.double?"\\"+n:n}});return""+b.delimiter+a+b.delimiter};a.prototype.error=function(a,b){var c,g,k,h,f;null==b&&(b={});b="first_line"in b?b:(h=this.getLineAndColumnFromChunk(null!=(k=b.offset)?k:0),g=h[0],c=h[1],h,{first_line:g,first_column:c,last_column:c+(null!=(f=b.length)?f:1)-1});return n(a,b)};return a}();var B=function(a,b){null==b&&(b=a);switch(!1){case 0>q.call(y.call(I).concat(y.call(F)),a):return"keyword '"+b+"' can't be assigned";case 0>q.call(O,
a):return"'"+b+"' can't be assigned";case 0>q.call(J,a):return"reserved word '"+b+"' can't be assigned";default:return!1}};f.isUnassignable=B;var H=function(a){var b;return"IDENTIFIER"===a[0]?("from"===a[1]&&(a[1][0]="IDENTIFIER",!0),!0):"FOR"===a[0]?!1:"{"===(b=a[1])||"["===b||","===b||":"===b?!1:!0};var I="true false null this new delete typeof in instanceof return throw break continue debugger yield if else switch for while do try catch finally class extends super import export default".split(" ");
var F="undefined Infinity NaN then unless until loop of by when".split(" ");var Q={and:"\x26\x26",or:"||",is:"\x3d\x3d",isnt:"!\x3d",not:"!",yes:"true",no:"false",on:"true",off:"false"};var x=function(){var a=[];for(qa in Q)a.push(qa);return a}();F=F.concat(x);var J="case function var void with const let enum native implements interface package private protected public static".split(" ");var O=["arguments","eval"];f.JS_FORBIDDEN=I.concat(J).concat(O);var R=65279;var z=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/;
var l=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;var c=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/;var w=/^[^\n\S]+/;var m=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;var k=/^[-=]>/;var K=/^(?:\n[^\n\S]*)+/;var P=/^`(?!``)((?:[^`\\]|\\[\s\S])*)`/;var L=/^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/;var V=/^(?:'''|"""|'|")/;var X=/^(?:[^\\']|\\[\s\S])*/;var G=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/;var aa=/^(?:[^\\']|\\[\s\S]|'(?!''))*/;
var U=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/;var W=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g;var D=/\s*\n\s*/g;var A=/\n+([^\n\S]*)(?=\S)/g;var fc=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;var E=/^\w*/;var ba=/^(?!.*(.).*\1)[imguy]*$/;var ca=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/;var C=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g;var T=/^(\/|\/{3}\s*)(\*)/;var v=/^\/=?\s/;var Y=/\*\//;var S=/^\s*(?:,|\??\.(?![.\d])|::)/;var M=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u\{(?![\da-fA-F]{1,}\})[^}]*\}?)|(u(?!\{|[\da-fA-F]{4}).{0,4}))/;
var va=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7])|(x(?![\da-fA-F]{2}).{0,2})|(u\{(?![\da-fA-F]{1,}\})[^}]*\}?)|(u(?!\{|[\da-fA-F]{4}).{0,4}))/;var sa=/(\\\\)|\\u\{([\da-fA-F]+)\}/g;var za=/^[^\n\S]*\n/;var ma=/\n[^\n\S]*$/;var Z=/\s+$/;var fa="-\x3d +\x3d /\x3d *\x3d %\x3d ||\x3d \x26\x26\x3d ?\x3d \x3c\x3c\x3d \x3e\x3e\x3d \x3e\x3e\x3e\x3d \x26\x3d ^\x3d |\x3d **\x3d //\x3d %%\x3d".split(" ");var ia=["NEW","TYPEOF","DELETE","DO"];var ga=["!","~"];var ja=["\x3c\x3c","\x3e\x3e","\x3e\x3e\x3e"];var la="\x3d\x3d !\x3d \x3c \x3e \x3c\x3d \x3e\x3d".split(" ");
var oa=["*","/","%","//","%%"];var pa=["IN","OF","INSTANCEOF"];var ha="IDENTIFIER PROPERTY ) ] ? @ THIS SUPER".split(" ");var ka=ha.concat("NUMBER INFINITY NAN STRING STRING_END REGEX REGEX_END BOOL NULL UNDEFINED } ::".split(" "));var na=ka.concat(["++","--"]);var ra=["INDENT","OUTDENT","TERMINATOR"];var da=[")","}","]"]}).call(this);return f}();u["./parser"]=function(){var f={},qa={exports:f},q=function(){function f(){this.yy={}}var a=function(a,p,t,d){t=t||{};for(d=a.length;d--;t[a[d]]=p);return t},
b=[1,22],u=[1,25],g=[1,83],h=[1,79],r=[1,84],n=[1,85],B=[1,81],H=[1,82],I=[1,56],F=[1,58],Q=[1,59],x=[1,60],J=[1,61],O=[1,62],R=[1,49],z=[1,50],l=[1,32],c=[1,68],w=[1,69],m=[1,78],k=[1,47],K=[1,51],P=[1,52],L=[1,67],V=[1,65],X=[1,66],G=[1,64],aa=[1,42],U=[1,48],W=[1,63],D=[1,73],A=[1,74],q=[1,75],E=[1,76],ba=[1,46],ca=[1,72],C=[1,34],T=[1,35],v=[1,36],Y=[1,37],S=[1,38],M=[1,39],qa=[1,86],sa=[1,6,32,42,131],za=[1,101],ma=[1,89],Z=[1,88],fa=[1,87],ia=[1,90],ga=[1,91],ja=[1,92],la=[1,93],oa=[1,94],pa=
[1,95],ha=[1,96],ka=[1,97],na=[1,98],ra=[1,99],da=[1,100],va=[1,104],N=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],xa=[2,166],ta=[1,110],Na=[1,111],Fa=[1,112],Ga=[1,113],Ca=[1,115],Pa=[1,116],Ia=[1,109],Ea=[1,6,32,42,131,133,135,139,156],Va=[2,27],ea=[1,123],Ya=[1,121],Ba=[1,6,31,32,40,41,42,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,
173,174],Ha=[2,94],t=[1,6,31,32,42,46,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],p=[2,73],d=[1,128],wa=[1,133],e=[1,134],Da=[1,136],Ta=[1,6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],ua=[2,91],Eb=[1,6,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,
169,170,171,172,173,174],Za=[2,63],Fb=[1,166],$a=[1,178],Ua=[1,180],Gb=[1,175],Oa=[1,182],sb=[1,184],La=[1,6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,96,113,114,115,120,122,131,133,134,135,139,140,156,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],Hb=[2,110],Ib=[1,6,31,32,40,41,42,58,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Jb=[1,6,31,32,40,41,42,46,58,65,70,73,82,83,84,
85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],Kb=[40,41,114],Lb=[1,241],tb=[1,240],Ma=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156],Ja=[2,71],Mb=[1,250],Sa=[6,31,32,65,70],fb=[6,31,32,55,65,70,73],ab=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,164,166,167,168,169,170,171,172,173,174],Nb=[40,41,82,83,84,85,87,90,113,114],gb=[1,269],bb=[2,62],hb=[1,279],Wa=[1,281],ub=[1,
286],cb=[1,288],Ob=[2,187],vb=[1,6,31,32,40,41,42,55,65,70,73,82,83,84,85,87,89,90,94,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],ib=[1,297],Qa=[6,31,32,70,115,120],Pb=[1,6,31,32,40,41,42,55,58,65,70,73,82,83,84,85,87,89,90,94,96,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],Qb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,140,156],Xa=[1,6,31,32,
42,65,70,73,89,94,115,120,122,131,134,140,156],jb=[146,147,148],kb=[70,146,147,148],lb=[6,31,94],Rb=[1,311],Aa=[6,31,32,70,94],Sb=[6,31,32,58,70,94],wb=[6,31,32,55,58,70,94],Tb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,159,160,166,167,168,169,170,171,172,173,174],Ub=[12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,62,63,67,68,89,92,95,97,105,112,117,118,119,125,129,130,133,135,137,139,149,155,157,158,159,160,161,162],Vb=[2,176],Ra=[6,31,32],db=[2,72],Wb=[1,323],Xb=[1,324],
Yb=[1,6,31,32,42,65,70,73,89,94,115,120,122,127,128,131,133,134,135,139,140,151,153,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],mb=[32,151,153],Zb=[1,6,32,42,65,70,73,89,94,115,120,122,131,134,140,156],nb=[1,350],xb=[1,356],yb=[1,6,32,42,131,156],eb=[2,86],ob=[1,367],pb=[1,368],$b=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,151,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],zb=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,140,156],ac=
[1,381],bc=[1,382],Ab=[6,31,32,94],cc=[6,31,32,70],Bb=[1,6,31,32,42,65,70,73,89,94,115,120,122,127,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],dc=[31,70],qb=[1,408],rb=[1,409],Cb=[1,415],Db=[1,416],ec={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,YieldReturn:9,Return:10,Comment:11,STATEMENT:12,Import:13,Export:14,Value:15,Invocation:16,Code:17,Operation:18,Assign:19,If:20,Try:21,While:22,For:23,Switch:24,
Class:25,Throw:26,Yield:27,YIELD:28,FROM:29,Block:30,INDENT:31,OUTDENT:32,Identifier:33,IDENTIFIER:34,Property:35,PROPERTY:36,AlphaNumeric:37,NUMBER:38,String:39,STRING:40,STRING_START:41,STRING_END:42,Regex:43,REGEX:44,REGEX_START:45,REGEX_END:46,Literal:47,JS:48,UNDEFINED:49,NULL:50,BOOL:51,INFINITY:52,NAN:53,Assignable:54,"\x3d":55,AssignObj:56,ObjAssignable:57,":":58,SimpleObjAssignable:59,ThisProperty:60,RETURN:61,HERECOMMENT:62,PARAM_START:63,ParamList:64,PARAM_END:65,FuncGlyph:66,"-\x3e":67,
"\x3d\x3e":68,OptComma:69,",":70,Param:71,ParamVar:72,"...":73,Array:74,Object:75,Splat:76,SimpleAssignable:77,Accessor:78,Parenthetical:79,Range:80,This:81,".":82,"?.":83,"::":84,"?::":85,Index:86,INDEX_START:87,IndexValue:88,INDEX_END:89,INDEX_SOAK:90,Slice:91,"{":92,AssignList:93,"}":94,CLASS:95,EXTENDS:96,IMPORT:97,ImportDefaultSpecifier:98,ImportNamespaceSpecifier:99,ImportSpecifierList:100,ImportSpecifier:101,AS:102,DEFAULT:103,IMPORT_ALL:104,EXPORT:105,ExportSpecifierList:106,EXPORT_ALL:107,
ExportSpecifier:108,OptFuncExist:109,Arguments:110,Super:111,SUPER:112,FUNC_EXIST:113,CALL_START:114,CALL_END:115,ArgList:116,THIS:117,"@":118,"[":119,"]":120,RangeDots:121,"..":122,Arg:123,SimpleArgs:124,TRY:125,Catch:126,FINALLY:127,CATCH:128,THROW:129,"(":130,")":131,WhileSource:132,WHILE:133,WHEN:134,UNTIL:135,Loop:136,LOOP:137,ForBody:138,FOR:139,BY:140,ForStart:141,ForSource:142,ForVariables:143,OWN:144,ForValue:145,FORIN:146,FOROF:147,FORFROM:148,SWITCH:149,Whens:150,ELSE:151,When:152,LEADING_WHEN:153,
IfBlock:154,IF:155,POST_IF:156,UNARY:157,UNARY_MATH:158,"-":159,"+":160,"--":161,"++":162,"?":163,MATH:164,"**":165,SHIFT:166,COMPARE:167,"\x26":168,"^":169,"|":170,"\x26\x26":171,"||":172,"BIN?":173,RELATION:174,COMPOUND_ASSIGN:175,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",12:"STATEMENT",28:"YIELD",29:"FROM",31:"INDENT",32:"OUTDENT",34:"IDENTIFIER",36:"PROPERTY",38:"NUMBER",40:"STRING",41:"STRING_START",42:"STRING_END",44:"REGEX",45:"REGEX_START",46:"REGEX_END",48:"JS",49:"UNDEFINED",
50:"NULL",51:"BOOL",52:"INFINITY",53:"NAN",55:"\x3d",58:":",61:"RETURN",62:"HERECOMMENT",63:"PARAM_START",65:"PARAM_END",67:"-\x3e",68:"\x3d\x3e",70:",",73:"...",82:".",83:"?.",84:"::",85:"?::",87:"INDEX_START",89:"INDEX_END",90:"INDEX_SOAK",92:"{",94:"}",95:"CLASS",96:"EXTENDS",97:"IMPORT",102:"AS",103:"DEFAULT",104:"IMPORT_ALL",105:"EXPORT",107:"EXPORT_ALL",112:"SUPER",113:"FUNC_EXIST",114:"CALL_START",115:"CALL_END",117:"THIS",118:"@",119:"[",120:"]",122:"..",125:"TRY",127:"FINALLY",128:"CATCH",
129:"THROW",130:"(",131:")",133:"WHILE",134:"WHEN",135:"UNTIL",137:"LOOP",139:"FOR",140:"BY",144:"OWN",146:"FORIN",147:"FOROF",148:"FORFROM",149:"SWITCH",151:"ELSE",153:"LEADING_WHEN",155:"IF",156:"POST_IF",157:"UNARY",158:"UNARY_MATH",159:"-",160:"+",161:"--",162:"++",163:"?",164:"MATH",165:"**",166:"SHIFT",167:"COMPARE",168:"\x26",169:"^",170:"|",171:"\x26\x26",172:"||",173:"BIN?",174:"RELATION",175:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[5,1],[8,1],[8,1],[8,
1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[27,1],[27,2],[27,3],[30,2],[30,3],[33,1],[35,1],[37,1],[37,1],[39,1],[39,3],[43,1],[43,3],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[19,3],[19,4],[19,5],[56,1],[56,3],[56,5],[56,3],[56,5],[56,1],[59,1],[59,1],[59,1],[57,1],[57,1],[10,2],[10,1],[9,3],[9,2],[11,1],[17,5],[17,2],[66,1],[66,1],[69,0],[69,1],[64,0],[64,1],[64,3],[64,4],[64,6],[71,1],[71,2],[71,3],[71,1],[72,1],[72,1],[72,1],[72,
1],[76,2],[77,1],[77,2],[77,2],[77,1],[54,1],[54,1],[54,1],[15,1],[15,1],[15,1],[15,1],[15,1],[78,2],[78,2],[78,2],[78,2],[78,1],[78,1],[86,3],[86,2],[88,1],[88,1],[75,4],[93,0],[93,1],[93,3],[93,4],[93,6],[25,1],[25,2],[25,3],[25,4],[25,2],[25,3],[25,4],[25,5],[13,2],[13,4],[13,4],[13,5],[13,7],[13,6],[13,9],[100,1],[100,3],[100,4],[100,4],[100,6],[101,1],[101,3],[101,1],[101,3],[98,1],[99,3],[14,3],[14,5],[14,2],[14,4],[14,5],[14,6],[14,3],[14,4],[14,7],[106,1],[106,3],[106,4],[106,4],[106,6],[108,
1],[108,3],[108,3],[108,1],[108,3],[16,3],[16,3],[16,3],[16,1],[111,1],[111,2],[109,0],[109,1],[110,2],[110,4],[81,1],[81,1],[60,2],[74,2],[74,4],[121,1],[121,1],[80,5],[91,3],[91,2],[91,2],[91,1],[116,1],[116,3],[116,4],[116,4],[116,6],[123,1],[123,1],[123,1],[124,1],[124,3],[21,2],[21,3],[21,4],[21,5],[126,3],[126,3],[126,2],[26,2],[79,3],[79,5],[132,2],[132,4],[132,2],[132,4],[22,2],[22,2],[22,2],[22,1],[136,2],[136,2],[23,2],[23,2],[23,2],[138,2],[138,4],[138,2],[141,2],[141,3],[145,1],[145,1],
[145,1],[145,1],[143,1],[143,3],[142,2],[142,2],[142,4],[142,4],[142,4],[142,6],[142,6],[142,2],[142,4],[24,5],[24,7],[24,4],[24,6],[150,1],[150,2],[152,3],[152,4],[154,3],[154,5],[20,1],[20,3],[20,3],[20,3],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,2],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,3],[18,5],[18,4],[18,3]],performAction:function(a,p,t,d,wa,b,e){a=b.length-1;switch(wa){case 1:return this.$=d.addLocationDataFn(e[a],e[a])(new d.Block);
case 2:return this.$=b[a];case 3:this.$=d.addLocationDataFn(e[a],e[a])(d.Block.wrap([b[a]]));break;case 4:this.$=d.addLocationDataFn(e[a-2],e[a])(b[a-2].push(b[a]));break;case 5:this.$=b[a-1];break;case 6:case 7:case 8:case 9:case 10:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 35:case 40:case 42:case 56:case 57:case 58:case 59:case 60:case 61:case 71:case 72:case 82:case 83:case 84:case 85:case 90:case 91:case 94:case 98:case 104:case 163:case 187:case 188:case 190:case 220:case 221:case 239:case 245:this.$=
b[a];break;case 11:this.$=d.addLocationDataFn(e[a],e[a])(new d.StatementLiteral(b[a]));break;case 27:this.$=d.addLocationDataFn(e[a],e[a])(new d.Op(b[a],new d.Value(new d.Literal(""))));break;case 28:case 249:case 250:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Op(b[a-1],b[a]));break;case 29:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Op(b[a-2].concat(b[a-1]),b[a]));break;case 30:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Block);break;case 31:case 105:this.$=d.addLocationDataFn(e[a-2],e[a])(b[a-
1]);break;case 32:this.$=d.addLocationDataFn(e[a],e[a])(new d.IdentifierLiteral(b[a]));break;case 33:this.$=d.addLocationDataFn(e[a],e[a])(new d.PropertyName(b[a]));break;case 34:this.$=d.addLocationDataFn(e[a],e[a])(new d.NumberLiteral(b[a]));break;case 36:this.$=d.addLocationDataFn(e[a],e[a])(new d.StringLiteral(b[a]));break;case 37:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.StringWithInterpolations(b[a-1]));break;case 38:this.$=d.addLocationDataFn(e[a],e[a])(new d.RegexLiteral(b[a]));break;
case 39:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.RegexWithInterpolations(b[a-1].args));break;case 41:this.$=d.addLocationDataFn(e[a],e[a])(new d.PassthroughLiteral(b[a]));break;case 43:this.$=d.addLocationDataFn(e[a],e[a])(new d.UndefinedLiteral);break;case 44:this.$=d.addLocationDataFn(e[a],e[a])(new d.NullLiteral);break;case 45:this.$=d.addLocationDataFn(e[a],e[a])(new d.BooleanLiteral(b[a]));break;case 46:this.$=d.addLocationDataFn(e[a],e[a])(new d.InfinityLiteral(b[a]));break;case 47:this.$=
d.addLocationDataFn(e[a],e[a])(new d.NaNLiteral);break;case 48:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Assign(b[a-2],b[a]));break;case 49:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.Assign(b[a-3],b[a]));break;case 50:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Assign(b[a-4],b[a-1]));break;case 51:case 87:case 92:case 93:case 95:case 96:case 97:case 222:case 223:this.$=d.addLocationDataFn(e[a],e[a])(new d.Value(b[a]));break;case 52:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Assign(d.addLocationDataFn(e[a-
2])(new d.Value(b[a-2])),b[a],"object",{operatorToken:d.addLocationDataFn(e[a-1])(new d.Literal(b[a-1]))}));break;case 53:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Assign(d.addLocationDataFn(e[a-4])(new d.Value(b[a-4])),b[a-1],"object",{operatorToken:d.addLocationDataFn(e[a-3])(new d.Literal(b[a-3]))}));break;case 54:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Assign(d.addLocationDataFn(e[a-2])(new d.Value(b[a-2])),b[a],null,{operatorToken:d.addLocationDataFn(e[a-1])(new d.Literal(b[a-1]))}));
break;case 55:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Assign(d.addLocationDataFn(e[a-4])(new d.Value(b[a-4])),b[a-1],null,{operatorToken:d.addLocationDataFn(e[a-3])(new d.Literal(b[a-3]))}));break;case 62:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Return(b[a]));break;case 63:this.$=d.addLocationDataFn(e[a],e[a])(new d.Return);break;case 64:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.YieldReturn(b[a]));break;case 65:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.YieldReturn);break;case 66:this.$=
d.addLocationDataFn(e[a],e[a])(new d.Comment(b[a]));break;case 67:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Code(b[a-3],b[a],b[a-1]));break;case 68:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Code([],b[a],b[a-1]));break;case 69:this.$=d.addLocationDataFn(e[a],e[a])("func");break;case 70:this.$=d.addLocationDataFn(e[a],e[a])("boundfunc");break;case 73:case 110:this.$=d.addLocationDataFn(e[a],e[a])([]);break;case 74:case 111:case 130:case 150:case 182:case 224:this.$=d.addLocationDataFn(e[a],
e[a])([b[a]]);break;case 75:case 112:case 131:case 151:case 183:this.$=d.addLocationDataFn(e[a-2],e[a])(b[a-2].concat(b[a]));break;case 76:case 113:case 132:case 152:case 184:this.$=d.addLocationDataFn(e[a-3],e[a])(b[a-3].concat(b[a]));break;case 77:case 114:case 134:case 154:case 186:this.$=d.addLocationDataFn(e[a-5],e[a])(b[a-5].concat(b[a-2]));break;case 78:this.$=d.addLocationDataFn(e[a],e[a])(new d.Param(b[a]));break;case 79:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Param(b[a-1],null,!0));
break;case 80:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Param(b[a-2],b[a]));break;case 81:case 189:this.$=d.addLocationDataFn(e[a],e[a])(new d.Expansion);break;case 86:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Splat(b[a-1]));break;case 88:this.$=d.addLocationDataFn(e[a-1],e[a])(b[a-1].add(b[a]));break;case 89:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Value(b[a-1],[].concat(b[a])));break;case 99:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Access(b[a]));break;case 100:this.$=d.addLocationDataFn(e[a-
1],e[a])(new d.Access(b[a],"soak"));break;case 101:this.$=d.addLocationDataFn(e[a-1],e[a])([d.addLocationDataFn(e[a-1])(new d.Access(new d.PropertyName("prototype"))),d.addLocationDataFn(e[a])(new d.Access(b[a]))]);break;case 102:this.$=d.addLocationDataFn(e[a-1],e[a])([d.addLocationDataFn(e[a-1])(new d.Access(new d.PropertyName("prototype"),"soak")),d.addLocationDataFn(e[a])(new d.Access(b[a]))]);break;case 103:this.$=d.addLocationDataFn(e[a],e[a])(new d.Access(new d.PropertyName("prototype")));
break;case 106:this.$=d.addLocationDataFn(e[a-1],e[a])(d.extend(b[a],{soak:!0}));break;case 107:this.$=d.addLocationDataFn(e[a],e[a])(new d.Index(b[a]));break;case 108:this.$=d.addLocationDataFn(e[a],e[a])(new d.Slice(b[a]));break;case 109:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.Obj(b[a-2],b[a-3].generated));break;case 115:this.$=d.addLocationDataFn(e[a],e[a])(new d.Class);break;case 116:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Class(null,null,b[a]));break;case 117:this.$=d.addLocationDataFn(e[a-
2],e[a])(new d.Class(null,b[a]));break;case 118:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.Class(null,b[a-1],b[a]));break;case 119:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Class(b[a]));break;case 120:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Class(b[a-1],null,b[a]));break;case 121:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.Class(b[a-2],b[a]));break;case 122:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Class(b[a-3],b[a-1],b[a]));break;case 123:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.ImportDeclaration(null,
b[a]));break;case 124:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.ImportDeclaration(new d.ImportClause(b[a-2],null),b[a]));break;case 125:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.ImportDeclaration(new d.ImportClause(null,b[a-2]),b[a]));break;case 126:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.ImportDeclaration(new d.ImportClause(null,new d.ImportSpecifierList([])),b[a]));break;case 127:this.$=d.addLocationDataFn(e[a-6],e[a])(new d.ImportDeclaration(new d.ImportClause(null,new d.ImportSpecifierList(b[a-
4])),b[a]));break;case 128:this.$=d.addLocationDataFn(e[a-5],e[a])(new d.ImportDeclaration(new d.ImportClause(b[a-4],b[a-2]),b[a]));break;case 129:this.$=d.addLocationDataFn(e[a-8],e[a])(new d.ImportDeclaration(new d.ImportClause(b[a-7],new d.ImportSpecifierList(b[a-4])),b[a]));break;case 133:case 153:case 169:case 185:this.$=d.addLocationDataFn(e[a-3],e[a])(b[a-2]);break;case 135:this.$=d.addLocationDataFn(e[a],e[a])(new d.ImportSpecifier(b[a]));break;case 136:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.ImportSpecifier(b[a-
2],b[a]));break;case 137:this.$=d.addLocationDataFn(e[a],e[a])(new d.ImportSpecifier(new d.Literal(b[a])));break;case 138:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.ImportSpecifier(new d.Literal(b[a-2]),b[a]));break;case 139:this.$=d.addLocationDataFn(e[a],e[a])(new d.ImportDefaultSpecifier(b[a]));break;case 140:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.ImportNamespaceSpecifier(new d.Literal(b[a-2]),b[a]));break;case 141:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList([])));
break;case 142:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList(b[a-2])));break;case 143:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.ExportNamedDeclaration(b[a]));break;case 144:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.ExportNamedDeclaration(new d.Assign(b[a-2],b[a],null,{moduleDeclaration:"export"})));break;case 145:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.ExportNamedDeclaration(new d.Assign(b[a-3],b[a],null,{moduleDeclaration:"export"})));
break;case 146:this.$=d.addLocationDataFn(e[a-5],e[a])(new d.ExportNamedDeclaration(new d.Assign(b[a-4],b[a-1],null,{moduleDeclaration:"export"})));break;case 147:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.ExportDefaultDeclaration(b[a]));break;case 148:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.ExportAllDeclaration(new d.Literal(b[a-2]),b[a]));break;case 149:this.$=d.addLocationDataFn(e[a-6],e[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList(b[a-4]),b[a]));break;case 155:this.$=d.addLocationDataFn(e[a],
e[a])(new d.ExportSpecifier(b[a]));break;case 156:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.ExportSpecifier(b[a-2],b[a]));break;case 157:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.ExportSpecifier(b[a-2],new d.Literal(b[a])));break;case 158:this.$=d.addLocationDataFn(e[a],e[a])(new d.ExportSpecifier(new d.Literal(b[a])));break;case 159:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.ExportSpecifier(new d.Literal(b[a-2]),b[a]));break;case 160:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.TaggedTemplateCall(b[a-
2],b[a],b[a-1]));break;case 161:case 162:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Call(b[a-2],b[a],b[a-1]));break;case 164:this.$=d.addLocationDataFn(e[a],e[a])(new d.SuperCall);break;case 165:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.SuperCall(b[a]));break;case 166:this.$=d.addLocationDataFn(e[a],e[a])(!1);break;case 167:this.$=d.addLocationDataFn(e[a],e[a])(!0);break;case 168:this.$=d.addLocationDataFn(e[a-1],e[a])([]);break;case 170:case 171:this.$=d.addLocationDataFn(e[a],e[a])(new d.Value(new d.ThisLiteral));
break;case 172:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Value(d.addLocationDataFn(e[a-1])(new d.ThisLiteral),[d.addLocationDataFn(e[a])(new d.Access(b[a]))],"this"));break;case 173:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Arr([]));break;case 174:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.Arr(b[a-2]));break;case 175:this.$=d.addLocationDataFn(e[a],e[a])("inclusive");break;case 176:this.$=d.addLocationDataFn(e[a],e[a])("exclusive");break;case 177:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Range(b[a-
3],b[a-1],b[a-2]));break;case 178:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Range(b[a-2],b[a],b[a-1]));break;case 179:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Range(b[a-1],null,b[a]));break;case 180:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Range(null,b[a],b[a-1]));break;case 181:this.$=d.addLocationDataFn(e[a],e[a])(new d.Range(null,null,b[a]));break;case 191:this.$=d.addLocationDataFn(e[a-2],e[a])([].concat(b[a-2],b[a]));break;case 192:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Try(b[a]));
break;case 193:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Try(b[a-1],b[a][0],b[a][1]));break;case 194:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.Try(b[a-2],null,null,b[a]));break;case 195:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Try(b[a-3],b[a-2][0],b[a-2][1],b[a]));break;case 196:this.$=d.addLocationDataFn(e[a-2],e[a])([b[a-1],b[a]]);break;case 197:this.$=d.addLocationDataFn(e[a-2],e[a])([d.addLocationDataFn(e[a-1])(new d.Value(b[a-1])),b[a]]);break;case 198:this.$=d.addLocationDataFn(e[a-
1],e[a])([null,b[a]]);break;case 199:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Throw(b[a]));break;case 200:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Parens(b[a-1]));break;case 201:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Parens(b[a-2]));break;case 202:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.While(b[a]));break;case 203:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.While(b[a-2],{guard:b[a]}));break;case 204:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.While(b[a],{invert:!0}));break;
case 205:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.While(b[a-2],{invert:!0,guard:b[a]}));break;case 206:this.$=d.addLocationDataFn(e[a-1],e[a])(b[a-1].addBody(b[a]));break;case 207:case 208:this.$=d.addLocationDataFn(e[a-1],e[a])(b[a].addBody(d.addLocationDataFn(e[a-1])(d.Block.wrap([b[a-1]]))));break;case 209:this.$=d.addLocationDataFn(e[a],e[a])(b[a]);break;case 210:this.$=d.addLocationDataFn(e[a-1],e[a])((new d.While(d.addLocationDataFn(e[a-1])(new d.BooleanLiteral("true")))).addBody(b[a]));
break;case 211:this.$=d.addLocationDataFn(e[a-1],e[a])((new d.While(d.addLocationDataFn(e[a-1])(new d.BooleanLiteral("true")))).addBody(d.addLocationDataFn(e[a])(d.Block.wrap([b[a]]))));break;case 212:case 213:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.For(b[a-1],b[a]));break;case 214:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.For(b[a],b[a-1]));break;case 215:this.$=d.addLocationDataFn(e[a-1],e[a])({source:d.addLocationDataFn(e[a])(new d.Value(b[a]))});break;case 216:this.$=d.addLocationDataFn(e[a-
3],e[a])({source:d.addLocationDataFn(e[a-2])(new d.Value(b[a-2])),step:b[a]});break;case 217:d=d.addLocationDataFn(e[a-1],e[a]);b[a].own=b[a-1].own;b[a].ownTag=b[a-1].ownTag;b[a].name=b[a-1][0];b[a].index=b[a-1][1];this.$=d(b[a]);break;case 218:this.$=d.addLocationDataFn(e[a-1],e[a])(b[a]);break;case 219:wa=d.addLocationDataFn(e[a-2],e[a]);b[a].own=!0;b[a].ownTag=d.addLocationDataFn(e[a-1])(new d.Literal(b[a-1]));this.$=wa(b[a]);break;case 225:this.$=d.addLocationDataFn(e[a-2],e[a])([b[a-2],b[a]]);
break;case 226:this.$=d.addLocationDataFn(e[a-1],e[a])({source:b[a]});break;case 227:this.$=d.addLocationDataFn(e[a-1],e[a])({source:b[a],object:!0});break;case 228:this.$=d.addLocationDataFn(e[a-3],e[a])({source:b[a-2],guard:b[a]});break;case 229:this.$=d.addLocationDataFn(e[a-3],e[a])({source:b[a-2],guard:b[a],object:!0});break;case 230:this.$=d.addLocationDataFn(e[a-3],e[a])({source:b[a-2],step:b[a]});break;case 231:this.$=d.addLocationDataFn(e[a-5],e[a])({source:b[a-4],guard:b[a-2],step:b[a]});
break;case 232:this.$=d.addLocationDataFn(e[a-5],e[a])({source:b[a-4],step:b[a-2],guard:b[a]});break;case 233:this.$=d.addLocationDataFn(e[a-1],e[a])({source:b[a],from:!0});break;case 234:this.$=d.addLocationDataFn(e[a-3],e[a])({source:b[a-2],guard:b[a],from:!0});break;case 235:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Switch(b[a-3],b[a-1]));break;case 236:this.$=d.addLocationDataFn(e[a-6],e[a])(new d.Switch(b[a-5],b[a-3],b[a-1]));break;case 237:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.Switch(null,
b[a-1]));break;case 238:this.$=d.addLocationDataFn(e[a-5],e[a])(new d.Switch(null,b[a-3],b[a-1]));break;case 240:this.$=d.addLocationDataFn(e[a-1],e[a])(b[a-1].concat(b[a]));break;case 241:this.$=d.addLocationDataFn(e[a-2],e[a])([[b[a-1],b[a]]]);break;case 242:this.$=d.addLocationDataFn(e[a-3],e[a])([[b[a-2],b[a-1]]]);break;case 243:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.If(b[a-1],b[a],{type:b[a-2]}));break;case 244:this.$=d.addLocationDataFn(e[a-4],e[a])(b[a-4].addElse(d.addLocationDataFn(e[a-
2],e[a])(new d.If(b[a-1],b[a],{type:b[a-2]}))));break;case 246:this.$=d.addLocationDataFn(e[a-2],e[a])(b[a-2].addElse(b[a]));break;case 247:case 248:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.If(b[a],d.addLocationDataFn(e[a-2])(d.Block.wrap([b[a-2]])),{type:b[a-1],statement:!0}));break;case 251:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Op("-",b[a]));break;case 252:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Op("+",b[a]));break;case 253:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Op("--",
b[a]));break;case 254:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Op("++",b[a]));break;case 255:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Op("--",b[a-1],null,!0));break;case 256:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Op("++",b[a-1],null,!0));break;case 257:this.$=d.addLocationDataFn(e[a-1],e[a])(new d.Existence(b[a-1]));break;case 258:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Op("+",b[a-2],b[a]));break;case 259:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Op("-",b[a-2],b[a]));break;
case 260:case 261:case 262:case 263:case 264:case 265:case 266:case 267:case 268:case 269:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Op(b[a-1],b[a-2],b[a]));break;case 270:e=d.addLocationDataFn(e[a-2],e[a]);b="!"===b[a-1].charAt(0)?(new d.Op(b[a-1].slice(1),b[a-2],b[a])).invert():new d.Op(b[a-1],b[a-2],b[a]);this.$=e(b);break;case 271:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Assign(b[a-2],b[a],b[a-1]));break;case 272:this.$=d.addLocationDataFn(e[a-4],e[a])(new d.Assign(b[a-4],b[a-1],b[a-3]));
break;case 273:this.$=d.addLocationDataFn(e[a-3],e[a])(new d.Assign(b[a-3],b[a],b[a-2]));break;case 274:this.$=d.addLocationDataFn(e[a-2],e[a])(new d.Extends(b[a-2],b[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:6,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,
97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{1:[3]},{1:[2,2],6:qa},a(sa,[2,3]),a(sa,[2,6],{141:77,132:102,138:103,133:D,135:A,139:E,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(sa,[2,7],{141:77,132:105,138:106,133:D,135:A,139:E,156:va}),a(sa,[2,8]),a(N,[2,14],{109:107,78:108,86:114,40:xa,41:xa,114:xa,82:ta,83:Na,
84:Fa,85:Ga,87:Ca,90:Pa,113:Ia}),a(N,[2,15],{86:114,109:117,78:118,82:ta,83:Na,84:Fa,85:Ga,87:Ca,90:Pa,113:Ia,114:xa}),a(N,[2,16]),a(N,[2,17]),a(N,[2,18]),a(N,[2,19]),a(N,[2,20]),a(N,[2,21]),a(N,[2,22]),a(N,[2,23]),a(N,[2,24]),a(N,[2,25]),a(N,[2,26]),a(Ea,[2,9]),a(Ea,[2,10]),a(Ea,[2,11]),a(Ea,[2,12]),a(Ea,[2,13]),a([1,6,32,42,131,133,135,139,156,163,164,165,166,167,168,169,170,171,172,173,174],Va,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,
47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,7:120,8:122,12:b,28:ea,29:Ya,34:g,38:h,40:r,41:n,44:B,45:H,48:I,49:F,50:Q,51:x,52:J,53:O,61:[1,119],62:z,63:l,67:c,68:w,92:m,95:k,97:K,105:P,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,137:q,149:ba,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M}),a(Ba,Ha,{55:[1,124]}),a(Ba,[2,95]),a(Ba,[2,96]),a(Ba,[2,97]),a(Ba,[2,98]),a(t,[2,163]),a([6,31,65,70],p,{64:125,71:126,72:127,33:129,60:130,
74:131,75:132,34:g,73:d,92:m,118:wa,119:e}),{30:135,31:Da},{7:137,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,
158:T,159:v,160:Y,161:S,162:M},{7:138,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},
{7:139,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:140,8:122,10:20,11:21,12:b,
13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{15:142,16:143,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,
44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:144,60:71,74:53,75:54,77:141,79:28,80:29,81:30,92:m,111:31,112:L,117:V,118:X,119:G,130:W},{15:142,16:143,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:144,60:71,74:53,75:54,77:145,79:28,80:29,81:30,92:m,111:31,112:L,117:V,118:X,119:G,130:W},a(Ta,ua,{96:[1,149],161:[1,146],162:[1,147],175:[1,148]}),a(N,[2,245],{151:[1,150]}),{30:151,31:Da},{30:152,31:Da},a(N,[2,209]),{30:153,31:Da},{7:154,8:122,10:20,11:21,
12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:[1,155],33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Eb,[2,115],{47:27,79:28,80:29,81:30,111:31,
74:53,75:54,37:55,43:57,33:70,60:71,39:80,15:142,16:143,54:144,30:156,77:158,31:Da,34:g,38:h,40:r,41:n,44:B,45:H,48:I,49:F,50:Q,51:x,52:J,53:O,92:m,96:[1,157],112:L,117:V,118:X,119:G,130:W}),{7:159,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,
111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Ea,Za,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,7:160,12:b,28:ea,34:g,38:h,40:r,41:n,44:B,45:H,48:I,49:F,50:Q,51:x,52:J,53:O,61:R,62:z,63:l,67:c,68:w,
92:m,95:k,97:K,105:P,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,137:q,149:ba,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M}),a([1,6,31,32,42,70,94,131,133,135,139,156],[2,66]),{33:165,34:g,39:161,40:r,41:n,92:[1,164],98:162,99:163,104:Fb},{25:168,33:169,34:g,92:[1,167],95:k,103:[1,170],107:[1,171]},a(Ta,[2,92]),a(Ta,[2,93]),a(Ba,[2,40]),a(Ba,[2,41]),a(Ba,[2,42]),a(Ba,[2,43]),a(Ba,[2,44]),a(Ba,[2,45]),a(Ba,[2,46]),a(Ba,[2,47]),{4:172,5:3,7:4,8:5,9:6,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,31:[1,173],33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:174,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,
23:15,24:16,25:17,26:18,27:19,28:ea,31:$a,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,73:Ua,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,116:176,117:V,118:X,119:G,120:Gb,123:177,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Ba,[2,170]),a(Ba,[2,171],{35:181,36:Oa}),a([1,6,31,32,42,46,65,70,73,82,
83,84,85,87,89,90,94,113,115,120,122,131,133,134,135,139,140,156,159,160,163,164,165,166,167,168,169,170,171,172,173,174],[2,164],{110:183,114:sb}),{31:[2,69]},{31:[2,70]},a(La,[2,87]),a(La,[2,90]),{7:185,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,
105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:186,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,
119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:187,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,
133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:189,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,30:188,31:Da,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,
137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{33:194,34:g,60:195,74:196,75:197,80:190,92:m,118:wa,119:G,143:191,144:[1,192],145:193},{142:198,146:[1,199],147:[1,200],148:[1,201]},a([6,31,70,94],Hb,{39:80,93:202,56:203,57:204,59:205,11:206,37:207,33:208,35:209,60:210,34:g,36:Oa,38:h,40:r,41:n,62:z,118:wa}),a(Ib,[2,34]),a(Ib,[2,35]),a(Ba,[2,38]),{15:142,16:211,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:144,60:71,
74:53,75:54,77:212,79:28,80:29,81:30,92:m,111:31,112:L,117:V,118:X,119:G,130:W},a([1,6,29,31,32,40,41,42,55,58,65,70,73,82,83,84,85,87,89,90,94,96,102,113,114,115,120,122,131,133,134,135,139,140,146,147,148,156,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175],[2,32]),a(Jb,[2,36]),{4:213,5:3,7:4,8:5,9:6,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,
50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(sa,[2,5],{7:4,8:5,9:6,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,
33:70,60:71,141:77,39:80,5:214,12:b,28:u,34:g,38:h,40:r,41:n,44:B,45:H,48:I,49:F,50:Q,51:x,52:J,53:O,61:R,62:z,63:l,67:c,68:w,92:m,95:k,97:K,105:P,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,133:D,135:A,137:q,139:E,149:ba,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M}),a(N,[2,257]),{7:215,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,
61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:216,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,
74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:217,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,
81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:218,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,
112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:219,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,
129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:220,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,
136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:221,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,
149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:222,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,
159:v,160:Y,161:S,162:M},{7:223,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:224,
8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:225,8:122,10:20,11:21,12:b,13:23,
14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:226,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:227,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,
25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:228,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,
34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(N,[2,208]),a(N,[2,213]),{7:229,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,
37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(N,[2,207]),a(N,[2,212]),{39:230,40:r,41:n,110:231,114:sb},a(La,[2,88]),a(Kb,[2,167]),{35:232,36:Oa},{35:233,36:Oa},a(La,[2,103],{35:234,36:Oa}),{35:235,36:Oa},a(La,
[2,104]),{7:237,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,73:Lb,74:53,75:54,77:40,79:28,80:29,81:30,88:236,91:238,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,121:239,122:tb,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,
161:S,162:M},{86:242,87:Ca,90:Pa},{110:243,114:sb},a(La,[2,89]),a(sa,[2,65],{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,7:244,12:b,28:ea,34:g,38:h,40:r,41:n,44:B,45:H,48:I,49:F,50:Q,51:x,52:J,53:O,61:R,62:z,63:l,67:c,68:w,92:m,95:k,97:K,105:P,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,133:Za,135:Za,139:Za,156:Za,
137:q,149:ba,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M}),a(Ma,[2,28],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{7:245,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,
111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{132:105,133:D,135:A,138:106,139:E,141:77,156:va},a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,163,164,165,166,167,168,169,170,171,172,173,174],Va,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,136:44,
138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,7:120,8:122,12:b,28:ea,29:Ya,34:g,38:h,40:r,41:n,44:B,45:H,48:I,49:F,50:Q,51:x,52:J,53:O,61:R,62:z,63:l,67:c,68:w,92:m,95:k,97:K,105:P,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,137:q,149:ba,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M}),{6:[1,247],7:246,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:[1,248],33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,
49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a([6,31],Ja,{69:251,65:[1,249],70:Mb}),a(Sa,[2,74]),a(Sa,[2,78],{55:[1,253],73:[1,252]}),a(Sa,[2,81]),a(fb,[2,82]),a(fb,[2,83]),a(fb,[2,84]),a(fb,[2,85]),{35:181,36:Oa},{7:254,8:122,10:20,11:21,12:b,13:23,14:24,15:7,
16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:$a,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,73:Ua,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,116:176,117:V,118:X,119:G,120:Gb,123:177,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(N,[2,68]),{4:256,5:3,7:4,8:5,9:6,
10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,32:[1,255],33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a([1,6,31,32,42,65,70,73,89,94,
115,120,122,131,133,134,135,139,140,156,159,160,164,165,166,167,168,169,170,171,172,173,174],[2,249],{141:77,132:102,138:103,163:fa}),a(ab,[2,250],{141:77,132:102,138:103,163:fa,165:ga}),a(ab,[2,251],{141:77,132:102,138:103,163:fa,165:ga}),a(ab,[2,252],{141:77,132:102,138:103,163:fa,165:ga}),a(N,[2,253],{40:ua,41:ua,82:ua,83:ua,84:ua,85:ua,87:ua,90:ua,113:ua,114:ua}),a(Kb,xa,{109:107,78:108,86:114,82:ta,83:Na,84:Fa,85:Ga,87:Ca,90:Pa,113:Ia}),{78:118,82:ta,83:Na,84:Fa,85:Ga,86:114,87:Ca,90:Pa,109:117,
113:Ia,114:xa},a(Nb,Ha),a(N,[2,254],{40:ua,41:ua,82:ua,83:ua,84:ua,85:ua,87:ua,90:ua,113:ua,114:ua}),a(N,[2,255]),a(N,[2,256]),{6:[1,259],7:257,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:[1,258],33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,
130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:260,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,
137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{30:261,31:Da,155:[1,262]},a(N,[2,192],{126:263,127:[1,264],128:[1,265]}),a(N,[2,206]),a(N,[2,214]),{31:[1,266],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},{150:267,152:268,153:gb},a(N,[2,116]),{7:270,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,
33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Eb,[2,119],{30:271,31:Da,40:ua,41:ua,82:ua,83:ua,84:ua,85:ua,87:ua,90:ua,113:ua,114:ua,96:[1,272]}),a(Ma,[2,199],{141:77,132:102,138:103,159:ma,160:Z,
163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ea,bb,{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ea,[2,123]),{29:[1,273],70:[1,274]},{29:[1,275]},{31:hb,33:280,34:g,94:[1,276],100:277,101:278,103:Wa},a([29,70],[2,139]),{102:[1,282]},{31:ub,33:287,34:g,94:[1,283],103:cb,106:284,108:285},a(Ea,[2,143]),{55:[1,289]},{7:290,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{29:[1,291]},{6:qa,131:[1,292]},{4:293,5:3,7:4,8:5,9:6,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,
18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:u,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a([6,31,70,120],Ob,{141:77,132:102,138:103,121:294,73:[1,295],122:tb,133:D,135:A,139:E,
156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(vb,[2,173]),a([6,31,120],Ja,{69:296,70:ib}),a(Qa,[2,182]),{7:254,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:$a,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,73:Ua,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,
112:L,116:298,117:V,118:X,119:G,123:177,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Qa,[2,188]),a(Qa,[2,189]),a(Pb,[2,172]),a(Pb,[2,33]),a(t,[2,165]),{7:254,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:$a,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,73:Ua,
74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,115:[1,299],116:300,117:V,118:X,119:G,123:177,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{30:301,31:Da,132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},a(Qb,[2,202],{141:77,132:102,138:103,133:D,134:[1,302],135:A,139:E,159:ma,160:Z,163:fa,164:ia,
165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Qb,[2,204],{141:77,132:102,138:103,133:D,134:[1,303],135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(N,[2,210]),a(Xa,[2,211],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,156,159,160,163,164,165,166,167,168,
169,170,171,172,173,174],[2,215],{140:[1,304]}),a(jb,[2,218]),{33:194,34:g,60:195,74:196,75:197,92:m,118:wa,119:e,143:305,145:193},a(jb,[2,224],{70:[1,306]}),a(kb,[2,220]),a(kb,[2,221]),a(kb,[2,222]),a(kb,[2,223]),a(N,[2,217]),{7:307,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,
79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:308,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,
97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:309,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,
118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(lb,Ja,{69:310,70:Rb}),a(Aa,[2,111]),a(Aa,[2,51],{58:[1,312]}),a(Sb,[2,60],{55:[1,313]}),a(Aa,[2,56]),a(Sb,[2,61]),a(wb,[2,57]),a(wb,[2,58]),a(wb,[2,59]),{46:[1,314],78:118,82:ta,83:Na,84:Fa,85:Ga,86:114,87:Ca,90:Pa,109:117,113:Ia,114:xa},a(Nb,ua),{6:qa,42:[1,315]},a(sa,[2,4]),a(Tb,[2,258],{141:77,132:102,138:103,163:fa,164:ia,165:ga}),a(Tb,[2,259],{141:77,
132:102,138:103,163:fa,164:ia,165:ga}),a(ab,[2,260],{141:77,132:102,138:103,163:fa,165:ga}),a(ab,[2,261],{141:77,132:102,138:103,163:fa,165:ga}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,166,167,168,169,170,171,172,173,174],[2,262],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,167,168,169,170,171,172,173],[2,263],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,174:da}),
a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,168,169,170,171,172,173],[2,264],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,174:da}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,169,170,171,172,173],[2,265],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,174:da}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,170,171,172,173],[2,266],{141:77,132:102,138:103,159:ma,160:Z,
163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,174:da}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,171,172,173],[2,267],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,174:da}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,172,173],[2,268],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,174:da}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,
135,139,140,156,173],[2,269],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,174:da}),a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156,167,168,169,170,171,172,173,174],[2,270],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja}),a(Xa,[2,248],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Xa,[2,247],{141:77,132:102,
138:103,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(t,[2,160]),a(t,[2,161]),a(La,[2,99]),a(La,[2,100]),a(La,[2,101]),a(La,[2,102]),{89:[1,316]},{73:Lb,89:[2,107],121:317,122:tb,132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},{89:[2,108]},{7:318,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,
24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,181],92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Ub,[2,175]),a(Ub,Vb),a(La,[2,106]),a(t,[2,162]),a(sa,[2,64],{141:77,132:102,138:103,133:bb,135:bb,139:bb,156:bb,
159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ma,[2,29],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ma,[2,48],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{7:319,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,
37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:320,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,
44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{66:321,67:c,68:w},a(Ra,db,{72:127,33:129,60:130,74:131,75:132,71:322,34:g,73:d,92:m,118:wa,119:e}),{6:Wb,31:Xb},a(Sa,[2,79]),{7:325,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Qa,Ob,{141:77,132:102,138:103,73:[1,326],133:D,135:A,139:E,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,
166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Yb,[2,30]),{6:qa,32:[1,327]},a(Ma,[2,271],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{7:328,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,
79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:329,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,
97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Ma,[2,274],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(N,[2,246]),{7:330,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,
48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(N,[2,193],{127:[1,331]}),{30:332,31:Da},{30:335,31:Da,33:333,34:g,75:334,92:m},{150:336,152:268,153:gb},{32:[1,337],151:[1,338],152:339,153:gb},a(mb,[2,239]),{7:341,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,
17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,124:340,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Zb,[2,117],{141:77,132:102,138:103,30:342,31:Da,133:D,135:A,139:E,159:ma,
160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(N,[2,120]),{7:343,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,
139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{39:344,40:r,41:n},{92:[1,346],99:345,104:Fb},{39:347,40:r,41:n},{29:[1,348]},a(lb,Ja,{69:349,70:nb}),a(Aa,[2,130]),{31:hb,33:280,34:g,100:351,101:278,103:Wa},a(Aa,[2,135],{102:[1,352]}),a(Aa,[2,137],{102:[1,353]}),{33:354,34:g},a(Ea,[2,141]),a(lb,Ja,{69:355,70:xb}),a(Aa,[2,150]),{31:ub,33:287,34:g,103:cb,106:357,108:285},a(Aa,[2,155],{102:[1,358]}),a(Aa,[2,158],{102:[1,359]}),{6:[1,361],7:360,8:122,10:20,11:21,12:b,13:23,14:24,
15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:[1,362],33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(yb,[2,147],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,
160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{39:363,40:r,41:n},a(Ba,[2,200]),{6:qa,32:[1,364]},{7:365,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,
132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a([12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,62,63,67,68,92,95,97,105,112,117,118,119,125,129,130,133,135,137,139,149,155,157,158,159,160,161,162],Vb,{6:eb,31:eb,70:eb,120:eb}),{6:ob,31:pb,120:[1,366]},a([6,31,32,115,120],db,{15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,10:20,11:21,13:23,14:24,54:26,47:27,79:28,80:29,81:30,111:31,66:33,77:40,154:41,132:43,
136:44,138:45,74:53,75:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,76:179,7:254,123:369,12:b,28:ea,34:g,38:h,40:r,41:n,44:B,45:H,48:I,49:F,50:Q,51:x,52:J,53:O,61:R,62:z,63:l,67:c,68:w,73:Ua,92:m,95:k,97:K,105:P,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,133:D,135:A,137:q,139:E,149:ba,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M}),a(Ra,Ja,{69:370,70:ib}),a(t,[2,168]),a([6,31,115],Ja,{69:371,70:ib}),a($b,[2,243]),{7:372,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,
23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:373,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,
28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:374,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,
39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(jb,[2,219]),{33:194,34:g,60:195,74:196,75:197,92:m,118:wa,119:e,145:375},a([1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,156],[2,226],{141:77,132:102,138:103,134:[1,
376],140:[1,377],159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(zb,[2,227],{141:77,132:102,138:103,134:[1,378],159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(zb,[2,233],{141:77,132:102,138:103,134:[1,379],159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{6:ac,31:bc,94:[1,380]},a(Ab,db,{39:80,57:204,59:205,11:206,37:207,33:208,35:209,60:210,56:383,
34:g,36:Oa,38:h,40:r,41:n,62:z,118:wa}),{7:384,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:[1,385],33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,
160:Y,161:S,162:M},{7:386,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:[1,387],33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},
a(Ba,[2,39]),a(Jb,[2,37]),a(La,[2,105]),{7:388,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,179],92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,
160:Y,161:S,162:M},{89:[2,180],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},a(Ma,[2,49],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{32:[1,389],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},{30:390,31:Da},a(Sa,[2,75]),{33:129,
34:g,60:130,71:391,72:127,73:d,74:131,75:132,92:m,118:wa,119:e},a(cc,p,{71:126,72:127,33:129,60:130,74:131,75:132,64:392,34:g,73:d,92:m,118:wa,119:e}),a(Sa,[2,80],{141:77,132:102,138:103,133:D,135:A,139:E,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Qa,eb),a(Yb,[2,31]),{32:[1,393],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},a(Ma,[2,273],
{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{30:394,31:Da,132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},{30:395,31:Da},a(N,[2,194]),{30:396,31:Da},{30:397,31:Da},a(Bb,[2,198]),{32:[1,398],151:[1,399],152:339,153:gb},a(N,[2,237]),{30:400,31:Da},a(mb,[2,240]),{30:401,31:Da,70:[1,402]},a(dc,[2,190],{141:77,132:102,138:103,133:D,
135:A,139:E,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(N,[2,118]),a(Zb,[2,121],{141:77,132:102,138:103,30:403,31:Da,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ea,[2,124]),{29:[1,404]},{31:hb,33:280,34:g,100:405,101:278,103:Wa},a(Ea,[2,125]),{39:406,40:r,41:n},{6:qb,31:rb,94:[1,407]},a(Ab,db,{33:280,101:410,34:g,103:Wa}),a(Ra,Ja,{69:411,70:nb}),{33:412,34:g},
{33:413,34:g},{29:[2,140]},{6:Cb,31:Db,94:[1,414]},a(Ab,db,{33:287,108:417,34:g,103:cb}),a(Ra,Ja,{69:418,70:xb}),{33:419,34:g,103:[1,420]},{33:421,34:g},a(yb,[2,144],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{7:422,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,
51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:423,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,
62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Ea,[2,148]),{131:[1,424]},{120:[1,425],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},a(vb,[2,174]),{7:254,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,
18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,73:Ua,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,123:426,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:254,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,
20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,31:$a,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,73:Ua,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,116:427,117:V,118:X,119:G,123:177,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Qa,[2,183]),{6:ob,31:pb,32:[1,428]},{6:ob,31:pb,115:[1,429]},
a(Xa,[2,203],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Xa,[2,205],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Xa,[2,216],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(jb,[2,225]),{7:430,8:122,10:20,11:21,
12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:431,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,
18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:432,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,
23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:433,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,
28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(vb,[2,109]),{11:206,33:208,34:g,35:209,36:Oa,37:207,38:h,39:80,40:r,41:n,56:434,57:204,59:205,60:210,62:z,118:wa},a(cc,Hb,{39:80,56:203,57:204,
59:205,11:206,37:207,33:208,35:209,60:210,93:435,34:g,36:Oa,38:h,40:r,41:n,62:z,118:wa}),a(Aa,[2,112]),a(Aa,[2,52],{141:77,132:102,138:103,133:D,135:A,139:E,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{7:436,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,
66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(Aa,[2,54],{141:77,132:102,138:103,133:D,135:A,139:E,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{7:437,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,
27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{89:[2,178],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,
173:ra,174:da},a(N,[2,50]),a(N,[2,67]),a(Sa,[2,76]),a(Ra,Ja,{69:438,70:Mb}),a(N,[2,272]),a($b,[2,244]),a(N,[2,195]),a(Bb,[2,196]),a(Bb,[2,197]),a(N,[2,235]),{30:439,31:Da},{32:[1,440]},a(mb,[2,241],{6:[1,441]}),{7:442,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,
92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},a(N,[2,122]),{39:443,40:r,41:n},a(lb,Ja,{69:444,70:nb}),a(Ea,[2,126]),{29:[1,445]},{33:280,34:g,101:446,103:Wa},{31:hb,33:280,34:g,100:447,101:278,103:Wa},a(Aa,[2,131]),{6:qb,31:rb,32:[1,448]},a(Aa,[2,136]),a(Aa,[2,138]),a(Ea,[2,142],{29:[1,449]}),{33:287,34:g,103:cb,108:450},{31:ub,33:287,34:g,103:cb,106:451,108:285},
a(Aa,[2,151]),{6:Cb,31:Db,32:[1,452]},a(Aa,[2,156]),a(Aa,[2,157]),a(Aa,[2,159]),a(yb,[2,145],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),{32:[1,453],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},a(Ba,[2,201]),a(Ba,[2,177]),a(Qa,[2,184]),a(Ra,Ja,{69:454,70:ib}),a(Qa,[2,185]),a(t,[2,169]),a([1,6,31,32,42,
65,70,73,89,94,115,120,122,131,133,134,135,139,156],[2,228],{141:77,132:102,138:103,140:[1,455],159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(zb,[2,230],{141:77,132:102,138:103,134:[1,456],159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ma,[2,229],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ma,[2,234],{141:77,132:102,
138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Aa,[2,113]),a(Ra,Ja,{69:457,70:Rb}),{32:[1,458],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},{32:[1,459],132:102,133:D,135:A,138:103,139:E,141:77,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da},{6:Wb,31:Xb,32:[1,460]},{32:[1,461]},a(N,
[2,238]),a(mb,[2,242]),a(dc,[2,191],{141:77,132:102,138:103,133:D,135:A,139:E,156:za,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ea,[2,128]),{6:qb,31:rb,94:[1,462]},{39:463,40:r,41:n},a(Aa,[2,132]),a(Ra,Ja,{69:464,70:nb}),a(Aa,[2,133]),{39:465,40:r,41:n},a(Aa,[2,152]),a(Ra,Ja,{69:466,70:xb}),a(Aa,[2,153]),a(Ea,[2,146]),{6:ob,31:pb,32:[1,467]},{7:468,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,
25:17,26:18,27:19,28:ea,33:70,34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{7:469,8:122,10:20,11:21,12:b,13:23,14:24,15:7,16:8,17:9,18:10,19:11,20:12,21:13,22:14,23:15,24:16,25:17,26:18,27:19,28:ea,33:70,
34:g,37:55,38:h,39:80,40:r,41:n,43:57,44:B,45:H,47:27,48:I,49:F,50:Q,51:x,52:J,53:O,54:26,60:71,61:R,62:z,63:l,66:33,67:c,68:w,74:53,75:54,77:40,79:28,80:29,81:30,92:m,95:k,97:K,105:P,111:31,112:L,117:V,118:X,119:G,125:aa,129:U,130:W,132:43,133:D,135:A,136:44,137:q,138:45,139:E,141:77,149:ba,154:41,155:ca,157:C,158:T,159:v,160:Y,161:S,162:M},{6:ac,31:bc,32:[1,470]},a(Aa,[2,53]),a(Aa,[2,55]),a(Sa,[2,77]),a(N,[2,236]),{29:[1,471]},a(Ea,[2,127]),{6:qb,31:rb,32:[1,472]},a(Ea,[2,149]),{6:Cb,31:Db,32:[1,
473]},a(Qa,[2,186]),a(Ma,[2,231],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Ma,[2,232],{141:77,132:102,138:103,159:ma,160:Z,163:fa,164:ia,165:ga,166:ja,167:la,168:oa,169:pa,170:ha,171:ka,172:na,173:ra,174:da}),a(Aa,[2,114]),{39:474,40:r,41:n},a(Aa,[2,134]),a(Aa,[2,154]),a(Ea,[2,129])],defaultActions:{68:[2,69],69:[2,70],238:[2,108],354:[2,140]},parseError:function(a,d){if(d.recoverable)this.trace(a);else{var e=function(a,
d){this.message=a;this.hash=d};e.prototype=Error;throw new e(a,d);}},parse:function(a){var d=[0],e=[null],b=[],p=this.table,t="",wa=0,c=0,g=0,Da=b.slice.call(arguments,1),k=Object.create(this.lexer),h={};for(f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(h[f]=this.yy[f]);k.setInput(a,h);h.lexer=k;h.parser=this;"undefined"==typeof k.yylloc&&(k.yylloc={});var f=k.yylloc;b.push(f);var l=k.options&&k.options.ranges;this.parseError="function"===typeof h.parseError?h.parseError:Object.getPrototypeOf(this).parseError;
for(var m,Ta,Ha,n,ua={},y,w;;){Ha=d[d.length-1];if(this.defaultActions[Ha])n=this.defaultActions[Ha];else{if(null===m||"undefined"==typeof m)m=k.lex()||1,"number"!==typeof m&&(m=this.symbols_[m]||m);n=p[Ha]&&p[Ha][m]}if("undefined"===typeof n||!n.length||!n[0]){w=[];for(y in p[Ha])this.terminals_[y]&&2<y&&w.push("'"+this.terminals_[y]+"'");var q=k.showPosition?"Parse error on line "+(wa+1)+":\n"+k.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+
(wa+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'");this.parseError(q,{text:k.match,token:this.terminals_[m]||m,line:k.yylineno,loc:f,expected:w})}if(n[0]instanceof Array&&1<n.length)throw Error("Parse Error: multiple actions possible at state: "+Ha+", token: "+m);switch(n[0]){case 1:d.push(m);e.push(k.yytext);b.push(k.yylloc);d.push(n[1]);m=null;Ta?(m=Ta,Ta=null):(c=k.yyleng,t=k.yytext,wa=k.yylineno,f=k.yylloc,0<g&&g--);break;case 2:w=this.productions_[n[1]][1];ua.$=e[e.length-
w];ua._$={first_line:b[b.length-(w||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(w||1)].first_column,last_column:b[b.length-1].last_column};l&&(ua._$.range=[b[b.length-(w||1)].range[0],b[b.length-1].range[1]]);Ha=this.performAction.apply(ua,[t,c,wa,h,n[1],e,b].concat(Da));if("undefined"!==typeof Ha)return Ha;w&&(d=d.slice(0,-2*w),e=e.slice(0,-1*w),b=b.slice(0,-1*w));d.push(this.productions_[n[1]][0]);e.push(ua.$);b.push(ua._$);n=p[d[d.length-2]][d[d.length-1]];d.push(n);
break;case 3:return!0}}}};f.prototype=ec;ec.Parser=f;return new f}();"undefined"!==typeof u&&"undefined"!==typeof f&&(f.parser=q,f.Parser=q.Parser,f.parse=function(){return q.parse.apply(q,arguments)},f.main=function(y){y[1]||(console.log("Usage: "+y[0]+" FILE"),process.exit(1));var a="",b=u("fs");"undefined"!==typeof b&&null!==b&&(a=b.readFileSync(u("path").normalize(y[1]),"utf8"));return f.parser.parse(a)},"undefined"!==typeof qa&&u.main===qa&&f.main(process.argv.slice(1)));return qa.exports}();
u["./scope"]=function(){var f={};(function(){var u=[].indexOf||function(f){for(var y=0,a=this.length;y<a;y++)if(y in this&&this[y]===f)return y;return-1};f.Scope=function(){function f(f,a,b,q){var g,h;this.parent=f;this.expressions=a;this.method=b;this.referencedVars=q;this.variables=[{name:"arguments",type:"arguments"}];this.positions={};this.parent||(this.utilities={});this.root=null!=(g=null!=(h=this.parent)?h.root:void 0)?g:this}f.prototype.add=function(f,a,b){return this.shared&&!b?this.parent.add(f,
a,b):Object.prototype.hasOwnProperty.call(this.positions,f)?this.variables[this.positions[f]].type=a:this.positions[f]=this.variables.push({name:f,type:a})-1};f.prototype.namedMethod=function(){var f;return null!=(f=this.method)&&f.name||!this.parent?this.method:this.parent.namedMethod()};f.prototype.find=function(f,a){null==a&&(a="var");if(this.check(f))return!0;this.add(f,a);return!1};f.prototype.parameter=function(f){if(!this.shared||!this.parent.check(f,!0))return this.add(f,"param")};f.prototype.check=
function(f){var a;return!!(this.type(f)||null!=(a=this.parent)&&a.check(f))};f.prototype.temporary=function(f,a,b){null==b&&(b=!1);return b?(b=f.charCodeAt(0),f=122-b,b=String.fromCharCode(b+a%(f+1)),a=Math.floor(a/(f+1)),""+b+(a||"")):""+f+(a||"")};f.prototype.type=function(f){var a;var b=this.variables;var q=0;for(a=b.length;q<a;q++){var g=b[q];if(g.name===f)return g.type}return null};f.prototype.freeVariable=function(f,a){var b,q;null==a&&(a={});for(b=0;;){var g=this.temporary(f,b,a.single);if(!(this.check(g)||
0<=u.call(this.root.referencedVars,g)))break;b++}(null!=(q=a.reserve)?q:1)&&this.add(g,"var",!0);return g};f.prototype.assign=function(f,a){this.add(f,{value:a,assigned:!0},!0);return this.hasAssignments=!0};f.prototype.hasDeclarations=function(){return!!this.declaredVariables().length};f.prototype.declaredVariables=function(){var f;var a=this.variables;var b=[];var q=0;for(f=a.length;q<f;q++){var g=a[q];"var"===g.type&&b.push(g.name)}return b.sort()};f.prototype.assignedVariables=function(){var f;
var a=this.variables;var b=[];var q=0;for(f=a.length;q<f;q++){var g=a[q];g.type.assigned&&b.push(g.name+" \x3d "+g.type.value)}return b};return f}()}).call(this);return f}();u["./nodes"]=function(){var f={};(function(){var qa,q,y,a,b,ya,g,h,r,n,B,H,I,F,Q,x,J,O,R,z,l,c,w,m,k,K,P,L,V,X,G,aa,U,W,D,A,va,E,ba,ca,C,T,v=function(a,b){function p(){this.constructor=a}for(var d in b)Y.call(b,d)&&(a[d]=b[d]);p.prototype=b.prototype;a.prototype=new p;a.__super__=b.prototype;return a},Y={}.hasOwnProperty,S=[].indexOf||
function(a){for(var b=0,p=this.length;b<p;b++)if(b in this&&this[b]===a)return b;return-1},M=[].slice;Error.stackTraceLimit=Infinity;var xa=u("./scope").Scope;var sa=u("./lexer");var za=sa.isUnassignable;var ma=sa.JS_FORBIDDEN;var Z=u("./helpers");var fa=Z.compact;var ia=Z.flatten;var ga=Z.extend;var ja=Z.merge;var la=Z.del;sa=Z.addLocationDataFn;var oa=Z.locationDataToString;var pa=Z.throwSyntaxError;f.extend=ga;f.addLocationDataFn=sa;var ha=function(){return!0};var ka=function(){return!1};var na=
function(){return this};var ra=function(){this.negated=!this.negated;return this};f.CodeFragment=r=function(){function a(a,b){var d;this.code=""+b;this.locationData=null!=a?a.locationData:void 0;this.type=(null!=a?null!=(d=a.constructor)?d.name:void 0:void 0)||"unknown"}a.prototype.toString=function(){return""+this.code+(this.locationData?": "+oa(this.locationData):"")};return a}();var da=function(a){var b;var p=[];var d=0;for(b=a.length;d<b;d++){var wa=a[d];p.push(wa.code)}return p.join("")};f.Base=
sa=function(){function b(){}b.prototype.compile=function(a,b){return da(this.compileToFragments(a,b))};b.prototype.compileToFragments=function(a,b){a=ga({},a);b&&(a.level=b);b=this.unfoldSoak(a)||this;b.tab=a.indent;return a.level!==N&&b.isStatement(a)?b.compileClosure(a):b.compileNode(a)};b.prototype.compileClosure=function(b){var p,d,t;(d=this.jumps())&&d.error("cannot use a pure statement in an expression");b.sharedScope=!0;d=new h([],a.wrap([this]));var e=[];if((p=this.contains(Va))||this.contains(ea))e=
[new E],p?(p="apply",e.push(new x("arguments"))):p="call",d=new C(d,[new qa(new L(p))]);b=(new ya(d,e)).compileNode(b);if(d.isGenerator||null!=(t=d.base)&&t.isGenerator)b.unshift(this.makeCode("(yield* ")),b.push(this.makeCode(")"));return b};b.prototype.cache=function(a,b,d){if(null!=d?d(this):this.isComplex()){d=new x(a.scope.freeVariable("ref"));var p=new y(d,this);return b?[p.compileToFragments(a,b),[this.makeCode(d.value)]]:[p,d]}d=b?this.compileToFragments(a,b):this;return[d,d]};b.prototype.cacheToCodeFragments=
function(a){return[da(a[0]),da(a[1])]};b.prototype.makeReturn=function(a){var b=this.unwrapAll();return a?new ya(new z(a+".push"),[b]):new G(b)};b.prototype.contains=function(a){var b=void 0;this.traverseChildren(!1,function(d){if(a(d))return b=d,!1});return b};b.prototype.lastNonComment=function(a){var b;for(b=a.length;b--;)if(!(a[b]instanceof n))return a[b];return null};b.prototype.toString=function(a,b){null==a&&(a="");null==b&&(b=this.constructor.name);var d="\n"+a+b;this.soak&&(d+="?");this.eachChild(function(b){return d+=
b.toString(a+Ca)});return d};b.prototype.eachChild=function(a){var b,d;if(!this.children)return this;var t=this.children;var e=0;for(b=t.length;e<b;e++){var c=t[e];if(this[c]){var f=ia([this[c]]);var g=0;for(d=f.length;g<d;g++)if(c=f[g],!1===a(c))return this}}return this};b.prototype.traverseChildren=function(a,b){return this.eachChild(function(d){if(!1!==b(d))return d.traverseChildren(a,b)})};b.prototype.invert=function(){return new k("!",this)};b.prototype.unwrapAll=function(){var a;for(a=this;a!==
(a=a.unwrap()););return a};b.prototype.children=[];b.prototype.isStatement=ka;b.prototype.jumps=ka;b.prototype.isComplex=ha;b.prototype.isChainable=ka;b.prototype.isAssignable=ka;b.prototype.isNumber=ka;b.prototype.unwrap=na;b.prototype.unfoldSoak=ka;b.prototype.assigns=ka;b.prototype.updateLocationDataIfMissing=function(a){if(this.locationData)return this;this.locationData=a;return this.eachChild(function(b){return b.updateLocationDataIfMissing(a)})};b.prototype.error=function(a){return pa(a,this.locationData)};
b.prototype.makeCode=function(a){return new r(this,a)};b.prototype.wrapInBraces=function(a){return[].concat(this.makeCode("("),a,this.makeCode(")"))};b.prototype.joinFragmentArrays=function(a,b){var d,p;var e=[];var t=d=0;for(p=a.length;d<p;t=++d){var c=a[t];t&&e.push(this.makeCode(b));e=e.concat(c)}return e};return b}();f.Block=a=function(a){function b(a){this.expressions=fa(ia(a||[]))}v(b,a);b.prototype.children=["expressions"];b.prototype.push=function(a){this.expressions.push(a);return this};
b.prototype.pop=function(){return this.expressions.pop()};b.prototype.unshift=function(a){this.expressions.unshift(a);return this};b.prototype.unwrap=function(){return 1===this.expressions.length?this.expressions[0]:this};b.prototype.isEmpty=function(){return!this.expressions.length};b.prototype.isStatement=function(a){var d;var b=this.expressions;var e=0;for(d=b.length;e<d;e++){var p=b[e];if(p.isStatement(a))return!0}return!1};b.prototype.jumps=function(a){var d;var b=this.expressions;var e=0;for(d=
b.length;e<d;e++){var p=b[e];if(p=p.jumps(a))return p}};b.prototype.makeReturn=function(a){var d;for(d=this.expressions.length;d--;){var b=this.expressions[d];if(!(b instanceof n)){this.expressions[d]=b.makeReturn(a);b instanceof G&&!b.expression&&this.expressions.splice(d,1);break}}return this};b.prototype.compileToFragments=function(a,d){null==a&&(a={});return a.scope?b.__super__.compileToFragments.call(this,a,d):this.compileRoot(a)};b.prototype.compileNode=function(a){var d,p;this.tab=a.indent;
var e=a.level===N;var t=[];var c=this.expressions;var f=d=0;for(p=c.length;d<p;f=++d){var g=c[f];g=g.unwrapAll();g=g.unfoldSoak(a)||g;g instanceof b?t.push(g.compileNode(a)):e?(g.front=!0,f=g.compileToFragments(a),g.isStatement(a)||(f.unshift(this.makeCode(""+this.tab)),f.push(this.makeCode(";"))),t.push(f)):t.push(g.compileToFragments(a,ta))}if(e)return this.spaced?[].concat(this.joinFragmentArrays(t,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(t,"\n");d=t.length?this.joinFragmentArrays(t,
", "):[this.makeCode("void 0")];return 1<t.length&&a.level>=ta?this.wrapInBraces(d):d};b.prototype.compileRoot=function(a){var d,b;a.indent=a.bare?"":Ca;a.level=N;this.spaced=!0;a.scope=new xa(null,this,null,null!=(b=a.referencedVars)?b:[]);var e=a.locals||[];b=0;for(d=e.length;b<d;b++){var p=e[b];a.scope.parameter(p)}b=[];if(!a.bare){var t=this.expressions;d=[];var c=p=0;for(e=t.length;p<e;c=++p){c=t[c];if(!(c.unwrap()instanceof n))break;d.push(c)}p=this.expressions.slice(d.length);this.expressions=
d;d.length&&(b=this.compileNode(ja(a,{indent:""})),b.push(this.makeCode("\n")));this.expressions=p}d=this.compileWithDeclarations(a);return a.bare?d:[].concat(b,this.makeCode("(function() {\n"),d,this.makeCode("\n}).call(this);\n"))};b.prototype.compileWithDeclarations=function(a){var d,b;var e=[];var p=this.expressions;var t=b=0;for(d=p.length;b<d;t=++b){var c=p[t];c=c.unwrap();if(!(c instanceof n||c instanceof z))break}a=ja(a,{level:N});t&&(c=this.expressions.splice(t,9E9),e=[this.spaced,!1],b=
e[0],this.spaced=e[1],b=[this.compileNode(a),b],e=b[0],this.spaced=b[1],this.expressions=c);c=this.compileNode(a);b=a.scope;b.expressions===this&&(d=a.scope.hasDeclarations(),a=b.hasAssignments,d||a?(t&&e.push(this.makeCode("\n")),e.push(this.makeCode(this.tab+"var ")),d&&e.push(this.makeCode(b.declaredVariables().join(", "))),a&&(d&&e.push(this.makeCode(",\n"+(this.tab+Ca))),e.push(this.makeCode(b.assignedVariables().join(",\n"+(this.tab+Ca))))),e.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):
e.length&&c.length&&e.push(this.makeCode("\n")));return e.concat(c)};b.wrap=function(a){return 1===a.length&&a[0]instanceof b?a[0]:new b(a)};return b}(sa);f.Literal=z=function(a){function b(a){this.value=a}v(b,a);b.prototype.isComplex=ka;b.prototype.assigns=function(a){return a===this.value};b.prototype.compileNode=function(a){return[this.makeCode(this.value)]};b.prototype.toString=function(){return" "+(this.isStatement()?b.__super__.toString.apply(this,arguments):this.constructor.name)+": "+this.value};
return b}(sa);f.NumberLiteral=w=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(z);f.InfinityLiteral=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.compileNode=function(){return[this.makeCode("2e308")]};return b}(w);f.NaNLiteral=function(a){function b(){b.__super__.constructor.call(this,"NaN")}v(b,a);b.prototype.compileNode=function(a){var d=[this.makeCode("0/0")];return a.level>=Fa?this.wrapInBraces(d):
d};return b}(w);f.StringLiteral=D=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(z);f.RegexLiteral=X=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(z);f.PassthroughLiteral=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(z);f.IdentifierLiteral=x=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.isAssignable=ha;
return b}(z);f.PropertyName=L=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.isAssignable=ha;return b}(z);f.StatementLiteral=W=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.isStatement=ha;b.prototype.makeReturn=na;b.prototype.jumps=function(a){if("break"===this.value&&!(null!=a&&a.loop||null!=a&&a.block)||"continue"===this.value&&(null==a||!a.loop))return this};b.prototype.compileNode=function(a){return[this.makeCode(""+
this.tab+this.value+";")]};return b}(z);f.ThisLiteral=E=function(a){function b(){b.__super__.constructor.call(this,"this")}v(b,a);b.prototype.compileNode=function(a){var d;a=null!=(d=a.scope.method)&&d.bound?a.scope.method.context:this.value;return[this.makeCode(a)]};return b}(z);f.UndefinedLiteral=ca=function(a){function b(){b.__super__.constructor.call(this,"undefined")}v(b,a);b.prototype.compileNode=function(a){return[this.makeCode(a.level>=Ga?"(void 0)":"void 0")]};return b}(z);f.NullLiteral=
c=function(a){function b(){b.__super__.constructor.call(this,"null")}v(b,a);return b}(z);f.BooleanLiteral=b=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(z);f.Return=G=function(a){function b(a){this.expression=a}v(b,a);b.prototype.children=["expression"];b.prototype.isStatement=ha;b.prototype.makeReturn=na;b.prototype.jumps=na;b.prototype.compileToFragments=function(a,d){var p;var e=null!=(p=this.expression)?p.makeReturn():void 0;return!e||e instanceof
b?b.__super__.compileToFragments.call(this,a,d):e.compileToFragments(a,d)};b.prototype.compileNode=function(a){var b=[];b.push(this.makeCode(this.tab+("return"+(this.expression?" ":""))));this.expression&&(b=b.concat(this.expression.compileToFragments(a,Ka)));b.push(this.makeCode(";"));return b};return b}(sa);f.YieldReturn=T=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.compileNode=function(a){null==a.scope.parent&&this.error("yield can only occur inside functions");
return b.__super__.compileNode.apply(this,arguments)};return b}(G);f.Value=C=function(a){function t(a,b,wa){if(!b&&a instanceof t)return a;this.base=a;this.properties=b||[];wa&&(this[wa]=!0);return this}v(t,a);t.prototype.children=["base","properties"];t.prototype.add=function(a){this.properties=this.properties.concat(a);return this};t.prototype.hasProperties=function(){return!!this.properties.length};t.prototype.bareLiteral=function(a){return!this.properties.length&&this.base instanceof a};t.prototype.isArray=
function(){return this.bareLiteral(q)};t.prototype.isRange=function(){return this.bareLiteral(V)};t.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()};t.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()};t.prototype.isNumber=function(){return this.bareLiteral(w)};t.prototype.isString=function(){return this.bareLiteral(D)};t.prototype.isRegex=function(){return this.bareLiteral(X)};t.prototype.isUndefined=function(){return this.bareLiteral(ca)};
t.prototype.isNull=function(){return this.bareLiteral(c)};t.prototype.isBoolean=function(){return this.bareLiteral(b)};t.prototype.isAtomic=function(){var a;var b=this.properties.concat(this.base);var wa=0;for(a=b.length;wa<a;wa++){var e=b[wa];if(e.soak||e instanceof ya)return!1}return!0};t.prototype.isNotCallable=function(){return this.isNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()||this.isUndefined()||this.isNull()||this.isBoolean()};
t.prototype.isStatement=function(a){return!this.properties.length&&this.base.isStatement(a)};t.prototype.assigns=function(a){return!this.properties.length&&this.base.assigns(a)};t.prototype.jumps=function(a){return!this.properties.length&&this.base.jumps(a)};t.prototype.isObject=function(a){return this.properties.length?!1:this.base instanceof m&&(!a||this.base.generated)};t.prototype.isSplice=function(){var a=this.properties;return a[a.length-1]instanceof aa};t.prototype.looksStatic=function(a){var b;
return this.base.value===a&&1===this.properties.length&&"prototype"!==(null!=(b=this.properties[0].name)?b.value:void 0)};t.prototype.unwrap=function(){return this.properties.length?this:this.base};t.prototype.cacheReference=function(a){var b=this.properties;var p=b[b.length-1];if(2>this.properties.length&&!this.base.isComplex()&&(null==p||!p.isComplex()))return[this,this];b=new t(this.base,this.properties.slice(0,-1));if(b.isComplex()){var e=new x(a.scope.freeVariable("base"));b=new t(new P(new y(e,
b)))}if(!p)return[b,e];if(p.isComplex()){var c=new x(a.scope.freeVariable("name"));p=new R(new y(c,p.index));c=new R(c)}return[b.add(p),new t(e||b.base,[c||p])]};t.prototype.compileNode=function(a){var b;this.base.front=this.front;var p=this.properties;var e=this.base.compileToFragments(a,p.length?Ga:null);p.length&&Pa.test(da(e))&&e.push(this.makeCode("."));var t=0;for(b=p.length;t<b;t++){var c=p[t];e.push.apply(e,c.compileToFragments(a))}return e};t.prototype.unfoldSoak=function(a){return null!=
this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(b){return function(){var d,e,p;if(e=b.base.unfoldSoak(a))return(d=e.body.properties).push.apply(d,b.properties),e;var c=b.properties;e=d=0;for(p=c.length;d<p;e=++d){var f=c[e];if(f.soak)return f.soak=!1,d=new t(b.base,b.properties.slice(0,e)),p=new t(b.base,b.properties.slice(e)),d.isComplex()&&(e=new x(a.scope.freeVariable("ref")),d=new P(new y(e,d)),p.base=e),new J(new B(d),p,{soak:!0})}return!1}}(this)()};return t}(sa);f.Comment=n=
function(a){function b(a){this.comment=a}v(b,a);b.prototype.isStatement=ha;b.prototype.makeReturn=na;b.prototype.compileNode=function(a,b){var d=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *");d="/*"+Ea(d,this.tab)+(0<=S.call(d,"\n")?"\n"+this.tab:"")+" */";(b||a.level)===N&&(d=a.indent+d);return[this.makeCode("\n"),this.makeCode(d)]};return b}(sa);f.Call=ya=function(a){function b(a,b,c){this.variable=a;this.args=null!=b?b:[];this.soak=c;this.isNew=!1;this.variable instanceof C&&this.variable.isNotCallable()&&
this.variable.error("literal is not a function")}v(b,a);b.prototype.children=["variable","args"];b.prototype.updateLocationDataIfMissing=function(a){var d;if(this.locationData&&this.needsUpdatedStartLocation){this.locationData.first_line=a.first_line;this.locationData.first_column=a.first_column;var p=(null!=(d=this.variable)?d.base:void 0)||this.variable;p.needsUpdatedStartLocation&&(this.variable.locationData.first_line=a.first_line,this.variable.locationData.first_column=a.first_column,p.updateLocationDataIfMissing(a));
delete this.needsUpdatedStartLocation}return b.__super__.updateLocationDataIfMissing.apply(this,arguments)};b.prototype.newInstance=function(){var a;var d=(null!=(a=this.variable)?a.base:void 0)||this.variable;d instanceof b&&!d.isNew?d.newInstance():this.isNew=!0;this.needsUpdatedStartLocation=!0;return this};b.prototype.unfoldSoak=function(a){var d,p;if(this.soak){if(this instanceof va){var e=new z(this.superReference(a));var c=new C(e)}else{if(c=Ba(a,this,"variable"))return c;c=(new C(this.variable)).cacheReference(a);
e=c[0];c=c[1]}c=new b(c,this.args);c.isNew=this.isNew;e=new z("typeof "+e.compile(a)+' \x3d\x3d\x3d "function"');return new J(e,new C(c),{soak:!0})}e=this;for(d=[];;)if(e.variable instanceof b)d.push(e),e=e.variable;else{if(!(e.variable instanceof C))break;d.push(e);if(!((e=e.variable.base)instanceof b))break}var t=d.reverse();d=0;for(p=t.length;d<p;d++)e=t[d],c&&(e.variable instanceof b?e.variable=c:e.variable.base=c),c=Ba(a,e,"variable");return c};b.prototype.compileNode=function(a){var b,p,e;null!=
(b=this.variable)&&(b.front=this.front);b=U.compileSplattedArray(a,this.args,!0);if(b.length)return this.compileSplat(a,b);b=[];var c=this.args;var t=p=0;for(e=c.length;p<e;t=++p){var f=c[t];t&&b.push(this.makeCode(", "));b.push.apply(b,f.compileToFragments(a,ta))}f=[];this instanceof va?(a=this.superReference(a)+(".call("+this.superThis(a)),b.length&&(a+=", "),f.push(this.makeCode(a))):(this.isNew&&f.push(this.makeCode("new ")),f.push.apply(f,this.variable.compileToFragments(a,Ga)),f.push(this.makeCode("(")));
f.push.apply(f,b);f.push(this.makeCode(")"));return f};b.prototype.compileSplat=function(a,b){var d;if(this instanceof va)return[].concat(this.makeCode(this.superReference(a)+".apply("+this.superThis(a)+", "),b,this.makeCode(")"));if(this.isNew){var e=this.tab+Ca;return[].concat(this.makeCode("(function(func, args, ctor) {\n"+e+"ctor.prototype \x3d func.prototype;\n"+e+"var child \x3d new ctor, result \x3d func.apply(child, args);\n"+e+"return Object(result) \x3d\x3d\x3d result ? result : child;\n"+
this.tab+"})("),this.variable.compileToFragments(a,ta),this.makeCode(", "),b,this.makeCode(", function(){})"))}e=[];var p=new C(this.variable);if((d=p.properties.pop())&&p.isComplex()){var c=a.scope.freeVariable("ref");e=e.concat(this.makeCode("("+c+" \x3d "),p.compileToFragments(a,ta),this.makeCode(")"),d.compileToFragments(a))}else p=p.compileToFragments(a,Ga),Pa.test(da(p))&&(p=this.wrapInBraces(p)),d?(c=da(p),p.push.apply(p,d.compileToFragments(a))):c="null",e=e.concat(p);return e.concat(this.makeCode(".apply("+
c+", "),b,this.makeCode(")"))};return b}(sa);f.SuperCall=va=function(a){function b(a){b.__super__.constructor.call(this,null,null!=a?a:[new U(new x("arguments"))]);this.isBare=null!=a}v(b,a);b.prototype.superReference=function(a){var b=a.scope.namedMethod();if(null!=b&&b.klass){var p=b.klass;var e=b.name;var c=b.variable;if(p.isComplex()){var t=new x(a.scope.parent.freeVariable("base"));var f=new C(new P(new y(t,p)));c.base=f;c.properties.splice(0,p.properties.length)}if(e.isComplex()||e instanceof
R&&e.index.isAssignable()){var g=new x(a.scope.parent.freeVariable("name"));e=new R(new y(g,e.index));c.properties.pop();c.properties.push(e)}f=[new qa(new L("__super__"))];b["static"]&&f.push(new qa(new L("constructor")));f.push(null!=g?new R(g):e);return(new C(null!=t?t:p,f)).compile(a)}return null!=b&&b.ctor?b.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")};b.prototype.superThis=function(a){return(a=a.scope.method)&&!a.klass&&a.context||"this"};return b}(ya);
f.RegexWithInterpolations=function(a){function b(a){null==a&&(a=[]);b.__super__.constructor.call(this,new C(new x("RegExp")),a,!1)}v(b,a);return b}(ya);f.TaggedTemplateCall=function(b){function c(b,d,t){d instanceof D&&(d=new A(a.wrap([new C(d)])));c.__super__.constructor.call(this,b,[d],t)}v(c,b);c.prototype.compileNode=function(a){a.inTaggedTemplateCall=!0;return this.variable.compileToFragments(a,Ga).concat(this.args[0].compileToFragments(a,ta))};return c}(ya);f.Extends=F=function(a){function b(a,
b){this.child=a;this.parent=b}v(b,a);b.prototype.children=["child","parent"];b.prototype.compileToFragments=function(a){return(new ya(new C(new z(Ia("extend",a))),[this.child,this.parent])).compileToFragments(a)};return b}(sa);f.Access=qa=function(a){function b(a,b){this.name=a;this.soak="soak"===b}v(b,a);b.prototype.children=["name"];b.prototype.compileToFragments=function(a){var b;a=this.name.compileToFragments(a);var p=this.name.unwrap();return p instanceof L?(b=p.value,0<=S.call(ma,b))?[this.makeCode('["')].concat(M.call(a),
[this.makeCode('"]')]):[this.makeCode(".")].concat(M.call(a)):[this.makeCode("[")].concat(M.call(a),[this.makeCode("]")])};b.prototype.isComplex=ka;return b}(sa);f.Index=R=function(a){function b(a){this.index=a}v(b,a);b.prototype.children=["index"];b.prototype.compileToFragments=function(a){return[].concat(this.makeCode("["),this.index.compileToFragments(a,Ka),this.makeCode("]"))};b.prototype.isComplex=function(){return this.index.isComplex()};return b}(sa);f.Range=V=function(a){function b(a,b,c){this.from=
a;this.to=b;this.equals=(this.exclusive="exclusive"===c)?"":"\x3d"}v(b,a);b.prototype.children=["from","to"];b.prototype.compileVariables=function(a){a=ja(a,{top:!0});var b=la(a,"isComplex");var p=this.cacheToCodeFragments(this.from.cache(a,ta,b));this.fromC=p[0];this.fromVar=p[1];p=this.cacheToCodeFragments(this.to.cache(a,ta,b));this.toC=p[0];this.toVar=p[1];if(p=la(a,"step"))a=this.cacheToCodeFragments(p.cache(a,ta,b)),this.step=a[0],this.stepVar=a[1];this.fromNum=this.from.isNumber()?Number(this.fromVar):
null;this.toNum=this.to.isNumber()?Number(this.toVar):null;return this.stepNum=null!=p&&p.isNumber()?Number(this.stepVar):null};b.prototype.compileNode=function(a){var b,p,e,c;this.fromVar||this.compileVariables(a);if(!a.index)return this.compileArray(a);var t=null!=this.fromNum&&null!=this.toNum;var f=la(a,"index");var g=(a=la(a,"name"))&&a!==f;var k=f+" \x3d "+this.fromC;this.toC!==this.toVar&&(k+=", "+this.toC);this.step!==this.stepVar&&(k+=", "+this.step);var h=[f+" \x3c"+this.equals,f+" \x3e"+
this.equals];var m=h[0];h=h[1];m=null!=this.stepNum?0<this.stepNum?m+" "+this.toVar:h+" "+this.toVar:t?(e=[this.fromNum,this.toNum],p=e[0],c=e[1],e,p<=c?m+" "+c:h+" "+c):(b=this.stepVar?this.stepVar+" \x3e 0":this.fromVar+" \x3c\x3d "+this.toVar,b+" ? "+m+" "+this.toVar+" : "+h+" "+this.toVar);b=this.stepVar?f+" +\x3d "+this.stepVar:t?g?p<=c?"++"+f:"--"+f:p<=c?f+"++":f+"--":g?b+" ? ++"+f+" : --"+f:b+" ? "+f+"++ : "+f+"--";g&&(k=a+" \x3d "+k);g&&(b=a+" \x3d "+b);return[this.makeCode(k+"; "+m+"; "+
b)]};b.prototype.compileArray=function(a){var b,p,e;if((b=null!=this.fromNum&&null!=this.toNum)&&20>=Math.abs(this.fromNum-this.toNum)){var c=function(){e=[];for(var a=p=this.fromNum,b=this.toNum;p<=b?a<=b:a>=b;p<=b?a++:a--)e.push(a);return e}.apply(this);this.exclusive&&c.pop();return[this.makeCode("["+c.join(", ")+"]")]}var t=this.tab+Ca;var f=a.scope.freeVariable("i",{single:!0});var g=a.scope.freeVariable("results");var k="\n"+t+g+" \x3d [];";if(b)a.index=f,b=da(this.compileNode(a));else{var h=
f+" \x3d "+this.fromC+(this.toC!==this.toVar?", "+this.toC:"");b=this.fromVar+" \x3c\x3d "+this.toVar;b="var "+h+"; "+b+" ? "+f+" \x3c"+this.equals+" "+this.toVar+" : "+f+" \x3e"+this.equals+" "+this.toVar+"; "+b+" ? "+f+"++ : "+f+"--"}f="{ "+g+".push("+f+"); }\n"+t+"return "+g+";\n"+a.indent;a=function(a){return null!=a?a.contains(Va):void 0};if(a(this.from)||a(this.to))c=", arguments";return[this.makeCode("(function() {"+k+"\n"+t+"for ("+b+")"+f+"}).apply(this"+(null!=c?c:"")+")")]};return b}(sa);
f.Slice=aa=function(a){function b(a){this.range=a;b.__super__.constructor.call(this)}v(b,a);b.prototype.children=["range"];b.prototype.compileNode=function(a){var b=this.range;var p=b.to;var e=(b=b.from)&&b.compileToFragments(a,Ka)||[this.makeCode("0")];if(p){b=p.compileToFragments(a,Ka);var c=da(b);if(this.range.exclusive||-1!==+c)var t=", "+(this.range.exclusive?c:p.isNumber()?""+(+c+1):(b=p.compileToFragments(a,Ga),"+"+da(b)+" + 1 || 9e9"))}return[this.makeCode(".slice("+da(e)+(t||"")+")")]};return b}(sa);
f.Obj=m=function(a){function b(a,b){this.generated=null!=b?b:!1;this.objects=this.properties=a||[]}v(b,a);b.prototype.children=["properties"];b.prototype.compileNode=function(a){var b,p,e;var c=this.properties;if(this.generated){var t=0;for(b=c.length;t<b;t++){var f=c[t];f instanceof C&&f.error("cannot have an implicit value in an implicit object")}}t=b=0;for(f=c.length;b<f;t=++b){var g=c[t];if((g.variable||g).base instanceof P)break}f=t<c.length;var k=a.indent+=Ca;var h=this.lastNonComment(this.properties);
b=[];if(f){var m=a.scope.freeVariable("obj");b.push(this.makeCode("(\n"+k+m+" \x3d "))}b.push(this.makeCode("{"+(0===c.length||0===t?"}":"\n")));var l=p=0;for(e=c.length;p<e;l=++p){g=c[l];l===t&&(0!==l&&b.push(this.makeCode("\n"+k+"}")),b.push(this.makeCode(",\n")));var w=l===c.length-1||l===t-1?"":g===h||g instanceof n?"\n":",\n";var q=g instanceof n?"":k;f&&l<t&&(q+=Ca);g instanceof y&&("object"!==g.context&&g.operatorToken.error("unexpected "+g.operatorToken.value),g.variable instanceof C&&g.variable.hasProperties()&&
g.variable.error("invalid object key"));g instanceof C&&g["this"]&&(g=new y(g.properties[0].name,g,"object"));g instanceof n||(l<t?g instanceof y||(g=new y(g,g,"object")):(g instanceof y?(l=g.variable,g=g.value):(g=g.base.cache(a),l=g[0],g=g[1],l instanceof x&&(l=new L(l.value))),g=new y(new C(new x(m),[new qa(l)]),g)));q&&b.push(this.makeCode(q));b.push.apply(b,g.compileToFragments(a,N));w&&b.push(this.makeCode(w))}f?b.push(this.makeCode(",\n"+k+m+"\n"+this.tab+")")):0!==c.length&&b.push(this.makeCode("\n"+
this.tab+"}"));return this.front&&!f?this.wrapInBraces(b):b};b.prototype.assigns=function(a){var b;var p=this.properties;var e=0;for(b=p.length;e<b;e++){var c=p[e];if(c.assigns(a))return!0}return!1};return b}(sa);f.Arr=q=function(a){function b(a){this.objects=a||[]}v(b,a);b.prototype.children=["objects"];b.prototype.compileNode=function(a){var b;if(!this.objects.length)return[this.makeCode("[]")];a.indent+=Ca;var p=U.compileSplattedArray(a,this.objects);if(p.length)return p;p=[];var e=this.objects;
var c=[];var t=0;for(b=e.length;t<b;t++){var f=e[t];c.push(f.compileToFragments(a,ta))}t=b=0;for(e=c.length;b<e;t=++b)f=c[t],t&&p.push(this.makeCode(", ")),p.push.apply(p,f);0<=da(p).indexOf("\n")?(p.unshift(this.makeCode("[\n"+a.indent)),p.push(this.makeCode("\n"+this.tab+"]"))):(p.unshift(this.makeCode("[")),p.push(this.makeCode("]")));return p};b.prototype.assigns=function(a){var b;var p=this.objects;var e=0;for(b=p.length;e<b;e++){var c=p[e];if(c.assigns(a))return!0}return!1};return b}(sa);f.Class=
g=function(b){function c(b,d,c){this.variable=b;this.parent=d;this.body=null!=c?c:new a;this.boundFuncs=[];this.body.classBody=!0}v(c,b);c.prototype.children=["variable","parent","body"];c.prototype.defaultClassVariableName="_Class";c.prototype.determineName=function(){var a;if(!this.variable)return this.defaultClassVariableName;var b=this.variable.properties;b=(a=b[b.length-1])?a instanceof qa&&a.name:this.variable.base;if(!(b instanceof x||b instanceof L))return this.defaultClassVariableName;b=
b.value;a||(a=za(b))&&this.variable.error(a);return 0<=S.call(ma,b)?"_"+b:b};c.prototype.setContext=function(a){return this.body.traverseChildren(!1,function(b){if(b.classBody)return!1;if(b instanceof E)return b.value=a;if(b instanceof h&&b.bound)return b.context=a})};c.prototype.addBoundFunctions=function(a){var b;var p=this.boundFuncs;var e=0;for(b=p.length;e<b;e++){var c=p[e];c=(new C(new E,[new qa(c)])).compile(a);this.ctor.body.unshift(new z(c+" \x3d "+Ia("bind",a)+"("+c+", this)"))}};c.prototype.addProperties=
function(a,b,c){var d;var p=a.base.properties.slice(0);var f;for(f=[];d=p.shift();){if(d instanceof y){var t=d.variable.base;delete d.context;var g=d.value;"constructor"===t.value?(this.ctor&&d.error("cannot define more than one constructor in a class"),g.bound&&d.error("cannot define a constructor as a bound function"),g instanceof h?d=this.ctor=g:(this.externalCtor=c.classScope.freeVariable("ctor"),d=new y(new x(this.externalCtor),g))):d.variable["this"]?g["static"]=!0:(a=t.isComplex()?new R(t):
new qa(t),d.variable=new C(new x(b),[new qa(new L("prototype")),a]),g instanceof h&&g.bound&&(this.boundFuncs.push(t),g.bound=!1))}f.push(d)}return fa(f)};c.prototype.walkBody=function(b,d){return this.traverseChildren(!1,function(p){return function(e){var f,t,g;var wa=!0;if(e instanceof c)return!1;if(e instanceof a){var k=f=e.expressions;var h=t=0;for(g=k.length;t<g;h=++t){var m=k[h];m instanceof y&&m.variable.looksStatic(b)?m.value["static"]=!0:m instanceof C&&m.isObject(!0)&&(wa=!1,f[h]=p.addProperties(m,
b,d))}e.expressions=ia(f)}return wa&&!(e instanceof c)}}(this))};c.prototype.hoistDirectivePrologue=function(){var a,b;var c=0;for(a=this.body.expressions;(b=a[c])&&b instanceof n||b instanceof C&&b.isString();)++c;return this.directives=a.splice(0,c)};c.prototype.ensureConstructor=function(a){this.ctor||(this.ctor=new h,this.externalCtor?this.ctor.body.push(new z(this.externalCtor+".apply(this, arguments)")):this.parent&&this.ctor.body.push(new z(a+".__super__.constructor.apply(this, arguments)")),
this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor));this.ctor.ctor=this.ctor.name=a;this.ctor.klass=null;return this.ctor.noReturn=!0};c.prototype.compileNode=function(b){var d,c,e;(c=this.body.jumps())&&c.error("Class bodies cannot contain pure statements");(d=this.body.contains(Va))&&d.error("Class bodies shouldn't reference arguments");var p=this.determineName();var f=new x(p);c=new h([],a.wrap([this.body]));d=[];b.classScope=c.makeScope(b.scope);this.hoistDirectivePrologue();
this.setContext(p);this.walkBody(p,b);this.ensureConstructor(p);this.addBoundFunctions(b);this.body.spaced=!0;this.body.expressions.push(f);this.parent&&(p=new x(b.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new F(f,p)),c.params.push(new K(p)),d.push(this.parent));(e=this.body.expressions).unshift.apply(e,this.directives);e=new P(new ya(c,d));this.variable&&(e=new y(this.variable,e,null,{moduleDeclaration:this.moduleDeclaration}));return e.compileToFragments(b)};
return c}(sa);f.ModuleDeclaration=Z=function(a){function b(a,b){this.clause=a;this.source=b;this.checkSource()}v(b,a);b.prototype.children=["clause","source"];b.prototype.isStatement=ha;b.prototype.jumps=na;b.prototype.makeReturn=na;b.prototype.checkSource=function(){if(null!=this.source&&this.source instanceof A)return this.source.error("the name of the module to be imported from must be an uninterpolated string")};b.prototype.checkScope=function(a,b){if(0!==a.indent.length)return this.error(b+" statements must be at top-level scope")};
return b}(sa);f.ImportDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.compileNode=function(a){var b;this.checkScope(a,"import");a.importedSymbols=[];var c=[];c.push(this.makeCode(this.tab+"import "));null!=this.clause&&c.push.apply(c,this.clause.compileNode(a));null!=(null!=(b=this.source)?b.value:void 0)&&(null!==this.clause&&c.push(this.makeCode(" from ")),c.push(this.makeCode(this.source.value)));c.push(this.makeCode(";"));return c};
return b}(Z);f.ImportClause=function(a){function b(a,b){this.defaultBinding=a;this.namedImports=b}v(b,a);b.prototype.children=["defaultBinding","namedImports"];b.prototype.compileNode=function(a){var b=[];null!=this.defaultBinding&&(b.push.apply(b,this.defaultBinding.compileNode(a)),null!=this.namedImports&&b.push(this.makeCode(", ")));null!=this.namedImports&&b.push.apply(b,this.namedImports.compileNode(a));return b};return b}(sa);f.ExportDeclaration=Z=function(b){function c(){return c.__super__.constructor.apply(this,
arguments)}v(c,b);c.prototype.compileNode=function(b){var d;this.checkScope(b,"export");var c=[];c.push(this.makeCode(this.tab+"export "));this instanceof I&&c.push(this.makeCode("default "));this instanceof I||!(this.clause instanceof y||this.clause instanceof g)||(this.clause instanceof g&&!this.clause.variable&&this.clause.error("anonymous classes cannot be exported"),c.push(this.makeCode("var ")),this.clause.moduleDeclaration="export");c=null!=this.clause.body&&this.clause.body instanceof a?c.concat(this.clause.compileToFragments(b,
N)):c.concat(this.clause.compileNode(b));null!=(null!=(d=this.source)?d.value:void 0)&&c.push(this.makeCode(" from "+this.source.value));c.push(this.makeCode(";"));return c};return c}(Z);f.ExportNamedDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Z);f.ExportDefaultDeclaration=I=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Z);f.ExportAllDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}v(b,a);return b}(Z);f.ModuleSpecifierList=Z=function(a){function b(a){this.specifiers=a}v(b,a);b.prototype.children=["specifiers"];b.prototype.compileNode=function(a){var b;var c=[];a.indent+=Ca;var e=this.specifiers;var p=[];var f=0;for(b=e.length;f<b;f++){var g=e[f];p.push(g.compileToFragments(a,ta))}if(0!==this.specifiers.length){c.push(this.makeCode("{\n"+a.indent));f=b=0;for(e=p.length;b<e;f=++b)g=p[f],f&&c.push(this.makeCode(",\n"+a.indent)),c.push.apply(c,g);c.push(this.makeCode("\n}"))}else c.push(this.makeCode("{}"));
return c};return b}(sa);f.ImportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Z);f.ExportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Z);f.ModuleSpecifier=l=function(a){function b(a,b,c){this.original=a;this.alias=b;this.moduleDeclarationType=c;this.identifier=null!=this.alias?this.alias.value:this.original.value}v(b,a);b.prototype.children=["original","alias"];b.prototype.compileNode=
function(a){a.scope.find(this.identifier,this.moduleDeclarationType);a=[];a.push(this.makeCode(this.original.value));null!=this.alias&&a.push(this.makeCode(" as "+this.alias.value));return a};return b}(sa);f.ImportSpecifier=Z=function(a){function b(a,d){b.__super__.constructor.call(this,a,d,"import")}v(b,a);b.prototype.compileNode=function(a){var d;(d=this.identifier,0<=S.call(a.importedSymbols,d))||a.scope.check(this.identifier)?this.error("'"+this.identifier+"' has already been declared"):a.importedSymbols.push(this.identifier);
return b.__super__.compileNode.call(this,a)};return b}(l);f.ImportDefaultSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Z);f.ImportNamespaceSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Z);f.ExportSpecifier=function(a){function b(a,d){b.__super__.constructor.call(this,a,d,"export")}v(b,a);return b}(l);f.Assign=y=function(a){function b(a,b,c,e){this.variable=a;this.value=b;this.context=
c;null==e&&(e={});this.param=e.param;this.subpattern=e.subpattern;this.operatorToken=e.operatorToken;this.moduleDeclaration=e.moduleDeclaration}v(b,a);b.prototype.children=["variable","value"];b.prototype.isStatement=function(a){return(null!=a?a.level:void 0)===N&&null!=this.context&&(this.moduleDeclaration||0<=S.call(this.context,"?"))};b.prototype.checkAssignability=function(a,b){if(Object.prototype.hasOwnProperty.call(a.scope.positions,b.value)&&"import"===a.scope.variables[a.scope.positions[b.value]].type)return b.error("'"+
b.value+"' is read-only")};b.prototype.assigns=function(a){return this["object"===this.context?"value":"variable"].assigns(a)};b.prototype.unfoldSoak=function(a){return Ba(a,this,"variable")};b.prototype.compileNode=function(a){var b,c,e,p,f,g,k;if(c=this.variable instanceof C){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(a);if(this.variable.isSplice())return this.compileSplice(a);if("||\x3d"===(p=this.context)||"\x26\x26\x3d"===p||"?\x3d"===p)return this.compileConditional(a);
if("**\x3d"===(f=this.context)||"//\x3d"===f||"%%\x3d"===f)return this.compileSpecialMath(a)}this.value instanceof h&&(this.value["static"]?(this.value.klass=this.variable.base,this.value.name=this.variable.properties[0],this.value.variable=this.variable):2<=(null!=(g=this.variable.properties)?g.length:void 0)&&(g=this.variable.properties,p=3<=g.length?M.call(g,0,e=g.length-2):(e=0,[]),f=g[e++],e=g[e++],"prototype"===(null!=(k=f.name)?k.value:void 0)&&(this.value.klass=new C(this.variable.base,p),
this.value.name=e,this.value.variable=this.variable)));this.context||(k=this.variable.unwrapAll(),k.isAssignable()||this.variable.error("'"+this.variable.compile(a)+"' can't be assigned"),"function"===typeof k.hasProperties&&k.hasProperties()||(this.moduleDeclaration?(this.checkAssignability(a,k),a.scope.add(k.value,this.moduleDeclaration)):this.param?a.scope.add(k.value,"var"):(this.checkAssignability(a,k),a.scope.find(k.value))));k=this.value.compileToFragments(a,ta);c&&this.variable.base instanceof
m&&(this.variable.front=!0);c=this.variable.compileToFragments(a,ta);if("object"===this.context){if(b=da(c),0<=S.call(ma,b))c.unshift(this.makeCode('"')),c.push(this.makeCode('"'));return c.concat(this.makeCode(": "),k)}b=c.concat(this.makeCode(" "+(this.context||"\x3d")+" "),k);return a.level<=ta?b:this.wrapInBraces(b)};b.prototype.compilePatternMatch=function(a){var d,c,e;var p=a.level===N;var f=this.value;var g=this.variable.base.objects;if(!(e=g.length)){var t=f.compileToFragments(a);return a.level>=
Fa?this.wrapInBraces(t):t}var h=g[0];1===e&&h instanceof H&&h.error("Destructuring assignment has no target");var m=this.variable.isObject();if(p&&1===e&&!(h instanceof U)){var l=null;if(h instanceof b&&"object"===h.context){t=h;var n=t.variable;var q=n.base;h=t.value;h instanceof b&&(l=h.value,h=h.variable)}else h instanceof b&&(l=h.value,h=h.variable),q=m?h["this"]?h.properties[0].name:new L(h.unwrap().value):new w(0);var r=q.unwrap()instanceof L;f=new C(f);f.properties.push(new (r?qa:R)(q));(c=
za(h.unwrap().value))&&h.error(c);l&&(f=new k("?",f,l));return(new b(h,f,null,{param:this.param})).compileToFragments(a,N)}var v=f.compileToFragments(a,ta);var y=da(v);t=[];n=!1;f.unwrap()instanceof x&&!this.variable.assigns(y)||(t.push([this.makeCode((l=a.scope.freeVariable("ref"))+" \x3d ")].concat(M.call(v))),v=[this.makeCode(l)],y=l);l=f=0;for(d=g.length;f<d;l=++f){h=g[l];q=l;if(!n&&h instanceof U){c=h.name.unwrap().value;h=h.unwrap();q=e+" \x3c\x3d "+y+".length ? "+Ia("slice",a)+".call("+y+", "+
l;if(r=e-l-1){var u=a.scope.freeVariable("i",{single:!0});q+=", "+u+" \x3d "+y+".length - "+r+") : ("+u+" \x3d "+l+", [])"}else q+=") : []";q=new z(q);n=u+"++"}else if(!n&&h instanceof H){if(r=e-l-1)1===r?n=y+".length - 1":(u=a.scope.freeVariable("i",{single:!0}),q=new z(u+" \x3d "+y+".length - "+r),n=u+"++",t.push(q.compileToFragments(a,ta)));continue}else(h instanceof U||h instanceof H)&&h.error("multiple splats/expansions are disallowed in an assignment"),l=null,h instanceof b&&"object"===h.context?
(q=h.variable,q=q.base,h=h.value,h instanceof b&&(l=h.value,h=h.variable)):(h instanceof b&&(l=h.value,h=h.variable),q=m?h["this"]?h.properties[0].name:new L(h.unwrap().value):new z(n||q)),c=h.unwrap().value,r=q.unwrap()instanceof L,q=new C(new z(y),[new (r?qa:R)(q)]),l&&(q=new k("?",q,l));null!=c&&(c=za(c))&&h.error(c);t.push((new b(h,q,null,{param:this.param,subpattern:!0})).compileToFragments(a,ta))}p||this.subpattern||t.push(v);t=this.joinFragmentArrays(t,", ");return a.level<ta?t:this.wrapInBraces(t)};
b.prototype.compileConditional=function(a){var d=this.variable.cacheReference(a);var c=d[0];d=d[1];c.properties.length||!(c.base instanceof z)||c.base instanceof E||a.scope.check(c.base.value)||this.variable.error('the variable "'+c.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before");if(0<=S.call(this.context,"?"))return a.isExistentialEquals=!0,(new J(new B(c),d,{type:"if"})).addElse(new b(d,this.value,"\x3d")).compileToFragments(a);c=(new k(this.context.slice(0,
-1),c,new b(d,this.value,"\x3d"))).compileToFragments(a);return a.level<=ta?c:this.wrapInBraces(c)};b.prototype.compileSpecialMath=function(a){var d=this.variable.cacheReference(a);var c=d[0];d=d[1];return(new b(c,new k(this.context.slice(0,-1),d,this.value))).compileToFragments(a)};b.prototype.compileSplice=function(a){var b=this.variable.properties.pop().range;var c=b.from;var e=b.to;var p=b.exclusive;var f=this.variable.compile(a);if(c){var g=this.cacheToCodeFragments(c.cache(a,Fa));b=g[0];g=g[1]}else b=
g="0";e?null!=c&&c.isNumber()&&e.isNumber()?(e=e.compile(a)-g,p||(e+=1)):(e=e.compile(a,Ga)+" - "+g,p||(e+=" + 1")):e="9e9";p=this.value.cache(a,ta);c=p[0];p=p[1];e=[].concat(this.makeCode("[].splice.apply("+f+", ["+b+", "+e+"].concat("),c,this.makeCode(")), "),p);return a.level>N?this.wrapInBraces(e):e};return b}(sa);f.Code=h=function(b){function c(b,d,c){this.params=b||[];this.body=d||new a;this.bound="boundfunc"===c;this.isGenerator=!!this.body.contains(function(a){return a instanceof k&&a.isYield()||
a instanceof T})}v(c,b);c.prototype.children=["params","body"];c.prototype.isStatement=function(){return!!this.ctor};c.prototype.jumps=ka;c.prototype.makeScope=function(a){return new xa(a,this.body,this)};c.prototype.compileNode=function(b){var d,f,e,g;this.bound&&null!=(d=b.scope.method)&&d.bound&&(this.context=b.scope.method.context);if(this.bound&&!this.context)return this.context="_this",d=new c([new K(new x(this.context))],new a([this])),d=new ya(d,[new E]),d.updateLocationDataIfMissing(this.locationData),
d.compileNode(b);b.scope=la(b,"classScope")||this.makeScope(b.scope);b.scope.shared=la(b,"sharedScope");b.indent+=Ca;delete b.bare;delete b.isExistentialEquals;d=[];var p=[];var h=this.params;var t=0;for(e=h.length;t<e;t++){var l=h[t];l instanceof H||b.scope.parameter(l.asReference(b))}h=this.params;t=0;for(e=h.length;t<e;t++)if(l=h[t],l.splat||l instanceof H){t=this.params;var m=0;for(l=t.length;m<l;m++){var n=t[m];n instanceof H||!n.name.value||b.scope.add(n.name.value,"var",!0)}m=new y(new C(new q(function(){var a;
var d=this.params;var e=[];var c=0;for(a=d.length;c<a;c++)n=d[c],e.push(n.asReference(b));return e}.call(this))),new C(new x("arguments")));break}var w=this.params;h=0;for(t=w.length;h<t;h++){l=w[h];if(l.isComplex()){var r=g=l.asReference(b);l.value&&(r=new k("?",g,l.value));p.push(new y(new C(l.name),r,"\x3d",{param:!0}))}else g=l,l.value&&(e=new z(g.name.value+" \x3d\x3d null"),r=new y(new C(l.name),l.value,"\x3d"),p.push(new J(e,r)));m||d.push(g)}l=this.body.isEmpty();m&&p.unshift(m);p.length&&
(f=this.body.expressions).unshift.apply(f,p);f=m=0;for(p=d.length;m<p;f=++m)n=d[f],d[f]=n.compileToFragments(b),b.scope.parameter(da(d[f]));var v=[];this.eachParamName(function(a,b){0<=S.call(v,a)&&b.error("multiple parameters named "+a);return v.push(a)});l||this.noReturn||this.body.makeReturn();f="function";this.isGenerator&&(f+="*");this.ctor&&(f+=" "+this.name);p=[this.makeCode(f+"(")];f=l=0;for(m=d.length;l<m;f=++l)n=d[f],f&&p.push(this.makeCode(", ")),p.push.apply(p,n);p.push(this.makeCode(") {"));
this.body.isEmpty()||(p=p.concat(this.makeCode("\n"),this.body.compileWithDeclarations(b),this.makeCode("\n"+this.tab)));p.push(this.makeCode("}"));return this.ctor?[this.makeCode(this.tab)].concat(M.call(p)):this.front||b.level>=Ga?this.wrapInBraces(p):p};c.prototype.eachParamName=function(a){var b;var c=this.params;var e=[];var f=0;for(b=c.length;f<b;f++){var p=c[f];e.push(p.eachName(a))}return e};c.prototype.traverseChildren=function(a,b){if(a)return c.__super__.traverseChildren.call(this,a,b)};
return c}(sa);f.Param=K=function(a){function b(a,b,c){this.name=a;this.value=b;this.splat=c;(a=za(this.name.unwrapAll().value))&&this.name.error(a);this.name instanceof m&&this.name.generated&&(a=this.name.objects[0].operatorToken,a.error("unexpected "+a.value))}v(b,a);b.prototype.children=["name","value"];b.prototype.compileToFragments=function(a){return this.name.compileToFragments(a,ta)};b.prototype.asReference=function(a){if(this.reference)return this.reference;var b=this.name;b["this"]?(b=b.properties[0].name.value,
0<=S.call(ma,b)&&(b="_"+b),b=new x(a.scope.freeVariable(b))):b.isComplex()&&(b=new x(a.scope.freeVariable("arg")));b=new C(b);this.splat&&(b=new U(b));b.updateLocationDataIfMissing(this.locationData);return this.reference=b};b.prototype.isComplex=function(){return this.name.isComplex()};b.prototype.eachName=function(a,b){var d,e;null==b&&(b=this.name);var c=function(b){return a("@"+b.properties[0].name.value,b)};if(b instanceof z)return a(b.value,b);if(b instanceof C)return c(b);b=null!=(d=b.objects)?
d:[];d=0;for(e=b.length;d<e;d++){var f=b[d];f instanceof y&&null==f.context&&(f=f.variable);f instanceof y?(f.value instanceof y&&(f=f.value),this.eachName(a,f.value.unwrap())):f instanceof U?(f=f.name.unwrap(),a(f.value,f)):f instanceof C?f.isArray()||f.isObject()?this.eachName(a,f.base):f["this"]?c(f):a(f.base.value,f.base):f instanceof H||f.error("illegal parameter "+f.compile())}};return b}(sa);f.Splat=U=function(a){function b(a){this.name=a.compile?a:new z(a)}v(b,a);b.prototype.children=["name"];
b.prototype.isAssignable=ha;b.prototype.assigns=function(a){return this.name.assigns(a)};b.prototype.compileToFragments=function(a){return this.name.compileToFragments(a)};b.prototype.unwrap=function(){return this.name};b.compileSplattedArray=function(a,d,c){var e,f,g,p;for(f=-1;(e=d[++f])&&!(e instanceof b););if(f>=d.length)return[];if(1===d.length)return e=d[0],d=e.compileToFragments(a,ta),c?d:[].concat(e.makeCode(Ia("slice",a)+".call("),d,e.makeCode(")"));c=d.slice(f);var h=g=0;for(p=c.length;g<
p;h=++g){e=c[h];var k=e.compileToFragments(a,ta);c[h]=e instanceof b?[].concat(e.makeCode(Ia("slice",a)+".call("),k,e.makeCode(")")):[].concat(e.makeCode("["),k,e.makeCode("]"))}if(0===f)return e=d[0],a=e.joinFragmentArrays(c.slice(1),", "),c[0].concat(e.makeCode(".concat("),a,e.makeCode(")"));g=d.slice(0,f);p=[];k=0;for(h=g.length;k<h;k++)e=g[k],p.push(e.compileToFragments(a,ta));e=d[0].joinFragmentArrays(p,", ");a=d[f].joinFragmentArrays(c,", ");c=d[d.length-1];return[].concat(d[0].makeCode("["),
e,d[f].makeCode("].concat("),a,c.makeCode(")"))};return b}(sa);f.Expansion=H=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.isComplex=ka;b.prototype.compileNode=function(a){return this.error("Expansion must be used inside a destructuring assignment or parameter list")};b.prototype.asReference=function(a){return this};b.prototype.eachName=function(a){};return b}(sa);f.While=Z=function(b){function c(a,b){this.condition=null!=b&&b.invert?a.invert():a;
this.guard=null!=b?b.guard:void 0}v(c,b);c.prototype.children=["condition","guard","body"];c.prototype.isStatement=ha;c.prototype.makeReturn=function(a){if(a)return c.__super__.makeReturn.apply(this,arguments);this.returns=!this.jumps({loop:!0});return this};c.prototype.addBody=function(a){this.body=a;return this};c.prototype.jumps=function(){var a;var b=this.body.expressions;if(!b.length)return!1;var c=0;for(a=b.length;c<a;c++){var e=b[c];if(e=e.jumps({loop:!0}))return e}return!1};c.prototype.compileNode=
function(b){var d;b.indent+=Ca;var c="";var e=this.body;e.isEmpty()?e=this.makeCode(""):(this.returns&&(e.makeReturn(d=b.scope.freeVariable("results")),c=""+this.tab+d+" \x3d [];\n"),this.guard&&(1<e.expressions.length?e.expressions.unshift(new J((new P(this.guard)).invert(),new W("continue"))):this.guard&&(e=a.wrap([new J(this.guard,e)]))),e=[].concat(this.makeCode("\n"),e.compileToFragments(b,N),this.makeCode("\n"+this.tab)));b=[].concat(this.makeCode(c+this.tab+"while ("),this.condition.compileToFragments(b,
Ka),this.makeCode(") {"),e,this.makeCode("}"));this.returns&&b.push(this.makeCode("\n"+this.tab+"return "+d+";"));return b};return c}(sa);f.Op=k=function(a){function b(a,b,d,f){if("in"===a)return new O(b,d);if("do"===a)return this.generateDo(b);if("new"===a){if(b instanceof ya&&!b["do"]&&!b.isNew)return b.newInstance();if(b instanceof h&&b.bound||b["do"])b=new P(b)}this.operator=c[a]||a;this.first=b;this.second=d;this.flip=!!f;return this}v(b,a);var c={"\x3d\x3d":"\x3d\x3d\x3d","!\x3d":"!\x3d\x3d",
of:"in",yieldfrom:"yield*"};var d={"!\x3d\x3d":"\x3d\x3d\x3d","\x3d\x3d\x3d":"!\x3d\x3d"};b.prototype.children=["first","second"];b.prototype.isNumber=function(){var a;return this.isUnary()&&("+"===(a=this.operator)||"-"===a)&&this.first instanceof C&&this.first.isNumber()};b.prototype.isYield=function(){var a;return"yield"===(a=this.operator)||"yield*"===a};b.prototype.isUnary=function(){return!this.second};b.prototype.isComplex=function(){return!this.isNumber()};b.prototype.isChainable=function(){var a;
return"\x3c"===(a=this.operator)||"\x3e"===a||"\x3e\x3d"===a||"\x3c\x3d"===a||"\x3d\x3d\x3d"===a||"!\x3d\x3d"===a};b.prototype.invert=function(){var a,e;if(this.isChainable()&&this.first.isChainable()){var c=!0;for(a=this;a&&a.operator;)c&&(c=a.operator in d),a=a.first;if(!c)return(new P(this)).invert();for(a=this;a&&a.operator;)a.invert=!a.invert,a.operator=d[a.operator],a=a.first;return this}return(a=d[this.operator])?(this.operator=a,this.first.unwrap()instanceof b&&this.first.invert(),this):this.second?
(new P(this)).invert():"!"===this.operator&&(c=this.first.unwrap())instanceof b&&("!"===(e=c.operator)||"in"===e||"instanceof"===e)?c:new b("!",this)};b.prototype.unfoldSoak=function(a){var b;return("++"===(b=this.operator)||"--"===b||"delete"===b)&&Ba(a,this,"first")};b.prototype.generateDo=function(a){var b,d;var c=[];var f=(a instanceof y&&(b=a.value.unwrap())instanceof h?b:a).params||[];b=0;for(d=f.length;b<d;b++){var g=f[b];g.value?(c.push(g.value),delete g.value):c.push(g)}a=new ya(a,c);a["do"]=
!0;return a};b.prototype.compileNode=function(a){var b;var d=this.isChainable()&&this.first.isChainable();d||(this.first.front=this.front);"delete"===this.operator&&a.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var");("--"===(b=this.operator)||"++"===b)&&(b=za(this.first.unwrapAll().value))&&this.first.error(b);if(this.isYield())return this.compileYield(a);if(this.isUnary())return this.compileUnary(a);if(d)return this.compileChain(a);switch(this.operator){case "?":return this.compileExistence(a);
case "**":return this.compilePower(a);case "//":return this.compileFloorDivision(a);case "%%":return this.compileModulo(a);default:return d=this.first.compileToFragments(a,Fa),b=this.second.compileToFragments(a,Fa),d=[].concat(d,this.makeCode(" "+this.operator+" "),b),a.level<=Fa?d:this.wrapInBraces(d)}};b.prototype.compileChain=function(a){var b=this.first.second.cache(a);this.first.second=b[0];b=b[1];a=this.first.compileToFragments(a,Fa).concat(this.makeCode(" "+(this.invert?"\x26\x26":"||")+" "),
b.compileToFragments(a),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(a,Fa));return this.wrapInBraces(a)};b.prototype.compileExistence=function(a){if(this.first.isComplex()){var b=new x(a.scope.freeVariable("ref"));var d=new P(new y(b,this.first))}else b=d=this.first;return(new J(new B(d),b,{type:"if"})).addElse(this.second).compileToFragments(a)};b.prototype.compileUnary=function(a){var d=[];var c=this.operator;d.push([this.makeCode(c)]);if("!"===c&&this.first instanceof B)return this.first.negated=
!this.first.negated,this.first.compileToFragments(a);if(a.level>=Ga)return(new P(this)).compileToFragments(a);var f="+"===c||"-"===c;("new"===c||"typeof"===c||"delete"===c||f&&this.first instanceof b&&this.first.operator===c)&&d.push([this.makeCode(" ")]);if(f&&this.first instanceof b||"new"===c&&this.first.isStatement(a))this.first=new P(this.first);d.push(this.first.compileToFragments(a,Fa));this.flip&&d.reverse();return this.joinFragmentArrays(d,"")};b.prototype.compileYield=function(a){var b;
var d=[];var c=this.operator;null==a.scope.parent&&this.error("yield can only occur inside functions");0<=S.call(Object.keys(this.first),"expression")&&!(this.first instanceof ba)?null!=this.first.expression&&d.push(this.first.expression.compileToFragments(a,Fa)):(a.level>=Ka&&d.push([this.makeCode("(")]),d.push([this.makeCode(c)]),""!==(null!=(b=this.first.base)?b.value:void 0)&&d.push([this.makeCode(" ")]),d.push(this.first.compileToFragments(a,Fa)),a.level>=Ka&&d.push([this.makeCode(")")]));return this.joinFragmentArrays(d,
"")};b.prototype.compilePower=function(a){var b=new C(new x("Math"),[new qa(new L("pow"))]);return(new ya(b,[this.first,this.second])).compileToFragments(a)};b.prototype.compileFloorDivision=function(a){var d=new C(new x("Math"),[new qa(new L("floor"))]);var c=this.second.isComplex()?new P(this.second):this.second;c=new b("/",this.first,c);return(new ya(d,[c])).compileToFragments(a)};b.prototype.compileModulo=function(a){var b=new C(new z(Ia("modulo",a)));return(new ya(b,[this.first,this.second])).compileToFragments(a)};
b.prototype.toString=function(a){return b.__super__.toString.call(this,a,this.constructor.name+" "+this.operator)};return b}(sa);f.In=O=function(a){function b(a,b){this.object=a;this.array=b}v(b,a);b.prototype.children=["object","array"];b.prototype.invert=ra;b.prototype.compileNode=function(a){var b;if(this.array instanceof C&&this.array.isArray()&&this.array.base.objects.length){var c=this.array.base.objects;var e=0;for(b=c.length;e<b;e++){var f=c[e];if(f instanceof U){var g=!0;break}}if(!g)return this.compileOrTest(a)}return this.compileLoopTest(a)};
b.prototype.compileOrTest=function(a){var b,c;var e=this.object.cache(a,Fa);var f=e[0];var g=e[1];var h=this.negated?[" !\x3d\x3d "," \x26\x26 "]:[" \x3d\x3d\x3d "," || "];e=h[0];h=h[1];var p=[];var k=this.array.base.objects;var l=b=0;for(c=k.length;b<c;l=++b){var m=k[l];l&&p.push(this.makeCode(h));p=p.concat(l?g:f,this.makeCode(e),m.compileToFragments(a,Ga))}return a.level<Fa?p:this.wrapInBraces(p)};b.prototype.compileLoopTest=function(a){var b=this.object.cache(a,ta);var c=b[0];var e=b[1];b=[].concat(this.makeCode(Ia("indexOf",
a)+".call("),this.array.compileToFragments(a,ta),this.makeCode(", "),e,this.makeCode(") "+(this.negated?"\x3c 0":"\x3e\x3d 0")));if(da(c)===da(e))return b;b=c.concat(this.makeCode(", "),b);return a.level<ta?b:this.wrapInBraces(b)};b.prototype.toString=function(a){return b.__super__.toString.call(this,a,this.constructor.name+(this.negated?"!":""))};return b}(sa);f.Try=function(a){function b(a,b,c,e){this.attempt=a;this.errorVariable=b;this.recovery=c;this.ensure=e}v(b,a);b.prototype.children=["attempt",
"recovery","ensure"];b.prototype.isStatement=ha;b.prototype.jumps=function(a){var b;return this.attempt.jumps(a)||(null!=(b=this.recovery)?b.jumps(a):void 0)};b.prototype.makeReturn=function(a){this.attempt&&(this.attempt=this.attempt.makeReturn(a));this.recovery&&(this.recovery=this.recovery.makeReturn(a));return this};b.prototype.compileNode=function(a){var b,c,e;a.indent+=Ca;var f=this.attempt.compileToFragments(a,N);var g=this.recovery?(b=a.scope.freeVariable("error",{reserve:!1}),e=new x(b),
this.errorVariable?(c=za(this.errorVariable.unwrapAll().value),c?this.errorVariable.error(c):void 0,this.recovery.unshift(new y(this.errorVariable,e))):void 0,[].concat(this.makeCode(" catch ("),e.compileToFragments(a),this.makeCode(") {\n"),this.recovery.compileToFragments(a,N),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:(b=a.scope.freeVariable("error",{reserve:!1}),[this.makeCode(" catch ("+b+") {}")]);a=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(a,
N),this.makeCode("\n"+this.tab+"}")):[];return[].concat(this.makeCode(this.tab+"try {\n"),f,this.makeCode("\n"+this.tab+"}"),g,a)};return b}(sa);f.Throw=ba=function(a){function b(a){this.expression=a}v(b,a);b.prototype.children=["expression"];b.prototype.isStatement=ha;b.prototype.jumps=ka;b.prototype.makeReturn=na;b.prototype.compileNode=function(a){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(a),this.makeCode(";"))};return b}(sa);f.Existence=B=function(a){function b(a){this.expression=
a}v(b,a);b.prototype.children=["expression"];b.prototype.invert=ra;b.prototype.compileNode=function(a){this.expression.front=this.front;var b=this.expression.compile(a,Fa);if(this.expression.unwrap()instanceof x&&!a.scope.check(b)){var c=this.negated?["\x3d\x3d\x3d","||"]:["!\x3d\x3d","\x26\x26"];var e=c[0];c=c[1];b="typeof "+b+" "+e+' "undefined" '+c+" "+b+" "+e+" null"}else b=b+" "+(this.negated?"\x3d\x3d":"!\x3d")+" null";return[this.makeCode(a.level<=Na?b:"("+b+")")]};return b}(sa);f.Parens=P=
function(a){function b(a){this.body=a}v(b,a);b.prototype.children=["body"];b.prototype.unwrap=function(){return this.body};b.prototype.isComplex=function(){return this.body.isComplex()};b.prototype.compileNode=function(a){var b=this.body.unwrap();if(b instanceof C&&b.isAtomic())return b.front=this.front,b.compileToFragments(a);var c=b.compileToFragments(a,Ka);return a.level<Fa&&(b instanceof k||b instanceof ya||b instanceof Q&&b.returns)&&(a.level<Na||3>=c.length)?c:this.wrapInBraces(c)};return b}(sa);
f.StringWithInterpolations=A=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.compileNode=function(a){var d;if(!a.inTaggedTemplateCall)return b.__super__.compileNode.apply(this,arguments);var c=this.body.unwrap();var e=[];c.traverseChildren(!1,function(a){if(a instanceof D)e.push(a);else if(a instanceof P)return e.push(a),!1;return!0});c=[];c.push(this.makeCode("`"));var f=0;for(d=e.length;f<d;f++){var g=e[f];g instanceof D?(g=g.value.slice(1,-1),g=
g.replace(/(\\*)(`|\$\{)/g,function(a,b,d){return 0===b.length%2?b+"\\"+d:a}),c.push(this.makeCode(g))):(c.push(this.makeCode("${")),c.push.apply(c,g.compileToFragments(a,Ka)),c.push(this.makeCode("}")))}c.push(this.makeCode("`"));return c};return b}(P);f.For=Q=function(b){function c(b,d){this.source=d.source;this.guard=d.guard;this.step=d.step;this.name=d.name;this.index=d.index;this.body=a.wrap([b]);this.own=!!d.own;this.object=!!d.object;(this.from=!!d.from)&&this.index&&this.index.error("cannot use index with for-from");
this.own&&!this.object&&d.ownTag.error("cannot use own with for-"+(this.from?"from":"in"));this.object&&(b=[this.index,this.name],this.name=b[0],this.index=b[1]);this.index instanceof C&&!this.index.isAssignable()&&this.index.error("index cannot be a pattern matching expression");this.range=this.source instanceof C&&this.source.base instanceof V&&!this.source.properties.length&&!this.from;this.pattern=this.name instanceof C;this.range&&this.index&&this.index.error("indexes do not apply to range loops");
this.range&&this.pattern&&this.name.error("cannot pattern match over range loops");this.returns=!1}v(c,b);c.prototype.children=["body","source","guard","step"];c.prototype.compileNode=function(b){var d,c,e,f,g,h,k;var l=a.wrap([this.body]);var p=l.expressions;p=p[p.length-1];(null!=p?p.jumps():void 0)instanceof G&&(this.returns=!1);var m=this.range?this.source.base:this.source;var n=b.scope;this.pattern||(e=this.name&&this.name.compile(b,ta));p=this.index&&this.index.compile(b,ta);e&&!this.pattern&&
n.find(e);!p||this.index instanceof C||n.find(p);this.returns&&(c=n.freeVariable("results"));this.from?this.pattern&&(f=n.freeVariable("x",{single:!0})):f=this.object&&p||n.freeVariable("i",{single:!0});var q=(this.range||this.from)&&e||p||f;var t=q!==f?q+" \x3d ":"";if(this.step&&!this.range){p=this.cacheToCodeFragments(this.step.cache(b,ta,Ya));var w=p[0];var r=p[1];this.step.isNumber()&&(h=Number(r))}this.pattern&&(e=f);var v=p=k="";var u=this.tab+Ca;if(this.range)var K=m.compileToFragments(ja(b,
{index:f,name:e,step:this.step,isComplex:Ya}));else{var A=this.source.compile(b,ta);!e&&!this.own||this.source.unwrap()instanceof x||(v+=""+this.tab+(m=n.freeVariable("ref"))+" \x3d "+A+";\n",A=m);!e||this.pattern||this.from||(g=e+" \x3d "+A+"["+q+"]");this.object||this.from||(w!==r&&(v+=""+this.tab+w+";\n"),e=0>h,this.step&&null!=h&&e||(d=n.freeVariable("len")),K=""+t+f+" \x3d 0, "+d+" \x3d "+A+".length",w=""+t+f+" \x3d "+A+".length - 1",d=f+" \x3c "+d,n=f+" \x3e\x3d 0",this.step?(null!=h?e&&(d=
n,K=w):(d=r+" \x3e 0 ? "+d+" : "+n,K="("+r+" \x3e 0 ? ("+K+") : "+w+")"),f=f+" +\x3d "+r):f=""+(q!==f?"++"+f:f+"++"),K=[this.makeCode(K+"; "+d+"; "+t+f)])}if(this.returns){var B=""+this.tab+c+" \x3d [];\n";var V="\n"+this.tab+"return "+c+";";l.makeReturn(c)}this.guard&&(1<l.expressions.length?l.expressions.unshift(new J((new P(this.guard)).invert(),new W("continue"))):this.guard&&(l=a.wrap([new J(this.guard,l)])));this.pattern&&l.expressions.unshift(new y(this.name,this.from?new x(q):new z(A+"["+
q+"]")));c=[].concat(this.makeCode(v),this.pluckDirectCall(b,l));g&&(k="\n"+u+g+";");this.object?(K=[this.makeCode(q+" in "+A)],this.own&&(p="\n"+u+"if (!"+Ia("hasProp",b)+".call("+A+", "+q+")) continue;")):this.from&&(K=[this.makeCode(q+" of "+A)]);(b=l.compileToFragments(ja(b,{indent:u}),N))&&0<b.length&&(b=[].concat(this.makeCode("\n"),b,this.makeCode("\n")));return[].concat(c,this.makeCode(""+(B||"")+this.tab+"for ("),K,this.makeCode(") {"+p+k),b,this.makeCode(this.tab+"}"+(V||"")))};c.prototype.pluckDirectCall=
function(a,b){var d,c,f,g,k,l,p;var m=[];var n=b.expressions;var q=d=0;for(c=n.length;d<c;q=++d){var w=n[q];w=w.unwrapAll();if(w instanceof ya){var t=null!=(f=w.variable)?f.unwrapAll():void 0;if(t instanceof h||t instanceof C&&(null!=(g=t.base)?g.unwrapAll():void 0)instanceof h&&1===t.properties.length&&("call"===(k=null!=(l=t.properties[0].name)?l.value:void 0)||"apply"===k)){var r=(null!=(p=t.base)?p.unwrapAll():void 0)||t;var v=new x(a.scope.freeVariable("fn"));var u=new C(v);t.base&&(u=[u,t],
t.base=u[0],u=u[1]);b.expressions[q]=new ya(u,w.args);m=m.concat(this.makeCode(this.tab),(new y(v,r)).compileToFragments(a,N),this.makeCode(";\n"))}}}return m};return c}(Z);f.Switch=function(b){function c(a,b,c){this.subject=a;this.cases=b;this.otherwise=c}v(c,b);c.prototype.children=["subject","cases","otherwise"];c.prototype.isStatement=ha;c.prototype.jumps=function(a){var b,c;null==a&&(a={block:!0});var e=this.cases;var f=0;for(b=e.length;f<b;f++){var g=e[f];g=g[1];if(g=g.jumps(a))return g}return null!=
(c=this.otherwise)?c.jumps(a):void 0};c.prototype.makeReturn=function(b){var c,f;var e=this.cases;var g=0;for(c=e.length;g<c;g++){var h=e[g];h[1].makeReturn(b)}b&&(this.otherwise||(this.otherwise=new a([new z("void 0")])));null!=(f=this.otherwise)&&f.makeReturn(b);return this};c.prototype.compileNode=function(a){var b,c,e,f;var g=a.indent+Ca;var h=a.indent=g+Ca;var k=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(a,Ka):this.makeCode("false"),this.makeCode(") {\n"));
var l=this.cases;var m=c=0;for(e=l.length;c<e;m=++c){var p=l[m];var n=p[0];p=p[1];var q=ia([n]);n=0;for(f=q.length;n<f;n++){var w=q[n];this.subject||(w=w.invert());k=k.concat(this.makeCode(g+"case "),w.compileToFragments(a,Ka),this.makeCode(":\n"))}0<(b=p.compileToFragments(a,N)).length&&(k=k.concat(b,this.makeCode("\n")));if(m===this.cases.length-1&&!this.otherwise)break;m=this.lastNonComment(p.expressions);m instanceof G||m instanceof z&&m.jumps()&&"debugger"!==m.value||k.push(w.makeCode(h+"break;\n"))}this.otherwise&&
this.otherwise.expressions.length&&k.push.apply(k,[this.makeCode(g+"default:\n")].concat(M.call(this.otherwise.compileToFragments(a,N)),[this.makeCode("\n")]));k.push(this.makeCode(this.tab+"}"));return k};return c}(sa);f.If=J=function(b){function c(a,b,c){this.body=b;null==c&&(c={});this.condition="unless"===c.type?a.invert():a;this.elseBody=null;this.isChain=!1;this.soak=c.soak}v(c,b);c.prototype.children=["condition","body","elseBody"];c.prototype.bodyNode=function(){var a;return null!=(a=this.body)?
a.unwrap():void 0};c.prototype.elseBodyNode=function(){var a;return null!=(a=this.elseBody)?a.unwrap():void 0};c.prototype.addElse=function(a){this.isChain?this.elseBodyNode().addElse(a):(this.isChain=a instanceof c,this.elseBody=this.ensureBlock(a),this.elseBody.updateLocationDataIfMissing(a.locationData));return this};c.prototype.isStatement=function(a){var b;return(null!=a?a.level:void 0)===N||this.bodyNode().isStatement(a)||(null!=(b=this.elseBodyNode())?b.isStatement(a):void 0)};c.prototype.jumps=
function(a){var b;return this.body.jumps(a)||(null!=(b=this.elseBody)?b.jumps(a):void 0)};c.prototype.compileNode=function(a){return this.isStatement(a)?this.compileStatement(a):this.compileExpression(a)};c.prototype.makeReturn=function(b){b&&(this.elseBody||(this.elseBody=new a([new z("void 0")])));this.body&&(this.body=new a([this.body.makeReturn(b)]));this.elseBody&&(this.elseBody=new a([this.elseBody.makeReturn(b)]));return this};c.prototype.ensureBlock=function(b){return b instanceof a?b:new a([b])};
c.prototype.compileStatement=function(a){var b=la(a,"chainChild");if(la(a,"isExistentialEquals"))return(new c(this.condition.invert(),this.elseBodyNode(),{type:"if"})).compileToFragments(a);var f=a.indent+Ca;var e=this.condition.compileToFragments(a,Ka);var g=this.ensureBlock(this.body).compileToFragments(ja(a,{indent:f}));g=[].concat(this.makeCode("if ("),e,this.makeCode(") {\n"),g,this.makeCode("\n"+this.tab+"}"));b||g.unshift(this.makeCode(this.tab));if(!this.elseBody)return g;b=g.concat(this.makeCode(" else "));
this.isChain?(a.chainChild=!0,b=b.concat(this.elseBody.unwrap().compileToFragments(a,N))):b=b.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(ja(a,{indent:f}),N),this.makeCode("\n"+this.tab+"}"));return b};c.prototype.compileExpression=function(a){var b=this.condition.compileToFragments(a,Na);var c=this.bodyNode().compileToFragments(a,ta);var e=this.elseBodyNode()?this.elseBodyNode().compileToFragments(a,ta):[this.makeCode("void 0")];e=b.concat(this.makeCode(" ? "),c,this.makeCode(" : "),
e);return a.level>=Na?this.wrapInBraces(e):e};c.prototype.unfoldSoak=function(){return this.soak&&this};return c}(sa);var gc={extend:function(a){return"function(child, parent) { for (var key in parent) { if ("+Ia("hasProp",a)+".call(parent, key)) child[key] \x3d parent[key]; } function ctor() { this.constructor \x3d child; } ctor.prototype \x3d parent.prototype; child.prototype \x3d new ctor(); child.__super__ \x3d parent.prototype; return child; }"},bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},
indexOf:function(){return"[].indexOf || function(item) { for (var i \x3d 0, l \x3d this.length; i \x3c l; i++) { if (i in this \x26\x26 this[i] \x3d\x3d\x3d item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b \x3d +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}};var N=1;var Ka=2;var ta=3;var Na=4;var Fa=5;var Ga=6;var Ca=" ";var Pa=/^[+-]?\d+$/;var Ia=function(a,b){var c=b.scope.root;if(a in c.utilities)return c.utilities[a];
var d=c.freeVariable(a);c.assign(d,gc[a](b));return c.utilities[a]=d};var Ea=function(a,b){a=a.replace(/\n/g,"$\x26"+b);return a.replace(/\s+$/,"")};var Va=function(a){return a instanceof x&&"arguments"===a.value};var ea=function(a){return a instanceof E||a instanceof h&&a.bound||a instanceof va};var Ya=function(a){return a.isComplex()||("function"===typeof a.isAssignable?a.isAssignable():void 0)};var Ba=function(a,b,c){if(a=b[c].unfoldSoak(a))return b[c]=a.body,a.body=new C(b),a}}).call(this);return f}();
u["./sourcemap"]=function(){var f={};(function(){var u=function(){function f(f){this.line=f;this.columns=[]}f.prototype.add=function(f,a,b){var q=a[0];a=a[1];null==b&&(b={});if(!this.columns[f]||!b.noReplace)return this.columns[f]={line:this.line,column:f,sourceLine:q,sourceColumn:a}};f.prototype.sourceLocation=function(f){for(var a;!((a=this.columns[f])||0>=f);)f--;return a&&[a.sourceLine,a.sourceColumn]};return f}();f=function(){function f(){this.lines=[]}f.prototype.add=function(f,a,b){var q;null==
b&&(b={});var g=a[0];a=a[1];return((q=this.lines)[g]||(q[g]=new u(g))).add(a,f,b)};f.prototype.sourceLocation=function(f){var a;var b=f[0];for(f=f[1];!((a=this.lines[b])||0>=b);)b--;return a&&a.sourceLocation(f)};f.prototype.generate=function(f,a){var b,q,g,h,r,n,u;null==f&&(f={});null==a&&(a=null);var y=g=q=u=0;var I=!1;var F="";var Q=this.lines;var x=b=0;for(h=Q.length;b<h;x=++b)if(x=Q[x]){var J=x.columns;x=0;for(r=J.length;x<r;x++)if(n=J[x]){for(;u<n.line;)q=0,I=!1,F+=";",u++;I&&(F+=",");F+=this.encodeVlq(n.column-
q);q=n.column;F+=this.encodeVlq(0);F+=this.encodeVlq(n.sourceLine-g);g=n.sourceLine;F+=this.encodeVlq(n.sourceColumn-y);y=n.sourceColumn;I=!0}}F={version:3,file:f.generatedFile||"",sourceRoot:f.sourceRoot||"",sources:f.sourceFiles||[""],names:[],mappings:F};f.inlineMap&&(F.sourcesContent=[a]);return F};f.prototype.encodeVlq=function(f){var a;var b="";for(a=(Math.abs(f)<<1)+(0>f?1:0);a||!b;)f=a&31,(a>>=5)&&(f|=32),b+=this.encodeBase64(f);return b};f.prototype.encodeBase64=function(f){var a;if(!(a=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f]))throw Error("Cannot Base64 encode value: "+f);return a};return f}()}).call(this);return f}();u["./coffee-script"]=function(){var f={};(function(){var qa,q,y={}.hasOwnProperty;var a=u("fs");var b=u("vm");var ya=u("path");var g=u("./lexer").Lexer;var h=u("./parser").parser;var r=u("./helpers");var n=u("./sourcemap");var B=u("../../package.json");f.VERSION=B.version;f.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"];f.helpers=
r;var H=function(a){switch(!1){case "function"!==typeof Buffer:return(new Buffer(a)).toString("base64");case "function"!==typeof btoa:return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,b){return String.fromCharCode("0x"+b)}));default:throw Error("Unable to base64 encode inline sourcemap.");}};B=function(a){return function(b,f){null==f&&(f={});try{return a.call(this,b,f)}catch(m){if("string"!==typeof b)throw m;throw r.updateSyntaxError(m,b,f.filename);}}};var I={};var F={};f.compile=
qa=B(function(a,b){var c,f,g,l;var q=r.extend;b=q({},b);var u=b.sourceMap||b.inlineMap||null==b.filename;q=b.filename||"\x3canonymous\x3e";I[q]=a;u&&(g=new n);var x=O.tokenize(a,b);var y=b;var G=[];var z=0;for(c=x.length;z<c;z++){var B=x[z];"IDENTIFIER"===B[0]&&G.push(B[1])}y.referencedVars=G;if(null==b.bare||!0!==b.bare)for(y=0,z=x.length;y<z;y++)if(B=x[y],"IMPORT"===(f=B[0])||"EXPORT"===f){b.bare=!0;break}z=h.parse(x).compileToFragments(b);x=0;b.header&&(x+=1);b.shiftLine&&(x+=1);B=0;f="";c=0;for(G=
z.length;c<G;c++){y=z[c];if(u){y.locationData&&!/^[;\s]*$/.test(y.code)&&g.add([y.locationData.first_line,y.locationData.first_column],[x,B],{noReplace:!0});var J=r.count(y.code,"\n");x+=J;B=J?y.code.length-(y.code.lastIndexOf("\n")+1):B+y.code.length}f+=y.code}b.header&&(B="Generated by CoffeeScript "+this.VERSION,f="// "+B+"\n"+f);if(u){var D=g.generate(b,a);F[q]=g}b.inlineMap&&(a=H(JSON.stringify(D)),q="//# sourceURL\x3d"+(null!=(l=b.filename)?l:"coffeescript"),f=f+"\n"+("//# sourceMappingURL\x3ddata:application/json;base64,"+
a)+"\n"+q);return b.sourceMap?{js:f,sourceMap:g,v3SourceMap:JSON.stringify(D,null,2)}:f});f.tokens=B(function(a,b){return O.tokenize(a,b)});f.nodes=B(function(a,b){return"string"===typeof a?h.parse(O.tokenize(a,b)):h.parse(a)});f.run=function(b,c){var f;null==c&&(c={});var g=u.main;g.filename=process.argv[1]=c.filename?a.realpathSync(c.filename):"\x3canonymous\x3e";g.moduleCache&&(g.moduleCache={});var h=null!=c.filename?ya.dirname(a.realpathSync(c.filename)):a.realpathSync(".");g.paths=u("module")._nodeModulePaths(h);
if(!r.isCoffee(g.filename)||u.extensions)b=qa(b,c),b=null!=(f=b.js)?f:b;return g._compile(b,g.filename)};f.eval=function(a,c){var f,g,h,l,n;null==c&&(c={});if(a=a.trim()){var q=null!=(h=b.Script.createContext)?h:b.createContext;h=null!=(g=b.isContext)?g:function(a){return c.sandbox instanceof q().constructor};if(q){if(null!=c.sandbox){if(h(c.sandbox))var r=c.sandbox;else for(l in r=q(),h=c.sandbox,h)y.call(h,l)&&(g=h[l],r[l]=g);r.global=r.root=r.GLOBAL=r}else r=global;r.__filename=c.filename||"eval";
r.__dirname=ya.dirname(r.__filename);if(r===global&&!r.module&&!r.require){var x=u("module");r.module=f=new x(c.modulename||"eval");r.require=g=function(a){return x._load(a,f,!0)};f.filename=r.__filename;var B=Object.getOwnPropertyNames(u);h=0;for(n=B.length;h<n;h++){var z=B[h];"paths"!==z&&"arguments"!==z&&"caller"!==z&&(g[z]=u[z])}g.paths=f.paths=x._nodeModulePaths(process.cwd());g.resolve=function(a){return x._resolveFilename(a,f)}}}h={};for(l in c)y.call(c,l)&&(g=c[l],h[l]=g);h.bare=!0;a=qa(a,
h);return r===global?b.runInThisContext(a):b.runInContext(a,r)}};f.register=function(){return u("./register")};if(u.extensions){var Q=this.FILE_EXTENSIONS;var x=function(a){var b;return null!=(b=u.extensions)[a]?b[a]:b[a]=function(){throw Error("Use CoffeeScript.register() or require the coffee-script/register module to require "+a+" files.");}};var J=0;for(q=Q.length;J<q;J++)B=Q[J],x(B)}f._compileFile=function(b,c,f){null==c&&(c=!1);null==f&&(f=!1);var g=a.readFileSync(b,"utf8");g=65279===g.charCodeAt(0)?
g.substring(1):g;try{var h=qa(g,{filename:b,sourceMap:c,inlineMap:f,sourceFiles:[b],literate:r.isLiterate(b)})}catch(K){throw r.updateSyntaxError(K,g,b);}return h};var O=new g;h.lexer={lex:function(){var a;if(a=h.tokens[this.pos++]){var b=a[0];this.yytext=a[1];this.yylloc=a[2];h.errorToken=a.origin||a;this.yylineno=this.yylloc.first_line}else b="";return b},setInput:function(a){h.tokens=a;return this.pos=0},upcomingInput:function(){return""}};h.yy=u("./nodes");h.yy.parseError=function(a,b){var c=
h.errorToken;var f=h.tokens;var g=c[0];var l=c[1];a=c[2];l=function(){switch(!1){case c!==f[f.length-1]:return"end of input";case "INDENT"!==g&&"OUTDENT"!==g:return"indentation";case "IDENTIFIER"!==g&&"NUMBER"!==g&&"INFINITY"!==g&&"STRING"!==g&&"STRING_START"!==g&&"REGEX"!==g&&"REGEX_START"!==g:return g.replace(/_START$/,"").toLowerCase();default:return r.nameWhitespaceCharacter(l)}}();return r.throwSyntaxError("unexpected "+l,a)};var R=function(a,b){var c;if(a.isNative())var f="native";else{a.isEval()?
(c=a.getScriptNameOrSourceURL())||a.getEvalOrigin():c=a.getFileName();c||(c="\x3canonymous\x3e");var g=a.getLineNumber();f=a.getColumnNumber();f=(b=b(c,g,f))?c+":"+b[0]+":"+b[1]:c+":"+g+":"+f}c=a.getFunctionName();g=a.isConstructor();if(a.isToplevel()||g)return g?"new "+(c||"\x3canonymous\x3e")+" ("+f+")":c?c+" ("+f+")":f;g=a.getMethodName();var h=a.getTypeName();return c?(b=a="",h&&c.indexOf(h)&&(b=h+"."),g&&c.indexOf("."+g)!==c.length-g.length-1&&(a=" [as "+g+"]"),""+b+c+a+" ("+f+")"):h+"."+(g||
"\x3canonymous\x3e")+" ("+f+")"};var z=function(a){return null!=F[a]?F[a]:null!=F["\x3canonymous\x3e"]?F["\x3canonymous\x3e"]:null!=I[a]?(a=qa(I[a],{filename:a,sourceMap:!0,literate:r.isLiterate(a)}),a.sourceMap):null};Error.prepareStackTrace=function(a,b){var c;var g=function(a,b,c){var f;a=z(a);null!=a&&(f=a.sourceLocation([b-1,c-1]));return null!=f?[f[0]+1,f[1]+1]:null};var h=function(){var a;var h=[];var k=0;for(a=b.length;k<a;k++){c=b[k];if(c.getFunction()===f.run)break;h.push(" at "+R(c,
g))}return h}();return a.toString()+"\n"+h.join("\n")+"\n"}}).call(this);return f}();u["./browser"]=function(){(function(){var f=[].indexOf||function(a){for(var b=0,f=this.length;b<f;b++)if(b in this&&this[b]===a)return b;return-1};var qa=u("./coffee-script");qa.require=u;var q=qa.compile;qa.eval=function(a,b){null==b&&(b={});null==b.bare&&(b.bare=!0);return eval(q(a,b))};qa.run=function(a,b){null==b&&(b={});b.bare=!0;b.shiftLine=!0;return Function(q(a,b))()};if("undefined"!==typeof window&&null!==
window){"undefined"!==typeof btoa&&null!==btoa&&"undefined"!==typeof JSON&&null!==JSON&&(q=function(a,b){null==b&&(b={});b.inlineMap=!0;return qa.compile(a,b)});qa.load=function(a,b,f,g){null==f&&(f={});null==g&&(g=!1);f.sourceFiles=[a];var h=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest;h.open("GET",a,!0);"overrideMimeType"in h&&h.overrideMimeType("text/plain");h.onreadystatechange=function(){var q;if(4===h.readyState){if(0===(q=h.status)||200===q)q=
[h.responseText,f],g||qa.run.apply(qa,q);else throw Error("Could not load "+a);if(b)return b(q)}};return h.send(null)};var y=function(){var a,b,q;var g=window.document.getElementsByTagName("script");var h=["text/coffeescript","text/literate-coffeescript"];var r=function(){var a,b;var n=[];var r=0;for(a=g.length;r<a;r++)q=g[r],(b=q.type,0<=f.call(h,b))&&n.push(q);return n}();var n=0;var u=function(){var a=r[n];if(a instanceof Array)return qa.run.apply(qa,a),n++,u()};var y=function(a,b){var f;var g=
{literate:a.type===h[1]};if(f=a.src||a.getAttribute("data-src"))return qa.load(f,function(a){r[b]=a;return u()},g,!0);g.sourceFiles=["embedded"];return r[b]=[a.innerHTML,g]};var I=a=0;for(b=r.length;a<b;I=++a){var F=r[I];y(F,I)}return u()};window.addEventListener?window.addEventListener("DOMContentLoaded",y,!1):window.attachEvent("onload",y)}}).call(this);return{}}();return u["./coffee-script"]}();"function"===typeof define&&define.amd?define(function(){return xa}):u.CoffeeScript=xa})(this);

View File

@@ -60,7 +60,6 @@ li {
}
table {
margin: 16px 0 0 13px; padding: 0;
width: 690px;
}
tr, td {
margin: 0; padding: 0;
@@ -69,6 +68,9 @@ table {
padding: 9px 15px 9px 0;
vertical-align: top;
}
th {
text-align: left;
}
table.definitions {
width: auto;
margin: 30px 0;
@@ -102,6 +104,9 @@ code, pre, pre > code, textarea {
padding: 3px 0 3px 12px;
font-size: 12px;
}
td code {
white-space: nowrap;
}
.timestamp {
font-size: 11px;
font-weight: normal;
@@ -586,18 +591,18 @@ pre .xml .cdata {
Annotated Source
</div>
<div class="contents menu">
<a href="v1/annotated-source/grammar.html">Grammar Rules — src/grammar</a>
<a href="v1/annotated-source/lexer.html">Lexing Tokens — src/lexer</a>
<a href="v1/annotated-source/rewriter.html">The Rewriter — src/rewriter</a>
<a href="v1/annotated-source/nodes.html">The Syntax Tree — src/nodes</a>
<a href="v1/annotated-source/scope.html">Lexical Scope — src/scope</a>
<a href="v1/annotated-source/helpers.html">Helpers &amp; Utility Functions — src/helpers</a>
<a href="v1/annotated-source/coffee-script.html">The CoffeeScript Module — src/coffee-script</a>
<a href="v1/annotated-source/cake.html">Cake &amp; Cakefiles — src/cake</a>
<a href="v1/annotated-source/command.html">“coffee” Command-Line Utility — src/command</a>
<a href="v1/annotated-source/optparse.html">Option Parsing — src/optparse</a>
<a href="v1/annotated-source/repl.html">Interactive REPL — src/repl</a>
<a href="v1/annotated-source/sourcemap.html">Source Maps — src/sourcemap</a>
<a href="/v1/annotated-source/grammar.html">Grammar Rules — src/grammar</a>
<a href="/v1/annotated-source/lexer.html">Lexing Tokens — src/lexer</a>
<a href="/v1/annotated-source/rewriter.html">The Rewriter — src/rewriter</a>
<a href="/v1/annotated-source/nodes.html">The Syntax Tree — src/nodes</a>
<a href="/v1/annotated-source/scope.html">Lexical Scope — src/scope</a>
<a href="/v1/annotated-source/helpers.html">Helpers &amp; Utility Functions — src/helpers</a>
<a href="/v1/annotated-source/coffee-script.html">The CoffeeScript Module — src/coffee-script</a>
<a href="/v1/annotated-source/cake.html">Cake &amp; Cakefiles — src/cake</a>
<a href="/v1/annotated-source/command.html">“coffee” Command-Line Utility — src/command</a>
<a href="/v1/annotated-source/optparse.html">Option Parsing — src/optparse</a>
<a href="/v1/annotated-source/repl.html">Interactive REPL — src/repl</a>
<a href="/v1/annotated-source/sourcemap.html">Source Maps — src/sourcemap</a>
</div>
</div>
</div>
@@ -607,11 +612,13 @@ pre .xml .cdata {
<p><strong>CoffeeScript is a little language that compiles into JavaScript.</strong> Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.</p>
<p>The golden rule of CoffeeScript is: <em>“Its just JavaScript”</em>. The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable, pretty-printed, and tends to run as fast or faster than the equivalent handwritten JavaScript.</p>
<p>The CoffeeScript compiler goes to great lengths to generate output JavaScript that runs in every JavaScript runtime, but there are exceptions. Use <a href="#generator-functions">generator functions</a>, <a href="#generator-iteration"><code>for…from</code></a>, or <a href="#tagged-template-literals">tagged template literals</a> only if you know that your <a href="http://kangax.github.io/compat-table/es6/">target runtimes can support them</a>. If you use <a href="#modules">modules</a>, you will need to <a href="#modules-note">use an additional tool to resolve them</a>.</p>
<p><strong>Latest Version:</strong> <a href="http://github.com/jashkenas/coffeescript/tarball/1.12.4">1.12.4</a></p>
<blockquote>
<pre><code>npm install -g coffee-script</code></pre></blockquote>
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/1.12.6">1.12.6</a></p>
<blockquote class="uneditable-code-block"><pre><code class="language-bash">npm install -g coffeescript
</code></pre>
</blockquote><p><strong>CoffeeScript 2 is coming!</strong> It adds support for <a href="/v2/#classes">ES2015 classes</a>, <a href="/v2/#fat-arrow"><code>async</code>/<code>await</code></a>, and generates JavaScript using ES2015+ syntax. <a href="/v2/">Learn more</a>.</p></p>
<h2>Overview</h2><p><em>CoffeeScript on the left, compiled JavaScript output on the right.</em></p>
<h2>Overview</h2>
<p><em>CoffeeScript on the left, compiled JavaScript output on the right.</em></p>
<div class='code'><pre><code><span class="comment"># Assignment:</span>
number = <span class="number">42</span>
opposite = <span class="literal">true</span>
@@ -730,168 +737,96 @@ cubes = (function() {
})();
;alert(cubes);">run: cubes</div><br class='clear' /></div>
<span class="bookmark" id="installation"></span>
<h2>Installation</h2><p>The command-line version of <code>coffee</code> is available as a <a href="http://nodejs.org/">Node.js</a> utility. The <a href="v1/browser-compiler/coffee-script.js">core compiler</a> however, does not depend on Node, and can be run in any JavaScript environment, or in the browser (see <a href="#try">Try CoffeeScript</a>).</p>
<p>To install, first make sure you have a working copy of the latest stable version of <a href="http://nodejs.org/">Node.js</a>. You can then install CoffeeScript globally with <a href="http://npmjs.org">npm</a>:</p>
<blockquote>
<pre><code>npm install --global coffee-script</code></pre></blockquote>
<h2>Installation</h2>
<p>The command-line version of <code>coffee</code> is available as a <a href="https://nodejs.org/">Node.js</a> utility. The <a href="/v1/browser-compiler/coffee-script.js">core compiler</a> however, does not depend on Node, and can be run in any JavaScript environment, or in the browser (see <a href="#try">Try CoffeeScript</a>).</p>
<p>To install, first make sure you have a working copy of the latest stable version of <a href="https://nodejs.org/">Node.js</a>. You can then install CoffeeScript globally with <a href="https://www.npmjs.com/">npm</a>:</p>
<blockquote class="uneditable-code-block"><pre><code class="language-bash">npm install --global coffeescript
</code></pre>
</blockquote><p>This will make the <code>coffee</code> and <code>cake</code> commands available globally.</p>
<p>When you need CoffeeScript as a dependency of a project, within that projects folder you can install it locally:</p>
<blockquote>
<pre><code>npm install --save coffee-script</code></pre></blockquote>
<blockquote class="uneditable-code-block"><pre><code class="language-bash">npm install --save coffeescript
</code></pre>
</blockquote><p>The <code>coffee</code> and <code>cake</code> commands will first look in the current folder to see if CoffeeScript is installed locally, and use that version if so. This allows different versions of CoffeeScript to be installed globally and locally.</p>
<span class="bookmark" id="usage"></span>
<h2>Usage</h2><p>Once installed, you should have access to the <code>coffee</code> command, which can execute scripts, compile <code>.coffee</code> files into <code>.js</code>, and provide an interactive REPL. The <code>coffee</code> command takes the following options:</p>
<h2>Usage</h2>
<p>Once installed, you should have access to the <code>coffee</code> command, which can execute scripts, compile <code>.coffee</code> files into <code>.js</code>, and provide an interactive REPL. The <code>coffee</code> command takes the following options:</p>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>-c, --compile</code></td>
<td>Compile a <code>.coffee</code> script into a <code>.js</code> JavaScript file of the same name.</td>
</tr>
<tr>
<td><code>-m, --map</code></td>
<td>Generate source maps alongside the compiled JavaScript files. Adds <code>sourceMappingURL</code> directives to the JavaScript as well.</td>
</tr>
<tr>
<td><code>-M, --inline-map</code></td>
<td>Just like <code>--map</code>, but include the source map directly in the compiled JavaScript files, rather than in a separate file.</td>
</tr>
<tr>
<td width="25%"><code>-i, --interactive</code></td>
<td><code>-i, --interactive</code></td>
<td>Launch an interactive CoffeeScript session to try short snippets. Identical to calling <code>coffee</code> with no arguments.</td>
</tr>
<tr>
<td><code>-o, --output [DIR]</code></td>
<td>Write out all compiled JavaScript files into the specified directory. Use in conjunction with <code>--compile</code> or <code>--watch</code>.</td>
</tr>
<tr>
<td><code>-w, --watch</code></td>
<td>Watch files for changes, rerunning the specified command when any file is updated.</td>
</tr>
<tr>
<td><code>-p, --print</code></td>
<td>Instead of writing out the JavaScript as a file, print it directly to <strong>stdout</strong>.</td>
</tr>
<tr>
<td><code>-s, --stdio</code></td>
<td>Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT. Good for use with processes written in other languages. An example:<br>
<code>cat src/cake.coffee | coffee -sc</code></td>
<td>Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT. Good for use with processes written in other languages. An example:<br><code>cat src/cake.coffee | coffee -sc</code></td>
</tr>
<tr>
<td><code>-l, --literate</code></td>
<td>Parses the code as Literate CoffeeScript. You only need to specify this when passing in code directly over <strong>stdio</strong>, or using some sort of extension-less file name.</td>
</tr>
<tr>
<td><code>-e, --eval</code></td>
<td>Compile and print a little snippet of CoffeeScript directly from the command line. For example:<br>
<code>coffee -e &quot;console.log num for num in [10..1]&quot;</code></td>
<td>Compile and print a little snippet of CoffeeScript directly from the command line. For example:<br><code>coffee -e &quot;console.log num for num in [10..1]&quot;</code></td>
</tr>
<tr>
<td><code>-r, --require [MODULE]</code></td>
<td><code>-r, --require [MODULE]</code></td>
<td><code>require()</code> the given module before starting the REPL or evaluating the code given with the <code>--eval</code> flag.</td>
</tr>
<tr>
<td><code>-b, --bare</code></td>
<td>Compile the JavaScript without the <a href="#lexical-scope">top-level function safety wrapper</a>.</td>
</tr>
<tr>
<td><code>-t, --tokens</code></td>
<td>Instead of parsing the CoffeeScript, just lex it, and print out the token stream:<br>
<code>[IDENTIFIER square] [= =] [PARAM_START (]</code> ...</td>
<td>Instead of parsing the CoffeeScript, just lex it, and print out the token stream. Used for debugging the compiler.</td>
</tr>
<tr>
<td><code>-n, --nodes</code></td>
<td>Instead of compiling the CoffeeScript, just lex and parse it, and print out the parse tree:<br>
<code>Block
Assign
Value IdentifierLiteral: square
Code
Param IdentifierLiteral: x
Block
Op *
Value IdentifierLiteral: x
Value IdentifierLiteral: x</code>
</td>
<td>Instead of compiling the CoffeeScript, just lex and parse it, and print out the parse tree. Used for debugging the compiler.</td>
</tr>
<tr>
<td><code>--nodejs</code></td>
<td>The <code>node</code> executable has some useful options you can set, such as<br>
<code>--debug</code>, <code>--debug-brk</code>, <code>--max-stack-size</code>, and <code>--expose-gc</code>. Use this flag to forward options directly to Node.js. To pass multiple flags, use <code>--nodejs</code> multiple times.</td>
<td>The <code>node</code> executable has some useful options you can set, such as <code>--debug</code>, <code>--debug-brk</code>, <code>--max-stack-size</code>, and <code>--expose-gc</code>. Use this flag to forward options directly to Node.js. To pass multiple flags, use <code>--nodejs</code> multiple times.</td>
</tr>
<tr>
<td><code>--no-header</code></td>
<td>Suppress the “Generated by CoffeeScript” header.</td>
</tr>
</tbody>
</table>
<h3>Examples:</h3><ul>
<h3>Examples:</h3>
<ul>
<li>Compile a directory tree of <code>.coffee</code> files in <code>src</code> into a parallel tree of <code>.js</code> files in <code>lib</code>:<br>
<code>coffee --compile --output lib/ src/</code></li>
<li>Watch a file for changes, and recompile it every time the file is saved:<br>
@@ -907,19 +842,21 @@ cubes = (function() {
</ul>
<span class="bookmark" id="literate"></span>
<h2>Literate CoffeeScript</h2><p>Besides being used as an ordinary programming language, CoffeeScript may also be written in “literate” mode. If you name your file with a <code>.litcoffee</code> extension, you can write it as a Markdown document — a document that also happens to be executable CoffeeScript code. The compiler will treat any indented blocks (Markdowns way of indicating source code) as code, and ignore the rest as comments.</p>
<p>Just for kicks, a little bit of the compiler is currently implemented in this fashion: See it <a href="https://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df">as a document</a>, <a href="https://raw.github.com/jashkenas/coffeescript/master/src/scope.litcoffee">raw</a>, and <a href="http://cl.ly/LxEu">properly highlighted in a text editor</a>.</p>
<p>Im fairly excited about this direction for the language, and am looking forward to writing (and more importantly, reading) more programs in this style. More information about Literate CoffeeScript, including an <a href="https://github.com/jashkenas/journo">example program</a>, are <a href="http://ashkenas.com/literate-coffeescript">available in this blog post</a>.</p>
<h2>Literate CoffeeScript</h2>
<p>Besides being used as an ordinary programming language, CoffeeScript may also be written in “literate” mode. If you name your file with a <code>.litcoffee</code> extension, you can write it as a Markdown document — a document that also happens to be executable CoffeeScript code. The compiler will treat any indented blocks (Markdowns way of indicating source code) as code, and ignore the rest as comments.</p>
<p>Just for kicks, a little bit of the compiler is currently implemented in this fashion: See it <a href="https://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df">as a document</a>, <a href="https://raw.githubusercontent.com/jashkenas/coffeescript/master/src/scope.litcoffee">raw</a>, and <a href="http://cl.ly/LxEu">properly highlighted in a text editor</a>.</p>
<span class="bookmark" id="language"></span>
<h2>Language Reference</h2><p><em>This reference is structured so that it can be read from top to bottom, if you like. Later sections use ideas and syntax previously introduced. Familiarity with JavaScript is assumed. In all of the following examples, the source CoffeeScript is provided on the left, and the direct compilation into JavaScript is on the right.</em></p>
<h2>Language Reference</h2>
<p><em>This reference is structured so that it can be read from top to bottom, if you like. Later sections use ideas and syntax previously introduced. Familiarity with JavaScript is assumed. In all of the following examples, the source CoffeeScript is provided on the left, and the direct compilation into JavaScript is on the right.</em></p>
<p><em>Many of the examples can be run (where it makes sense) by pressing the <strong>run</strong> button on the right, and can be loaded into the “Try CoffeeScript” console by pressing the <strong>load</strong> button on the left.</em></p>
<p>First, the basics: CoffeeScript uses significant whitespace to delimit blocks of code. You dont need to use semicolons <code>;</code> to terminate expressions, ending the line will do just as well (although semicolons can still be used to fit multiple expressions onto a single line). Instead of using curly braces <code>{ }</code> to surround blocks of code in <a href="#literals">functions</a>, <a href="#conditionals">if-statements</a>, <a href="#switch">switch</a>, and <a href="#try">try/catch</a>, use indentation.</p>
<p>You dont need to use parentheses to invoke a function if youre passing arguments. The implicit call wraps forward to the end of the line or block expression.<br>
<code>console.log sys.inspect object</code><code>console.log(sys.inspect(object));</code></p>
<span class="bookmark" id="literals"></span>
<h2>Functions</h2><p>Functions are defined by an optional list of parameters in parentheses, an arrow, and the function body. The empty function looks like this: <code>-&gt;</code></p>
<h2>Functions</h2>
<p>Functions are defined by an optional list of parameters in parentheses, an arrow, and the function body. The empty function looks like this: <code>-&gt;</code></p>
<div class='code'><pre><code><span class="function"><span class="title">square</span> = <span class="params">(x)</span> -&gt;</span> x * x
<span class="function"><span class="title">cube</span> = <span class="params">(x)</span> -&gt;</span> square(x) * x
</code></pre><pre><code><span class="keyword">var</span> cube, square;
@@ -961,7 +898,8 @@ fill = function(container, liquid) {
};
;alert(fill(&quot;cup&quot;));">run: fill("cup")</div><br class='clear' /></div>
<span class="bookmark" id="objects-and-arrays"></span>
<h2>Objects and Arrays</h2><p>The CoffeeScript literals for objects and arrays look very similar to their JavaScript cousins. When each property is listed on its own line, the commas are optional. Objects may be created using indentation instead of explicit braces, similar to <a href="http://yaml.org">YAML</a>.</p>
<h2>Objects and Arrays</h2>
<p>The CoffeeScript literals for objects and arrays look very similar to their JavaScript cousins. When each property is listed on its own line, the commas are optional. Objects may be created using indentation instead of explicit braces, similar to <a href="http://yaml.org">YAML</a>.</p>
<div class='code'><pre><code>song = [<span class="string">"do"</span>, <span class="string">"re"</span>, <span class="string">"mi"</span>, <span class="string">"fa"</span>, <span class="string">"so"</span>]
singers = {Jagger: <span class="string">"Rock"</span>, Elvis: <span class="string">"Roll"</span>}
@@ -1053,7 +991,8 @@ turtle = {
output = turtle.name + <span class="string">" wears an "</span> + turtle.mask + <span class="string">" mask. Watch out for his "</span> + turtle.weapon + <span class="string">"!"</span>;
</code></pre><script>window.example3 = "name = \"Michelangelo\"\nmask = \"orange\"\nweapon = \"nunchuks\"\nturtle = {name, mask, weapon}\noutput = \"#{turtle.name} wears an #{turtle.mask} mask. Watch out for his #{turtle.weapon}!\"\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example3);'>load</div><br class='clear' /></div>
<span class="bookmark" id="lexical-scope"></span>
<h2>Lexical Scoping and Variable Safety</h2><p>The CoffeeScript compiler takes care to make sure that all of your variables are properly declared within lexical scope — you never need to write <code>var</code> yourself.</p>
<h2>Lexical Scoping and Variable Safety</h2>
<p>The CoffeeScript compiler takes care to make sure that all of your variables are properly declared within lexical scope — you never need to write <code>var</code> yourself.</p>
<div class='code'><pre><code>outer = <span class="number">1</span>
<span class="function"><span class="title">changeNumbers</span> = -&gt;</span>
inner = <span class="number">-1</span>
@@ -1087,7 +1026,8 @@ inner = changeNumbers();
<p>If youd like to create top-level variables for other scripts to use, attach them as properties on <strong>window</strong>; attach them as properties on the <strong>exports</strong> object in CommonJS; or use an <a href="#modules"><code>export</code> statement</a>. If youre targeting both CommonJS and the browser, the <strong>existential operator</strong> (covered below), gives you a reliable way to figure out where to add them: <code>exports ? this</code></p>
<span class="bookmark" id="conditionals"></span>
<h2>If, Else, Unless, and Conditional Assignment</h2><p><strong>If/else</strong> statements can be written without the use of parentheses and curly brackets. As with functions and other block expressions, multi-line conditionals are delimited by indentation. Theres also a handy postfix form, with the <code>if</code> or <code>unless</code> at the end.</p>
<h2>If, Else, Unless, and Conditional Assignment</h2>
<p><strong>If/else</strong> statements can be written without the use of parentheses and curly brackets. As with functions and other block expressions, multi-line conditionals are delimited by indentation. Theres also a handy postfix form, with the <code>if</code> or <code>unless</code> at the end.</p>
<p>CoffeeScript can compile <strong>if</strong> statements into JavaScript expressions, using the ternary operator when possible, and closure wrapping otherwise. There is no explicit ternary statement in CoffeeScript — you simply use a regular <strong>if</strong> statement on a single line.</p>
<div class='code'><pre><code>mood = greatlyImproved <span class="keyword">if</span> singing
@@ -1114,7 +1054,8 @@ date = <span class="keyword">if</span> friday <span class="keyword">then</span>
date = friday ? sue : jill;
</code></pre><script>window.example1 = "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"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div>
<span class="bookmark" id="splats"></span>
<h2>Splats…</h2><p>The JavaScript <strong>arguments object</strong> is a useful way to work with functions that accept variable numbers of arguments. CoffeeScript provides splats <code>...</code>, both for function definition as well as invocation, making variable numbers of arguments a little bit more palatable.</p>
<h2>Splats…</h2>
<p>The JavaScript <strong>arguments object</strong> is a useful way to work with functions that accept variable numbers of arguments. CoffeeScript provides splats <code>...</code>, both for function definition as well as invocation, making variable numbers of arguments a little bit more palatable.</p>
<div class='code'><pre><code>gold = silver = rest = <span class="string">"unknown"</span>
<span class="function">
<span class="title">awardMedals</span> = <span class="params">(first, second, others...)</span> -&gt;</span>
@@ -1186,7 +1127,8 @@ alert(&quot;Silver: &quot; + silver);
alert(&quot;The Field: &quot; + rest);
;">run</div><br class='clear' /></div>
<span class="bookmark" id="loops"></span>
<h2>Loops and Comprehensions</h2><p>Most of the loops youll write in CoffeeScript will be <strong>comprehensions</strong> over arrays, objects, and ranges. Comprehensions replace (and compile into) <strong>for</strong> loops, with optional guard clauses and the value of the current array index. Unlike for loops, array comprehensions are expressions, and can be returned and assigned.</p>
<h2>Loops and Comprehensions</h2>
<p>Most of the loops youll write in CoffeeScript will be <strong>comprehensions</strong> over arrays, objects, and ranges. Comprehensions replace (and compile into) <strong>for</strong> loops, with optional guard clauses and the value of the current array index. Unlike for loops, array comprehensions are expressions, and can be returned and assigned.</p>
<div class='code'><pre><code><span class="comment"># Eat lunch.</span>
eat food <span class="keyword">for</span> food <span class="keyword">in</span> [<span class="string">'toast'</span>, <span class="string">'cheese'</span>, <span class="string">'wine'</span>]
@@ -1362,7 +1304,8 @@ fn = <span class="function"><span class="keyword">function</span>(<span class="p
}
</code></pre><script>window.example5 = "for filename in list\n do (filename) ->\n fs.readFile filename, (err, contents) ->\n compile filename, contents.toString()\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example5);'>load</div><br class='clear' /></div>
<span class="bookmark" id="slices"></span>
<h2>Array Slicing and Splicing with Ranges</h2><p>Ranges can also be used to extract slices of arrays. With two dots (<code>3..6</code>), the range is inclusive (<code>3, 4, 5, 6</code>); with three dots (<code>3...6</code>), the range excludes the end (<code>3, 4, 5</code>). Slices indices have useful defaults. An omitted first index defaults to zero and an omitted second index defaults to the size of the array.</p>
<h2>Array Slicing and Splicing with Ranges</h2>
<p>Ranges can also be used to extract slices of arrays. With two dots (<code>3..6</code>), the range is inclusive (<code>3, 4, 5, 6</code>); with three dots (<code>3...6</code>), the range excludes the end (<code>3, 4, 5</code>). Slices indices have useful defaults. An omitted first index defaults to zero and an omitted second index defaults to the size of the array.</p>
<div class='code'><pre><code>numbers = [<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>]
start = numbers[<span class="number">0.</span><span class="number">.2</span>]
@@ -1411,7 +1354,8 @@ numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
;alert(numbers);">run: numbers</div><br class='clear' /></div><p>Note that JavaScript strings are immutable, and cant be spliced.</p>
<span class="bookmark" id="expressions"></span>
<h2>Everything is an Expression (at least, as much as possible)</h2><p>You might have noticed how even though we dont add return statements to CoffeeScript functions, they nonetheless return their final value. The CoffeeScript compiler tries to make sure that all statements in the language can be used as expressions. Watch how the <code>return</code> gets pushed down into each possible branch of execution in the function below.</p>
<h2>Everything is an Expression (at least, as much as possible)</h2>
<p>You might have noticed how even though we dont add return statements to CoffeeScript functions, they nonetheless return their final value. The CoffeeScript compiler tries to make sure that all statements in the language can be used as expressions. Watch how the <code>return</code> gets pushed down into each possible branch of execution in the function below.</p>
<div class='code'><pre><code><span class="function"><span class="title">grade</span> = <span class="params">(student)</span> -&gt;</span>
<span class="keyword">if</span> student.excellentWork
<span class="string">"A+"</span>
@@ -1518,7 +1462,8 @@ alert((function() {
;">run</div><br class='clear' /></div><p>There are a handful of statements in JavaScript that cant be meaningfully converted into expressions, namely <code>break</code>, <code>continue</code>, and <code>return</code>. If you make use of them within a block of code, CoffeeScript wont try to perform the conversion.</p>
<span class="bookmark" id="operators"></span>
<h2>Operators and Aliases</h2><p>Because the <code>==</code> operator frequently causes undesirable coercion, is intransitive, and has a different meaning than in other languages, CoffeeScript compiles <code>==</code> into <code>===</code>, and <code>!=</code> into <code>!==</code>. In addition, <code>is</code> compiles into <code>===</code>, and <code>isnt</code> into <code>!==</code>.</p>
<h2>Operators and Aliases</h2>
<p>Because the <code>==</code> operator frequently causes undesirable coercion, is intransitive, and has a different meaning than in other languages, CoffeeScript compiles <code>==</code> into <code>===</code>, and <code>!=</code> into <code>!==</code>. In addition, <code>is</code> compiles into <code>===</code>, and <code>isnt</code> into <code>!==</code>.</p>
<p>You can use <code>not</code> as an alias for <code>!</code>.</p>
<p>For logic, <code>and</code> compiles to <code>&amp;&amp;</code>, and <code>or</code> into <code>||</code>.</p>
<p>Instead of a newline or semicolon, <code>then</code> can be used to separate conditions from expressions, in <strong>while</strong>, <strong>if</strong>/<strong>else</strong>, and <strong>switch</strong>/<strong>when</strong> statements.</p>
@@ -1526,7 +1471,7 @@ alert((function() {
<p><code>unless</code> can be used as the inverse of <code>if</code>.</p>
<p>As a shortcut for <code>this.property</code>, you can use <code>@property</code>.</p>
<p>You can use <code>in</code> to test for array presence, and <code>of</code> to test for JavaScript object-key presence.</p>
<p>To simplify math expressions, <code>**</code> can be used for exponentiation and <code>//</code> performs integer division. <code>%</code> works just like in JavaScript, while <code>%%</code> provides <a href="http://en.wikipedia.org/wiki/Modulo_operation">“dividend dependent modulo”</a>:</p>
<p>To simplify math expressions, <code>**</code> can be used for exponentiation and <code>//</code> performs integer division. <code>%</code> works just like in JavaScript, while <code>%%</code> provides <a href="https://en.wikipedia.org/wiki/Modulo_operation">“dividend dependent modulo”</a>:</p>
<div class='code'><pre><code><span class="number">-7</span> % <span class="number">5</span> == <span class="number">-2</span> <span class="comment"># The remainder of 7 / 5</span>
<span class="number">-7</span> %% <span class="number">5</span> == <span class="number">3</span> <span class="comment"># n %% 5 is always between 0 and 4</span>
@@ -1539,126 +1484,68 @@ modulo(<span class="number">-7</span>, <span class="number">5</span>) === <span
tabs.selectTabAtIndex(modulo(tabs.currentIndex - count, tabs.length));
</code></pre><script>window.example1 = "-7 % 5 == -2 # The remainder of 7 / 5\n-7 %% 5 == 3 # n %% 5 is always between 0 and 4\n\ntabs.selectTabAtIndex((tabs.currentIndex - count) %% tabs.length)\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div><p>All together now:</p>
<table class="definitions">
<tbody>
<table>
<thead>
<tr>
<th>CoffeeScript</th>
<th>JavaScript</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>is</code></td>
<td><code>===</code></td>
</tr>
<tr>
<td><code>isnt</code></td>
<td><code>!==</code></td>
</tr>
<tr>
<td><code>not</code></td>
<td><code>!</code></td>
</tr>
<tr>
<td><code>and</code></td>
<td><code>&amp;&amp;</code></td>
</tr>
<tr>
<td><code>or</code></td>
<td><code>||</code></td>
</tr>
<tr>
<td><code>true</code>, <code>yes</code>, <code>on</code></td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>false</code>, <code>no</code>, <code>off</code></td>
<td><code>false</code>, <code>no</code>, <code>off</code></td>
<td><code>false</code></td>
</tr>
<tr>
<td><code>@</code>, <code>this</code></td>
<td><code>this</code></td>
</tr>
<tr>
<td><code>of</code></td>
<td><code>in</code></td>
</tr>
<tr>
<td><code>in</code></td>
<td><em><small>no JS equivalent</small></em></td>
<td><em>no JS equivalent</em></td>
</tr>
<tr>
<td><code>a ** b</code></td>
<td><code>Math.pow(a, b)</code></td>
</tr>
<tr>
<td><code>a // b</code></td>
<td><code>Math.floor(a / b)</code></td>
</tr>
<tr>
<td><code>a %% b</code></td>
<td><code>(a % b + b) % b</code></td>
</tr>
</tbody>
</table>
<div class='code'><pre><code>launch() <span class="keyword">if</span> ignition <span class="keyword">is</span> <span class="literal">on</span>
volume = <span class="number">10</span> <span class="keyword">if</span> band <span class="keyword">isnt</span> SpinalTap
@@ -1695,7 +1582,8 @@ winner = <span class="literal">yes</span> <span class="keyword">if</span> pick <
print(inspect(<span class="string">"My name is "</span> + <span class="keyword">this</span>.name));
</code></pre><script>window.example2 = "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(example2);'>load</div><br class='clear' /></div>
<span class="bookmark" id="existential-operator"></span>
<h2>The Existential Operator</h2><p>Its a little difficult to check for the existence of a variable in JavaScript. <code>if (variable) …</code> comes close, but fails for zero, the empty string, and false. CoffeeScripts existential operator <code>?</code> returns true unless a variable is <strong>null</strong> or <strong>undefined</strong>, which makes it analogous to Rubys <code>nil?</code></p>
<h2>The Existential Operator</h2>
<p>Its a little difficult to check for the existence of a variable in JavaScript. <code>if (variable) …</code> comes close, but fails for zero, the empty string, and false. CoffeeScripts existential operator <code>?</code> returns true unless a variable is <strong>null</strong> or <strong>undefined</strong>, which makes it analogous to Rubys <code>nil?</code></p>
<p>It can also be used for safer conditional assignment than <code>||=</code> provides, for cases where you may be handling numbers or strings.</p>
<div class='code'><pre><code>solipsism = <span class="literal">true</span> <span class="keyword">if</span> mind? <span class="keyword">and</span> <span class="keyword">not</span> world?
@@ -1737,7 +1625,8 @@ zip = <span class="keyword">typeof</span> lottery.drawWinner === <span class="st
</code></pre><script>window.example2 = "zip = lottery.drawWinner?().address?.zipcode\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example2);'>load</div><br class='clear' /></div><p>Soaking up nulls is similar to Rubys <a href="https://rubygems.org/gems/andand">andand gem</a>, and to the <a href="http://docs.groovy-lang.org/latest/html/documentation/index.html#_safe_navigation_operator">safe navigation operator</a> in Groovy.</p>
<span class="bookmark" id="classes"></span>
<h2>Classes, Inheritance, and Super</h2><p>JavaScripts prototypal inheritance has always been a bit of a brain-bender, with a whole family tree of libraries that provide a cleaner syntax for classical inheritance on top of JavaScripts prototypes: <a href="http://code.google.com/p/base2/">Base2</a>, <a href="http://prototypejs.org/">Prototype.js</a>, <a href="http://jsclass.jcoglan.com/">JS.Class</a>, etc. The libraries provide syntactic sugar, but the built-in inheritance would be completely usable if it werent for a couple of small exceptions: its awkward to call <strong>super</strong> (the prototype objects implementation of the current function), and its awkward to correctly set the prototype chain.</p>
<h2>Classes, Inheritance, and Super</h2>
<p>JavaScripts prototypal inheritance has always been a bit of a brain-bender, with a whole family tree of libraries that provide a cleaner syntax for classical inheritance on top of JavaScripts prototypes: <a href="https://code.google.com/p/base2/">Base2</a>, <a href="http://prototypejs.org/">Prototype.js</a>, <a href="http://jsclass.jcoglan.com/">JS.Class</a>, etc. The libraries provide syntactic sugar, but the built-in inheritance would be completely usable if it werent for a couple of small exceptions: its awkward to call <strong>super</strong> (the prototype objects implementation of the current function), and its awkward to correctly set the prototype chain.</p>
<p>Instead of repetitively attaching functions to a prototype, CoffeeScript provides a basic <code>class</code> structure that allows you to name your class, set the superclass, assign prototypal properties, and define the constructor, in a single assignable expression.</p>
<p>Constructor functions are named, to better support helpful stack traces. In the first class in the example below, <code>this.constructor.name is &quot;Animal&quot;</code>.</p>
<div class='code'><pre><code><span class="class"><span class="keyword">class</span> <span class="title">Animal</span></span>
@@ -1883,10 +1772,11 @@ tom.move();
return this.replace(/_/g, &quot;-&quot;);
};
;alert(&quot;one_two&quot;.dasherize());">run: "one_two".dasherize()</div><br class='clear' /></div><p>Finally, class definitions are blocks of executable code, which make for interesting metaprogramming possibilities. Because in the context of a class definition, <code>this</code> is the class object itself (the constructor function), you can assign static properties by using
<code>@property: value</code>, and call functions defined in parent classes: <code>@attr &#39;title&#39;, type: &#39;text&#39;</code></p>
<code>@property: value</code>, and call functions defined in parent classes: <code>@attr 'title', type: 'text'</code></p>
<span class="bookmark" id="destructuring"></span>
<h2>Destructuring Assignment</h2><p>Just like JavaScript (since ES2015), CoffeeScript has destructuring assignment syntax. When you assign an array or object literal to a value, CoffeeScript breaks up and matches both sides against each other, assigning the values on the right to the variables on the left. In the simplest case, it can be used for parallel assignment:</p>
<h2>Destructuring Assignment</h2>
<p>Just like JavaScript (since ES2015), CoffeeScript has destructuring assignment syntax. When you assign an array or object literal to a value, CoffeeScript breaks up and matches both sides against each other, assigning the values on the right to the variables on the left. In the simplest case, it can be used for parallel assignment:</p>
<div class='code'><pre><code>theBait = <span class="number">1000</span>
theSwitch = <span class="number">0</span>
@@ -2039,7 +1929,8 @@ tim = new Person({
;alert(tim.age + &quot; &quot; + tim.height);">run: tim.age + " " + tim.height</div><br class='clear' /></div><p>The above example also demonstrates that if properties are missing in the destructured object or array, you can, just like in JavaScript, provide defaults. The difference with JavaScript is that CoffeeScript, as always, treats both null and undefined the same.</p>
<span class="bookmark" id="fat-arrow"></span>
<h2>Bound Functions, Generator Functions</h2><p>In JavaScript, the <code>this</code> keyword is dynamically scoped to mean the object that the current function is attached to. If you pass a function as a callback or attach it to a different object, the original value of <code>this</code> will be lost. If youre not familiar with this behavior, <a href="http://64.13.255.16/articles/scope_in_javascript/">this Digital Web article</a> gives a good overview of the quirks.</p>
<h2>Bound Functions, Generator Functions</h2>
<p>In JavaScript, the <code>this</code> keyword is dynamically scoped to mean the object that the current function is attached to. If you pass a function as a callback or attach it to a different object, the original value of <code>this</code> will be lost. If youre not familiar with this behavior, <a href="http://64.13.255.16/articles/scope_in_javascript/">this Digital Web article</a> gives a good overview of the quirks.</p>
<p>The fat arrow <code>=&gt;</code> can be used to both define a function, and to bind it to the current value of <code>this</code>, right on the spot. This is helpful when using callback-based libraries like Prototype or jQuery, for creating iterator functions to pass to <code>each</code>, or event-handler functions to use with <code>on</code>. Functions created with the fat arrow are able to access properties of the <code>this</code> where theyre defined.</p>
<div class='code'><pre><code><span class="function"><span class="title">Account</span> = <span class="params">(customer, cart)</span> -&gt;</span>
@customer = customer
@@ -2060,6 +1951,7 @@ Account = <span class="function"><span class="keyword">function</span>(<span cla
};
</code></pre><script>window.example1 = "Account = (customer, cart) ->\n @customer = customer\n @cart = cart\n\n $('.shopping_cart').on 'click', (event) =>\n @customer.purchase @cart\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div><p>If we had used <code>-&gt;</code> in the callback above, <code>@customer</code> would have referred to the undefined “customer” property of the DOM element, and trying to call <code>purchase()</code> on it would have raised an exception.</p>
<p>When used in a class definition, methods declared with the fat arrow will be automatically bound to each instance of the class when the instance is constructed.</p>
<div id="generator-functions" class="bookmark"></div>
<p>CoffeeScript functions also support <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">ES2015 generator functions</a> through the <code>yield</code> keyword. Theres no <code>function*(){}</code> nonsense — a generator in CoffeeScript is simply a function that yields.</p>
<div class='code'><pre><code><span class="function"><span class="title">perfectSquares</span> = -&gt;</span>
num = <span class="number">0</span>
@@ -2094,6 +1986,7 @@ perfectSquares = function*() {
window.ps || (window.ps = perfectSquares());
;alert(ps.next().value);">run: ps.next().value</div><br class='clear' /></div><p><code>yield*</code> is called <code>yield from</code>, and <code>yield return</code> may be used if you need to force a generator that doesnt yield.</p>
<div id="generator-iteration" class="bookmark"></div>
<p>You can iterate over a generator function using <code>for…from</code>.</p>
<div class='code'><pre><code><span class="function"><span class="title">fibonacci</span> = -&gt;</span>
[previous, current] = [<span class="number">1</span>, <span class="number">1</span>]
@@ -2156,7 +2049,8 @@ getFibonacciNumbers = function(length) {
};
;alert(getFibonacciNumbers(10));">run: getFibonacciNumbers(10)</div><br class='clear' /></div>
<span class="bookmark" id="embedded"></span>
<h2>Embedded JavaScript</h2><p>Hopefully, youll never need to use it, but if you ever need to intersperse snippets of JavaScript within your CoffeeScript, you can use backticks to pass it straight through.</p>
<h2>Embedded JavaScript</h2>
<p>Hopefully, youll never need to use it, but if you ever need to intersperse snippets of JavaScript within your CoffeeScript, you can use backticks to pass it straight through.</p>
<div class='code'><pre><code>hi = `<span class="javascript"><span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>{
<span class="keyword">return</span> [<span class="built_in">document</span>.title, <span class="string">"Hello JavaScript"</span>].join(<span class="string">": "</span>);
}</span>`
@@ -2205,7 +2099,8 @@ function time() {
;alert(time());">run: time()</div><br class='clear' /></div>
<span class="bookmark" id="switch"></span>
<h2>Switch/When/Else</h2><p><strong>Switch</strong> statements in JavaScript are a bit awkward. You need to remember to <strong>break</strong> at the end of every <strong>case</strong> statement to avoid accidentally falling through to the default case. CoffeeScript prevents accidental fall-through, and can convert the <code>switch</code> into a returnable, assignable expression. The format is: <code>switch</code> condition, <code>when</code> clauses, <code>else</code> the default case.</p>
<h2>Switch/When/Else</h2>
<p><strong>Switch</strong> statements in JavaScript are a bit awkward. You need to remember to <strong>break</strong> at the end of every <strong>case</strong> statement to avoid accidentally falling through to the default case. CoffeeScript prevents accidental fall-through, and can convert the <code>switch</code> into a returnable, assignable expression. The format is: <code>switch</code> condition, <code>when</code> clauses, <code>else</code> the default case.</p>
<p>As in Ruby, <strong>switch</strong> statements in CoffeeScript can take multiple values for each <strong>when</strong> clause. If any of the values match, the clause runs.</p>
<div class='code'><pre><code><span class="keyword">switch</span> day
<span class="keyword">when</span> <span class="string">"Mon"</span> <span class="keyword">then</span> go work
@@ -2269,7 +2164,8 @@ grade = (<span class="function"><span class="keyword">function</span>(<span clas
})();
</code></pre><script>window.example2 = "score = 76\ngrade = switch\n when score < 60 then 'F'\n when score < 70 then 'D'\n when score < 80 then 'C'\n when score < 90 then 'B'\n else 'A'\n# grade == 'C'\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example2);'>load</div><br class='clear' /></div>
<span class="bookmark" id="try-catch"></span>
<h2>Try/Catch/Finally</h2><p>Try-expressions have the same semantics as try-statements in JavaScript, though in CoffeeScript, you may omit <em>both</em> the catch and finally parts. The catch part may also omit the error parameter if it is not needed.</p>
<h2>Try/Catch/Finally</h2>
<p>Try-expressions have the same semantics as try-statements in JavaScript, though in CoffeeScript, you may omit <em>both</em> the catch and finally parts. The catch part may also omit the error parameter if it is not needed.</p>
<div class='code'><pre><code><span class="keyword">try</span>
allHellBreaksLoose()
catsAndDogsLivingTogether()
@@ -2290,7 +2186,8 @@ grade = (<span class="function"><span class="keyword">function</span>(<span clas
}
</code></pre><script>window.example1 = "try\n allHellBreaksLoose()\n catsAndDogsLivingTogether()\ncatch error\n print error\nfinally\n cleanUp()\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div>
<span class="bookmark" id="comparisons"></span>
<h2>Chained Comparisons</h2><p>CoffeeScript borrows <a href="http://docs.python.org/reference/expressions.html#notin">chained comparisons</a> from Python — making it easy to test if a value falls within a certain range.</p>
<h2>Chained Comparisons</h2>
<p>CoffeeScript borrows <a href="https://docs.python.org/3/reference/expressions.html#not-in">chained comparisons</a> from Python — making it easy to test if a value falls within a certain range.</p>
<div class='code'><pre><code>cholesterol = <span class="number">127</span>
healthy = <span class="number">200</span> &gt; cholesterol &gt; <span class="number">60</span>
@@ -2306,7 +2203,8 @@ cholesterol = 127;
healthy = (200 > cholesterol && cholesterol > 60);
;alert(healthy);">run: healthy</div><br class='clear' /></div>
<span class="bookmark" id="strings"></span>
<h2>String Interpolation, Block Strings, and Block Comments</h2><p>Ruby-style string interpolation is included in CoffeeScript. Double-quoted strings allow for interpolated values, using <code>#{ … }</code>, and single-quoted strings are literal. You may even use interpolation in object keys.</p>
<h2>String Interpolation, Block Strings, and Block Comments</h2>
<p>Ruby-style string interpolation is included in CoffeeScript. Double-quoted strings allow for interpolated values, using <code>#{ … }</code>, and single-quoted strings are literal. You may even use interpolation in object keys.</p>
<div class='code'><pre><code>author = <span class="string">"Wittgenstein"</span>
quote = <span class="string">"A picture is a fact. -- <span class="subst">#{ author }</span>"</span>
@@ -2364,7 +2262,8 @@ Released under the MIT License
</code></pre><script>window.example4 = "###\nSkinnyMochaHalfCaffScript Compiler v1.0\nReleased under the MIT License\n###\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example4);'>load</div><br class='clear' /></div>
<span class="bookmark" id="tagged-template-literals"></span>
<h2>Tagged Template Literals</h2><p>CoffeeScript supports <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals">ES2015 tagged template literals</a>, which enable customized string interpolation. If you immediately prefix a string with a function name (no space between the two), CoffeeScript will output this “function plus string” combination as an ES2015 tagged template literal, which will <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals">behave accordingly</a>: the function is called, with the parameters being the input text and expression parts that make up the interpolated string. The function can then assemble these parts into an output string, providing custom string interpolation.</p>
<h2>Tagged Template Literals</h2>
<p>CoffeeScript supports <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals">ES2015 tagged template literals</a>, which enable customized string interpolation. If you immediately prefix a string with a function name (no space between the two), CoffeeScript will output this “function plus string” combination as an ES2015 tagged template literal, which will <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals">behave accordingly</a>: the function is called, with the parameters being the input text and expression parts that make up the interpolated string. The function can then assemble these parts into an output string, providing custom string interpolation.</p>
<p>Be aware that the CoffeeScript compiler is outputting ES2015 syntax for this feature, so your target JavaScript runtime(s) must support this syntax for your code to work; or you could use tools like <a href="http://babeljs.io/">Babel</a> or <a href="https://github.com/google/traceur-compiler">Traceur Compiler</a> to convert this ES2015 syntax into compatible JavaScript.</p>
<div class='code'><pre><code><span class="function"><span class="title">upperCaseExpr</span> = <span class="params">(textParts, expressions...)</span> -&gt;</span>
textParts.reduce (text, textPart, i) -&gt;
@@ -2404,7 +2303,8 @@ greet = function(name, adjective) {
};
;alert(greet(&quot;greg&quot;, &quot;awesome&quot;));">run: greet("greg", "awesome")</div><br class='clear' /></div>
<span class="bookmark" id="regexes"></span>
<h2>Block Regular Expressions</h2><p>Similar to block strings and comments, CoffeeScript supports block regexes — extended regular expressions that ignore internal whitespace and can contain comments and interpolation. Modeled after Perls <code>/x</code> modifier, CoffeeScripts block regexes are delimited by <code>///</code> and go a long way towards making complex regular expressions readable. To quote from the CoffeeScript source:</p>
<h2>Block Regular Expressions</h2>
<p>Similar to block strings and comments, CoffeeScript supports block regexes — extended regular expressions that ignore internal whitespace and can contain comments and interpolation. Modeled after Perls <code>/x</code> modifier, CoffeeScripts block regexes are delimited by <code>///</code> and go a long way towards making complex regular expressions readable. To quote from the CoffeeScript source:</p>
<div class='code'><pre><code>OPERATOR = <span class="regexp">/// ^ (
?: [-=]&gt; <span class="comment"># function</span>
| [-+*/%&lt;&gt;&amp;|^!?=]= <span class="comment"># compound assign / compare</span>
@@ -2419,9 +2319,10 @@ greet = function(name, adjective) {
OPERATOR = <span class="regexp">/^(?:[-=]&gt;|[-+*\/%&lt;&gt;&amp;|^!?=]=|&gt;&gt;&gt;=?|([-+:])\1|([&amp;|&lt;&gt;])\2=?|\?\.|\.{2,3})/</span>;
</code></pre><script>window.example1 = "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"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div>
<span class="bookmark" id="modules"></span>
<h2>Modules</h2><p>ES2015 modules are supported in CoffeeScript, with very similar <code>import</code> and <code>export</code> syntax:</p>
<h2>Modules</h2>
<p>ES2015 modules are supported in CoffeeScript, with very similar <code>import</code> and <code>export</code> syntax:</p>
<div class='code'><pre><code><span class="keyword">import</span> <span class="string">'local-file.coffee'</span>
<span class="keyword">import</span> <span class="string">'coffee-script'</span>
<span class="keyword">import</span> <span class="string">'coffeescript'</span>
<span class="keyword">import</span> _ <span class="keyword">from</span> <span class="string">'underscore'</span>
<span class="keyword">import</span> * <span class="keyword">as</span> underscore <span class="keyword">from</span> <span class="string">'underscore'</span>
@@ -2444,7 +2345,7 @@ OPERATOR = <span class="regexp">/^(?:[-=]&gt;|[-+*\/%&lt;&gt;&amp;|^!?=]=|&gt;&g
<span class="keyword">export</span> { max, min } <span class="keyword">from</span> <span class="string">'underscore'</span>
</code></pre><pre><code><span class="keyword">import</span> <span class="string">'local-file.coffee'</span>;
<span class="keyword">import</span> <span class="string">'coffee-script'</span>;
<span class="keyword">import</span> <span class="string">'coffeescript'</span>;
<span class="keyword">import</span> _ <span class="keyword">from</span> <span class="string">'underscore'</span>;
@@ -2507,11 +2408,13 @@ OPERATOR = <span class="regexp">/^(?:[-=]&gt;|[-+*\/%&lt;&gt;&amp;|^!?=]=|&gt;&g
max,
min
} <span class="keyword">from</span> <span class="string">'underscore'</span>;
</code></pre><script>window.example1 = "import 'local-file.coffee'\nimport 'coffee-script'\n\nimport _ from 'underscore'\nimport * as underscore from 'underscore'\n\nimport { now } from 'underscore'\nimport { now as currentTimestamp } from 'underscore'\nimport { first, last } from 'underscore'\nimport utilityBelt, { each } from 'underscore'\n\nexport default Math\nexport square = (x) -> x * x\nexport class Mathematics\n least: (x, y) -> if x < y then x else y\n\nexport { sqrt }\nexport { sqrt as squareRoot }\nexport { Mathematics as default, sqrt as squareRoot }\n\nexport * from 'underscore'\nexport { max, min } from 'underscore'\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div><p>Note that the CoffeeScript compiler <strong>does not resolve modules</strong>; writing an <code>import</code> or <code>export</code> statement in CoffeeScript will produce an <code>import</code> or <code>export</code> statement in the resulting output. It is your responsibility attach another transpiler, such as <a href="https://github.com/google/traceur-compiler">Traceur Compiler</a>, <a href="http://babeljs.io/">Babel</a> or <a href="https://github.com/rollup/rollup">Rollup</a>, to convert this ES2015 syntax into code that will work in your target runtimes.</p>
</code></pre><script>window.example1 = "import 'local-file.coffee'\nimport 'coffeescript'\n\nimport _ from 'underscore'\nimport * as underscore from 'underscore'\n\nimport { now } from 'underscore'\nimport { now as currentTimestamp } from 'underscore'\nimport { first, last } from 'underscore'\nimport utilityBelt, { each } from 'underscore'\n\nexport default Math\nexport square = (x) -> x * x\nexport class Mathematics\n least: (x, y) -> if x < y then x else y\n\nexport { sqrt }\nexport { sqrt as squareRoot }\nexport { Mathematics as default, sqrt as squareRoot }\n\nexport * from 'underscore'\nexport { max, min } from 'underscore'\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div><div id="modules-note" class="bookmark"></div>
<p>Note that the CoffeeScript compiler <strong>does not resolve modules</strong>; writing an <code>import</code> or <code>export</code> statement in CoffeeScript will produce an <code>import</code> or <code>export</code> statement in the resulting output. It is your responsibility attach another transpiler, such as <a href="https://github.com/google/traceur-compiler">Traceur Compiler</a>, <a href="http://babeljs.io/">Babel</a> or <a href="https://github.com/rollup/rollup">Rollup</a>, to convert this ES2015 syntax into code that will work in your target runtimes.</p>
<p>Also note that any file with an <code>import</code> or <code>export</code> statement will be output without a <a href="#lexical-scope">top-level function safety wrapper</a>; in other words, importing or exporting modules will automatically trigger <a href="#usage">bare</a> mode for that file. This is because per the ES2015 spec, <code>import</code> or <code>export</code> statements must occur at the topmost scope.</p>
<span class="bookmark" id="cake"></span>
<h2>Cake, and Cakefiles</h2><p>CoffeeScript includes a (very) simple build system similar to <a href="http://www.gnu.org/software/make/">Make</a> and <a href="http://rake.rubyforge.org/">Rake</a>. Naturally, its called Cake, and is used for the tasks that build and test the CoffeeScript language itself. Tasks are defined in a file named <code>Cakefile</code>, and can be invoked by running <code>cake [task]</code> from within the directory. To print a list of all the tasks and options, just type <code>cake</code>.</p>
<h2>Cake, and Cakefiles</h2>
<p>CoffeeScript includes a (very) simple build system similar to <a href="http://www.gnu.org/software/make/">Make</a> and <a href="http://rake.rubyforge.org/">Rake</a>. Naturally, its called Cake, and is used for the tasks that build and test the CoffeeScript language itself. Tasks are defined in a file named <code>Cakefile</code>, and can be invoked by running <code>cake [task]</code> from within the directory. To print a list of all the tasks and options, just type <code>cake</code>.</p>
<p>Task definitions are written in CoffeeScript, so you can put arbitrary code in your Cakefile. Define a task with a name, a long description, and the function to invoke when the task is run. If your task takes a command-line option, you can define the option with short and long flags, and it will be made available in the <code>options</code> object. Heres a task that uses the Node.js API to rebuild CoffeeScripts parser:</p>
<div class='code'><pre><code>fs = <span class="built_in">require</span> <span class="string">'fs'</span>
@@ -2535,81 +2438,123 @@ task(<span class="string">'build:parser'</span>, <span class="string">'rebuild t
dir = options.output || <span class="string">'lib'</span>;
<span class="keyword">return</span> fs.writeFile(dir + <span class="string">"/parser.js"</span>, code);
});
</code></pre><script>window.example1 = "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\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div><p>If you need to invoke one task before another — for example, running <code>build</code> before <code>test</code>, you can use the <code>invoke</code> function: <code>invoke &#39;build&#39;</code>. Cake tasks are a minimal way to expose your CoffeeScript functions to the command line, so <a href="v1/annotated-source/cake.html">dont expect any fanciness built-in</a>. If you need dependencies, or async callbacks, its best to put them in your code itself — not the cake task.</p>
</code></pre><script>window.example1 = "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\n"</script><div class='minibutton load' onclick='javascript: loadConsole(example1);'>load</div><br class='clear' /></div><p>If you need to invoke one task before another — for example, running <code>build</code> before <code>test</code>, you can use the <code>invoke</code> function: <code>invoke 'build'</code>. Cake tasks are a minimal way to expose your CoffeeScript functions to the command line, so <a href="/v1/annotated-source/cake.html">dont expect any fanciness built-in</a>. If you need dependencies, or async callbacks, its best to put them in your code itself — not the cake task.</p>
<span class="bookmark" id="source-maps"></span>
<h2>Source Maps</h2><p>CoffeeScript 1.6.1 and above include support for generating source maps, a way to tell your JavaScript engine what part of your CoffeeScript program matches up with the code being evaluated. Browsers that support it can automatically use source maps to show your original source code in the debugger. To generate source maps alongside your JavaScript files, pass the <code>--map</code> or <code>-m</code> flag to the compiler.</p>
<p>For a full introduction to source maps, how they work, and how to hook them up in your browser, read the <a href="http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/">HTML5 Tutorial</a>.</p>
<h2>Source Maps</h2>
<p>CoffeeScript 1.6.1 and above include support for generating source maps, a way to tell your JavaScript engine what part of your CoffeeScript program matches up with the code being evaluated. Browsers that support it can automatically use source maps to show your original source code in the debugger. To generate source maps alongside your JavaScript files, pass the <code>--map</code> or <code>-m</code> flag to the compiler.</p>
<p>For a full introduction to source maps, how they work, and how to hook them up in your browser, read the <a href="https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/">HTML5 Tutorial</a>.</p>
<span class="bookmark" id="scripts"></span>
<h2>&quot;text/coffeescript&quot; Script Tags</h2><p>While its not recommended for serious use, CoffeeScripts may be included directly within the browser using <code>&lt;script type=&quot;text/coffeescript&quot;&gt;</code> tags. The source includes a compressed and minified version of the compiler (<a href="v1/browser-compiler/coffee-script.js">Download current version here, 51k when gzipped</a>) as <code>v1/browser-compiler/coffee-script.js</code>. Include this file on a page with inline CoffeeScript tags, and it will compile and evaluate them in order.</p>
<h2>text/coffeescript Script Tags</h2>
<p>While its not recommended for serious use, CoffeeScripts may be included directly within the browser using <code>&lt;script type=&quot;text/coffeescript&quot;&gt;</code> tags. The source includes a compressed and minified version of the compiler (<a href="/v1/browser-compiler/coffee-script.js">Download current version here, 51k when gzipped</a>) as <code>v1/browser-compiler/coffee-script.js</code>. Include this file on a page with inline CoffeeScript tags, and it will compile and evaluate them in order.</p>
<p>In fact, the little bit of glue script that runs “Try CoffeeScript” above, as well as the jQuery for the menu, is implemented in just this way. View source and look at the bottom of the page to see the example. Including the script also gives you access to <code>CoffeeScript.compile()</code> so you can pop open Firebug and try compiling some strings.</p>
<p>The usual caveats about CoffeeScript apply — your inline scripts will run within a closure wrapper, so if you want to expose global variables or functions, attach them to the <code>window</code> object.</p>
<span class="bookmark" id="resources"></span>
<h2>Books</h2><p>There are a number of excellent resources to help you get started with CoffeeScript, some of which are freely available online.</p>
<h2>Books</h2>
<p>There are a number of excellent resources to help you get started with CoffeeScript, some of which are freely available online.</p>
<ul>
<li><a href="http://arcturo.github.com/library/coffeescript/">The Little Book on CoffeeScript</a> is a brief 5-chapter introduction to CoffeeScript, written with great clarity and precision by <a href="http://alexmaccaw.co.uk/">Alex MacCaw</a>.</li>
<li><a href="http://autotelicum.github.com/Smooth-CoffeeScript/">Smooth CoffeeScript</a> is a reimagination of the excellent book <a href="http://eloquentjavascript.net/">Eloquent JavaScript</a>, as if it had been written in CoffeeScript instead. Covers language features as well as the functional and object oriented programming styles. By <a href="https://github.com/autotelicum">E. Hoigaard</a>.</li>
<li><a href="http://arcturo.github.io/library/coffeescript/">The Little Book on CoffeeScript</a> is a brief 5-chapter introduction to CoffeeScript, written with great clarity and precision by <a href="http://alexmaccaw.co.uk/">Alex MacCaw</a>.</li>
<li><a href="http://autotelicum.github.io/Smooth-CoffeeScript/">Smooth CoffeeScript</a> is a reimagination of the excellent book <a href="http://eloquentjavascript.net/">Eloquent JavaScript</a>, as if it had been written in CoffeeScript instead. Covers language features as well as the functional and object oriented programming styles. By <a href="https://github.com/autotelicum">E. Hoigaard</a>.</li>
<li><a href="http://pragprog.com/book/tbcoffee/coffeescript">CoffeeScript: Accelerated JavaScript Development</a> is <a href="http://trevorburnham.com/">Trevor Burnham</a>s thorough introduction to the language. By the end of the book, youll have built a fast-paced multiplayer word game, writing both the client-side and Node.js portions in CoffeeScript.</li>
<li><a href="http://www.packtpub.com/coffeescript-programming-with-jquery-rails-nodejs/book">CoffeeScript Programming with jQuery, Rails, and Node.js</a> is a new book by Michael Erasmus that covers CoffeeScript with an eye towards real-world usage both in the browser (jQuery) and on the server-side (Rails, Node).</li>
<li><a href="https://www.packtpub.com/web-development/coffeescript-programming-jquery-rails-and-nodejs">CoffeeScript Programming with jQuery, Rails, and Node.js</a> is a new book by Michael Erasmus that covers CoffeeScript with an eye towards real-world usage both in the browser (jQuery) and on the server-side (Rails, Node).</li>
<li><a href="https://leanpub.com/coffeescript-ristretto/read">CoffeeScript Ristretto</a> is a deep dive into CoffeeScripts semantics from simple functions up through closures, higher-order functions, objects, classes, combinators, and decorators. By <a href="http://braythwayt.com/">Reg Braithwaite</a>.</li>
<li><a href="https://efendibooks.com/minibooks/testing-with-coffeescript">Testing with CoffeeScript</a> is a succinct and freely downloadable guide to building testable applications with CoffeeScript and Jasmine.</li>
<li><a href="http://www.packtpub.com/coffeescript-application-development/book">CoffeeScript Application Development</a> from Packt, introduces CoffeeScript while walking through the process of building a demonstration web application. A <a href="https://www.packtpub.com/web-development/coffeescript-application-development-cookbook">CoffeeScript Application Development Coookbook</a> with over 90 “recipes” is also available.</li>
<li><a href="http://www.manning.com/lee/">CoffeeScript in Action</a> from Manning Publications, covers CoffeeScript syntax, composition techniques and application development.</li>
<li><a href="http://www.dpunkt.de/buecher/4021/coffeescript.html">CoffeeScript: Die Alternative zu JavaScript</a> from dpunkt.verlag, is the first CoffeeScript book in Deutsch.</li>
<li><a href="https://www.packtpub.com/web-development/coffeescript-application-development">CoffeeScript Application Development</a> from Packt, introduces CoffeeScript while walking through the process of building a demonstration web application. A <a href="https://www.packtpub.com/web-development/coffeescript-application-development-cookbook">CoffeeScript Application Development Coookbook</a> with over 90 “recipes” is also available.</li>
<li><a href="https://www.manning.com/books/coffeescript-in-action">CoffeeScript in Action</a> from Manning Publications, covers CoffeeScript syntax, composition techniques and application development.</li>
<li><a href="https://www.dpunkt.de/buecher/4021/coffeescript.html">CoffeeScript: Die Alternative zu JavaScript</a> from dpunkt.verlag, is the first CoffeeScript book in Deutsch.</li>
</ul>
<span class="bookmark" id="screencasts"></span>
<h2>Screencasts</h2><ul>
<li><a href="http://coffeescript.codeschool.com">A Sip of CoffeeScript</a> is a <a href="http://www.codeschool.com">Code School Course</a> which combines 6 screencasts with in-browser coding to make learning fun. The first level is free to try out.</li>
<li><a href="http://peepcode.com/products/coffeescript">Meet CoffeeScript</a> is a 75-minute long screencast by <a href="http://peepcode.com/">PeepCode</a>. Highly memorable for its animations which demonstrate transforming CoffeeScript into the equivalent JS.</li>
<h2>Screencasts</h2>
<ul>
<li><a href="http://coffeescript.codeschool.com/">A Sip of CoffeeScript</a> is a <a href="https://www.codeschool.com">Code School Course</a> which combines 6 screencasts with in-browser coding to make learning fun. The first level is free to try out.</li>
<li><a href="https://www.pluralsight.com/courses/meet-coffeescript">Meet CoffeeScript</a> is a 75-minute long screencast by PeepCode, now <a href="https://www.pluralsight.com/">PluralSight</a>. Highly memorable for its animations which demonstrate transforming CoffeeScript into the equivalent JS.</li>
<li>If youre looking for less of a time commitment, RailsCasts <a href="http://railscasts.com/episodes/267-coffeescript-basics">CoffeeScript Basics</a> should have you covered, hitting all of the important notes about CoffeeScript in 11 minutes.</li>
</ul>
<span class="bookmark" id="examples"></span>
<h2>Examples</h2><p>The <a href="https://github.com/trending?l=coffeescript&amp;since=monthly">best list of open-source CoffeeScript examples</a> can be found on GitHub. But just to throw out a few more:</p>
<h2>Examples</h2>
<p>The <a href="https://github.com/trending?l=coffeescript&amp;since=monthly">best list of open-source CoffeeScript examples</a> can be found on GitHub. But just to throw out a few more:</p>
<ul>
<li><strong>GitHub</strong>s <a href="http://hubot.github.com/">Hubot</a>, a friendly IRC robot that can perform any number of useful and useless tasks.</li>
<li><strong>GitHub</strong>s <a href="https://hubot.github.com/">Hubot</a>, a friendly IRC robot that can perform any number of useful and useless tasks.</li>
<li><strong>sstephenson</strong>s <a href="http://pow.cx/">Pow</a>, a zero-configuration Rack server, with comprehensive annotated source.</li>
<li><strong>technoweenie</strong>s <a href="https://github.com/technoweenie/coffee-resque">Coffee-Resque</a>, a port of <a href="https://github.com/defunkt/resque">Resque</a> for Node.js.</li>
<li><strong>assaf</strong>s <a href="http://zombie.labnotes.org/">Zombie.js</a>, a headless, full-stack, faux-browser testing library for Node.js.</li>
<li><strong>stephank</strong>s <a href="https://github.com/stephank/orona">Orona</a>, a remake of the Bolo tank game for modern browsers.</li>
<li><strong>GitHub</strong>s <a href="https://atom.io/">Atom</a>, a hackable text editor built on web technologies.</li>
<li><strong>Basecamp</strong>s <a href="https://trix-editor.org/">Trix</a>, a rich text editor for web apps.</li>
</ul>
<span class="bookmark" id="additional-resources"></span>
<h2>Resources</h2><ul>
<li><p><a href="http://github.com/jashkenas/coffeescript/">Source Code</a><br>
<h2>Resources</h2>
<ul>
<li>
<p><a href="https://github.com/jashkenas/coffeescript/">Source Code</a><br>
Use <code>bin/coffee</code> to test your changes,<br>
<code>bin/cake test</code> to run the test suite,<br>
<code>bin/cake build</code> to rebuild the full CoffeeScript compiler, and<br>
<code>bin/cake build:except-parser</code> to recompile much faster if youre not editing <code>grammar.coffee</code>.</p>
<p><code>git checkout lib &amp;&amp; bin/cake build:full</code> is a good command to run when youre working on the core language. Itll refresh the <code>lib</code> folder (in case you broke something), build your altered compiler, use that to rebuild itself (a good sanity test) and then run all of the tests. If they pass, theres a good chance youve made a successful change.</p>
</li>
<li><a href="v1/test.html">Browser Tests</a><br>
Run CoffeeScripts test suite in your current browser.</li>
<li><a href="http://github.com/jashkenas/coffeescript/issues">CoffeeScript Issues</a><br>
Bug reports, feature proposals, and ideas for changes to the language belong here.</li>
<li><a href="https://groups.google.com/forum/#!forum/coffeescript">CoffeeScript Google Group</a><br>
If youd like to ask a question, the mailing list is a good place to get help.</li>
<li><a href="http://github.com/jashkenas/coffeescript/wiki">The CoffeeScript Wiki</a><br>
If youve ever learned a neat CoffeeScript tip or trick, or ran into a gotcha — share it on the wiki. The wiki also serves as a directory of handy <a href="http://github.com/jashkenas/coffeescript/wiki/Text-editor-plugins">text editor extensions</a>, <a href="http://github.com/jashkenas/coffeescript/wiki/Web-framework-plugins">web framework plugins</a>, and general <a href="http://github.com/jashkenas/coffeescript/wiki/Build-tools">CoffeeScript build tools</a>.</li>
<li><a href="http://github.com/jashkenas/coffeescript/wiki/FAQ">The FAQ</a><br>
Perhaps your CoffeeScript-related question has been asked before. Check the FAQ first.</li>
<li><a href="http://js2coffee.org">JS2Coffee</a><br>
Is a very well done reverse JavaScript-to-CoffeeScript compiler. Its not going to be perfect (infer what your JavaScript classes are, when you need bound functions, and so on…) — but its a great starting point for converting simple scripts.</li>
<li><a href="https://github.com/jashkenas/coffeescript/tree/master/documentation/images">High-Rez Logo</a><br>
The CoffeeScript logo is available in SVG for use in presentations.</li>
<li>
<p><a href="/v1/test.html">Browser Tests</a><br>
Run CoffeeScripts test suite in your current browser.</p>
</li>
<li>
<p><a href="https://github.com/jashkenas/coffeescript/issues">CoffeeScript Issues</a><br>
Bug reports, feature proposals, and ideas for changes to the language belong here.</p>
</li>
<li>
<p><a href="https://groups.google.com/forum/#!forum/coffeescript">CoffeeScript Google Group</a><br>
If youd like to ask a question, the mailing list is a good place to get help.</p>
</li>
<li>
<p><a href="https://github.com/jashkenas/coffeescript/wiki">The CoffeeScript Wiki</a><br>
If youve ever learned a neat CoffeeScript tip or trick, or ran into a gotcha — share it on the wiki. The wiki also serves as a directory of handy <a href="https://github.com/jashkenas/coffeescript/wiki/Text-editor-plugins">text editor extensions</a>, <a href="https://github.com/jashkenas/coffeescript/wiki/Web-framework-plugins">web framework plugins</a>, and general <a href="https://github.com/jashkenas/coffeescript/wiki/Build-tools">CoffeeScript build tools</a>.</p>
</li>
<li>
<p><a href="https://github.com/jashkenas/coffeescript/wiki/FAQ">The FAQ</a><br>
Perhaps your CoffeeScript-related question has been asked before. Check the FAQ first.</p>
</li>
<li>
<p><a href="http://js2coffee.org">JS2Coffee</a><br>
Is a very well done reverse JavaScript-to-CoffeeScript compiler. Its not going to be perfect (infer what your JavaScript classes are, when you need bound functions, and so on…) — but its a great starting point for converting simple scripts.</p>
</li>
<li>
<p><a href="https://github.com/jashkenas/coffeescript/tree/master/documentation/images">High-Rez Logo</a><br>
The CoffeeScript logo is available in SVG for use in presentations.</p>
</li>
</ul>
<span class="bookmark" id="chat"></span>
<h2>Web Chat (IRC)</h2><p>Quick help and advice can usually be found in the CoffeeScript IRC room. Join <code>#coffeescript</code> on <code>irc.freenode.net</code>, or click the button below to open a webchat session on this page.</p>
<button id="open_webchat">click to open #coffeescript</button>
<h2>Web Chat (IRC)</h2>
<p>Quick help and advice can usually be found in the CoffeeScript IRC room. Join <code>#coffeescript</code> on <code>irc.freenode.net</code>, or click the button below to open a webchat session on this page.</p>
<p><button id="open_webchat">click to open #coffeescript</button></p>
<span class="bookmark" id="changelog"></span>
<h2>Change Log</h2><div class="anchor" id="1.12.4"></div>
<h2>Change Log</h2>
<div class="anchor" id="1.12.6"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/1.12.5...1.12.6">1.12.6</a>
<span class="timestamp"> &mdash; <time datetime="2017-05-15">May 15, 2017</time></span>
</h2><ul>
<li>The <code>return</code> and <code>export</code> keywords can now accept implicit objects (defined by indentation, without needing braces).</li>
<li>Support Unicode code point escapes (e.g. <code>\u{1F4A9}</code>).</li>
<li>The <code>coffee</code> command now first looks to see if CoffeeScript is installed under <code>node_modules</code> in the current folder, and executes the <code>coffee</code> binary there if so; or otherwise it runs the globally installed one. This allows you to have one version of CoffeeScript installed globally and a different one installed locally for a particular project. (Likewise for the <code>cake</code> command.)</li>
<li>Bugfixes for chained function calls not closing implicit objects or ternaries.</li>
<li>Bugfixes for incorrect code generated by the <code>?</code> operator within a termary <code>if</code> statement.</li>
<li>Fixed some tests, and failing tests now result in a nonzero exit code.</li>
</ul>
<div class="anchor" id="1.12.5"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/1.12.4...1.12.5">1.12.5</a>
<span class="timestamp"> &mdash; <time datetime="2017-04-10">April 10, 2017</time></span>
</h2><ul>
<li>Better handling of <code>default</code>, <code>from</code>, <code>as</code> and <code>*</code> within <code>import</code> and <code>export</code> statements. You can now import or export a member named <code>default</code> and the compiler wont interpret it as the <code>default</code> keyword.</li>
<li>Fixed a bug where invalid octal escape sequences werent throwing errors in the compiler.</li>
</ul>
<div class="anchor" id="1.12.4"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/1.12.3...1.12.4">1.12.4</a>
<span class="timestamp"> &mdash; <time datetime="2017-02-18">February 18, 2017</time></span>
@@ -2636,14 +2581,14 @@ The CoffeeScript logo is available in SVG for use in presentations.</li>
<li>The browser compiler can once again be built unminified via <code>MINIFY=false cake build:browser</code>.</li>
<li>The error-prone patched version of <code>Error.prepareStackTrace</code> has been removed.</li>
<li>Command completion in the REPL (pressing tab to get suggestions) has been fixed for Node 6.9.1+.</li>
<li>The <a href="v1/test.html">browser-based tests</a> now include all the tests as the Node-based version.</li>
<li>The <a href="/v1/test.html">browser-based tests</a> now include all the tests as the Node-based version.</li>
</ul>
<div class="anchor" id="1.12.1"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/1.12.0...1.12.1">1.12.1</a>
<span class="timestamp"> &mdash; <time datetime="2016-12-07">December 7, 2016</time></span>
</h2><ul>
<li>You can now import a module member named <code>default</code>, e.g. <code>import { default } from &#39;lib&#39;</code>. Though like in ES2015, you cannot import an entire module and name it <code>default</code> (so <code>import default from &#39;lib&#39;</code> is not allowed).</li>
<li>You can now import a module member named <code>default</code>, e.g. <code>import { default } from 'lib'</code>. Though like in ES2015, you cannot import an entire module and name it <code>default</code> (so <code>import default from 'lib'</code> is not allowed).</li>
<li>Fix regression where <code>from</code> as a variable name was breaking <code>for</code> loop declarations. For the record, <code>from</code> is not a reserved word in CoffeeScript; you may use it for variable names. <code>from</code> behaves like a keyword within the context of <code>import</code> and <code>export</code> statements, and in the declaration of a <code>for</code> loop; though you should also be able to use variables named <code>from</code> in those contexts, and the compiler should be able to tell the difference.</li>
</ul>
<div class="anchor" id="1.12.0"></div>
@@ -2655,7 +2600,7 @@ The CoffeeScript logo is available in SVG for use in presentations.</li>
<li>CoffeeScript now provides a <a href="#generator-iteration"><code>for…from</code></a> syntax for outputting ES2015 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of"><code>for…of</code></a>. (Sorry they couldnt match, but we came up with <code>for…of</code> first for something else.) This allows iterating over generators or any other iterable object. Note that using <code>for…from</code> in your code makes you responsible for ensuring that either your runtime supports <code>for…of</code> or that you transpile the output JavaScript further to a version your target runtime(s) support.</li>
<li>Triple backticks (<code>```</code>) allow the creation of embedded JavaScript blocks where escaping single backticks is not required, which should improve interoperability with ES2015 template literals and with Markdown.</li>
<li>Within single-backtick embedded JavaScript, backticks can now be escaped via <code>\`</code>.</li>
<li>The browser tests now run in the browser again, and are accessible <a href="v1/test.html">here</a> if you would like to test your browser.</li>
<li>The browser tests now run in the browser again, and are accessible <a href="/v1/test.html">here</a> if you would like to test your browser.</li>
<li>CoffeeScript-only keywords in ES2015 <code>import</code>s and <code>export</code>s are now ignored.</li>
<li>The compiler now throws an error on trying to export an anonymous class.</li>
<li>Bugfixes related to tokens and location data, for better source maps and improved compatibility with downstream tools.</li>
@@ -2675,33 +2620,55 @@ The CoffeeScript logo is available in SVG for use in presentations.</li>
<a href="https://github.com/jashkenas/coffeescript/compare/1.10.0...1.11.0">1.11.0</a>
<span class="timestamp"> &mdash; <time datetime="2016-09-24">September 24, 2016</time></span>
</h2><ul>
<li>CoffeeScript now supports ES2015 <a href="#modules"><code>import</code> and <code>export</code> syntax</a>.</li>
<li>Added the <code>-M, --inline-map</code> flag to the compiler, allowing you embed the source map directly into the output JavaScript, rather than as a separate file.</li>
<li><p>A bunch of fixes for <code>yield</code>:</p>
<li>
<p>CoffeeScript now supports ES2015 <a href="#modules"><code>import</code> and <code>export</code> syntax</a>.</p>
</li>
<li>
<p>Added the <code>-M, --inline-map</code> flag to the compiler, allowing you embed the source map directly into the output JavaScript, rather than as a separate file.</p>
</li>
<li>
<p>A bunch of fixes for <code>yield</code>:</p>
<ul>
<li><code>yield return</code> can no longer mistakenly be used as an expression.</li>
<li><p><code>yield</code> now mirrors <code>return</code> in that it can be used stand-alone as well as with expressions. Where you previously wrote <code>yield undefined</code>, you may now write simply <code>yield</code>. However, this means also inheriting the same syntax limitations that <code>return</code> has, so these examples no longer compile:</p>
<pre><code>doubles = ->
<li>
<p><code>yield return</code> can no longer mistakenly be used as an expression.</p>
</li>
<li>
<p><code>yield</code> now mirrors <code>return</code> in that it can be used stand-alone as well as with expressions. Where you previously wrote <code>yield undefined</code>, you may now write simply <code>yield</code>. However, this means also inheriting the same syntax limitations that <code>return</code> has, so these examples no longer compile:</p>
<blockquote class="uneditable-code-block"><pre><code>doubles = -&gt;
yield for i in [1..3]
i * 2
six = ->
six = -&gt;
yield
2 * 3</code></pre></li>
<li><p>The JavaScript output is a bit nicer, with unnecessary parentheses and spaces, double indentation and double semicolons around <code>yield</code> no longer present.</p>
2 * 3
</code></pre>
</blockquote></li>
<li>
<p>The JavaScript output is a bit nicer, with unnecessary parentheses and spaces, double indentation and double semicolons around <code>yield</code> no longer present.</p>
</li>
</ul>
</li>
<li><code>&amp;&amp;=</code>, <code>||=</code>, <code>and=</code> and <code>or=</code> no longer accidentally allow a space before the equals sign.</li>
<li>Improved several error messages.</li>
<li>Just like <code>undefined</code> compiles to <code>void 0</code>, <code>NaN</code> now compiles into <code>0/0</code> and <code>Infinity</code> into <code>2e308</code>.</li>
<li>Bugfix for renamed destructured parameters with defaults. <code>({a: b = 1}) -&gt;</code> no longer crashes the compiler.</li>
<li>Improved the internal representation of a CoffeeScript program. This is only noticeable to tools that use <code>CoffeeScript.tokens</code> or <code>CoffeeScript.nodes</code>. Such tools need to update to take account for changed or added tokens and nodes.</li>
<li><p>Several minor bug fixes, including:</p>
<li>
<p><code>&amp;&amp;=</code>, <code>||=</code>, <code>and=</code> and <code>or=</code> no longer accidentally allow a space before the equals sign.</p>
</li>
<li>
<p>Improved several error messages.</p>
</li>
<li>
<p>Just like <code>undefined</code> compiles to <code>void 0</code>, <code>NaN</code> now compiles into <code>0/0</code> and <code>Infinity</code> into <code>2e308</code>.</p>
</li>
<li>
<p>Bugfix for renamed destructured parameters with defaults. <code>({a: b = 1}) -&gt;</code> no longer crashes the compiler.</p>
</li>
<li>
<p>Improved the internal representation of a CoffeeScript program. This is only noticeable to tools that use <code>CoffeeScript.tokens</code> or <code>CoffeeScript.nodes</code>. Such tools need to update to take account for changed or added tokens and nodes.</p>
</li>
<li>
<p>Several minor bug fixes, including:</p>
<ul>
<li>The caught error in <code>catch</code> blocks is no longer declared unnecessarily, and no longer mistakenly named <code>undefined</code> for <code>catch</code>-less <code>try</code> blocks.</li>
<li>Unassignable parameter destructuring no longer crashes the compiler.</li>
<li>Source maps are now used correctly for errors thrown from .coffee.md files.</li>
<li><code>coffee -e &#39;throw null&#39;</code> no longer crashes.</li>
<li><code>coffee -e 'throw null'</code> no longer crashes.</li>
<li>The REPL no longer crashes when using <code>.exit</code> to exit it.</li>
<li>Invalid JavaScript is no longer output when lots of <code>for</code> loops are used in the same scope.</li>
<li>A unicode issue when using stdin with the CLI.</li>
@@ -2713,9 +2680,14 @@ six = ->
<a href="https://github.com/jashkenas/coffeescript/compare/1.9.3...1.10.0">1.10.0</a>
<span class="timestamp"> &mdash; <time datetime="2015-09-03">September 3, 2015</time></span>
</h2><ul>
<li>CoffeeScript now supports ES2015-style destructuring defaults.</li>
<li><code>(offsetHeight: height) -&gt;</code> no longer compiles. That syntax was accidental and partly broken. Use <code>({offsetHeight: height}) -&gt;</code> instead. Object destructuring always requires braces.</li>
<li><p>Several minor bug fixes, including:</p>
<li>
<p>CoffeeScript now supports ES2015-style destructuring defaults.</p>
</li>
<li>
<p><code>(offsetHeight: height) -&gt;</code> no longer compiles. That syntax was accidental and partly broken. Use <code>({offsetHeight: height}) -&gt;</code> instead. Object destructuring always requires braces.</p>
</li>
<li>
<p>Several minor bug fixes, including:</p>
<ul>
<li>A bug where the REPL would sometimes report valid code as invalid, based on what you had typed earlier.</li>
<li>A problem with multiple JS contexts in the jest test framework.</li>
@@ -2781,7 +2753,7 @@ six = ->
<li>Fixed a slight formatting error in CoffeeScripts source map-patched stack traces.</li>
<li>The <code>%%</code> operator now coerces its right operand only once.</li>
<li>It is now possible to require CoffeeScript files from Cakefiles without having to register the compiler first.</li>
<li>The CoffeeScript REPL is now exported and can be required using <code>require &#39;coffee-script/repl&#39;</code>.</li>
<li>The CoffeeScript REPL is now exported and can be required using <code>require 'coffee-script/repl'</code>.</li>
<li>Fixes for the REPL in Node 0.11.</li>
</ul>
<div class="anchor" id="1.7.1"></div>
@@ -2796,7 +2768,7 @@ six = ->
<a href="https://github.com/jashkenas/coffeescript/compare/1.6.3...1.7.0">1.7.0</a>
<span class="timestamp"> &mdash; <time datetime="2014-01-28">January 28, 2014</time></span>
</h2><ul>
<li>When requiring CoffeeScript files in Node you must now explicitly register the compiler. This can be done with <code>require &#39;coffee-script/register&#39;</code> or <code>CoffeeScript.register()</code>. Also for configuration such as Mochas, use <strong>coffee-script/register</strong>.</li>
<li>When requiring CoffeeScript files in Node you must now explicitly register the compiler. This can be done with <code>require 'coffee-script/register'</code> or <code>CoffeeScript.register()</code>. Also for configuration such as Mochas, use <strong>coffee-script/register</strong>.</li>
<li>Improved error messages, source maps and stack traces. Source maps now use the updated <code>//#</code> syntax.</li>
<li>Leading <code>.</code> now closes all open calls, allowing for simpler chaining syntax.</li>
</ul>
@@ -2843,7 +2815,7 @@ six = ->
<a href="https://github.com/jashkenas/coffeescript/compare/1.5.0...1.6.1">1.6.1</a>
<span class="timestamp"> &mdash; <time datetime="2013-03-05">March 5, 2013</time></span>
</h2><ul>
<li>First release of <a href="#source-maps">source maps</a>. Pass the <code>--map</code> flag to the compiler, and off you go. Direct all your thanks over to <a href="http://github.com/jwalton">Jason Walton</a>.</li>
<li>First release of <a href="#source-maps">source maps</a>. Pass the <code>--map</code> flag to the compiler, and off you go. Direct all your thanks over to <a href="https://github.com/jwalton">Jason Walton</a>.</li>
<li>Fixed a 1.5.0 regression with multiple implicit calls against an indented implicit object. Combinations of implicit function calls and implicit objects should generally be parsed better now — but it still isnt good <em>style</em> to nest them too heavily.</li>
<li><code>.coffee.md</code> is now also supported as a Literate CoffeeScript file extension, for existing tooling. <code>.litcoffee</code> remains the canonical one.</li>
<li>Several minor fixes surrounding member properties, bound methods and <code>super</code> in class declarations.</li>
@@ -2911,7 +2883,7 @@ six = ->
<li>Ahh, whitespace. CoffeeScripts compiled JS now tries to space things out and keep it readable, as you can see in the examples on this page.</li>
<li>You can now call <code>super</code> in class level methods in class bodies, and bound class methods now preserve their correct context.</li>
<li>JavaScript has always supported octal numbers <code>010 is 8</code>, and hexadecimal numbers <code>0xf is 15</code>, but CoffeeScript now also supports binary numbers: <code>0b10 is 2</code>.</li>
<li>The CoffeeScript module has been nested under a subdirectory to make it easier to <code>require</code> individual components separately, without having to use <strong>npm</strong>. For example, after adding the CoffeeScript folder to your path: <code>require(&#39;coffee-script/lexer&#39;)</code></li>
<li>The CoffeeScript module has been nested under a subdirectory to make it easier to <code>require</code> individual components separately, without having to use <strong>npm</strong>. For example, after adding the CoffeeScript folder to your path: <code>require('coffee-script/lexer')</code></li>
<li>Theres a new “link” feature in Try CoffeeScript on this webpage. Use it to get a shareable permalink for your example script.</li>
<li>The <code>coffee --watch</code> feature now only works on Node.js 0.6.0 and higher, but now also works properly on Windows.</li>
<li>Lots of small bug fixes from <strong><a href="https://github.com/michaelficarra">@michaelficarra</a></strong>, <strong><a href="https://github.com/geraldalewis">@geraldalewis</a></strong>, <strong><a href="https://github.com/satyr">@satyr</a></strong>, and <strong><a href="https://github.com/trevorburnham">@trevorburnham</a></strong>.</li>
@@ -2950,7 +2922,7 @@ six = ->
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/0.9.4...0.9.5">0.9.5</a>
<span class="timestamp"> &mdash; <time datetime="2010-11-21">November 21, 2010</time></span>
</h2><p>0.9.5 should be considered the first release candidate for CoffeeScript 1.0. There have been a large number of internal changes since the previous release, many contributed from <strong>satyr</strong>s <a href="http://github.com/satyr/coco">Coco</a> dialect of CoffeeScript. Heregexes (extended regexes) were added. Functions can now have default arguments. Class bodies are now executable code. Improved syntax errors for invalid CoffeeScript. <code>undefined</code> now works like <code>null</code>, and cannot be assigned a new value. There was a precedence change with respect to single-line comprehensions: <code>result = i for i in list</code>
</h2><p>0.9.5 should be considered the first release candidate for CoffeeScript 1.0. There have been a large number of internal changes since the previous release, many contributed from <strong>satyr</strong>s <a href="https://github.com/satyr/coco">Coco</a> dialect of CoffeeScript. Heregexes (extended regexes) were added. Functions can now have default arguments. Class bodies are now executable code. Improved syntax errors for invalid CoffeeScript. <code>undefined</code> now works like <code>null</code>, and cannot be assigned a new value. There was a precedence change with respect to single-line comprehensions: <code>result = i for i in list</code>
used to parse as <code>result = (i for i in list)</code> by default … it now parses as
<code>(result = i) for i in list</code>.</p>
<div class="anchor" id="0.9.4"></div>
@@ -3017,7 +2989,7 @@ used to parse as <code>result = (i for i in list)</code> by default … it now p
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/0.5.4...0.5.5">0.5.5</a>
<span class="timestamp"> &mdash; <time datetime="2010-03-08">March 8, 2010</time></span>
</h2><p>String interpolation, contributed by <a href="http://github.com/StanAngeloff">Stan Angeloff</a>. Since <code>--run</code> has been the default since <strong>0.5.3</strong>, updating <code>--stdio</code> and <code>--eval</code> to run by default, pass <code>--compile</code> as well if youd like to print the result.</p>
</h2><p>String interpolation, contributed by <a href="https://github.com/StanAngeloff">Stan Angeloff</a>. Since <code>--run</code> has been the default since <strong>0.5.3</strong>, updating <code>--stdio</code> and <code>--eval</code> to run by default, pass <code>--compile</code> as well if youd like to print the result.</p>
<div class="anchor" id="0.5.4"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/0.5.3...0.5.4">0.5.4</a>
@@ -3033,7 +3005,7 @@ used to parse as <code>result = (i for i in list)</code> by default … it now p
<a href="https://github.com/jashkenas/coffeescript/compare/0.5.1...0.5.2">0.5.2</a>
<span class="timestamp"> &mdash; <time datetime="2010-02-25">February 25, 2010</time></span>
</h2><p>Added a compressed version of the compiler for inclusion in web pages as
<code>v1/browser-compiler/coffee-script.js</code>. Itll automatically run any script tags with type <code>text/coffeescript</code> for you. Added a <code>--stdio</code> option to the <code>coffee</code> command, for piped-in compiles.</p>
<code>/v1/browser-compiler/coffee-script.js</code>. Itll automatically run any script tags with type <code>text/coffeescript</code> for you. Added a <code>--stdio</code> option to the <code>coffee</code> command, for piped-in compiles.</p>
<div class="anchor" id="0.5.1"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/0.5.0...0.5.1">0.5.1</a>
@@ -3099,7 +3071,7 @@ The <code>extends</code> keyword now functions identically to <code>goog.inherit
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/0.1.6...0.2.0">0.2.0</a>
<span class="timestamp"> &mdash; <time datetime="2010-01-05">January 5, 2010</time></span>
</h2><p>Major release. Significant whitespace. Better statement-to-expression conversion. Splats. Splice literals. Object comprehensions. Blocks. The existential operator. Many thanks to all the folks who posted issues, with special thanks to <a href="http://github.com/liamoc">Liam OConnor-Davis</a> for whitespace and expression help.</p>
</h2><p>Major release. Significant whitespace. Better statement-to-expression conversion. Splats. Splice literals. Object comprehensions. Blocks. The existential operator. Many thanks to all the folks who posted issues, with special thanks to <a href="https://github.com/liamoc">Liam OConnor-Davis</a> for whitespace and expression help.</p>
<div class="anchor" id="0.1.6"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/0.1.5...0.1.6">0.1.6</a>
@@ -3114,7 +3086,7 @@ The <code>extends</code> keyword now functions identically to <code>goog.inherit
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/0.1.3...0.1.4">0.1.4</a>
<span class="timestamp"> &mdash; <time datetime="2009-12-25">December 25, 2009</time></span>
</h2><p>The official CoffeeScript extension is now <code>.coffee</code> instead of <code>.cs</code>, which properly belongs to <a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language">C#</a>). Due to popular demand, you can now also use <code>=</code> to assign. Unlike JavaScript, <code>=</code> can also be used within object literals, interchangeably with <code>:</code>. Made a grammatical fix for chained function calls like <code>func(1)(2)(3)(4)</code>. Inheritance and super no longer use <code>__proto__</code>, so they should be IE-compatible now.</p>
</h2><p>The official CoffeeScript extension is now <code>.coffee</code> instead of <code>.cs</code>, which properly belongs to <a href="https://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a>. Due to popular demand, you can now also use <code>=</code> to assign. Unlike JavaScript, <code>=</code> can also be used within object literals, interchangeably with <code>:</code>. Made a grammatical fix for chained function calls like <code>func(1)(2)(3)(4)</code>. Inheritance and super no longer use <code>__proto__</code>, so they should be IE-compatible now.</p>
<div class="anchor" id="0.1.3"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/0.1.2...0.1.3">0.1.3</a>

View File

@@ -90,6 +90,10 @@ arrayEgal = (a, b) ->
@eq = (a, b, msg) -> ok egal(a, b), msg or "Expected #{a} to equal #{b}"
@arrayEq = (a, b, msg) -> ok arrayEgal(a,b), msg or "Expected #{a} to deep equal #{b}"
@toJS = (str) ->
CoffeeScript.compile str, bare: yes
.replace /^\s+|\s+$/g, '' # Trim leading/trailing whitespace
@doesNotThrow = (fn) ->
fn()
@@ -3146,6 +3150,17 @@ test "#748: trailing reserved identifiers", ->
nonce
eq nonce, result
test 'if-else within an assignment, condition parenthesized', ->
result = if (1 is 1) then 'correct'
eq result, 'correct'
result = if ('whatever' ? no) then 'correct'
eq result, 'correct'
f = -> 'wrong'
result = if (f?()) then 'correct' else 'wrong'
eq result, 'correct'
# Postfix
test "#3056: multiple postfix conditionals", ->
@@ -3882,6 +3897,13 @@ test "octal escapes", ->
/a\\0\\tb\\\\\\07c/
\ \ \ \ ^\^^
'''
assertErrorFormat '''
/a\\1\\tb\\\\\\07c/
''', '''
[stdin]:1:10: error: octal escape sequences are not allowed \\07
/a\\1\\tb\\\\\\07c/
\ \ \ \ ^\^^
'''
assertErrorFormat '''
///a
#{b} \\01///
@@ -4677,6 +4699,68 @@ test "can't use pattern matches for loop indices", ->
^^^
'''
test "#4248: Unicode code point escapes", ->
assertErrorFormat '''
"a
#{b} \\u{G02}
c"
''', '''
[stdin]:2:8: error: invalid escape sequence \\u{G02}
#{b} \\u{G02}
^\^^^^^^
'''
assertErrorFormat '''
/a\\u{}b/
''', '''
[stdin]:1:3: error: invalid escape sequence \\u{}
/a\\u{}b/
^\^^^
'''
assertErrorFormat '''
///a \\u{01abc///
''', '''
[stdin]:1:6: error: invalid escape sequence \\u{01abc
///a \\u{01abc///
^\^^^^^^^
'''
assertErrorFormat '''
/\\u{123} \\u{110000}/
''', '''
[stdin]:1:10: error: unicode code point escapes greater than \\u{10ffff} are not allowed
/\\u{123} \\u{110000}/
\ ^\^^^^^^^^^
'''
assertErrorFormat '''
///abc\\\\\\u{123456}///u
''', '''
[stdin]:1:9: error: unicode code point escapes greater than \\u{10ffff} are not allowed
///abc\\\\\\u{123456}///u
\ \^\^^^^^^^^^
'''
assertErrorFormat '''
"""
\\u{123}
a
\\u{00110000}
#{ 'b' }
"""
''', '''
[stdin]:4:5: error: unicode code point escapes greater than \\u{10ffff} are not allowed
\\u{00110000}
^\^^^^^^^^^^^
'''
assertErrorFormat '''
'\\u{a}\\u{1111110000}'
''', '''
[stdin]:1:7: error: unicode code point escapes greater than \\u{10ffff} are not allowed
'\\u{a}\\u{1111110000}'
\ ^\^^^^^^^^^^^^^
'''
</script>
<script type="text/x-coffeescript" class="test" id="eval">
if vm = require? 'vm'
@@ -4987,6 +5071,9 @@ test "indented heredoc", ->
# * single line arguments
# * inline function literal
# * inline object literal
#
# * chaining inside
# * implicit object literal
test "chaining after outdent", ->
id = (x) -> x
@@ -5057,6 +5144,37 @@ test "#1495, method call chaining", ->
).join ', '
eq 'a, b, c', result
test "chaining should not wrap spilling ternary", ->
throws -> CoffeeScript.compile """
if 0 then 1 else g
a: 42
.h()
"""
test "chaining should wrap calls containing spilling ternary", ->
f = (x) -> h: x
id = (x) -> x
result = f if true then 42 else id
a: 2
.h
eq 42, result
test "chaining should work within spilling ternary", ->
f = (x) -> h: x
id = (x) -> x
result = f if false then 1 else id
a: 3
.a
eq 3, result.h
test "method call chaining inside objects", ->
f = (x) -> c: 42
result =
a: f 1
b: f a: 1
.c
eq 42, result.b
# Nested blocks caused by paren unwrapping
test "#1492: Nested blocks don't cause double semicolons", ->
js = CoffeeScript.compile '(0;0)'
@@ -7628,12 +7746,6 @@ test "Verify all tokens get a location", ->
# CoffeeScript also supports optional commas within `{ … }`.
# Helper function
toJS = (str) ->
CoffeeScript.compile str, bare: yes
.replace /^\s+|\s+$/g, '' # Trim leading/trailing whitespace
# Import statements
test "backticked import statement", ->
@@ -7945,6 +8057,28 @@ test "export default object", ->
};"""
eq toJS(input), output
test "export default implicit object", ->
input = "export default foo: 'bar', baz: 'qux'"
output = """
export default {
foo: 'bar',
baz: 'qux'
};"""
eq toJS(input), output
test "export default multiline implicit object", ->
input = """
export default
foo: 'bar',
baz: 'qux'
"""
output = """
export default {
foo: 'bar',
baz: 'qux'
};"""
eq toJS(input), output
test "export default assignment expression", ->
input = "export default foo = 'bar'"
output = """
@@ -8310,7 +8444,7 @@ test "export an aliased member named default", ->
};"""
eq toJS(input), output
test "export an imported member named default", ->
test "import an imported member named default", ->
input = "import { default } from 'lib'"
output = """
import {
@@ -8318,7 +8452,7 @@ test "export an imported member named default", ->
} from 'lib';"""
eq toJS(input), output
test "export an imported aliased member named default", ->
test "import an imported aliased member named default", ->
input = "import { default as def } from 'lib'"
output = """
import {
@@ -8326,6 +8460,22 @@ test "export an imported aliased member named default", ->
} from 'lib';"""
eq toJS(input), output
test "export an imported member named default", ->
input = "export { default } from 'lib'"
output = """
export {
default
} from 'lib';"""
eq toJS(input), output
test "export an imported aliased member named default", ->
input = "export { default as def } from 'lib'"
output = """
export {
default as def
} from 'lib';"""
eq toJS(input), output
test "#4394: export shouldn't prevent variable declarations", ->
input = """
x = 1
@@ -8342,6 +8492,121 @@ test "#4394: export shouldn't prevent variable declarations", ->
"""
eq toJS(input), output
test "#4451: `default` in an export statement is only treated as a keyword when it follows `export` or `as`", ->
input = "export default { default: 1 }"
output = """
export default {
"default": 1
};
"""
eq toJS(input), output
test "#4491: import- and export-specific lexing should stop after import/export statement", ->
input = """
import {
foo,
bar as baz
} from 'lib'
foo as
3 * as 4
from 'foo'
"""
output = """
import {
foo,
bar as baz
} from 'lib';
foo(as);
3 * as(4);
from('foo');
"""
eq toJS(input), output
input = """
import { foo, bar as baz } from 'lib'
foo as
3 * as 4
from 'foo'
"""
output = """
import {
foo,
bar as baz
} from 'lib';
foo(as);
3 * as(4);
from('foo');
"""
eq toJS(input), output
input = """
import * as lib from 'lib'
foo as
3 * as 4
from 'foo'
"""
output = """
import * as lib from 'lib';
foo(as);
3 * as(4);
from('foo');
"""
eq toJS(input), output
input = """
export {
foo,
bar
}
foo as
3 * as 4
from 'foo'
"""
output = """
export {
foo,
bar
};
foo(as);
3 * as(4);
from('foo');
"""
eq toJS(input), output
input = """
export * from 'lib'
foo as
3 * as 4
from 'foo'
"""
output = """
export * from 'lib';
foo(as);
3 * as(4);
from('foo');
"""
eq toJS(input), output
</script>
<script type="text/x-coffeescript" class="test" id="numbers">
# Number Literals
@@ -9013,6 +9278,18 @@ test "#4324: Shorthand after interpolated key", ->
eq 1, obj[1]
eq 2, obj.a
test "#1263: Braceless object return", ->
fn = ->
return
a: 1
b: 2
c: -> 3
obj = fn()
eq 1, obj.a
eq 2, obj.b
eq 3, obj.c()
</script>
<script type="text/x-coffeescript" class="test" id="operators">
# Operators
@@ -9979,6 +10256,35 @@ test "#3795: Escape otherwise invalid characters", ->
ok ///#{a}\0
1///.test 'a\x001'
test "#4248: Unicode code point escapes", ->
ok /a\u{1ab}c/u.test 'a\u01abc'
ok ///#{ 'a' }\u{000001ab}c///u.test 'a\u{1ab}c'
ok ///a\u{000001ab}c///u.test 'a\u{1ab}c'
ok /a\u{12345}c/u.test 'a\ud808\udf45c'
# and now without u flag
ok /a\u{1ab}c/.test 'a\u01abc'
ok ///#{ 'a' }\u{000001ab}c///.test 'a\u{1ab}c'
ok ///a\u{000001ab}c///.test 'a\u{1ab}c'
ok /a\u{12345}c/.test 'a\ud808\udf45c'
# rewrite code point escapes
input = """
/\\u{bcdef}\\u{abc}/u
"""
output = """
/\\udab3\\uddef\\u0abc/u;
"""
eq toJS(input), output
input = """
///#{ 'a' }\\u{bcdef}///
"""
output = """
/a\\udab3\\uddef/;
"""
eq toJS(input), output
</script>
<script type="text/x-coffeescript" class="test" id="repl">
return if global.testingBrowser
@@ -10050,6 +10356,11 @@ testRepl "variables are saved", (input, output) ->
eq "'foobar'", output.lastWrite()
testRepl "empty command evaluates to undefined", (input, output) ->
# A regression fixed in Node 5.11.0 broke the handling of pressing enter in
# the Node REPL; see https://github.com/nodejs/node/pull/6090 and
# https://github.com/jashkenas/coffeescript/issues/4502.
# Just skip this test for versions of Node < 6.
return if parseInt(process.versions.node.split('.')[0], 10) < 6
input.emitLine ''
eq 'undefined', output.lastWrite()
@@ -10723,10 +11034,10 @@ test "`Future Reserved Word`s, `eval` and `arguments` restrictions", ->
check "#{keyword} *= 1"
check "#{keyword} /= 1"
check "#{keyword} ?= 1"
check "{keyword}++"
check "++{keyword}"
check "{keyword}--"
check "--{keyword}"
check "#{keyword}++"
check "++#{keyword}"
check "#{keyword}--"
check "--#{keyword}"
destruct = (keyword, check = strict) ->
check "{#{keyword}}"
check "o = {#{keyword}}"
@@ -11169,6 +11480,36 @@ test "#4314: Whitespace less than or equal to stripped indentation", ->
#{1} #{2} #{3} #{4} #{5} end
a #{0} b"""
test "#4248: Unicode code point escapes", ->
eq '\u01ab\u00cd', '\u{1ab}\u{cd}'
eq '\u01ab', '\u{000001ab}'
eq 'a\u01ab', "#{ 'a' }\u{1ab}"
eq '\u01abc', '''\u{01ab}c'''
eq '\u01abc', """\u{1ab}#{ 'c' }"""
eq '\udab3\uddef', '\u{bcdef}'
eq '\udab3\uddef', '\u{0000bcdef}'
eq 'a\udab3\uddef', "#{ 'a' }\u{bcdef}"
eq '\udab3\uddefc', '''\u{0bcdef}c'''
eq '\udab3\uddefc', """\u{bcdef}#{ 'c' }"""
eq '\\u{123456}', "#{'\\'}#{'u{123456}'}"
# rewrite code point escapes
input = """
'\\u{bcdef}\\u{abc}'
"""
output = """
'\\udab3\\uddef\\u0abc';
"""
eq toJS(input), output
input = """
"#{ 'a' }\\u{bcdef}"
"""
output = """
"a\\udab3\\uddef";
"""
eq toJS(input), output
</script>
<script type="text/x-coffeescript" class="test" id="tagged_template_literals">
# Tagged template literals

View File

@@ -124,7 +124,6 @@ We add support for loading remote Coffee scripts via <strong>XHR</strong>, and
<div class="content"><div class='highlight'><pre>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
CoffeeScript.<span class="hljs-built_in">require</span> = <span class="hljs-built_in">require</span>
compile = CoffeeScript.compile</pre></div></div>
</li>
@@ -171,11 +170,12 @@ compile = CoffeeScript.compile</pre></div></div>
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>If were not in a browser environment, were finished with the public API.</p>
<p>Export this more limited <code>CoffeeScript</code> than what is exported by
<code>index.coffee</code>, which is intended for a Node environment.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> <span class="hljs-built_in">window</span>?</pre></div></div>
<div class="content"><div class='highlight'><pre><span class="hljs-built_in">module</span>.exports = CoffeeScript</pre></div></div>
</li>
@@ -186,6 +186,21 @@ compile = CoffeeScript.compile</pre></div></div>
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>If were not in a browser environment, were finished with the public API.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> <span class="hljs-built_in">window</span>?</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Include source maps where possible. If weve got a base64 encoder, a
JSON serializer, and tools for escaping unicode characters, were good to go.
Ported from <a href="https://developer.mozilla.org/en-US/docs/DOM/window.btoa">https://developer.mozilla.org/en-US/docs/DOM/window.btoa</a></p>
@@ -200,11 +215,11 @@ Ported from <a href="https://developer.mozilla.org/en-US/docs/DOM/window.btoa">h
</li>
<li id="section-6">
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Load a remote script from the current domain via XHR.</p>
@@ -231,11 +246,11 @@ Ported from <a href="https://developer.mozilla.org/en-US/docs/DOM/window.btoa">h
</li>
<li id="section-7">
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Activate CoffeeScript in the browser by having it compile and evaluate
all script tags with a content-type of <code>text/coffeescript</code>.
@@ -273,11 +288,11 @@ This happens on page load.</p>
</li>
<li id="section-8">
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p><code>options.filename</code> defines the filename the source map appears as
in Developer Tools. If a script tag has an <code>id</code>, use that as the
@@ -296,11 +311,11 @@ only one CoffeeScript script block to parse.</p>
</li>
<li id="section-9">
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Listen for window load, both in decent browsers and in IE.</p>

View File

@@ -116,7 +116,7 @@
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p><code>cake</code> is a simplified version of <a href="http://www.gnu.org/software/make/">Make</a>
(<a href="http://rake.rubyforge.org/">Rake</a>, <a href="http://github.com/280north/jake">Jake</a>)
(<a href="http://rake.rubyforge.org/">Rake</a>, <a href="https://github.com/280north/jake">Jake</a>)
for CoffeeScript. You define tasks with names and descriptions in a Cakefile,
and can call them from the command line, or invoke them from other tasks.</p>
<p>Running <code>cake</code> with no arguments will print out a list of all the tasks in the
@@ -141,7 +141,7 @@ current directorys Cakefile.</p>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
optparse = <span class="hljs-built_in">require</span> <span class="hljs-string">'./optparse'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span></pre></div></div>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./'</span></pre></div></div>
</li>

View File

@@ -123,9 +123,6 @@ source CoffeeScript into JavaScript.</p>
</div>
<div class="content"><div class='highlight'><pre>
fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
vm = <span class="hljs-built_in">require</span> <span class="hljs-string">'vm'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
{Lexer} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./lexer'</span>
{parser} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./parser'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
@@ -493,13 +490,16 @@ or traverse it by using <code>.traverseChildren()</code> with a callback.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Compile and execute a string of CoffeeScript (on the server), correctly
setting <code>__filename</code>, <code>__dirname</code>, and relative <code>require()</code>.</p>
<p>This file used to export these methods; leave stubs that throw warnings
instead. These methods have been moved into <code>index.coffee</code> to provide
separate entrypoints for Node and non-Node environments, so that static
analysis tools dont choke on Node packages when compiling for a non-Node
environment.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.run = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
mainModule = <span class="hljs-built_in">require</span>.main</pre></div></div>
<div class="content"><div class='highlight'><pre>exports.run = exports.eval = exports.register = <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">'require index.coffee, not this file'</span></pre></div></div>
</li>
@@ -510,221 +510,6 @@ setting <code>__filename</code>, <code>__dirname</code>, and relative <code>requ
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Set the filename.</p>
</div>
<div class="content"><div class='highlight'><pre> mainModule.filename = process.argv[<span class="hljs-number">1</span>] =
<span class="hljs-keyword">if</span> options.filename <span class="hljs-keyword">then</span> fs.realpathSync(options.filename) <span class="hljs-keyword">else</span> <span class="hljs-string">'&lt;anonymous&gt;'</span></pre></div></div>
</li>
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Clear the module cache.</p>
</div>
<div class="content"><div class='highlight'><pre> mainModule.moduleCache <span class="hljs-keyword">and</span>= {}</pre></div></div>
</li>
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Assign paths for node_modules loading</p>
</div>
<div class="content"><div class='highlight'><pre> dir = <span class="hljs-keyword">if</span> options.filename?
path.dirname fs.realpathSync options.filename
<span class="hljs-keyword">else</span>
fs.realpathSync <span class="hljs-string">'.'</span>
mainModule.paths = <span class="hljs-built_in">require</span>(<span class="hljs-string">'module'</span>)._nodeModulePaths dir</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Compile.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> helpers.isCoffee(mainModule.filename) <span class="hljs-keyword">or</span> <span class="hljs-built_in">require</span>.extensions
answer = compile code, options
code = answer.js ? answer
mainModule._compile code, mainModule.filename</pre></div></div>
</li>
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Compile and evaluate a string of CoffeeScript (in a Node.js-like environment).
The CoffeeScript REPL uses this to run the input.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.eval = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> code = code.trim()
createContext = vm.Script.createContext ? vm.createContext
isContext = vm.isContext ? (ctx) -&gt;
options.sandbox <span class="hljs-keyword">instanceof</span> createContext().constructor
<span class="hljs-keyword">if</span> createContext
<span class="hljs-keyword">if</span> options.sandbox?
<span class="hljs-keyword">if</span> isContext options.sandbox
sandbox = options.sandbox
<span class="hljs-keyword">else</span>
sandbox = createContext()
sandbox[k] = v <span class="hljs-keyword">for</span> own k, v <span class="hljs-keyword">of</span> options.sandbox
sandbox.<span class="hljs-built_in">global</span> = sandbox.root = sandbox.GLOBAL = sandbox
<span class="hljs-keyword">else</span>
sandbox = <span class="hljs-built_in">global</span>
sandbox.__filename = options.filename || <span class="hljs-string">'eval'</span>
sandbox.__dirname = path.dirname sandbox.__filename</pre></div></div>
</li>
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>define module/require only if they chose not to specify their own</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> sandbox <span class="hljs-keyword">isnt</span> <span class="hljs-built_in">global</span> <span class="hljs-keyword">or</span> sandbox.<span class="hljs-built_in">module</span> <span class="hljs-keyword">or</span> sandbox.<span class="hljs-built_in">require</span>
Module = <span class="hljs-built_in">require</span> <span class="hljs-string">'module'</span>
sandbox.<span class="hljs-built_in">module</span> = _module = <span class="hljs-keyword">new</span> Module(options.modulename || <span class="hljs-string">'eval'</span>)
sandbox.<span class="hljs-built_in">require</span> = _require = <span class="hljs-function"><span class="hljs-params">(path)</span> -&gt;</span> Module._load path, _module, <span class="hljs-literal">true</span>
_module.filename = sandbox.__filename
<span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> Object.getOwnPropertyNames <span class="hljs-built_in">require</span> <span class="hljs-keyword">when</span> r <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [<span class="hljs-string">'paths'</span>, <span class="hljs-string">'arguments'</span>, <span class="hljs-string">'caller'</span>]
_require[r] = <span class="hljs-built_in">require</span>[r]</pre></div></div>
</li>
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>use the same hack node currently uses for their own REPL</p>
</div>
<div class="content"><div class='highlight'><pre> _require.paths = _module.paths = Module._nodeModulePaths process.cwd()
_require.resolve = <span class="hljs-function"><span class="hljs-params">(request)</span> -&gt;</span> Module._resolveFilename request, _module
o = {}
o[k] = v <span class="hljs-keyword">for</span> own k, v <span class="hljs-keyword">of</span> options
o.bare = <span class="hljs-literal">on</span> <span class="hljs-comment"># ensure return value</span>
js = compile code, o
<span class="hljs-keyword">if</span> sandbox <span class="hljs-keyword">is</span> <span class="hljs-built_in">global</span>
vm.runInThisContext js
<span class="hljs-keyword">else</span>
vm.runInContext js, sandbox
exports.register = <span class="hljs-function">-&gt;</span> <span class="hljs-built_in">require</span> <span class="hljs-string">'./register'</span></pre></div></div>
</li>
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Throw error with deprecation warning when depending upon implicit <code>require.extensions</code> registration</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> <span class="hljs-built_in">require</span>.extensions
<span class="hljs-keyword">for</span> ext <span class="hljs-keyword">in</span> @FILE_EXTENSIONS <span class="hljs-keyword">then</span> <span class="hljs-keyword">do</span> (ext) -&gt;
<span class="hljs-built_in">require</span>.extensions[ext] ?= <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"""
Use CoffeeScript.register() or require the coffeescript/register module to require <span class="hljs-subst">#{ext}</span> files.
"""</span>
exports._compileFile = <span class="hljs-function"><span class="hljs-params">(filename, sourceMap = <span class="hljs-literal">no</span>, inlineMap = <span class="hljs-literal">no</span>)</span> -&gt;</span>
raw = fs.readFileSync filename, <span class="hljs-string">'utf8'</span></pre></div></div>
</li>
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>Strip the Unicode byte order mark, if this file begins with one.</p>
</div>
<div class="content"><div class='highlight'><pre> stripped = <span class="hljs-keyword">if</span> raw.charCodeAt(<span class="hljs-number">0</span>) <span class="hljs-keyword">is</span> <span class="hljs-number">0xFEFF</span> <span class="hljs-keyword">then</span> raw.substring <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> raw
<span class="hljs-keyword">try</span>
answer = compile stripped, {
filename, sourceMap, inlineMap
sourceFiles: [filename]
literate: helpers.isLiterate filename
}
<span class="hljs-keyword">catch</span> err</pre></div></div>
</li>
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>As the filename and code of a dynamically loaded file will be different
from the original file compiled with CoffeeScript.run, add that
information to error so it can be pretty-printed later.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">throw</span> helpers.updateSyntaxError err, stripped, filename
answer</pre></div></div>
</li>
<li id="section-30">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-30">&#182;</a>
</div>
<p>Instantiate a Lexer for our use here.</p>
</div>
@@ -734,11 +519,11 @@ information to error so it can be pretty-printed later.</p>
</li>
<li id="section-31">
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-31">&#182;</a>
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>The real Lexer produces a generic stream of tokens. This object provides a
thin wrapper around it, compatible with the Jison API. We can then pass it
@@ -766,11 +551,11 @@ directly as a “Jison lexer”.</p>
</li>
<li id="section-32">
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-32">&#182;</a>
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Make all the AST nodes visible to the parser.</p>
@@ -781,11 +566,11 @@ directly as a “Jison lexer”.</p>
</li>
<li id="section-33">
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-33">&#182;</a>
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Override Jisons default error handling function.</p>
@@ -796,11 +581,11 @@ directly as a “Jison lexer”.</p>
</li>
<li id="section-34">
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-34">&#182;</a>
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Disregard Jisons message, it contains redundant line number information.
Disregard the token, we take its value directly from the lexer in case
@@ -824,11 +609,11 @@ the error is caused by a generated token which might refer to its origin.</p>
</li>
<li id="section-35">
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-35">&#182;</a>
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>The second argument has a <code>loc</code> property, which should have the location
data for this token. Unfortunately, Jison seems to send an outdated <code>loc</code>
@@ -842,11 +627,11 @@ from the lexer.</p>
</li>
<li id="section-36">
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-36">&#182;</a>
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Based on <a href="http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js">http://v8.googlecode.com/svn/branches/bleeding_edge/src/messages.js</a>
Modified to handle sourceMap</p>
@@ -874,11 +659,11 @@ Modified to handle sourceMap</p>
</li>
<li id="section-37">
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-37">&#182;</a>
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Check for a sourceMap position</p>
@@ -923,11 +708,11 @@ Modified to handle sourceMap</p>
</li>
<li id="section-38">
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-38">&#182;</a>
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>CoffeeScript compiled in a browser may get compiled with <code>options.filename</code>
of <code>&lt;anonymous&gt;</code>, but the browser may request the stack trace with the
@@ -949,11 +734,11 @@ filename of the script file.</p>
</li>
<li id="section-39">
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-39">&#182;</a>
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>Based on <a href="http://goo.gl/ZTx1p">michaelficarra/CoffeeScriptRedux</a>
NodeJS / V8 have no support for transforming positions in stack traces using

View File

@@ -140,7 +140,7 @@ interactive REPL.</p>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
optparse = <span class="hljs-built_in">require</span> <span class="hljs-string">'./optparse'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./'</span>
{spawn, exec} = <span class="hljs-built_in">require</span> <span class="hljs-string">'child_process'</span>
{EventEmitter} = <span class="hljs-built_in">require</span> <span class="hljs-string">'events'</span>
@@ -238,7 +238,10 @@ sources = []
sourceCode = []
notSources = {}
watchedDirs = {}
optionParser = <span class="hljs-literal">null</span></pre></div></div>
optionParser = <span class="hljs-literal">null</span>
exports.buildCSOptionParser = buildCSOptionParser = <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">new</span> optparse.OptionParser SWITCHES, BANNER</pre></div></div>
</li>
@@ -256,6 +259,7 @@ Many flags cause us to divert before compiling anything. Flags passed after
</div>
<div class="content"><div class='highlight'><pre>exports.run = <span class="hljs-function">-&gt;</span>
optionParser = buildCSOptionParser()
parseOptions()</pre></div></div>
</li>
@@ -771,7 +775,6 @@ same directory as the <code>.js</code> file.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">parseOptions</span> = -&gt;</span>
optionParser = <span class="hljs-keyword">new</span> optparse.OptionParser SWITCHES, BANNER
o = opts = optionParser.parse process.argv[<span class="hljs-number">2.</span>.]
o.compile <span class="hljs-keyword">or</span>= !!o.output
o.run = <span class="hljs-keyword">not</span> (o.compile <span class="hljs-keyword">or</span> o.<span class="hljs-built_in">print</span> <span class="hljs-keyword">or</span> o.map)
@@ -856,7 +859,7 @@ shown.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">usage</span> = -&gt;</span>
printLine (<span class="hljs-keyword">new</span> optparse.OptionParser SWITCHES, BANNER).help()</pre></div></div>
printLine optionParser.help()</pre></div></div>
</li>

View File

@@ -115,17 +115,17 @@
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>The CoffeeScript parser is generated by <a href="http://github.com/zaach/jison">Jison</a>
<p>The CoffeeScript parser is generated by <a href="https://github.com/zaach/jison">Jison</a>
from this grammar file. Jison is a bottom-up parser generator, similar in
style to <a href="http://www.gnu.org/software/bison">Bison</a>, implemented in JavaScript.
It can recognize <a href="http://en.wikipedia.org/wiki/LR_grammar">LALR(1), LR(0), SLR(1), and LR(1)</a>
It can recognize <a href="https://en.wikipedia.org/wiki/LR_grammar">LALR(1), LR(0), SLR(1), and LR(1)</a>
type grammars. To create the Jison parser, we list the pattern to match
on the left-hand side, and the action to take (usually the creation of syntax
tree nodes) on the right. As the parser runs, it
shifts tokens from our token stream, from left to right, and
<a href="http://en.wikipedia.org/wiki/Bottom-up_parsing">attempts to match</a>
<a href="https://en.wikipedia.org/wiki/Bottom-up_parsing">attempts to match</a>
the token sequence against the rules below. When a match can be made, it
reduces into the <a href="http://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols">nonterminal</a>
reduces into the <a href="https://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols">nonterminal</a>
(the enclosing name at the top), and we proceed from there.</p>
<p>If you run the <code>cake build:parser</code> command, Jison constructs a parse table
from our rules and saves it into <code>lib/parser.js</code>.</p>
@@ -199,7 +199,7 @@ wrapper and just returning the value directly.</p>
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Our handy DSL for Jison grammar generation, thanks to
<a href="http://github.com/creationix">Tim Caswell</a>. For every rule in the grammar,
<a href="https://github.com/creationix">Tim Caswell</a>. For every rule in the grammar,
we pass the pattern-defining string, the action to run, and extra options,
optionally. If no action is specified, we simply pass the value of the
previous nonterminal.</p>
@@ -221,7 +221,7 @@ previous nonterminal.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>All runtime functions we need are defined on “yy”</p>
<p>All runtime functions we need are defined on <code>yy</code></p>
</div>
@@ -238,7 +238,7 @@ previous nonterminal.</p>
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Returns a function which adds location data to the first parameter passed
in, and returns the parameter. If the parameter is not a node, it will
in, and returns the parameter. If the parameter is not a node, it will
just be passed through unaffected.</p>
</div>
@@ -292,7 +292,7 @@ just be passed through unaffected.</p>
the key to a list of alternative matches. With each matchs action, the
dollar-sign variables are provided by Jison as references to the value of
their numeric position, so in this rule:</p>
<pre><code><span class="hljs-string">"Expression UNLESS Expression"</span>
<pre><code><span class="hljs-string">'Expression UNLESS Expression'</span>
</code></pre><p><code>$1</code> would be the value of the first <code>Expression</code>, <code>$2</code> would be the token
for the <code>UNLESS</code> terminal, and <code>$3</code> would be the value of the second
<code>Expression</code>.</p>
@@ -446,6 +446,7 @@ token stream.</p>
Identifier: [
o <span class="hljs-string">'IDENTIFIER'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> IdentifierLiteral $<span class="hljs-number">1</span>
o <span class="hljs-string">'CSX_TAG'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> CSXTag $<span class="hljs-number">1</span>
]
Property: [
@@ -541,6 +542,7 @@ the ordinary <strong>Assign</strong> is that these allow numbers and strings as
<div class="content"><div class='highlight'><pre> AssignObj: [
o <span class="hljs-string">'ObjAssignable'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value $<span class="hljs-number">1</span>
o <span class="hljs-string">'ObjRestValue'</span>
o <span class="hljs-string">'ObjAssignable : Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Assign LOC(<span class="hljs-number">1</span>)(<span class="hljs-keyword">new</span> Value $<span class="hljs-number">1</span>), $<span class="hljs-number">3</span>, <span class="hljs-string">'object'</span>,
operatorToken: LOC(<span class="hljs-number">2</span>)(<span class="hljs-keyword">new</span> Literal $<span class="hljs-number">2</span>)
o <span class="hljs-string">'ObjAssignable :
@@ -574,6 +576,40 @@ the ordinary <strong>Assign</strong> is that these allow numbers and strings as
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Object literal spread properties.</p>
</div>
<div class="content"><div class='highlight'><pre> ObjRestValue: [
o <span class="hljs-string">'SimpleObjAssignable ...'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Splat <span class="hljs-keyword">new</span> Value $<span class="hljs-number">1</span>
o <span class="hljs-string">'ObjSpreadExpr ...'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Splat $<span class="hljs-number">1</span>
]
ObjSpreadExpr: [
o <span class="hljs-string">'ObjSpreadIdentifier'</span>
o <span class="hljs-string">'Object'</span>
o <span class="hljs-string">'Parenthetical'</span>
o <span class="hljs-string">'Super'</span>
o <span class="hljs-string">'This'</span>
o <span class="hljs-string">'SUPER Arguments'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> SuperCall LOC(<span class="hljs-number">1</span>)(<span class="hljs-keyword">new</span> Super), $<span class="hljs-number">2</span>
o <span class="hljs-string">'SimpleObjAssignable Arguments'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Call (<span class="hljs-keyword">new</span> Value $<span class="hljs-number">1</span>), $<span class="hljs-number">2</span>
o <span class="hljs-string">'ObjSpreadExpr Arguments'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Call $<span class="hljs-number">1</span>, $<span class="hljs-number">2</span>
]
ObjSpreadIdentifier: [
o <span class="hljs-string">'SimpleObjAssignable . Property'</span>, <span class="hljs-function">-&gt;</span> (<span class="hljs-keyword">new</span> Value $<span class="hljs-number">1</span>).add(<span class="hljs-keyword">new</span> Access $<span class="hljs-number">3</span>)
o <span class="hljs-string">'SimpleObjAssignable INDEX_START IndexValue INDEX_END'</span>, <span class="hljs-function">-&gt;</span> (<span class="hljs-keyword">new</span> Value $<span class="hljs-number">1</span>).add($<span class="hljs-number">3</span>)
]</pre></div></div>
</li>
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>A return statement from a function body.</p>
</div>
@@ -596,11 +632,11 @@ the ordinary <strong>Assign</strong> is that these allow numbers and strings as
</li>
<li id="section-23">
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>A block comment.</p>
@@ -613,11 +649,11 @@ the ordinary <strong>Assign</strong> is that these allow numbers and strings as
</li>
<li id="section-24">
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>The <strong>Code</strong> node is the function literal. Its defined by an indented block
of <strong>Block</strong> preceded by a function arrow, with an optional parameter list.</p>
@@ -632,11 +668,11 @@ of <strong>Block</strong> preceded by a function arrow, with an optional paramet
</li>
<li id="section-25">
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>CoffeeScript has two different symbols for functions. <code>-&gt;</code> is for ordinary
functions, and <code>=&gt;</code> is for functions bound to the current value of <em>this</em>.</p>
@@ -651,11 +687,11 @@ functions, and <code>=&gt;</code> is for functions bound to the current value of
</li>
<li id="section-26">
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>An optional, trailing comma.</p>
@@ -669,11 +705,11 @@ functions, and <code>=&gt;</code> is for functions bound to the current value of
</li>
<li id="section-27">
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>The list of parameters that a function accepts can be of any length.</p>
@@ -690,11 +726,11 @@ functions, and <code>=&gt;</code> is for functions bound to the current value of
</li>
<li id="section-28">
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>A single parameter in a function definition can be ordinary, or a splat
that hoovers up the remaining arguments.</p>
@@ -711,11 +747,11 @@ that hoovers up the remaining arguments.</p>
</li>
<li id="section-29">
<li id="section-30">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
<a class="pilcrow" href="#section-30">&#182;</a>
</div>
<p>Function Parameters</p>
@@ -731,11 +767,11 @@ that hoovers up the remaining arguments.</p>
</li>
<li id="section-30">
<li id="section-31">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-30">&#182;</a>
<a class="pilcrow" href="#section-31">&#182;</a>
</div>
<p>A splat that occurs outside of a parameter list.</p>
@@ -748,11 +784,11 @@ that hoovers up the remaining arguments.</p>
</li>
<li id="section-31">
<li id="section-32">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-31">&#182;</a>
<a class="pilcrow" href="#section-32">&#182;</a>
</div>
<p>Variables and properties that can be assigned to.</p>
@@ -768,11 +804,11 @@ that hoovers up the remaining arguments.</p>
</li>
<li id="section-32">
<li id="section-33">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-32">&#182;</a>
<a class="pilcrow" href="#section-33">&#182;</a>
</div>
<p>Everything that can be assigned to.</p>
@@ -787,11 +823,11 @@ that hoovers up the remaining arguments.</p>
</li>
<li id="section-33">
<li id="section-34">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-33">&#182;</a>
<a class="pilcrow" href="#section-34">&#182;</a>
</div>
<p>The types of things that can be treated as values assigned to, invoked
as functions, indexed into, named as a class, etc.</p>
@@ -810,11 +846,11 @@ as functions, indexed into, named as a class, etc.</p>
</li>
<li id="section-34">
<li id="section-35">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-34">&#182;</a>
<a class="pilcrow" href="#section-35">&#182;</a>
</div>
<p>A <code>super</code>-based expression that can be used as a value.</p>
@@ -828,11 +864,11 @@ as functions, indexed into, named as a class, etc.</p>
</li>
<li id="section-35">
<li id="section-36">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-35">&#182;</a>
<a class="pilcrow" href="#section-36">&#182;</a>
</div>
<p>The general group of accessors into an object, by property, by prototype
or by array index or slice.</p>
@@ -851,11 +887,11 @@ or by array index or slice.</p>
</li>
<li id="section-36">
<li id="section-37">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-36">&#182;</a>
<a class="pilcrow" href="#section-37">&#182;</a>
</div>
<p>Indexing into an object or array using bracket notation.</p>
@@ -874,11 +910,11 @@ or by array index or slice.</p>
</li>
<li id="section-37">
<li id="section-38">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-37">&#182;</a>
<a class="pilcrow" href="#section-38">&#182;</a>
</div>
<p>In CoffeeScript, an object literal is simply a list of assignments.</p>
@@ -891,11 +927,11 @@ or by array index or slice.</p>
</li>
<li id="section-38">
<li id="section-39">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-38">&#182;</a>
<a class="pilcrow" href="#section-39">&#182;</a>
</div>
<p>Assignment of properties within an object literal can be separated by
comma, as in JavaScript, or simply by newline.</p>
@@ -913,11 +949,11 @@ comma, as in JavaScript, or simply by newline.</p>
</li>
<li id="section-39">
<li id="section-40">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-39">&#182;</a>
<a class="pilcrow" href="#section-40">&#182;</a>
</div>
<p>Class definitions have optional bodies of prototype property assignments,
and optional references to the superclass.</p>
@@ -996,16 +1032,17 @@ and optional references to the superclass.</p>
o <span class="hljs-string">'Identifier AS Identifier'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> ExportSpecifier $<span class="hljs-number">1</span>, $<span class="hljs-number">3</span>
o <span class="hljs-string">'Identifier AS DEFAULT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> ExportSpecifier $<span class="hljs-number">1</span>, <span class="hljs-keyword">new</span> Literal $<span class="hljs-number">3</span>
o <span class="hljs-string">'DEFAULT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> ExportSpecifier <span class="hljs-keyword">new</span> Literal $<span class="hljs-number">1</span>
o <span class="hljs-string">'DEFAULT AS Identifier'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> ExportSpecifier <span class="hljs-keyword">new</span> Literal($<span class="hljs-number">1</span>), $<span class="hljs-number">3</span>
]</pre></div></div>
</li>
<li id="section-40">
<li id="section-41">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-40">&#182;</a>
<a class="pilcrow" href="#section-41">&#182;</a>
</div>
<p>Ordinary function invocation, or a chained series of calls.</p>
@@ -1021,11 +1058,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-41">
<li id="section-42">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-41">&#182;</a>
<a class="pilcrow" href="#section-42">&#182;</a>
</div>
<p>An optional existence check on a function.</p>
@@ -1039,11 +1076,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-42">
<li id="section-43">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-42">&#182;</a>
<a class="pilcrow" href="#section-43">&#182;</a>
</div>
<p>The list of arguments to a function call.</p>
@@ -1057,11 +1094,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-43">
<li id="section-44">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-43">&#182;</a>
<a class="pilcrow" href="#section-44">&#182;</a>
</div>
<p>A reference to the <em>this</em> current object.</p>
@@ -1075,11 +1112,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-44">
<li id="section-45">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-44">&#182;</a>
<a class="pilcrow" href="#section-45">&#182;</a>
</div>
<p>A reference to a property on <em>this</em>.</p>
@@ -1092,11 +1129,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-45">
<li id="section-46">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-45">&#182;</a>
<a class="pilcrow" href="#section-46">&#182;</a>
</div>
<p>The array literal.</p>
@@ -1110,11 +1147,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-46">
<li id="section-47">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-46">&#182;</a>
<a class="pilcrow" href="#section-47">&#182;</a>
</div>
<p>Inclusive and exclusive range dots.</p>
@@ -1128,11 +1165,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-47">
<li id="section-48">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-47">&#182;</a>
<a class="pilcrow" href="#section-48">&#182;</a>
</div>
<p>The CoffeeScript range literal.</p>
@@ -1145,11 +1182,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-48">
<li id="section-49">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-48">&#182;</a>
<a class="pilcrow" href="#section-49">&#182;</a>
</div>
<p>Array slice literals.</p>
@@ -1165,11 +1202,11 @@ and optional references to the superclass.</p>
</li>
<li id="section-49">
<li id="section-50">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-49">&#182;</a>
<a class="pilcrow" href="#section-50">&#182;</a>
</div>
<p>The <strong>ArgList</strong> is both the list of objects passed into a function call,
as well as the contents of an array literal
@@ -1188,11 +1225,11 @@ as well as the contents of an array literal
</li>
<li id="section-50">
<li id="section-51">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-50">&#182;</a>
<a class="pilcrow" href="#section-51">&#182;</a>
</div>
<p>Valid arguments are Blocks or Splats.</p>
@@ -1207,11 +1244,11 @@ as well as the contents of an array literal
</li>
<li id="section-51">
<li id="section-52">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-51">&#182;</a>
<a class="pilcrow" href="#section-52">&#182;</a>
</div>
<p>Just simple, comma-separated, required arguments (no fancy syntax). We need
this to be separate from the <strong>ArgList</strong> for use in <strong>Switch</strong> blocks, where
@@ -1227,11 +1264,11 @@ having the newlines wouldnt make sense.</p>
</li>
<li id="section-52">
<li id="section-53">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-52">&#182;</a>
<a class="pilcrow" href="#section-53">&#182;</a>
</div>
<p>The variants of <em>try/catch/finally</em> exception handling blocks.</p>
@@ -1247,11 +1284,11 @@ having the newlines wouldnt make sense.</p>
</li>
<li id="section-53">
<li id="section-54">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-53">&#182;</a>
<a class="pilcrow" href="#section-54">&#182;</a>
</div>
<p>A catch clause names its error and runs a block of code.</p>
@@ -1266,11 +1303,11 @@ having the newlines wouldnt make sense.</p>
</li>
<li id="section-54">
<li id="section-55">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-54">&#182;</a>
<a class="pilcrow" href="#section-55">&#182;</a>
</div>
<p>Throw an exception object.</p>
@@ -1283,11 +1320,11 @@ having the newlines wouldnt make sense.</p>
</li>
<li id="section-55">
<li id="section-56">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-55">&#182;</a>
<a class="pilcrow" href="#section-56">&#182;</a>
</div>
<p>Parenthetical expressions. Note that the <strong>Parenthetical</strong> is a <strong>Value</strong>,
not an <strong>Expression</strong>, so if you need to use an expression in a place
@@ -1304,11 +1341,11 @@ the trick.</p>
</li>
<li id="section-56">
<li id="section-57">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-56">&#182;</a>
<a class="pilcrow" href="#section-57">&#182;</a>
</div>
<p>The condition portion of a while loop.</p>
@@ -1324,11 +1361,11 @@ the trick.</p>
</li>
<li id="section-57">
<li id="section-58">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-57">&#182;</a>
<a class="pilcrow" href="#section-58">&#182;</a>
</div>
<p>The while loop can either be normal, with a block of expressions to execute,
or postfix, with a single expression. There is no do..while.</p>
@@ -1350,11 +1387,11 @@ or postfix, with a single expression. There is no do..while.</p>
</li>
<li id="section-58">
<li id="section-59">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-58">&#182;</a>
<a class="pilcrow" href="#section-59">&#182;</a>
</div>
<p>Array, object, and range comprehensions, at the most generic level.
Comprehensions can either be normal, with a block of expressions to execute,
@@ -1382,11 +1419,11 @@ or postfix, with a single expression.</p>
</li>
<li id="section-59">
<li id="section-60">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-59">&#182;</a>
<a class="pilcrow" href="#section-60">&#182;</a>
</div>
<p>An array of all accepted values for a variable inside the loop.
This enables support for pattern matching.</p>
@@ -1403,11 +1440,11 @@ This enables support for pattern matching.</p>
</li>
<li id="section-60">
<li id="section-61">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-60">&#182;</a>
<a class="pilcrow" href="#section-61">&#182;</a>
</div>
<p>An array or range comprehension has variables for the current element
and (optional) reference to the current index. Or, <em>key, value</em>, in the case
@@ -1423,11 +1460,11 @@ of object comprehensions.</p>
</li>
<li id="section-61">
<li id="section-62">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-61">&#182;</a>
<a class="pilcrow" href="#section-62">&#182;</a>
</div>
<p>The source of a comprehension is an array or object with an optional guard
clause. If its an array comprehension, you can also choose to step through
@@ -1462,11 +1499,11 @@ in fixed-size increments.</p>
</li>
<li id="section-62">
<li id="section-63">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-62">&#182;</a>
<a class="pilcrow" href="#section-63">&#182;</a>
</div>
<p>An individual <strong>When</strong> clause, with action.</p>
@@ -1480,11 +1517,11 @@ in fixed-size increments.</p>
</li>
<li id="section-63">
<li id="section-64">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-63">&#182;</a>
<a class="pilcrow" href="#section-64">&#182;</a>
</div>
<p>The most basic form of <em>if</em> is a condition and an action. The following
if-related rules are broken up along these lines in order to avoid
@@ -1500,11 +1537,11 @@ ambiguity.</p>
</li>
<li id="section-64">
<li id="section-65">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-64">&#182;</a>
<a class="pilcrow" href="#section-65">&#182;</a>
</div>
<p>The full complement of <em>if</em> expressions, including postfix one-liner
<em>if</em> and <em>unless</em>.</p>
@@ -1521,11 +1558,11 @@ ambiguity.</p>
</li>
<li id="section-65">
<li id="section-66">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-65">&#182;</a>
<a class="pilcrow" href="#section-66">&#182;</a>
</div>
<p>Arithmetic and logical operators, working on one or more operands.
Here they are grouped by order of precedence. The actual precedence rules
@@ -1552,11 +1589,11 @@ rules are necessary.</p>
</li>
<li id="section-66">
<li id="section-67">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-66">&#182;</a>
<a class="pilcrow" href="#section-67">&#182;</a>
</div>
<p><a href="http://coffeescript.org/#existential-operator">The existential operator</a>.</p>
@@ -1589,32 +1626,19 @@ rules are necessary.</p>
INDENT Expression OUTDENT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Assign $<span class="hljs-number">1</span>, $<span class="hljs-number">4</span>, $<span class="hljs-number">2</span>
o <span class="hljs-string">'SimpleAssignable COMPOUND_ASSIGN TERMINATOR
Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Assign $<span class="hljs-number">1</span>, $<span class="hljs-number">4</span>, $<span class="hljs-number">2</span>
o <span class="hljs-string">'SimpleAssignable EXTENDS Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Extends $<span class="hljs-number">1</span>, $<span class="hljs-number">3</span>
]</pre></div></div>
</li>
<li id="section-67">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-67">&#182;</a>
</div>
<h2 id="precedence">Precedence</h2>
</div>
</li>
<li id="section-68">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-68">&#182;</a>
</div>
<h2 id="precedence">Precedence</h2>
</div>
</li>
@@ -1626,6 +1650,18 @@ rules are necessary.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-69">&#182;</a>
</div>
</div>
</li>
<li id="section-70">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-70">&#182;</a>
</div>
<p>Operators at the top of this list have higher precedence than the ones lower
down. Following these rules is what makes <code>2 + 3 * 4</code> parse as:</p>
<pre><code><span class="hljs-number">2</span> + (<span class="hljs-number">3</span> * <span class="hljs-number">4</span>)
@@ -1665,26 +1701,14 @@ down. Following these rules is what makes <code>2 + 3 * 4</code> parse as:</p>
</li>
<li id="section-70">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-70">&#182;</a>
</div>
<h2 id="wrapping-up">Wrapping Up</h2>
</div>
</li>
<li id="section-71">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-71">&#182;</a>
</div>
<h2 id="wrapping-up">Wrapping Up</h2>
</div>
</li>
@@ -1696,6 +1720,18 @@ down. Following these rules is what makes <code>2 + 3 * 4</code> parse as:</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-72">&#182;</a>
</div>
</div>
</li>
<li id="section-73">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-73">&#182;</a>
</div>
<p>Finally, now that we have our <strong>grammar</strong> and our <strong>operators</strong>, we can create
our <strong>Jison.Parser</strong>. We do this by processing all of our rules, recording all
terminals (every symbol which does not appear as the name of a rule above)
@@ -1714,11 +1750,11 @@ as “tokens”.</p>
</li>
<li id="section-73">
<li id="section-74">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-73">&#182;</a>
<a class="pilcrow" href="#section-74">&#182;</a>
</div>
<p>Initialize the <strong>Parser</strong> with our list of terminal <strong>tokens</strong>, our <strong>grammar</strong>
rules, and the name of the root. Reverse the operators because Jison orders

View File

@@ -121,9 +121,6 @@ arrays, count characters, that sort of thing.</p>
</div>
<div class="content"><div class='highlight'><pre>
marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'marked'</span></pre></div></div>
</li>
@@ -133,27 +130,6 @@ marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'m
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>marked.setOptions
renderer: new marked.Renderer()
gfm: true
tables: true
breaks: false
pedantic: false
sanitize: true
smartLists: true
smartypants: false</p>
</div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Peek at the beginning of a given string to see if it matches a sequence.</p>
</div>
@@ -164,11 +140,11 @@ marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'m
</li>
<li id="section-4">
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Peek at the end of a given string to see if it matches a sequence.</p>
@@ -181,11 +157,11 @@ marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'m
</li>
<li id="section-5">
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Repeat a string <code>n</code> times.</p>
@@ -196,11 +172,11 @@ marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'m
</li>
<li id="section-6">
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Use clever algorithm to have O(log(n)) string concatenation operations.</p>
@@ -216,11 +192,11 @@ marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'m
</li>
<li id="section-7">
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Trim out all falsy values from an array.</p>
@@ -232,11 +208,11 @@ marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'m
</li>
<li id="section-8">
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Count the number of occurrences of a string in a string.</p>
@@ -251,11 +227,11 @@ marked = <span class="hljs-built_in">require</span> <span class="hljs-string">'m
</li>
<li id="section-9">
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>Merge objects, returning a fresh copy with attributes from both sides.
Used every time <code>Base#compile</code> is called, to allow properties in the
@@ -269,11 +245,11 @@ options hash to propagate down the tree without polluting other branches.</p>
</li>
<li id="section-10">
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Extend a source object with the properties of another object (shallow copy).</p>
@@ -287,11 +263,11 @@ options hash to propagate down the tree without polluting other branches.</p>
</li>
<li id="section-11">
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Return a flattened version of an array.
Handy for getting a list of <code>children</code> from the nodes.</p>
@@ -310,11 +286,11 @@ Handy for getting a list of <code>children</code> from the nodes.</p>
</li>
<li id="section-12">
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Delete a key from an object, returning the value. Useful when a node is
looking for a particular method in an options hash.</p>
@@ -329,11 +305,11 @@ looking for a particular method in an options hash.</p>
</li>
<li id="section-13">
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Typical Array::some</p>
@@ -346,82 +322,53 @@ looking for a particular method in an options hash.</p>
</li>
<li id="section-14">
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Simple function for extracting code from Literate CoffeeScript by stripping
<p>Helper function for extracting code from Literate CoffeeScript by stripping
out all non-code blocks, producing a string of CoffeeScript code that can
be compiled “normally.”</p>
</div>
<div class="content"><div class='highlight'><pre>exports.invertLiterate = <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span></pre></div></div>
<div class="content"><div class='highlight'><pre>exports.invertLiterate = <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span>
out = []
blankLine = <span class="hljs-regexp">/^\s*$/</span>
indented = <span class="hljs-regexp">/^[\t ]/</span>
listItemStart = <span class="hljs-regexp">/// ^
(?:\t?|\ {0,3}) <span class="hljs-comment"># Up to one tab, or up to three spaces, or neither;</span>
(?:
[\*\-\+] | <span class="hljs-comment"># followed by `*`, `-` or `+`;</span>
[0-9]{1,9}\. <span class="hljs-comment"># or by an integer up to 9 digits long, followed by a period;</span>
)
[\ \t] <span class="hljs-comment"># followed by a space or a tab.</span>
///</span>
insideComment = <span class="hljs-literal">no</span>
<span class="hljs-keyword">for</span> line <span class="hljs-keyword">in</span> code.split(<span class="hljs-string">'\n'</span>)
<span class="hljs-keyword">if</span> blankLine.test(line)
insideComment = <span class="hljs-literal">no</span>
out.push line
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> insideComment <span class="hljs-keyword">or</span> listItemStart.test(line)
insideComment = <span class="hljs-literal">yes</span>
out.push <span class="hljs-string">"# <span class="hljs-subst">#{line}</span>"</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> insideComment <span class="hljs-keyword">and</span> indented.test(line)
out.push line
<span class="hljs-keyword">else</span>
insideComment = <span class="hljs-literal">yes</span>
out.push <span class="hljs-string">"# <span class="hljs-subst">#{line}</span>"</span>
out.join <span class="hljs-string">'\n'</span></pre></div></div>
</li>
<li id="section-15">
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Create a placeholder for tabs, that isnt used anywhere in <code>code</code>, and then
re-insert the tabs after code extraction.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">generateRandomToken</span> = -&gt;</span>
<span class="hljs-string">"<span class="hljs-subst">#{Math.random() * Date.now()}</span>"</span>
<span class="hljs-keyword">while</span> token <span class="hljs-keyword">is</span> <span class="hljs-literal">undefined</span> <span class="hljs-keyword">or</span> code.indexOf(token) <span class="hljs-keyword">isnt</span> <span class="hljs-number">-1</span>
token = generateRandomToken()
code = code.replace <span class="hljs-string">"\t"</span>, token</pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Parse as markdown, discard everything except code blocks.</p>
</div>
<div class="content"><div class='highlight'><pre> out = <span class="hljs-string">""</span>
<span class="hljs-keyword">for</span> item <span class="hljs-keyword">in</span> marked.lexer code, {}
out += <span class="hljs-string">"<span class="hljs-subst">#{item.text}</span>\n"</span> <span class="hljs-keyword">if</span> item.type <span class="hljs-keyword">is</span> <span class="hljs-string">'code'</span></pre></div></div>
</li>
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Put the tabs back in.</p>
</div>
<div class="content"><div class='highlight'><pre> out.replace token, <span class="hljs-string">"\t"</span>
out</pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Merge two jison-style location data objects together.
If <code>last</code> is not provided, this will simply return <code>first</code>.</p>
@@ -440,11 +387,11 @@ If <code>last</code> is not provided, this will simply return <code>first</code>
</li>
<li id="section-19">
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>This returns a function which takes an object as a parameter, and if that
object is an AST node, updates that objects locationData.
@@ -462,11 +409,11 @@ The object is returned either way.</p>
</li>
<li id="section-20">
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Convert jison location data to a string.
<code>obj</code> can be a token, or a locationData.</p>
@@ -486,11 +433,11 @@ The object is returned either way.</p>
</li>
<li id="section-21">
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>A <code>.coffee.md</code> compatible version of <code>basename</code>, that returns the file sans-extension.</p>
@@ -509,11 +456,11 @@ The object is returned either way.</p>
</li>
<li id="section-22">
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Determine if a filename represents a CoffeeScript file.</p>
@@ -524,11 +471,11 @@ The object is returned either way.</p>
</li>
<li id="section-23">
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Determine if a filename represents a Literate CoffeeScript file.</p>
@@ -539,11 +486,11 @@ The object is returned either way.</p>
</li>
<li id="section-24">
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Throws a SyntaxError from a given location.
The errors <code>toString</code> will return an error message following the “standard”
@@ -560,11 +507,11 @@ marker showing where the error is.</p>
</li>
<li id="section-25">
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Instead of showing the compilers stacktrace, show our custom error message
(this is useful when the error bubbles up in Node.js applications that
@@ -579,11 +526,11 @@ compile CoffeeScript for example).</p>
</li>
<li id="section-26">
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Update a compiler SyntaxError with source code information if it didnt have
it already.</p>
@@ -595,11 +542,11 @@ it already.</p>
</li>
<li id="section-27">
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Avoid screwing up the <code>stack</code> property of other errors (i.e. possible bugs).</p>
@@ -625,11 +572,11 @@ it already.</p>
</li>
<li id="section-28">
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Show only the first line on multi-line errors.</p>
@@ -641,11 +588,11 @@ it already.</p>
</li>
<li id="section-29">
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>Check to see if were running on a color-enabled TTY.</p>

View File

@@ -115,11 +115,251 @@
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
<p>Loader for CoffeeScript as a Node.js library.</p>
<p>Node.js Implementation</p>
</div>
<div class="content"><div class='highlight'><pre>exports[key] = val <span class="hljs-keyword">for</span> key, val <span class="hljs-keyword">of</span> <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span></pre></div></div>
<div class="content"><div class='highlight'><pre>CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
fs = <span class="hljs-built_in">require</span> <span class="hljs-string">'fs'</span>
vm = <span class="hljs-built_in">require</span> <span class="hljs-string">'vm'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
helpers = CoffeeScript.helpers
compile = CoffeeScript.compile</pre></div></div>
</li>
<li id="section-2">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-2">&#182;</a>
</div>
<p>Compile and execute a string of CoffeeScript (on the server), correctly
setting <code>__filename</code>, <code>__dirname</code>, and relative <code>require()</code>.</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.run = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
mainModule = <span class="hljs-built_in">require</span>.main</pre></div></div>
</li>
<li id="section-3">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-3">&#182;</a>
</div>
<p>Set the filename.</p>
</div>
<div class="content"><div class='highlight'><pre> mainModule.filename = process.argv[<span class="hljs-number">1</span>] =
<span class="hljs-keyword">if</span> options.filename <span class="hljs-keyword">then</span> fs.realpathSync(options.filename) <span class="hljs-keyword">else</span> <span class="hljs-string">'&lt;anonymous&gt;'</span></pre></div></div>
</li>
<li id="section-4">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Clear the module cache.</p>
</div>
<div class="content"><div class='highlight'><pre> mainModule.moduleCache <span class="hljs-keyword">and</span>= {}</pre></div></div>
</li>
<li id="section-5">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Assign paths for node_modules loading</p>
</div>
<div class="content"><div class='highlight'><pre> dir = <span class="hljs-keyword">if</span> options.filename?
path.dirname fs.realpathSync options.filename
<span class="hljs-keyword">else</span>
fs.realpathSync <span class="hljs-string">'.'</span>
mainModule.paths = <span class="hljs-built_in">require</span>(<span class="hljs-string">'module'</span>)._nodeModulePaths dir</pre></div></div>
</li>
<li id="section-6">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Compile.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> helpers.isCoffee(mainModule.filename) <span class="hljs-keyword">or</span> <span class="hljs-built_in">require</span>.extensions
answer = compile code, options
code = answer.js ? answer
mainModule._compile code, mainModule.filename</pre></div></div>
</li>
<li id="section-7">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<p>Compile and evaluate a string of CoffeeScript (in a Node.js-like environment).
The CoffeeScript REPL uses this to run the input.</p>
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript.eval = <span class="hljs-function"><span class="hljs-params">(code, options = {})</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> code = code.trim()
createContext = vm.Script.createContext ? vm.createContext
isContext = vm.isContext ? (ctx) -&gt;
options.sandbox <span class="hljs-keyword">instanceof</span> createContext().constructor
<span class="hljs-keyword">if</span> createContext
<span class="hljs-keyword">if</span> options.sandbox?
<span class="hljs-keyword">if</span> isContext options.sandbox
sandbox = options.sandbox
<span class="hljs-keyword">else</span>
sandbox = createContext()
sandbox[k] = v <span class="hljs-keyword">for</span> own k, v <span class="hljs-keyword">of</span> options.sandbox
sandbox.<span class="hljs-built_in">global</span> = sandbox.root = sandbox.GLOBAL = sandbox
<span class="hljs-keyword">else</span>
sandbox = <span class="hljs-built_in">global</span>
sandbox.__filename = options.filename || <span class="hljs-string">'eval'</span>
sandbox.__dirname = path.dirname sandbox.__filename</pre></div></div>
</li>
<li id="section-8">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>define module/require only if they chose not to specify their own</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> sandbox <span class="hljs-keyword">isnt</span> <span class="hljs-built_in">global</span> <span class="hljs-keyword">or</span> sandbox.<span class="hljs-built_in">module</span> <span class="hljs-keyword">or</span> sandbox.<span class="hljs-built_in">require</span>
Module = <span class="hljs-built_in">require</span> <span class="hljs-string">'module'</span>
sandbox.<span class="hljs-built_in">module</span> = _module = <span class="hljs-keyword">new</span> Module(options.modulename || <span class="hljs-string">'eval'</span>)
sandbox.<span class="hljs-built_in">require</span> = _require = <span class="hljs-function"><span class="hljs-params">(path)</span> -&gt;</span> Module._load path, _module, <span class="hljs-literal">true</span>
_module.filename = sandbox.__filename
<span class="hljs-keyword">for</span> r <span class="hljs-keyword">in</span> Object.getOwnPropertyNames <span class="hljs-built_in">require</span> <span class="hljs-keyword">when</span> r <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [<span class="hljs-string">'paths'</span>, <span class="hljs-string">'arguments'</span>, <span class="hljs-string">'caller'</span>]
_require[r] = <span class="hljs-built_in">require</span>[r]</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>use the same hack node currently uses for their own REPL</p>
</div>
<div class="content"><div class='highlight'><pre> _require.paths = _module.paths = Module._nodeModulePaths process.cwd()
_require.resolve = <span class="hljs-function"><span class="hljs-params">(request)</span> -&gt;</span> Module._resolveFilename request, _module
o = {}
o[k] = v <span class="hljs-keyword">for</span> own k, v <span class="hljs-keyword">of</span> options
o.bare = <span class="hljs-literal">on</span> <span class="hljs-comment"># ensure return value</span>
js = compile code, o
<span class="hljs-keyword">if</span> sandbox <span class="hljs-keyword">is</span> <span class="hljs-built_in">global</span>
vm.runInThisContext js
<span class="hljs-keyword">else</span>
vm.runInContext js, sandbox
CoffeeScript.register = <span class="hljs-function">-&gt;</span> <span class="hljs-built_in">require</span> <span class="hljs-string">'./register'</span></pre></div></div>
</li>
<li id="section-10">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Throw error with deprecation warning when depending upon implicit <code>require.extensions</code> registration</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> <span class="hljs-built_in">require</span>.extensions
<span class="hljs-keyword">for</span> ext <span class="hljs-keyword">in</span> CoffeeScript.FILE_EXTENSIONS <span class="hljs-keyword">then</span> <span class="hljs-keyword">do</span> (ext) -&gt;
<span class="hljs-built_in">require</span>.extensions[ext] ?= <span class="hljs-function">-&gt;</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"""
Use CoffeeScript.register() or require the coffeescript/register module to require <span class="hljs-subst">#{ext}</span> files.
"""</span>
CoffeeScript._compileFile = <span class="hljs-function"><span class="hljs-params">(filename, sourceMap = <span class="hljs-literal">no</span>, inlineMap = <span class="hljs-literal">no</span>)</span> -&gt;</span>
raw = fs.readFileSync filename, <span class="hljs-string">'utf8'</span></pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Strip the Unicode byte order mark, if this file begins with one.</p>
</div>
<div class="content"><div class='highlight'><pre> stripped = <span class="hljs-keyword">if</span> raw.charCodeAt(<span class="hljs-number">0</span>) <span class="hljs-keyword">is</span> <span class="hljs-number">0xFEFF</span> <span class="hljs-keyword">then</span> raw.substring <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> raw
<span class="hljs-keyword">try</span>
answer = compile stripped, {
filename, sourceMap, inlineMap
sourceFiles: [filename]
literate: helpers.isLiterate filename
}
<span class="hljs-keyword">catch</span> err</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>As the filename and code of a dynamically loaded file will be different
from the original file compiled with CoffeeScript.run, add that
information to error so it can be pretty-printed later.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">throw</span> helpers.updateSyntaxError err, stripped, filename
answer
<span class="hljs-built_in">module</span>.exports = CoffeeScript</pre></div></div>
</li>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -135,6 +135,8 @@ Use it like so:</p>
options = parser.parse process.argv
</code></pre><p>The first non-option is considered to be the start of the file (and file
option) list, and all subsequent arguments are left unparsed.</p>
<p>The <code>coffee</code> command uses an instance of <strong>OptionParser</strong> to parse its
command-line arguments in <code>src/command.coffee</code>.</p>
</div>

View File

@@ -118,7 +118,7 @@
</div>
<div class="content"><div class='highlight'><pre>CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
<div class="content"><div class='highlight'><pre>CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./'</span>
child_process = <span class="hljs-built_in">require</span> <span class="hljs-string">'child_process'</span>
helpers = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span></pre></div></div>

View File

@@ -122,12 +122,14 @@
path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
vm = <span class="hljs-built_in">require</span> <span class="hljs-string">'vm'</span>
nodeREPL = <span class="hljs-built_in">require</span> <span class="hljs-string">'repl'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./coffeescript'</span>
CoffeeScript = <span class="hljs-built_in">require</span> <span class="hljs-string">'./'</span>
{merge, updateSyntaxError} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span>
replDefaults =
prompt: <span class="hljs-string">'coffee&gt; '</span>,
historyFile: path.join process.env.HOME, <span class="hljs-string">'.coffee_history'</span> <span class="hljs-keyword">if</span> process.env.HOME
historyFile: <span class="hljs-keyword">do</span> -&gt;
historyPath = process.env.XDG_CACHE_HOME <span class="hljs-keyword">or</span> process.env.HOME
path.join historyPath, <span class="hljs-string">'.coffee_history'</span> <span class="hljs-keyword">if</span> historyPath
historyMaxInputSize: <span class="hljs-number">10240</span>
eval: <span class="hljs-function"><span class="hljs-params">(input, context, filename, cb)</span> -&gt;</span></pre></div></div>
@@ -256,7 +258,7 @@ Unwrap that too.</p>
</div>
<div class="content"><div class='highlight'><pre> ast = <span class="hljs-keyword">new</span> Block [
<span class="hljs-keyword">new</span> Assign (<span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> Literal <span class="hljs-string">'_'</span>), ast, <span class="hljs-string">'='</span>
<span class="hljs-keyword">new</span> Assign (<span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> Literal <span class="hljs-string">'__'</span>), ast, <span class="hljs-string">'='</span>
]
js = ast.compile {bare: <span class="hljs-literal">yes</span>, locals: Object.keys(context), referencedVars}
cb <span class="hljs-literal">null</span>, runInContext js, context, filename
@@ -585,7 +587,7 @@ Unwrap that too.</p>
<span class="hljs-built_in">module</span>.exports =
start: <span class="hljs-function"><span class="hljs-params">(opts = {})</span> -&gt;</span>
[major, minor, build] = process.versions.node.split(<span class="hljs-string">'.'</span>).map (n) -&gt; parseInt(n)
[major, minor, build] = process.versions.node.split(<span class="hljs-string">'.'</span>).map (n) -&gt; parseInt(n, <span class="hljs-number">10</span>)
<span class="hljs-keyword">if</span> major &lt; <span class="hljs-number">6</span>
<span class="hljs-built_in">console</span>.warn <span class="hljs-string">"Node 6+ required for CoffeeScript REPL"</span>

View File

@@ -124,6 +124,9 @@ parentheses, and generally clean things up.</p>
</div>
<div class="content"><div class='highlight'><pre>
{throwSyntaxError} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./helpers'</span></pre></div></div>
</li>
@@ -157,7 +160,7 @@ its internal array of tokens.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">exports</span>.<span class="hljs-title">Rewriter</span></span></pre></div></div>
<div class="content"><div class='highlight'><pre>exports.Rewriter = <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Rewriter</span></span></pre></div></div>
</li>
@@ -168,11 +171,16 @@ its internal array of tokens.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-4">&#182;</a>
</div>
<p>Helpful snippet for debugging:</p>
<pre><code><span class="hljs-built_in">console</span>.log (t[<span class="hljs-number">0</span>] + <span class="hljs-string">'/'</span> + t[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> @tokens).join <span class="hljs-string">' '</span>
</code></pre>
<p>Rewrite the token stream in multiple passes, one logical filter at
a time. This could certainly be changed into a single pass through the
stream, with a big ol efficient switch, but its much nicer to work with
like this. The order of these passes matters indentation must be
corrected before implicit parentheses can be wrapped around blocks of code.</p>
</div>
<div class="content"><div class='highlight'><pre> rewrite: <span class="hljs-function"><span class="hljs-params">(@tokens)</span> -&gt;</span></pre></div></div>
</li>
@@ -182,22 +190,19 @@ its internal array of tokens.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>Rewrite the token stream in multiple passes, one logical filter at
a time. This could certainly be changed into a single pass through the
stream, with a big ol efficient switch, but its much nicer to work with
like this. The order of these passes matters indentation must be
corrected before implicit parentheses can be wrapped around blocks of code.</p>
<p>Helpful snippet for debugging:
console.log (t[0] + / + t[1] for t in @tokens).join </p>
</div>
<div class="content"><div class='highlight'><pre> rewrite: <span class="hljs-function"><span class="hljs-params">(@tokens)</span> -&gt;</span>
@removeLeadingNewlines()
<div class="content"><div class='highlight'><pre> @removeLeadingNewlines()
@closeOpenCalls()
@closeOpenIndexes()
@normalizeLines()
@tagPostfixConditionals()
@addImplicitBracesAndParens()
@addLocationDataToGeneratedTokens()
@enforceValidCSXAttributes()
@fixOutdentLocationData()
@tokens</pre></div></div>
@@ -224,16 +229,18 @@ our feet.</p>
i += block.call <span class="hljs-keyword">this</span>, token, i, tokens <span class="hljs-keyword">while</span> token = tokens[i]
<span class="hljs-literal">true</span>
detectEnd: <span class="hljs-function"><span class="hljs-params">(i, condition, action)</span> -&gt;</span>
detectEnd: <span class="hljs-function"><span class="hljs-params">(i, condition, action, opts = {})</span> -&gt;</span>
{tokens} = <span class="hljs-keyword">this</span>
levels = <span class="hljs-number">0</span>
<span class="hljs-keyword">while</span> token = tokens[i]
<span class="hljs-keyword">return</span> action.call <span class="hljs-keyword">this</span>, token, i <span class="hljs-keyword">if</span> levels <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">and</span> condition.call <span class="hljs-keyword">this</span>, token, i
<span class="hljs-keyword">return</span> action.call <span class="hljs-keyword">this</span>, token, i - <span class="hljs-number">1</span> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> token <span class="hljs-keyword">or</span> levels &lt; <span class="hljs-number">0</span>
<span class="hljs-keyword">return</span> action.call <span class="hljs-keyword">this</span>, token, i <span class="hljs-keyword">if</span> levels <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">and</span> condition.call <span class="hljs-keyword">this</span>, token, i
<span class="hljs-keyword">if</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> EXPRESSION_START
levels += <span class="hljs-number">1</span>
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> EXPRESSION_END
levels -= <span class="hljs-number">1</span>
<span class="hljs-keyword">if</span> levels &lt; <span class="hljs-number">0</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> opts.returnOnNegativeLevel
<span class="hljs-keyword">return</span> action.call <span class="hljs-keyword">this</span>, token, i
i += <span class="hljs-number">1</span>
i - <span class="hljs-number">1</span></pre></div></div>
@@ -265,18 +272,16 @@ dispatch them here.</p>
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<p>The lexer has tagged the opening parenthesis of a method call. Match it with
its paired close. We have the mis-nested outdent case included here for
calls that close on the same line, just before their outdent.</p>
its paired close.</p>
</div>
<div class="content"><div class='highlight'><pre> closeOpenCalls: <span class="hljs-function">-&gt;</span>
<span class="hljs-function"> <span class="hljs-title">condition</span> = <span class="hljs-params">(token, i)</span> -&gt;</span>
token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> [<span class="hljs-string">')'</span>, <span class="hljs-string">'CALL_END'</span>] <span class="hljs-keyword">or</span>
token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'OUTDENT'</span> <span class="hljs-keyword">and</span> @tag(i - <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">')'</span>
token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> [<span class="hljs-string">')'</span>, <span class="hljs-string">'CALL_END'</span>]
<span class="hljs-function">
<span class="hljs-title">action</span> = <span class="hljs-params">(token, i)</span> -&gt;</span>
@tokens[<span class="hljs-keyword">if</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'OUTDENT'</span> <span class="hljs-keyword">then</span> i - <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> i][<span class="hljs-number">0</span>] = <span class="hljs-string">'CALL_END'</span>
token[<span class="hljs-number">0</span>] = <span class="hljs-string">'CALL_END'</span>
@scanTokens (token, i) -&gt;
@detectEnd i + <span class="hljs-number">1</span>, condition, action <span class="hljs-keyword">if</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'CALL_START'</span>
@@ -291,7 +296,7 @@ calls that close on the same line, just before their outdent.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>The lexer has tagged the opening parenthesis of an indexing operation call.
<p>The lexer has tagged the opening bracket of an indexing operation call.
Match it with its paired close.</p>
</div>
@@ -416,7 +421,7 @@ add them.</p>
@scanTokens (token, i, tokens) -&gt;
[tag] = token
[prevTag] = prevToken = <span class="hljs-keyword">if</span> i &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> tokens[i - <span class="hljs-number">1</span>] <span class="hljs-keyword">else</span> []
[nextTag] = <span class="hljs-keyword">if</span> i &lt; tokens.length - <span class="hljs-number">1</span> <span class="hljs-keyword">then</span> tokens[i + <span class="hljs-number">1</span>] <span class="hljs-keyword">else</span> []
[nextTag] = nextToken = <span class="hljs-keyword">if</span> i &lt; tokens.length - <span class="hljs-number">1</span> <span class="hljs-keyword">then</span> tokens[i + <span class="hljs-number">1</span>] <span class="hljs-keyword">else</span> []
<span class="hljs-function"> <span class="hljs-title">stackTop</span> = -&gt;</span> stack[stack.length - <span class="hljs-number">1</span>]
startIdx = i</pre></div></div>
@@ -449,9 +454,12 @@ and spliced, when returning for getting a new token.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">inImplicit</span> = -&gt;</span> stackTop()?[<span class="hljs-number">2</span>]?.ours
<span class="hljs-function"> <span class="hljs-title">inImplicitCall</span> = -&gt;</span> inImplicit() <span class="hljs-keyword">and</span> stackTop()?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'('</span>
<span class="hljs-function"> <span class="hljs-title">inImplicitObject</span> = -&gt;</span> inImplicit() <span class="hljs-keyword">and</span> stackTop()?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'{'</span></pre></div></div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">isImplicit</span> = <span class="hljs-params">(stackItem)</span> -&gt;</span> stackItem?[<span class="hljs-number">2</span>]?.ours
<span class="hljs-function"> <span class="hljs-title">isImplicitObject</span> = <span class="hljs-params">(stackItem)</span> -&gt;</span> isImplicit(stackItem) <span class="hljs-keyword">and</span> stackItem?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'{'</span>
<span class="hljs-function"> <span class="hljs-title">isImplicitCall</span> = <span class="hljs-params">(stackItem)</span> -&gt;</span> isImplicit(stackItem) <span class="hljs-keyword">and</span> stackItem?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'('</span>
<span class="hljs-function"> <span class="hljs-title">inImplicit</span> = -&gt;</span> isImplicit stackTop()
<span class="hljs-function"> <span class="hljs-title">inImplicitCall</span> = -&gt;</span> isImplicitCall stackTop()
<span class="hljs-function"> <span class="hljs-title">inImplicitObject</span> = -&gt;</span> isImplicitObject stackTop()</pre></div></div>
</li>
@@ -467,32 +475,37 @@ class declaration or if-conditionals)</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">inImplicitControl</span> = -&gt;</span> inImplicit <span class="hljs-keyword">and</span> stackTop()?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'CONTROL'</span>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">inImplicitControl</span> = -&gt;</span> inImplicit() <span class="hljs-keyword">and</span> stackTop()?[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'CONTROL'</span>
<span class="hljs-function">
<span class="hljs-title">startImplicitCall</span> = <span class="hljs-params">(j)</span> -&gt;</span>
idx = j ? i
<span class="hljs-title">startImplicitCall</span> = <span class="hljs-params">(idx)</span> -&gt;</span>
stack.push [<span class="hljs-string">'('</span>, idx, ours: <span class="hljs-literal">yes</span>]
tokens.splice idx, <span class="hljs-number">0</span>, generate <span class="hljs-string">'CALL_START'</span>, <span class="hljs-string">'('</span>
i += <span class="hljs-number">1</span> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> j?
<span class="hljs-function">
<span class="hljs-title">endImplicitCall</span> = -&gt;</span>
stack.pop()
tokens.splice i, <span class="hljs-number">0</span>, generate <span class="hljs-string">'CALL_END'</span>, <span class="hljs-string">')'</span>, [<span class="hljs-string">''</span>, <span class="hljs-string">'end of input'</span>, token[<span class="hljs-number">2</span>]]
i += <span class="hljs-number">1</span>
<span class="hljs-function">
<span class="hljs-title">startImplicitObject</span> = <span class="hljs-params">(j, startsLine = <span class="hljs-literal">yes</span>)</span> -&gt;</span>
idx = j ? i
<span class="hljs-title">startImplicitObject</span> = <span class="hljs-params">(idx, startsLine = <span class="hljs-literal">yes</span>)</span> -&gt;</span>
stack.push [<span class="hljs-string">'{'</span>, idx, sameLine: <span class="hljs-literal">yes</span>, startsLine: startsLine, ours: <span class="hljs-literal">yes</span>]
val = <span class="hljs-keyword">new</span> String <span class="hljs-string">'{'</span>
val.generated = <span class="hljs-literal">yes</span>
tokens.splice idx, <span class="hljs-number">0</span>, generate <span class="hljs-string">'{'</span>, val, token
i += <span class="hljs-number">1</span> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> j?
<span class="hljs-function">
<span class="hljs-title">endImplicitObject</span> = <span class="hljs-params">(j)</span> -&gt;</span>
j = j ? i
stack.pop()
tokens.splice j, <span class="hljs-number">0</span>, generate <span class="hljs-string">'}'</span>, <span class="hljs-string">'}'</span>, token
i += <span class="hljs-number">1</span></pre></div></div>
i += <span class="hljs-number">1</span>
<span class="hljs-function">
<span class="hljs-title">implicitObjectContinues</span> = <span class="hljs-params">(j)</span> =&gt;</span>
nextTerminatorIdx = <span class="hljs-literal">null</span>
@detectEnd j,
<span class="hljs-function"><span class="hljs-params">(token)</span> -&gt;</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'TERMINATOR'</span>
(token, i) -&gt; nextTerminatorIdx = i
returnOnNegativeLevel: <span class="hljs-literal">yes</span>
<span class="hljs-keyword">return</span> <span class="hljs-literal">no</span> <span class="hljs-keyword">unless</span> nextTerminatorIdx?
@looksObjectish nextTerminatorIdx + <span class="hljs-number">1</span></pre></div></div>
</li>
@@ -503,13 +516,15 @@ class declaration or if-conditionals)</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Dont end an implicit call on next indent if any of these are in an argument</p>
<p>Dont end an implicit call/object on next indent if any of these are in an argument/value</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> inImplicitCall() <span class="hljs-keyword">and</span> tag <span class="hljs-keyword">in</span> [<span class="hljs-string">'IF'</span>, <span class="hljs-string">'TRY'</span>, <span class="hljs-string">'FINALLY'</span>, <span class="hljs-string">'CATCH'</span>,
<span class="hljs-string">'CLASS'</span>, <span class="hljs-string">'SWITCH'</span>]
stack.push [<span class="hljs-string">'CONTROL'</span>, i, ours: <span class="hljs-literal">true</span>]
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> (
(inImplicitCall() <span class="hljs-keyword">or</span> inImplicitObject()) <span class="hljs-keyword">and</span> tag <span class="hljs-keyword">in</span> CONTROL_IN_IMPLICIT <span class="hljs-keyword">or</span>
inImplicitObject() <span class="hljs-keyword">and</span> prevTag <span class="hljs-keyword">is</span> <span class="hljs-string">':'</span> <span class="hljs-keyword">and</span> tag <span class="hljs-keyword">is</span> <span class="hljs-string">'FOR'</span>
)
stack.push [<span class="hljs-string">'CONTROL'</span>, i, ours: <span class="hljs-literal">yes</span>]
<span class="hljs-keyword">return</span> forward(<span class="hljs-number">1</span>)
<span class="hljs-keyword">if</span> tag <span class="hljs-keyword">is</span> <span class="hljs-string">'INDENT'</span> <span class="hljs-keyword">and</span> inImplicit()</pre></div></div>
@@ -531,8 +546,12 @@ class declaration or if-conditionals)</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> prevTag <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [<span class="hljs-string">'=&gt;'</span>, <span class="hljs-string">'-&gt;'</span>, <span class="hljs-string">'['</span>, <span class="hljs-string">'('</span>, <span class="hljs-string">','</span>, <span class="hljs-string">'{'</span>, <span class="hljs-string">'TRY'</span>, <span class="hljs-string">'ELSE'</span>, <span class="hljs-string">'='</span>]
endImplicitCall() <span class="hljs-keyword">while</span> inImplicitCall()
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> prevTag <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [<span class="hljs-string">'=&gt;'</span>, <span class="hljs-string">'-&gt;'</span>, <span class="hljs-string">'['</span>, <span class="hljs-string">'('</span>, <span class="hljs-string">','</span>, <span class="hljs-string">'{'</span>, <span class="hljs-string">'ELSE'</span>, <span class="hljs-string">'='</span>]
<span class="hljs-keyword">while</span> inImplicitCall() <span class="hljs-keyword">or</span> inImplicitObject() <span class="hljs-keyword">and</span> prevTag <span class="hljs-keyword">isnt</span> <span class="hljs-string">':'</span>
<span class="hljs-keyword">if</span> inImplicitCall()
endImplicitCall()
<span class="hljs-keyword">else</span>
endImplicitObject()
stack.pop() <span class="hljs-keyword">if</span> inImplicitControl()
stack.push [tag, i]
<span class="hljs-keyword">return</span> forward(<span class="hljs-number">1</span>)</pre></div></div>
@@ -595,7 +614,7 @@ f a, f() b, f? c, h[0] d etc.</p>
tag <span class="hljs-keyword">is</span> <span class="hljs-string">'?'</span> <span class="hljs-keyword">and</span> i &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> tokens[i - <span class="hljs-number">1</span>].spaced) <span class="hljs-keyword">and</span>
(nextTag <span class="hljs-keyword">in</span> IMPLICIT_CALL <span class="hljs-keyword">or</span>
nextTag <span class="hljs-keyword">in</span> IMPLICIT_UNSPACED_CALL <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> tokens[i + <span class="hljs-number">1</span>]?.spaced <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> tokens[i + <span class="hljs-number">1</span>]?.newLine)
<span class="hljs-keyword">not</span> nextToken.spaced <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> nextToken.newLine)
tag = token[<span class="hljs-number">0</span>] = <span class="hljs-string">'FUNC_EXIST'</span> <span class="hljs-keyword">if</span> tag <span class="hljs-keyword">is</span> <span class="hljs-string">'?'</span>
startImplicitCall i + <span class="hljs-number">1</span>
<span class="hljs-keyword">return</span> forward(<span class="hljs-number">2</span>)</pre></div></div>
@@ -613,11 +632,6 @@ f a, f() b, f? c, h[0] d etc.</p>
<pre><code>f
a: b
c: d
</code></pre><p>and</p>
<pre><code>f
<span class="hljs-number">1</span>
a: b
b: c
</code></pre><p>Dont accept implicit calls of this type, when on the same line
as the control structures below as that may misinterpret constructs like:</p>
<pre><code><span class="hljs-keyword">if</span> f
@@ -670,7 +684,9 @@ that creates grammatical ambiguities.</p>
<span class="hljs-keyword">when</span> @tag(i - <span class="hljs-number">1</span>) <span class="hljs-keyword">in</span> EXPRESSION_END <span class="hljs-keyword">then</span> start[<span class="hljs-number">1</span>]
<span class="hljs-keyword">when</span> @tag(i - <span class="hljs-number">2</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">'@'</span> <span class="hljs-keyword">then</span> i - <span class="hljs-number">2</span>
<span class="hljs-keyword">else</span> i - <span class="hljs-number">1</span>
s -= <span class="hljs-number">2</span> <span class="hljs-keyword">while</span> @tag(s - <span class="hljs-number">2</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">'HERECOMMENT'</span></pre></div></div>
s -= <span class="hljs-number">2</span> <span class="hljs-keyword">while</span> @tag(s - <span class="hljs-number">2</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">'HERECOMMENT'</span>
startsLine = s <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">or</span> @tag(s - <span class="hljs-number">1</span>) <span class="hljs-keyword">in</span> LINEBREAKS <span class="hljs-keyword">or</span> tokens[s - <span class="hljs-number">1</span>].newLine</pre></div></div>
</li>
@@ -681,23 +697,6 @@ that creates grammatical ambiguities.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Mark if the value is a for loop</p>
</div>
<div class="content"><div class='highlight'><pre> @insideForDeclaration = nextTag <span class="hljs-keyword">is</span> <span class="hljs-string">'FOR'</span>
startsLine = s <span class="hljs-keyword">is</span> <span class="hljs-number">0</span> <span class="hljs-keyword">or</span> @tag(s - <span class="hljs-number">1</span>) <span class="hljs-keyword">in</span> LINEBREAKS <span class="hljs-keyword">or</span> tokens[s - <span class="hljs-number">1</span>].newLine</pre></div></div>
</li>
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Are we just continuing an already declared object?</p>
</div>
@@ -714,11 +713,11 @@ that creates grammatical ambiguities.</p>
</li>
<li id="section-28">
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>End implicit calls when chaining method calls
like e.g.:</p>
@@ -734,8 +733,22 @@ like e.g.:</p>
</code></pre>
</div>
<div class="content"><div class='highlight'><pre>
stackTop()[<span class="hljs-number">2</span>].sameLine = <span class="hljs-literal">no</span> <span class="hljs-keyword">if</span> inImplicitObject() <span class="hljs-keyword">and</span> tag <span class="hljs-keyword">in</span> LINEBREAKS
</li>
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>Mark all enclosing objects as not sameLine</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> tag <span class="hljs-keyword">in</span> LINEBREAKS
<span class="hljs-keyword">for</span> stackItem <span class="hljs-keyword">in</span> stack <span class="hljs-keyword">by</span> <span class="hljs-number">-1</span> <span class="hljs-keyword">when</span> isImplicitObject stackItem
stackItem[<span class="hljs-number">2</span>].sameLine = <span class="hljs-literal">no</span>
newLine = prevTag <span class="hljs-keyword">is</span> <span class="hljs-string">'OUTDENT'</span> <span class="hljs-keyword">or</span> prevToken.newLine
<span class="hljs-keyword">if</span> tag <span class="hljs-keyword">in</span> IMPLICIT_END <span class="hljs-keyword">or</span> tag <span class="hljs-keyword">in</span> CALL_CLOSERS <span class="hljs-keyword">and</span> newLine
@@ -772,8 +785,9 @@ return a: 1, b: 2 unless true</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> inImplicitObject() <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> @insideForDeclaration <span class="hljs-keyword">and</span> sameLine <span class="hljs-keyword">and</span>
tag <span class="hljs-keyword">isnt</span> <span class="hljs-string">'TERMINATOR'</span> <span class="hljs-keyword">and</span> prevTag <span class="hljs-keyword">isnt</span> <span class="hljs-string">':'</span>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> inImplicitObject() <span class="hljs-keyword">and</span> sameLine <span class="hljs-keyword">and</span>
tag <span class="hljs-keyword">isnt</span> <span class="hljs-string">'TERMINATOR'</span> <span class="hljs-keyword">and</span> prevTag <span class="hljs-keyword">isnt</span> <span class="hljs-string">':'</span> <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> (tag <span class="hljs-keyword">in</span> [<span class="hljs-string">'POST_IF'</span>, <span class="hljs-string">'FOR'</span>, <span class="hljs-string">'WHILE'</span>, <span class="hljs-string">'UNTIL'</span>] <span class="hljs-keyword">and</span> startsLine <span class="hljs-keyword">and</span> implicitObjectContinues(i + <span class="hljs-number">1</span>))
endImplicitObject()</pre></div></div>
</li>
@@ -820,7 +834,6 @@ e = <span class="hljs-number">2</span>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> tag <span class="hljs-keyword">is</span> <span class="hljs-string">','</span> <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> @looksObjectish(i + <span class="hljs-number">1</span>) <span class="hljs-keyword">and</span> inImplicitObject() <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> @insideForDeclaration <span class="hljs-keyword">and</span>
(nextTag <span class="hljs-keyword">isnt</span> <span class="hljs-string">'TERMINATOR'</span> <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> @looksObjectish(i + <span class="hljs-number">2</span>))</pre></div></div>
</li>
@@ -854,6 +867,27 @@ array further up the stack, so give it a chance.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-34">&#182;</a>
</div>
<p>Make sure only strings and wrapped expressions are used in CSX attributes</p>
</div>
<div class="content"><div class='highlight'><pre> enforceValidCSXAttributes: <span class="hljs-function">-&gt;</span>
@scanTokens (token, i, tokens) -&gt;
<span class="hljs-keyword">if</span> token.csxColon
next = tokens[i + <span class="hljs-number">1</span>]
<span class="hljs-keyword">if</span> next[<span class="hljs-number">0</span>] <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [<span class="hljs-string">'STRING_START'</span>, <span class="hljs-string">'STRING'</span>, <span class="hljs-string">'('</span>]
throwSyntaxError <span class="hljs-string">'expected wrapped or quoted CSX attribute'</span>, next[<span class="hljs-number">2</span>]
<span class="hljs-keyword">return</span> <span class="hljs-number">1</span></pre></div></div>
</li>
<li id="section-35">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-35">&#182;</a>
</div>
<p>Add location data to all tokens generated by the rewriter.</p>
</div>
@@ -878,11 +912,11 @@ array further up the stack, so give it a chance.</p>
</li>
<li id="section-35">
<li id="section-36">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-35">&#182;</a>
<a class="pilcrow" href="#section-36">&#182;</a>
</div>
<p>OUTDENT tokens should always be positioned at the last character of the
previous token, so that AST nodes ending in an OUTDENT token end up with a
@@ -906,11 +940,11 @@ location corresponding to the last “real” token under the node.</p>
</li>
<li id="section-36">
<li id="section-37">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-36">&#182;</a>
<a class="pilcrow" href="#section-37">&#182;</a>
</div>
<p>Because our grammar is LALR(1), it cant handle some single-line
expressions that lack ending delimiters. The <strong>Rewriter</strong> adds the implicit
@@ -928,7 +962,8 @@ blocks are added.</p>
<span class="hljs-keyword">not</span> (token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'TERMINATOR'</span> <span class="hljs-keyword">and</span> @tag(i + <span class="hljs-number">1</span>) <span class="hljs-keyword">in</span> EXPRESSION_CLOSE) <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> (token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'ELSE'</span> <span class="hljs-keyword">and</span> starter <span class="hljs-keyword">isnt</span> <span class="hljs-string">'THEN'</span>) <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> (token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> [<span class="hljs-string">'CATCH'</span>, <span class="hljs-string">'FINALLY'</span>] <span class="hljs-keyword">and</span> starter <span class="hljs-keyword">in</span> [<span class="hljs-string">'-&gt;'</span>, <span class="hljs-string">'=&gt;'</span>]) <span class="hljs-keyword">or</span>
token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> CALL_CLOSERS <span class="hljs-keyword">and</span> @tokens[i - <span class="hljs-number">1</span>].newLine
token[<span class="hljs-number">0</span>] <span class="hljs-keyword">in</span> CALL_CLOSERS <span class="hljs-keyword">and</span>
(@tokens[i - <span class="hljs-number">1</span>].newLine <span class="hljs-keyword">or</span> @tokens[i - <span class="hljs-number">1</span>][<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'OUTDENT'</span>)
<span class="hljs-function">
<span class="hljs-title">action</span> = <span class="hljs-params">(token, i)</span> -&gt;</span>
@tokens.splice (<span class="hljs-keyword">if</span> @tag(i - <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">','</span> <span class="hljs-keyword">then</span> i - <span class="hljs-number">1</span> <span class="hljs-keyword">else</span> i), <span class="hljs-number">0</span>, outdent
@@ -946,6 +981,10 @@ blocks are added.</p>
<span class="hljs-keyword">for</span> j <span class="hljs-keyword">in</span> [<span class="hljs-number">1.</span><span class="hljs-number">.2</span>] <span class="hljs-keyword">when</span> @tag(i + j) <span class="hljs-keyword">in</span> [<span class="hljs-string">'OUTDENT'</span>, <span class="hljs-string">'TERMINATOR'</span>, <span class="hljs-string">'FINALLY'</span>]
tokens.splice i + j, <span class="hljs-number">0</span>, @indentation()...
<span class="hljs-keyword">return</span> <span class="hljs-number">2</span> + j
<span class="hljs-keyword">if</span> tag <span class="hljs-keyword">in</span> [<span class="hljs-string">'-&gt;'</span>, <span class="hljs-string">'=&gt;'</span>] <span class="hljs-keyword">and</span> (@tag(i + <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">','</span> <span class="hljs-keyword">or</span> @tag(i + <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">'.'</span> <span class="hljs-keyword">and</span> token.newLine)
[indent, outdent] = @indentation tokens[i]
tokens.splice i + <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, indent, outdent
<span class="hljs-keyword">return</span> <span class="hljs-number">1</span>
<span class="hljs-keyword">if</span> tag <span class="hljs-keyword">in</span> SINGLE_LINERS <span class="hljs-keyword">and</span> @tag(i + <span class="hljs-number">1</span>) <span class="hljs-keyword">isnt</span> <span class="hljs-string">'INDENT'</span> <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> (tag <span class="hljs-keyword">is</span> <span class="hljs-string">'ELSE'</span> <span class="hljs-keyword">and</span> @tag(i + <span class="hljs-number">1</span>) <span class="hljs-keyword">is</span> <span class="hljs-string">'IF'</span>)
starter = tag
@@ -960,11 +999,11 @@ blocks are added.</p>
</li>
<li id="section-37">
<li id="section-38">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-37">&#182;</a>
<a class="pilcrow" href="#section-38">&#182;</a>
</div>
<p>Tag postfix conditionals as such, so that we can parse them with a
different precedence.</p>
@@ -993,11 +1032,11 @@ different precedence.</p>
</li>
<li id="section-38">
<li id="section-39">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-38">&#182;</a>
<a class="pilcrow" href="#section-39">&#182;</a>
</div>
<p>Generate the indentation tokens, based on another token on the same line.</p>
@@ -1018,11 +1057,11 @@ different precedence.</p>
</li>
<li id="section-39">
<li id="section-40">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-39">&#182;</a>
<a class="pilcrow" href="#section-40">&#182;</a>
</div>
<p>Look up a tag by token index.</p>
@@ -1033,26 +1072,14 @@ different precedence.</p>
</li>
<li id="section-40">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-40">&#182;</a>
</div>
<h2 id="constants">Constants</h2>
</div>
</li>
<li id="section-41">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-41">&#182;</a>
</div>
<h2 id="constants">Constants</h2>
</div>
</li>
@@ -1064,6 +1091,18 @@ different precedence.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-42">&#182;</a>
</div>
</div>
</li>
<li id="section-43">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-43">&#182;</a>
</div>
<p>List of the token pairs that must be balanced.</p>
</div>
@@ -1083,11 +1122,11 @@ different precedence.</p>
</li>
<li id="section-43">
<li id="section-44">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-43">&#182;</a>
<a class="pilcrow" href="#section-44">&#182;</a>
</div>
<p>The inverse mappings of <code>BALANCED_PAIRS</code> were trying to fix up, so we can
look things up from either end.</p>
@@ -1099,11 +1138,11 @@ look things up from either end.</p>
</li>
<li id="section-44">
<li id="section-45">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-44">&#182;</a>
<a class="pilcrow" href="#section-45">&#182;</a>
</div>
<p>The tokens that signal the start/end of a balanced pair.</p>
@@ -1119,11 +1158,11 @@ EXPRESSION_END = []
</li>
<li id="section-45">
<li id="section-46">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-45">&#182;</a>
<a class="pilcrow" href="#section-46">&#182;</a>
</div>
<p>Tokens that indicate the close of a clause of an expression.</p>
@@ -1134,11 +1173,11 @@ EXPRESSION_END = []
</li>
<li id="section-46">
<li id="section-47">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-46">&#182;</a>
<a class="pilcrow" href="#section-47">&#182;</a>
</div>
<p>Tokens that, if followed by an <code>IMPLICIT_CALL</code>, indicate a function invocation.</p>
@@ -1149,18 +1188,18 @@ EXPRESSION_END = []
</li>
<li id="section-47">
<li id="section-48">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-47">&#182;</a>
<a class="pilcrow" href="#section-48">&#182;</a>
</div>
<p>If preceded by an <code>IMPLICIT_FUNC</code>, indicates a function invocation.</p>
</div>
<div class="content"><div class='highlight'><pre>IMPLICIT_CALL = [
<span class="hljs-string">'IDENTIFIER'</span>, <span class="hljs-string">'PROPERTY'</span>, <span class="hljs-string">'NUMBER'</span>, <span class="hljs-string">'INFINITY'</span>, <span class="hljs-string">'NAN'</span>
<span class="hljs-string">'IDENTIFIER'</span>, <span class="hljs-string">'CSX_TAG'</span>, <span class="hljs-string">'PROPERTY'</span>, <span class="hljs-string">'NUMBER'</span>, <span class="hljs-string">'INFINITY'</span>, <span class="hljs-string">'NAN'</span>
<span class="hljs-string">'STRING'</span>, <span class="hljs-string">'STRING_START'</span>, <span class="hljs-string">'REGEX'</span>, <span class="hljs-string">'REGEX_START'</span>, <span class="hljs-string">'JS'</span>
<span class="hljs-string">'NEW'</span>, <span class="hljs-string">'PARAM_START'</span>, <span class="hljs-string">'CLASS'</span>, <span class="hljs-string">'IF'</span>, <span class="hljs-string">'TRY'</span>, <span class="hljs-string">'SWITCH'</span>, <span class="hljs-string">'THIS'</span>
<span class="hljs-string">'UNDEFINED'</span>, <span class="hljs-string">'NULL'</span>, <span class="hljs-string">'BOOL'</span>
@@ -1173,11 +1212,11 @@ IMPLICIT_UNSPACED_CALL = [<span class="hljs-string">'+'</span>, <span class="hlj
</li>
<li id="section-48">
<li id="section-49">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-48">&#182;</a>
<a class="pilcrow" href="#section-49">&#182;</a>
</div>
<p>Tokens that always mark the end of an implicit call for single-liners.</p>
@@ -1189,11 +1228,11 @@ IMPLICIT_UNSPACED_CALL = [<span class="hljs-string">'+'</span>, <span class="hlj
</li>
<li id="section-49">
<li id="section-50">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-49">&#182;</a>
<a class="pilcrow" href="#section-50">&#182;</a>
</div>
<p>Single-line flavors of block expressions that have unclosed endings.
The grammar cant disambiguate them, so we insert the implicit indentation.</p>
@@ -1206,11 +1245,11 @@ SINGLE_CLOSERS = [<span class="hljs-string">'TERMINATOR'</span>, <span class="
</li>
<li id="section-50">
<li id="section-51">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-50">&#182;</a>
<a class="pilcrow" href="#section-51">&#182;</a>
</div>
<p>Tokens that end a line.</p>
@@ -1221,11 +1260,11 @@ SINGLE_CLOSERS = [<span class="hljs-string">'TERMINATOR'</span>, <span class="
</li>
<li id="section-51">
<li id="section-52">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-51">&#182;</a>
<a class="pilcrow" href="#section-52">&#182;</a>
</div>
<p>Tokens that close open calls when they follow a newline.</p>
@@ -1235,6 +1274,21 @@ SINGLE_CLOSERS = [<span class="hljs-string">'TERMINATOR'</span>, <span class="
</li>
<li id="section-53">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-53">&#182;</a>
</div>
<p>Tokens that prevent a subsequent indent from ending implicit calls/objects</p>
</div>
<div class="content"><div class='highlight'><pre>CONTROL_IN_IMPLICIT = [<span class="hljs-string">'IF'</span>, <span class="hljs-string">'TRY'</span>, <span class="hljs-string">'FINALLY'</span>, <span class="hljs-string">'CATCH'</span>, <span class="hljs-string">'CLASS'</span>, <span class="hljs-string">'SWITCH'</span>]</pre></div></div>
</li>
</ul>
</div>
</body>

View File

@@ -406,7 +406,7 @@ column for the current line:</p>
</div>
<p>Note that SourceMap VLQ encoding is “backwards”. MIDI-style VLQ encoding puts
the most-significant-bit (MSB) from the original value into the MSB of the VLQ
encoded value (see <a href="http://en.wikipedia.org/wiki/File:Uintvar_coding.svg">Wikipedia</a>).
encoded value (see <a href="https://en.wikipedia.org/wiki/File:Uintvar_coding.svg">Wikipedia</a>).
SourceMap VLQ does things the other way around, with the least significat four
bits of the original value encoded into the first byte of the VLQ encoded value.</p>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
popular = ['pepperoni', 'sausage', 'cheese']
unwanted = ['anchovies', 'olives']
all = [popular..., unwanted..., 'mushrooms']

View File

@@ -0,0 +1,3 @@
{a = 1} = {a: null}
a # Equals 1 in CoffeeScript 1.x, null in CoffeeScript 2

View File

@@ -0,0 +1,5 @@
outer = ->
inner = => Array.from arguments
inner()
outer(1, 2) # Returns '' in CoffeeScript 1.x, '1, 2' in CoffeeScript 2

View File

@@ -1,4 +1,18 @@
# Helper functions
hasProp = {}.hasOwnProperty
extend = (child, parent) ->
ctor = ->
@constructor = child
return
for key of parent
if hasProp.call(parent, key)
child[key] = parent[key]
ctor.prototype = parent.prototype
child.prototype = new ctor
child
A = ->
B = ->
B extends A
extend B, A
B.prototype.foo = -> A::foo.apply this, arguments

View File

@@ -1,4 +1,5 @@
for filename in list
do (filename) ->
fs.readFile filename, (err, contents) ->
compile filename, contents.toString()
if filename not in ['.DS_Store', 'Thumbs.db', 'ehthumbs.db']
fs.readFile filename, (err, contents) ->
compile filename, contents.toString()

View File

@@ -0,0 +1,4 @@
major = 'Computer Science'
unless major?
signUpForClass 'Introduction to Wines'

View File

@@ -0,0 +1,2 @@
if window?
environment = 'browser (probably)'

View File

@@ -0,0 +1,9 @@
screen =
width: 1200
ratio: 16/9
Object.defineProperty screen, 'height',
get: ->
this.width / this.ratio
set: (val) ->
this.width = val / this.ratio

View File

@@ -0,0 +1,9 @@
renderStarRating = ({ rating, maxStars }) ->
<aside title={"Rating: #{rating} of #{maxStars} stars"}>
{for wholeStar in [0...Math.floor(rating)]
<Star className="wholeStar" key={wholeStar} />}
{if rating % 1 isnt 0
<Star className="halfStar" />}
{for emptyStar in [Math.ceil(rating)...maxStars]
<Star className="emptyStar" key={emptyStar} />}
</aside>

View File

@@ -0,0 +1,5 @@
user =
name: 'Werner Heisenberg'
occupation: 'theoretical physicist'
currentUser = { user..., status: 'Uncertain' }

View File

@@ -20,6 +20,8 @@ contenders = [
awardMedals contenders...
alert "Gold: " + gold
alert "Silver: " + silver
alert "The Field: " + rest
alert """
Gold: #{gold}
Silver: #{silver}
The Field: #{rest.join ', '}
"""

View File

@@ -1 +0,0 @@
<svg aria-hidden="true" version="1.1" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>

Before

Width:  |  Height:  |  Size: 436 B

View File

@@ -0,0 +1,9 @@
## Async Functions
ES2017s [async functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) are supported through the `await` keyword. Like with generators, there's no need for an `async` keyword; an async function in CoffeeScript is simply a function that awaits.
Similar to how `yield return` forces a generator, `await return` may be used to force a function to be async.
```
codeFor('async', true)
```

View File

@@ -2,12 +2,12 @@
There are a number of excellent resources to help you get started with CoffeeScript, some of which are freely available online.
* [The Little Book on CoffeeScript](http://arcturo.github.com/library/coffeescript/) is a brief 5-chapter introduction to CoffeeScript, written with great clarity and precision by [Alex MacCaw](http://alexmaccaw.co.uk/).
* [Smooth CoffeeScript](http://autotelicum.github.com/Smooth-CoffeeScript/) is a reimagination of the excellent book [Eloquent JavaScript](http://eloquentjavascript.net/), as if it had been written in CoffeeScript instead. Covers language features as well as the functional and object oriented programming styles. By [E. Hoigaard](https://github.com/autotelicum).
* [The Little Book on CoffeeScript](http://arcturo.github.io/library/coffeescript/) is a brief 5-chapter introduction to CoffeeScript, written with great clarity and precision by [Alex MacCaw](http://alexmaccaw.co.uk/).
* [Smooth CoffeeScript](http://autotelicum.github.io/Smooth-CoffeeScript/) is a reimagination of the excellent book [Eloquent JavaScript](http://eloquentjavascript.net/), as if it had been written in CoffeeScript instead. Covers language features as well as the functional and object oriented programming styles. By [E. Hoigaard](https://github.com/autotelicum).
* [CoffeeScript: Accelerated JavaScript Development](http://pragprog.com/book/tbcoffee/coffeescript) is [Trevor Burnham](http://trevorburnham.com/)s thorough introduction to the language. By the end of the book, youll have built a fast-paced multiplayer word game, writing both the client-side and Node.js portions in CoffeeScript.
* [CoffeeScript Programming with jQuery, Rails, and Node.js](http://www.packtpub.com/coffeescript-programming-with-jquery-rails-nodejs/book) is a new book by Michael Erasmus that covers CoffeeScript with an eye towards real-world usage both in the browser (jQuery) and on the server-side (Rails, Node).
* [CoffeeScript Programming with jQuery, Rails, and Node.js](https://www.packtpub.com/web-development/coffeescript-programming-jquery-rails-and-nodejs) is a new book by Michael Erasmus that covers CoffeeScript with an eye towards real-world usage both in the browser (jQuery) and on the server-side (Rails, Node).
* [CoffeeScript Ristretto](https://leanpub.com/coffeescript-ristretto/read) is a deep dive into CoffeeScripts semantics from simple functions up through closures, higher-order functions, objects, classes, combinators, and decorators. By [Reg Braithwaite](http://braythwayt.com/).
* [Testing with CoffeeScript](https://efendibooks.com/minibooks/testing-with-coffeescript) is a succinct and freely downloadable guide to building testable applications with CoffeeScript and Jasmine.
* [CoffeeScript Application Development](http://www.packtpub.com/coffeescript-application-development/book) from Packt, introduces CoffeeScript while walking through the process of building a demonstration web application. A [CoffeeScript Application Development Coookbook](https://www.packtpub.com/web-development/coffeescript-application-development-cookbook) with over 90 “recipes” is also available.
* [CoffeeScript in Action](http://www.manning.com/lee/) from Manning Publications, covers CoffeeScript syntax, composition techniques and application development.
* [CoffeeScript: Die Alternative zu JavaScript](http://www.dpunkt.de/buecher/4021/coffeescript.html) from dpunkt.verlag, is the first CoffeeScript book in Deutsch.
* [CoffeeScript Application Development](https://www.packtpub.com/web-development/coffeescript-application-development) from Packt, introduces CoffeeScript while walking through the process of building a demonstration web application. A [CoffeeScript Application Development Coookbook](https://www.packtpub.com/web-development/coffeescript-application-development-cookbook) with over 90 “recipes” is also available.
* [CoffeeScript in Action](https://www.manning.com/books/coffeescript-in-action) from Manning Publications, covers CoffeeScript syntax, composition techniques and application development.
* [CoffeeScript: Die Alternative zu JavaScript](https://www.dpunkt.de/buecher/4021/coffeescript.html) from dpunkt.verlag, is the first CoffeeScript book in Deutsch.

View File

@@ -0,0 +1,7 @@
### Bound (fat arrow) functions
In CoffeeScript 1.x, `=>` compiled to a regular `function` but with references to `this`/`@` rewritten to use the outer scopes `this`, or with the inner function bound to the outer scope via `.bind` (hence the name “bound function”). In CoffeeScript 2, `=>` compiles to [ES2015s `=>`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions), which behaves slightly differently. The largest difference is that in ES2015, `=>` functions lack an `arguments` object:
```
codeFor('breaking_change_fat_arrow', 'outer(1, 2)')
```

View File

@@ -1,105 +1,3 @@
## Breaking Changes From CoffeeScript 1.x to 2
CoffeeScript 2 aims to output as much idiomatic ES2015+ syntax as possible with as few breaking changes from CoffeeScript 1.x as possible. Some breaking changes, unfortunately, were unavoidable.
### Function parameter default values
Per the [ES2015 spec regarding default parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters), default values are only applied when a parameter value is missing or `undefined`. In CoffeeScript 1.x, the default value would be applied in those cases but also if the parameter value was `null`.
```
codeFor('breaking_change_function_parameter_default_values', 'f(null)')
```
### Bound generator functions
Bound generator functions, a.k.a. generator arrow functions, [arent allowed in ECMAScript](http://stackoverflow.com/questions/27661306/can-i-use-es6s-arrow-function-syntax-with-generators-arrow-notation). You can write `function*` or `=>`, but not both. Therefore, CoffeeScript code like this:
> ```coffee
f = => yield this # Throws a compiler error
```
Needs to be rewritten the old-fashioned way:
```
codeFor('breaking_change_bound_generator_function')
```
### Classes are compiled to ES2015 classes
ES2015 classes and their methods have some restrictions beyond those on regular functions.
Class constructors cant be invoked without `new`:
> ```coffee
(class)() # Throws a TypeError at runtime
```
Derived (extended) class `constructor`s cannot use `this` before calling `super`:
> ```coffee
class B extends A
constructor: -> this # Throws a compiler error
```
Class methods cant be used with `new` (uncommon):
> ```coffee
class Namespace
@Klass = ->
new Namespace.Klass # Throws a TypeError at runtime
```
### Bare `super`
Due to a syntax clash with `super` with accessors, bare `super` no longer compiles to a super call forwarding all arguments.
> ```coffee
class B extends A
foo: -> super # Throws a compiler error
```
Arguments can be forwarded explicitly using splats:
```
codeFor('breaking_change_super_with_arguments')
```
Or if you know that the parent function doesnt require arguments, just call `super()`:
```
codeFor('breaking_change_super_without_arguments')
```
### `super` in non-class methods
In CoffeeScript 1.x it is possible to use `super` in more than just class methods, such as in manually prototype-assigned functions:
> ```coffee
A = ->
B = ->
B extends A
B.prototype.foo = -> super arguments... # Throws a compiler error
```
Due to the switch to ES2015 `super`, this is no longer supported. The above case could be refactored to:
```
codeFor('breaking_change_super_in_non-class_methods_refactor_with_apply')
```
or
```
codeFor('breaking_change_super_in_non-class_methods_refactor_with_class')
```
### Dynamic class keys exclude executable class scope
Due to the hoisting required to compile to ES2015 classes, dynamic keys in class methods cant use values from the executable class body unless the methods are assigned in prototype style.
> ```coffee
class A
name = 'method'
"#{name}": -> # This method will be named 'undefined'
@::[name] = -> # This will work; assigns to `A.prototype.method`
```

View File

@@ -0,0 +1,14 @@
### Bound generator functions
Bound generator functions, a.k.a. generator arrow functions, [arent allowed in ECMAScript](http://stackoverflow.com/questions/27661306/can-i-use-es6s-arrow-function-syntax-with-generators-arrow-notation). You can write `function*` or `=>`, but not both. Therefore, CoffeeScript code like this:
```coffee
f = => yield this
# Throws a compiler error
```
Needs to be rewritten the old-fashioned way:
```
codeFor('breaking_change_bound_generator_function')
```

View File

@@ -0,0 +1,48 @@
### Classes are compiled to ES2015 classes
ES2015 classes and their methods have some restrictions beyond those on regular functions.
Class constructors cant be invoked without `new`:
```coffee
(class)()
# Throws a TypeError at runtime
```
Derived (extended) class `constructor`s cannot use `this` before calling `super`:
```coffee
class B extends A
constructor: -> this # Throws a compiler error
```
ES2015 classes dont allow bound (fat arrow) methods. The CoffeeScript compiler goes through some contortions to preserve support for them, but one thing that cant be accomodated is calling a bound method before it is bound:
```coffee
class Base
constructor: ->
@onClick() # This works
clickHandler = @onClick
clickHandler() # This throws a runtime error
class Component extends Base
onClick: =>
console.log 'Clicked!', @
```
Class methods cant be used with `new` (uncommon):
```coffee
class Namespace
@Klass = ->
new Namespace.Klass # Throws a TypeError at runtime
```
Due to the hoisting required to compile to ES2015 classes, dynamic keys in class methods cant use values from the executable class body unless the methods are assigned in prototype style.
```coffee
class A
name = 'method'
"#{name}": -> # This method will be named 'undefined'
@::[name] = -> # This will work; assigns to `A.prototype.method`
```

View File

@@ -0,0 +1,11 @@
### Default values for function parameters and destructured elements
Per the [ES2015 spec regarding function default parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters) and [destructuring default values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Default_values), default values are only applied when a value is missing or `undefined`. In CoffeeScript 1.x, the default value would be applied in those cases but also if the value was `null`.
```
codeFor('breaking_change_function_parameter_default_values', 'f(null)')
```
```
codeFor('breaking_change_destructuring_default_values', 'a')
```

View File

@@ -0,0 +1,3 @@
### JSX and the `<` and `>` Operators
With the addition of [JSX](#jsx), the `<` and `>` characters serve as both the “less than” and “greater than” operators and as the delimiters for XML tags, like `<div>`. For best results, in general you should always wrap the operators in spaces to distinguish them from XML tags: `i < len`, not `i<len`. The compiler tries to be forgiving when it can be sure what you intend, but always putting spaces around the “less than” and “greater than” operators will remove ambiguity.

View File

@@ -0,0 +1,7 @@
### Literate CoffeeScript parsing
CoffeeScript 2s parsing of Literate CoffeeScript has been refactored to now be more careful about not treating indented lists as code blocks; but this means that all code blocks (unless they are to be interpreted as comments) must be separated by at least one blank line from lists.
Code blocks should also now maintain a consistent indentation level—so an indentation of one tab (or whatever you consider to be a tab stop, like 2 spaces or 4 spaces) should be treated as your codes “left margin,” with all code in the file relative to that column.
Code blocks that you want to be part of the commentary, and not executed, must have at least one line (ideally the first line of the block) completely unindented.

View File

@@ -0,0 +1,43 @@
### `super` and `extends`
Due to a syntax clash with `super` with accessors, “bare” `super` (the keyword `super` without parentheses) no longer compiles to a super call forwarding all arguments.
```coffee
class B extends A
foo: -> super
# Throws a compiler error
```
Arguments can be forwarded explicitly using splats:
```
codeFor('breaking_change_super_with_arguments')
```
Or if you know that the parent function doesnt require arguments, just call `super()`:
```
codeFor('breaking_change_super_without_arguments')
```
CoffeeScript 1.x allowed the `extends` keyword to set up prototypal inheritance between functions, and `super` could be used manually prototype-assigned functions:
```coffee
A = ->
B = ->
B extends A
B.prototype.foo = -> super arguments...
# Last two lines each throw compiler errors in CoffeeScript 2
```
Due to the switch to ES2015 `extends` and `super`, using these keywords for prototypal functions are no longer supported. The above case could be refactored to:
```
codeFor('breaking_change_super_in_non-class_methods_refactor_with_apply')
```
or
```
codeFor('breaking_change_super_in_non-class_methods_refactor_with_class')
```

View File

@@ -8,4 +8,4 @@ Task definitions are written in CoffeeScript, so you can put arbitrary code in y
codeFor('cake_tasks')
```
If you need to invoke one task before another — for example, running `build` before `test`, you can use the `invoke` function: `invoke 'build'`. Cake tasks are a minimal way to expose your CoffeeScript functions to the command line, so [dont expect any fanciness built-in](v<%= majorVersion %>/annotated-source/cake.html). If you need dependencies, or async callbacks, its best to put them in your code itself — not the cake task.
If you need to invoke one task before another — for example, running `build` before `test`, you can use the `invoke` function: `invoke 'build'`. Cake tasks are a minimal way to expose your CoffeeScript functions to the command line, so [dont expect any fanciness built-in](/v<%= majorVersion %>/annotated-source/cake.html). If you need dependencies, or async callbacks, its best to put them in your code itself — not the cake task.

View File

@@ -0,0 +1,7 @@
## Chaining Function Calls
Leading `.` closes all open calls, allowing for simpler chaining syntax.
```
codeFor('chaining')
```

View File

@@ -1,4 +1,60 @@
## Change Log
## Changelog
```
releaseHeader('2017-06-30', '2.0.0-beta3', '2.0.0-beta2')
```
* [JSX](#jsx) is now supported.
* [Object rest/spread properties](#object-spread) are now supported.
* Bound (fat arrow) methods are once again supported in classes; though an error will be thrown if you attempt to call the method before it is bound. See [breaking changes for classes](#breaking-changes-classes).
* The REPL no longer warns about assigning to `_`.
* Bugfixes for destructured nested default values and issues related to chaining or continuing expressions across multiple lines.
```
releaseHeader('2017-05-16', '2.0.0-beta2', '2.0.0-beta1')
```
* This release includes [all the changes from 1.12.5 to 1.12.6](#1.12.6).
* Bound (fat arrow) methods in classes must be declared in the class constructor, after `super()` if the class is extending a parent class. See [breaking changes for classes](#breaking-changes-classes).
* All unnecessary utility helper functions have been removed, including the polyfills for `indexOf` and `bind`.
* The `extends` keyword now only works in the context of classes; it cannot be used to extend a function prototype. See [breaking changes for `extends`](#breaking-changes-super-extends).
* Literate CoffeeScript is now parsed entirely based on indentation, similar to the 1.x implementation; there is no longer a dependency for parsing Markdown. See [breaking changes for Literate CoffeeScript parsing](#breaking-changes-literate-coffeescript).
* JavaScript reserved words used as properties are no longer wrapped in quotes.
* `require('coffeescript')` should now work in non-Node environments such as the builds created by Webpack or Browserify. This provides a more convenient way to include the browser compiler in builds intending to run in a browser environment.
* Unreachable `break` statements are no longer added after `switch` cases that `throw` exceptions.
* The browser compiler is now compiled using Babili and transpiled down to Babels `env` preset (should be safe for use in all browsers in current use, not just evergreen versions).
* Calling functions `@get` or `@set` no longer throws an error about required parentheses. (Bare `get` or `set`, not attached to an object or `@`, [still intentionally throws a compiler error](#unsupported-get-set).)
* If `$XDG_CACHE_HOME` is set, the REPL `.coffee_history` file is saved there.
```
releaseHeader('2017-05-15', '1.12.6', '1.12.5')
```
* The `return` and `export` keywords can now accept implicit objects (defined by indentation, without needing braces).
* Support Unicode code point escapes (e.g. `\u{1F4A9}`).
* The `coffee` command now first looks to see if CoffeeScript is installed under `node_modules` in the current folder, and executes the `coffee` binary there if so; or otherwise it runs the globally installed one. This allows you to have one version of CoffeeScript installed globally and a different one installed locally for a particular project. (Likewise for the `cake` command.)
* Bugfixes for chained function calls not closing implicit objects or ternaries.
* Bugfixes for incorrect code generated by the `?` operator within a termary `if` statement.
* Fixed some tests, and failing tests now result in a nonzero exit code.
```
releaseHeader('2017-04-14', '2.0.0-beta1', '2.0.0-alpha1')
```
* Initial beta release of CoffeeScript 2. No further breaking changes are anticipated.
* Destructured objects and arrays now output using ES2015+ syntax whenever possible.
* Literate CoffeeScript now has much better support for parsing Markdown, thanks to using [Markdown-It](https://github.com/markdown-it/markdown-it) to detect Markdown sections rather than just looking at indentation.
* Calling a function named `get` or `set` now requires parentheses, to disambiguate from the `get` or `set` keywords (which are [disallowed](#unsupported-get-set)).
* The compiler now requires Node 7.6+, the first version of Node to support asynchronous functions without requiring a flag.
```
releaseHeader('2017-04-10', '1.12.5', '1.12.4')
```
* Better handling of `default`, `from`, `as` and `*` within `import` and `export` statements. You can now import or export a member named `default` and the compiler wont interpret it as the `default` keyword.
* Fixed a bug where invalid octal escape sequences werent throwing errors in the compiler.
```
releaseHeader('2017-02-21', '2.0.0-alpha1', '1.12.4')
@@ -41,7 +97,7 @@ releaseHeader('2016-12-16', '1.12.2', '1.12.1')
* The browser compiler can once again be built unminified via `MINIFY=false cake build:browser`.
* The error-prone patched version of `Error.prepareStackTrace` has been removed.
* Command completion in the REPL (pressing tab to get suggestions) has been fixed for Node 6.9.1+.
* The [browser-based tests](v<%= majorVersion %>/test.html) now include all the tests as the Node-based version.
* The [browser-based tests](/v<%= majorVersion %>/test.html) now include all the tests as the Node-based version.
```
releaseHeader('2016-12-07', '1.12.1', '1.12.0')
@@ -58,7 +114,7 @@ releaseHeader('2016-12-04', '1.12.0', '1.11.1')
* CoffeeScript now provides a [`for…from`](#generator-iteration) syntax for outputting ES2015 [`for…of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of). (Sorry they couldnt match, but we came up with `for…of` first for something else.) This allows iterating over generators or any other iterable object. Note that using `for…from` in your code makes you responsible for ensuring that either your runtime supports `for…of` or that you transpile the output JavaScript further to a version your target runtime(s) support.
* Triple backticks (`` `````) allow the creation of embedded JavaScript blocks where escaping single backticks is not required, which should improve interoperability with ES2015 template literals and with Markdown.
* Within single-backtick embedded JavaScript, backticks can now be escaped via `` \```.
* The browser tests now run in the browser again, and are accessible [here](v<%= majorVersion %>/test.html) if you would like to test your browser.
* The browser tests now run in the browser again, and are accessible [here](/v<%= majorVersion %>/test.html) if you would like to test your browser.
* CoffeeScript-only keywords in ES2015 `import`s and `export`s are now ignored.
* The compiler now throws an error on trying to export an anonymous class.
* Bugfixes related to tokens and location data, for better source maps and improved compatibility with downstream tools.
@@ -188,11 +244,6 @@ releaseHeader('2014-01-28', '1.7.0', '1.6.3')
* When requiring CoffeeScript files in Node you must now explicitly register the compiler. This can be done with `require 'coffeescript/register'` or `CoffeeScript.register()`. Also for configuration such as Mochas, use **coffeescript/register**.
* Improved error messages, source maps and stack traces. Source maps now use the updated `//#` syntax.
* Leading `.` now closes all open calls, allowing for simpler chaining syntax.
```
codeFor('chaining')
```
* Added `**`, `//` and `%%` operators and `...` expansion in parameter lists and destructuring expressions.
* Multiline strings are now joined by a single space and ignore all indentation. A backslash at the end of a line can denote the amount of whitespace between lines, in both strings and heredocs. Backslashes correctly escape whitespace in block regexes.
* Closing brackets can now be indented and therefore no longer cause unexpected error.
@@ -223,7 +274,7 @@ releaseHeader('2013-03-18', '1.6.2', '1.6.1')
releaseHeader('2013-03-05', '1.6.1', '1.5.0')
```
* First release of [source maps](#source-maps). Pass the `--map` flag to the compiler, and off you go. Direct all your thanks over to [Jason Walton](http://github.com/jwalton).
* First release of [source maps](#source-maps). Pass the `--map` flag to the compiler, and off you go. Direct all your thanks over to [Jason Walton](https://github.com/jwalton).
* Fixed a 1.5.0 regression with multiple implicit calls against an indented implicit object. Combinations of implicit function calls and implicit objects should generally be parsed better now — but it still isnt good _style_ to nest them too heavily.
* `.coffee.md` is now also supported as a Literate CoffeeScript file extension, for existing tooling. `.litcoffee` remains the canonical one.
* Several minor fixes surrounding member properties, bound methods and `super` in class declarations.
@@ -330,7 +381,7 @@ The REPL now properly formats stacktraces, and stays alive through asynchronous
releaseHeader('2010-11-21', '0.9.5', '0.9.4')
```
0.9.5 should be considered the first release candidate for CoffeeScript 1.0. There have been a large number of internal changes since the previous release, many contributed from **satyr**s [Coco](http://github.com/satyr/coco) dialect of CoffeeScript. Heregexes (extended regexes) were added. Functions can now have default arguments. Class bodies are now executable code. Improved syntax errors for invalid CoffeeScript. `undefined` now works like `null`, and cannot be assigned a new value. There was a precedence change with respect to single-line comprehensions: `result = i for i in list`
0.9.5 should be considered the first release candidate for CoffeeScript 1.0. There have been a large number of internal changes since the previous release, many contributed from **satyr**s [Coco](https://github.com/satyr/coco) dialect of CoffeeScript. Heregexes (extended regexes) were added. Functions can now have default arguments. Class bodies are now executable code. Improved syntax errors for invalid CoffeeScript. `undefined` now works like `null`, and cannot be assigned a new value. There was a precedence change with respect to single-line comprehensions: `result = i for i in list`
used to parse as `result = (i for i in list)` by default … it now parses as
`(result = i) for i in list`.
@@ -410,7 +461,7 @@ Interpolation can now be used within regular expressions and heredocs, as well a
releaseHeader('2010-03-08', '0.5.5', '0.5.4')
```
String interpolation, contributed by [Stan Angeloff](http://github.com/StanAngeloff). Since `--run` has been the default since **0.5.3**, updating `--stdio` and `--eval` to run by default, pass `--compile` as well if youd like to print the result.
String interpolation, contributed by [Stan Angeloff](https://github.com/StanAngeloff). Since `--run` has been the default since **0.5.3**, updating `--stdio` and `--eval` to run by default, pass `--compile` as well if youd like to print the result.
```
releaseHeader('2010-03-03', '0.5.4', '0.5.3')
@@ -429,7 +480,7 @@ releaseHeader('2010-02-25', '0.5.2', '0.5.1')
```
Added a compressed version of the compiler for inclusion in web pages as
`v<%= majorVersion %>/browser-compiler/coffeescript.js`. Itll automatically run any script tags with type `text/coffeescript` for you. Added a `--stdio` option to the `coffee` command, for piped-in compiles.
`/v<%= majorVersion %>/browser-compiler/coffeescript.js`. Itll automatically run any script tags with type `text/coffeescript` for you. Added a `--stdio` option to the `coffee` command, for piped-in compiles.
```
releaseHeader('2010-02-24', '0.5.1', '0.5.0')
@@ -506,7 +557,7 @@ Arguments objects are now converted into real arrays when referenced.
releaseHeader('2010-01-05', '0.2.0', '0.1.6')
```
Major release. Significant whitespace. Better statement-to-expression conversion. Splats. Splice literals. Object comprehensions. Blocks. The existential operator. Many thanks to all the folks who posted issues, with special thanks to [Liam OConnor-Davis](http://github.com/liamoc) for whitespace and expression help.
Major release. Significant whitespace. Better statement-to-expression conversion. Splats. Splice literals. Object comprehensions. Blocks. The existential operator. Many thanks to all the folks who posted issues, with special thanks to [Liam OConnor-Davis](https://github.com/liamoc) for whitespace and expression help.
```
releaseHeader('2009-12-27', '0.1.6', '0.1.5')
@@ -524,7 +575,7 @@ Array slice literals and array comprehensions can now both take Ruby-style range
releaseHeader('2009-12-25', '0.1.4', '0.1.3')
```
The official CoffeeScript extension is now `.coffee` instead of `.cs`, which properly belongs to [C#](http://en.wikipedia.org/wiki/C_Sharp_(programming_language)). Due to popular demand, you can now also use `=` to assign. Unlike JavaScript, `=` can also be used within object literals, interchangeably with `:`. Made a grammatical fix for chained function calls like `func(1)(2)(3)(4)`. Inheritance and super no longer use `__proto__`, so they should be IE-compatible now.
The official CoffeeScript extension is now `.coffee` instead of `.cs`, which properly belongs to [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)). Due to popular demand, you can now also use `=` to assign. Unlike JavaScript, `=` can also be used within object literals, interchangeably with `:`. Made a grammatical fix for chained function calls like `func(1)(2)(3)(4)`. Inheritance and super no longer use `__proto__`, so they should be IE-compatible now.
```
releaseHeader('2009-12-25', '0.1.3', '0.1.2')

View File

@@ -1,5 +1,17 @@
## CoffeeScript 2
CoffeeScript 2 generates JavaScript that uses the latest ES2015+ features. It is your responsibility to ensure that your target JavaScript runtime(s) support all these features, or that you pass the output through another transpiler like [Babel](http://babeljs.io/), [Rollup](https://github.com/rollup/rollup) or [Traceur Compiler](https://github.com/google/traceur-compiler). In general, [CoffeeScript 2s output is fully supported by Node.js 7+](http://node.green/), although async functions require the `--harmony` or `--harmony-async-await` flags; and ES2015 modules require an additional transpiler. Output JavaScript intended for browsers generally requires additional transpilation.
### Whats New In CoffeeScript 2?
If youre looking for a single tool that takes CoffeeScript input and generates JavaScript output that runs in any JavaScript runtime, assuming you opt out of certain newer features, stick to the [CoffeeScript 1.x branch](v1/). CoffeeScript 2 [breaks compatibility](#breaking-changes) with certain CoffeeScript 1.x features in order to conform with the ES2015+ specifications, and generate more idiomatic output (a CoffeeScript `=>` becomes an ES `=>`; a CoffeeScript `class` becomes an ES `class`; and so on).
The biggest change in CoffeeScript 2 is that now the CoffeeScript compiler produces modern, ES2015+ JavaScript. A CoffeeScript `=>` becomes an ES `=>`, a CoffeeScript `class` becomes an ES `class` and so on. With the exception of modules (`import` and `export` statements), all the ES2015+ features that CoffeeScript supports can run natively in Node 7.6+, meaning that Node can run CoffeeScripts output without any further processing required. You can [run the tests in your browser](http://coffeescript.org/v<%= majorVersion %>/test.html) to see if your browser can do the same; Chrome has supported all features since version 55.
Support for ES2015+ syntax is important to ensure compatibility with frameworks that assume ES2015. Now that CoffeeScript compiles classes to the ES `class` keyword, its possible to `extend` an ES class; that wasnt possible in CoffeeScript 1. Parity in how language features work is also important on its own; CoffeeScript “is just JavaScript,” and so things like [function parameter default values](#breaking-changes-default-values) should behave the same in CoffeeScript as in JavaScript.
Many ES2015+ features have been backported to CoffeeScript 1.11 and 1.12, including [modules](#modules), [`for…of`](#generator-iteration), and [tagged template literals](#tagged-template-literals). Major new features unique to CoffeeScript 2 are support for ES2017s [async functions](#async-functions) and for [JSX](#jsx). More details are in the [changelog](#changelog).
There are very few [breaking changes from CoffeeScript 1.x to 2](#breaking-changes); we hope the upgrade process is smooth for most projects.
### Why CoffeeScript When Theres ES2015?
CoffeeScript introduced many new features to the JavaScript world, such as [`=>`](#fat-arrow) and [destructuring](#destructuring) and [classes](#classes). We are happy that ECMA has seen their utility and adopted them into ECMAScript.
CoffeeScripts intent, however, was never to be a superset of JavaScript. One of the guiding principles of CoffeeScript has been _simplicity:_ not just removing JavaScripts “bad parts,” but providing an elegant, concise syntax that eschews unnecessary punctuation whenever possible, to make code easier to read and reason about. This benefit of CoffeeScript remains, even in an ES2015 world.

View File

@@ -1,6 +1,6 @@
## Chained Comparisons
CoffeeScript borrows [chained comparisons](http://docs.python.org/reference/expressions.html#notin) from Python — making it easy to test if a value falls within a certain range.
CoffeeScript borrows [chained comparisons](https://docs.python.org/3/reference/expressions.html#not-in) from Python — making it easy to test if a value falls within a certain range.
```
codeFor('comparisons', 'healthy')

View File

@@ -1,8 +1,8 @@
## If, Else, Unless, and Conditional Assignment
**If/else** statements can be written without the use of parentheses and curly brackets. As with functions and other block expressions, multi-line conditionals are delimited by indentation. Theres also a handy postfix form, with the `if` or `unless` at the end.
`if`/`else` statements can be written without the use of parentheses and curly brackets. As with functions and other block expressions, multi-line conditionals are delimited by indentation. Theres also a handy postfix form, with the `if` or `unless` at the end.
CoffeeScript can compile **if** statements into JavaScript expressions, using the ternary operator when possible, and closure wrapping otherwise. There is no explicit ternary statement in CoffeeScript — you simply use a regular **if** statement on a single line.
CoffeeScript can compile `if` statements into JavaScript expressions, using the ternary operator when possible, and closure wrapping otherwise. There is no explicit ternary statement in CoffeeScript — you simply use a regular `if` statement on a single line.
```
codeFor('conditionals')

View File

@@ -0,0 +1,16 @@
## Contributing
Contributions are welcome! Feel free to fork [the repo](http://github.com/jashkenas/coffeescript) and submit a pull request.
[Some features of ECMAScript are intentionally unsupported](#unsupported). Please review both the open and closed [issues on GitHub](http://github.com/jashkenas/coffeescript/issues) to see if the feature youre looking for has already been discussed. As a general rule, we dont support ECMAScript syntax for features that arent yet finalized (at Stage 4 in the proposal approval process).
For more resources on adding to CoffeeScript, please see [the Wiki](https://github.com/jashkenas/coffeescript/wiki/%5BHowto%5D-Hacking-on-the-CoffeeScript-Compiler), especially [How The Parser Works](https://github.com/jashkenas/coffeescript/wiki/%5BHowTo%5D-How-parsing-works).
There are several things you can do to increase your odds of having your pull request accepted:
* Create tests! Any pull request should probably include basic tests to verify you didnt break anything, or future changes wont break your code.
* Follow the style of the rest of the CoffeeScript codebase.
* Ensure any ECMAScript syntax is mature (at Stage 4), with no further potential changes.
* Add only features that have broad utility, rather than a feature aimed at a specific use case or framework.
Of course, its entirely possible that you have a great addition, but it doesnt fit within these constraints. Feel free to roll your own solution; you will have [plenty of company](https://github.com/jashkenas/coffeescript/wiki/In-The-Wild).

View File

@@ -36,4 +36,4 @@ Destructuring assignment is also useful when combined with class constructors to
codeFor('constructor_destructuring', 'tim.age + " " + tim.height')
```
The above example also demonstrates that if properties are missing in the destructured object or array, you can, just like in JavaScript, provide defaults. The difference with JavaScript is that CoffeeScript, as always, treats both null and undefined the same.
The above example also demonstrates that if properties are missing in the destructured object or array, you can, just like in JavaScript, provide defaults. Note though that unlike with the existential operator, the default is only applied with the value is missing or `undefined`—[passing `null` will set a value of `null`](#breaking-changes-default-values), not the default.

View File

@@ -2,10 +2,9 @@
The [best list of open-source CoffeeScript examples](https://github.com/trending?l=coffeescript&since=monthly) can be found on GitHub. But just to throw out a few more:
* **GitHub**s [Hubot](http://hubot.github.com/), a friendly IRC robot that can perform any number of useful and useless tasks.
* **GitHub**s [Hubot](https://hubot.github.com/), a friendly IRC robot that can perform any number of useful and useless tasks.
* **sstephenson**s [Pow](http://pow.cx/), a zero-configuration Rack server, with comprehensive annotated source.
* **technoweenie**s [Coffee-Resque](https://github.com/technoweenie/coffee-resque), a port of [Resque](https://github.com/defunkt/resque) for Node.js.
* **assaf**s [Zombie.js](http://zombie.labnotes.org/), a headless, full-stack, faux-browser testing library for Node.js.
* **stephank**s [Orona](https://github.com/stephank/orona), a remake of the Bolo tank game for modern browsers.
* **GitHub**s [Atom](https://atom.io/), a hackable text editor built on web technologies.
* **Basecamp**s [Trix](https://trix-editor.org/), a rich text editor for web apps.

View File

@@ -1,17 +1,37 @@
## The Existential Operator
Its a little difficult to check for the existence of a variable in JavaScript. `if (variable) …` comes close, but fails for zero, the empty string, and false. CoffeeScripts existential operator `?` returns true unless a variable is **null** or **undefined**, which makes it analogous to Rubys `nil?`
Its a little difficult to check for the existence of a variable in JavaScript. `if (variable) …` comes close, but fails for zero, the empty string, and false (to name just the most common cases). CoffeeScripts existential operator `?` returns true unless a variable is `null` or `undefined` or undeclared, which makes it analogous to Rubys `nil?`.
It can also be used for safer conditional assignment than `||=` provides, for cases where you may be handling numbers or strings.
It can also be used for safer conditional assignment than the JavaScript pattern `a = a || value` provides, for cases where you may be handling numbers or strings.
```
codeFor('existence', 'footprints')
```
The accessor variant of the existential operator `?.` can be used to soak up null references in a chain of properties. Use it instead of the dot accessor `.` in cases where the base value may be **null** or **undefined**. If all of the properties exist then youll get the expected result, if the chain is broken, **undefined** is returned instead of the **TypeError** that would be raised otherwise.
Note that if the compiler knows that `a` is in scope and therefore declared, `a?` compiles to `a != null`, _not_ `a !== null`. The `!=` makes a loose comparison to `null`, which does double duty also comparing against `undefined`. The reverse also holds for `not a?` or `unless a?`.
```
codeFor('existence_declared')
```
If a variable might be undeclared, the compiler does a thorough check. This is what JavaScript coders _should_ be typing when they want to check if a mystery variable exists.
```
codeFor('existence_undeclared')
```
The accessor variant of the existential operator `?.` can be used to soak up null references in a chain of properties. Use it instead of the dot accessor `.` in cases where the base value may be `null` or `undefined`. If all of the properties exist then youll get the expected result, if the chain is broken, `undefined` is returned instead of the `TypeError` that would be raised otherwise.
```
codeFor('soaks')
```
Soaking up nulls is similar to Rubys [andand gem](https://rubygems.org/gems/andand), and to the [safe navigation operator](http://docs.groovy-lang.org/latest/html/documentation/index.html#_safe_navigation_operator) in Groovy.
For completeness:
| Example | Definition |
| --- | --- |
| `a?` | tests that `a` is in scope and `a != null` |
| `a ? b` | returns `a` if `a` is in scope and `a != null`; otherwise, `b` |
| `a?.b` or `a?['b']` | returns `a.b` if `a` is in scope and `a != null`; otherwise, `undefined` |
| `a?(b, c)` or `a? b, c`&emsp; | returns the result of calling `a` (with arguments `b` and `c`) if `a` is in scope and callable; otherwise, `undefined` |
| `a ?= b` | assigns the value of `b` to `a` if `a` is not in scope or if `a == null`; produces the new value of `a` |

View File

@@ -20,7 +20,7 @@ Things that would otherwise be statements in JavaScript, when used as part of an
codeFor('expressions_comprehension', 'globals')
```
As well as silly things, like passing a **try/catch** statement directly into a function call:
As well as silly things, like passing a `try`/`catch` statement directly into a function call:
```
codeFor('expressions_try', true)

View File

@@ -1,4 +1,4 @@
## Function Modifiers
## Bound (Fat Arrow) Functions
In JavaScript, the `this` keyword is dynamically scoped to mean the object that the current function is attached to. If you pass a function as a callback or attach it to a different object, the original value of `this` will be lost. If youre not familiar with this behavior, [this Digital Web article](http://64.13.255.16/articles/scope_in_javascript/) gives a good overview of the quirks.
@@ -10,24 +10,4 @@ codeFor('fat_arrow')
If we had used `->` in the callback above, `@customer` would have referred to the undefined “customer” property of the DOM element, and trying to call `purchase()` on it would have raised an exception.
When used in a class definition, methods declared with the fat arrow will be automatically bound to each instance of the class when the instance is constructed.
CoffeeScript also supports [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) and [async functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) through the `yield` and `await` keywords respectively. There's no `function*(){}` or `async function(){}` nonsense — a generator in CoffeeScript is simply a function that yields, and an async function in CoffeeScript is simply a function that awaits.
```
codeFor('generators', 'ps.next().value')
```
`yield*` is called `yield from`, and `yield return` may be used if you need to force a generator that doesnt yield.
You can iterate over a generator function using `for…from`.
```
codeFor('generator_iteration', 'getFibonacciNumbers(10)')
```
Similar to how `yield return` forces a generator, `await return` may be used to force a function to be async.
```
codeFor('async', true)
```
The fat arrow was one of the most popular features of CoffeeScript, and ES2015 [adopted it](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions); so CoffeeScript 2 compiles `=>` to ES `=>`.

View File

@@ -0,0 +1,17 @@
## Generator Functions
CoffeeScript supports ES2015 [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) through the `yield` keyword. There's no `function*(){}` nonsense — a generator in CoffeeScript is simply a function that yields.
```
codeFor('generators', 'ps.next().value')
```
`yield*` is called `yield from`, and `yield return` may be used if you need to force a generator that doesnt yield.
<div id="generator-iteration" class="bookmark"></div>
You can iterate over a generator function using `for…from`.
```
codeFor('generator_iteration', 'getFibonacciNumbers(10)')
```

View File

@@ -1,15 +1,19 @@
## Installation
The command-line version of `coffee` is available as a [Node.js](http://nodejs.org/) utility. The [core compiler](v<%= majorVersion %>/browser-compiler/coffeescript.js) however, does not depend on Node, and can be run in any JavaScript environment, or in the browser (see [Try CoffeeScript](#try)).
The command-line version of `coffee` is available as a [Node.js](https://nodejs.org/) utility. The [core compiler](/v<%= majorVersion %>/browser-compiler/coffeescript.js) however, does not depend on Node, and can be run in any JavaScript environment, or in the browser (see [Try CoffeeScript](#try)).
To install, first make sure you have a working copy of the latest stable version of [Node.js](http://nodejs.org/). You can then install CoffeeScript globally with [npm](http://npmjs.org):
To install, first make sure you have a working copy of the latest stable version of [Node.js](https://nodejs.org/). You can then install CoffeeScript globally with [npm](https://www.npmjs.com/):
> ```
npm install --global coffeescript
```bash
npm install --global coffeescript@next
```
This will make the `coffee` and `cake` commands available globally.
When you need CoffeeScript as a dependency of a project, within that projects folder you can install it locally:
> ```
npm install --save coffeescript
```bash
npm install --save coffeescript@next
```
The `coffee` and `cake` commands will first look in the current folder to see if CoffeeScript is installed locally, and use that version if so. This allows different versions of CoffeeScript to be installed globally and locally.

View File

@@ -2,8 +2,8 @@
The golden rule of CoffeeScript is: _“Its just JavaScript.”_ The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable, pretty-printed, and tends to run as fast or faster than the equivalent handwritten JavaScript.
**Latest Version:** [<%= fullVersion %>](http://github.com/jashkenas/coffeescript/tarball/<%= fullVersion %>)
**Latest Version:** [<%= fullVersion %>](https://github.com/jashkenas/coffeescript/tarball/<%= fullVersion %>)
> ```
npm install -g coffeescript
```bash
npm install -g coffeescript@next
```

View File

@@ -0,0 +1,13 @@
## JSX
[JSX](https://facebook.github.io/react/docs/introducing-jsx.html) is JavaScript containing interspersed XML elements. While conceived for [React](https://facebook.github.io/react/), it is not specific to any particular library or framework.
CoffeeScript supports interspersed XML elements, without the need for separate plugins or special settings. The XML elements will be compiled as such, outputting JSX that could be parsed like any normal JSX file, for example by [Babel with the React JSX transform](https://babeljs.io/docs/plugins/transform-react-jsx/). CoffeeScript does _not_ output `React.createElement` calls or any code specific to React or any other framework. It is up to you to attach another step in your build chain to convert this JSX to whatever function calls you wish the XML elements to compile to.
Just like in JSX and HTML, denote XML tags using `<` and `>`. You can interpolate CoffeeScript code inside a tag using `{` and `}`. To avoid compiler errors, when using `<` and `>` to mean “less than” or “greater than,” you should wrap the operators in spaces to distinguish them from XML tags. So `i < len`, not `i<len`. The compiler tries to be forgiving when it can be sure what you intend, but always putting spaces around the “less than” and “greater than” operators will remove ambiguity.
```
codeFor('jsx')
```
Older plugins or forks of CoffeeScript supported JSX syntax and referred to it as CSX or CJSX. They also often used a `.cjsx` file extension, but this is no longer necessary; regalar `.coffee` will do.

View File

@@ -6,10 +6,12 @@ The CoffeeScript compiler takes care to make sure that all of your variables are
codeFor('scope', 'inner')
```
Notice how all of the variable declarations have been pushed up to the top of the closest scope, the first time they appear. **outer** is not redeclared within the inner function, because its already in scope; **inner** within the function, on the other hand, should not be able to change the value of the external variable of the same name, and therefore has a declaration of its own.
Notice how all of the variable declarations have been pushed up to the top of the closest scope, the first time they appear. `outer` is not redeclared within the inner function, because its already in scope; `inner` within the function, on the other hand, should not be able to change the value of the external variable of the same name, and therefore has a declaration of its own.
This behavior is effectively identical to Rubys scope for local variables. Because you dont have direct access to the `var` keyword, its impossible to shadow an outer variable on purpose, you may only refer to it. So be careful that youre not reusing the name of an external variable accidentally, if youre writing a deeply nested function.
Because you dont have direct access to the `var` keyword, its impossible to shadow an outer variable on purpose, you may only refer to it. So be careful that youre not reusing the name of an external variable accidentally, if youre writing a deeply nested function.
Although suppressed within this documentation for clarity, all CoffeeScript output is wrapped in an anonymous function: `(function(){ … })();` This safety wrapper, combined with the automatic generation of the `var` keyword, make it exceedingly difficult to pollute the global namespace by accident.
Although suppressed within this documentation for clarity, all CoffeeScript output (except in files with `import` or `export` statements) is wrapped in an anonymous function: `(function(){ … })();`. This safety wrapper, combined with the automatic generation of the `var` keyword, make it exceedingly difficult to pollute the global namespace by accident. (The safety wrapper can be disabled with the [`bare` option](#usage), and is unnecessary and automatically disabled when using modules.)
If youd like to create top-level variables for other scripts to use, attach them as properties on **window**; attach them as properties on the **exports** object in CommonJS; or use an [`export` statement](#modules). If youre targeting both CommonJS and the browser, the **existential operator** (covered below), gives you a reliable way to figure out where to add them: `exports ? this`
If youd like to create top-level variables for other scripts to use, attach them as properties on `window`; attach them as properties on the `exports` object in CommonJS; or use an [`export` statement](#modules). If youre targeting both CommonJS and the browser, the [existential operator](#existential-operator) (covered below), gives you a reliable way to figure out where to add them: `exports ? this`.
Since CoffeeScript takes care of all variable declaration, it is not possible to declare variables with ES2015s `let` or `const`. [This is intentional](#unsupported-let-const); we feel that the simplicity gained by not having to think about variable declaration outweighs the benefit of having three separate ways to declare variables.

View File

@@ -1,5 +1,11 @@
## Literate CoffeeScript
Besides being used as an ordinary programming language, CoffeeScript may also be written in “literate” mode. If you name your file with a `.litcoffee` extension, you can write it as a Markdown document — a document that also happens to be executable CoffeeScript code. The compiler will treat any indented blocks (Markdowns way of indicating source code) as code, and ignore the rest as comments.
Besides being used as an ordinary programming language, CoffeeScript may also be written in “literate” mode. If you name your file with a `.litcoffee` extension, you can write it as a Markdown document — a document that also happens to be executable CoffeeScript code. The compiler will treat any indented blocks (Markdowns way of indicating source code) as executable code, and ignore the rest as comments. Code blocks must also be separated from comments by at least one blank line.
Just for kicks, a little bit of the compiler is currently implemented in this fashion: See it [as a document](https://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df), [raw](https://raw.github.com/jashkenas/coffeescript/master/src/scope.litcoffee), and [properly highlighted in a text editor](http://cl.ly/LxEu).
Just for kicks, a little bit of the compiler is currently implemented in this fashion: See it [as a document](https://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df), [raw](https://raw.githubusercontent.com/jashkenas/coffeescript/master/src/scope.litcoffee), and [properly highlighted in a text editor](http://cl.ly/LxEu).
A few caveats:
* Code blocks need to maintain consistent indentation relative to each other. When the compiler parses your Literate CoffeeScript file, it first discards all the non-code block lines and then parses the remainder as a regular CoffeeScript file. Therefore the code blocks need to be written as if the comment lines dont exist, with consistent indentation (including whether they are indented with tabs or spaces).
* Along those lines, code blocks within list items or blockquotes are not treated as executable code. Since list items and blockquotes imply their own indentation, it would be ambiguous how to treat indentation between successive code blocks when some are within these other blocks and some are not.
* List items can be at most only one paragraph long. The second paragraph of a list item would be indented after a blank line, and therefore indistinguishable from a code block.

View File

@@ -1,12 +1,12 @@
## Loops and Comprehensions
Most of the loops youll write in CoffeeScript will be **comprehensions** over arrays, objects, and ranges. Comprehensions replace (and compile into) **for** loops, with optional guard clauses and the value of the current array index. Unlike for loops, array comprehensions are expressions, and can be returned and assigned.
Most of the loops youll write in CoffeeScript will be **comprehensions** over arrays, objects, and ranges. Comprehensions replace (and compile into) `for` loops, with optional guard clauses and the value of the current array index. Unlike for loops, array comprehensions are expressions, and can be returned and assigned.
```
codeFor('array_comprehensions')
```
Comprehensions should be able to handle most places where you otherwise would use a loop, **each**/**forEach**, **map**, or **select**/**filter**, for example:<br>
Comprehensions should be able to handle most places where you otherwise would use a loop, `each`/`forEach`, `map`, or `select`/`filter`, for example:<br>
`shortNames = (name for name in list when name.length < 5)`<br>
If you know the start and end of your loop, or would like to step through in fixed-size increments, you can use a range to specify the start and end of your comprehension.
@@ -32,13 +32,13 @@ If you would like to iterate over just the keys that are defined on the object i
To iterate a generator function, use `from`. See [Generator Functions](#generator-iteration).
The only low-level loop that CoffeeScript provides is the **while** loop. The main difference from JavaScript is that the **while** loop can be used as an expression, returning an array containing the result of each iteration through the loop.
The only low-level loop that CoffeeScript provides is the `while` loop. The main difference from JavaScript is that the `while` loop can be used as an expression, returning an array containing the result of each iteration through the loop.
```
codeFor('while', 'lyrics.join("\\n")')
```
For readability, the **until** keyword is equivalent to `while not`, and the **loop** keyword is equivalent to `while true`.
For readability, the `until` keyword is equivalent to `while not`, and the `loop` keyword is equivalent to `while true`.
When using a JavaScript loop to generate functions, its common to insert a closure wrapper in order to ensure that loop variables are closed over, and all the generated functions dont just share the final values. CoffeeScript provides the `do` keyword, which immediately invokes a passed function, forwarding any arguments.

View File

@@ -6,6 +6,8 @@ ES2015 modules are supported in CoffeeScript, with very similar `import` and `ex
codeFor('modules')
```
<div id="modules-note" class="bookmark"></div>
Note that the CoffeeScript compiler **does not resolve modules**; writing an `import` or `export` statement in CoffeeScript will produce an `import` or `export` statement in the resulting output. It is your responsibility attach another transpiler, such as [Traceur Compiler](https://github.com/google/traceur-compiler), [Babel](http://babeljs.io/) or [Rollup](https://github.com/rollup/rollup), to convert this ES2015 syntax into code that will work in your target runtimes.
Also note that any file with an `import` or `export` statement will be output without a [top-level function safety wrapper](#lexical-scope); in other words, importing or exporting modules will automatically trigger [bare](#usage) mode for that file. This is because per the ES2015 spec, `import` or `export` statements must occur at the topmost scope.

View File

@@ -6,7 +6,7 @@ You can use `not` as an alias for `!`.
For logic, `and` compiles to `&&`, and `or` into `||`.
Instead of a newline or semicolon, `then` can be used to separate conditions from expressions, in **while**, **if**/**else**, and **switch**/**when** statements.
Instead of a newline or semicolon, `then` can be used to separate conditions from expressions, in `while`, `if`/`else`, and `switch`/`when` statements.
As in [YAML](http://yaml.org/), `on` and `yes` are the same as boolean `true`, while `off` and `no` are boolean `false`.
@@ -16,7 +16,9 @@ As a shortcut for `this.property`, you can use `@property`.
You can use `in` to test for array presence, and `of` to test for JavaScript object-key presence.
To simplify math expressions, `**` can be used for exponentiation and `//` performs integer division. `%` works just like in JavaScript, while `%%` provides [“dividend dependent modulo”](http://en.wikipedia.org/wiki/Modulo_operation):
In a `for` loop, `from` compiles to the [ES2015 `of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of). (Yes, its unfortunate; the CoffeeScript `of` predates the ES2015 `of`.)
To simplify math expressions, `**` can be used for exponentiation and `//` performs integer division. `%` works just like in JavaScript, while `%%` provides [“dividend dependent modulo”](https://en.wikipedia.org/wiki/Modulo_operation):
```
codeFor('modulo')
@@ -24,125 +26,22 @@ codeFor('modulo')
All together now:
<table class="definitions">
<tbody>
<tr>
<th>CoffeeScript</th>
<th>JavaScript</th>
</tr>
<tr>
<td>`is`</td>
<td>`===`</td>
</tr>
<tr>
<td>`isnt`</td>
<td>`!==`</td>
</tr>
<tr>
<td>`not`</td>
<td>`!`</td>
</tr>
<tr>
<td>`and`</td>
<td>`&&`</td>
</tr>
<tr>
<td>`or`</td>
<td>`||`</td>
</tr>
<tr>
<td>`true`, `yes`, `on`</td>
<td>`true`</td>
</tr>
<tr>
<td>`false`, `no`, `off`&emsp;</td>
<td>`false`</td>
</tr>
<tr>
<td>`@`, `this`</td>
<td>`this`</td>
</tr>
<tr>
<td>`of`</td>
<td>`in`</td>
</tr>
<tr>
<td>`in`</td>
<td>_<small>no JS equivalent</small>_</td>
</tr>
<tr>
<td>`a ** b`</td>
<td>`Math.pow(a, b)`</td>
</tr>
<tr>
<td>`a // b`</td>
<td>`Math.floor(a / b)`</td>
</tr>
<tr>
<td>`a %% b`</td>
<td>`(a % b + b) % b`</td>
</tr>
</tbody>
</table>
| CoffeeScript | JavaScript |
| --- | --- |
| `is` | `===` |
| `isnt` | `!==` |
| `not` | `!` |
| `and` | `&&` |
| `or` | `||` |
| `true`, `yes`, `on` | `true` |
| `false`, `no`, `off`&emsp; | `false` |
| `@`, `this` | `this` |
| `a in b` | `[].indexOf.call(b, a) >= 0` |
| `a of b` | `a in b` |
| `for a from b` | `for (a of b)` |
| `a ** b` | `Math.pow(a, b)` |
| `a // b` | `Math.floor(a / b)` |
| `a %% b` | `(a % b + b) % b` |
```
codeFor('aliases')

View File

@@ -1,6 +1,6 @@
## Prototypal Inheritance
In addition to supporting ES2015 classes, CoffeeScript provides a few shortcuts for working with prototypes. The `extends` operator can be used to create an inheritance chain between any pair of constructor functions, and `::` gives you quick access to an objects prototype:
In addition to supporting ES2015 classes, CoffeeScript provides a shortcut for working with prototypes. The `::` operator gives you quick access to an objects prototype:
```
codeFor('prototypes', '"one_two".dasherize()')

View File

@@ -1,13 +1,13 @@
## Resources
* [CoffeeScript on GitHub](http://github.com/jashkenas/coffeescript/)
* [CoffeeScript Issues](http://github.com/jashkenas/coffeescript/issues)<br>
* [CoffeeScript on GitHub](https://github.com/jashkenas/coffeescript/)
* [CoffeeScript Issues](https://github.com/jashkenas/coffeescript/issues)<br>
Bug reports, feature proposals, and ideas for changes to the language belong here.
* [CoffeeScript Google Group](https://groups.google.com/forum/#!forum/coffeescript)<br>
If youd like to ask a question, the mailing list is a good place to get help.
* [The CoffeeScript Wiki](http://github.com/jashkenas/coffeescript/wiki)<br>
If youve ever learned a neat CoffeeScript tip or trick, or ran into a gotcha — share it on the wiki. The wiki also serves as a directory of handy [text editor extensions](http://github.com/jashkenas/coffeescript/wiki/Text-editor-plugins), [web framework plugins](http://github.com/jashkenas/coffeescript/wiki/Web-framework-plugins), and general [CoffeeScript build tools](http://github.com/jashkenas/coffeescript/wiki/Build-tools).
* [The FAQ](http://github.com/jashkenas/coffeescript/wiki/FAQ)<br>
* [The CoffeeScript Wiki](https://github.com/jashkenas/coffeescript/wiki)<br>
If youve ever learned a neat CoffeeScript tip or trick, or ran into a gotcha — share it on the wiki. The wiki also serves as a directory of handy [text editor extensions](https://github.com/jashkenas/coffeescript/wiki/Text-editor-plugins), [web framework plugins](https://github.com/jashkenas/coffeescript/wiki/Web-framework-plugins), and general [CoffeeScript build tools](https://github.com/jashkenas/coffeescript/wiki/Build-tools).
* [The FAQ](https://github.com/jashkenas/coffeescript/wiki/FAQ)<br>
Perhaps your CoffeeScript-related question has been asked before. Check the FAQ first.
* [JS2Coffee](http://js2.coffee/)<br>
Is a very well done reverse JavaScript-to-CoffeeScript compiler. Its not going to be perfect (infer what your JavaScript classes are, when you need bound functions, and so on…) — but its a great starting point for converting simple scripts.

View File

@@ -1,5 +1,5 @@
## Screencasts
* [A Sip of CoffeeScript](http://coffeescript.codeschool.com) is a [Code School Course](http://www.codeschool.com) which combines 6 screencasts with in-browser coding to make learning fun. The first level is free to try out.
* [Meet CoffeeScript](http://peepcode.com/products/coffeescript) is a 75-minute long screencast by [PeepCode](http://peepcode.com/). Highly memorable for its animations which demonstrate transforming CoffeeScript into the equivalent JS.
* [A Sip of CoffeeScript](http://coffeescript.codeschool.com/) is a [Code School Course](https://www.codeschool.com) which combines 6 screencasts with in-browser coding to make learning fun. The first level is free to try out.
* [Meet CoffeeScript](https://www.pluralsight.com/courses/meet-coffeescript) is a 75-minute long screencast by PeepCode, now [PluralSight](https://www.pluralsight.com/). Highly memorable for its animations which demonstrate transforming CoffeeScript into the equivalent JS.
* If youre looking for less of a time commitment, RailsCasts [CoffeeScript Basics](http://railscasts.com/episodes/267-coffeescript-basics) should have you covered, hitting all of the important notes about CoffeeScript in 11 minutes.

View File

@@ -1,6 +1,6 @@
## `"text/coffeescript"` Script Tags
While its not recommended for serious use, CoffeeScripts may be included directly within the browser using `<script type="text/coffeescript">` tags. The source includes a compressed and minified version of the compiler ([Download current version here, 51k when gzipped](v<%= majorVersion %>/browser-compiler/coffeescript.js)) as `v<%= majorVersion %>/browser-compiler/coffeescript.js`. Include this file on a page with inline CoffeeScript tags, and it will compile and evaluate them in order.
While its not recommended for serious use, CoffeeScripts may be included directly within the browser using `<script type="text/coffeescript">` tags. The source includes a compressed and minified version of the compiler ([Download current version here, 51k when gzipped](/v<%= majorVersion %>/browser-compiler/coffeescript.js)) as `docs/v<%= majorVersion %>/browser-compiler/coffeescript.js`. Include this file on a page with inline CoffeeScript tags, and it will compile and evaluate them in order.
In fact, the little bit of glue script that runs [Try CoffeeScript](#try), as well as the code examples and other interactive parts of this site, is implemented in just this way. View source and look at the bottom of the page to see the example. Including the script also gives you access to `CoffeeScript.compile()` so you can pop open your JavaScript console and try compiling some strings.

View File

@@ -2,4 +2,4 @@
CoffeeScript includes support for generating source maps, a way to tell your JavaScript engine what part of your CoffeeScript program matches up with the code being evaluated. Browsers that support it can automatically use source maps to show your original source code in the debugger. To generate source maps alongside your JavaScript files, pass the `--map` or `-m` flag to the compiler.
For a full introduction to source maps, how they work, and how to hook them up in your browser, read the [HTML5 Tutorial](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/).
For a full introduction to source maps, how they work, and how to hook them up in your browser, read the [HTML5 Tutorial](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/).

View File

@@ -1,7 +1,25 @@
## Splats
## Splats, or Rest Parameters/Spread Syntax
The JavaScript **arguments object** is a useful way to work with functions that accept variable numbers of arguments. CoffeeScript provides splats `...`, both for function definition as well as invocation, making variable numbers of arguments a little bit more palatable.
The JavaScript `arguments` object is a useful way to work with functions that accept variable numbers of arguments. CoffeeScript provides splats `...`, both for function definition as well as invocation, making variable numbers of arguments a little bit more palatable. ES2015 adopted this feature as their [rest parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
```
codeFor('splats', true)
```
<div id="array-spread" class="bookmark"></div>
Splats also let us elide array elements...
```
codeFor('array_spread', 'all')
```
<div id="object-spread" class="bookmark"></div>
...and object properties.
```
codeFor('object_spread', 'JSON.stringify(currentUser)')
```
In ECMAScript this is called [spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator), and has been supported for arrays since ES2015 but is [coming soon for objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Spread_in_object_literals). Until object spread syntax is officially supported, the CoffeeScript compiler outputs the same polyfill as [Babels rest spread transform](https://babeljs.io/docs/plugins/transform-object-rest-spread/); but once it is supported, we will revise the compilers output. Note that there are [very subtle differences](https://developers.google.com/web/updates/2017/06/object-rest-spread) between the polyfill and the current proposal.

View File

@@ -1,14 +1,14 @@
## Switch/When/Else
**Switch** statements in JavaScript are a bit awkward. You need to remember to **break** at the end of every **case** statement to avoid accidentally falling through to the default case. CoffeeScript prevents accidental fall-through, and can convert the `switch` into a returnable, assignable expression. The format is: `switch` condition, `when` clauses, `else` the default case.
`switch` statements in JavaScript are a bit awkward. You need to remember to `break` at the end of every `case` statement to avoid accidentally falling through to the default case. CoffeeScript prevents accidental fall-through, and can convert the `switch` into a returnable, assignable expression. The format is: `switch` condition, `when` clauses, `else` the default case.
As in Ruby, **switch** statements in CoffeeScript can take multiple values for each **when** clause. If any of the values match, the clause runs.
As in Ruby, `switch` statements in CoffeeScript can take multiple values for each `when` clause. If any of the values match, the clause runs.
```
codeFor('switch')
```
Switch statements can also be used without a control expression, turning them in to a cleaner alternative to if/else chains.
`switch` statements can also be used without a control expression, turning them in to a cleaner alternative to `if`/`else` chains.
```
codeFor('switch_with_no_expression')

View File

@@ -4,4 +4,4 @@ CoffeeScript includes an extensive test suite, which verifies that the compiler
Note that since no JavaScript runtime yet supports ES2015 modules, the tests for module support verify only that the CoffeeScript compilers output is the correct syntax; the tests dont verify that the modules resolve properly.
[Run the tests in your browser.](http://coffeescript.dev/v<%= majorVersion %>/test.html)
[Run the tests in your browser.](http://coffeescript.org/v<%= majorVersion %>/test.html)

View File

@@ -1,6 +1,6 @@
## Try/Catch/Finally
Try-expressions have the same semantics as try-statements in JavaScript, though in CoffeeScript, you may omit _both_ the catch and finally parts. The catch part may also omit the error parameter if it is not needed.
`try` expressions have the same semantics as `try` statements in JavaScript, though in CoffeeScript, you may omit _both_ the catch and finally parts. The catch part may also omit the error parameter if it is not needed.
```
codeFor('try')

View File

@@ -0,0 +1,3 @@
## Unsupported ECMAScript Features
There are a few ECMAScript features that CoffeeScript intentionally doesnt support.

View File

@@ -0,0 +1,9 @@
### `get` and `set` keyword shorthand syntax
`get` and `set`, as keywords preceding functions or class methods, are intentionally unimplemented in CoffeeScript.
This is to avoid grammatical ambiguity, since in CoffeeScript such a construct looks identical to a function call (e.g. `get(function foo() {})`); and because there is an [alternate syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) that is slightly more verbose but just as effective:
```
codeFor('get_set', 'screen.height')
```

View File

@@ -0,0 +1,13 @@
### `let` and `const`: block-scoped and reassignment-protected variables
When CoffeeScript was designed, `var` was [intentionally omitted](https://github.com/jashkenas/coffeescript/issues/238#issuecomment-153502). This was to spare developers the mental housekeeping of needing to worry about variable _declaration_ (`var foo`) as opposed to variable _assignment_ (`foo = 1`). The CoffeeScript compiler automatically takes care of declaration for you, by generating `var` statements at the top of every function scope. This makes it impossible to accidentally declare a global variable.
`let` and `const` add a useful ability to JavaScript in that you can use them to declare variables within a _block_ scope, for example within an `if` statement body or a `for` loop body, whereas `var` always declares variables in the scope of an entire function. When CoffeeScript 2 was designed, there was much discussion of whether this functionality was useful enough to outweigh the simplicity offered by never needing to consider variable declaration in CoffeeScript. In the end, it was decided that the simplicity was more valued. In CoffeeScript there remains only one type of variable.
Keep in mind that `const` only protects you from _reassigning_ a variable; it doesnt prevent the variables value from changing, the way constants usually do in other languages:
```js
const obj = {foo: 'bar'};
obj.foo = 'baz'; // Allowed!
obj = {}; // Throws error
```

View File

@@ -0,0 +1,5 @@
### Named functions and function declarations
Newcomers to CoffeeScript often wonder how to generate the JavaScript `function foo() {}`, as opposed to the `foo = function() {}` that CoffeeScript produces. The first form is a [function declaration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function), and the second is a [function expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function). As stated above, in CoffeeScript [everything is an expression](#expressions), so naturally we favor the expression form. Supporting only one variant helps avoid confusing bugs that can arise from the [subtle differences between the two forms](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function#Function_declaration_hoisting).
Technically, `foo = function() {}` is creating an anonymous function that gets assigned to a variable named `foo`. Some very early versions of CoffeeScript named this function, e.g. `foo = function foo() {}`, but this was dropped because of compatibility issues with Internet Explorer. For a while this annoyed people, as these functions would be unnamed in stack traces; but modern JavaScript runtimes [infer the names of such anonymous functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) from the names of the variables to which theyre assigned. Given that this is the case, and given that not all functions in function expressions can be named (for example, the functions in `first.fn = ->; second.fn = ->` cant both be named `fn`) its simplest to just preserve the current behavior.

View File

@@ -2,158 +2,24 @@
Once installed, you should have access to the `coffee` command, which can execute scripts, compile `.coffee` files into `.js`, and provide an interactive REPL. The `coffee` command takes the following options:
<table>
<tbody>
<tr>
<td>`-c, --compile`</td>
<td>Compile a `.coffee` script into a `.js` JavaScript file of the same name.</td>
</tr>
<tr>
<td>`-m, --map`</td>
<td>Generate source maps alongside the compiled JavaScript files. Adds `sourceMappingURL` directives to the JavaScript as well.</td>
</tr>
<tr>
<td>`-M, --inline-map`</td>
<td>Just like `--map`, but include the source map directly in the compiled JavaScript files, rather than in a separate file.</td>
</tr>
<tr>
<td width="25%">`-i, --interactive`</td>
<td>Launch an interactive CoffeeScript session to try short snippets. Identical to calling `coffee` with no arguments.</td>
</tr>
<tr>
<td>`-o, --output [DIR]`</td>
<td>Write out all compiled JavaScript files into the specified directory. Use in conjunction with `--compile` or `--watch`.</td>
</tr>
<tr>
<td>`-w, --watch`</td>
<td>Watch files for changes, rerunning the specified command when any file is updated.</td>
</tr>
<tr>
<td>`-p, --print`</td>
<td>Instead of writing out the JavaScript as a file, print it directly to **stdout**.</td>
</tr>
<tr>
<td>`-s, --stdio`</td>
<td>Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT. Good for use with processes written in other languages. An example:<br>
`cat src/cake.coffee | coffee -sc`</td>
</tr>
<tr>
<td>`-l, --literate`</td>
<td>Parses the code as Literate CoffeeScript. You only need to specify this when passing in code directly over **stdio**, or using some sort of extension-less file name.</td>
</tr>
<tr>
<td>`-e, --eval`</td>
<td>Compile and print a little snippet of CoffeeScript directly from the command line. For example:<br>
`coffee -e "console.log num for num in [10..1]"`</td>
</tr>
<tr>
<td>`-r, --require [MODULE]`</td>
<td>`require()` the given module before starting the REPL or evaluating the code given with the `--eval` flag.</td>
</tr>
<tr>
<td>`-b, --bare`</td>
<td>Compile the JavaScript without the [top-level function safety wrapper](#lexical-scope).</td>
</tr>
<tr>
<td>`-t, --tokens`</td>
<td>Instead of parsing the CoffeeScript, just lex it, and print out the token stream:<br>
`[IDENTIFIER square] [= =] [PARAM_START (]` ...</td>
</tr>
<tr>
<td>`-n, --nodes`</td>
<td>Instead of compiling the CoffeeScript, just lex and parse it, and print out the parse tree:<br>
```
Block
Assign
Value IdentifierLiteral: square
Code
Param IdentifierLiteral: x
Block
Op *
Value IdentifierLiteral: x
Value IdentifierLiteral: x
```
</td>
</tr>
<tr>
<td>`--nodejs`</td>
<td>The `node` executable has some useful options you can set, such as<br>
`--debug`, `--debug-brk`, `--max-stack-size`, and `--expose-gc`. Use this flag to forward options directly to Node.js. To pass multiple flags, use `--nodejs` multiple times.</td>
</tr>
<tr>
<td>`--no-header`</td>
<td>Suppress the “Generated by CoffeeScript” header.</td>
</tr>
</tbody>
</table>
| Option | Description |
| --- | --- |
| `-c, --compile` | Compile a `.coffee` script into a `.js` JavaScript file of the same name. |
| `-m, --map` | Generate source maps alongside the compiled JavaScript files. Adds `sourceMappingURL` directives to the JavaScript as well. |
| `-M, --inline-map` | Just like `--map`, but include the source map directly in the compiled JavaScript files, rather than in a separate file. |
| `-i, --interactive` | Launch an interactive CoffeeScript session to try short snippets. Identical to calling `coffee` with no arguments. |
| `-o, --output [DIR]` | Write out all compiled JavaScript files into the specified directory. Use in conjunction with `--compile` or `--watch`. |
| `-w, --watch` | Watch files for changes, rerunning the specified command when any file is updated. |
| `-p, --print` | Instead of writing out the JavaScript as a file, print it directly to **stdout**. |
| `-s, --stdio` | Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT. Good for use with processes written in other languages. An example:<br>`cat src/cake.coffee | coffee -sc` |
| `-l, --literate` | Parses the code as Literate CoffeeScript. You only need to specify this when passing in code directly over **stdio**, or using some sort of extension-less file name. |
| `-e, --eval` | Compile and print a little snippet of CoffeeScript directly from the command line. For example:<br>`coffee -e "console.log num for num in [10..1]"` |
| `-r, --require [MODULE]`&emsp; | `require()` the given module before starting the REPL or evaluating the code given with the `--eval` flag. |
| `-b, --bare` | Compile the JavaScript without the [top-level function safety wrapper](#lexical-scope). |
| `-t, --tokens` | Instead of parsing the CoffeeScript, just lex it, and print out the token stream. Used for debugging the compiler. |
| `-n, --nodes` | Instead of compiling the CoffeeScript, just lex and parse it, and print out the parse tree. Used for debugging the compiler. |
| `--nodejs` | The `node` executable has some useful options you can set, such as `--debug`, `--debug-brk`, `--max-stack-size`, and `--expose-gc`. Use this flag to forward options directly to Node.js. To pass multiple flags, use `--nodejs` multiple times. |
| `--no-header` | Suppress the “Generated by CoffeeScript” header. |
### Examples:
@@ -169,3 +35,43 @@ Block
`coffee -o lib/ -cw src/`
* Start the CoffeeScript REPL (`Ctrl-D` to exit, `Ctrl-V`for multi-line):<br>
`coffee`
### ES2015+ Output
CoffeeScript 2 outputs the latest ES2015+ syntax. If youre looking for a single tool that takes CoffeeScript input and generates JavaScript output that runs in any JavaScript runtime, assuming you opt out of certain newer features, stick to [CoffeeScript 1.x](/v1/). CoffeeScript 2 [breaks compatibility](#breaking-changes) with certain CoffeeScript 1.x features in order to conform with the ES2015+ specifications, and generate more idiomatic output (a CoffeeScript `=>` becomes an ES `=>`; a CoffeeScript `class` becomes an ES `class`; and so on).
Since the CoffeeScript 2 compiler outputs ES2015+ syntax, it is your responsibility to either ensure that your target JavaScript runtime(s) support all these features, or that you pass the output through another transpiler like [Babel](http://babeljs.io/), [Rollup](https://github.com/rollup/rollup) or [Traceur Compiler](https://github.com/google/traceur-compiler). In general, [CoffeeScript 2s output is supported as is by Node.js 7.6+](http://node.green/), except for modules and JSX which require transpilation.
There are many great task runners for setting up JavaScript build chains, such as [Gulp](http://gulpjs.com/), [Webpack](https://webpack.github.io/), [Grunt](https://gruntjs.com/) and [Broccoli](http://broccolijs.com/). If youre looking for a very minimal solution to get started, you can use [babel-preset-env](https://babeljs.io/docs/plugins/preset-env/) and the command line:
```bash
npm install --global coffeescript@next
npm install --save-dev coffeescript@next babel-cli babel-preset-env
coffee --print *.coffee | babel --presets env > app.js
```
### Node.js
If youd like to use Node.js CommonJS to `require` CoffeeScript files, e.g. `require './app.coffee'`, you must first “register” CoffeeScript as an extension:
```coffee
require 'coffeescript/register'
App = require './app' # The .coffee extension is optional
```
If you want to use the compilers API, for example to make an app that compiles strings of CoffeeScript on the fly, you can `require` the full module:
```coffee
CoffeeScript = require 'coffeescript'
eval CoffeeScript.compile 'console.log "Mmmmm, I could really go for some #{Math.pi}"'
```
The `compile` method has the signature `compile(code, options)` where `code` is a string of CoffeeScript code, and the optional `options` is an object with some or all of the following properties:
* `options.sourceMap`, boolean: if true, a source map will be generated; and instead of returning a string, `compile` will return an object of the form `{js, v3SourceMap, sourceMap}`.
* `options.inlineMap`, boolean: if true, output the source map as a base64-encoded string in a comment at the bottom.
* `options.filename`, string: the filename to use for the source map.
* `options.bare`, boolean: if true, output without the [top-level function safety wrapper](#lexical-scope).
* `options.header`, boolean: if true, output the `Generated by CoffeeScript` header.

View File

@@ -39,6 +39,7 @@
<script type="text/coffeescript">
@testingBrowser = yes
@global = window
bold = red = green = reset = ''
stdout = document.getElementById 'stdout'
start = new Date
@currentFile = ''

View File

@@ -35,7 +35,7 @@
<a href="#source-maps">Source Maps</a>
<a href="#scripts">"text/coffeescript" Script Tags</a>
<a href="#resources">Books, Screencasts, Examples and Resources</a>
<a href="#changelog">Change Log</a>
<a href="#changelog">Changelog</a>
</div>
</div>
<div class="navigation try">
@@ -64,18 +64,18 @@
Annotated Source
</div>
<div class="contents menu">
<a href="v<%= majorVersion %>/annotated-source/grammar.html">Grammar Rules — src/grammar</a>
<a href="v<%= majorVersion %>/annotated-source/lexer.html">Lexing Tokens — src/lexer</a>
<a href="v<%= majorVersion %>/annotated-source/rewriter.html">The Rewriter — src/rewriter</a>
<a href="v<%= majorVersion %>/annotated-source/nodes.html">The Syntax Tree — src/nodes</a>
<a href="v<%= majorVersion %>/annotated-source/scope.html">Lexical Scope — src/scope</a>
<a href="v<%= majorVersion %>/annotated-source/helpers.html">Helpers &amp; Utility Functions — src/helpers</a>
<a href="v<%= majorVersion %>/annotated-source/coffeescript.html">The CoffeeScript Module — src/coffeescript</a>
<a href="v<%= majorVersion %>/annotated-source/cake.html">Cake &amp; Cakefiles — src/cake</a>
<a href="v<%= majorVersion %>/annotated-source/command.html">“coffee” Command-Line Utility — src/command</a>
<a href="v<%= majorVersion %>/annotated-source/optparse.html">Option Parsing — src/optparse</a>
<a href="v<%= majorVersion %>/annotated-source/repl.html">Interactive REPL — src/repl</a>
<a href="v<%= majorVersion %>/annotated-source/sourcemap.html">Source Maps — src/sourcemap</a>
<a href="/v<%= majorVersion %>/annotated-source/grammar.html">Grammar Rules — src/grammar</a>
<a href="/v<%= majorVersion %>/annotated-source/lexer.html">Lexing Tokens — src/lexer</a>
<a href="/v<%= majorVersion %>/annotated-source/rewriter.html">The Rewriter — src/rewriter</a>
<a href="/v<%= majorVersion %>/annotated-source/nodes.html">The Syntax Tree — src/nodes</a>
<a href="/v<%= majorVersion %>/annotated-source/scope.html">Lexical Scope — src/scope</a>
<a href="/v<%= majorVersion %>/annotated-source/helpers.html">Helpers &amp; Utility Functions — src/helpers</a>
<a href="/v<%= majorVersion %>/annotated-source/coffee-script.html">The CoffeeScript Module — src/coffee-script</a>
<a href="/v<%= majorVersion %>/annotated-source/cake.html">Cake &amp; Cakefiles — src/cake</a>
<a href="/v<%= majorVersion %>/annotated-source/command.html">“coffee” Command-Line Utility — src/command</a>
<a href="/v<%= majorVersion %>/annotated-source/optparse.html">Option Parsing — src/optparse</a>
<a href="/v<%= majorVersion %>/annotated-source/repl.html">Interactive REPL — src/repl</a>
<a href="/v<%= majorVersion %>/annotated-source/sourcemap.html">Source Maps — src/sourcemap</a>
</div>
</div>
</div>

View File

@@ -44,7 +44,6 @@ li {
}
table {
margin: 16px 0 0 13px; padding: 0;
width: 690px;
}
tr, td {
margin: 0; padding: 0;
@@ -53,6 +52,9 @@ table {
padding: 9px 15px 9px 0;
vertical-align: top;
}
th {
text-align: left;
}
table.definitions {
width: auto;
margin: 30px 0;
@@ -86,6 +88,9 @@ code, pre, pre > code, textarea {
padding: 3px 0 3px 12px;
font-size: 12px;
}
td code {
white-space: nowrap;
}
.timestamp {
font-size: 11px;
font-weight: normal;

View File

@@ -64,11 +64,8 @@
<section id="existential-operator">
<%= htmlFor('existential_operator') %>
</section>
<section id="classes">
<%= htmlFor('classes') %>
</section>
<section id="prototypal-inheritance">
<%= htmlFor('prototypal_inheritance') %>
<section id="chaining">
<%= htmlFor('chaining') %>
</section>
<section id="destructuring">
<%= htmlFor('destructuring') %>
@@ -76,6 +73,18 @@
<section id="fat-arrow">
<%= htmlFor('fat_arrow') %>
</section>
<section id="generators">
<%= htmlFor('generators') %>
</section>
<section id="async-functions">
<%= htmlFor('async_functions') %>
</section>
<section id="classes">
<%= htmlFor('classes') %>
</section>
<section id="prototypal-inheritance">
<%= htmlFor('prototypal_inheritance') %>
</section>
<section id="switch">
<%= htmlFor('switch') %>
</section>
@@ -97,9 +106,9 @@
<section id="embedded">
<%= htmlFor('embedded') %>
</section>
</section>
<section id="breaking-changes">
<%= htmlFor('breaking_changes') %>
<section id="jsx">
<%= htmlFor('jsx') %>
</section>
</section>
<section id="literate">
<%= htmlFor('literate') %>
@@ -130,6 +139,45 @@
<section id="annotated-source">
<%= htmlFor('annotated_source') %>
</section>
<section id="contributing">
<%= htmlFor('contributing') %>
</section>
</section>
<section id="unsupported">
<%= htmlFor('unsupported') %>
<section id="unsupported-let-const">
<%= htmlFor('unsupported_let_const') %>
</section>
<section id="unsupported-named-functions">
<%= htmlFor('unsupported_named_functions') %>
</section>
<section id="unsupported-get-set">
<%= htmlFor('unsupported_get_set') %>
</section>
</section>
<section id="breaking-changes">
<%= htmlFor('breaking_changes') %>
<section id="breaking-change-fat-arrow">
<%= htmlFor('breaking_change_fat_arrow') %>
</section>
<section id="breaking-changes-default-values">
<%= htmlFor('breaking_changes_default_values') %>
</section>
<section id="breaking-changes-bound-generator-functions">
<%= htmlFor('breaking_changes_bound_generator_functions') %>
</section>
<section id="breaking-changes-classes">
<%= htmlFor('breaking_changes_classes') %>
</section>
<section id="breaking-changes-super-extends">
<%= htmlFor('breaking_changes_super_extends') %>
</section>
<section id="breaking-changes-jsx-and-the-less-than-and-greater-than-operators">
<%= htmlFor('breaking_changes_jsx_and_the_less_than_and_greater_than_operators') %>
</section>
<section id="breaking-changes-literate-coffeescript">
<%= htmlFor('breaking_changes_literate_coffeescript') %>
</section>
</section>
<section id="changelog">
<%= htmlFor('changelog') %>

View File

@@ -13,17 +13,6 @@ $(document).ready ->
window.location = event.target.href
, 260 # Wait for the sidebar to slide away before navigating
# Try CoffeeScript
toggleTry = ->
$('#try, #try-link').toggleClass 'active'
closeTry = ->
$('#try, #try-link').removeClass 'active'
$('[data-toggle="try"]').click toggleTry
$('[data-close="try"]').click closeTry
# Initialize Scrollspy for sidebar navigation; http://v4-alpha.getbootstrap.com/components/scrollspy/
# See also http://www.codingeverything.com/2014/02/BootstrapDocsSideBar.html and http://jsfiddle.net/KyleMit/v6zhz/
$('body').scrollspy
@@ -60,6 +49,7 @@ $(document).ready ->
viewportMargin: Infinity
# Whenever the user edits the CoffeeScript side of a code example, update the JavaScript output
# If the editor is Try CoffeeScript, also update the hash and save this code in localStorage
if mode is 'coffeescript'
pending = null
editor.on 'change', (instance, change) ->
@@ -67,13 +57,38 @@ $(document).ready ->
pending = setTimeout ->
lastCompilationStartTime = Date.now()
try
output = CoffeeScript.compile editor.getValue(), bare: yes
coffee = editor.getValue()
if index is 0 and $('#try').hasClass('active') # If this is the editor in Try CoffeeScript and its still visible
# Update the hash with the current code
link = "try:#{encodeURIComponent coffee}"
window.history.pushState {}, 'CoffeeScript', "#{location.href.split('#')[0]}##{link}"
# Save this to the users localStorage
try
if window.localStorage?
window.localStorage.setItem 'tryCoffeeScriptCode', coffee
catch exception
output = CoffeeScript.compile coffee, bare: yes
lastCompilationElapsedTime = Math.max(200, Date.now() - lastCompilationStartTime)
catch exception
output = "#{exception}"
editors[index + 1].setValue output
, lastCompilationElapsedTime
# Fix the code editors handling of tab-indented code
editor.addKeyMap
'Tab': (cm) ->
if cm.somethingSelected()
cm.indentSelection 'add'
else if /^\t/m.test cm.getValue()
# If any lines start with a tab, treat this as tab-indented code
cm.execCommand 'insertTab'
else
cm.execCommand 'insertSoftTab'
'Shift-Tab': (cm) ->
cm.indentSelection 'subtract'
'Enter': (cm) ->
cm.options.indentWithTabs = /^\t/m.test cm.getValue()
cm.execCommand 'newlineAndIndent'
# Handle the code example buttons
$('[data-action="run-code-example"]').click ->
@@ -83,19 +98,31 @@ $(document).ready ->
js = "#{js}\nalert(#{unescape run});" unless run is yes
eval js
$('[data-action="link"]').click ->
index = $("##{$(@).data('example')}-coffee").data 'index'
coffee = editors[index].getValue()
link = "try:#{encodeURIComponent coffee}"
window.history.pushState {}, 'CoffeeScript', "#{location.href.split('#')[0]}##{link}"
# Try CoffeeScript
toggleTry = (checkLocalStorage = no) ->
if checkLocalStorage and window.localStorage?
try
coffee = window.localStorage.getItem 'tryCoffeeScriptCode'
if coffee?
editors[0].setValue coffee
catch exception
$('#try, #try-link').toggleClass 'active'
closeTry = ->
$('#try, #try-link').removeClass 'active'
$('[data-toggle="try"]').click toggleTry
$('[data-close="try"]').click closeTry
# Configure the initial state
if window.location.hash?
if window.location.hash is '#try'
toggleTry()
toggleTry yes
else if window.location.hash.indexOf('#try') is 0
editors[0].setValue decodeURIComponent window.location.hash[5..]
toggleTry()
else
initializeScrollspyFromHash window.location.hash
# Initializing the code editors mightve thrown off our vertical scroll position
document.getElementById(window.location.hash.slice(1)).scrollIntoView()

View File

@@ -282,6 +282,10 @@ p, blockquote, table, .code-example {
margin-bottom: 1.3rem;
}
td code {
white-space: nowrap;
}
h2, h3 {
margin-top: 1.3em;
margin-bottom: 0.6em;

View File

@@ -34,7 +34,7 @@
<a href="#conditionals" class="nav-link" data-action="sidebar-nav">If, Else, Unless, and Conditional Assignment</a>
</li>
<li class="nav-item">
<a href="#splats" class="nav-link" data-action="sidebar-nav">Splats</a>
<a href="#splats" class="nav-link" data-action="sidebar-nav">Splats, or Rest Parameters/Spread Syntax</a>
</li>
<li class="nav-item">
<a href="#loops" class="nav-link" data-action="sidebar-nav">Loops and Comprehensions</a>
@@ -51,18 +51,27 @@
<li class="nav-item">
<a href="#existential-operator" class="nav-link" data-action="sidebar-nav">Existential Operator</a>
</li>
<li class="nav-item">
<a href="#destructuring" class="nav-link" data-action="sidebar-nav">Destructuring Assignment</a>
</li>
<li class="nav-item">
<a href="#chaining" class="nav-link" data-action="sidebar-nav">Chaining Function Calls</a>
</li>
<li class="nav-item">
<a href="#fat-arrow" class="nav-link" data-action="sidebar-nav">Bound (Fat Arrow) Functions</a>
</li>
<li class="nav-item">
<a href="#generators" class="nav-link" data-action="sidebar-nav">Generator Functions</a>
</li>
<li class="nav-item">
<a href="#async-functions" class="nav-link" data-action="sidebar-nav">Async Functions</a>
</li>
<li class="nav-item">
<a href="#classes" class="nav-link" data-action="sidebar-nav">Classes</a>
</li>
<li class="nav-item">
<a href="#prototypal-inheritance" class="nav-link" data-action="sidebar-nav">Prototypal Inheritance</a>
</li>
<li class="nav-item">
<a href="#destructuring" class="nav-link" data-action="sidebar-nav">Destructuring Assignment</a>
</li>
<li class="nav-item">
<a href="#fat-arrow" class="nav-link" data-action="sidebar-nav">Function Modifiers</a>
</li>
<li class="nav-item">
<a href="#switch" class="nav-link" data-action="sidebar-nav">Switch and Try/Catch</a>
</li>
@@ -81,11 +90,11 @@
<li class="nav-item">
<a href="#embedded" class="nav-link" data-action="sidebar-nav">Embedded JavaScript</a>
</li>
<li class="nav-item">
<a href="#jsx" class="nav-link" data-action="sidebar-nav">JSX</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#breaking-changes" class="nav-link" data-action="sidebar-nav">Breaking Changes From 1.x</a>
</li>
<li class="nav-item">
<a href="#literate" class="nav-link" data-action="sidebar-nav">Literate CoffeeScript</a>
</li>
@@ -119,10 +128,56 @@
<li class="nav-item">
<a href="#annotated-source" class="nav-link" data-action="sidebar-nav">Annotated Source</a>
</li>
<li class="nav-item">
<a href="#contributing" class="nav-link" data-action="sidebar-nav">Contributing</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#changelog" class="nav-link" data-action="sidebar-nav">Change Log</a>
<a href="#unsupported" class="nav-link" data-action="sidebar-nav">Unsupported ECMAScript Features</a>
<ul class="nav">
<li class="nav-item">
<a href="#unsupported-let-const" class="nav-link" data-action="sidebar-nav"><code>let</code> and <code>const</code></a>
</li>
<li class="nav-item">
<a href="#unsupported-named-functions" class="nav-link" data-action="sidebar-nav">Named Functions and Function Declarations</a>
</li>
<li class="nav-item">
<a href="#unsupported-get-set" class="nav-link" data-action="sidebar-nav"><code>get</code> and <code>set</code> Shorthand Syntax</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#breaking-changes" class="nav-link" data-action="sidebar-nav">Breaking Changes From 1.x</a>
<ul class="nav">
<li class="nav-item">
<a href="#breaking-change-fat-arrow" class="nav-link" data-action="sidebar-nav">Bound (Fat Arrow) Functions</a>
</li>
<li class="nav-item">
<a href="#breaking-changes-default-values" class="nav-link" data-action="sidebar-nav">Default Values</a>
</li>
<li class="nav-item">
<a href="#breaking-changes-bound-generator-functions" class="nav-link" data-action="sidebar-nav">Bound Generator Functions</a>
</li>
<li class="nav-item">
<a href="#breaking-changes-classes" class="nav-link" data-action="sidebar-nav">Classes</a>
</li>
<li class="nav-item">
<a href="#breaking-changes-super-extends" class="nav-link" data-action="sidebar-nav"><code>super</code> and <code>extends</code></a>
</li>
<li class="nav-item">
<a href="#breaking-changes-jsx-and-the-less-than-and-greater-than-operators" class="nav-link" data-action="sidebar-nav">JSX and the <code>&lt;</code> and <code>&gt;</code> Operators</a>
</li>
<li class="nav-item">
<a href="#breaking-changes-literate-coffeescript" class="nav-link" data-action="sidebar-nav">Literate CoffeeScript Parsing</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#changelog" class="nav-link" data-action="sidebar-nav">Changelog</a>
</li>
<li class="nav-item">
<a href="/v1/" class="nav-link" data-action="sidebar-nav">Version 1.x Documentation</a>
</li>
</ul>
</nav>

View File

@@ -1,6 +1,6 @@
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi" crossorigin="anonymous">
<!-- The CoffeeScript logo font is Googles Galada -->
<link href="https://fonts.googleapis.com/css?family=Alegreya+Sans:400,800|Lato:300,300i,400,700|Roboto+Mono:400" rel="stylesheet" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Alegreya+Sans:400,800|Lato:300,300i,400,700|Roboto+Mono:400,400i" rel="stylesheet" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/codemirror/4.5.0/codemirror.css" crossorigin="anonymous">
<style>
<%= include('docs.css') %>

View File

@@ -10,7 +10,6 @@
<div class="row">
<div class="col-xs-12 text-xs-right try-buttons">
<button type="button" class="btn btn-primary" data-action="run-code-example" data-example="try-coffeescript" data-run="true"></button>&emsp;
<button type="button" class="btn btn-primary" data-action="link" data-example="try-coffeescript"><%= include('documentation/images/link.svg') %></button>
</div>
</div>
</aside>

Some files were not shown because too many files have changed in this diff Show More