Compare commits

...

115 Commits

Author SHA1 Message Date
Geoffrey Booth
df9d4a2343 [CS2] 2.0.0-beta5 (#4682)
* Upgrade docs to Bootstrap 4 beta, including refactoring styles; upgrade docs jQuery and CodeMirror

* Better style the docs for mobile, including Try CoffeeScript

* Fix #4642, erroneous statement about named functions

* Update packages

* 2.0.0-beta5
2017-09-02 12:48:38 -07:00
Geoffrey Booth
9e043bbae7 [CS2] Fix async tests (#4680)
* Get `coffee` command working again in Node 6, by converting the ‘await’ wrapper in the REPL to use a Promise instead of the ‘await’ keyword; add tests for REPL ‘await’ wrapper, including test to skip async tests if the runtime doesn’t support them

* Fix async tests: now if a test function is a Promise (which an `await` function is), we add it to an array of async test functions and wait for them all to resolve before finishing the test run, so that if any async tests fail we see those failures in the output

* Code review

* Unnecessary

* Let's support Node 6+ if we can

* Simplify the returned promise

* Simplify async check
2017-09-01 12:26:47 -07:00
Geoffrey Booth
671486989f [CS2] Don’t require async/await support to run coffee (#4679)
* Get `coffee` command working again in Node 6, by converting the ‘await’ wrapper in the REPL to use a Promise instead of the ‘await’ keyword; add tests for REPL ‘await’ wrapper, including test to skip async tests if the runtime doesn’t support them

* Code review

* Let's support Node 6+ if we can
2017-09-01 12:19:15 -07:00
Geoffrey Booth
4a4f752204 Fix #3098: Suppressed newline should be unsuppressed by semicolon (#4669) 2017-09-01 07:09:36 -07:00
Julian Rosse
b20e52da99 [CS2] use _extends utility instead of Object.assign() for object spreads (#4675)
* _extends utility instead of Object.assign()

* eqJS test for _extends

* Test that a user-defined function named `_extends` doesn’t conflict with our utility function

* IE8 polyfill note in docs
2017-09-01 07:09:16 -07:00
Chris Connelly
5525b2ba01 Merge pull request #4652 from GeoffreyBooth/bug-fix-4651
[CS2] Fix #4651: object spread destructuring bug
2017-09-01 13:10:49 +01:00
Geoffrey Booth
fe5ff39ca2 [CS2] Fix v3 source map (#4671)
* Per discussion in #3075: if `sourceFiles` is unspecified, but `filename` is, use `filename`; output null instead of an empty string for `sources` or `sourceRoot`

* Update source map tests to reflect that now we return null instead of empty strings; check generated sources array

* Update source map documentation; still leave more obscure options undocumented

* Follow the TypeScript compiler’s example regarding v3SourceMap, but output empty strings instead of made-up filenames

* Have `sources` default to ‘<anonymous>’
2017-09-01 01:06:45 -07:00
Geoffrey Booth
906bedf93a Fix #1768: Ignore space after :: (#4670) 2017-08-30 22:43:17 -07:00
Julian Rosse
6f961a20dd [CS2] Refine #4666: add parens to chained do IIFE with params (#4672)
* add parens to chained do iife [Fixes #3736]

* remove debug code

* fixes from code review

* handle iife with params

* add test w/ destructured param from code review
2017-08-30 22:42:50 -07:00
Julian Rosse
e54b8a1009 [CS2] add parens to chained do IIFE (#4666)
* add parens to chained do iife [Fixes #3736]

* remove debug code

* fixes from code review
2017-08-29 14:17:56 -07:00
Geoffrey Booth
d7d69a4a18 Fix #4576: Allow accessing a property of a function literal (like .call) via chaining syntax (#4665) 2017-08-28 13:16:22 -07:00
Geoffrey Booth
eb38dba5d6 Only unescape newlines for CSX; updated compiled output 2017-08-27 21:37:21 -07:00
Geoffrey Booth
9ff82fe17b Fix #4589: Unquote all interpolated strings, not just CSX ones, so that quotation marks are not unnecessarily escaped in backtick-delimited strings/template literals (#4660) 2017-08-27 15:16:31 -07:00
zdenko
5713b7eb6c [CS2] Fix #4260 and #1349: Splat error with soak properties or expressions (#4644)
* fix splat error with soak properties or expressions

* Add test based on #4260

* Add test based on #1349

* tests for the leading splat variant

* test for spaced prefix ...

* fixed 'if' statement in parens

* fixed replacing 'void 0' with '[]'

* remove 'void 0' replacement; add Splat::compileNode

* Use LEVEL_OP; follow style better
2017-08-27 15:11:14 -07:00
Geoffrey Booth
7c627f9dfd [CS2] Fix #3709, #3789: ‘throw’ an ‘if’, ‘for’, ‘switch’, ‘while’ (#4664)
* Fix #3709: throwing an if, for, switch or while should throw the returned value of the statement/loop

* Fix #3789: don’t throw a throw (unless it’s in a closure)

* LEVEL_LIST works better than a list of node types
2017-08-25 11:11:10 -07:00
Geoffrey Booth
c81e2d4767 Fix #4575: Check for the previous token’s existence before comparing against it (#4663) 2017-08-24 00:05:26 -07:00
Geoffrey Booth
3dd458267b [CS2] Fix #2870: Allow specifying output filename (#4661)
* Fix #2870: If --output ends with a filename, and the input is a file and not a path, save as the desired filename

* If an output path ends in a slash, force saving into an output folder even if that folder name would contain a period (e.g. /scripts.js/); if output filename is only periods, treat it as a path

* Restrict exceptions
2017-08-24 00:03:57 -07:00
Geoffrey Booth
892c4699dd Fix #4578: Never look back past the start of the token stream (#4662) 2017-08-24 00:02:57 -07:00
Geoffrey Booth
40c351135a [CS2] Fix #4629: interpolations (whether in strings or CSX tags) with only comments (#4659)
* Fix #4629: interpolations (whether in strings or CSX tags) that contain nothing but comments should not be optimized out

* Template literals need an expression inside their interpolations, so if we only have a comment to put in there, toss in an empty string as well
2017-08-23 23:34:59 -07:00
Geoffrey Booth
a3b08e1bef [CS2] Fix #4209: --require for filenames that are invalid identifiers (#4658)
* When using --require, check that the variable we’re creating from the required file/module is a valid identifier name before assigning to it; fixes #4209

* We don’t need no stinkin’ regex
2017-08-23 06:51:14 -07:00
Geoffrey Booth
44a27c6204 Fix #4558: Stack trace line numbers for scripts that compile CoffeeScript (#4645)
* Don't throw an error in the console when loading a try: URL

* Handle the possibility of compiling multiple scripts with the same filename, or multiple anonymous scripts

* Fix #4558: Much more robust caching of sources and source maps, more careful lookup of source maps especially for CoffeeScript code compiled within a Coffee script (. . . within a Coffee script, etc.)

* Reimplement `cake release` to just use the shell to avoid the issues plaguing that command (something to do with module caching perhaps)
2017-08-23 06:50:46 -07:00
Zdenko Vujasinovic
c212e6e9ab refactor 2017-08-22 21:19:56 +02:00
Zdenko Vujasinovic
5a709ed4a8 improve variable declaration 2017-08-22 10:48:12 +02:00
Zdenko Vujasinovic
2491d3286d fix assign in nested properties
fix assign in nested properties
2017-08-21 21:16:28 +02:00
Julian Rosse
1a6477adec resolve merge conflicts 2017-08-21 10:39:46 -04:00
Julian Rosse
2149c3561b ensure Value; breaking test for {a={b...}} = c 2017-08-21 10:34:33 -04:00
Zdenko Vujasinovic
232041db2a fixed issue with nested properties 2017-08-21 16:22:17 +02:00
Ben Drechsel
4623bf5bba Docs: Define functions used in loop examples (#4653)
* Cherrypick changes from messy branch

* Reorder function defs
2017-08-18 17:15:52 -07:00
Zdenko Vujasinovic
2664c2c108 small fix 2017-08-18 08:51:11 +02:00
Zdenko Vujasinovic
f9367bacf1 fix object spread destructuring bug: #4651 2017-08-18 04:06:37 +02:00
zdenko
aef54aeaf7 [CS2] Fix #4631: Expansion that becomes rest parameter causes runtime error (#4634)
* expansion-rest bug fix

* tests; improved implicit call recognition with dots on the left in the `rewriter`

* whitespace cleanup

* more tests
2017-08-17 13:13:52 -07:00
Chris Connelly
eff160eeb7 Merge pull request #4640 from GeoffreyBooth/generated-variables-in-function-parameters
[CS2] Fix #4413: Generated variables in function parameters
2017-08-15 14:19:21 +01:00
Geoffrey Booth
911c21f7be Update test to prove that there's no collision in generated variables 2017-08-14 03:06:38 +00:00
Geoffrey Booth
52795587ec If compiling a function parameter creates any generated variables (e.g. ref), shift the declarations for those variables into the parent scope; fixes #4413 2017-08-14 03:00:01 +00:00
Geoffrey Booth
3a6ffa6a85 Clean up function parameter compilation to get name for scope 2017-08-14 02:42:01 +00:00
Geoffrey Booth
ae7f97b639 2.0.0-beta4 (#4628)
* 2.0.0-beta4 changelog

* Recompile parser, update browser compiler

* Updated annotated source and browser tests

* Bump version to 2.0.0-beta4
2017-08-03 18:11:19 -07:00
Julian Rosse
2653b3bbf9 Refine sameLine implicit object tagging [Fixes #4568] (#4598) 2017-08-02 22:31:51 -07:00
Michal Brašna
64c790f299 [CS2] CLI: Propagate SIGINT and SIGTERM signals when node is forked (#4625)
* Propagate SIGINT and SIGTERM signals when node is forked

* Use for loop for consistency
2017-08-02 22:20:23 -07:00
zdenko
cbf035fca9 [CS2] CSX spread attributes: <div {props…} /> (#4607)
* CSX spread attributes: <div {props...} />

* whitespace cleanup

* Style

* valid CSX attributes

* added comments; cleanup

* Fixed allowed CSX properties.

* Cleanup

* Typo

* Improved RegEx

* Reworked CSX attributes

* small fix for CSX attribute validation

* cleanup

* tests

* fix nested assignement; remove unused variable

* cleanup; improve tests

* fix esoteric case; improve tracking nested splats in CSX tag
2017-08-02 21:00:39 -07:00
zdenko
a118ec7cc9 [CS2] fix for “do super in constructor” bug (#4627)
* bug fix 'do super' in constructor

* improve regex
2017-08-02 19:41:01 -07:00
Geoffrey Booth
6d21dc5495 [CS2] Comments (#4572)
* Make `addLocationDataFn` more DRY

* Style fixes

* Provide access to full parser inside our custom function running in parser.js; rename the function to lay the groundwork for adding data aside from location data

* Fix style.

* Fix style.

* Label test comments

* Update grammar to remove comment tokens; update DSL to call new helper function that preserves comments through parsing

* New implementation of compiling block comments: the lexer pulls them out of the token stream, attaching them as a property to a token; the rewriter moves the attachment around so it lives on a token that is destined to make it through to compilation (and in a good placement); and the nodes render the block comment. All tests but one pass (commented out).

* If a comment follows a class declaration, move the comment inside the class body

* Style

* Improve indentation of multiline comments

* Fix indentation for block comments, at least in the cases covered by the one failing test

* Don’t reverse the order of unshifted comments

* Simplify rewriter’s handling of comments, generalizing the special case

* Expand the list of tokens we need to avoid for passing comments through the parser; get some literal tokens to have nodes created for them so that the comments pass through

* Improve comments; fix multiline flag

* Prepare HereComments for processing line comments

* Line comments, first draft: the tests pass, but the line comments aren’t indented and sometimes trail previous lines when they shouldn’t; updated compiler output in following commit

* Updated compiler, now with line comments

* `process` doesn’t exist in the browser, so we should check for its existence first

* Update parser output

* Test that proves #4290 is fixed

* Indent line comments, first pass

* Compiled output with indented line comments

* Comments that start a new line shouldn’t trail; don’t skip comments attached to generated tokens; stop looking for indentation once we hit a newline

* Revised output

* Cleanup

* Split “multiline” line comment tokens, shifting them forward or back as appropriate

* Fix comments in module specifiers

* Abstract attaching comments to a node

* Line comments in interpolated strings

* Line comments can’t be multiline anymore

* Improve handling of blank lines and indentation of following comments that start a new line (i.e. don’t trail)

* Make comments compilation more object-oriented

* Remove lots of dead code that we don’t need anymore because a comment is never a node, only a fragment

* Improve eqJS helper

* Fix #4290 definitively, with improved output for arrays with interspersed block comments

* Add support for line comments output interspersed within arrays

* Fix mistake, don’t lose the variable we’re working on

* Remove redundant replacements

* Check for indentation only from the start of the string

* Indentations in generated JS are always multiples of two spaces (never tabs) so just look for 2+ spaces

* Update package versions; run Babel twice, once for each preset, temporarily until a Babili bug is fixed that prevents it from running with the env preset

* Don’t rely on `fragment.type`, which can break when the compiler is minified

* Updated generated docs and browser compiler

* Output block comments after function arguments

* Comments appear above scope `var` declarations; better tracking of generated `JS` tokens created only to shepherd comments through to the output

* Create new FuncGlyph node, to hold comments we want to output near the function parameters

* Block comments between `)` and `->`/`=>` get output between `)` and `{`.

* Fix indentation of comments that are the first line inside a bare mode block

* Updated output

* Full Flow example

* Updated browser compiler

* Abstract and organize comment fragment generation code; store more properties on the comment fragment objects; make `throw` behave like `return`

* Abstract token insertion code

* Add missing locationData to STRING_START token, giving it the locationData of the overall StringWithInterpolations token so that comments attached to STRING_START end up on the StringWithInterpolations node

* Allow `SUPER` tokens to carry comments

* Rescue comments from `Existence` nodes and `If` nodes’ conditions

* Rescue comments after `\` line continuation tokens

* Updated compiled output

* Updated browser compiler

* Output block comments in the same `compileFragments` method as line comments, except for inline block comments

* Comments before splice

* Updated browser compiler

* Track compiledComments as a property of Base, to ensure that it’s not a global variable

* Docs: split up the Usage section

* Docs for type annotations via Flow; updated docs output

* Update regular comments documentation

* Updated browser compiler

* Comments before soak

* Comments before static methods, and probably before `@variable =` (this) assignments generally

* Comments before ‘if exists?’, refactor comment before ‘if this.var’ to be more precise, improve helper methods

* Comments before a method that contains ‘super()’ should output above the method property, not above the ‘super.method()’ call

* Fix missing comments before `if not` (i.e. before a UNARY token)

* Fix comments before ‘for’; add test for comment before assignment if (fixed in earlier commit)

* Comments within heregexes

* Updated browser compiler

* Update description to reflect what’s now happening in compileCommentFragments

* Preserve blank lines between line comments; output “whitespace-only” line comments as blank lines, rather than `//` following by whitespace

* Better future-proof comments tests

* Comments before object destructuring; abstract method for setting comments aside before compilation

* Handle more cases of comments before or after `for` loop declaration lines

* Fix indentation of comments preceding `for` loops

* Fix comment before splat function parameter

* Catch another RegexWithInterpolations comment edge case

* Updated browser compiler

* Change heregex example to one that’s more readable; update output

* Remove a few last references to the defunct HERECOMMENT token

* Abstract location hash creation into a function

* Improved clarity per code review notes

* Updated browser compiler
2017-08-02 19:34:34 -07:00
Chris Connelly
6c9cf37811 [CS2] Support await in REPL without wrapper function (#4604)
* Support `await` in REPL without wrapper function

Rather than compiling top-level await expressions directly, which will
always throw a syntax error, the REPL wrapper will now wrap them in a
closure and handle the returned promise before calling back to the REPL.

Fixes #4603.

* Cancel REPL callback after a SIGINT during an awaited evaluation

This change allows users to 'cancel' awaited expressions that they don't
want to see the result of. Ultimately, this *does not* prevent the
expression from completing (e.g. for `await fetch(url)`, `url` will
still be downloaded, but the user won't have to wait for it to finish
and the result won't be printed).
2017-07-24 12:47:14 -07:00
zdenko
557351156e [CS2] Fix object spread nested properties (#4611)
* fix for object spread nested properties: obj2 = {obj.c..., obj["b"]["c"]..., d: 55}

* tests
2017-07-22 17:44:35 -07:00
Danny McClanahan
4e57ca6833 [CS2] Add #! support for executable scripts on Linux. (#3946)
* Add #! support for executable scripts on Linux.

Pass arguments to executable script unchanged if using "#!/usr/bin/env
coffee". (Previously, "./test.coffee -abck" would be turned into "-a -b -c -k",
for example.)

Fixes #1752.

* refactor option parsing

clean up parsing code and in the process fix oustanding bug where coffeescript
modified arguments meant for an executable script

* address comments

* intermediate save

* add note saying where OptionParser is used in coffee command

* add some more work

* fix flatten functions

* refactor tests

* make argument processing less confusing

* add basic test

* remove unused file

* compilation now hangs

* remove unnecessary changes

* add tests!!!

* add/fix some tests

* clarify a test

* fix helpers

* fix opt parsing

* fix infinite loop

* make rule building easier to read

* add tests for flag overlap

* revamp argument parsing again and add more thorough testing

* add tests, comment, clean unused method

* address review comments

* add test for direct invocation of shebang scripts

* move shebang parsing test to separate file and check for browser

* remove TODO

* example backwards compatible warnings

* add correct tests for warning 1

* add tests for warnings

* commit output js libs and update docs

* respond to review comments

also add tests for help text

* respond to review comments

* fix example output

* Rewrite argument parsing documentation to be more concise; add it to sidebar and body; add new output

* Don’t mention deprecated syntax; clean up variable names
2017-07-19 16:25:06 -07:00
Geoffrey Booth
d287a798cc 1.12.7 docs 2017-07-17 00:25:02 -07:00
Geoffrey Booth
27f21a34e2 1.12.7 (#4617)
* 1.12.7: Update changelog and version number

* Update dependencies

* Improve formatting

* Updated output

* Disable regex Unicode test for runtimes lacking support. Fixes #4610.

* More better

* Bump date
2017-07-16 23:53:22 -07:00
Julian Rosse
852c5786ee [CS2]: Fix #4591: multiple accesses after super (#4592)
* support multiple accesses after super [Fixes #4591]

* addtl tests from code review
2017-07-13 13:15:18 -07:00
Julian Rosse
799bc6e81c Restrict indented return arg to object (#4605)
* throw multiline implicit object [Fixes #3199]

* only return

* fix from code review

* test error on non-object

* test error on call indented non-object

* unique test names
2017-07-09 10:29:47 -07:00
Julian Rosse
50674cb351 [CS2] Fix #3199: throw multiline implicit object (#4599)
* throw multiline implicit object [Fixes #3199]

* restrict to Object

* test error on non-object

* test error on call indented non-object
2017-07-09 10:28:50 -07:00
zdenko
3be9038028 Spread syntax triple dots on either right or left (#4606)
* Spread dots on both sides: {a:1, ...obj1, obj2...},  [a..., ...b], f ...a, b...

* Optimization
2017-07-08 22:32:02 -07:00
zdenko
35eb58fae8 fix #4577; renamed destructured parameters with same default value (#4596) 2017-07-05 19:04:52 -07:00
Julian Rosse
ab52fd75c2 [CS2] Fix #4467: tagged template literal call (#4601)
* working on making Invocation a grammar Value

* cleanup

* update location when adding value properties

* test for #4467

* more location data tests
2017-07-05 13:58:36 -07:00
Julian Rosse
e4bf1631e1 refine sameLine implicit object tagging [Fixes #4568] (#4598) 2017-07-04 11:31:51 -07:00
Wesley Moore
56725ad275 [CS2] Fix a couple of typos (#4602) 2017-07-03 22:10:03 -07:00
Julian Rosse
8ea7edf02a merge master (#4597) 2017-07-03 20:52:49 -07:00
Geoffrey Booth
9d82bf74f3 Add more features to the list of reasons to check out CoffeeScript 2 2017-06-30 10:56:34 -07:00
Geoffrey Booth
ebe8493020 Update v2 docs for 2.0.0-beta3 2017-06-30 10:52:11 -07:00
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
Simon Lydell
b1b34d328a Merge pull request #4585 from helixbass/iss4283_error_message_implicit_call
Fix #4283: error message for implicit call
2017-06-26 07:22:34 +02:00
Julian Rosse
8234ce2712 error message for implicit call [Fixes #4283] 2017-06-25 13:39:45 -05: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
181 changed files with 27832 additions and 15568 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`.

156
Cakefile
View File

@@ -1,4 +1,5 @@
fs = require 'fs'
os = require 'os'
path = require 'path'
_ = require 'underscore'
{ spawn, exec, execSync } = require 'child_process'
@@ -6,12 +7,13 @@ CoffeeScript = require './lib/coffeescript'
helpers = require './lib/coffeescript/helpers'
# ANSI Terminal Colors.
bold = red = green = reset = ''
bold = red = green = yellow = reset = ''
unless process.env.NODE_DISABLE_COLORS
bold = '\x1B[0;1m'
red = '\x1B[0;31m'
green = '\x1B[0;32m'
reset = '\x1B[0m'
bold = '\x1B[0;1m'
red = '\x1B[0;31m'
green = '\x1B[0;32m'
yellow = '\x1B[0;33m'
reset = '\x1B[0m'
# Built file header.
header = """
@@ -51,14 +53,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 +112,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: 'markdown-it', src: 'dist/markdown-it.min.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 +131,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 +141,30 @@ 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'
babelOptions =
presets: presets
sourceType: 'script'
{ code } = babel.transform code, babelOptions unless presets.length is 0
# Running Babel twice due to https://github.com/babel/babili/issues/614.
# Once that issue is fixed, move the `babili` preset back up into the
# `presets` array and run Babel once with both presets together.
presets = if process.env.MINIFY is 'false' then [] else ['babili']
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'
@@ -338,11 +341,15 @@ 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 'doc:site'
invoke 'doc:test'
invoke 'doc:source'
execSync '''
cake build:full
cake build:browser
cake test:browser
cake test:integrations
cake doc:site
cake doc:test
cake doc:source''', stdio: 'inherit'
task 'bench', 'quick benchmark of compilation time', ->
{Rewriter} = require './lib/coffeescript/rewriter'
@@ -368,8 +375,7 @@ task 'bench', 'quick benchmark of compilation time', ->
# Run the CoffeeScript test suite.
runTests = (CoffeeScript) ->
CoffeeScript.register()
startTime = Date.now()
CoffeeScript.register() unless global.testingBrowser
# These are attached to `global` so that theyre accessible from within
# `test/async.coffee`, which has an async-capable version of
@@ -382,20 +388,42 @@ runTests = (CoffeeScript) ->
# Convenience aliases.
global.CoffeeScript = CoffeeScript
global.Repl = require './lib/coffeescript/repl'
global.Repl = require './lib/coffeescript/repl'
global.bold = bold
global.red = red
global.green = green
global.yellow = yellow
global.reset = reset
asyncTests = []
onFail = (description, fn, err) ->
failures.push
filename: global.currentFile
error: err
description: description
source: fn.toString() if fn.toString?
# Our test helper function for delimiting different test cases.
global.test = (description, fn) ->
try
fn.test = {description, currentFile}
fn.call(fn)
++passedTests
catch e
failures.push
filename: currentFile
error: e
description: description if description?
source: fn.toString() if fn.toString?
result = fn.call(fn)
if result instanceof Promise # An async test.
asyncTests.push result
result.then ->
passedTests++
.catch (err) ->
onFail description, fn, err
else
passedTests++
catch err
onFail description, fn, err
global.supportsAsync = try
new Function('async () => {}')()
yes
catch
no
helpers.extend global, require './test/support/helpers'
@@ -416,7 +444,10 @@ runTests = (CoffeeScript) ->
# Run every test in the `test` folder, recording failures.
files = fs.readdirSync 'test'
unless global.supportsAsync # Except for async tests, if async isnt supported.
files = files.filter (filename) -> filename isnt 'async.coffee'
startTime = Date.now()
for file in files when helpers.isCoffee file
literate = helpers.isLiterate file
currentFile = filename = path.join 'test', file
@@ -425,11 +456,13 @@ runTests = (CoffeeScript) ->
CoffeeScript.run code.toString(), {filename, literate}
catch error
failures.push {filename, error}
return !failures.length
Promise.all(asyncTests).then ->
Promise.reject() if failures.length isnt 0
task 'test', 'run the CoffeeScript language test suite', ->
runTests CoffeeScript
runTests(CoffeeScript).catch -> process.exit 1
task 'test:browser', 'run the test suite against the merged browser script', ->
@@ -437,4 +470,31 @@ task 'test:browser', 'run the test suite against the merged browser script', ->
result = {}
global.testingBrowser = yes
(-> eval source).call result
runTests result.CoffeeScript
runTests(CoffeeScript).catch -> process.exit 1
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,7 +22,7 @@ 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 coffeescript
@@ -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>
@@ -575,6 +575,7 @@ the ordinary <strong>Assign</strong> is that these allow numbers and strings as
<div class="content"><div class='highlight'><pre> Return: [
o <span class="hljs-string">'RETURN Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Return $<span class="hljs-number">2</span>
o <span class="hljs-string">'RETURN INDENT Object OUTDENT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Return <span class="hljs-keyword">new</span> Value $<span class="hljs-number">3</span>
o <span class="hljs-string">'RETURN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Return
]

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>
@@ -566,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)
@@ -685,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
@@ -1262,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>
@@ -1554,15 +1555,22 @@ not specified, the length of <code>value</code> will be used.</p>
<div class="content"><div class='highlight'><pre> unfinished: <span class="hljs-function">-&gt;</span>
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>]
@tag() <span class="hljs-keyword">in</span> UNFINISHED
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>
@@ -1573,6 +1581,48 @@ 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>surrogate pair</p>
</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>
<li id="section-60">
<div class="annotation">
<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>
@@ -1585,13 +1635,13 @@ not specified, the length of <code>value</code> will be used.</p>
STRING_INVALID_ESCAPE
match = invalidEscapeRegex.exec str
<span class="hljs-keyword">return</span> <span class="hljs-keyword">unless</span> match
[[], before, octal, hex, unicode] = 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> unicode}</span>"</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>
@@ -1599,11 +1649,11 @@ not specified, the length of <code>value</code> will be used.</p>
</li>
<li id="section-60">
<li id="section-62">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-60">&#182;</a>
<a class="pilcrow" href="#section-62">&#182;</a>
</div>
<p>Constructs a string or regex by escaping certain characters.</p>
@@ -1623,11 +1673,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>
@@ -1646,11 +1696,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>
@@ -1669,11 +1719,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>
@@ -1682,11 +1732,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>
@@ -1707,11 +1757,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>
@@ -1726,11 +1776,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>
@@ -1743,11 +1793,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>
@@ -1758,11 +1808,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>
@@ -1774,11 +1824,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>
@@ -1792,11 +1842,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>
@@ -1805,11 +1855,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>
@@ -1817,11 +1867,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>
@@ -1839,11 +1889,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>
@@ -1871,11 +1921,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,
@@ -1894,11 +1944,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>
@@ -1910,11 +1960,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>
@@ -1925,11 +1975,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>
@@ -1972,11 +2022,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>
@@ -1999,11 +2049,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>
@@ -2020,7 +2070,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>
@@ -2037,11 +2087,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>
@@ -2056,7 +2106,8 @@ STRING_INVALID_ESCAPE = <span class="hljs-regexp">///
\\ (
?: (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">///
@@ -2064,10 +2115,17 @@ REGEX_INVALID_ESCAPE = <span class="hljs-regexp">///
\\ (
?: (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]{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>
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>
@@ -2076,11 +2134,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>
@@ -2094,11 +2152,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>
@@ -2111,11 +2169,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>
@@ -2126,11 +2184,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>
@@ -2141,11 +2199,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>
@@ -2156,11 +2214,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>
@@ -2171,11 +2229,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>
@@ -2186,11 +2244,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
@@ -2207,11 +2265,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>
@@ -2224,11 +2282,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
@@ -2241,11 +2299,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>
@@ -2255,6 +2313,23 @@ avoid an ambiguity in the grammar.</p>
</li>
<li id="section-94">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-94">&#182;</a>
</div>
<p>Tokens that, when appearing at the end of a line, suppress a following TERMINATOR/INDENT token</p>
</div>
<div class="content"><div class='highlight'><pre>UNFINISHED = [<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">'DEFAULT'</span>]</pre></div></div>
</li>
</ul>
</div>
</body>

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

@@ -256,7 +256,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 +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>
@@ -472,7 +476,7 @@ class declaration or if-conditionals)</p>
<span class="hljs-title">startImplicitCall</span> = <span class="hljs-params">(j)</span> -&gt;</span>
idx = j ? i
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>
tokens.splice idx, <span class="hljs-number">0</span>, generate <span class="hljs-string">'CALL_START'</span>, <span class="hljs-string">'('</span>, [<span class="hljs-string">''</span>, <span class="hljs-string">'implicit function call'</span>, token[<span class="hljs-number">2</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>
@@ -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,23 @@ 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">break</span> <span class="hljs-keyword">unless</span> isImplicit stackItem
stackItem[<span class="hljs-number">2</span>].sameLine = <span class="hljs-literal">no</span> <span class="hljs-keyword">if</span> isImplicitObject stackItem
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 +764,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 +780,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 +798,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 +820,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 +845,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 +867,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 +897,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 +925,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 +947,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 +980,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 +1013,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 +1038,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 +1053,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 +1072,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 +1103,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 +1119,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 +1139,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 +1154,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 +1169,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 +1193,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 +1209,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 +1226,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 +1241,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,400 +1,405 @@
/**
* CoffeeScript Compiler v1.12.5
* CoffeeScript Compiler v1.12.7
* http://coffeescript.org
*
* Copyright 2011, Jeremy Ashkenas
* Released under the MIT License
*/
var $jscomp={scope:{},checkStringArgs:function(t,ua,pa){if(null==t)throw new TypeError("The 'this' value for String.prototype."+pa+" must not be null or undefined");if(ua instanceof RegExp)throw new TypeError("First argument to String.prototype."+pa+" must not be a regular expression");return t+""}};
$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,ua,pa){if(pa.get||pa.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[ua]=pa.value)};$jscomp.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global&&null!=global?global:t};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(t,ua,pa,e){if(ua){pa=$jscomp.global;t=t.split(".");for(e=0;e<t.length-1;e++){var va=t[e];va in pa||(pa[va]={});pa=pa[va]}t=t[t.length-1];e=pa[t];ua=ua(e);ua!=e&&null!=ua&&$jscomp.defineProperty(pa,t,{configurable:!0,writable:!0,value:ua})}};
$jscomp.polyfill("String.prototype.repeat",function(t){return t?t:function(t){var pa=$jscomp.checkStringArgs(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var e="";t;)if(t&1&&(e+=pa),t>>>=1)pa+=pa;return e}},"es6-impl","es3");$jscomp.findInternal=function(t,ua,pa){t instanceof String&&(t=String(t));for(var e=t.length,va=0;va<e;va++){var Ba=t[va];if(ua.call(pa,Ba,va,t))return{i:va,v:Ba}}return{i:-1,v:void 0}};
$jscomp.polyfill("Array.prototype.find",function(t){return t?t:function(t,pa){return $jscomp.findInternal(this,t,pa).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(t){return $jscomp.SYMBOL_PREFIX+(t||"")+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.arrayIterator=function(t){var ua=0;return $jscomp.iteratorPrototype(function(){return ua<t.length?{done:!1,value:t[ua++]}:{done:!0}})};$jscomp.iteratorPrototype=function(t){$jscomp.initSymbolIterator();t={next:t};t[$jscomp.global.Symbol.iterator]=function(){return this};return t};$jscomp.array=$jscomp.array||{};
$jscomp.iteratorFromArray=function(t,ua){$jscomp.initSymbolIterator();t instanceof String&&(t+="");var pa=0,e={next:function(){if(pa<t.length){var va=pa++;return{value:ua(va,t[va]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e};$jscomp.polyfill("Array.prototype.keys",function(t){return t?t:function(){return $jscomp.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");
(function(t){var ua=function(){function t(e){return t[e]}t["../../package.json"]={name:"coffee-script",description:"Unfancy JavaScript",keywords:["javascript","language","coffeescript","compiler"],author:"Jeremy Ashkenas",version:"1.12.5",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":"^20170218.0.0","highlight.js":"~9.10.0",jison:"\x3e\x3d0.4.17","markdown-it":"^8.3.1",underscore:"~1.8.3"}};t["./helpers"]=function(){var e={};(function(){var t,Ba,V,a,c,Da;e.starts=function(a,c,p){return c===a.substr(p,c.length)};
e.ends=function(a,c,p){var g;g=c.length;return c===a.substr(a.length-g-(p||0),g)};e.repeat=c=function(a,c){var g;for(g="";0<c;)c&1&&(g+=a),c>>>=1,a+=a;return g};e.compact=function(a){var g,c,e,V;V=[];g=0;for(e=a.length;g<e;g++)(c=a[g])&&V.push(c);return V};e.count=function(a,c){var g,v;g=v=0;if(!c.length)return 1/0;for(;v=1+a.indexOf(c,v);)g++;return g};e.merge=function(a,c){return Ba(Ba({},a),c)};Ba=e.extend=function(a,c){var g,v;for(g in c)v=c[g],a[g]=v;return a};e.flatten=V=function(a){var g,c,
e,G;c=[];e=0;for(G=a.length;e<G;e++)g=a[e],"[object Array]"===Object.prototype.toString.call(g)?c=c.concat(V(g)):c.push(g);return c};e.del=function(a,c){var g;g=a[c];delete a[c];return g};e.some=null!=(a=Array.prototype.some)?a:function(a){var g,c,e;c=0;for(e=this.length;c<e;c++)if(g=this[c],a(g))return!0;return!1};e.invertLiterate=function(a){var g;g=!0;var c,e,V,F;V=a.split("\n");F=[];c=0;for(e=V.length;c<e;c++)a=V[c],g&&/^([ ]{4}|[ ]{0,3}\t)/.test(a)?F.push(a):(g=/^\s*$/.test(a))?F.push(a):F.push("# "+
a);return F.join("\n")};t=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};e.addLocationDataFn=function(a,c){return function(g){"object"===typeof g&&g.updateLocationDataIfMissing&&g.updateLocationDataIfMissing(t(a,c));return g}};e.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"};
e.baseFileName=function(a,c,e){null==c&&(c=!1);null==e&&(e=!1);a=a.split(e?/\\|\//:/\//);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(".")};e.isCoffee=function(a){return/\.((lit)?coffee|coffee\.md)$/.test(a)};e.isLiterate=function(a){return/\.(litcoffee|coffee\.md)$/.test(a)};e.throwSyntaxError=function(a,c){a=new SyntaxError(a);a.location=c;a.toString=Da;a.stack=a.toString();throw a;};e.updateSyntaxError=function(a,
c,e){a.toString===Da&&(a.code||(a.code=c),a.filename||(a.filename=e),a.stack=a.toString());return a};Da=function(){var a,e,p,V,G,F,x,w,K,t;if(!this.code||!this.location)return Error.prototype.toString.call(this);a=this.location;F=a.first_line;G=a.first_column;p=a.last_line;x=a.last_column;null==p&&(p=F);null==x&&(x=G);V=this.filename||"[stdin]";a=this.code.split("\n")[F];p=F===p?x+1:a.length;x=a.slice(0,G).replace(/[^\s]/g," ")+c("^",p-G);"undefined"!==typeof process&&null!==process&&(e=(null!=(w=
process.stdout)?w.isTTY:void 0)&&!(null!=(K=process.env)&&K.NODE_DISABLE_COLORS));if(null!=(t=this.colorful)?t:e)e=function(a){return"\u001b[1;31m"+a+"\u001b[0m"},a=a.slice(0,G)+e(a.slice(G,p))+a.slice(p),x=e(x);return V+":"+(F+1)+":"+(G+1)+": error: "+this.message+"\n"+a+"\n"+x};e.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 e}();t["./rewriter"]=function(){var e=
{};(function(){var t,Ba,V,a,c,Da,g,v,p,l,G,F,x,w,K,M,I,z,E=[].indexOf||function(a){for(var c=0,g=this.length;c<g;c++)if(c in this&&this[c]===a)return c;return-1},N=[].slice;w=function(a,c,g){a=[a,c];a.generated=!0;g&&(a.origin=g);return a};e.Rewriter=function(){function k(){}k.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};k.prototype.scanTokens=function(a){var c,m,h;h=this.tokens;for(c=0;m=h[c];)c+=a.call(this,m,c,h);return!0};k.prototype.detectEnd=function(m,g,r){var h,q,k,e,B;B=this.tokens;for(h=0;e=B[m];){if(0===h&&g.call(this,e,m))return r.call(this,e,m);if(!e||0>h)return r.call(this,e,m-1);(q=e[0],0<=E.call(c,q))?h+=1:(k=e[0],0<=E.call(a,k))&&--h;m+=1}return m-1};k.prototype.removeLeadingNewlines=function(){var a,c,g,h,y;h=this.tokens;a=c=0;for(g=h.length;c<g&&
(y=h[a][0],"TERMINATOR"===y);a=++c);if(a)return this.tokens.splice(0,a)};k.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(g,h){"CALL_START"===g[0]&&this.detectEnd(h+1,c,a);return 1})};k.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(g,h){"INDEX_START"===g[0]&&this.detectEnd(h+1,c,a);return 1})};k.prototype.indexOfTag=function(){var a,c,g,h,e,k,u;c=arguments[0];e=2<=arguments.length?N.call(arguments,1):[];g=h=a=0;for(k=e.length;0<=k?h<k:h>k;g=0<=k?++h:--h){for(;"HERECOMMENT"===this.tag(c+g+a);)a+=2;if(null!=e[g]&&("string"===typeof e[g]&&(e[g]=[e[g]]),u=this.tag(c+g+a),0>E.call(e[g],u)))return-1}return c+g+a-1};k.prototype.looksObjectish=function(g){var m;if(-1<this.indexOfTag(g,
"@",null,":")||-1<this.indexOfTag(g,null,":"))return!0;g=this.indexOfTag(g,c);return-1<g&&(m=null,this.detectEnd(g+1,function(c){var h;return h=c[0],0<=E.call(a,h)},function(a,c){return m=c}),":"===this.tag(m+1))?!0:!1};k.prototype.findTagsBackwards=function(g,e){var m,h,k,q,u,B,p;for(m=[];0<=g&&(m.length||(q=this.tag(g),0>E.call(e,q))&&((u=this.tag(g),0>E.call(c,u))||this.tokens[g].generated)&&(B=this.tag(g),0>E.call(G,B)));)(h=this.tag(g),0<=E.call(a,h))&&m.push(this.tag(g)),(k=this.tag(g),0<=E.call(c,
k))&&m.length&&m.pop(),--g;return p=this.tag(g),0<=E.call(e,p)};k.prototype.addImplicitBracesAndParens=function(){var m,e;m=[];e=null;return this.scanTokens(function(k,h,q){var r,u,y,V,z,H,l,x,C,A,t,D,K,F,I,M,N,J;J=k[0];A=(t=0<h?q[h-1]:[])[0];C=(h<q.length-1?q[h+1]:[])[0];I=function(){return m[m.length-1]};M=h;y=function(a){return h-M+a};V=function(){var a,c;return null!=(a=I())?null!=(c=a[2])?c.ours:void 0:void 0};z=function(){var a;return V()&&"("===(null!=(a=I())?a[0]:void 0)};l=function(){var a;
return V()&&"{"===(null!=(a=I())?a[0]:void 0)};H=function(){var a;return V&&"CONTROL"===(null!=(a=I())?a[0]:void 0)};N=function(a){var c;c=null!=a?a:h;m.push(["(",c,{ours:!0}]);q.splice(c,0,w("CALL_START","("));if(null==a)return h+=1};r=function(){m.pop();q.splice(h,0,w("CALL_END",")",["","end of input",k[2]]));return h+=1};x=function(a,c){var g;null==c&&(c=!0);g=null!=a?a:h;m.push(["{",g,{sameLine:!0,startsLine:c,ours:!0}]);c=new String("{");c.generated=!0;q.splice(g,0,w("{",c,k));if(null==a)return h+=
1};u=function(a){a=null!=a?a:h;m.pop();q.splice(a,0,w("}","}",k));return h+=1};if(z()&&("IF"===J||"TRY"===J||"FINALLY"===J||"CATCH"===J||"CLASS"===J||"SWITCH"===J))return m.push(["CONTROL",h,{ours:!0}]),y(1);if("INDENT"===J&&V()){if("\x3d\x3e"!==A&&"-\x3e"!==A&&"["!==A&&"("!==A&&","!==A&&"{"!==A&&"TRY"!==A&&"ELSE"!==A&&"\x3d"!==A)for(;z();)r();H()&&m.pop();m.push([J,h]);return y(1)}if(0<=E.call(c,J))return m.push([J,h]),y(1);if(0<=E.call(a,J)){for(;V();)z()?r():l()?u():m.pop();e=m.pop()}if((0<=E.call(v,
J)&&k.spaced||"?"===J&&0<h&&!q[h-1].spaced)&&(0<=E.call(Da,C)||0<=E.call(p,C)&&(null==(D=q[h+1])||!D.spaced)&&(null==(K=q[h+1])||!K.newLine)))return"?"===J&&(J=k[0]="FUNC_EXIST"),N(h+1),y(2);if(0<=E.call(v,J)&&-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 N(h+1),m.push(["INDENT",h+2]),y(3);if(":"===J){for(u=function(){var c;switch(!1){case c=this.tag(h-1),0>E.call(a,c):return e[1];
case "@"!==this.tag(h-2):return h-2;default:return h-1}}.call(this);"HERECOMMENT"===this.tag(u-2);)u-=2;this.insideForDeclaration="FOR"===C;H=0===u||(F=this.tag(u-1),0<=E.call(G,F))||q[u-1].newLine;if(I()&&(l=I(),F=l[0],t=l[1],("{"===F||"INDENT"===F&&"{"===this.tag(t-1))&&(H||","===this.tag(u-1)||"{"===this.tag(u-1))))return y(1);x(u,!!H);return y(2)}l()&&0<=E.call(G,J)&&(I()[2].sameLine=!1);x="OUTDENT"===A||t.newLine;if(0<=E.call(g,J)||0<=E.call(Ba,J)&&x)for(;V();)if(x=I(),F=x[0],t=x[1],F=x[2],x=
F.sameLine,H=F.startsLine,z()&&","!==A)r();else if(l()&&!this.insideForDeclaration&&x&&"TERMINATOR"!==J&&":"!==A)u();else if(!l()||"TERMINATOR"!==J||","===A||H&&this.looksObjectish(h+1))break;else{if("HERECOMMENT"===C)return y(1);u()}if(!(","!==J||this.looksObjectish(h+1)||!l()||this.insideForDeclaration||"TERMINATOR"===C&&this.looksObjectish(h+2)))for(C="OUTDENT"===C?1:0;l();)u(h+C);return y(1)})};k.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(a,c,g){var h,
m,k;if(a[2]||!a.generated&&!a.explicit)return 1;"{"===a[0]&&(h=null!=(k=g[c+1])?k[2]:void 0)?(m=h.first_line,h=h.first_column):(h=null!=(m=g[c-1])?m[2]:void 0)?(m=h.last_line,h=h.last_column):m=h=0;a[2]={first_line:m,first_column:h,last_line:m,last_column:h};return 1})};k.prototype.fixOutdentLocationData=function(){return this.scanTokens(function(a,c,g){if(!("OUTDENT"===a[0]||a.generated&&"CALL_END"===a[0]||a.generated&&"}"===a[0]))return 1;c=g[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})};k.prototype.normalizeLines=function(){var a,c,g,h,k;k=g=h=null;c=function(a,c){var g,h,m,e;return";"!==a[1]&&(g=a[0],0<=E.call(F,g))&&!("TERMINATOR"===a[0]&&(h=this.tag(c+1),0<=E.call(V,h)))&&!("ELSE"===a[0]&&"THEN"!==k)&&!!("CATCH"!==(m=a[0])&&"FINALLY"!==m||"-\x3e"!==k&&"\x3d\x3e"!==k)||(e=a[0],0<=E.call(Ba,e))&&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(m,
e,q){var r,y,p;m=m[0];if("TERMINATOR"===m){if("ELSE"===this.tag(e+1)&&"OUTDENT"!==this.tag(e-1))return q.splice.apply(q,[e,1].concat(N.call(this.indentation()))),1;if(r=this.tag(e+1),0<=E.call(V,r))return q.splice(e,1),0}if("CATCH"===m)for(r=y=1;2>=y;r=++y)if("OUTDENT"===(p=this.tag(e+r))||"TERMINATOR"===p||"FINALLY"===p)return q.splice.apply(q,[e+r,0].concat(N.call(this.indentation()))),2+r;0<=E.call(x,m)&&"INDENT"!==this.tag(e+1)&&("ELSE"!==m||"IF"!==this.tag(e+1))&&(k=m,p=this.indentation(q[e]),
g=p[0],h=p[1],"THEN"===k&&(g.fromThen=!0),q.splice(e+1,0,g),this.detectEnd(e+2,c,a),"THEN"===m&&q.splice(e,1));return 1})};k.prototype.tagPostfixConditionals=function(){var a,c,g;g=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 g[0]="POST_"+g[0]};return this.scanTokens(function(h,m){if("IF"!==h[0])return 1;g=h;this.detectEnd(m+1,c,a);return 1})};k.prototype.indentation=function(a){var c,
g;c=["INDENT",2];g=["OUTDENT",2];a?(c.generated=g.generated=!0,c.origin=g.origin=a):c.explicit=g.explicit=!0;return[c,g]};k.prototype.generate=w;k.prototype.tag=function(a){var c;return null!=(c=this.tokens[a])?c[0]:void 0};return k}();t=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]];e.INVERSES=l={};c=[];a=[];K=0;for(I=t.length;K<I;K++)z=t[K],M=z[0],z=z[1],
c.push(l[z]=M),a.push(l[M]=z);V=["CATCH","THEN","ELSE","FINALLY"].concat(a);v="IDENTIFIER PROPERTY SUPER ) CALL_END ] INDEX_END @ THIS".split(" ");Da="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(" ");p=["+","-"];g="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"];Ba=[".","?.","::","?::"]}).call(this);return e}();t["./lexer"]=function(){var e={};(function(){var va,Ba,V,a,c,Da,g,v,p,l,G,F,x,w,K,M,I,z,E,N,k,m,q,r,h,y,O,u,B,T,S,H,ba,R,C,A,W,D,P,Y,Z,U,aa,J,ca,Q,pa,ua,Ua,ja,da,ea,ha,ia,ka,la,L,fa,qa,ra,X=[].indexOf||function(a){for(var c=0,g=this.length;c<g;c++)if(c in this&&this[c]===a)return c;return-1},sa=[].slice;fa=t("./rewriter");D=fa.Rewriter;N=fa.INVERSES;fa=t("./helpers");ha=fa.count;qa=fa.repeat;ia=fa.invertLiterate;
ra=fa.throwSyntaxError;e.Lexer=function(){function e(){}e.prototype.tokenize=function(a,c){var g,h,e,Ca;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(e=0;this.chunk=a.slice(e);)if(g=this.identifierToken()||this.commentToken()||this.whitespaceToken()||
this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),Ca=this.getLineAndColumnFromChunk(g),this.chunkLine=Ca[0],this.chunkColumn=Ca[1],e+=g,c.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:e};this.closeIndentation();(h=this.ends.pop())&&this.error("missing "+h.tag,h.origin[2]);return!1===c.rewrite?this.tokens:(new D).rewrite(this.tokens)};e.prototype.clean=function(a){a.charCodeAt(0)===va&&(a=a.slice(1));a=a.replace(/\r/g,
"").replace(ua,"");ea.test(a)&&(a="\n"+a,this.chunkLine--);this.literate&&(a=ia(a));return a};e.prototype.identifierToken=function(){var g,h,e,k,q,y,p,u,V,w,z,B,l;if(!(h=I.exec(this.chunk)))return 0;q=h[0];e=h[1];h=h[2];k=e.length;y=void 0;if("own"===e&&"FOR"===this.tag())return this.token("OWN",e),e.length;if("from"===e&&"YIELD"===this.tag())return this.token("FROM",e),e.length;if("as"===e&&this.seenImport){if("*"===this.value())this.tokens[this.tokens.length-1][0]="IMPORT_ALL";else if(p=this.value(),
0<=X.call(Da,p))this.tokens[this.tokens.length-1][0]="IDENTIFIER";if("DEFAULT"===(u=this.tag())||"IMPORT_ALL"===u||"IDENTIFIER"===u)return this.token("AS",e),e.length}if("as"===e&&this.seenExport&&("IDENTIFIER"===(V=this.tag())||"DEFAULT"===V))return this.token("AS",e),e.length;if("default"===e&&this.seenExport&&("EXPORT"===(w=this.tag())||"AS"===w))return this.token("DEFAULT",e),e.length;p=this.tokens;p=p[p.length-1];l=h||null!=p&&("."===(z=p[0])||"?."===z||"::"===z||"?::"===z||!p.spaced&&"@"===
p[0])?"PROPERTY":"IDENTIFIER";"IDENTIFIER"!==l||!(0<=X.call(m,e)||0<=X.call(Da,e))||this.exportSpecifierList&&0<=X.call(Da,e)?"IDENTIFIER"===l&&this.seenFor&&"from"===e&&ka(p)&&(l="FORFROM",this.seenFor=!1):(l=e.toUpperCase(),"WHEN"===l&&(B=this.tag(),0<=X.call(r,B))?l="LEADING_WHEN":"FOR"===l?this.seenFor=!0:"UNLESS"===l?l="IF":"IMPORT"===l?this.seenImport=!0:"EXPORT"===l?this.seenExport=!0:0<=X.call(Ua,l)?l="UNARY":0<=X.call(A,l)&&("INSTANCEOF"!==l&&this.seenFor?(l="FOR"+l,this.seenFor=!1):(l="RELATION",
"!"===this.value()&&(y=this.tokens.pop(),e="!"+e))));"IDENTIFIER"===l&&0<=X.call(W,e)&&this.error("reserved word '"+e+"'",{length:e.length});"PROPERTY"!==l&&(0<=X.call(a,e)&&(g=e,e=c[e]),l=function(){switch(e){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 e;default:return l}}());z=this.token(l,e,0,k);g&&(z.origin=[l,g,z[2]]);y&&(g=[y[2].first_line,
y[2].first_column],z[2].first_line=g[0],z[2].first_column=g[1]);h&&(g=q.lastIndexOf(":"),this.token(":",":",g,h.length));return q.length};e.prototype.numberToken=function(){var a,c,g,e;if(!(c=B.exec(this.chunk)))return 0;g=c[0];c=g.length;switch(!1){case !/^0[BOX]/.test(g):this.error("radix prefix in '"+g+"' must be lowercase",{offset:1});break;case !/^(?!0x).*E/.test(g):this.error("exponential notation in '"+g+"' must be indicated with a lowercase 'e'",{offset:g.indexOf("E")});break;case !/^0\d*[89]/.test(g):this.error("decimal literal '"+
g+"' must not be prefixed with '0'",{length:c});break;case !/^0\d+/.test(g):this.error("octal literal '"+g+"' must be prefixed with '0o'",{length:c})}a=function(){switch(g.charAt(1)){case "b":return 2;case "o":return 8;case "x":return 16;default:return null}}();a=null!=a?parseInt(g.slice(2),a):parseFloat(g);if("b"===(e=g.charAt(1))||"o"===e)g="0x"+a.toString(16);this.token(Infinity===a?"INFINITY":"NUMBER",g,0,c);return c};e.prototype.stringToken=function(){var a,c,g,e,h,m,k,r,p,y,l,u;p=(Q.exec(this.chunk)||
[])[0];if(!p)return 0;this.tokens.length&&"from"===this.value()&&(this.seenImport||this.seenExport)&&(this.tokens[this.tokens.length-1][0]="FROM");g=function(){switch(p){case "'":return ca;case '"':return U;case "'''":return x;case '"""':return G}}();e=3===p.length;g=this.matchWithInterpolations(g,p);u=g.tokens;h=g.index;a=u.length-1;g=p.charAt(0);if(e){k=null;for(e=function(){var a,c,g;g=[];m=a=0;for(c=u.length;a<c;m=++a)l=u[m],"NEOSTRING"===l[0]&&g.push(l[1]);return g}().join("#{}");c=F.exec(e);)if(c=
c[1],null===k||0<(y=c.length)&&y<k.length)k=c;k&&(r=RegExp("\\n"+k,"g"));this.mergeInterpolationTokens(u,{delimiter:g},function(c){return function(g,e){g=c.formatString(g);r&&(g=g.replace(r,"\n"));0===e&&(g=g.replace(q,""));e===a&&(g=g.replace(pa,""));return g}}(this))}else this.mergeInterpolationTokens(u,{delimiter:g},function(c){return function(g,e){g=c.formatString(g);return g=g.replace(Y,function(c,b){return 0===e&&0===b||e===a&&b+c.length===g.length?"":" "})}}(this));return h};e.prototype.commentToken=
function(){var a,c,e;if(!(e=this.chunk.match(g)))return 0;a=e[0];if(c=e[1])(e=l.exec(a))&&this.error("block comments cannot contain "+e[0],{offset:e.index,length:e[0].length}),0<=c.indexOf("\n")&&(c=c.replace(RegExp("\\n"+qa(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",c,0,a.length);return a.length};e.prototype.jsToken=function(){var a,c;if("`"!==this.chunk.charAt(0)||!(a=M.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};e.prototype.regexToken=function(){var a,c,g,e,h,m,k,q;switch(!1){case !(c=R.exec(this.chunk)):this.error("regular expressions cannot begin with "+c[2],{offset:c.index+c[1].length});break;case !(c=this.matchWithInterpolations(w,"///")):q=c.tokens;h=c.index;break;case !(c=H.exec(this.chunk)):k=c[0];a=c[1];c=c[2];this.validateEscapes(a,{isRegex:!0,offsetInChunk:1});h=k.length;m=this.tokens;if(m=m[m.length-1])if(m.spaced&&(g=m[0],0<=X.call(Ba,
g))){if(!c||S.test(k))return 0}else if(e=m[0],0<=X.call(u,e))return 0;c||this.error("missing / (unclosed regex)");break;default:return 0}e=ba.exec(this.chunk.slice(h))[0];g=h+e.length;c=this.makeToken("REGEX",null,0,g);switch(!1){case !!da.test(e):this.error("invalid regular expression flags "+e,{offset:h,length:e.length});break;case !(k||1===q.length):null==a&&(a=this.formatHeregex(q[0][1]));this.token("REGEX",""+this.makeDelimitedLiteral(a,{delimiter:"/"})+e,0,g,c);break;default:this.token("REGEX_START",
"(",0,0,c),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(q,{delimiter:'"',double:!0},this.formatHeregex),e&&(this.token(",",",",h-1,0),this.token("STRING",'"'+e+'"',h-1,e.length)),this.token(")",")",g-1,0),this.token("REGEX_END",")",g-1,0)}return g};e.prototype.lineToken=function(){var a,c,g;if(!(c=O.exec(this.chunk)))return 0;c=c[0];this.seenFor=!1;this.importSpecifierList||(this.seenImport=!1);this.exportSpecifierList||(this.seenExport=!1);
g=c.length-1-c.lastIndexOf("\n");a=this.unfinished();if(g-this.indebt===this.indent)return a?this.suppressNewlines():this.newlineToken(0),c.length;if(g>this.indent){if(a)return this.indebt=g-this.indent,this.suppressNewlines(),c.length;if(!this.tokens.length)return this.baseIndent=this.indent=g,c.length;a=g-this.indent+this.outdebt;this.token("INDENT",a,c.length-g,g);this.indents.push(a);this.ends.push({tag:"OUTDENT"});this.outdebt=this.indebt=0;this.indent=g}else g<this.baseIndent?this.error("missing indentation",
{offset:c.length}):(this.indebt=0,this.outdentToken(this.indent-g,a,c.length));return c.length};e.prototype.outdentToken=function(a,c,g){var e,h,m,k;for(e=this.indent-a;0<a;)(m=this.indents[this.indents.length-1])?m===this.outdebt?(a-=this.outdebt,this.outdebt=0):m<this.outdebt?(this.outdebt-=m,a-=m):(h=this.indents.pop()+this.outdebt,g&&(k=this.chunk[g],0<=X.call(z,k))&&(e-=h-a,a=h),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",a,0,g),a-=h):a=0;h&&(this.outdebt-=a);for(;";"===this.value();)this.tokens.pop();
"TERMINATOR"===this.tag()||c||this.token("TERMINATOR","\n",g,0);this.indent=e;return this};e.prototype.whitespaceToken=function(){var a,c;if(!(a=ea.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};e.prototype.newlineToken=function(a){for(;";"===this.value();)this.tokens.pop();"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",a,0);return this};e.prototype.suppressNewlines=function(){"\\"===this.value()&&
this.tokens.pop();return this};e.prototype.literalToken=function(){var a,c,g,e,h,m,k,q;(a=T.exec(this.chunk))?(a=a[0],V.test(a)&&this.tagParameters()):a=this.chunk.charAt(0);q=a;e=this.tokens;if((e=e[e.length-1])&&0<=X.call(["\x3d"].concat(sa.call(p)),a)&&(k=!1,"\x3d"!==a||"||"!==(g=e[1])&&"\x26\x26"!==g||e.spaced||(e[0]="COMPOUND_ASSIGN",e[1]+="\x3d",e=this.tokens[this.tokens.length-2],k=!0),e&&"PROPERTY"!==e[0]&&(g=null!=(c=e.origin)?c:e,(c=la(e[1],g[1]))&&this.error(c,g[2])),k))return a.length;
"{"===a&&this.seenImport?this.importSpecifierList=!0:this.importSpecifierList&&"}"===a?this.importSpecifierList=!1:"{"===a&&"EXPORT"===(null!=e?e[0]:void 0)?this.exportSpecifierList=!0:this.exportSpecifierList&&"}"===a&&(this.exportSpecifierList=!1);if(";"===a)this.seenFor=this.seenImport=this.seenExport=!1,q="TERMINATOR";else if("*"===a&&"EXPORT"===e[0])q="EXPORT_ALL";else if(0<=X.call(y,a))q="MATH";else if(0<=X.call(v,a))q="COMPARE";else if(0<=X.call(p,a))q="COMPOUND_ASSIGN";else if(0<=X.call(Ua,
a))q="UNARY";else if(0<=X.call(ja,a))q="UNARY_MATH";else if(0<=X.call(P,a))q="SHIFT";else if("?"===a&&null!=e&&e.spaced)q="BIN?";else if(e&&!e.spaced)if("("===a&&(h=e[0],0<=X.call(Ba,h)))"?"===e[0]&&(e[0]="FUNC_EXIST"),q="CALL_START";else if("["===a&&(m=e[0],0<=X.call(E,m)))switch(q="INDEX_START",e[0]){case "?":e[0]="INDEX_SOAK"}h=this.makeToken(q,a);switch(a){case "(":case "{":case "[":this.ends.push({tag:N[a],origin:h});break;case ")":case "}":case "]":this.pair(a)}this.tokens.push(h);return a.length};
e.prototype.tagParameters=function(){var a,c,g,e;if(")"!==this.tag())return this;c=[];e=this.tokens;a=e.length;for(e[--a][0]="PARAM_END";g=e[--a];)switch(g[0]){case ")":c.push(g);break;case "(":case "CALL_START":if(c.length)c.pop();else return"("===g[0]&&(g[0]="PARAM_START"),this}return this};e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)};e.prototype.matchWithInterpolations=function(a,c){var g,h,m,k,q,p,r,y;y=[];q=c.length;if(this.chunk.slice(0,q)!==c)return null;for(r=
this.chunk.slice(q);;){k=a.exec(r)[0];this.validateEscapes(k,{isRegex:"/"===c.charAt(0),offsetInChunk:q});y.push(this.makeToken("NEOSTRING",k,q));r=r.slice(k.length);q+=k.length;if("#{"!==r.slice(0,2))break;g=this.getLineAndColumnFromChunk(q+1);k=g[0];g=g[1];g=(new e).tokenize(r.slice(1),{line:k,column:g,untilBalanced:!0});k=g.tokens;h=g.index;h+=1;p=k[0];g=k[k.length-1];p[0]=p[1]="(";g[0]=g[1]=")";g.origin=["","end of interpolation",g[2]];"TERMINATOR"===(null!=(m=k[1])?m[0]:void 0)&&k.splice(1,1);
y.push(["TOKENS",k]);r=r.slice(h);q+=h}r.slice(0,c.length)!==c&&this.error("missing "+c,{length:c.length});a=y[0];m=y[y.length-1];a[2].first_column-=c.length;"\n"===m[1].substr(-1)?(m[2].last_line+=1,m[2].last_column=c.length-1):m[2].last_column+=c.length;0===m[1].length&&--m[2].last_column;return{tokens:y,index:q+c.length}};e.prototype.mergeInterpolationTokens=function(a,c,g){var e,h,m,k,q,r,p,y,l,u,V,z;1<a.length&&(y=this.token("STRING_START","(",0,0));m=this.tokens.length;k=q=0;for(r=a.length;q<
r;k=++q){u=a[k];e=u[0];z=u[1];switch(e){case "TOKENS":if(2===z.length)continue;p=z[0];V=z;break;case "NEOSTRING":e=g(u[1],k);if(0===e.length)if(0===k)h=this.tokens.length;else continue;2===k&&null!=h&&this.tokens.splice(h,2);u[0]="STRING";u[1]=this.makeDelimitedLiteral(e,c);p=u;V=[u]}this.tokens.length>m&&(k=this.token("+","+"),k[2]={first_line:p[2].first_line,first_column:p[2].first_column,last_line:p[2].first_line,last_column:p[2].first_column});(l=this.tokens).push.apply(l,V)}if(y)return a=a[a.length-
1],y.origin=["STRING",null,{first_line:y[2].first_line,first_column:y[2].first_column,last_line:a[2].last_line,last_column:a[2].last_column}],y=this.token("STRING_END",")"),y[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}};e.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()};e.prototype.getLineAndColumnFromChunk=function(a){var c,g;if(0===a)return[this.chunkLine,this.chunkColumn];g=a>=this.chunk.length?this.chunk:this.chunk.slice(0,+(a-1)+1||9E9);a=ha(g,"\n");c=this.chunkColumn;0<a?(c=g.split("\n"),c=c[c.length-1],c=c.length):c+=g.length;return[this.chunkLine+a,c]};e.prototype.makeToken=function(a,c,g,e){var h,k;null==g&&(g=0);null==e&&(e=c.length);h={};k=this.getLineAndColumnFromChunk(g);h.first_line=k[0];h.first_column=k[1];g=this.getLineAndColumnFromChunk(g+
(0<e?e-1:0));h.last_line=g[0];h.last_column=g[1];return[a,c,h]};e.prototype.token=function(a,c,g,e,h){a=this.makeToken(a,c,g,e);h&&(a.origin=h);this.tokens.push(a);return a};e.prototype.tag=function(){var a;a=this.tokens;a=a[a.length-1];return null!=a?a[0]:void 0};e.prototype.value=function(){var a;a=this.tokens;a=a[a.length-1];return null!=a?a[1]:void 0};e.prototype.unfinished=function(){var a;return h.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};e.prototype.formatString=function(a){return a.replace(J,"$1")};e.prototype.formatHeregex=function(a){return a.replace(K,"$1$2")};e.prototype.validateEscapes=function(a,c){var g,e,h,k,m;null==c&&(c={});if(e=(c.isRegex?C:aa).exec(a))return e[0],a=e[1],h=e[2],g=e[3],m=e[4],g="\\"+(h||g||m),this.error((h?"octal escape sequences are not allowed":
"invalid escape sequence")+" "+g,{offset:(null!=(k=c.offsetInChunk)?k:0)+e.index+a.length,length:g.length})};e.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,g,e,h,k,m,q,r,p){switch(!1){case !g:return c.double?g+g:g;case !e:return"\\x00";case !h:return"\\"+h;case !k:return"\\n";case !m:return"\\r";case !q:return"\\u2028";
case !r:return"\\u2029";case !p:return c.double?"\\"+p:p}});return""+c.delimiter+a+c.delimiter};e.prototype.error=function(a,c){var g,e,h,k,m;null==c&&(c={});c="first_line"in c?c:(k=this.getLineAndColumnFromChunk(null!=(h=c.offset)?h:0),e=k[0],g=k[1],k,{first_line:e,first_column:g,last_column:g+(null!=(m=c.length)?m:1)-1});return ra(a,c)};return e}();la=function(a,c){null==c&&(c=a);switch(!1){case 0>X.call(sa.call(m).concat(sa.call(Da)),a):return"keyword '"+c+"' can't be assigned";case 0>X.call(Z,
a):return"'"+c+"' can't be assigned";case 0>X.call(W,a):return"reserved word '"+c+"' can't be assigned";default:return!1}};e.isUnassignable=la;ka=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};m="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(" ");Da=
"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(L in c)a.push(L);return a}();Da=Da.concat(a);W="case function var void with const let enum native implements interface package private protected public static".split(" ");Z=["arguments","eval"];e.JS_FORBIDDEN=m.concat(W).concat(Z);va=65279;I=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/;
B=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;T=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/;ea=/^[^\n\S]+/;g=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;V=/^[-=]>/;O=/^(?:\n[^\n\S]*)+/;k=/^`(?!``)((?:[^`\\]|\\[\s\S])*)`/;M=/^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/;Q=/^(?:'''|"""|'|")/;ca=/^(?:[^\\']|\\[\s\S])*/;U=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/;x=/^(?:[^\\']|\\[\s\S]|'(?!''))*/;G=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/;J=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g;
Y=/\s*\n\s*/g;F=/\n+([^\n\S]*)(?=\S)/g;H=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;ba=/^\w*/;da=/^(?!.*(.).*\1)[imgy]*$/;w=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/;K=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g;R=/^(\/|\/{3}\s*)(\*)/;S=/^\/=?\s/;l=/\*\//;h=/^\s*(?:,|\??\.(?![.\d])|::)/;aa=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/;C=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/;
q=/^[^\n\S]*\n/;pa=/\n[^\n\S]*$/;ua=/\s+$/;p="-\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(" ");Ua=["NEW","TYPEOF","DELETE","DO"];ja=["!","~"];P=["\x3c\x3c","\x3e\x3e","\x3e\x3e\x3e"];v="\x3d\x3d !\x3d \x3c \x3e \x3c\x3d \x3e\x3d".split(" ");y=["*","/","%","//","%%"];A=["IN","OF","INSTANCEOF"];Ba="IDENTIFIER PROPERTY ) ] ? @ THIS SUPER".split(" ");E=Ba.concat("NUMBER INFINITY NAN STRING STRING_END REGEX REGEX_END BOOL NULL UNDEFINED } ::".split(" "));
u=E.concat(["++","--"]);r=["INDENT","OUTDENT","TERMINATOR"];z=[")","}","]"]}).call(this);return e}();t["./parser"]=function(){var e={},va={exports:e},Ba=function(){function e(){this.yy={}}var a=function(a,n,oa,b){oa=oa||{};for(b=a.length;b--;oa[a[b]]=n);return oa},c=[1,22],t=[1,25],g=[1,83],v=[1,79],p=[1,84],l=[1,85],G=[1,81],F=[1,82],x=[1,56],w=[1,58],K=[1,59],M=[1,60],I=[1,61],z=[1,62],E=[1,49],N=[1,50],k=[1,32],m=[1,68],q=[1,69],r=[1,78],h=[1,47],y=[1,51],O=[1,52],u=[1,67],B=[1,65],T=[1,66],S=
[1,64],H=[1,42],ba=[1,48],R=[1,63],C=[1,73],A=[1,74],W=[1,75],D=[1,76],P=[1,46],Y=[1,72],Z=[1,34],U=[1,35],aa=[1,36],J=[1,37],ca=[1,38],Q=[1,39],Ba=[1,86],va=[1,6,32,42,131],pa=[1,101],ja=[1,89],da=[1,88],ea=[1,87],ha=[1,90],ia=[1,91],ka=[1,92],la=[1,93],L=[1,94],fa=[1,95],qa=[1,96],ra=[1,97],X=[1,98],sa=[1,99],ma=[1,100],Ca=[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],ua=[2,166],Ra=[1,110],Ga=[1,111],Sa=[1,
112],Fa=[1,113],Na=[1,115],Oa=[1,116],Ka=[1,109],ya=[1,6,32,42,131,133,135,139,156],na=[2,27],ga=[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],Wa=[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],oa=[1,128],f=[1,133],d=[1,134],wa=[1,136],La=[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],xa=[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],$a=[2,63],Hb=[1,166],ab=[1,178],Va=[1,180],Ib=[1,175],Ma=[1,182],ub=[1,184],Ia=[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],Ja=[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],Ta=[6,31,32,65,70],hb=[6,31,32,55,65,70,73],bb=[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],cb=[2,62],jb=[1,279],Xa=[1,281],wb=[1,286],db=[1,288],Qb=[2,187],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],Pa=[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],Ya=[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],za=[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,176],Qa=[6,31,32],eb=[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],fb=[2,86],qb=[1,367],rb=[1,368],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,381],dc=[1,382],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,408],tb=[1,409],Eb=[1,415],Fb=[1,416],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],[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,n,oa,b,c,f,d){a=f.length-1;switch(c){case 1:return this.$=b.addLocationDataFn(d[a],d[a])(new b.Block);case 2:return this.$=f[a];case 3:this.$=b.addLocationDataFn(d[a],d[a])(b.Block.wrap([f[a]]));break;case 4:this.$=b.addLocationDataFn(d[a-2],d[a])(f[a-2].push(f[a]));break;case 5:this.$=f[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.$=
f[a];break;case 11:this.$=b.addLocationDataFn(d[a],d[a])(new b.StatementLiteral(f[a]));break;case 27:this.$=b.addLocationDataFn(d[a],d[a])(new b.Op(f[a],new b.Value(new b.Literal(""))));break;case 28:case 249:case 250:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op(f[a-1],f[a]));break;case 29:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op(f[a-2].concat(f[a-1]),f[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])(f[a-
1]);break;case 32:this.$=b.addLocationDataFn(d[a],d[a])(new b.IdentifierLiteral(f[a]));break;case 33:this.$=b.addLocationDataFn(d[a],d[a])(new b.PropertyName(f[a]));break;case 34:this.$=b.addLocationDataFn(d[a],d[a])(new b.NumberLiteral(f[a]));break;case 36:this.$=b.addLocationDataFn(d[a],d[a])(new b.StringLiteral(f[a]));break;case 37:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.StringWithInterpolations(f[a-1]));break;case 38:this.$=b.addLocationDataFn(d[a],d[a])(new b.RegexLiteral(f[a]));break;
case 39:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.RegexWithInterpolations(f[a-1].args));break;case 41:this.$=b.addLocationDataFn(d[a],d[a])(new b.PassthroughLiteral(f[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(f[a]));break;case 46:this.$=b.addLocationDataFn(d[a],d[a])(new b.InfinityLiteral(f[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(f[a-2],f[a]));break;case 49:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Assign(f[a-3],f[a]));break;case 50:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(f[a-4],f[a-1]));break;case 51:case 87:case 92:case 93:case 95:case 96:case 97:case 222:case 223:this.$=b.addLocationDataFn(d[a],d[a])(new b.Value(f[a]));break;case 52:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(b.addLocationDataFn(d[a-
2])(new b.Value(f[a-2])),f[a],"object",{operatorToken:b.addLocationDataFn(d[a-1])(new b.Literal(f[a-1]))}));break;case 53:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(b.addLocationDataFn(d[a-4])(new b.Value(f[a-4])),f[a-1],"object",{operatorToken:b.addLocationDataFn(d[a-3])(new b.Literal(f[a-3]))}));break;case 54:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(b.addLocationDataFn(d[a-2])(new b.Value(f[a-2])),f[a],null,{operatorToken:b.addLocationDataFn(d[a-1])(new b.Literal(f[a-1]))}));
break;case 55:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(b.addLocationDataFn(d[a-4])(new b.Value(f[a-4])),f[a-1],null,{operatorToken:b.addLocationDataFn(d[a-3])(new b.Literal(f[a-3]))}));break;case 62:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Return(f[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(f[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(f[a]));break;case 67:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Code(f[a-3],f[a],f[a-1]));break;case 68:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Code([],f[a],f[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 182:case 224:this.$=b.addLocationDataFn(d[a],
d[a])([f[a]]);break;case 75:case 112:case 131:case 151:case 183:this.$=b.addLocationDataFn(d[a-2],d[a])(f[a-2].concat(f[a]));break;case 76:case 113:case 132:case 152:case 184:this.$=b.addLocationDataFn(d[a-3],d[a])(f[a-3].concat(f[a]));break;case 77:case 114:case 134:case 154:case 186:this.$=b.addLocationDataFn(d[a-5],d[a])(f[a-5].concat(f[a-2]));break;case 78:this.$=b.addLocationDataFn(d[a],d[a])(new b.Param(f[a]));break;case 79:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Param(f[a-1],null,!0));
break;case 80:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Param(f[a-2],f[a]));break;case 81:case 189:this.$=b.addLocationDataFn(d[a],d[a])(new b.Expansion);break;case 86:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Splat(f[a-1]));break;case 88:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a-1].add(f[a]));break;case 89:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Value(f[a-1],[].concat(f[a])));break;case 99:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Access(f[a]));break;case 100:this.$=b.addLocationDataFn(d[a-
1],d[a])(new b.Access(f[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(f[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(f[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(f[a],{soak:!0}));break;case 107:this.$=b.addLocationDataFn(d[a],d[a])(new b.Index(f[a]));break;case 108:this.$=b.addLocationDataFn(d[a],d[a])(new b.Slice(f[a]));break;case 109:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Obj(f[a-2],f[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,f[a]));break;case 117:this.$=b.addLocationDataFn(d[a-
2],d[a])(new b.Class(null,f[a]));break;case 118:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Class(null,f[a-1],f[a]));break;case 119:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Class(f[a]));break;case 120:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Class(f[a-1],null,f[a]));break;case 121:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Class(f[a-2],f[a]));break;case 122:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Class(f[a-3],f[a-1],f[a]));break;case 123:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.ImportDeclaration(null,
f[a]));break;case 124:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ImportDeclaration(new b.ImportClause(f[a-2],null),f[a]));break;case 125:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ImportDeclaration(new b.ImportClause(null,f[a-2]),f[a]));break;case 126:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.ImportDeclaration(new b.ImportClause(null,new b.ImportSpecifierList([])),f[a]));break;case 127:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.ImportDeclaration(new b.ImportClause(null,new b.ImportSpecifierList(f[a-
4])),f[a]));break;case 128:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.ImportDeclaration(new b.ImportClause(f[a-4],f[a-2]),f[a]));break;case 129:this.$=b.addLocationDataFn(d[a-8],d[a])(new b.ImportDeclaration(new b.ImportClause(f[a-7],new b.ImportSpecifierList(f[a-4])),f[a]));break;case 133:case 153:case 169:case 185:this.$=b.addLocationDataFn(d[a-3],d[a])(f[a-2]);break;case 135:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportSpecifier(f[a]));break;case 136:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportSpecifier(f[a-
2],f[a]));break;case 137:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportSpecifier(new b.Literal(f[a])));break;case 138:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportSpecifier(new b.Literal(f[a-2]),f[a]));break;case 139:this.$=b.addLocationDataFn(d[a],d[a])(new b.ImportDefaultSpecifier(f[a]));break;case 140:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ImportNamespaceSpecifier(new b.Literal(f[a-2]),f[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(f[a-2])));break;case 143:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.ExportNamedDeclaration(f[a]));break;case 144:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ExportNamedDeclaration(new b.Assign(f[a-2],f[a],null,{moduleDeclaration:"export"})));break;case 145:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.ExportNamedDeclaration(new b.Assign(f[a-3],f[a],null,{moduleDeclaration:"export"})));
break;case 146:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.ExportNamedDeclaration(new b.Assign(f[a-4],f[a-1],null,{moduleDeclaration:"export"})));break;case 147:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportDefaultDeclaration(f[a]));break;case 148:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.ExportAllDeclaration(new b.Literal(f[a-2]),f[a]));break;case 149:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.ExportNamedDeclaration(new b.ExportSpecifierList(f[a-4]),f[a]));break;case 155:this.$=b.addLocationDataFn(d[a],
d[a])(new b.ExportSpecifier(f[a]));break;case 156:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportSpecifier(f[a-2],f[a]));break;case 157:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportSpecifier(f[a-2],new b.Literal(f[a])));break;case 158:this.$=b.addLocationDataFn(d[a],d[a])(new b.ExportSpecifier(new b.Literal(f[a])));break;case 159:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.ExportSpecifier(new b.Literal(f[a-2]),f[a]));break;case 160:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.TaggedTemplateCall(f[a-
2],f[a],f[a-1]));break;case 161:case 162:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Call(f[a-2],f[a],f[a-1]));break;case 164:this.$=b.addLocationDataFn(d[a],d[a])(new b.SuperCall);break;case 165:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.SuperCall(f[a]));break;case 166:this.$=b.addLocationDataFn(d[a],d[a])(!1);break;case 167:this.$=b.addLocationDataFn(d[a],d[a])(!0);break;case 168:this.$=b.addLocationDataFn(d[a-1],d[a])([]);break;case 170:case 171:this.$=b.addLocationDataFn(d[a],d[a])(new b.Value(new b.ThisLiteral));
break;case 172: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(f[a]))],"this"));break;case 173:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Arr([]));break;case 174:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Arr(f[a-2]));break;case 175:this.$=b.addLocationDataFn(d[a],d[a])("inclusive");break;case 176:this.$=b.addLocationDataFn(d[a],d[a])("exclusive");break;case 177:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Range(f[a-
3],f[a-1],f[a-2]));break;case 178:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Range(f[a-2],f[a],f[a-1]));break;case 179:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Range(f[a-1],null,f[a]));break;case 180:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Range(null,f[a],f[a-1]));break;case 181:this.$=b.addLocationDataFn(d[a],d[a])(new b.Range(null,null,f[a]));break;case 191:this.$=b.addLocationDataFn(d[a-2],d[a])([].concat(f[a-2],f[a]));break;case 192:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Try(f[a]));
break;case 193:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Try(f[a-1],f[a][0],f[a][1]));break;case 194:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Try(f[a-2],null,null,f[a]));break;case 195:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Try(f[a-3],f[a-2][0],f[a-2][1],f[a]));break;case 196:this.$=b.addLocationDataFn(d[a-2],d[a])([f[a-1],f[a]]);break;case 197:this.$=b.addLocationDataFn(d[a-2],d[a])([b.addLocationDataFn(d[a-1])(new b.Value(f[a-1])),f[a]]);break;case 198:this.$=b.addLocationDataFn(d[a-
1],d[a])([null,f[a]]);break;case 199:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Throw(f[a]));break;case 200:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Parens(f[a-1]));break;case 201:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Parens(f[a-2]));break;case 202:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.While(f[a]));break;case 203:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.While(f[a-2],{guard:f[a]}));break;case 204:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.While(f[a],{invert:!0}));break;
case 205:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.While(f[a-2],{invert:!0,guard:f[a]}));break;case 206:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a-1].addBody(f[a]));break;case 207:case 208:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a].addBody(b.addLocationDataFn(d[a-1])(b.Block.wrap([f[a-1]]))));break;case 209:this.$=b.addLocationDataFn(d[a],d[a])(f[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(f[a]));
break;case 211: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([f[a]]))));break;case 212:case 213:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.For(f[a-1],f[a]));break;case 214:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.For(f[a],f[a-1]));break;case 215:this.$=b.addLocationDataFn(d[a-1],d[a])({source:b.addLocationDataFn(d[a])(new b.Value(f[a]))});break;case 216:this.$=b.addLocationDataFn(d[a-
3],d[a])({source:b.addLocationDataFn(d[a-2])(new b.Value(f[a-2])),step:f[a]});break;case 217:b=b.addLocationDataFn(d[a-1],d[a]);f[a].own=f[a-1].own;f[a].ownTag=f[a-1].ownTag;f[a].name=f[a-1][0];f[a].index=f[a-1][1];this.$=b(f[a]);break;case 218:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a]);break;case 219:c=b.addLocationDataFn(d[a-2],d[a]);f[a].own=!0;f[a].ownTag=b.addLocationDataFn(d[a-1])(new b.Literal(f[a-1]));this.$=c(f[a]);break;case 225:this.$=b.addLocationDataFn(d[a-2],d[a])([f[a-2],f[a]]);
break;case 226:this.$=b.addLocationDataFn(d[a-1],d[a])({source:f[a]});break;case 227:this.$=b.addLocationDataFn(d[a-1],d[a])({source:f[a],object:!0});break;case 228:this.$=b.addLocationDataFn(d[a-3],d[a])({source:f[a-2],guard:f[a]});break;case 229:this.$=b.addLocationDataFn(d[a-3],d[a])({source:f[a-2],guard:f[a],object:!0});break;case 230:this.$=b.addLocationDataFn(d[a-3],d[a])({source:f[a-2],step:f[a]});break;case 231:this.$=b.addLocationDataFn(d[a-5],d[a])({source:f[a-4],guard:f[a-2],step:f[a]});
break;case 232:this.$=b.addLocationDataFn(d[a-5],d[a])({source:f[a-4],step:f[a-2],guard:f[a]});break;case 233:this.$=b.addLocationDataFn(d[a-1],d[a])({source:f[a],from:!0});break;case 234:this.$=b.addLocationDataFn(d[a-3],d[a])({source:f[a-2],guard:f[a],from:!0});break;case 235:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Switch(f[a-3],f[a-1]));break;case 236:this.$=b.addLocationDataFn(d[a-6],d[a])(new b.Switch(f[a-5],f[a-3],f[a-1]));break;case 237:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Switch(null,
f[a-1]));break;case 238:this.$=b.addLocationDataFn(d[a-5],d[a])(new b.Switch(null,f[a-3],f[a-1]));break;case 240:this.$=b.addLocationDataFn(d[a-1],d[a])(f[a-1].concat(f[a]));break;case 241:this.$=b.addLocationDataFn(d[a-2],d[a])([[f[a-1],f[a]]]);break;case 242:this.$=b.addLocationDataFn(d[a-3],d[a])([[f[a-2],f[a-1]]]);break;case 243:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.If(f[a-1],f[a],{type:f[a-2]}));break;case 244:this.$=b.addLocationDataFn(d[a-4],d[a])(f[a-4].addElse(b.addLocationDataFn(d[a-
2],d[a])(new b.If(f[a-1],f[a],{type:f[a-2]}))));break;case 246:this.$=b.addLocationDataFn(d[a-2],d[a])(f[a-2].addElse(f[a]));break;case 247:case 248:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.If(f[a],b.addLocationDataFn(d[a-2])(b.Block.wrap([f[a-2]])),{type:f[a-1],statement:!0}));break;case 251:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("-",f[a]));break;case 252:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("+",f[a]));break;case 253:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("--",
f[a]));break;case 254:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("++",f[a]));break;case 255:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("--",f[a-1],null,!0));break;case 256:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Op("++",f[a-1],null,!0));break;case 257:this.$=b.addLocationDataFn(d[a-1],d[a])(new b.Existence(f[a-1]));break;case 258:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op("+",f[a-2],f[a]));break;case 259:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op("-",f[a-2],f[a]));break;
case 260:case 261:case 262:case 263:case 264:case 265:case 266:case 267:case 268:case 269:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Op(f[a-1],f[a-2],f[a]));break;case 270:d=b.addLocationDataFn(d[a-2],d[a]);f="!"===f[a-1].charAt(0)?(new b.Op(f[a-1].slice(1),f[a-2],f[a])).invert():new b.Op(f[a-1],f[a-2],f[a]);this.$=d(f);break;case 271:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Assign(f[a-2],f[a],f[a-1]));break;case 272:this.$=b.addLocationDataFn(d[a-4],d[a])(new b.Assign(f[a-4],f[a-1],f[a-3]));
break;case 273:this.$=b.addLocationDataFn(d[a-3],d[a])(new b.Assign(f[a-3],f[a],f[a-2]));break;case 274:this.$=b.addLocationDataFn(d[a-2],d[a])(new b.Extends(f[a-2],f[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:t,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,
97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{1:[3]},{1:[2,2],6:Ba},a(va,[2,3]),a(va,[2,6],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(va,[2,7],{141:77,132:105,138:106,133:C,135:A,139:D,156:Ca}),a(va,[2,8]),a(ta,[2,14],{109:107,78:108,86:114,40:ua,41:ua,114:ua,82:Ra,83:Ga,
84:Sa,85:Fa,87:Na,90:Oa,113:Ka}),a(ta,[2,15],{86:114,109:117,78:118,82:Ra,83:Ga,84:Sa,85:Fa,87:Na,90:Oa,113:Ka,114:ua}),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(ya,[2,9]),a(ya,[2,10]),a(ya,[2,11]),a(ya,[2,12]),a(ya,[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:ga,29:Ha,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:[1,119],62:N,63:k,67:m,68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,137:W,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a(Aa,Wa,{55:[1,124]}),a(Aa,[2,95]),a(Aa,[2,96]),a(Aa,[2,97]),a(Aa,[2,98]),a(b,[2,163]),a([6,31,65,70],n,{64:125,71:126,72:127,33:129,
60:130,74:131,75:132,34:g,73:oa,92:r,118:f,119:d}),{30:135,31:wa},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,
158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},
{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{15:142,16:143,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,
44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:144,60:71,74:53,75:54,77:141,79:28,80:29,81:30,92:r,111:31,112:u,117:B,118:T,119:S,130:R},{15:142,16:143,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:144,60:71,74:53,75:54,77:145,79:28,80:29,81:30,92:r,111:31,112:u,117:B,118:T,119:S,130:R},a(La,xa,{96:[1,149],161:[1,146],162:[1,147],175:[1,148]}),a(ta,[2,245],{151:[1,150]}),{30:151,31:wa},{30:152,31:wa},a(ta,[2,209]),{30:153,31:wa},{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:ga,31:[1,155],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},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:wa,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,92:r,96:[1,157],112:u,117:B,118:T,119:S,130:R}),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,
105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ya,$a,{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:ga,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,
68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,137:W,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a([1,6,31,32,42,70,94,131,133,135,139,156],[2,66]),{33:165,34:g,39:161,40:p,41:l,92:[1,164],98:162,99:163,104:Hb},{25:168,33:169,34:g,92:[1,167],95:h,103:[1,170],107:[1,171]},a(La,[2,92]),a(La,[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:t,31:[1,173],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,116:176,117:B,118:T,119:S,120:Ib,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Aa,[2,170]),a(Aa,[2,171],{35:181,36:Ma}),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:ub}),{31:[2,69]},{31:[2,70]},a(Ia,[2,87]),a(Ia,[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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,
95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,
117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,
130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,30:188,31:wa,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,
135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{33:194,34:g,60:195,74:196,75:197,80:190,92:r,118:f,119:S,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:g,36:Ma,38:v,40:p,41:l,62:N,118:f}),a(Kb,[2,34]),a(Kb,[2,35]),a(Aa,[2,38]),{15:142,16:211,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,
54:144,60:71,74:53,75:54,77:212,79:28,80:29,81:30,92:r,111:31,112:u,117:B,118:T,119:S,130:R},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:t,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,
48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(va,[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:t,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,133:C,135:A,137:W,139:D,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a(ta,[2,257]),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,
54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,
67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,
79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,
97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,
118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,
132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,
138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,
155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,
161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,208]),a(ta,[2,213]),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,207]),a(ta,[2,212]),{39:230,40:p,41:l,110:231,114:ub},a(Ia,[2,88]),a(Mb,[2,167]),{35:232,36:Ma},{35:233,36:Ma},a(Ia,[2,103],{35:234,
36:Ma}),{35:235,36:Ma},a(Ia,[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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Nb,74:53,75:54,77:40,79:28,80:29,81:30,88:236,91:238,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,121:239,122:vb,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,
157:Z,158:U,159:aa,160:J,161:ca,162:Q},{86:242,87:Na,90:Oa},{110:243,114:ub},a(Ia,[2,89]),a(va,[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:ga,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,133:$a,
135:$a,139:$a,156:$a,137:W,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a(Ja,[2,28],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,
92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{132:105,133:C,135:A,138:106,139:D,141:77,156:Ca},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:ga,29:Ha,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,68:q,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,137:W,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),{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:ga,31:[1,248],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,
44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a([6,31],Ea,{69:251,65:[1,249],70:Ob}),a(Ta,[2,74]),a(Ta,[2,78],{55:[1,253],73:[1,252]}),a(Ta,[2,81]),a(hb,[2,82]),a(hb,[2,83]),a(hb,[2,84]),a(hb,[2,85]),{35:181,36:Ma},{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:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,116:176,117:B,118:T,119:S,120:Ib,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},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:t,32:[1,255],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},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:ea}),a(bb,[2,250],{141:77,132:102,138:103,163:ea,165:ia}),a(bb,[2,251],{141:77,132:102,138:103,163:ea,165:ia}),a(bb,[2,252],{141:77,132:102,138:103,163:ea,165:ia}),a(ta,[2,253],{40:xa,41:xa,82:xa,83:xa,84:xa,85:xa,87:xa,90:xa,113:xa,114:xa}),a(Mb,ua,{109:107,78:108,86:114,82:Ra,83:Ga,84:Sa,85:Fa,87:Na,90:Oa,113:Ka}),{78:118,82:Ra,83:Ga,84:Sa,85:Fa,86:114,
87:Na,90:Oa,109:117,113:Ka,114:ua},a(Pb,Wa),a(ta,[2,254],{40:xa,41:xa,82:xa,83:xa,84:xa,85:xa,87:xa,90:xa,113:xa,114:xa}),a(ta,[2,255]),a(ta,[2,256]),{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:ga,31:[1,258],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,
118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,
132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{30:261,31:wa,155:[1,262]},a(ta,[2,192],{126:263,127:[1,264],128:[1,265]}),a(ta,[2,206]),a(ta,[2,214]),{31:[1,266],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Gb,[2,119],{30:271,31:wa,40:xa,41:xa,82:xa,83:xa,84:xa,85:xa,87:xa,90:xa,113:xa,114:xa,96:[1,272]}),a(Ja,[2,199],{141:77,
132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ya,cb,{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ya,[2,123]),{29:[1,273],70:[1,274]},{29:[1,275]},{31:jb,33:280,34:g,94:[1,276],100:277,101:278,103:Xa},a([29,70],[2,139]),{102:[1,282]},{31:wb,33:287,34:g,94:[1,283],103:db,106:284,108:285},a(ya,[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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{29:[1,291]},{6:Ba,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:t,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a([6,31,70,120],Qb,{141:77,132:102,138:103,121:294,73:[1,295],
122:vb,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(xb,[2,173]),a([6,31,120],Ea,{69:296,70:kb}),a(Pa,[2,182]),{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:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,
92:r,95:h,97:y,105:O,111:31,112:u,116:298,117:B,118:T,119:S,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Pa,[2,188]),a(Pa,[2,189]),a(Rb,[2,172]),a(Rb,[2,33]),a(b,[2,165]),{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:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,
62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,115:[1,299],116:300,117:B,118:T,119:S,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{30:301,31:wa,132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},a(Sb,[2,202],{141:77,132:102,138:103,133:C,134:[1,302],135:A,
139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Sb,[2,204],{141:77,132:102,138:103,133:C,134:[1,303],135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ta,[2,210]),a(Ya,[2,211],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),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(lb,[2,218]),{33:194,34:g,60:195,74:196,75:197,92:r,118:f,119:d,143:305,145:193},a(lb,[2,224],{70:[1,306]}),a(mb,[2,220]),a(mb,[2,221]),a(mb,[2,222]),a(mb,[2,223]),a(ta,[2,217]),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,
67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,
79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,
97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(nb,Ea,{69:310,70:Tb}),a(za,[2,111]),a(za,[2,51],{58:[1,312]}),a(Ub,[2,60],{55:[1,313]}),a(za,[2,56]),a(Ub,[2,61]),a(yb,[2,57]),a(yb,[2,58]),a(yb,[2,59]),{46:[1,314],78:118,82:Ra,83:Ga,84:Sa,85:Fa,86:114,87:Na,90:Oa,109:117,113:Ka,114:ua},a(Pb,xa),{6:Ba,42:[1,315]},a(va,[2,4]),a(Vb,[2,258],{141:77,132:102,138:103,163:ea,164:ha,
165:ia}),a(Vb,[2,259],{141:77,132:102,138:103,163:ea,164:ha,165:ia}),a(bb,[2,260],{141:77,132:102,138:103,163:ea,165:ia}),a(bb,[2,261],{141:77,132:102,138:103,163:ea,165:ia}),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:ja,160:da,163:ea,164:ha,165: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],[2,263],{141:77,132:102,138:103,159:ja,160:da,163:ea,
164:ha,165:ia,166:ka,174:ma}),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:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,174:ma}),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:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,174:ma}),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:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,174:ma}),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:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,174:ma}),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:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,174:ma}),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:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,174:ma}),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:ja,160:da,163:ea,164:ha,165:ia,166:ka}),a(Ya,[2,248],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),
a(Ya,[2,247],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(b,[2,160]),a(b,[2,161]),a(Ia,[2,99]),a(Ia,[2,100]),a(Ia,[2,101]),a(Ia,[2,102]),{89:[1,316]},{73:Nb,89:[2,107],121:317,122:vb,132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,181],92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Wb,[2,175]),a(Wb,Xb),a(Ia,[2,106]),a(b,[2,162]),a(va,[2,64],{141:77,132:102,138:103,
133:cb,135:cb,139:cb,156:cb,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,29],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,48],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,
38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{66:321,67:m,68:q},a(Qa,eb,{72:127,33:129,60:130,74:131,75:132,71:322,34:g,73:oa,92:r,118:f,119:d}),{6:Yb,31:Zb},a(Ta,[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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Pa,Qb,{141:77,132:102,138:103,73:[1,326],133:C,135:A,139:D,156:pa,159:ja,
160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a($b,[2,30]),{6:Ba,32:[1,327]},a(Ja,[2,271],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,
67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,
79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Ja,[2,274],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ta,[2,246]),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,
41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,193],{127:[1,331]}),{30:332,31:wa},{30:335,31:wa,33:333,34:g,75:334,92:r},{150:336,152:268,153:ib},{32:[1,337],151:[1,338],152:339,153:ib},a(ob,[2,239]),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,124:340,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ac,[2,117],{141:77,132:102,138:103,30:342,31:wa,
133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,
135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{39:344,40:p,41:l},{92:[1,346],99:345,104:Hb},{39:347,40:p,41:l},{29:[1,348]},a(nb,Ea,{69:349,70:pb}),a(za,[2,130]),{31:jb,33:280,34:g,100:351,101:278,103:Xa},a(za,[2,135],{102:[1,352]}),a(za,[2,137],{102:[1,353]}),{33:354,34:g},a(ya,[2,141]),a(nb,Ea,{69:355,70:zb}),a(za,[2,150]),{31:wb,33:287,34:g,103:db,106:357,108:285},a(za,[2,155],{102:[1,358]}),a(za,[2,158],{102:[1,359]}),{6:[1,361],7:360,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:ga,31:[1,362],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Ab,[2,147],{141:77,132:102,138:103,
133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{39:363,40:p,41:l},a(Aa,[2,200]),{6:Ba,32:[1,364]},{7:365,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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,
119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},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:fb,31:fb,70:fb,120:fb}),{6:qb,31:rb,120:[1,366]},a([6,31,32,115,120],eb,{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:c,28:ga,34:g,38:v,40:p,41:l,44:G,45:F,48:x,49:w,50:K,51:M,52:I,53:z,61:E,62:N,63:k,67:m,68:q,73:Va,92:r,95:h,97:y,105:O,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,133:C,135:A,137:W,139:D,149:P,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q}),a(Qa,Ea,{69:370,70:kb}),a(b,[2,168]),a([6,31,115],Ea,{69:371,70:kb}),a(bc,[2,243]),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:374,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:ga,33:70,
34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(lb,[2,219]),{33:194,34:g,60:195,74:196,75:197,92:r,118:f,119:d,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:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Bb,[2,227],{141:77,132:102,138:103,134:[1,378],159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Bb,[2,233],{141:77,132:102,138:103,134:[1,379],159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{6:cc,31:dc,94:[1,380]},a(Cb,eb,{39:80,57:204,59:205,11:206,37:207,33:208,35:209,
60:210,56:383,34:g,36:Ma,38:v,40:p,41:l,62:N,118:f}),{7:384,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:ga,31:[1,385],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,
158:U,159:aa,160:J,161:ca,162:Q},{7:386,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:ga,31:[1,387],33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,
161:ca,162:Q},a(Aa,[2,39]),a(Lb,[2,37]),a(Ia,[2,105]),{7:388,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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,179],92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,
158:U,159:aa,160:J,161:ca,162:Q},{89:[2,180],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},a(Ja,[2,49],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{32:[1,389],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{30:390,31:wa},a(Ta,
[2,75]),{33:129,34:g,60:130,71:391,72:127,73:oa,74:131,75:132,92:r,118:f,119:d},a(ec,n,{71:126,72:127,33:129,60:130,74:131,75:132,64:392,34:g,73:oa,92:r,118:f,119:d}),a(Ta,[2,80],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Pa,fb),a($b,[2,31]),{32:[1,393],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},
a(Ja,[2,273],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{30:394,31:wa,132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{30:395,31:wa},a(ta,[2,194]),{30:396,31:wa},{30:397,31:wa},a(Db,[2,198]),{32:[1,398],151:[1,399],152:339,153:ib},a(ta,[2,237]),{30:400,31:wa},a(ob,[2,240]),{30:401,31:wa,70:[1,402]},a(fc,[2,190],{141:77,132:102,
138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ta,[2,118]),a(ac,[2,121],{141:77,132:102,138:103,30:403,31:wa,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ya,[2,124]),{29:[1,404]},{31:jb,33:280,34:g,100:405,101:278,103:Xa},a(ya,[2,125]),{39:406,40:p,41:l},{6:sb,31:tb,94:[1,407]},a(Cb,eb,{33:280,101:410,34:g,103:Xa}),a(Qa,Ea,{69:411,70:pb}),{33:412,
34:g},{33:413,34:g},{29:[2,140]},{6:Eb,31:Fb,94:[1,414]},a(Cb,eb,{33:287,108:417,34:g,103:db}),a(Qa,Ea,{69:418,70:zb}),{33:419,34:g,103:[1,420]},{33:421,34:g},a(Ab,[2,144],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:422,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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,
50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:423,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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,
61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ya,[2,148]),{131:[1,424]},{120:[1,425],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},a(xb,[2,174]),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,123:426,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,31:ab,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,73:Va,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,116:427,117:B,118:T,119:S,123:177,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(Pa,[2,183]),{6:qb,31:rb,32:[1,428]},{6:qb,31:rb,115:[1,429]},
a(Ya,[2,203],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ya,[2,205],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ya,[2,216],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(lb,[2,225]),{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:432,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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:433,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:ga,
33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(xb,[2,109]),{11:206,33:208,34:g,35:209,36:Ma,37:207,38:v,39:80,40:p,41:l,56:434,57:204,59:205,60:210,62:N,118:f},a(ec,Jb,{39:80,56:203,57:204,59:205,
11:206,37:207,33:208,35:209,60:210,93:435,34:g,36:Ma,38:v,40:p,41:l,62:N,118:f}),a(za,[2,112]),a(za,[2,52],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:436,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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,
68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(za,[2,54],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{7:437,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:ga,
33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{89:[2,178],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},
a(ta,[2,50]),a(ta,[2,67]),a(Ta,[2,76]),a(Qa,Ea,{69:438,70:Ob}),a(ta,[2,272]),a(bc,[2,244]),a(ta,[2,195]),a(Db,[2,196]),a(Db,[2,197]),a(ta,[2,235]),{30:439,31:wa},{32:[1,440]},a(ob,[2,241],{6:[1,441]}),{7:442,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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,
97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},a(ta,[2,122]),{39:443,40:p,41:l},a(nb,Ea,{69:444,70:pb}),a(ya,[2,126]),{29:[1,445]},{33:280,34:g,101:446,103:Xa},{31:jb,33:280,34:g,100:447,101:278,103:Xa},a(za,[2,131]),{6:sb,31:tb,32:[1,448]},a(za,[2,136]),a(za,[2,138]),a(ya,[2,142],{29:[1,449]}),{33:287,34:g,103:db,108:450},{31:wb,33:287,34:g,103:db,106:451,108:285},a(za,[2,151]),
{6:Eb,31:Fb,32:[1,452]},a(za,[2,156]),a(za,[2,157]),a(za,[2,159]),a(Ab,[2,145],{141:77,132:102,138:103,133:C,135:A,139:D,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),{32:[1,453],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},a(Aa,[2,201]),a(Aa,[2,177]),a(Pa,[2,184]),a(Qa,Ea,{69:454,70:kb}),a(Pa,[2,185]),a(b,[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:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Bb,[2,230],{141:77,132:102,138:103,134:[1,456],159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,229],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,234],{141:77,132:102,138:103,159:ja,
160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(za,[2,113]),a(Qa,Ea,{69:457,70:Tb}),{32:[1,458],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{32:[1,459],132:102,133:C,135:A,138:103,139:D,141:77,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma},{6:Yb,31:Zb,32:[1,460]},{32:[1,461]},a(ta,[2,238]),a(ob,[2,
242]),a(fc,[2,191],{141:77,132:102,138:103,133:C,135:A,139:D,156:pa,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(ya,[2,128]),{6:sb,31:tb,94:[1,462]},{39:463,40:p,41:l},a(za,[2,132]),a(Qa,Ea,{69:464,70:pb}),a(za,[2,133]),{39:465,40:p,41:l},a(za,[2,152]),a(Qa,Ea,{69:466,70:zb}),a(za,[2,153]),a(ya,[2,146]),{6:qb,31:rb,32:[1,467]},{7:468,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:ga,33:70,34:g,37:55,38:v,39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{7:469,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:ga,33:70,34:g,37:55,38:v,
39:80,40:p,41:l,43:57,44:G,45:F,47:27,48:x,49:w,50:K,51:M,52:I,53:z,54:26,60:71,61:E,62:N,63:k,66:33,67:m,68:q,74:53,75:54,77:40,79:28,80:29,81:30,92:r,95:h,97:y,105:O,111:31,112:u,117:B,118:T,119:S,125:H,129:ba,130:R,132:43,133:C,135:A,136:44,137:W,138:45,139:D,141:77,149:P,154:41,155:Y,157:Z,158:U,159:aa,160:J,161:ca,162:Q},{6:cc,31:dc,32:[1,470]},a(za,[2,53]),a(za,[2,55]),a(Ta,[2,77]),a(ta,[2,236]),{29:[1,471]},a(ya,[2,127]),{6:sb,31:tb,32:[1,472]},a(ya,[2,149]),{6:Eb,31:Fb,32:[1,473]},a(Pa,[2,
186]),a(Ja,[2,231],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(Ja,[2,232],{141:77,132:102,138:103,159:ja,160:da,163:ea,164:ha,165:ia,166:ka,167:la,168:L,169:fa,170:qa,171:ra,172:X,173:sa,174:ma}),a(za,[2,114]),{39:474,40:p,41:l},a(za,[2,134]),a(za,[2,154]),a(ya,[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],f=[],n=this.table,oa="",c=0,g=0,e=0,h=f.slice.call(arguments,1),wa=Object.create(this.lexer),La={},k;for(k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(La[k]=this.yy[k]);wa.setInput(a,La);La.lexer=wa;La.parser=this;"undefined"==typeof wa.yylloc&&(wa.yylloc={});k=wa.yylloc;f.push(k);var m=wa.options&&wa.options.ranges;this.parseError="function"===typeof La.parseError?La.parseError:Object.getPrototypeOf(this).parseError;
for(var q,Wa,p,r,y={},l,u;;){p=b[b.length-1];if(this.defaultActions[p])r=this.defaultActions[p];else{if(null===q||"undefined"==typeof q)q=wa.lex()||1,"number"!==typeof q&&(q=this.symbols_[q]||q);r=n[p]&&n[p][q]}if("undefined"===typeof r||!r.length||!r[0]){var xa;u=[];for(l in n[p])this.terminals_[l]&&2<l&&u.push("'"+this.terminals_[l]+"'");xa=wa.showPosition?"Parse error on line "+(c+1)+":\n"+wa.showPosition()+"\nExpecting "+u.join(", ")+", got '"+(this.terminals_[q]||q)+"'":"Parse error on line "+
(c+1)+": Unexpected "+(1==q?"end of input":"'"+(this.terminals_[q]||q)+"'");this.parseError(xa,{text:wa.match,token:this.terminals_[q]||q,line:wa.yylineno,loc:k,expected:u})}if(r[0]instanceof Array&&1<r.length)throw Error("Parse Error: multiple actions possible at state: "+p+", token: "+q);switch(r[0]){case 1:b.push(q);d.push(wa.yytext);f.push(wa.yylloc);b.push(r[1]);q=null;Wa?(q=Wa,Wa=null):(g=wa.yyleng,oa=wa.yytext,c=wa.yylineno,k=wa.yylloc,0<e&&e--);break;case 2:u=this.productions_[r[1]][1];y.$=
d[d.length-u];y._$={first_line:f[f.length-(u||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(u||1)].first_column,last_column:f[f.length-1].last_column};m&&(y._$.range=[f[f.length-(u||1)].range[0],f[f.length-1].range[1]]);p=this.performAction.apply(y,[oa,g,c,La,r[1],d,f].concat(h));if("undefined"!==typeof p)return p;u&&(b=b.slice(0,-2*u),d=d.slice(0,-1*u),f=f.slice(0,-1*u));b.push(this.productions_[r[1]][0]);d.push(y.$);f.push(y._$);r=n[b[b.length-2]][b[b.length-1]];b.push(r);
break;case 3:return!0}}}};e.prototype=gc;gc.Parser=e;return new e}();"undefined"!==typeof t&&"undefined"!==typeof e&&(e.parser=Ba,e.Parser=Ba.Parser,e.parse=function(){return Ba.parse.apply(Ba,arguments)},e.main=function(V){V[1]||(console.log("Usage: "+V[0]+" FILE"),process.exit(1));var a="",c=t("fs");"undefined"!==typeof c&&null!==c&&(a=c.readFileSync(t("path").normalize(V[1]),"utf8"));return e.parser.parse(a)},"undefined"!==typeof va&&t.main===va&&e.main(process.argv.slice(1)));return va.exports}();
t["./scope"]=function(){var e={};(function(){var t=[].indexOf||function(e){for(var V=0,a=this.length;V<a;V++)if(V in this&&this[V]===e)return V;return-1};e.Scope=function(){function e(e,a,c,t){var g,V;this.parent=e;this.expressions=a;this.method=c;this.referencedVars=t;this.variables=[{name:"arguments",type:"arguments"}];this.positions={};this.parent||(this.utilities={});this.root=null!=(g=null!=(V=this.parent)?V.root:void 0)?g:this}e.prototype.add=function(e,a,c){return this.shared&&!c?this.parent.add(e,
a,c):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=a:this.positions[e]=this.variables.push({name:e,type:a})-1};e.prototype.namedMethod=function(){var e;return null!=(e=this.method)&&e.name||!this.parent?this.method:this.parent.namedMethod()};e.prototype.find=function(e,a){null==a&&(a="var");if(this.check(e))return!0;this.add(e,a);return!1};e.prototype.parameter=function(e){if(!this.shared||!this.parent.check(e,!0))return this.add(e,"param")};e.prototype.check=
function(e){var a;return!!(this.type(e)||null!=(a=this.parent)&&a.check(e))};e.prototype.temporary=function(e,a,c){null==c&&(c=!1);return c?(c=e.charCodeAt(0),e=122-c,c=String.fromCharCode(c+a%(e+1)),a=Math.floor(a/(e+1)),""+c+(a||"")):""+e+(a||"")};e.prototype.type=function(e){var a,c,t,g;t=this.variables;a=0;for(c=t.length;a<c;a++)if(g=t[a],g.name===e)return g.type;return null};e.prototype.freeVariable=function(e,a){var c,V,g;null==a&&(a={});for(c=0;;){g=this.temporary(e,c,a.single);if(!(this.check(g)||
0<=t.call(this.root.referencedVars,g)))break;c++}(null!=(V=a.reserve)?V:1)&&this.add(g,"var",!0);return g};e.prototype.assign=function(e,a){this.add(e,{value:a,assigned:!0},!0);return this.hasAssignments=!0};e.prototype.hasDeclarations=function(){return!!this.declaredVariables().length};e.prototype.declaredVariables=function(){var e,a,c,t,g;t=this.variables;g=[];a=0;for(c=t.length;a<c;a++)e=t[a],"var"===e.type&&g.push(e.name);return g.sort()};e.prototype.assignedVariables=function(){var e,a,c,t,g;
c=this.variables;t=[];e=0;for(a=c.length;e<a;e++)g=c[e],g.type.assigned&&t.push(g.name+" \x3d "+g.type.value);return t};return e}()}).call(this);return e}();t["./nodes"]=function(){var e={};(function(){var va,pa,V,a,c,Da,g,v,p,l,G,F,x,w,K,M,I,z,E,N,k,m,q,r,h,y,O,u,B,T,S,H,ba,R,C,A,W,D,P,Y,Z,U,aa,J,ca,Q,ua,Za,Ua,ja,da,ea,ha,ia,ka,la,L,fa,qa,ra,X,sa,ma,Ca,ta,gb,Ra,Ga,Sa,Fa,Na,Oa,Ka,ya,na=function(a,b){function n(){this.constructor=a}for(var oa in b)ga.call(b,oa)&&(a[oa]=b[oa]);n.prototype=b.prototype;
a.prototype=new n;a.__super__=b.prototype;return a},ga={}.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;J=t("./scope").Scope;a=t("./lexer");Ga=a.isUnassignable;m=a.JS_FORBIDDEN;w=t("./helpers");ra=w.compact;ma=w.flatten;sa=w.extend;Fa=w.merge;X=w.del;a=w.addLocationDataFn;Sa=w.locationDataToString;Oa=w.throwSyntaxError;e.extend=sa;e.addLocationDataFn=a;fa=function(){return!0};H=function(){return!1};
ea=function(){return this};S=function(){this.negated=!this.negated;return this};e.CodeFragment=l=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?": "+Sa(this.locationData):"")};return a}();Ca=function(a){var b,n,oa,f;f=[];n=0;for(oa=a.length;n<oa;n++)b=a[n],f.push(b.code);return f.join("")};e.Base=a=function(){function a(){}
a.prototype.compile=function(a,n){return Ca(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!==u&&n.isStatement(a)?n.compileClosure(a):n.compileNode(a)};a.prototype.compileClosure=function(a){var b,oa,f,d;(f=this.jumps())&&f.error("cannot use a pure statement in an expression");a.sharedScope=!0;f=new p([],c.wrap([this]));b=[];if((oa=this.contains(gb))||this.contains(Ra))b=[new ha],oa?(oa=
"apply",b.push(new z("arguments"))):oa="call",f=new L(f,[new va(new P(oa))]);a=(new g(f,b)).compileNode(a);if(f.isGenerator||null!=(d=f.base)&&d.isGenerator)a.unshift(this.makeCode("(yield* ")),a.push(this.makeCode(")"));return a};a.prototype.cache=function(a,n,oa){var b;if(null!=oa?oa(this):this.isComplex())return oa=new z(a.scope.freeVariable("ref")),b=new V(oa,this),n?[b.compileToFragments(a,n),[this.makeCode(oa.value)]]:[b,oa];oa=n?this.compileToFragments(a,n):this;return[oa,oa]};a.prototype.cacheToCodeFragments=
function(a){return[Ca(a[0]),Ca(a[1])]};a.prototype.makeReturn=function(a){var b;b=this.unwrapAll();return a?new g(new B(a+".push"),[b]):new U(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(f){return b+=f.toString(a+da)});return b};a.prototype.eachChild=function(a){var b,oa,f,d,c,e,g;if(!this.children)return this;e=this.children;oa=0;for(d=e.length;oa<d;oa++)if(b=e[oa],this[b])for(g=ma([this[b]]),f=0,c=g.length;f<c;f++)if(b=g[f],!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 A("!",this)};a.prototype.unwrapAll=
function(){var a;for(a=this;a!==(a=a.unwrap()););return a};a.prototype.children=[];a.prototype.isStatement=H;a.prototype.jumps=H;a.prototype.isComplex=fa;a.prototype.isChainable=H;a.prototype.isAssignable=H;a.prototype.isNumber=H;a.prototype.unwrap=ea;a.prototype.unfoldSoak=H;a.prototype.assigns=H;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 Oa(a,
this.locationData)};a.prototype.makeCode=function(a){return new l(this,a)};a.prototype.wrapInBraces=function(a){return[].concat(this.makeCode("("),a,this.makeCode(")"))};a.prototype.joinFragmentArrays=function(a,n){var b,f,d,c,e;b=[];d=c=0;for(e=a.length;c<e;d=++c)f=a[d],d&&b.push(this.makeCode(n)),b=b.concat(f);return b};return a}();e.Block=c=function(a){function b(a){this.expressions=ra(ma(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,f,d,n;n=this.expressions;f=0;for(d=n.length;f<d;f++)if(b=n[f],b.isStatement(a))return!0;return!1};b.prototype.jumps=function(a){var b,f,d,n;n=this.expressions;f=
0;for(d=n.length;f<d;f++)if(b=n[f],b=b.jumps(a))return b};b.prototype.makeReturn=function(a){var b,f;for(f=this.expressions.length;f--;)if(b=this.expressions[f],!(b instanceof G)){this.expressions[f]=b.makeReturn(a);b instanceof U&&!b.expression&&this.expressions.splice(f,1);break}return this};b.prototype.compileToFragments=function(a,oa){null==a&&(a={});return a.scope?b.__super__.compileToFragments.call(this,a,oa):this.compileRoot(a)};b.prototype.compileNode=function(a){var n,f,d,c,e,g,k;this.tab=
a.indent;k=a.level===u;f=[];g=this.expressions;d=n=0;for(c=g.length;n<c;d=++n)e=g[d],e=e.unwrapAll(),e=e.unfoldSoak(a)||e,e instanceof b?f.push(e.compileNode(a)):k?(e.front=!0,d=e.compileToFragments(a),e.isStatement(a)||(d.unshift(this.makeCode(""+this.tab)),d.push(this.makeCode(";"))),f.push(d)):f.push(e.compileToFragments(a,h));if(k)return this.spaced?[].concat(this.joinFragmentArrays(f,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(f,"\n");n=f.length?this.joinFragmentArrays(f,", "):[this.makeCode("void 0")];
return 1<f.length&&a.level>=h?this.wrapInBraces(n):n};b.prototype.compileRoot=function(a){var b,f,d,n,c;a.indent=a.bare?"":da;a.level=u;this.spaced=!0;a.scope=new J(null,this,null,null!=(d=a.referencedVars)?d:[]);c=a.locals||[];d=0;for(f=c.length;d<f;d++)n=c[d],a.scope.parameter(n);d=[];if(!a.bare){var e;e=this.expressions;f=[];b=n=0;for(c=e.length;n<c;b=++n){b=e[b];if(!(b.unwrap()instanceof G))break;f.push(b)}n=this.expressions.slice(f.length);this.expressions=f;f.length&&(d=this.compileNode(Fa(a,
{indent:""})),d.push(this.makeCode("\n")));this.expressions=n}f=this.compileWithDeclarations(a);return a.bare?f:[].concat(d,this.makeCode("(function() {\n"),f,this.makeCode("\n}).call(this);\n"))};b.prototype.compileWithDeclarations=function(a){var b,f,d,n,c,e;d=[];e=this.expressions;n=c=0;for(b=e.length;c<b&&(f=e[n],f=f.unwrap(),f instanceof G||f instanceof B);n=++c);a=Fa(a,{level:u});n&&(f=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=f);f=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+da))),d.push(this.makeCode(c.assignedVariables().join(",\n"+(this.tab+da))))),d.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):d.length&&f.length&&d.push(this.makeCode("\n")));return d.concat(f)};
b.wrap=function(a){return 1===a.length&&a[0]instanceof b?a[0]:new b(a)};return b}(a);e.Literal=B=function(a){function b(a){this.value=a}na(b,a);b.prototype.isComplex=H;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);e.NumberLiteral=R=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(B);e.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}(R);e.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}(R);e.StringLiteral=Za=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(B);e.RegexLiteral=Z=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(B);e.PassthroughLiteral=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(B);e.IdentifierLiteral=z=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isAssignable=fa;return b}(B);e.PropertyName=P=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);b.prototype.isAssignable=fa;return b}(B);e.StatementLiteral=ua=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isStatement=fa;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}(B);e.ThisLiteral=ha=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}(B);e.UndefinedLiteral=la=function(a){function b(){b.__super__.constructor.call(this,"undefined")}na(b,a);b.prototype.compileNode=function(a){return[this.makeCode(a.level>=q?"(void 0)":"void 0")]};return b}(B);e.NullLiteral=ba=function(a){function b(){b.__super__.constructor.call(this,"null")}na(b,a);return b}(B);e.BooleanLiteral=Da=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(B);e.Return=U=function(a){function b(a){this.expression=a}na(b,a);b.prototype.children=["expression"];b.prototype.isStatement=fa;b.prototype.makeReturn=ea;b.prototype.jumps=ea;b.prototype.compileToFragments=function(a,oa){var f,d;f=null!=(d=this.expression)?d.makeReturn():void 0;return!f||f instanceof b?b.__super__.compileToFragments.call(this,a,oa):f.compileToFragments(a,oa)};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,O)));b.push(this.makeCode(";"));return b};return b}(a);e.YieldReturn=qa=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}(U);e.Value=L=function(a){function b(a,oa,f){if(!oa&&a instanceof b)return a;this.base=a;this.properties=
oa||[];f&&(this[f]=!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(pa)};b.prototype.isRange=function(){return this.bareLiteral(Y)};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(R)};b.prototype.isString=function(){return this.bareLiteral(Za)};b.prototype.isRegex=function(){return this.bareLiteral(Z)};b.prototype.isUndefined=function(){return this.bareLiteral(la)};b.prototype.isNull=function(){return this.bareLiteral(ba)};b.prototype.isBoolean=function(){return this.bareLiteral(Da)};b.prototype.isAtomic=function(){var a,
b,f,d;d=this.properties.concat(this.base);a=0;for(b=d.length;a<b;a++)if(f=d[a],f.soak||f instanceof g)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 C&&(!a||this.base.generated)};b.prototype.isSplice=function(){var a;a=this.properties;return a[a.length-1]instanceof ca};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,f,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()&&(f=new z(a.scope.freeVariable("base")),n=new b(new D(new V(f,n))));if(!d)return[n,f];d.isComplex()&&(c=new z(a.scope.freeVariable("name")),d=new k(new V(c,d.index)),c=new k(c));return[n.add(d),new b(f||n.base,[c||d])]};b.prototype.compileNode=
function(a){var b,f,d,n,c;this.base.front=this.front;c=this.properties;b=this.base.compileToFragments(a,c.length?q:null);c.length&&aa.test(Ca(b))&&b.push(this.makeCode("."));f=0;for(d=c.length;f<d;f++)n=c[f],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 f,d,c,oa,e;if(d=n.base.unfoldSoak(a))return(f=d.body.properties).push.apply(f,n.properties),d;e=n.properties;
d=f=0;for(c=e.length;f<c;d=++f)if(oa=e[d],oa.soak)return oa.soak=!1,f=new b(n.base,n.properties.slice(0,d)),c=new b(n.base,n.properties.slice(d)),f.isComplex()&&(d=new z(a.scope.freeVariable("ref")),f=new D(new V(d,f)),c.base=d),new E(new F(f),c,{soak:!0});return!1}}(this)()};return b}(a);e.Comment=G=function(a){function b(a){this.comment=a}na(b,a);b.prototype.isStatement=fa;b.prototype.makeReturn=ea;b.prototype.compileNode=function(a,b){var f;f=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *");f="/*"+
Na(f,this.tab)+(0<=Ha.call(f,"\n")?"\n"+this.tab:"")+" */";(b||a.level)===u&&(f=a.indent+f);return[this.makeCode("\n"),this.makeCode(f)]};return b}(a);e.Call=g=function(a){function b(a,b,f){this.variable=a;this.args=null!=b?b:[];this.soak=f;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,f;this.locationData&&this.needsUpdatedStartLocation&&
(this.locationData.first_line=a.first_line,this.locationData.first_column=a.first_column,n=(null!=(f=this.variable)?f.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,f,d,c,e;if(this.soak){if(this instanceof ja)n=new B(this.superReference(a)),f=new L(n);else{if(f=Ka(a,this,"variable"))return f;f=(new L(this.variable)).cacheReference(a);n=f[0];f=f[1]}f=new b(f,this.args);f.isNew=this.isNew;n=new B("typeof "+n.compile(a)+' \x3d\x3d\x3d "function"');return new E(n,new L(f),{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}e=d.reverse();d=0;for(c=e.length;d<c;d++)n=e[d],f&&(n.variable instanceof b?n.variable=f:n.variable.base=f),f=Ka(a,n,"variable");return f};b.prototype.compileNode=function(a){var b,f,d,n,c,e;null!=(d=this.variable)&&(d.front=this.front);d=Q.compileSplattedArray(a,this.args,!0);if(d.length)return this.compileSplat(a,d);d=[];e=this.args;f=n=0;for(c=e.length;n<c;f=++n)b=e[f],f&&d.push(this.makeCode(", ")),
d.push.apply(d,b.compileToFragments(a,h));b=[];this instanceof ja?(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,q)),b.push(this.makeCode("(")));b.push.apply(b,d);b.push(this.makeCode(")"));return b};b.prototype.compileSplat=function(a,b){var f,d,n,c;if(this instanceof ja)return[].concat(this.makeCode(this.superReference(a)+".apply("+this.superThis(a)+
", "),b,this.makeCode(")"));if(this.isNew)return f=this.tab+da,[].concat(this.makeCode("(function(func, args, ctor) {\n"+f+"ctor.prototype \x3d func.prototype;\n"+f+"var child \x3d new ctor, result \x3d func.apply(child, args);\n"+f+"return Object(result) \x3d\x3d\x3d result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(a,h),this.makeCode(", "),b,this.makeCode(", function(){})"));f=[];d=new L(this.variable);(n=d.properties.pop())&&d.isComplex()?(c=a.scope.freeVariable("ref"),
f=f.concat(this.makeCode("("+c+" \x3d "),d.compileToFragments(a,h),this.makeCode(")"),n.compileToFragments(a))):(d=d.compileToFragments(a,q),aa.test(Ca(d))&&(d=this.wrapInBraces(d)),n?(c=Ca(d),d.push.apply(d,n.compileToFragments(a))):c="null",f=f.concat(d));return f.concat(this.makeCode(".apply("+c+", "),b,this.makeCode(")"))};return b}(a);e.SuperCall=ja=function(a){function b(a){b.__super__.constructor.call(this,null,null!=a?a:[new Q(new z("arguments"))]);this.isBare=null!=a}na(b,a);b.prototype.superReference=
function(a){var b,f,d,c,n,e,g;c=a.scope.namedMethod();if(null!=c&&c.klass){d=c.klass;n=c.name;g=c.variable;d.isComplex()&&(f=new z(a.scope.parent.freeVariable("base")),b=new L(new D(new V(f,d))),g.base=b,g.properties.splice(0,d.properties.length));if(n.isComplex()||n instanceof k&&n.index.isAssignable())e=new z(a.scope.parent.freeVariable("name")),n=new k(new V(e,n.index)),g.properties.pop(),g.properties.push(n);b=[new va(new P("__super__"))];c["static"]&&b.push(new va(new P("constructor")));b.push(null!=
e?new k(e):n);return(new L(null!=f?f: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}(g);e.RegexWithInterpolations=function(a){function b(a){null==a&&(a=[]);b.__super__.constructor.call(this,new L(new z("RegExp")),a,!1)}na(b,a);return b}(g);e.TaggedTemplateCall=function(a){function b(a,oa,f){oa instanceof Za&&(oa=
new Ua(c.wrap([new L(oa)])));b.__super__.constructor.call(this,a,[oa],f)}na(b,a);b.prototype.compileNode=function(a){a.inTaggedTemplateCall=!0;return this.variable.compileToFragments(a,q).concat(this.args[0].compileToFragments(a,h))};return b}(g);e.Extends=M=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 g(new L(new B(ya("extend",a))),[this.child,this.parent])).compileToFragments(a)};return b}(a);
e.Access=va=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,f;a=this.name.compileToFragments(a);b=this.name.unwrap();return b instanceof P?(f=b.value,0<=Ha.call(m,f))?[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=H;return b}(a);e.Index=k=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,O),this.makeCode("]"))};b.prototype.isComplex=function(){return this.index.isComplex()};return b}(a);e.Range=Y=function(a){function b(a,b,f){this.from=a;this.to=b;this.equals=(this.exclusive="exclusive"===f)?"":"\x3d"}na(b,a);b.prototype.children=["from","to"];b.prototype.compileVariables=function(a){var b,f;a=Fa(a,{top:!0});b=X(a,"isComplex");f=this.cacheToCodeFragments(this.from.cache(a,
h,b));this.fromC=f[0];this.fromVar=f[1];f=this.cacheToCodeFragments(this.to.cache(a,h,b));this.toC=f[0];this.toVar=f[1];if(f=X(a,"step"))a=this.cacheToCodeFragments(f.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!=f&&f.isNumber()?Number(this.stepVar):null};b.prototype.compileNode=function(a){var b,f,d,c,n,e,g,h,k,m;this.fromVar||this.compileVariables(a);if(!a.index)return this.compileArray(a);
e=null!=this.fromNum&&null!=this.toNum;n=X(a,"index");g=(a=X(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];f=c[0];c=c[1];f=null!=this.stepNum?0<this.stepNum?f+" "+this.toVar:c+" "+this.toVar:e?(h=[this.fromNum,this.toNum],d=h[0],k=h[1],h,d<=k?f+" "+k:c+" "+k):(b=this.stepVar?this.stepVar+" \x3e 0":this.fromVar+" \x3c\x3d "+this.toVar,b+" ? "+f+" "+this.toVar+" : "+c+
" "+this.toVar);b=this.stepVar?n+" +\x3d "+this.stepVar:e?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+"; "+f+"; "+b)]};b.prototype.compileArray=function(a){var b,f,d,c,n,e,g,h,k;if((f=null!=this.fromNum&&null!=this.toNum)&&20>=Math.abs(this.fromNum-this.toNum))return b=function(){h=[];for(var a=e=this.fromNum,b=this.toNum;e<=b?a<=b:a>=b;e<=b?a++:a--)h.push(a);return h}.apply(this),this.exclusive&&
b.pop(),[this.makeCode("["+b.join(", ")+"]")];c=this.tab+da;d=a.scope.freeVariable("i",{single:!0});g=a.scope.freeVariable("results");n="\n"+c+g+" \x3d [];";f?(a.index=d,f=Ca(this.compileNode(a))):(k=d+" \x3d "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),f=this.fromVar+" \x3c\x3d "+this.toVar,f="var "+k+"; "+f+" ? "+d+" \x3c"+this.equals+" "+this.toVar+" : "+d+" \x3e"+this.equals+" "+this.toVar+"; "+f+" ? "+d+"++ : "+d+"--");d="{ "+g+".push("+d+"); }\n"+c+"return "+g+";\n"+a.indent;a=function(a){return null!=
a?a.contains(gb):void 0};if(a(this.from)||a(this.to))b=", arguments";return[this.makeCode("(function() {"+n+"\n"+c+"for ("+f+")"+d+"}).apply(this"+(null!=b?b:"")+")")]};return b}(a);e.Slice=ca=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,f,d,c,n;b=this.range;c=b.to;d=(b=b.from)&&b.compileToFragments(a,O)||[this.makeCode("0")];c&&(b=c.compileToFragments(a,O),f=Ca(b),this.range.exclusive||-1!==
+f)&&(n=", "+(this.range.exclusive?f:c.isNumber()?""+(+f+1):(b=c.compileToFragments(a,q),"+"+Ca(b)+" + 1 || 9e9")));return[this.makeCode(".slice("+Ca(d)+(n||"")+")")]};return b}(a);e.Obj=C=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,f,d,c,n,e,g,h,k,m,q,r,p;p=this.properties;if(this.generated)for(f=0,b=p.length;f<b;f++)d=p[f],d instanceof L&&d.error("cannot have an implicit value in an implicit object");
f=b=0;for(d=p.length;b<d&&!(r=p[f],(r.variable||r).base instanceof D);f=++b);d=f<p.length;n=a.indent+=da;k=this.lastNonComment(this.properties);b=[];d&&(q=a.scope.freeVariable("obj"),b.push(this.makeCode("(\n"+n+q+" \x3d ")));b.push(this.makeCode("{"+(0===p.length||0===f?"}":"\n")));c=h=0;for(m=p.length;h<m;c=++h)r=p[c],c===f&&(0!==c&&b.push(this.makeCode("\n"+n+"}")),b.push(this.makeCode(",\n"))),g=c===p.length-1||c===f-1?"":r===k||r instanceof G?"\n":",\n",e=r instanceof G?"":n,d&&c<f&&(e+=da),
r instanceof V&&("object"!==r.context&&r.operatorToken.error("unexpected "+r.operatorToken.value),r.variable instanceof L&&r.variable.hasProperties()&&r.variable.error("invalid object key")),r instanceof L&&r["this"]&&(r=new V(r.properties[0].name,r,"object")),r instanceof G||(c<f?r instanceof V||(r=new V(r,r,"object")):(r instanceof V?(c=r.variable,r=r.value):(r=r.base.cache(a),c=r[0],r=r[1],c instanceof z&&(c=new P(c.value))),r=new V(new L(new z(q),[new va(c)]),r))),e&&b.push(this.makeCode(e)),
b.push.apply(b,r.compileToFragments(a,u)),g&&b.push(this.makeCode(g));d?b.push(this.makeCode(",\n"+n+q+"\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,f,d,c;c=this.properties;b=0;for(f=c.length;b<f;b++)if(d=c[b],d.assigns(a))return!0;return!1};return b}(a);e.Arr=pa=function(a){function b(a){this.objects=a||[]}na(b,a);b.prototype.children=["objects"];b.prototype.compileNode=function(a){var b,
f,d,c,n;if(!this.objects.length)return[this.makeCode("[]")];a.indent+=da;b=Q.compileSplattedArray(a,this.objects);if(b.length)return b;b=[];var e;n=this.objects;e=[];d=0;for(c=n.length;d<c;d++)f=n[d],e.push(f.compileToFragments(a,h));d=c=0;for(n=e.length;c<n;d=++c)f=e[d],d&&b.push(this.makeCode(", ")),b.push.apply(b,f);0<=Ca(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,f,d,c;c=this.objects;b=0;for(f=c.length;b<f;b++)if(d=c[b],d.assigns(a))return!0;return!1};return b}(a);e.Class=v=function(a){function b(a,b,f){this.variable=a;this.parent=b;this.body=null!=f?f: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 va&&a.name:this.variable.base;if(!(b instanceof z||b instanceof P))return this.defaultClassVariableName;b=b.value;a||(a=Ga(b))&&this.variable.error(a);return 0<=Ha.call(m,b)?"_"+b:b};b.prototype.setContext=function(a){return this.body.traverseChildren(!1,function(b){if(b.classBody)return!1;if(b instanceof ha)return b.value=a;if(b instanceof p&&b.bound)return b.context=a})};b.prototype.addBoundFunctions=function(a){var b,f,d,c;c=this.boundFuncs;f=0;for(d=c.length;f<d;f++)b=c[f],b=
(new L(new ha,[new va(b)])).compile(a),this.ctor.body.unshift(new B(b+" \x3d "+ya("bind",a)+"("+b+", this)"))};b.prototype.addProperties=function(a,b,f){var d,c,n,e;e=a.base.properties.slice(0);var g;for(g=[];d=e.shift();)d instanceof V&&(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 p?d=this.ctor=n:(this.externalCtor=f.classScope.freeVariable("ctor"),
d=new V(new z(this.externalCtor),n))):d.variable["this"]?n["static"]=!0:(a=c.isComplex()?new k(c):new va(c),d.variable=new L(new z(b),[new va(new P("prototype")),a]),n instanceof p&&n.bound&&(this.boundFuncs.push(c),n.bound=!1))),g.push(d);return ra(g)};b.prototype.walkBody=function(a,e){return this.traverseChildren(!1,function(f){return function(d){var n,g,oa,h,k,m,q;n=!0;if(d instanceof b)return!1;if(d instanceof c){q=g=d.expressions;oa=h=0;for(k=q.length;h<k;oa=++h)m=q[oa],m instanceof V&&m.variable.looksStatic(a)?
m.value["static"]=!0:m instanceof L&&m.isObject(!0)&&(n=!1,g[oa]=f.addProperties(m,a,e));d.expressions=ma(g)}return n&&!(d instanceof b)}}(this))};b.prototype.hoistDirectivePrologue=function(){var a,b,f;b=0;for(a=this.body.expressions;(f=a[b])&&f instanceof G||f instanceof L&&f.isString();)++b;return this.directives=a.splice(0,b)};b.prototype.ensureConstructor=function(a){this.ctor||(this.ctor=new p,this.externalCtor?this.ctor.body.push(new B(this.externalCtor+".apply(this, arguments)")):this.parent&&
this.ctor.body.push(new B(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,f,d,n,e;(f=this.body.jumps())&&f.error("Class bodies cannot contain pure statements");(b=this.body.contains(gb))&&b.error("Class bodies shouldn't reference arguments");e=this.determineName();n=new z(e);f=new p([],c.wrap([this.body]));
b=[];a.classScope=f.makeScope(a.scope);this.hoistDirectivePrologue();this.setContext(e);this.walkBody(e,a);this.ensureConstructor(e);this.addBoundFunctions(a);this.body.spaced=!0;this.body.expressions.push(n);this.parent&&(e=new z(a.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new M(n,e)),f.params.push(new W(e)),b.push(this.parent));(d=this.body.expressions).unshift.apply(d,this.directives);d=new D(new g(f,b));this.variable&&(d=new V(this.variable,d,null,{moduleDeclaration:this.moduleDeclaration}));
return d.compileToFragments(a)};return b}(a);e.ModuleDeclaration=w=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=fa;b.prototype.jumps=ea;b.prototype.makeReturn=ea;b.prototype.checkSource=function(){if(null!=this.source&&this.source instanceof Ua)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);e.ImportDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(a){var b,f;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!=(f=this.source)?f.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}(w);e.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);e.ExportDeclaration=w=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);b.prototype.compileNode=function(a){var b,f;this.checkScope(a,"export");b=[];b.push(this.makeCode(this.tab+"export "));this instanceof K&&b.push(this.makeCode("default "));this instanceof K||!(this.clause instanceof V||this.clause instanceof v)||(this.clause instanceof v&&!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,
u)):b.concat(this.clause.compileNode(a));null!=(null!=(f=this.source)?f.value:void 0)&&b.push(this.makeCode(" from "+this.source.value));b.push(this.makeCode(";"));return b};return b}(w);e.ExportNamedDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ExportDefaultDeclaration=K=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ExportAllDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}na(b,a);return b}(w);e.ModuleSpecifierList=w=function(a){function b(a){this.specifiers=a}na(b,a);b.prototype.children=["specifiers"];b.prototype.compileNode=function(a){var b,f,d,c,e;b=[];a.indent+=da;var n;e=this.specifiers;n=[];d=0;for(c=e.length;d<c;d++)f=e[d],n.push(f.compileToFragments(a,h));if(0!==this.specifiers.length){b.push(this.makeCode("{\n"+a.indent));d=c=0;for(e=n.length;c<e;d=++c)f=n[d],d&&b.push(this.makeCode(",\n"+a.indent)),b.push.apply(b,f);b.push(this.makeCode("\n}"))}else b.push(this.makeCode("{}"));
return b};return b}(a);e.ImportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ExportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ModuleSpecifier=T=function(a){function b(a,b,f){this.original=a;this.alias=b;this.moduleDeclarationType=f;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);e.ImportSpecifier=w=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}(T);e.ImportDefaultSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ImportNamespaceSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);return b}(w);e.ExportSpecifier=function(a){function b(a,c){b.__super__.constructor.call(this,a,c,"export")}na(b,a);return b}(T);e.Assign=V=function(a){function b(a,b,f,d){this.variable=a;this.value=b;this.context=
f;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)===u&&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 Ka(a,this,"variable")};b.prototype.compileNode=function(a){var b,f,d,c,e,g,n;if(f=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"===(e=this.context)||"//\x3d"===e||"%%\x3d"===e)return this.compileSpecialMath(a)}this.value instanceof p&&(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,[]),e=g[d++],d=g[d++],"prototype"===(null!=(n=e.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);f&&this.variable.base instanceof
C&&(this.variable.front=!0);f=this.variable.compileToFragments(a,h);if("object"===this.context){if(b=Ca(f),0<=Ha.call(m,b))f.unshift(this.makeCode('"')),f.push(this.makeCode('"'));return f.concat(this.makeCode(": "),n)}b=f.concat(this.makeCode(" "+(this.context||"\x3d")+" "),n);return a.level<=h?b:this.wrapInBraces(b)};b.prototype.compilePatternMatch=function(a){var c,f,d,e,g,n,m,q,r,p,l,t,w,D,C,v;D=a.level===u;q=this.value;t=this.variable.base.objects;if(!(w=t.length))return f=q.compileToFragments(a),
a.level>=y?this.wrapInBraces(f):f;l=t[0];1===w&&l instanceof x&&l.error("Destructuring assignment has no target");n=this.variable.isObject();if(D&&1===w&&!(l instanceof Q))return d=null,l instanceof b&&"object"===l.context?(f=l,e=f.variable,g=e.base,l=f.value,l instanceof b&&(d=l.value,l=l.variable)):(l instanceof b&&(d=l.value,l=l.variable),g=n?l["this"]?l.properties[0].name:new P(l.unwrap().value):new R(0)),c=g.unwrap()instanceof P,q=new L(q),q.properties.push(new (c?va:k)(g)),(p=Ga(l.unwrap().value))&&
l.error(p),d&&(q=new A("?",q,d)),(new b(l,q,null,{param:this.param})).compileToFragments(a,u);C=q.compileToFragments(a,h);v=Ca(C);f=[];e=!1;q.unwrap()instanceof z&&!this.variable.assigns(v)||(f.push([this.makeCode((d=a.scope.freeVariable("ref"))+" \x3d ")].concat(Aa.call(C))),C=[this.makeCode(d)],v=d);d=q=0;for(r=t.length;q<r;d=++q){l=t[d];g=d;if(!e&&l instanceof Q)p=l.name.unwrap().value,l=l.unwrap(),g=w+" \x3c\x3d "+v+".length ? "+ya("slice",a)+".call("+v+", "+d,(c=w-d-1)?(m=a.scope.freeVariable("i",
{single:!0}),g+=", "+m+" \x3d "+v+".length - "+c+") : ("+m+" \x3d "+d+", [])"):g+=") : []",g=new B(g),e=m+"++";else if(!e&&l instanceof x){if(c=w-d-1)1===c?e=v+".length - 1":(m=a.scope.freeVariable("i",{single:!0}),g=new B(m+" \x3d "+v+".length - "+c),e=m+"++",f.push(g.compileToFragments(a,h)));continue}else(l instanceof Q||l instanceof x)&&l.error("multiple splats/expansions are disallowed in an assignment"),d=null,l instanceof b&&"object"===l.context?(g=l.variable,g=g.base,l=l.value,l instanceof
b&&(d=l.value,l=l.variable)):(l instanceof b&&(d=l.value,l=l.variable),g=n?l["this"]?l.properties[0].name:new P(l.unwrap().value):new B(e||g)),p=l.unwrap().value,c=g.unwrap()instanceof P,g=new L(new B(v),[new (c?va:k)(g)]),d&&(g=new A("?",g,d));null!=p&&(p=Ga(p))&&l.error(p);f.push((new b(l,g,null,{param:this.param,subpattern:!0})).compileToFragments(a,h))}D||this.subpattern||f.push(C);f=this.joinFragmentArrays(f,", ");return a.level<h?f:this.wrapInBraces(f)};b.prototype.compileConditional=function(a){var c,
f;f=this.variable.cacheReference(a);c=f[0];f=f[1];c.properties.length||!(c.base instanceof B)||c.base instanceof ha||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),f,{type:"if"})).addElse(new b(f,this.value,"\x3d")).compileToFragments(a);c=(new A(this.context.slice(0,-1),c,new b(f,this.value,"\x3d"))).compileToFragments(a);
return a.level<=h?c:this.wrapInBraces(c)};b.prototype.compileSpecialMath=function(a){var c,f;f=this.variable.cacheReference(a);c=f[0];f=f[1];return(new b(c,new A(this.context.slice(0,-1),f,this.value))).compileToFragments(a)};b.prototype.compileSplice=function(a){var b,f,d,c,e,g;c=this.variable.properties.pop().range;d=c.from;b=c.to;f=c.exclusive;g=this.variable.compile(a);d?(e=this.cacheToCodeFragments(d.cache(a,y)),c=e[0],e=e[1]):c=e="0";b?null!=d&&d.isNumber()&&b.isNumber()?(b=b.compile(a)-e,f||
(b+=1)):(b=b.compile(a,q)+" - "+e,f||(b+=" + 1")):b="9e9";f=this.value.cache(a,h);d=f[0];f=f[1];b=[].concat(this.makeCode("[].splice.apply("+g+", ["+c+", "+b+"].concat("),d,this.makeCode(")), "),f);return a.level>u?this.wrapInBraces(b):b};return b}(a);e.Code=p=function(a){function b(a,b,f){this.params=a||[];this.body=b||new c;this.bound="boundfunc"===f;this.isGenerator=!!this.body.contains(function(a){return a instanceof A&&a.isYield()||a instanceof qa})}na(b,a);b.prototype.children=["params","body"];
b.prototype.isStatement=function(){return!!this.ctor};b.prototype.jumps=H;b.prototype.makeScope=function(a){return new J(a,this.body,this)};b.prototype.compileNode=function(a){var e,f,d,n,h,k,m,r,l,p,y,u,t;this.bound&&null!=(f=a.scope.method)&&f.bound&&(this.context=a.scope.method.context);if(this.bound&&!this.context)return this.context="_this",f=new b([new W(new z(this.context))],new c([this])),f=new g(f,[new ha]),f.updateLocationDataIfMissing(this.locationData),f.compileNode(a);a.scope=X(a,"classScope")||
this.makeScope(a.scope);a.scope.shared=X(a,"sharedScope");a.indent+=da;delete a.bare;delete a.isExistentialEquals;f=[];e=[];r=this.params;n=0;for(k=r.length;n<k;n++)m=r[n],m instanceof x||a.scope.parameter(m.asReference(a));r=this.params;n=0;for(k=r.length;n<k;n++)if(m=r[n],m.splat||m instanceof x){n=this.params;h=0;for(m=n.length;h<m;h++)l=n[h],l instanceof x||!l.name.value||a.scope.add(l.name.value,"var",!0);h=new V(new L(new pa(function(){var b,d,f,c;f=this.params;c=[];d=0;for(b=f.length;d<b;d++)l=
f[d],c.push(l.asReference(a));return c}.call(this))),new L(new z("arguments")));break}y=this.params;r=0;for(n=y.length;r<n;r++)m=y[r],m.isComplex()?(t=p=m.asReference(a),m.value&&(t=new A("?",p,m.value)),e.push(new V(new L(m.name),t,"\x3d",{param:!0}))):(p=m,m.value&&(k=new B(p.name.value+" \x3d\x3d null"),t=new V(new L(m.name),m.value,"\x3d"),e.push(new E(k,t)))),h||f.push(p);m=this.body.isEmpty();h&&e.unshift(h);e.length&&(d=this.body.expressions).unshift.apply(d,e);d=h=0;for(e=f.length;h<e;d=++h)l=
f[d],f[d]=l.compileToFragments(a),a.scope.parameter(Ca(f[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);e=[this.makeCode(d+"(")];d=m=0;for(h=f.length;m<h;d=++m)l=f[d],d&&e.push(this.makeCode(", ")),e.push.apply(e,l);e.push(this.makeCode(") {"));this.body.isEmpty()||(e=e.concat(this.makeCode("\n"),this.body.compileWithDeclarations(a),
this.makeCode("\n"+this.tab)));e.push(this.makeCode("}"));return this.ctor?[this.makeCode(this.tab)].concat(Aa.call(e)):this.front||a.level>=q?this.wrapInBraces(e):e};b.prototype.eachParamName=function(a){var b,f,d,c,e;c=this.params;e=[];b=0;for(f=c.length;b<f;b++)d=c[b],e.push(d.eachName(a));return e};b.prototype.traverseChildren=function(a,c){if(a)return b.__super__.traverseChildren.call(this,a,c)};return b}(a);e.Param=W=function(a){function b(a,b,f){this.name=a;this.value=b;this.splat=f;(a=Ga(this.name.unwrapAll().value))&&
this.name.error(a);this.name instanceof C&&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(m,b)&&(b="_"+b),b=new z(a.scope.freeVariable(b))):b.isComplex()&&(b=new z(a.scope.freeVariable("arg")));
b=new L(b);this.splat&&(b=new Q(b));b.updateLocationDataIfMissing(this.locationData);return this.reference=b};b.prototype.isComplex=function(){return this.name.isComplex()};b.prototype.eachName=function(a,b){var f,d,c,e;null==b&&(b=this.name);f=function(b){return a("@"+b.properties[0].name.value,b)};if(b instanceof B)return a(b.value,b);if(b instanceof L)return f(b);b=null!=(d=b.objects)?d:[];d=0;for(c=b.length;d<c;d++)e=b[d],e instanceof V&&null==e.context&&(e=e.variable),e instanceof V?(e.value instanceof
V&&(e=e.value),this.eachName(a,e.value.unwrap())):e instanceof Q?(e=e.name.unwrap(),a(e.value,e)):e instanceof L?e.isArray()||e.isObject()?this.eachName(a,e.base):e["this"]?f(e):a(e.base.value,e.base):e instanceof x||e.error("illegal parameter "+e.compile())};return b}(a);e.Splat=Q=function(a){function b(a){this.name=a.compile?a:new B(a)}na(b,a);b.prototype.children=["name"];b.prototype.isAssignable=fa;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,f){var d,e,g,n,m,k;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),f?c:[].concat(d.makeCode(ya("slice",a)+".call("),c,d.makeCode(")"));f=c.slice(n);g=m=0;for(k=f.length;m<k;g=++m)d=f[g],e=d.compileToFragments(a,h),f[g]=d instanceof b?[].concat(d.makeCode(ya("slice",a)+".call("),e,d.makeCode(")")):[].concat(d.makeCode("["),e,d.makeCode("]"));
if(0===n)return d=c[0],a=d.joinFragmentArrays(f.slice(1),", "),f[0].concat(d.makeCode(".concat("),a,d.makeCode(")"));m=c.slice(0,n);k=[];e=0;for(g=m.length;e<g;e++)d=m[e],k.push(d.compileToFragments(a,h));d=c[0].joinFragmentArrays(k,", ");a=c[n].joinFragmentArrays(f,", ");f=c[c.length-1];return[].concat(c[0].makeCode("["),d,c[n].makeCode("].concat("),a,f.makeCode(")"))};return b}(a);e.Expansion=x=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.isComplex=
H;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);e.While=w=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=fa;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,f,d;a=this.body.expressions;if(!a.length)return!1;b=0;for(d=a.length;b<d;b++)if(f=a[b],f=f.jumps({loop:!0}))return f;return!1};b.prototype.compileNode=function(a){var b,f,d;a.indent+=da;d="";b=this.body;b.isEmpty()?b=this.makeCode(""):(this.returns&&(b.makeReturn(f=a.scope.freeVariable("results")),d=""+this.tab+f+" \x3d [];\n"),this.guard&&(1<b.expressions.length?
b.expressions.unshift(new E((new D(this.guard)).invert(),new ua("continue"))):this.guard&&(b=c.wrap([new E(this.guard,b)]))),b=[].concat(this.makeCode("\n"),b.compileToFragments(a,u),this.makeCode("\n"+this.tab)));a=[].concat(this.makeCode(d+this.tab+"while ("),this.condition.compileToFragments(a,O),this.makeCode(") {"),b,this.makeCode("}"));this.returns&&a.push(this.makeCode("\n"+this.tab+"return "+f+";"));return a};return b}(a);e.Op=A=function(a){function b(a,b,e,n){if("in"===a)return new N(b,e);
if("do"===a)return this.generateDo(b);if("new"===a){if(b instanceof g&&!b["do"]&&!b.isNew)return b.newInstance();if(b instanceof p&&b.bound||b["do"])b=new D(b)}this.operator=c[a]||a;this.first=b;this.second=e;this.flip=!!n;return this}var c,e;na(b,a);c={"\x3d\x3d":"\x3d\x3d\x3d","!\x3d":"!\x3d\x3d",of:"in",yieldfrom:"yield*"};e={"!\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 e),d=d.first;if(!a)return(new D(this)).invert();for(d=this;d&&d.operator;)d.invert=!d.invert,d.operator=e[d.operator],d=d.first;return this}return(d=e[this.operator])?(this.operator=d,this.first.unwrap()instanceof b&&this.first.invert(),this):this.second?(new D(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)&&Ka(a,this,"first")};b.prototype.generateDo=function(a){var b,f,c,e,n;e=[];n=(a instanceof V&&(b=a.value.unwrap())instanceof p?b:a).params||[];b=0;for(f=n.length;b<f;b++)c=n[b],c.value?(e.push(c.value),delete c.value):e.push(c);a=new g(a,e);a["do"]=!0;return a};b.prototype.compileNode=function(a){var b,f;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");
("--"===(f=this.operator)||"++"===f)&&(f=Ga(this.first.unwrapAll().value))&&this.first.error(f);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),f=this.second.compileToFragments(a,y),b=[].concat(b,
this.makeCode(" "+this.operator+" "),f),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,f;this.first.isComplex()?(f=new z(a.scope.freeVariable("ref")),
b=new D(new V(f,this.first))):f=b=this.first;return(new E(new F(b),f,{type:"if"})).addElse(this.second).compileToFragments(a)};b.prototype.compileUnary=function(a){var d,f,c;f=[];d=this.operator;f.push([this.makeCode(d)]);if("!"===d&&this.first instanceof F)return this.first.negated=!this.first.negated,this.first.compileToFragments(a);if(a.level>=q)return(new D(this)).compileToFragments(a);c="+"===d||"-"===d;("new"===d||"typeof"===d||"delete"===d||c&&this.first instanceof b&&this.first.operator===
d)&&f.push([this.makeCode(" ")]);if(c&&this.first instanceof b||"new"===d&&this.first.isStatement(a))this.first=new D(this.first);f.push(this.first.compileToFragments(a,y));this.flip&&f.reverse();return this.joinFragmentArrays(f,"")};b.prototype.compileYield=function(a){var b,f,c;f=[];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 ia)?null!=this.first.expression&&f.push(this.first.expression.compileToFragments(a,
y)):(a.level>=O&&f.push([this.makeCode("(")]),f.push([this.makeCode(b)]),""!==(null!=(c=this.first.base)?c.value:void 0)&&f.push([this.makeCode(" ")]),f.push(this.first.compileToFragments(a,y)),a.level>=O&&f.push([this.makeCode(")")]));return this.joinFragmentArrays(f,"")};b.prototype.compilePower=function(a){var b;b=new L(new z("Math"),[new va(new P("pow"))]);return(new g(b,[this.first,this.second])).compileToFragments(a)};b.prototype.compileFloorDivision=function(a){var d,f;f=new L(new z("Math"),
[new va(new P("floor"))]);d=this.second.isComplex()?new D(this.second):this.second;d=new b("/",this.first,d);return(new g(f,[d])).compileToFragments(a)};b.prototype.compileModulo=function(a){var b;b=new L(new B(ya("modulo",a)));return(new g(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);e.In=N=function(a){function b(a,b){this.object=a;this.array=b}na(b,a);b.prototype.children=
["object","array"];b.prototype.invert=S;b.prototype.compileNode=function(a){var b,f,d,c,e;if(this.array instanceof L&&this.array.isArray()&&this.array.base.objects.length){e=this.array.base.objects;f=0;for(d=e.length;f<d;f++)if(c=e[f],c instanceof Q){b=!0;break}if(!b)return this.compileOrTest(a)}return this.compileLoopTest(a)};b.prototype.compileOrTest=function(a){var b,f,d,c,e,g,n,h,m,k;b=this.object.cache(a,y);m=b[0];n=b[1];f=this.negated?[" !\x3d\x3d "," \x26\x26 "]:[" \x3d\x3d\x3d "," || "];b=
f[0];f=f[1];k=[];h=this.array.base.objects;d=e=0;for(g=h.length;e<g;d=++e)c=h[d],d&&k.push(this.makeCode(f)),k=k.concat(d?n:m,this.makeCode(b),c.compileToFragments(a,q));return a.level<y?k:this.wrapInBraces(k)};b.prototype.compileLoopTest=function(a){var b,f,d;b=this.object.cache(a,h);d=b[0];f=b[1];b=[].concat(this.makeCode(ya("indexOf",a)+".call("),this.array.compileToFragments(a,h),this.makeCode(", "),f,this.makeCode(") "+(this.negated?"\x3c 0":"\x3e\x3d 0")));if(Ca(d)===Ca(f))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);e.Try=function(a){function b(a,b,f,d){this.attempt=a;this.errorVariable=b;this.recovery=f;this.ensure=d}na(b,a);b.prototype.children=["attempt","recovery","ensure"];b.prototype.isStatement=fa;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,f,d,c,e;a.indent+=da;e=this.attempt.compileToFragments(a,u);b=this.recovery?(f=a.scope.freeVariable("error",{reserve:!1}),c=new z(f),this.errorVariable?(d=Ga(this.errorVariable.unwrapAll().value),d?this.errorVariable.error(d):void 0,this.recovery.unshift(new V(this.errorVariable,c))):void 0,[].concat(this.makeCode(" catch ("),
c.compileToFragments(a),this.makeCode(") {\n"),this.recovery.compileToFragments(a,u),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:(f=a.scope.freeVariable("error",{reserve:!1}),[this.makeCode(" catch ("+f+") {}")]);a=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(a,u),this.makeCode("\n"+this.tab+"}")):[];return[].concat(this.makeCode(this.tab+"try {\n"),e,this.makeCode("\n"+this.tab+"}"),b,a)};return b}(a);e.Throw=ia=function(a){function b(a){this.expression=
a}na(b,a);b.prototype.children=["expression"];b.prototype.isStatement=fa;b.prototype.jumps=H;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);e.Existence=F=function(a){function b(a){this.expression=a}na(b,a);b.prototype.children=["expression"];b.prototype.invert=S;b.prototype.compileNode=function(a){var b,f,d;this.expression.front=this.front;d=this.expression.compile(a,
y);this.expression.unwrap()instanceof z&&!a.scope.check(d)?(f=this.negated?["\x3d\x3d\x3d","||"]:["!\x3d\x3d","\x26\x26"],b=f[0],f=f[1],d="typeof "+d+" "+b+' "undefined" '+f+" "+d+" "+b+" null"):d=d+" "+(this.negated?"\x3d\x3d":"!\x3d")+" null";return[this.makeCode(a.level<=r?d:"("+d+")")]};return b}(a);e.Parens=D=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,f;b=this.body.unwrap();if(b instanceof L&&b.isAtomic())return b.front=this.front,b.compileToFragments(a);f=b.compileToFragments(a,O);return a.level<y&&(b instanceof A||b instanceof g||b instanceof I&&b.returns)?f:this.wrapInBraces(f)};return b}(a);e.StringWithInterpolations=Ua=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}na(b,a);b.prototype.compileNode=function(a){var c,f,d,e,g;if(!a.inTaggedTemplateCall)return b.__super__.compileNode.apply(this,
arguments);d=this.body.unwrap();f=[];d.traverseChildren(!1,function(a){if(a instanceof Za)f.push(a);else if(a instanceof D)return f.push(a),!1;return!0});d=[];d.push(this.makeCode("`"));e=0;for(g=f.length;e<g;e++)c=f[e],c instanceof Za?(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,O)),d.push(this.makeCode("}")));d.push(this.makeCode("`"));return d};
return b}(D);e.For=I=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 Y&&!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,f,d,e,
g,m,k,n,q,r,l,p,y,t,w,v,C,A,x,H,O;b=c.wrap([this.body]);q=b.expressions;q=q[q.length-1];(null!=q?q.jumps():void 0)instanceof U&&(this.returns=!1);w=this.range?this.source.base:this.source;d=a.scope;this.pattern||(n=this.name&&this.name.compile(a,h));q=this.index&&this.index.compile(a,h);n&&!this.pattern&&d.find(n);!q||this.index instanceof L||d.find(q);this.returns&&(k=d.freeVariable("results"));this.from?this.pattern&&(l=d.freeVariable("x",{single:!0})):l=this.object&&q||d.freeVariable("i",{single:!0});
p=(this.range||this.from)&&n||q||l;y=p!==l?p+" \x3d ":"";this.step&&!this.range&&(q=this.cacheToCodeFragments(this.step.cache(a,h,ta)),g=q[0],x=q[1],this.step.isNumber()&&(A=Number(x)));this.pattern&&(n=l);m=q=O="";r=this.tab+da;this.range?e=w.compileToFragments(Fa(a,{index:l,name:n,step:this.step,isComplex:ta})):(H=this.source.compile(a,h),!n&&!this.own||this.source.unwrap()instanceof z||(m+=""+this.tab+(w=d.freeVariable("ref"))+" \x3d "+H+";\n",H=w),!n||this.pattern||this.from||(t=n+" \x3d "+H+
"["+p+"]"),this.object||this.from||(g!==x&&(m+=""+this.tab+g+";\n"),n=0>A,this.step&&null!=A&&n||(f=d.freeVariable("len")),e=""+y+l+" \x3d 0, "+f+" \x3d "+H+".length",g=""+y+l+" \x3d "+H+".length - 1",f=l+" \x3c "+f,d=l+" \x3e\x3d 0",this.step?(null!=A?n&&(f=d,e=g):(f=x+" \x3e 0 ? "+f+" : "+d,e="("+x+" \x3e 0 ? ("+e+") : "+g+")"),l=l+" +\x3d "+x):l=""+(p!==l?"++"+l:l+"++"),e=[this.makeCode(e+"; "+f+"; "+y+l)]));this.returns&&(v=""+this.tab+k+" \x3d [];\n",C="\n"+this.tab+"return "+k+";",b.makeReturn(k));
this.guard&&(1<b.expressions.length?b.expressions.unshift(new E((new D(this.guard)).invert(),new ua("continue"))):this.guard&&(b=c.wrap([new E(this.guard,b)])));this.pattern&&b.expressions.unshift(new V(this.name,this.from?new z(p):new B(H+"["+p+"]")));k=[].concat(this.makeCode(m),this.pluckDirectCall(a,b));t&&(O="\n"+r+t+";");this.object?(e=[this.makeCode(p+" in "+H)],this.own&&(q="\n"+r+"if (!"+ya("hasProp",a)+".call("+H+", "+p+")) continue;")):this.from&&(e=[this.makeCode(p+" of "+H)]);(a=b.compileToFragments(Fa(a,
{indent:r}),u))&&0<a.length&&(a=[].concat(this.makeCode("\n"),a,this.makeCode("\n")));return[].concat(k,this.makeCode(""+(v||"")+this.tab+"for ("),e,this.makeCode(") {"+q+O),a,this.makeCode(this.tab+"}"+(C||"")))};b.prototype.pluckDirectCall=function(a,b){var c,d,e,h,n,m,k,q,r,l,y,t,w,v,B;d=[];r=b.expressions;n=m=0;for(k=r.length;m<k;n=++m)if(e=r[n],e=e.unwrapAll(),e instanceof g&&(B=null!=(l=e.variable)?l.unwrapAll():void 0,B instanceof p||B instanceof L&&(null!=(y=B.base)?y.unwrapAll():void 0)instanceof
p&&1===B.properties.length&&("call"===(t=null!=(w=B.properties[0].name)?w.value:void 0)||"apply"===t)))h=(null!=(v=B.base)?v.unwrapAll():void 0)||B,q=new z(a.scope.freeVariable("fn")),c=new L(q),B.base&&(c=[c,B],B.base=c[0],c=c[1]),b.expressions[n]=new g(c,e.args),d=d.concat(this.makeCode(this.tab),(new V(q,h)).compileToFragments(a,u),this.makeCode(";\n"));return d};return b}(w);e.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=fa;b.prototype.jumps=function(a){var b,c,d,e,g;null==a&&(a={block:!0});e=this.cases;c=0;for(d=e.length;c<d;c++)if(b=e[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,f,d,e,g;e=this.cases;b=0;for(f=e.length;b<f;b++)d=e[b],d[1].makeReturn(a);a&&(this.otherwise||(this.otherwise=new c([new B("void 0")])));null!=(g=this.otherwise)&&g.makeReturn(a);return this};b.prototype.compileNode=
function(a){var b,c,d,e,g,h,m,k,n,q,r,l,p;m=a.indent+da;k=a.indent=m+da;h=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(a,O):this.makeCode("false"),this.makeCode(") {\n"));l=this.cases;g=n=0;for(q=l.length;n<q;g=++n){b=l[g];e=b[0];b=b[1];p=ma([e]);e=0;for(r=p.length;e<r;e++)d=p[e],this.subject||(d=d.invert()),h=h.concat(this.makeCode(m+"case "),d.compileToFragments(a,O),this.makeCode(":\n"));0<(c=b.compileToFragments(a,u)).length&&(h=h.concat(c,this.makeCode("\n")));
if(g===this.cases.length-1&&!this.otherwise)break;g=this.lastNonComment(b.expressions);g instanceof U||g instanceof B&&g.jumps()&&"debugger"!==g.value||h.push(d.makeCode(k+"break;\n"))}this.otherwise&&this.otherwise.expressions.length&&h.push.apply(h,[this.makeCode(m+"default:\n")].concat(Aa.call(this.otherwise.compileToFragments(a,u)),[this.makeCode("\n")]));h.push(this.makeCode(this.tab+"}"));return h};return b}(a);e.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)===u||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 B("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,f,d,e;c=X(a,"chainChild");if(X(a,"isExistentialEquals"))return(new b(this.condition.invert(),this.elseBodyNode(),{type:"if"})).compileToFragments(a);e=a.indent+da;d=this.condition.compileToFragments(a,O);f=this.ensureBlock(this.body).compileToFragments(Fa(a,
{indent:e}));f=[].concat(this.makeCode("if ("),d,this.makeCode(") {\n"),f,this.makeCode("\n"+this.tab+"}"));c||f.unshift(this.makeCode(this.tab));if(!this.elseBody)return f;c=f.concat(this.makeCode(" else "));this.isChain?(a.chainChild=!0,c=c.concat(this.elseBody.unwrap().compileToFragments(a,u))):c=c.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(Fa(a,{indent:e}),u),this.makeCode("\n"+this.tab+"}"));return c};b.prototype.compileExpression=function(a){var b,c,d;d=this.condition.compileToFragments(a,
r);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>=r?this.wrapInBraces(b):b};b.prototype.unfoldSoak=function(){return this.soak&&this};return b}(a);ka={extend:function(a){return"function(child, parent) { for (var key in parent) { if ("+ya("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"}};u=1;O=2;h=3;r=4;y=5;q=6;da=" ";aa=/^[+-]?\d+$/;ya=
function(a,b){var c,e;e=b.scope.root;if(a in e.utilities)return e.utilities[a];c=e.freeVariable(a);e.assign(c,ka[a](b));return e.utilities[a]=c};Na=function(a,b){a=a.replace(/\n/g,"$\x26"+b);return a.replace(/\s+$/,"")};gb=function(a){return a instanceof z&&"arguments"===a.value};Ra=function(a){return a instanceof ha||a instanceof p&&a.bound||a instanceof ja};ta=function(a){return a.isComplex()||("function"===typeof a.isAssignable?a.isAssignable():void 0)};Ka=function(a,b,c){if(a=b[c].unfoldSoak(a))return b[c]=
a.body,a.body=new L(b),a}}).call(this);return e}();t["./sourcemap"]=function(){var e={};(function(){var t;t=function(){function e(e){this.line=e;this.columns=[]}e.prototype.add=function(e,a,c){var t;t=a[0];a=a[1];null==c&&(c={});if(!this.columns[e]||!c.noReplace)return this.columns[e]={line:this.line,column:e,sourceLine:t,sourceColumn:a}};e.prototype.sourceLocation=function(e){for(var a;!((a=this.columns[e])||0>=e);)e--;return a&&[a.sourceLine,a.sourceColumn]};return e}();e=function(){function e(){this.lines=
[]}e.prototype.add=function(e,a,c){var V,g;null==c&&(c={});g=a[0];a=a[1];return((V=this.lines)[g]||(V[g]=new t(g))).add(a,e,c)};e.prototype.sourceLocation=function(e){var a,c;a=e[0];for(e=e[1];!((c=this.lines[a])||0>=a);)a--;return c&&c.sourceLocation(e)};e.prototype.generate=function(e,a){var c,t,g,v,p,l,G,F,x,w,K,M,I;null==e&&(e={});null==a&&(a=null);p=l=v=I=0;w=!1;c="";K=this.lines;g=t=0;for(G=K.length;t<G;g=++t)if(g=K[g])for(M=g.columns,g=0,F=M.length;g<F;g++)if(x=M[g]){for(;I<x.line;)v=0,w=!1,
c+=";",I++;w&&(c+=",");c+=this.encodeVlq(x.column-v);v=x.column;c+=this.encodeVlq(0);c+=this.encodeVlq(x.sourceLine-l);l=x.sourceLine;c+=this.encodeVlq(x.sourceColumn-p);p=x.sourceColumn;w=!0}c={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:c};e.inlineMap&&(c.sourcesContent=[a]);return c};e.prototype.encodeVlq=function(e){var a,c;a="";for(c=(Math.abs(e)<<1)+(0>e?1:0);c||!a;)e=c&31,(c>>=5)&&(e|=32),a+=this.encodeBase64(e);return a};e.prototype.encodeBase64=
function(e){var a;if(!(a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]))throw Error("Cannot Base64 encode value: "+e);return a};return e}()}).call(this);return e}();t["./coffee-script"]=function(){var e={};(function(){var pa,ua,V,a,c,Da,g,v,p,l,G,F,x,w,K,M,I,z,E,N={}.hasOwnProperty;v=t("fs");E=t("vm");K=t("path");pa=t("./lexer").Lexer;w=t("./parser").parser;l=t("./helpers");ua=t("./sourcemap");c=t("../../package.json");e.VERSION=c.version;e.FILE_EXTENSIONS=[".coffee",".litcoffee",
".coffee.md"];e.helpers=l;V=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,e){null==e&&(e={});try{return a.call(this,c,e)}catch(r){if("string"!==typeof c)throw r;throw l.updateSyntaxError(r,c,e.filename);}}};z=
{};I={};e.compile=a=c(function(a,c){var e,g,h,k,m,p,t,v,E,H,F,G,C;h=l.extend;c=h({},c);p=c.sourceMap||c.inlineMap||null==c.filename;h=c.filename||"\x3canonymous\x3e";z[h]=a;p&&(H=new ua);g=x.tokenize(a,c);k=c;E=[];m=0;for(t=g.length;m<t;m++)e=g[m],"IDENTIFIER"===e[0]&&E.push(e[1]);k.referencedVars=E;if(null==c.bare||!0!==c.bare)for(k=0,m=g.length;k<m;k++)if(e=g[k],"IMPORT"===(v=e[0])||"EXPORT"===v){c.bare=!0;break}m=w.parse(g).compileToFragments(c);g=0;c.header&&(g+=1);c.shiftLine&&(g+=1);e=0;v="";
t=0;for(E=m.length;t<E;t++)k=m[t],p&&(k.locationData&&!/^[;\s]*$/.test(k.code)&&H.add([k.locationData.first_line,k.locationData.first_column],[g,e],{noReplace:!0}),F=l.count(k.code,"\n"),g+=F,e=F?k.code.length-(k.code.lastIndexOf("\n")+1):e+k.code.length),v+=k.code;c.header&&(e="Generated by CoffeeScript "+this.VERSION,v="// "+e+"\n"+v);p&&(C=H.generate(c,a),I[h]=H);c.inlineMap&&(a=V(JSON.stringify(C)),h="//# sourceURL\x3d"+(null!=(G=c.filename)?G:"coffeescript"),v=v+"\n"+("//# sourceMappingURL\x3ddata:application/json;base64,"+
a)+"\n"+h);return c.sourceMap?{js:v,sourceMap:H,v3SourceMap:JSON.stringify(C,null,2)}:v});e.tokens=c(function(a,c){return x.tokenize(a,c)});e.nodes=c(function(a,c){return"string"===typeof a?w.parse(x.tokenize(a,c)):w.parse(a)});e.run=function(c,e){var g,k,h;null==e&&(e={});k=t.main;k.filename=process.argv[1]=e.filename?v.realpathSync(e.filename):"\x3canonymous\x3e";k.moduleCache&&(k.moduleCache={});g=null!=e.filename?K.dirname(v.realpathSync(e.filename)):v.realpathSync(".");k.paths=t("module")._nodeModulePaths(g);
if(!l.isCoffee(k.filename)||t.extensions)c=a(c,e),c=null!=(h=c.js)?h:c;return k._compile(c,k.filename)};e.eval=function(c,e){var g,k,h,m,l,p,w,v,z,x;null==e&&(e={});if(c=c.trim()){m=null!=(l=E.Script.createContext)?l:E.createContext;l=null!=(h=E.isContext)?h:function(a){return e.sandbox instanceof m().constructor};if(m){if(null!=e.sandbox){if(l(e.sandbox))x=e.sandbox;else for(p in x=m(),l=e.sandbox,l)N.call(l,p)&&(h=l[p],x[p]=h);x.global=x.root=x.GLOBAL=x}else x=global;x.__filename=e.filename||"eval";
x.__dirname=K.dirname(x.__filename);if(x===global&&!x.module&&!x.require){g=t("module");x.module=k=new g(e.modulename||"eval");x.require=h=function(a){return g._load(a,k,!0)};k.filename=x.__filename;z=Object.getOwnPropertyNames(t);l=0;for(w=z.length;l<w;l++)v=z[l],"paths"!==v&&"arguments"!==v&&"caller"!==v&&(h[v]=t[v]);h.paths=k.paths=g._nodeModulePaths(process.cwd());h.resolve=function(a){return g._resolveFilename(a,k)}}}l={};for(p in e)N.call(e,p)&&(h=e[p],l[p]=h);l.bare=!0;c=a(c,l);return x===
global?E.runInThisContext(c):E.runInContext(c,x)}};e.register=function(){return t("./register")};if(t.extensions)for(M=this.FILE_EXTENSIONS,Da=function(a){var c;return null!=(c=t.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=M.length;G<F;G++)c=M[G],Da(c);e._compileFile=function(c,e,g){var k,h;null==e&&(e=!1);null==g&&(g=!1);h=v.readFileSync(c,"utf8");h=65279===h.charCodeAt(0)?h.substring(1):
h;try{k=a(h,{filename:c,sourceMap:e,inlineMap:g,sourceFiles:[c],literate:l.isLiterate(c)})}catch(y){throw l.updateSyntaxError(y,h,c);}return k};x=new pa;w.lexer={lex:function(){var a,c;(c=w.tokens[this.pos++])?(a=c[0],this.yytext=c[1],this.yylloc=c[2],w.errorToken=c.origin||c,this.yylineno=this.yylloc.first_line):a="";return a},setInput:function(a){w.tokens=a;return this.pos=0},upcomingInput:function(){return""}};w.yy=t("./nodes");w.yy.parseError=function(a,c){var e,g,h,k;h=w.errorToken;k=w.tokens;
e=h[0];g=h[1];a=h[2];g=function(){switch(!1){case h!==k[k.length-1]:return"end of input";case "INDENT"!==e&&"OUTDENT"!==e:return"indentation";case "IDENTIFIER"!==e&&"NUMBER"!==e&&"INFINITY"!==e&&"STRING"!==e&&"STRING_START"!==e&&"REGEX"!==e&&"REGEX_START"!==e:return e.replace(/_START$/,"").toLowerCase();default:return l.nameWhitespaceCharacter(g)}}();return l.throwSyntaxError("unexpected "+g,a)};g=function(a,c){var e,g,h,k;a.isNative()?e="native":(a.isEval()?(g=a.getScriptNameOrSourceURL())||a.getEvalOrigin():
g=a.getFileName(),g||(g="\x3canonymous\x3e"),h=a.getLineNumber(),e=a.getColumnNumber(),e=(c=c(g,h,e))?g+":"+c[0]+":"+c[1]:g+":"+h+":"+e);g=a.getFunctionName();h=a.isConstructor();if(a.isToplevel()||h)return h?"new "+(g||"\x3canonymous\x3e")+" ("+e+")":g?g+" ("+e+")":e;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+" ("+e+")"):k+"."+(h||"\x3canonymous\x3e")+" ("+e+")"};p=function(c){return null!=
I[c]?I[c]:null!=I["\x3canonymous\x3e"]?I["\x3canonymous\x3e"]:null!=z[c]?(c=a(z[c],{filename:c,sourceMap:!0,literate:l.isLiterate(c)}),c.sourceMap):null};Error.prepareStackTrace=function(a,c){var k,m,h;h=function(a,c,e){var g;a=p(a);null!=a&&(g=a.sourceLocation([c-1,e-1]));return null!=g?[g[0]+1,g[1]+1]:null};m=function(){var a,m,l;l=[];a=0;for(m=c.length;a<m;a++){k=c[a];if(k.getFunction()===e.run)break;l.push(" at "+g(k,h))}return l}();return a.toString()+"\n"+m.join("\n")+"\n"}}).call(this);
return e}();t["./browser"]=function(){(function(){var e,pa,ua,V=[].indexOf||function(a){for(var c=0,e=this.length;c<e;c++)if(c in this&&this[c]===a)return c;return-1};e=t("./coffee-script");e.require=t;pa=e.compile;e.eval=function(a,c){null==c&&(c={});null==c.bare&&(c.bare=!0);return eval(pa(a,c))};e.run=function(a,c){null==c&&(c={});c.bare=!0;c.shiftLine=!0;return Function(pa(a,c))()};"undefined"!==typeof window&&null!==window&&("undefined"!==typeof btoa&&null!==btoa&&"undefined"!==typeof JSON&&
null!==JSON&&(pa=function(a,c){null==c&&(c={});c.inlineMap=!0;return e.compile(a,c)}),e.load=function(a,c,t,g){var v;null==t&&(t={});null==g&&(g=!1);t.sourceFiles=[a];v=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest;v.open("GET",a,!0);"overrideMimeType"in v&&v.overrideMimeType("text/plain");v.onreadystatechange=function(){var p;if(4===v.readyState){if(0===(p=v.status)||200===p)p=[v.responseText,t],g||e.run.apply(e,p);else throw Error("Could not load "+
a);if(c)return c(p)}};return v.send(null)},ua=function(){var a,c,t,g,v,p,l,G,F,x,w;w=window.document.getElementsByTagName("script");c=["text/coffeescript","text/literate-coffeescript"];a=function(){var a,e,g,l;l=[];a=0;for(e=w.length;a<e;a++)F=w[a],(g=F.type,0<=V.call(c,g))&&l.push(F);return l}();p=0;t=function(){var c;c=a[p];if(c instanceof Array)return e.run.apply(e,c),p++,t()};g=function(g,l){var p,v;p={literate:g.type===c[1]};if(v=g.src||g.getAttribute("data-src"))return e.load(v,function(c){a[l]=
c;return t()},p,!0);p.sourceFiles=["embedded"];return a[l]=[g.innerHTML,p]};v=l=0;for(G=a.length;l<G;v=++l)x=a[v],g(x,v);return t()},window.addEventListener?window.addEventListener("DOMContentLoaded",ua,!1):window.attachEvent("onload",ua))}).call(this);return{}}();return t["./coffee-script"]}();"function"===typeof define&&define.amd?define(function(){return ua}):t.CoffeeScript=ua})(this);
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(u,xa,ya){if(null==u)throw new TypeError("The 'this' value for String.prototype."+ya+" must not be null or undefined");if(xa instanceof RegExp)throw new TypeError("First argument to String.prototype."+ya+" must not be a regular expression");return u+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(u,xa,ya){u!=Array.prototype&&u!=Object.prototype&&(u[xa]=ya.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,ya,e){if(xa){ya=$jscomp.global;u=u.split(".");for(e=0;e<u.length-1;e++){var ra=u[e];ra in ya||(ya[ra]={});ya=ya[ra]}u=u[u.length-1];e=ya[u];xa=xa(e);xa!=e&&null!=xa&&$jscomp.defineProperty(ya,u,{configurable:!0,writable:!0,value:xa})}};
$jscomp.polyfill("String.prototype.repeat",function(u){return u?u:function(u){var ya=$jscomp.checkStringArgs(this,null,"repeat");if(0>u||1342177279<u)throw new RangeError("Invalid count value");u|=0;for(var e="";u;)if(u&1&&(e+=ya),u>>>=1)ya+=ya;return e}},"es6","es3");$jscomp.findInternal=function(u,xa,ya){u instanceof String&&(u=String(u));for(var e=u.length,ra=0;ra<e;ra++){var r=u[ra];if(xa.call(ya,r,ra,u))return{i:ra,v:r}}return{i:-1,v:void 0}};
$jscomp.polyfill("Array.prototype.find",function(u){return u?u:function(u,ya){return $jscomp.findInternal(this,u,ya).v}},"es6","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 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 ya=0,e={next:function(){if(ya<u.length){var ra=ya++;return{value:xa(ra,u[ra]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e};$jscomp.polyfill("Array.prototype.keys",function(u){return u?u:function(){return $jscomp.iteratorFromArray(this,function(u){return u})}},"es6","es3");
(function(u){var xa=function(){function u(e){return u[e]}u["../../package.json"]={name:"coffee-script",description:"Unfancy JavaScript",keywords:["javascript","language","coffeescript","compiler"],author:"Jeremy Ashkenas",version:"1.12.7",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":"^20170626.0.0","highlight.js":"~9.12.0",jison:"\x3e\x3d0.4.17","markdown-it":"^8.3.1",underscore:"~1.8.3"}};u["./helpers"]=function(){var e={};(function(){var u,r,x;e.starts=function(a,k,t){return k===a.substr(t,k.length)};e.ends=function(a,k,t){var f=k.length;return k===a.substr(a.length-
f-(t||0),f)};e.repeat=x=function(a,k){var f;for(f="";0<k;)k&1&&(f+=a),k>>>=1,a+=a;return f};e.compact=function(a){var f,b;var p=[];var x=0;for(b=a.length;x<b;x++)(f=a[x])&&p.push(f);return p};e.count=function(a,k){var f;var b=f=0;if(!k.length)return 1/0;for(;f=1+a.indexOf(k,f);)b++;return b};e.merge=function(f,k){return a(a({},f),k)};var a=e.extend=function(a,k){var f;for(f in k){var b=k[f];a[f]=b}return a};e.flatten=u=function(a){var f;var b=[];var x=0;for(f=a.length;x<f;x++){var e=a[x];"[object Array]"===
Object.prototype.toString.call(e)?b=b.concat(u(e)):b.push(e)}return b};e.del=function(a,k){var f=a[k];delete a[k];return f};e.some=null!=(r=Array.prototype.some)?r:function(a){var f;var b=0;for(f=this.length;b<f;b++){var x=this[b];if(a(x))return!0}return!1};e.invertLiterate=function(a){var f=!0;var b;var x=a.split("\n");var e=[];var I=0;for(b=x.length;I<b;I++)a=x[I],f&&/^([ ]{4}|[ ]{0,3}\t)/.test(a)?e.push(a):(f=/^\s*$/.test(a))?e.push(a):e.push("# "+a);return e.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};e.addLocationDataFn=function(a,k){return function(f){"object"===typeof f&&f.updateLocationDataIfMissing&&f.updateLocationDataIfMissing(b(a,k));return f}};e.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"};e.baseFileName=function(a,b,x){null==
b&&(b=!1);null==x&&(x=!1);a=a.split(x?/\\|\//:/\//);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(".")};e.isCoffee=function(a){return/\.((lit)?coffee|coffee\.md)$/.test(a)};e.isLiterate=function(a){return/\.(litcoffee|coffee\.md)$/.test(a)};e.throwSyntaxError=function(a,b){a=new SyntaxError(a);a.location=b;a.toString=za;a.stack=a.toString();throw a;};e.updateSyntaxError=function(a,b,x){a.toString===za&&(a.code||
(a.code=b),a.filename||(a.filename=x),a.stack=a.toString());return a};var za=function(){var a,b,e;if(!this.code||!this.location)return Error.prototype.toString.call(this);var p=this.location;var z=p.first_line;var I=p.first_column;var J=p.last_line;var F=p.last_column;null==J&&(J=z);null==F&&(F=I);var u=this.filename||"[stdin]";p=this.code.split("\n")[z];J=z===J?F+1:p.length;F=p.slice(0,I).replace(/[^\s]/g," ")+x("^",J-I);if("undefined"!==typeof process&&null!==process)var y=(null!=(a=process.stdout)?
a.isTTY:void 0)&&!(null!=(b=process.env)&&b.NODE_DISABLE_COLORS);if(null!=(e=this.colorful)?e:y)y=function(a){return"\u001b[1;31m"+a+"\u001b[0m"},p=p.slice(0,I)+y(p.slice(I,J))+p.slice(J),F=y(F);return u+":"+(z+1)+":"+(I+1)+": error: "+this.message+"\n"+p+"\n"+F};e.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 e}();u["./rewriter"]=function(){var e={};(function(){var u,
r,x=[].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};e.Rewriter=function(){function n(){}n.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};n.prototype.scanTokens=function(a){var c,b;var h=this.tokens;for(c=0;b=h[c];)c+=a.call(this,b,c,h);return!0};n.prototype.detectEnd=function(a,b,q){var c,w,n,L;var e=this.tokens;for(c=0;L=e[a];){if(0===c&&b.call(this,L,a))return q.call(this,L,a);if(!L||0>c)return q.call(this,L,a-1);(w=L[0],0<=x.call(f,w))?c+=1:(n=L[0],0<=x.call(k,n))&&--c;a+=1}return a-1};n.prototype.removeLeadingNewlines=function(){var a,b;var q=this.tokens;var h=a=0;for(b=q.length;a<b;h=++a){var f=q[h][0];if("TERMINATOR"!==
f)break}if(h)return this.tokens.splice(0,h)};n.prototype.closeOpenCalls=function(){var a=function(a,c){var h;return")"===(h=a[0])||"CALL_END"===h||"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,h){"CALL_START"===c[0]&&this.detectEnd(h+1,a,b);return 1})};n.prototype.closeOpenIndexes=function(){var a=function(a,c){var h;return"]"===(h=a[0])||"INDEX_END"===h};var b=function(a,c){return a[0]="INDEX_END"};
return this.scanTokens(function(c,h){"INDEX_START"===c[0]&&this.detectEnd(h+1,a,b);return 1})};n.prototype.indexOfTag=function(){var c,b,f,h;var n=arguments[0];var k=2<=arguments.length?a.call(arguments,1):[];var e=b=c=0;for(f=k.length;0<=f?b<f:b>f;e=0<=f?++b:--b){for(;"HERECOMMENT"===this.tag(n+e+c);)c+=2;if(null!=k[e]&&("string"===typeof k[e]&&(k[e]=[k[e]]),h=this.tag(n+e+c),0>x.call(k[e],h)))return-1}return n+e+c-1};n.prototype.looksObjectish=function(a){if(-1<this.indexOfTag(a,"@",null,":")||
-1<this.indexOfTag(a,null,":"))return!0;a=this.indexOfTag(a,f);if(-1<a){var c=null;this.detectEnd(a+1,function(a){var c;return c=a[0],0<=x.call(k,c)},function(a,b){return c=b});if(":"===this.tag(c+1))return!0}return!1};n.prototype.findTagsBackwards=function(a,b){var c,h,n,w,e,p,y;for(c=[];0<=a&&(c.length||(w=this.tag(a),0>x.call(b,w))&&((e=this.tag(a),0>x.call(f,e))||this.tokens[a].generated)&&(p=this.tag(a),0>x.call(Q,p)));)(h=this.tag(a),0<=x.call(k,h))&&c.push(this.tag(a)),(n=this.tag(a),0<=x.call(f,
n))&&c.length&&c.pop(),--a;return y=this.tag(a),0<=x.call(b,y)};n.prototype.addImplicitBracesAndParens=function(){var a=[];var n=null;return this.scanTokens(function(c,h,e){var q,w,p,t;var H=c[0];var K=(q=0<h?e[h-1]:[])[0];var u=(h<e.length-1?e[h+1]:[])[0];var z=function(){return a[a.length-1]};var D=h;var A=function(a){return h-D+a};var I=function(a){var c;return null!=a?null!=(c=a[2])?c.ours:void 0:void 0};var E=function(a){return I(a)&&"{"===(null!=a?a[0]:void 0)};var G=function(a){return I(a)&&
"("===(null!=a?a[0]:void 0)};var O=function(){return I(z())};var C=function(){return G(z())};var S=function(){return E(z())};var v=function(){var a;return O&&"CONTROL"===(null!=(a=z())?a[0]:void 0)};var X=function(f){var n=null!=f?f:h;a.push(["(",n,{ours:!0}]);e.splice(n,0,b("CALL_START","(",["","implicit function call",c[2]]));if(null==f)return h+=1};var R=function(){a.pop();e.splice(h,0,b("CALL_END",")",["","end of input",c[2]]));return h+=1};var M=function(f,n){null==n&&(n=!0);var q=null!=f?f:
h;a.push(["{",q,{sameLine:!0,startsLine:n,ours:!0}]);n=new String("{");n.generated=!0;e.splice(q,0,b("{",n,c));if(null==f)return h+=1};var r=function(f){f=null!=f?f:h;a.pop();e.splice(f,0,b("}","}",c));return h+=1};if(C()&&("IF"===H||"TRY"===H||"FINALLY"===H||"CATCH"===H||"CLASS"===H||"SWITCH"===H))return a.push(["CONTROL",h,{ours:!0}]),A(1);if("INDENT"===H&&O()){if("\x3d\x3e"!==K&&"-\x3e"!==K&&"["!==K&&"("!==K&&","!==K&&"{"!==K&&"TRY"!==K&&"ELSE"!==K&&"\x3d"!==K)for(;C();)R();v()&&a.pop();a.push([H,
h]);return A(1)}if(0<=x.call(f,H))return a.push([H,h]),A(1);if(0<=x.call(k,H)){for(;O();)C()?R():S()?r():a.pop();n=a.pop()}if((0<=x.call(J,H)&&c.spaced||"?"===H&&0<h&&!e[h-1].spaced)&&(0<=x.call(F,u)||0<=x.call(N,u)&&(null==(w=e[h+1])||!w.spaced)&&(null==(p=e[h+1])||!p.newLine)))return"?"===H&&(H=c[0]="FUNC_EXIST"),X(h+1),A(2);if(0<=x.call(J,H)&&-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 X(h+
1),a.push(["INDENT",h+2]),A(3);if(":"===H){for(r=function(){var a;switch(!1){case a=this.tag(h-1),0>x.call(k,a):return n[1];case "@"!==this.tag(h-2):return h-2;default:return h-1}}.call(this);"HERECOMMENT"===this.tag(r-2);)r-=2;this.insideForDeclaration="FOR"===u;q=0===r||(t=this.tag(r-1),0<=x.call(Q,t))||e[r-1].newLine;if(z()&&(S=z(),t=S[0],v=S[1],("{"===t||"INDENT"===t&&"{"===this.tag(v-1))&&(q||","===this.tag(r-1)||"{"===this.tag(r-1))))return A(1);M(r,!!q);return A(2)}if(0<=x.call(Q,H))for(M=
a.length-1;0<=M;M+=-1){t=a[M];if(!I(t))break;E(t)&&(t[2].sameLine=!1)}M="OUTDENT"===K||q.newLine;if(0<=x.call(y,H)||0<=x.call(B,H)&&M)for(;O();)if(M=z(),t=M[0],v=M[1],q=M[2],M=q.sameLine,q=q.startsLine,C()&&","!==K)R();else if(S()&&!this.insideForDeclaration&&M&&"TERMINATOR"!==H&&":"!==K)r();else if(!S()||"TERMINATOR"!==H||","===K||q&&this.looksObjectish(h+1))break;else{if("HERECOMMENT"===u)return A(1);r()}if(!(","!==H||this.looksObjectish(h+1)||!S()||this.insideForDeclaration||"TERMINATOR"===u&&
this.looksObjectish(h+2)))for(u="OUTDENT"===u?1:0;S();)r(h+u);return A(1)})};n.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(a,b,f){var c,n;if(a[2]||!a.generated&&!a.explicit)return 1;if("{"===a[0]&&(c=null!=(n=f[b+1])?n[2]:void 0)){var q=c.first_line;c=c.first_column}else(c=null!=(q=f[b-1])?q[2]:void 0)?(q=c.last_line,c=c.last_column):q=c=0;a[2]={first_line:q,first_column:c,last_line:q,last_column:c};return 1})};n.prototype.fixOutdentLocationData=function(){return this.scanTokens(function(a,
b,f){if(!("OUTDENT"===a[0]||a.generated&&"CALL_END"===a[0]||a.generated&&"}"===a[0]))return 1;b=f[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})};n.prototype.normalizeLines=function(){var b,f;var n=b=f=null;var h=function(a,b){var c,f,h,e;return";"!==a[1]&&(c=a[0],0<=x.call(O,c))&&!("TERMINATOR"===a[0]&&(f=this.tag(b+1),0<=x.call(I,f)))&&!("ELSE"===a[0]&&"THEN"!==n)&&!!("CATCH"!==(h=a[0])&&"FINALLY"!==h||"-\x3e"!==n&&"\x3d\x3e"!==
n)||(e=a[0],0<=x.call(B,e))&&(this.tokens[b-1].newLine||"OUTDENT"===this.tokens[b-1][0])};var e=function(a,b){return this.tokens.splice(","===this.tag(b-1)?b-1:b,0,f)};return this.scanTokens(function(c,q,k){var w,p,t;c=c[0];if("TERMINATOR"===c){if("ELSE"===this.tag(q+1)&&"OUTDENT"!==this.tag(q-1))return k.splice.apply(k,[q,1].concat(a.call(this.indentation()))),1;if(w=this.tag(q+1),0<=x.call(I,w))return k.splice(q,1),0}if("CATCH"===c)for(w=p=1;2>=p;w=++p)if("OUTDENT"===(t=this.tag(q+w))||"TERMINATOR"===
t||"FINALLY"===t)return k.splice.apply(k,[q+w,0].concat(a.call(this.indentation()))),2+w;0<=x.call(G,c)&&"INDENT"!==this.tag(q+1)&&("ELSE"!==c||"IF"!==this.tag(q+1))&&(n=c,t=this.indentation(k[q]),b=t[0],f=t[1],"THEN"===n&&(b.fromThen=!0),k.splice(q+1,0,b),this.detectEnd(q+2,h,e),"THEN"===c&&k.splice(q,1));return 1})};n.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>x.call(G,b)};var f=function(b,c){if("INDENT"!==
b[0]||b.generated&&!b.fromThen)return a[0]="POST_"+a[0]};return this.scanTokens(function(c,n){if("IF"!==c[0])return 1;a=c;this.detectEnd(n+1,b,f);return 1})};n.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]};n.prototype.generate=b;n.prototype.tag=function(a){var b;return null!=(b=this.tokens[a])?b[0]:void 0};return n}();var za=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START",
"CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]];e.INVERSES=u={};var f=[];var k=[];var t=0;for(r=za.length;t<r;t++){var p=za[t];var z=p[0];p=p[1];f.push(u[p]=z);k.push(u[z]=p)}var I=["CATCH","THEN","ELSE","FINALLY"].concat(k);var J="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 N=["+","-"];var y="POST_IF FOR WHILE UNTIL WHEN BY LOOP TERMINATOR".split(" ");var G="ELSE -\x3e \x3d\x3e TRY FINALLY THEN".split(" ");var O="TERMINATOR CATCH FINALLY ELSE OUTDENT LEADING_WHEN".split(" ");var Q=["TERMINATOR","INDENT","OUTDENT"];var B=[".","?.","::","?::"]}).call(this);return e}();u["./lexer"]=function(){var e={};(function(){var ra,r=[].indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1},x=[].slice;var a=u("./rewriter");var b=a.Rewriter;
var za=a.INVERSES;a=u("./helpers");var f=a.count;var k=a.repeat;var t=a.invertLiterate;var p=a.throwSyntaxError;e.Lexer=function(){function a(){}a.prototype.tokenize=function(a,c){var f,Da;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(Da=
0;this.chunk=a.slice(Da);){var n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken();var h=this.getLineAndColumnFromChunk(n);this.chunkLine=h[0];this.chunkColumn=h[1];Da+=n;if(c.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:Da}}this.closeIndentation();(f=this.ends.pop())&&this.error("missing "+f.tag,f.origin[2]);return!1===c.rewrite?this.tokens:(new b).rewrite(this.tokens)};
a.prototype.clean=function(a){a.charCodeAt(0)===Q&&(a=a.slice(1));a=a.replace(/\r/g,"").replace(Y,"");w.test(a)&&(a="\n"+a,this.chunkLine--);this.literate&&(a=t(a));return a};a.prototype.identifierToken=function(){var a,b,c,f,n,h,q;if(!(a=B.exec(this.chunk)))return 0;var e=a[0];var k=a[1];a=a[2];var x=k.length;var w=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(b=this.value(),0<=r.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",k),k.length}if("as"===k&&this.seenExport&&("IDENTIFIER"===(f=this.tag())||"DEFAULT"===f))return this.token("AS",k),k.length;if("default"===k&&this.seenExport&&("EXPORT"===(n=this.tag())||"AS"===n))return this.token("DEFAULT",k),k.length;b=this.tokens;b=b[b.length-
1];var p=a||null!=b&&("."===(h=b[0])||"?."===h||"::"===h||"?::"===h||!b.spaced&&"@"===b[0])?"PROPERTY":"IDENTIFIER";"IDENTIFIER"!==p||!(0<=r.call(J,k)||0<=r.call(F,k))||this.exportSpecifierList&&0<=r.call(F,k)?"IDENTIFIER"===p&&this.seenFor&&"from"===k&&I(b)&&(p="FORFROM",this.seenFor=!1):(p=k.toUpperCase(),"WHEN"===p&&(q=this.tag(),0<=r.call(sa,q))?p="LEADING_WHEN":"FOR"===p?this.seenFor=!0:"UNLESS"===p?p="IF":"IMPORT"===p?this.seenImport=!0:"EXPORT"===p?this.seenExport=!0:0<=r.call(ia,p)?p="UNARY":
0<=r.call(qa,p)&&("INSTANCEOF"!==p&&this.seenFor?(p="FOR"+p,this.seenFor=!1):(p="RELATION","!"===this.value()&&(w=this.tokens.pop(),k="!"+k))));"IDENTIFIER"===p&&0<=r.call(G,k)&&this.error("reserved word '"+k+"'",{length:k.length});if("PROPERTY"!==p){if(0<=r.call(y,k)){var t=k;k=N[k]}p=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 p}}()}h=this.token(p,k,0,x);t&&(h.origin=[p,t,h[2]]);w&&(t=[w[2].first_line,w[2].first_column],h[2].first_line=t[0],h[2].first_column=t[1]);a&&(t=e.lastIndexOf(":"),this.token(":",":",t,a.length));return e.length};a.prototype.numberToken=function(){var a,b;if(!(a=n.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 f=function(){switch(c.charAt(1)){case "b":return 2;case "o":return 8;case "x":return 16;default:return null}}();f=null!=f?parseInt(c.slice(2),f):parseFloat(c);if("b"===(b=c.charAt(1))||"o"===b)c="0x"+f.toString(16);
this.token(Infinity===f?"INFINITY":"NUMBER",c,0,a);return a};a.prototype.stringToken=function(){var a,b,c,f,n;var h=(U.exec(this.chunk)||[])[0];if(!h)return 0;this.tokens.length&&"from"===this.value()&&(this.seenImport||this.seenExport)&&(this.tokens[this.tokens.length-1][0]="FROM");var k=function(){switch(h){case "'":return W;case '"':return H;case "'''":return Z;case '"""':return T}}();var q=3===h.length;k=this.matchWithInterpolations(k,h);var e=k.tokens;var p=k.index;var x=e.length-1;k=h.charAt(0);
if(q){var w=null;for(q=function(){var a,c;var m=[];b=a=0;for(c=e.length;a<c;b=++a)n=e[b],"NEOSTRING"===n[0]&&m.push(n[1]);return m}().join("#{}");a=A.exec(q);)if(a=a[1],null===w||0<(f=a.length)&&f<w.length)w=a;w&&(c=RegExp("\\n"+w,"g"));this.mergeInterpolationTokens(e,{delimiter:k},function(a){return function(b,m){b=a.formatString(b,{delimiter:h});c&&(b=b.replace(c,"\n"));0===m&&(b=b.replace(Aa,""));m===x&&(b=b.replace(ma,""));return b}}(this))}else this.mergeInterpolationTokens(e,{delimiter:k},function(a){return function(b,
m){b=a.formatString(b,{delimiter:h});return b=b.replace(D,function(a,d){return 0===m&&0===d||m===x&&d+a.length===b.length?"":" "})}}(this));return p};a.prototype.commentToken=function(){var a,b;if(!(b=this.chunk.match(q)))return 0;var c=b[0];if(a=b[1])(b=X.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"+k(" ",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=S.exec(this.chunk)):this.error("regular expressions cannot begin with "+a[2],{offset:a.index+a[1].length});break;case !(a=this.matchWithInterpolations(ba,"///")):var f=a.tokens;var h=a.index;break;case !(a=
ic.exec(this.chunk)):var n=a[0];var k=a[1];a=a[2];this.validateEscapes(k,{isRegex:!0,offsetInChunk:1});k=this.formatRegex(k,{delimiter:"/"});h=n.length;var q=this.tokens;if(q=q[q.length-1])if(q.spaced&&(b=q[0],0<=r.call(ha,b))){if(!a||v.test(n))return 0}else if(c=q[0],0<=r.call(oa,c))return 0;a||this.error("missing / (unclosed regex)");break;default:return 0}c=E.exec(this.chunk.slice(h))[0];b=h+c.length;a=this.makeToken("REGEX",null,0,b);switch(!1){case !!aa.test(c):this.error("invalid regular expression flags "+
c,{offset:h,length:c.length});break;case !(n||1===f.length):null==k&&(k=this.formatHeregex(f[0][1]));this.token("REGEX",""+this.makeDelimitedLiteral(k,{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(f,{delimiter:'"',double:!0},this.formatHeregex),c&&(this.token(",",",",h-1,0),this.token("STRING",'"'+c+'"',h-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.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 f,h,n;for(f=this.indent-a;0<a;)if(h=this.indents[this.indents.length-1])if(h===this.outdebt)a-=this.outdebt,this.outdebt=0;else if(h<this.outdebt)this.outdebt-=
h,a-=h;else{var k=this.indents.pop()+this.outdebt;c&&(n=this.chunk[c],0<=r.call(ca,n))&&(f-=k-a,a=k);this.outdebt=0;this.pair("OUTDENT");this.token("OUTDENT",a,0,c);a-=k}else a=0;k&&(this.outdebt-=a);for(;";"===this.value();)this.tokens.pop();"TERMINATOR"===this.tag()||b||this.token("TERMINATOR","\n",c,0);this.indent=f;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,f,n,k;(a=c.exec(this.chunk))?(a=a[0],h.test(a)&&this.tagParameters()):a=this.chunk.charAt(0);var q=a;var e=this.tokens;if((e=e[e.length-1])&&0<=r.call(["\x3d"].concat(x.call(ea)),a)){var p=
!1;"\x3d"!==a||"||"!==(f=e[1])&&"\x26\x26"!==f||e.spaced||(e[0]="COMPOUND_ASSIGN",e[1]+="\x3d",e=this.tokens[this.tokens.length-2],p=!0);e&&"PROPERTY"!==e[0]&&(f=null!=(b=e.origin)?b:e,(b=z(e[1],f[1]))&&this.error(b,f[2]));if(p)return a.length}"{"===a&&this.seenImport?this.importSpecifierList=!0:this.importSpecifierList&&"}"===a?this.importSpecifierList=!1:"{"===a&&"EXPORT"===(null!=e?e[0]:void 0)?this.exportSpecifierList=!0:this.exportSpecifierList&&"}"===a&&(this.exportSpecifierList=!1);if(";"===
a)this.seenFor=this.seenImport=this.seenExport=!1,q="TERMINATOR";else if("*"===a&&"EXPORT"===e[0])q="EXPORT_ALL";else if(0<=r.call(pa,a))q="MATH";else if(0<=r.call(la,a))q="COMPARE";else if(0<=r.call(ea,a))q="COMPOUND_ASSIGN";else if(0<=r.call(ia,a))q="UNARY";else if(0<=r.call(fa,a))q="UNARY_MATH";else if(0<=r.call(ja,a))q="SHIFT";else if("?"===a&&null!=e&&e.spaced)q="BIN?";else if(e&&!e.spaced)if("("===a&&(n=e[0],0<=r.call(ha,n)))"?"===e[0]&&(e[0]="FUNC_EXIST"),q="CALL_START";else if("["===a&&(k=
e[0],0<=r.call(ka,k)))switch(q="INDEX_START",e[0]){case "?":e[0]="INDEX_SOAK"}n=this.makeToken(q,a);switch(a){case "(":case "{":case "[":this.ends.push({tag:za[a],origin:n});break;case ")":case "}":case "]":this.pair(a)}this.tokens.push(n);return a.length};a.prototype.tagParameters=function(){var a;if(")"!==this.tag())return this;var b=[];var c=this.tokens;var f=c.length;for(c[--f][0]="PARAM_END";a=c[--f];)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 f,h;var n=[];var k=c.length;if(this.chunk.slice(0,k)!==c)return null;for(h=this.chunk.slice(k);;){var e=b.exec(h)[0];this.validateEscapes(e,{isRegex:"/"===c.charAt(0),offsetInChunk:k});n.push(this.makeToken("NEOSTRING",e,k));h=h.slice(e.length);k+=e.length;if("#{"!==h.slice(0,2))break;var q=this.getLineAndColumnFromChunk(k+
1);e=q[0];q=q[1];q=(new a).tokenize(h.slice(1),{line:e,column:q,untilBalanced:!0});e=q.tokens;var p=q.index;p+=1;var x=e[0];q=e[e.length-1];x[0]=x[1]="(";q[0]=q[1]=")";q.origin=["","end of interpolation",q[2]];"TERMINATOR"===(null!=(f=e[1])?f[0]:void 0)&&e.splice(1,1);n.push(["TOKENS",e]);h=h.slice(p);k+=p}h.slice(0,c.length)!==c&&this.error("missing "+c,{length:c.length});b=n[0];f=n[n.length-1];b[2].first_column-=c.length;"\n"===f[1].substr(-1)?(f[2].last_line+=1,f[2].last_column=c.length-1):f[2].last_column+=
c.length;0===f[1].length&&--f[2].last_column;return{tokens:n,index:k+c.length}};a.prototype.mergeInterpolationTokens=function(a,b,c){var f,h,n,k;1<a.length&&(n=this.token("STRING_START","(",0,0));var e=this.tokens.length;var q=f=0;for(h=a.length;f<h;q=++f){var p=a[q];var x=p[0];var w=p[1];switch(x){case "TOKENS":if(2===w.length)continue;var t=w[0];var Ia=w;break;case "NEOSTRING":x=c.call(this,p[1],q);if(0===x.length)if(0===q)var m=this.tokens.length;else continue;2===q&&null!=m&&this.tokens.splice(m,
2);p[0]="STRING";p[1]=this.makeDelimitedLiteral(x,b);t=p;Ia=[p]}this.tokens.length>e&&(q=this.token("+","+"),q[2]={first_line:t[2].first_line,first_column:t[2].first_column,last_line:t[2].first_line,last_column:t[2].first_column});(k=this.tokens).push.apply(k,Ia)}if(n)return a=a[a.length-1],n.origin=["STRING",null,{first_line:n[2].first_line,first_column:n[2].first_column,last_line:a[2].last_line,last_column:a[2].last_column}],n=this.token("STRING_END",")"),n[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=f(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,f){null==c&&(c=0);null==f&&(f=b.length);var h={};var n=this.getLineAndColumnFromChunk(c);h.first_line=n[0];h.first_column=n[1];c=this.getLineAndColumnFromChunk(c+(0<f?f-1:0));h.last_line=c[0];h.last_column=c[1];return[a,b,h]};a.prototype.token=function(a,b,c,f,h){a=this.makeToken(a,b,c,f);h&&(a.origin=h);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 R.test(this.chunk)||(a=this.tag(),0<=r.call(xa,a))};a.prototype.formatString=function(a,b){return this.replaceUnicodeCodePointEscapes(a.replace(V,"$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"+k("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(ta,function(a){return function(c,f,h,n){if(f)return f;c=parseInt(h,16);1114111<c&&a.error("unicode code point escapes greater than \\u{10ffff} are not allowed",{offset:n+b.delimiter.length,length:h.length+
4});return a.unicodeCodePointToUnicodeEscapes(c)}}(this))};a.prototype.validateEscapes=function(a,b){var c,f;null==b&&(b={});if(c=(b.isRegex?ya:M).exec(a)){c[0];a=c[1];var h=c[2];var n=c[3];var k=c[4];var e=c[5];n="\\"+(h||n||k||e);return this.error((h?"octal escape sequences are not allowed":"invalid escape sequence")+" "+n,{offset:(null!=(f=b.offsetInChunk)?f:0)+c.index+a.length,length:n.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,f,h,n,k,e,q,p){switch(!1){case !c:return b.double?c+c:c;case !f:return"\\x00";case !h:return"\\"+h;case !n:return"\\n";case !k:return"\\r";case !e:return"\\u2028";case !q:return"\\u2029";case !p:return b.double?"\\"+p:p}});return""+b.delimiter+a+b.delimiter};a.prototype.error=function(a,b){var c,f,h,n,k;null==b&&(b={});b="first_line"in b?b:(n=this.getLineAndColumnFromChunk(null!=
(h=b.offset)?h:0),f=n[0],c=n[1],n,{first_line:f,first_column:c,last_column:c+(null!=(k=b.length)?k:1)-1});return p(a,b)};return a}();var z=function(a,b){null==b&&(b=a);switch(!1){case 0>r.call(x.call(J).concat(x.call(F)),a):return"keyword '"+b+"' can't be assigned";case 0>r.call(O,a):return"'"+b+"' can't be assigned";case 0>r.call(G,a):return"reserved word '"+b+"' can't be assigned";default:return!1}};e.isUnassignable=z;var I=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 J="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 N={and:"\x26\x26",or:"||",is:"\x3d\x3d",isnt:"!\x3d",not:"!",yes:"true",no:"false",on:"true",off:"false"};var y=function(){var a=[];for(ra in N)a.push(ra);
return a}();F=F.concat(y);var G="case function var void with const let enum native implements interface package private protected public static".split(" ");var O=["arguments","eval"];e.JS_FORBIDDEN=J.concat(G).concat(O);var Q=65279;var B=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/;var n=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;var c=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/;var w=/^[^\n\S]+/;var q=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;
var h=/^[-=]>/;var K=/^(?:\n[^\n\S]*)+/;var P=/^`(?!``)((?:[^`\\]|\\[\s\S])*)`/;var L=/^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/;var U=/^(?:'''|"""|'|")/;var W=/^(?:[^\\']|\\[\s\S])*/;var H=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/;var Z=/^(?:[^\\']|\\[\s\S]|'(?!''))*/;var T=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/;var V=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g;var D=/\s*\n\s*/g;var A=/\n+([^\n\S]*)(?=\S)/g;var ic=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;var E=/^\w*/;var aa=/^(?!.*(.).*\1)[imguy]*$/;
var ba=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/;var C=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g;var S=/^(\/|\/{3}\s*)(\*)/;var v=/^\/=?\s/;var X=/\*\//;var R=/^\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 ya=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7])|(x(?![\da-fA-F]{2}).{0,2})|(u\{(?![\da-fA-F]{1,}\})[^}]*\}?)|(u(?!\{|[\da-fA-F]{4}).{0,4}))/;var ta=/(\\\\)|\\u\{([\da-fA-F]+)\}/g;
var Aa=/^[^\n\S]*\n/;var ma=/\n[^\n\S]*$/;var Y=/\s+$/;var ea="-\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 fa=["!","~"];var ja=["\x3c\x3c","\x3e\x3e","\x3e\x3e\x3e"];var la="\x3d\x3d !\x3d \x3c \x3e \x3c\x3d \x3e\x3d".split(" ");var pa=["*","/","%","//","%%"];var qa=["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 oa=ka.concat(["++","--"]);var sa=["INDENT","OUTDENT","TERMINATOR"];var ca=[")","}","]"];var xa="\\ . ?. ?:: UNARY MATH UNARY_MATH + - ** SHIFT RELATION COMPARE \x26 ^ | \x26\x26 || BIN? THROW EXTENDS DEFAULT".split(" ")}).call(this);return e}();u["./parser"]=function(){var e={},ra={exports:e},r=function(){function e(){this.yy={}}var a=function(a,l,m,d){m=m||{};for(d=a.length;d--;m[a[d]]=
l);return m},b=[1,22],u=[1,25],f=[1,83],k=[1,79],t=[1,84],p=[1,85],z=[1,81],I=[1,82],J=[1,56],F=[1,58],N=[1,59],y=[1,60],G=[1,61],O=[1,62],Q=[1,49],B=[1,50],n=[1,32],c=[1,68],w=[1,69],q=[1,78],h=[1,47],K=[1,51],P=[1,52],L=[1,67],U=[1,65],W=[1,66],H=[1,64],Z=[1,42],T=[1,48],V=[1,63],D=[1,73],A=[1,74],r=[1,75],E=[1,76],aa=[1,46],ba=[1,72],C=[1,34],S=[1,35],v=[1,36],X=[1,37],R=[1,38],M=[1,39],ra=[1,86],ta=[1,6,32,42,131],Aa=[1,101],ma=[1,89],Y=[1,88],ea=[1,87],ia=[1,90],fa=[1,91],ja=[1,92],la=[1,93],
pa=[1,94],qa=[1,95],ha=[1,96],ka=[1,97],oa=[1,98],sa=[1,99],ca=[1,100],ya=[1,104],na=[1,6,31,32,42,66,71,74,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],Da=[2,167],va=[1,110],xa=[1,111],Ha=[1,112],Ka=[1,113],Fa=[1,115],Ra=[1,116],La=[1,109],Ga=[1,6,32,42,131,133,135,139,156],Wa=[2,27],da=[1,123],Za=[1,121],Ea=[1,6,31,32,40,41,42,66,71,74,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,95],m=[1,6,31,32,42,46,66,71,74,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],l=[2,74],d=[1,128],Ca=[1,133],Ja=[1,134],ua=[1,136],Na=[1,6,31,32,40,41,42,55,66,71,74,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,92],Gb=[1,6,32,42,66,71,74,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],$a=[2,64],Hb=[1,161],Ib=[1,167],ab=[1,179],Va=[1,181],Jb=[1,176],Qa=[1,183],ub=[1,185],Oa=[1,6,31,32,40,41,42,55,66,71,74,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],Kb=[2,111],Lb=[1,6,31,32,40,41,42,58,66,71,74,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=[1,6,31,32,40,41,
42,46,58,66,71,74,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],Nb=[40,41,114],Ob=[1,242],vb=[1,241],Pa=[1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156],Ma=[2,72],Pb=[1,251],Ua=[6,31,32,66,71],hb=[6,31,32,55,66,71,74],bb=[1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,159,160,164,166,167,168,169,170,171,172,173,174],Qb=[40,41,82,83,84,85,87,90,113,114],ib=[1,270],cb=[2,62],
jb=[1,281],Xa=[1,283],wb=[1,288],db=[1,290],Rb=[2,188],xb=[1,6,31,32,40,41,42,55,66,71,74,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,299],Sa=[6,31,32,71,115,120],Sb=[1,6,31,32,40,41,42,55,58,66,71,74,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],Tb=[1,6,31,32,42,66,71,74,89,94,115,120,122,
131,140,156],Ya=[1,6,31,32,42,66,71,74,89,94,115,120,122,131,134,140,156],lb=[146,147,148],mb=[71,146,147,148],nb=[6,31,94],Ub=[1,313],Ba=[6,31,32,71,94],Vb=[6,31,32,58,71,94],yb=[6,31,32,55,58,71,94],Wb=[1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,159,160,166,167,168,169,170,171,172,173,174],Xb=[12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,63,64,68,69,89,92,95,97,105,112,117,118,119,125,129,130,133,135,137,139,149,155,157,158,159,160,161,162],Yb=[2,177],Ta=[6,31,32],eb=[2,
73],Zb=[1,325],$b=[1,326],ac=[1,6,31,32,42,66,71,74,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],bc=[1,6,32,42,66,71,74,89,94,115,120,122,131,134,140,156],pb=[1,353],zb=[1,359],Ab=[1,6,32,42,131,156],fb=[2,87],qb=[1,370],rb=[1,371],cc=[1,6,31,32,42,66,71,74,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,66,71,74,89,94,115,120,122,131,
133,135,139,140,156],dc=[1,384],ec=[1,385],Cb=[6,31,32,94],fc=[6,31,32,71],Db=[1,6,31,32,42,66,71,74,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],gc=[31,71],sb=[1,411],tb=[1,412],Eb=[1,418],Fb=[1,419],hc={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,Object:62,HERECOMMENT:63,PARAM_START:64,ParamList:65,
PARAM_END:66,FuncGlyph:67,"-\x3e":68,"\x3d\x3e":69,OptComma:70,",":71,Param:72,ParamVar:73,"...":74,Array: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",63:"HERECOMMENT",64:"PARAM_START",66:"PARAM_END",68:"-\x3e",69:"\x3d\x3e",71:",",74:"...",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,4],[10,1],[9,3],[9,2],[11,1],[17,5],[17,2],[67,1],[67,1],[70,0],[70,1],[65,0],[65,1],[65,3],[65,4],[65,6],[72,1],[72,2],[72,3],[72,1],[73,1],
[73,1],[73,1],[73,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],[62,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],[75,2],[75,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,l,m,d,Ca,b,g){a=b.length-1;switch(Ca){case 1:return this.$=d.addLocationDataFn(g[a],
g[a])(new d.Block);case 2:return this.$=b[a];case 3:this.$=d.addLocationDataFn(g[a],g[a])(d.Block.wrap([b[a]]));break;case 4:this.$=d.addLocationDataFn(g[a-2],g[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 72:case 73:case 83:case 84:case 85:case 86:case 91:case 92:case 95:case 99:case 105:case 164:case 188:case 189:case 191:case 221:case 222:case 240:case 246:this.$=
b[a];break;case 11:this.$=d.addLocationDataFn(g[a],g[a])(new d.StatementLiteral(b[a]));break;case 27:this.$=d.addLocationDataFn(g[a],g[a])(new d.Op(b[a],new d.Value(new d.Literal(""))));break;case 28:case 250:case 251:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Op(b[a-1],b[a]));break;case 29:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Op(b[a-2].concat(b[a-1]),b[a]));break;case 30:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Block);break;case 31:case 106:this.$=d.addLocationDataFn(g[a-2],g[a])(b[a-
1]);break;case 32:this.$=d.addLocationDataFn(g[a],g[a])(new d.IdentifierLiteral(b[a]));break;case 33:this.$=d.addLocationDataFn(g[a],g[a])(new d.PropertyName(b[a]));break;case 34:this.$=d.addLocationDataFn(g[a],g[a])(new d.NumberLiteral(b[a]));break;case 36:this.$=d.addLocationDataFn(g[a],g[a])(new d.StringLiteral(b[a]));break;case 37:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.StringWithInterpolations(b[a-1]));break;case 38:this.$=d.addLocationDataFn(g[a],g[a])(new d.RegexLiteral(b[a]));break;
case 39:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.RegexWithInterpolations(b[a-1].args));break;case 41:this.$=d.addLocationDataFn(g[a],g[a])(new d.PassthroughLiteral(b[a]));break;case 43:this.$=d.addLocationDataFn(g[a],g[a])(new d.UndefinedLiteral);break;case 44:this.$=d.addLocationDataFn(g[a],g[a])(new d.NullLiteral);break;case 45:this.$=d.addLocationDataFn(g[a],g[a])(new d.BooleanLiteral(b[a]));break;case 46:this.$=d.addLocationDataFn(g[a],g[a])(new d.InfinityLiteral(b[a]));break;case 47:this.$=
d.addLocationDataFn(g[a],g[a])(new d.NaNLiteral);break;case 48:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Assign(b[a-2],b[a]));break;case 49:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Assign(b[a-3],b[a]));break;case 50:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Assign(b[a-4],b[a-1]));break;case 51:case 88:case 93:case 94:case 96:case 97:case 98:case 223:case 224:this.$=d.addLocationDataFn(g[a],g[a])(new d.Value(b[a]));break;case 52:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Assign(d.addLocationDataFn(g[a-
2])(new d.Value(b[a-2])),b[a],"object",{operatorToken:d.addLocationDataFn(g[a-1])(new d.Literal(b[a-1]))}));break;case 53:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Assign(d.addLocationDataFn(g[a-4])(new d.Value(b[a-4])),b[a-1],"object",{operatorToken:d.addLocationDataFn(g[a-3])(new d.Literal(b[a-3]))}));break;case 54:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Assign(d.addLocationDataFn(g[a-2])(new d.Value(b[a-2])),b[a],null,{operatorToken:d.addLocationDataFn(g[a-1])(new d.Literal(b[a-1]))}));
break;case 55:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Assign(d.addLocationDataFn(g[a-4])(new d.Value(b[a-4])),b[a-1],null,{operatorToken:d.addLocationDataFn(g[a-3])(new d.Literal(b[a-3]))}));break;case 62:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Return(b[a]));break;case 63:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Return(new d.Value(b[a-1])));break;case 64:this.$=d.addLocationDataFn(g[a],g[a])(new d.Return);break;case 65:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.YieldReturn(b[a]));
break;case 66:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.YieldReturn);break;case 67:this.$=d.addLocationDataFn(g[a],g[a])(new d.Comment(b[a]));break;case 68:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Code(b[a-3],b[a],b[a-1]));break;case 69:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Code([],b[a],b[a-1]));break;case 70:this.$=d.addLocationDataFn(g[a],g[a])("func");break;case 71:this.$=d.addLocationDataFn(g[a],g[a])("boundfunc");break;case 74:case 111:this.$=d.addLocationDataFn(g[a],g[a])([]);
break;case 75:case 112:case 131:case 151:case 183:case 225:this.$=d.addLocationDataFn(g[a],g[a])([b[a]]);break;case 76:case 113:case 132:case 152:case 184:this.$=d.addLocationDataFn(g[a-2],g[a])(b[a-2].concat(b[a]));break;case 77:case 114:case 133:case 153:case 185:this.$=d.addLocationDataFn(g[a-3],g[a])(b[a-3].concat(b[a]));break;case 78:case 115:case 135:case 155:case 187:this.$=d.addLocationDataFn(g[a-5],g[a])(b[a-5].concat(b[a-2]));break;case 79:this.$=d.addLocationDataFn(g[a],g[a])(new d.Param(b[a]));
break;case 80:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Param(b[a-1],null,!0));break;case 81:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Param(b[a-2],b[a]));break;case 82:case 190:this.$=d.addLocationDataFn(g[a],g[a])(new d.Expansion);break;case 87:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Splat(b[a-1]));break;case 89:this.$=d.addLocationDataFn(g[a-1],g[a])(b[a-1].add(b[a]));break;case 90:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Value(b[a-1],[].concat(b[a])));break;case 100:this.$=
d.addLocationDataFn(g[a-1],g[a])(new d.Access(b[a]));break;case 101:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Access(b[a],"soak"));break;case 102:this.$=d.addLocationDataFn(g[a-1],g[a])([d.addLocationDataFn(g[a-1])(new d.Access(new d.PropertyName("prototype"))),d.addLocationDataFn(g[a])(new d.Access(b[a]))]);break;case 103:this.$=d.addLocationDataFn(g[a-1],g[a])([d.addLocationDataFn(g[a-1])(new d.Access(new d.PropertyName("prototype"),"soak")),d.addLocationDataFn(g[a])(new d.Access(b[a]))]);break;
case 104:this.$=d.addLocationDataFn(g[a],g[a])(new d.Access(new d.PropertyName("prototype")));break;case 107:this.$=d.addLocationDataFn(g[a-1],g[a])(d.extend(b[a],{soak:!0}));break;case 108:this.$=d.addLocationDataFn(g[a],g[a])(new d.Index(b[a]));break;case 109:this.$=d.addLocationDataFn(g[a],g[a])(new d.Slice(b[a]));break;case 110:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Obj(b[a-2],b[a-3].generated));break;case 116:this.$=d.addLocationDataFn(g[a],g[a])(new d.Class);break;case 117:this.$=d.addLocationDataFn(g[a-
1],g[a])(new d.Class(null,null,b[a]));break;case 118:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Class(null,b[a]));break;case 119:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Class(null,b[a-1],b[a]));break;case 120:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Class(b[a]));break;case 121:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Class(b[a-1],null,b[a]));break;case 122:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Class(b[a-2],b[a]));break;case 123:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Class(b[a-
3],b[a-1],b[a]));break;case 124:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.ImportDeclaration(null,b[a]));break;case 125:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.ImportDeclaration(new d.ImportClause(b[a-2],null),b[a]));break;case 126:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.ImportDeclaration(new d.ImportClause(null,b[a-2]),b[a]));break;case 127:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.ImportDeclaration(new d.ImportClause(null,new d.ImportSpecifierList([])),b[a]));break;case 128:this.$=
d.addLocationDataFn(g[a-6],g[a])(new d.ImportDeclaration(new d.ImportClause(null,new d.ImportSpecifierList(b[a-4])),b[a]));break;case 129:this.$=d.addLocationDataFn(g[a-5],g[a])(new d.ImportDeclaration(new d.ImportClause(b[a-4],b[a-2]),b[a]));break;case 130:this.$=d.addLocationDataFn(g[a-8],g[a])(new d.ImportDeclaration(new d.ImportClause(b[a-7],new d.ImportSpecifierList(b[a-4])),b[a]));break;case 134:case 154:case 170:case 186:this.$=d.addLocationDataFn(g[a-3],g[a])(b[a-2]);break;case 136:this.$=
d.addLocationDataFn(g[a],g[a])(new d.ImportSpecifier(b[a]));break;case 137:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.ImportSpecifier(b[a-2],b[a]));break;case 138:this.$=d.addLocationDataFn(g[a],g[a])(new d.ImportSpecifier(new d.Literal(b[a])));break;case 139:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.ImportSpecifier(new d.Literal(b[a-2]),b[a]));break;case 140:this.$=d.addLocationDataFn(g[a],g[a])(new d.ImportDefaultSpecifier(b[a]));break;case 141:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.ImportNamespaceSpecifier(new d.Literal(b[a-
2]),b[a]));break;case 142:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList([])));break;case 143:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList(b[a-2])));break;case 144:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.ExportNamedDeclaration(b[a]));break;case 145:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.ExportNamedDeclaration(new d.Assign(b[a-2],b[a],null,{moduleDeclaration:"export"})));break;case 146:this.$=
d.addLocationDataFn(g[a-4],g[a])(new d.ExportNamedDeclaration(new d.Assign(b[a-3],b[a],null,{moduleDeclaration:"export"})));break;case 147:this.$=d.addLocationDataFn(g[a-5],g[a])(new d.ExportNamedDeclaration(new d.Assign(b[a-4],b[a-1],null,{moduleDeclaration:"export"})));break;case 148:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.ExportDefaultDeclaration(b[a]));break;case 149:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.ExportAllDeclaration(new d.Literal(b[a-2]),b[a]));break;case 150:this.$=d.addLocationDataFn(g[a-
6],g[a])(new d.ExportNamedDeclaration(new d.ExportSpecifierList(b[a-4]),b[a]));break;case 156:this.$=d.addLocationDataFn(g[a],g[a])(new d.ExportSpecifier(b[a]));break;case 157:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.ExportSpecifier(b[a-2],b[a]));break;case 158:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.ExportSpecifier(b[a-2],new d.Literal(b[a])));break;case 159:this.$=d.addLocationDataFn(g[a],g[a])(new d.ExportSpecifier(new d.Literal(b[a])));break;case 160:this.$=d.addLocationDataFn(g[a-
2],g[a])(new d.ExportSpecifier(new d.Literal(b[a-2]),b[a]));break;case 161:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.TaggedTemplateCall(b[a-2],b[a],b[a-1]));break;case 162:case 163:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Call(b[a-2],b[a],b[a-1]));break;case 165:this.$=d.addLocationDataFn(g[a],g[a])(new d.SuperCall);break;case 166:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.SuperCall(b[a]));break;case 167:this.$=d.addLocationDataFn(g[a],g[a])(!1);break;case 168:this.$=d.addLocationDataFn(g[a],
g[a])(!0);break;case 169:this.$=d.addLocationDataFn(g[a-1],g[a])([]);break;case 171:case 172:this.$=d.addLocationDataFn(g[a],g[a])(new d.Value(new d.ThisLiteral));break;case 173:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Value(d.addLocationDataFn(g[a-1])(new d.ThisLiteral),[d.addLocationDataFn(g[a])(new d.Access(b[a]))],"this"));break;case 174:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Arr([]));break;case 175:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Arr(b[a-2]));break;case 176:this.$=d.addLocationDataFn(g[a],
g[a])("inclusive");break;case 177:this.$=d.addLocationDataFn(g[a],g[a])("exclusive");break;case 178:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Range(b[a-3],b[a-1],b[a-2]));break;case 179:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Range(b[a-2],b[a],b[a-1]));break;case 180:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Range(b[a-1],null,b[a]));break;case 181:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Range(null,b[a],b[a-1]));break;case 182:this.$=d.addLocationDataFn(g[a],g[a])(new d.Range(null,
null,b[a]));break;case 192:this.$=d.addLocationDataFn(g[a-2],g[a])([].concat(b[a-2],b[a]));break;case 193:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Try(b[a]));break;case 194:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Try(b[a-1],b[a][0],b[a][1]));break;case 195:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Try(b[a-2],null,null,b[a]));break;case 196:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Try(b[a-3],b[a-2][0],b[a-2][1],b[a]));break;case 197:this.$=d.addLocationDataFn(g[a-2],g[a])([b[a-
1],b[a]]);break;case 198:this.$=d.addLocationDataFn(g[a-2],g[a])([d.addLocationDataFn(g[a-1])(new d.Value(b[a-1])),b[a]]);break;case 199:this.$=d.addLocationDataFn(g[a-1],g[a])([null,b[a]]);break;case 200:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Throw(b[a]));break;case 201:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Parens(b[a-1]));break;case 202:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Parens(b[a-2]));break;case 203:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.While(b[a]));break;case 204:this.$=
d.addLocationDataFn(g[a-3],g[a])(new d.While(b[a-2],{guard:b[a]}));break;case 205:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.While(b[a],{invert:!0}));break;case 206:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.While(b[a-2],{invert:!0,guard:b[a]}));break;case 207:this.$=d.addLocationDataFn(g[a-1],g[a])(b[a-1].addBody(b[a]));break;case 208:case 209:this.$=d.addLocationDataFn(g[a-1],g[a])(b[a].addBody(d.addLocationDataFn(g[a-1])(d.Block.wrap([b[a-1]]))));break;case 210:this.$=d.addLocationDataFn(g[a],
g[a])(b[a]);break;case 211:this.$=d.addLocationDataFn(g[a-1],g[a])((new d.While(d.addLocationDataFn(g[a-1])(new d.BooleanLiteral("true")))).addBody(b[a]));break;case 212:this.$=d.addLocationDataFn(g[a-1],g[a])((new d.While(d.addLocationDataFn(g[a-1])(new d.BooleanLiteral("true")))).addBody(d.addLocationDataFn(g[a])(d.Block.wrap([b[a]]))));break;case 213:case 214:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.For(b[a-1],b[a]));break;case 215:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.For(b[a],b[a-
1]));break;case 216:this.$=d.addLocationDataFn(g[a-1],g[a])({source:d.addLocationDataFn(g[a])(new d.Value(b[a]))});break;case 217:this.$=d.addLocationDataFn(g[a-3],g[a])({source:d.addLocationDataFn(g[a-2])(new d.Value(b[a-2])),step:b[a]});break;case 218:d=d.addLocationDataFn(g[a-1],g[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 219:this.$=d.addLocationDataFn(g[a-1],g[a])(b[a]);break;case 220:Ca=d.addLocationDataFn(g[a-2],g[a]);
b[a].own=!0;b[a].ownTag=d.addLocationDataFn(g[a-1])(new d.Literal(b[a-1]));this.$=Ca(b[a]);break;case 226:this.$=d.addLocationDataFn(g[a-2],g[a])([b[a-2],b[a]]);break;case 227:this.$=d.addLocationDataFn(g[a-1],g[a])({source:b[a]});break;case 228:this.$=d.addLocationDataFn(g[a-1],g[a])({source:b[a],object:!0});break;case 229:this.$=d.addLocationDataFn(g[a-3],g[a])({source:b[a-2],guard:b[a]});break;case 230:this.$=d.addLocationDataFn(g[a-3],g[a])({source:b[a-2],guard:b[a],object:!0});break;case 231:this.$=
d.addLocationDataFn(g[a-3],g[a])({source:b[a-2],step:b[a]});break;case 232:this.$=d.addLocationDataFn(g[a-5],g[a])({source:b[a-4],guard:b[a-2],step:b[a]});break;case 233:this.$=d.addLocationDataFn(g[a-5],g[a])({source:b[a-4],step:b[a-2],guard:b[a]});break;case 234:this.$=d.addLocationDataFn(g[a-1],g[a])({source:b[a],from:!0});break;case 235:this.$=d.addLocationDataFn(g[a-3],g[a])({source:b[a-2],guard:b[a],from:!0});break;case 236:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Switch(b[a-3],b[a-1]));
break;case 237:this.$=d.addLocationDataFn(g[a-6],g[a])(new d.Switch(b[a-5],b[a-3],b[a-1]));break;case 238:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Switch(null,b[a-1]));break;case 239:this.$=d.addLocationDataFn(g[a-5],g[a])(new d.Switch(null,b[a-3],b[a-1]));break;case 241:this.$=d.addLocationDataFn(g[a-1],g[a])(b[a-1].concat(b[a]));break;case 242:this.$=d.addLocationDataFn(g[a-2],g[a])([[b[a-1],b[a]]]);break;case 243:this.$=d.addLocationDataFn(g[a-3],g[a])([[b[a-2],b[a-1]]]);break;case 244:this.$=
d.addLocationDataFn(g[a-2],g[a])(new d.If(b[a-1],b[a],{type:b[a-2]}));break;case 245:this.$=d.addLocationDataFn(g[a-4],g[a])(b[a-4].addElse(d.addLocationDataFn(g[a-2],g[a])(new d.If(b[a-1],b[a],{type:b[a-2]}))));break;case 247:this.$=d.addLocationDataFn(g[a-2],g[a])(b[a-2].addElse(b[a]));break;case 248:case 249:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.If(b[a],d.addLocationDataFn(g[a-2])(d.Block.wrap([b[a-2]])),{type:b[a-1],statement:!0}));break;case 252:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Op("-",
b[a]));break;case 253:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Op("+",b[a]));break;case 254:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Op("--",b[a]));break;case 255:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Op("++",b[a]));break;case 256:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Op("--",b[a-1],null,!0));break;case 257:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Op("++",b[a-1],null,!0));break;case 258:this.$=d.addLocationDataFn(g[a-1],g[a])(new d.Existence(b[a-1]));break;case 259:this.$=
d.addLocationDataFn(g[a-2],g[a])(new d.Op("+",b[a-2],b[a]));break;case 260:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Op("-",b[a-2],b[a]));break;case 261:case 262:case 263:case 264:case 265:case 266:case 267:case 268:case 269:case 270:this.$=d.addLocationDataFn(g[a-2],g[a])(new d.Op(b[a-1],b[a-2],b[a]));break;case 271:g=d.addLocationDataFn(g[a-2],g[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.$=g(b);break;case 272:this.$=d.addLocationDataFn(g[a-
2],g[a])(new d.Assign(b[a-2],b[a],b[a-1]));break;case 273:this.$=d.addLocationDataFn(g[a-4],g[a])(new d.Assign(b[a-4],b[a-1],b[a-3]));break;case 274:this.$=d.addLocationDataFn(g[a-3],g[a])(new d.Assign(b[a-3],b[a],b[a-2]));break;case 275:this.$=d.addLocationDataFn(g[a-2],g[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:f,37:55,38:k,39:80,40:t,41:p,43:57,
44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{1:[3]},{1:[2,2],6:ra},a(ta,[2,3]),a(ta,[2,6],{141:77,132:102,138:103,133:D,135:A,139:E,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(ta,
[2,7],{141:77,132:105,138:106,133:D,135:A,139:E,156:ya}),a(ta,[2,8]),a(na,[2,14],{109:107,78:108,86:114,40:Da,41:Da,114:Da,82:va,83:xa,84:Ha,85:Ka,87:Fa,90:Ra,113:La}),a(na,[2,15],{86:114,109:117,78:118,82:va,83:xa,84:Ha,85:Ka,87:Fa,90:Ra,113:La,114:Da}),a(na,[2,16]),a(na,[2,17]),a(na,[2,18]),a(na,[2,19]),a(na,[2,20]),a(na,[2,21]),a(na,[2,22]),a(na,[2,23]),a(na,[2,24]),a(na,[2,25]),a(na,[2,26]),a(Ga,[2,9]),a(Ga,[2,10]),a(Ga,[2,11]),a(Ga,[2,12]),a(Ga,[2,13]),a([1,6,32,42,131,133,135,139,156,163,164,
165,166,167,168,169,170,171,172,173,174],Wa,{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,67:33,77:40,154:41,132:43,136:44,138:45,75:53,62:54,37:55,43:57,33:70,60:71,141:77,39:80,7:120,8:122,12:b,28:da,29:Za,34:f,38:k,40:t,41:p,44:z,45:I,48:J,49:F,50:N,51:y,52:G,53:O,61:[1,119],63:B,64:n,68:c,69:w,92:q,95:h,97:K,105:P,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,137:r,149:aa,155:ba,157:C,158:S,159:v,160:X,161:R,
162:M}),a(Ea,Ia,{55:[1,124]}),a(Ea,[2,96]),a(Ea,[2,97]),a(Ea,[2,98]),a(Ea,[2,99]),a(m,[2,164]),a([6,31,66,71],l,{65:125,72:126,73:127,33:129,60:130,75:131,62:132,34:f,74:d,92:q,118:Ca,119:Ja}),{30:135,31:ua},{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,
95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,
117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,
130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,
137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{15:142,16:143,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:144,60:71,62:54,75:53,77:141,79:28,80:29,81:30,92:q,111:31,112:L,117:U,118:W,119:H,130:V},{15:142,16:143,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:144,60:71,62:54,75:53,77:145,79:28,80:29,81:30,92:q,111:31,112:L,117:U,118:W,119:H,130:V},a(Na,wa,{96:[1,149],161:[1,
146],162:[1,147],175:[1,148]}),a(na,[2,246],{151:[1,150]}),{30:151,31:ua},{30:152,31:ua},a(na,[2,210]),{30:153,31:ua},{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:da,31:[1,155],33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,
135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Gb,[2,116],{47:27,79:28,80:29,81:30,111:31,75:53,62:54,37:55,43:57,33:70,60:71,39:80,15:142,16:143,54:144,30:156,77:158,31:ua,34:f,38:k,40:t,41:p,44:z,45:I,48:J,49:F,50:N,51:y,52:G,53:O,92:q,96:[1,157],112:L,117:U,118:W,119:H,130:V}),{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,
45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Ga,$a,{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,67:33,77:40,154:41,132:43,136:44,138:45,75:53,62:54,37:55,
43:57,33:70,60:71,141:77,39:80,8:122,7:160,12:b,28:da,31:Hb,34:f,38:k,40:t,41:p,44:z,45:I,48:J,49:F,50:N,51:y,52:G,53:O,61:Q,63:B,64:n,68:c,69:w,92:q,95:h,97:K,105:P,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,137:r,149:aa,155:ba,157:C,158:S,159:v,160:X,161:R,162:M}),a([1,6,31,32,42,71,94,131,133,135,139,156],[2,67]),{33:166,34:f,39:162,40:t,41:p,92:[1,165],98:163,99:164,104:Ib},{25:169,33:170,34:f,92:[1,168],95:h,103:[1,171],107:[1,172]},a(Na,[2,93]),a(Na,[2,94]),a(Ea,[2,40]),a(Ea,[2,41]),a(Ea,[2,
42]),a(Ea,[2,43]),a(Ea,[2,44]),a(Ea,[2,45]),a(Ea,[2,46]),a(Ea,[2,47]),{4:173,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,174],33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,
149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:175,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:da,31:ab,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,74:Va,75:53,76:180,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,116:177,117:U,118:W,119:H,120:Jb,123:178,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,
139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Ea,[2,171]),a(Ea,[2,172],{35:182,36:Qa}),a([1,6,31,32,42,46,66,71,74,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,165],{110:184,114:ub}),{31:[2,70]},{31:[2,71]},a(Oa,[2,88]),a(Oa,[2,91]),{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,
43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,
50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:188,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,
61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:190,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:da,30:189,31:ua,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,
64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{33:195,34:f,60:196,62:198,75:197,80:191,92:q,118:Ca,119:H,143:192,144:[1,193],145:194},{142:199,146:[1,200],147:[1,201],148:[1,202]},a([6,31,71,94],Kb,{39:80,93:203,56:204,57:205,59:206,11:207,37:208,33:209,35:210,60:211,34:f,36:Qa,38:k,40:t,41:p,63:B,118:Ca}),a(Lb,[2,
34]),a(Lb,[2,35]),a(Ea,[2,38]),{15:142,16:212,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:144,60:71,62:54,75:53,77:213,79:28,80:29,81:30,92:q,111:31,112:L,117:U,118:W,119:H,130:V},a([1,6,29,31,32,40,41,42,55,58,66,71,74,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(Mb,[2,36]),{4:214,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:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(ta,[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,67:33,77:40,154:41,132:43,136:44,138:45,75:53,62:54,37:55,43:57,33:70,60:71,141:77,39:80,5:215,12:b,28:u,34:f,38:k,40:t,41:p,44:z,45:I,48:J,49:F,50:N,51:y,52:G,53:O,61:Q,63:B,64:n,68:c,69:w,92:q,95:h,97:K,105:P,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,133:D,135:A,137:r,139:E,149:aa,155:ba,157:C,158:S,159:v,160:X,161:R,162:M}),a(na,[2,258]),{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,
37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,
44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,
51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,
62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,
75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,
92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,
117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,
130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,
137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,
154:41,155:ba,157:C,158:S,159:v,160:X,161:R,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,
160:X,161:R,162:M},{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(na,[2,209]),
a(na,[2,214]),{7:230,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(na,[2,208]),a(na,
[2,213]),{39:231,40:t,41:p,110:232,114:ub},a(Oa,[2,89]),a(Nb,[2,168]),{35:233,36:Qa},{35:234,36:Qa},a(Oa,[2,104],{35:235,36:Qa}),{35:236,36:Qa},a(Oa,[2,105]),{7:238,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,74:Ob,75:53,77:40,79:28,80:29,81:30,88:237,91:239,92:q,95:h,97:K,105:P,111:31,112:L,
117:U,118:W,119:H,121:240,122:vb,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{86:243,87:Fa,90:Ra},{110:244,114:ub},a(Oa,[2,90]),a(ta,[2,66],{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,67:33,77:40,154:41,132:43,136:44,138:45,75:53,62:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,7:245,12:b,28:da,31:Hb,34:f,38:k,40:t,41:p,44:z,
45:I,48:J,49:F,50:N,51:y,52:G,53:O,61:Q,63:B,64:n,68:c,69:w,92:q,95:h,97:K,105:P,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,133:$a,135:$a,139:$a,156:$a,137:r,149:aa,155:ba,157:C,158:S,159:v,160:X,161:R,162:M}),a(Pa,[2,28],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,
43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{132:105,133:D,135:A,138:106,139:E,141:77,156:ya},a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,163,164,165,166,167,168,169,170,171,172,173,174],Wa,{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,67:33,77:40,154:41,132:43,136:44,138:45,75:53,62:54,37:55,43:57,33:70,60:71,141:77,39:80,7:120,8:122,12:b,28:da,29:Za,34:f,38:k,40:t,41:p,44:z,45:I,48:J,49:F,50:N,51:y,52:G,53:O,61:Q,63:B,64:n,68:c,69:w,92:q,95:h,97:K,105:P,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,137:r,149:aa,155:ba,157:C,158:S,159:v,160:X,161:R,162:M}),{6:[1,248],7:247,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:da,31:[1,249],33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a([6,31],Ma,{70:252,66:[1,250],71:Pb}),a(Ua,[2,75]),a(Ua,[2,79],{55:[1,
254],74:[1,253]}),a(Ua,[2,82]),a(hb,[2,83]),a(hb,[2,84]),a(hb,[2,85]),a(hb,[2,86]),{35:182,36:Qa},{7:255,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:da,31:ab,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,74:Va,75:53,76:180,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,116:177,117:U,118:W,119:H,120:Jb,123:178,125:Z,129:T,130:V,
132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(na,[2,69]),{4:257,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,256],33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,
132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a([1,6,31,32,42,66,71,74,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,250],{141:77,132:102,138:103,163:ea}),a(bb,[2,251],{141:77,132:102,138:103,163:ea,165:fa}),a(bb,[2,252],{141:77,132:102,138:103,163:ea,165:fa}),a(bb,[2,253],{141:77,132:102,138:103,163:ea,165:fa}),a(na,[2,254],{40:wa,41:wa,82:wa,83:wa,84:wa,85:wa,87:wa,90:wa,113:wa,
114:wa}),a(Nb,Da,{109:107,78:108,86:114,82:va,83:xa,84:Ha,85:Ka,87:Fa,90:Ra,113:La}),{78:118,82:va,83:xa,84:Ha,85:Ka,86:114,87:Fa,90:Ra,109:117,113:La,114:Da},a(Qb,Ia),a(na,[2,255],{40:wa,41:wa,82:wa,83:wa,84:wa,85:wa,87:wa,90:wa,113:wa,114:wa}),a(na,[2,256]),a(na,[2,257]),{6:[1,260],7:258,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:da,31:[1,259],33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,
53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:261,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,
64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{30:262,31:ua,155:[1,263]},a(na,[2,193],{126:264,127:[1,265],128:[1,266]}),a(na,[2,207]),a(na,[2,215]),{31:[1,267],132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},{150:268,
152:269,153:ib},a(na,[2,117]),{7:271,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},
a(Gb,[2,120],{30:272,31:ua,40:wa,41:wa,82:wa,83:wa,84:wa,85:wa,87:wa,90:wa,113:wa,114:wa,96:[1,273]}),a(Pa,[2,200],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Ga,cb,{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{62:274,92:q},a(Ga,[2,124]),{29:[1,275],71:[1,276]},{29:[1,277]},{31:jb,33:282,34:f,94:[1,278],100:279,101:280,103:Xa},a([29,71],[2,
140]),{102:[1,284]},{31:wb,33:289,34:f,94:[1,285],103:db,106:286,108:287},a(Ga,[2,144]),{55:[1,291]},{7:292,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,
139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{29:[1,293]},{6:ra,131:[1,294]},{4:295,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:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,
138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a([6,31,71,120],Rb,{141:77,132:102,138:103,121:296,74:[1,297],122:vb,133:D,135:A,139:E,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(xb,[2,174]),a([6,31,120],Ma,{70:298,71:kb}),a(Sa,[2,183]),{7:255,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:da,31:ab,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,
44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,74:Va,75:53,76:180,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,116:300,117:U,118:W,119:H,123:178,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Sa,[2,189]),a(Sa,[2,190]),a(Sb,[2,173]),a(Sb,[2,33]),a(m,[2,166]),{7:255,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:da,31:ab,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,74:Va,75:53,76:180,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,115:[1,301],116:302,117:U,118:W,119:H,123:178,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{30:303,31:ua,132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,
164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},a(Tb,[2,203],{141:77,132:102,138:103,133:D,134:[1,304],135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Tb,[2,205],{141:77,132:102,138:103,133:D,134:[1,305],135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(na,[2,211]),a(Ya,[2,212],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,
165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a([1,6,31,32,42,66,71,74,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,216],{140:[1,306]}),a(lb,[2,219]),{33:195,34:f,60:196,62:198,75:197,92:q,118:Ca,119:Ja,143:307,145:194},a(lb,[2,225],{71:[1,308]}),a(mb,[2,221]),a(mb,[2,222]),a(mb,[2,223]),a(mb,[2,224]),a(na,[2,218]),{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:310,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:da,33:70,34:f,
37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:311,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,
44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(nb,Ma,{70:312,71:Ub}),a(Ba,[2,112]),a(Ba,[2,51],{58:[1,314]}),a(Vb,[2,60],{55:[1,315]}),a(Ba,[2,56]),a(Vb,[2,61]),a(yb,[2,57]),a(yb,[2,58]),a(yb,[2,59]),{46:[1,316],78:118,82:va,83:xa,84:Ha,85:Ka,
86:114,87:Fa,90:Ra,109:117,113:La,114:Da},a(Qb,wa),{6:ra,42:[1,317]},a(ta,[2,4]),a(Wb,[2,259],{141:77,132:102,138:103,163:ea,164:ia,165:fa}),a(Wb,[2,260],{141:77,132:102,138:103,163:ea,164:ia,165:fa}),a(bb,[2,261],{141:77,132:102,138:103,163:ea,165:fa}),a(bb,[2,262],{141:77,132:102,138:103,163:ea,165:fa}),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,166,167,168,169,170,171,172,173,174],[2,263],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa}),a([1,6,31,32,42,66,
71,74,89,94,115,120,122,131,133,134,135,139,140,156,167,168,169,170,171,172,173],[2,264],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,174:ca}),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,168,169,170,171,172,173],[2,265],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,174:ca}),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,169,170,171,172,173],[2,266],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,
166:ja,167:la,168:pa,174:ca}),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,170,171,172,173],[2,267],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,174:ca}),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,171,172,173],[2,268],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,174:ca}),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,172,173],[2,269],
{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,174:ca}),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,173],[2,270],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,174:ca}),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,140,156,167,168,169,170,171,172,173,174],[2,271],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja}),a(Ya,[2,249],
{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Ya,[2,248],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(m,[2,161]),a(m,[2,162]),a(Oa,[2,100]),a(Oa,[2,101]),a(Oa,[2,102]),a(Oa,[2,103]),{89:[1,318]},{74:Ob,89:[2,108],121:319,122:vb,132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,
166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},{89:[2,109]},{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,89:[2,182],92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,
149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Xb,[2,176]),a(Xb,Yb),a(Oa,[2,107]),a(m,[2,163]),a(ta,[2,65],{141:77,132:102,138:103,133:cb,135:cb,139:cb,156:cb,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Pa,[2,29],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Pa,[2,48],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,
170:ha,171:ka,172:oa,173:sa,174:ca}),{7:321,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,
162:M},{7:322,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{67:323,68:c,69:w},a(Ta,
eb,{73:127,33:129,60:130,75:131,62:132,72:324,34:f,74:d,92:q,118:Ca,119:Ja}),{6:Zb,31:$b},a(Ua,[2,80]),{7:327,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,
139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Sa,Rb,{141:77,132:102,138:103,74:[1,328],133:D,135:A,139:E,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(ac,[2,30]),{6:ra,32:[1,329]},a(Pa,[2,272],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:331,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:da,33:70,
34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Pa,[2,275],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(na,[2,247]),{7:332,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(na,[2,194],{127:[1,333]}),{30:334,31:ua},
{30:337,31:ua,33:335,34:f,62:336,92:q},{150:338,152:269,153:ib},{32:[1,339],151:[1,340],152:341,153:ib},a(ob,[2,240]),{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,124:342,125:Z,129:T,130:V,132:43,133:D,
135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(bc,[2,118],{141:77,132:102,138:103,30:344,31:ua,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(na,[2,121]),{7:345,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,
61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{32:[1,346]},{39:347,40:t,41:p},{92:[1,349],99:348,104:Ib},{39:350,40:t,41:p},{29:[1,351]},a(nb,Ma,{70:352,71:pb}),a(Ba,[2,131]),{31:jb,33:282,34:f,100:354,101:280,103:Xa},a(Ba,[2,136],{102:[1,355]}),a(Ba,[2,138],{102:[1,356]}),{33:357,34:f},a(Ga,[2,142]),
a(nb,Ma,{70:358,71:zb}),a(Ba,[2,151]),{31:wb,33:289,34:f,103:db,106:360,108:287},a(Ba,[2,156],{102:[1,361]}),a(Ba,[2,159],{102:[1,362]}),{6:[1,364],7:363,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:da,31:[1,365],33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,
125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Ab,[2,148],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{39:366,40:t,41:p},a(Ea,[2,201]),{6:ra,32:[1,367]},{7:368,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,
45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a([12,28,34,38,40,41,44,45,48,49,50,51,52,53,61,63,64,68,69,92,95,97,105,112,117,118,119,125,129,130,133,135,137,139,149,155,157,158,159,160,161,162],Yb,{6:fb,31:fb,71:fb,120:fb}),{6:qb,31:rb,120:[1,369]},
a([6,31,32,115,120],eb,{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,67:33,77:40,154:41,132:43,136:44,138:45,75:53,62:54,37:55,43:57,33:70,60:71,141:77,39:80,8:122,76:180,7:255,123:372,12:b,28:da,34:f,38:k,40:t,41:p,44:z,45:I,48:J,49:F,50:N,51:y,52:G,53:O,61:Q,63:B,64:n,68:c,69:w,74:Va,92:q,95:h,97:K,105:P,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,133:D,135:A,137:r,139:E,149:aa,155:ba,157:C,158:S,159:v,160:X,
161:R,162:M}),a(Ta,Ma,{70:373,71:kb}),a(m,[2,169]),a([6,31,115],Ma,{70:374,71:kb}),a(cc,[2,244]),{7:375,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,
141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:376,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,
158:S,159:v,160:X,161:R,162:M},{7:377,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},
a(lb,[2,220]),{33:195,34:f,60:196,62:198,75:197,92:q,118:Ca,119:Ja,145:378},a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,135,139,156],[2,227],{141:77,132:102,138:103,134:[1,379],140:[1,380],159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Bb,[2,228],{141:77,132:102,138:103,134:[1,381],159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Bb,[2,234],{141:77,132:102,138:103,134:[1,382],159:ma,160:Y,
163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{6:dc,31:ec,94:[1,383]},a(Cb,eb,{39:80,57:205,59:206,11:207,37:208,33:209,35:210,60:211,56:386,34:f,36:Qa,38:k,40:t,41:p,63:B,118:Ca}),{7:387,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:da,31:[1,388],33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,
79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:389,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:da,31:[1,390],33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,
92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Ea,[2,39]),a(Mb,[2,37]),a(Oa,[2,106]),{7:391,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,
81:30,89:[2,180],92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{89:[2,181],132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},a(Pa,[2,49],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{32:[1,392],
132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},{30:393,31:ua},a(Ua,[2,76]),{33:129,34:f,60:130,62:132,72:394,73:127,74:d,75:131,92:q,118:Ca,119:Ja},a(fc,l,{72:126,73:127,33:129,60:130,75:131,62:132,65:395,34:f,74:d,92:q,118:Ca,119:Ja}),a(Ua,[2,81],{141:77,132:102,138:103,133:D,135:A,139:E,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Sa,fb),
a(ac,[2,31]),{32:[1,396],132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},a(Pa,[2,274],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{30:397,31:ua,132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},{30:398,31:ua},a(na,[2,195]),{30:399,
31:ua},{30:400,31:ua},a(Db,[2,199]),{32:[1,401],151:[1,402],152:341,153:ib},a(na,[2,238]),{30:403,31:ua},a(ob,[2,241]),{30:404,31:ua,71:[1,405]},a(gc,[2,191],{141:77,132:102,138:103,133:D,135:A,139:E,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(na,[2,119]),a(bc,[2,122],{141:77,132:102,138:103,30:406,31:ua,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Ga,[2,63]),a(Ga,
[2,125]),{29:[1,407]},{31:jb,33:282,34:f,100:408,101:280,103:Xa},a(Ga,[2,126]),{39:409,40:t,41:p},{6:sb,31:tb,94:[1,410]},a(Cb,eb,{33:282,101:413,34:f,103:Xa}),a(Ta,Ma,{70:414,71:pb}),{33:415,34:f},{33:416,34:f},{29:[2,141]},{6:Eb,31:Fb,94:[1,417]},a(Cb,eb,{33:289,108:420,34:f,103:db}),a(Ta,Ma,{70:421,71:zb}),{33:422,34:f,103:[1,423]},{33:424,34:f},a(Ab,[2,145],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),
{7:425,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:426,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Ga,[2,149]),{131:[1,427]},{120:[1,428],132:102,133:D,135:A,
138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},a(xb,[2,175]),{7:255,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,74:Va,75:53,76:180,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,123:429,
125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:255,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:da,31:ab,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,74:Va,75:53,76:180,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,116:430,117:U,118:W,119:H,123:178,
125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Sa,[2,184]),{6:qb,31:rb,32:[1,431]},{6:qb,31:rb,115:[1,432]},a(Ya,[2,204],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Ya,[2,206],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Ya,
[2,217],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(lb,[2,226]),{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,
119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:434,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,
133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:435,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,
139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,
157:C,158:S,159:v,160:X,161:R,162:M},a(xb,[2,110]),{11:207,33:209,34:f,35:210,36:Qa,37:208,38:k,39:80,40:t,41:p,56:437,57:205,59:206,60:211,63:B,118:Ca},a(fc,Kb,{39:80,56:204,57:205,59:206,11:207,37:208,33:209,35:210,60:211,93:438,34:f,36:Qa,38:k,40:t,41:p,63:B,118:Ca}),a(Ba,[2,113]),a(Ba,[2,52],{141:77,132:102,138:103,133:D,135:A,139:E,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{7:439,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(Ba,[2,54],{141:77,132:102,138:103,133:D,135:A,139:E,156:Aa,159:ma,160:Y,163:ea,164:ia,
165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{7:440,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,
157:C,158:S,159:v,160:X,161:R,162:M},{89:[2,179],132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},a(na,[2,50]),a(na,[2,68]),a(Ua,[2,77]),a(Ta,Ma,{70:441,71:Pb}),a(na,[2,273]),a(cc,[2,245]),a(na,[2,196]),a(Db,[2,197]),a(Db,[2,198]),a(na,[2,236]),{30:442,31:ua},{32:[1,443]},a(ob,[2,242],{6:[1,444]}),{7:445,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,161:R,162:M},a(na,[2,123]),{39:446,40:t,41:p},a(nb,Ma,{70:447,71:pb}),a(Ga,[2,127]),{29:[1,448]},{33:282,34:f,101:449,103:Xa},{31:jb,33:282,34:f,100:450,
101:280,103:Xa},a(Ba,[2,132]),{6:sb,31:tb,32:[1,451]},a(Ba,[2,137]),a(Ba,[2,139]),a(Ga,[2,143],{29:[1,452]}),{33:289,34:f,103:db,108:453},{31:wb,33:289,34:f,103:db,106:454,108:287},a(Ba,[2,152]),{6:Eb,31:Fb,32:[1,455]},a(Ba,[2,157]),a(Ba,[2,158]),a(Ba,[2,160]),a(Ab,[2,146],{141:77,132:102,138:103,133:D,135:A,139:E,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),{32:[1,456],132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,
165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},a(Ea,[2,202]),a(Ea,[2,178]),a(Sa,[2,185]),a(Ta,Ma,{70:457,71:kb}),a(Sa,[2,186]),a(m,[2,170]),a([1,6,31,32,42,66,71,74,89,94,115,120,122,131,133,134,135,139,156],[2,229],{141:77,132:102,138:103,140:[1,458],159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Bb,[2,231],{141:77,132:102,138:103,134:[1,459],159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,
173:sa,174:ca}),a(Pa,[2,230],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Pa,[2,235],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Ba,[2,114]),a(Ta,Ma,{70:460,71:Ub}),{32:[1,461],132:102,133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},{32:[1,462],132:102,
133:D,135:A,138:103,139:E,141:77,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca},{6:Zb,31:$b,32:[1,463]},{32:[1,464]},a(na,[2,239]),a(ob,[2,243]),a(gc,[2,192],{141:77,132:102,138:103,133:D,135:A,139:E,156:Aa,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Ga,[2,129]),{6:sb,31:tb,94:[1,465]},{39:466,40:t,41:p},a(Ba,[2,133]),a(Ta,Ma,{70:467,71:pb}),a(Ba,[2,134]),{39:468,40:t,41:p},a(Ba,[2,153]),
a(Ta,Ma,{70:469,71:zb}),a(Ba,[2,154]),a(Ga,[2,147]),{6:qb,31:rb,32:[1,470]},{7:471,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,
155:ba,157:C,158:S,159:v,160:X,161:R,162:M},{7:472,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:da,33:70,34:f,37:55,38:k,39:80,40:t,41:p,43:57,44:z,45:I,47:27,48:J,49:F,50:N,51:y,52:G,53:O,54:26,60:71,61:Q,62:54,63:B,64:n,67:33,68:c,69:w,75:53,77:40,79:28,80:29,81:30,92:q,95:h,97:K,105:P,111:31,112:L,117:U,118:W,119:H,125:Z,129:T,130:V,132:43,133:D,135:A,136:44,137:r,138:45,139:E,141:77,149:aa,154:41,155:ba,157:C,158:S,159:v,160:X,
161:R,162:M},{6:dc,31:ec,32:[1,473]},a(Ba,[2,53]),a(Ba,[2,55]),a(Ua,[2,78]),a(na,[2,237]),{29:[1,474]},a(Ga,[2,128]),{6:sb,31:tb,32:[1,475]},a(Ga,[2,150]),{6:Eb,31:Fb,32:[1,476]},a(Sa,[2,187]),a(Pa,[2,232],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Pa,[2,233],{141:77,132:102,138:103,159:ma,160:Y,163:ea,164:ia,165:fa,166:ja,167:la,168:pa,169:qa,170:ha,171:ka,172:oa,173:sa,174:ca}),a(Ba,[2,115]),{39:477,40:t,41:p},a(Ba,
[2,135]),a(Ba,[2,155]),a(Ga,[2,130])],defaultActions:{68:[2,70],69:[2,71],239:[2,109],357:[2,141]},parseError:function(a,d){if(d.recoverable)this.trace(a);else{var b=function(a,d){this.message=a;this.hash=d};b.prototype=Error;throw new b(a,d);}},parse:function(a){var d=[0],b=[null],l=[],m=this.table,Ca="",g=0,Ja=0,c=0,f=l.slice.call(arguments,1),ua=Object.create(this.lexer),h={};for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(h[n]=this.yy[n]);ua.setInput(a,h);h.lexer=ua;h.parser=
this;"undefined"==typeof ua.yylloc&&(ua.yylloc={});var n=ua.yylloc;l.push(n);var k=ua.options&&ua.options.ranges;this.parseError="function"===typeof h.parseError?h.parseError:Object.getPrototypeOf(this).parseError;for(var e,q,Na,Ia,p={},wa,x;;){Na=d[d.length-1];if(this.defaultActions[Na])Ia=this.defaultActions[Na];else{if(null===e||"undefined"==typeof e)e=ua.lex()||1,"number"!==typeof e&&(e=this.symbols_[e]||e);Ia=m[Na]&&m[Na][e]}if("undefined"===typeof Ia||!Ia.length||!Ia[0]){x=[];for(wa in m[Na])this.terminals_[wa]&&
2<wa&&x.push("'"+this.terminals_[wa]+"'");var w=ua.showPosition?"Parse error on line "+(g+1)+":\n"+ua.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[e]||e)+"'":"Parse error on line "+(g+1)+": Unexpected "+(1==e?"end of input":"'"+(this.terminals_[e]||e)+"'");this.parseError(w,{text:ua.match,token:this.terminals_[e]||e,line:ua.yylineno,loc:n,expected:x})}if(Ia[0]instanceof Array&&1<Ia.length)throw Error("Parse Error: multiple actions possible at state: "+Na+", token: "+e);switch(Ia[0]){case 1:d.push(e);
b.push(ua.yytext);l.push(ua.yylloc);d.push(Ia[1]);e=null;q?(e=q,q=null):(Ja=ua.yyleng,Ca=ua.yytext,g=ua.yylineno,n=ua.yylloc,0<c&&c--);break;case 2:x=this.productions_[Ia[1]][1];p.$=b[b.length-x];p._$={first_line:l[l.length-(x||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(x||1)].first_column,last_column:l[l.length-1].last_column};k&&(p._$.range=[l[l.length-(x||1)].range[0],l[l.length-1].range[1]]);Na=this.performAction.apply(p,[Ca,Ja,g,h,Ia[1],b,l].concat(f));if("undefined"!==
typeof Na)return Na;x&&(d=d.slice(0,-2*x),b=b.slice(0,-1*x),l=l.slice(0,-1*x));d.push(this.productions_[Ia[1]][0]);b.push(p.$);l.push(p._$);Ia=m[d[d.length-2]][d[d.length-1]];d.push(Ia);break;case 3:return!0}}}};e.prototype=hc;hc.Parser=e;return new e}();"undefined"!==typeof u&&"undefined"!==typeof e&&(e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(x){x[1]||(console.log("Usage: "+x[0]+" FILE"),process.exit(1));var a="",b=u("fs");"undefined"!==typeof b&&
null!==b&&(a=b.readFileSync(u("path").normalize(x[1]),"utf8"));return e.parser.parse(a)},"undefined"!==typeof ra&&u.main===ra&&e.main(process.argv.slice(1)));return ra.exports}();u["./scope"]=function(){var e={};(function(){var u=[].indexOf||function(e){for(var x=0,a=this.length;x<a;x++)if(x in this&&this[x]===e)return x;return-1};e.Scope=function(){function e(e,a,b,r){var f,k;this.parent=e;this.expressions=a;this.method=b;this.referencedVars=r;this.variables=[{name:"arguments",type:"arguments"}];
this.positions={};this.parent||(this.utilities={});this.root=null!=(f=null!=(k=this.parent)?k.root:void 0)?f:this}e.prototype.add=function(e,a,b){return this.shared&&!b?this.parent.add(e,a,b):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=a:this.positions[e]=this.variables.push({name:e,type:a})-1};e.prototype.namedMethod=function(){var e;return null!=(e=this.method)&&e.name||!this.parent?this.method:this.parent.namedMethod()};e.prototype.find=function(e,
a){null==a&&(a="var");if(this.check(e))return!0;this.add(e,a);return!1};e.prototype.parameter=function(e){if(!this.shared||!this.parent.check(e,!0))return this.add(e,"param")};e.prototype.check=function(e){var a;return!!(this.type(e)||null!=(a=this.parent)&&a.check(e))};e.prototype.temporary=function(e,a,b){null==b&&(b=!1);return b?(b=e.charCodeAt(0),e=122-b,b=String.fromCharCode(b+a%(e+1)),a=Math.floor(a/(e+1)),""+b+(a||"")):""+e+(a||"")};e.prototype.type=function(e){var a;var b=this.variables;var x=
0;for(a=b.length;x<a;x++){var f=b[x];if(f.name===e)return f.type}return null};e.prototype.freeVariable=function(e,a){var b,x;null==a&&(a={});for(b=0;;){var f=this.temporary(e,b,a.single);if(!(this.check(f)||0<=u.call(this.root.referencedVars,f)))break;b++}(null!=(x=a.reserve)?x:1)&&this.add(f,"var",!0);return f};e.prototype.assign=function(e,a){this.add(e,{value:a,assigned:!0},!0);return this.hasAssignments=!0};e.prototype.hasDeclarations=function(){return!!this.declaredVariables().length};e.prototype.declaredVariables=
function(){var e;var a=this.variables;var b=[];var r=0;for(e=a.length;r<e;r++){var f=a[r];"var"===f.type&&b.push(f.name)}return b.sort()};e.prototype.assignedVariables=function(){var e;var a=this.variables;var b=[];var r=0;for(e=a.length;r<e;r++){var f=a[r];f.type.assigned&&b.push(f.name+" \x3d "+f.type.value)}return b};return e}()}).call(this);return e}();u["./nodes"]=function(){var e={};(function(){var ra,r,x,a,b,za,f,k,t,p,z,I,J,F,N,y,G,O,Q,B,n,c,w,q,h,K,P,L,U,W,H,Z,T,V,D,A,xa,E,aa,ba,C,S,v=function(a,
b){function l(){this.constructor=a}for(var d in b)X.call(b,d)&&(a[d]=b[d]);l.prototype=b.prototype;a.prototype=new l;a.__super__=b.prototype;return a},X={}.hasOwnProperty,R=[].indexOf||function(a){for(var b=0,l=this.length;b<l;b++)if(b in this&&this[b]===a)return b;return-1},M=[].slice;Error.stackTraceLimit=Infinity;var ya=u("./scope").Scope;var ta=u("./lexer");var Aa=ta.isUnassignable;var ma=ta.JS_FORBIDDEN;var Y=u("./helpers");var ea=Y.compact;var ia=Y.flatten;var fa=Y.extend;var ja=Y.merge;var la=
Y.del;ta=Y.addLocationDataFn;var pa=Y.locationDataToString;var qa=Y.throwSyntaxError;e.extend=fa;e.addLocationDataFn=ta;var ha=function(){return!0};var ka=function(){return!1};var oa=function(){return this};var sa=function(){this.negated=!this.negated;return this};e.CodeFragment=t=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?": "+pa(this.locationData):"")};return a}();var ca=function(a){var b;var l=[];var d=0;for(b=a.length;d<b;d++){var Ca=a[d];l.push(Ca.code)}return l.join("")};e.Base=ta=function(){function b(){}b.prototype.compile=function(a,b){return ca(this.compileToFragments(a,b))};b.prototype.compileToFragments=function(a,b){a=fa({},a);b&&(a.level=b);b=this.unfoldSoak(a)||this;b.tab=a.indent;return a.level!==na&&b.isStatement(a)?b.compileClosure(a):b.compileNode(a)};b.prototype.compileClosure=
function(b){var l,d,m;(d=this.jumps())&&d.error("cannot use a pure statement in an expression");b.sharedScope=!0;d=new k([],a.wrap([this]));var Ja=[];if((l=this.contains(Wa))||this.contains(da))Ja=[new E],l?(l="apply",Ja.push(new y("arguments"))):l="call",d=new C(d,[new ra(new L(l))]);b=(new za(d,Ja)).compileNode(b);if(d.isGenerator||null!=(m=d.base)&&m.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 y(a.scope.freeVariable("ref"));var l=new x(d,this);return b?[l.compileToFragments(a,b),[this.makeCode(d.value)]]:[l,d]}d=b?this.compileToFragments(a,b):this;return[d,d]};b.prototype.cacheToCodeFragments=function(a){return[ca(a[0]),ca(a[1])]};b.prototype.makeReturn=function(a){var b=this.unwrapAll();return a?new za(new B(a+".push"),[b]):new H(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 p))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+Fa)});return d};b.prototype.eachChild=function(a){var b,d;if(!this.children)return this;var m=this.children;var Ja=0;for(b=m.length;Ja<b;Ja++){var c=m[Ja];if(this[c]){var e=ia([this[c]]);var f=0;for(d=e.length;f<d;f++)if(c=e[f],!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 h("!",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=oa;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 qa(a,this.locationData)};b.prototype.makeCode=function(a){return new t(this,a)};b.prototype.wrapInBraces=function(a){return[].concat(this.makeCode("("),a,this.makeCode(")"))};b.prototype.joinFragmentArrays=function(a,b){var d,l;var m=[];var c=d=0;for(l=a.length;d<l;c=++d){var e=
a[c];c&&m.push(this.makeCode(b));m=m.concat(e)}return m};return b}();e.Block=a=function(a){function b(a){this.expressions=ea(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 l=0;for(d=b.length;l<d;l++){var m=b[l];if(m.isStatement(a))return!0}return!1};b.prototype.jumps=function(a){var d;var b=this.expressions;var l=0;for(d=b.length;l<d;l++){var m=b[l];if(m=m.jumps(a))return m}};b.prototype.makeReturn=function(a){var d;for(d=this.expressions.length;d--;){var b=this.expressions[d];if(!(b instanceof p)){this.expressions[d]=b.makeReturn(a);b instanceof H&&!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,l;this.tab=a.indent;var m=a.level===na;var c=[];var e=this.expressions;var f=d=0;for(l=e.length;d<l;f=++d){var h=e[f];h=h.unwrapAll();h=h.unfoldSoak(a)||h;h instanceof b?c.push(h.compileNode(a)):m?(h.front=!0,f=h.compileToFragments(a),h.isStatement(a)||(f.unshift(this.makeCode(""+this.tab)),f.push(this.makeCode(";"))),
c.push(f)):c.push(h.compileToFragments(a,va))}if(m)return this.spaced?[].concat(this.joinFragmentArrays(c,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(c,"\n");d=c.length?this.joinFragmentArrays(c,", "):[this.makeCode("void 0")];return 1<c.length&&a.level>=va?this.wrapInBraces(d):d};b.prototype.compileRoot=function(a){var d,b;a.indent=a.bare?"":Fa;a.level=na;this.spaced=!0;a.scope=new ya(null,this,null,null!=(b=a.referencedVars)?b:[]);var l=a.locals||[];b=0;for(d=l.length;b<d;b++){var m=l[b];
a.scope.parameter(m)}b=[];if(!a.bare){var c=this.expressions;d=[];var e=m=0;for(l=c.length;m<l;e=++m){e=c[e];if(!(e.unwrap()instanceof p))break;d.push(e)}m=this.expressions.slice(d.length);this.expressions=d;d.length&&(b=this.compileNode(ja(a,{indent:""})),b.push(this.makeCode("\n")));this.expressions=m}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 l=
[];var m=this.expressions;var c=b=0;for(d=m.length;b<d;c=++b){var e=m[c];e=e.unwrap();if(!(e instanceof p||e instanceof B))break}a=ja(a,{level:na});c&&(e=this.expressions.splice(c,9E9),l=[this.spaced,!1],b=l[0],this.spaced=l[1],b=[this.compileNode(a),b],l=b[0],this.spaced=b[1],this.expressions=e);e=this.compileNode(a);b=a.scope;b.expressions===this&&(d=a.scope.hasDeclarations(),a=b.hasAssignments,d||a?(c&&l.push(this.makeCode("\n")),l.push(this.makeCode(this.tab+"var ")),d&&l.push(this.makeCode(b.declaredVariables().join(", "))),
a&&(d&&l.push(this.makeCode(",\n"+(this.tab+Fa))),l.push(this.makeCode(b.assignedVariables().join(",\n"+(this.tab+Fa))))),l.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):l.length&&e.length&&l.push(this.makeCode("\n")));return l.concat(e)};b.wrap=function(a){return 1===a.length&&a[0]instanceof b?a[0]:new b(a)};return b}(ta);e.Literal=B=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}(ta);e.NumberLiteral=w=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(B);e.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);e.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>=Ha?this.wrapInBraces(d):d};return b}(w);e.StringLiteral=D=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(B);e.RegexLiteral=W=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(B);e.PassthroughLiteral=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(B);e.IdentifierLiteral=
y=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.isAssignable=ha;return b}(B);e.PropertyName=L=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.isAssignable=ha;return b}(B);e.StatementLiteral=V=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);b.prototype.isStatement=ha;b.prototype.makeReturn=oa;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}(B);e.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}(B);e.UndefinedLiteral=ba=function(a){function b(){b.__super__.constructor.call(this,"undefined")}
v(b,a);b.prototype.compileNode=function(a){return[this.makeCode(a.level>=Ka?"(void 0)":"void 0")]};return b}(B);e.NullLiteral=c=function(a){function b(){b.__super__.constructor.call(this,"null")}v(b,a);return b}(B);e.BooleanLiteral=b=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(B);e.Return=H=function(a){function b(a){this.expression=a}v(b,a);b.prototype.children=["expression"];b.prototype.isStatement=ha;b.prototype.makeReturn=oa;b.prototype.jumps=
oa;b.prototype.compileToFragments=function(a,d){var l;var m=null!=(l=this.expression)?l.makeReturn():void 0;return!m||m instanceof b?b.__super__.compileToFragments.call(this,a,d):m.compileToFragments(a,d)};b.prototype.compileNode=function(a){var d=[];d.push(this.makeCode(this.tab+("return"+(this.expression?" ":""))));this.expression&&(d=d.concat(this.expression.compileToFragments(a,Da)));d.push(this.makeCode(";"));return d};return b}(ta);e.YieldReturn=S=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}(H);e.Value=C=function(a){function m(a,b,Ca){if(!b&&a instanceof m)return a;this.base=a;this.properties=b||[];Ca&&(this[Ca]=!0);return this}v(m,a);m.prototype.children=["base","properties"];m.prototype.add=function(a){this.properties=this.properties.concat(a);return this};m.prototype.hasProperties=function(){return!!this.properties.length};
m.prototype.bareLiteral=function(a){return!this.properties.length&&this.base instanceof a};m.prototype.isArray=function(){return this.bareLiteral(r)};m.prototype.isRange=function(){return this.bareLiteral(U)};m.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()};m.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()};m.prototype.isNumber=function(){return this.bareLiteral(w)};m.prototype.isString=function(){return this.bareLiteral(D)};
m.prototype.isRegex=function(){return this.bareLiteral(W)};m.prototype.isUndefined=function(){return this.bareLiteral(ba)};m.prototype.isNull=function(){return this.bareLiteral(c)};m.prototype.isBoolean=function(){return this.bareLiteral(b)};m.prototype.isAtomic=function(){var a;var b=this.properties.concat(this.base);var m=0;for(a=b.length;m<a;m++){var c=b[m];if(c.soak||c instanceof za)return!1}return!0};m.prototype.isNotCallable=function(){return this.isNumber()||this.isString()||this.isRegex()||
this.isArray()||this.isRange()||this.isSplice()||this.isObject()||this.isUndefined()||this.isNull()||this.isBoolean()};m.prototype.isStatement=function(a){return!this.properties.length&&this.base.isStatement(a)};m.prototype.assigns=function(a){return!this.properties.length&&this.base.assigns(a)};m.prototype.jumps=function(a){return!this.properties.length&&this.base.jumps(a)};m.prototype.isObject=function(a){return this.properties.length?!1:this.base instanceof q&&(!a||this.base.generated)};m.prototype.isSplice=
function(){var a=this.properties;return a[a.length-1]instanceof Z};m.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)};m.prototype.unwrap=function(){return this.properties.length?this:this.base};m.prototype.cacheReference=function(a){var b=this.properties;var l=b[b.length-1];if(2>this.properties.length&&!this.base.isComplex()&&(null==l||!l.isComplex()))return[this,this];b=new m(this.base,
this.properties.slice(0,-1));if(b.isComplex()){var c=new y(a.scope.freeVariable("base"));b=new m(new P(new x(c,b)))}if(!l)return[b,c];if(l.isComplex()){var e=new y(a.scope.freeVariable("name"));l=new Q(new x(e,l.index));e=new Q(e)}return[b.add(l),new m(c||b.base,[e||l])]};m.prototype.compileNode=function(a){var b;this.base.front=this.front;var l=this.properties;var m=this.base.compileToFragments(a,l.length?Ka:null);l.length&&Ra.test(ca(m))&&m.push(this.makeCode("."));var c=0;for(b=l.length;c<b;c++){var e=
l[c];m.push.apply(m,e.compileToFragments(a))}return m};m.prototype.unfoldSoak=function(a){return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(b){return function(){var d,l,c;if(l=b.base.unfoldSoak(a))return(d=l.body.properties).push.apply(d,b.properties),l;var e=b.properties;l=d=0;for(c=e.length;d<c;l=++d){var f=e[l];if(f.soak)return f.soak=!1,d=new m(b.base,b.properties.slice(0,l)),c=new m(b.base,b.properties.slice(l)),d.isComplex()&&(l=new y(a.scope.freeVariable("ref")),d=
new P(new x(l,d)),c.base=l),new G(new z(d),c,{soak:!0})}return!1}}(this)()};return m}(ta);e.Comment=p=function(a){function b(a){this.comment=a}v(b,a);b.prototype.isStatement=ha;b.prototype.makeReturn=oa;b.prototype.compileNode=function(a,b){var d=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *");d="/*"+Ga(d,this.tab)+(0<=R.call(d,"\n")?"\n"+this.tab:"")+" */";(b||a.level)===na&&(d=a.indent+d);return[this.makeCode("\n"),this.makeCode(d)]};return b}(ta);e.Call=za=function(a){function b(a,b,m){this.variable=
a;this.args=null!=b?b:[];this.soak=m;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 l=(null!=(d=this.variable)?d.base:void 0)||this.variable;l.needsUpdatedStartLocation&&(this.variable.locationData.first_line=
a.first_line,this.variable.locationData.first_column=a.first_column,l.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,l;if(this.soak){if(this instanceof xa){var m=new B(this.superReference(a));
var c=new C(m)}else{if(c=Ea(a,this,"variable"))return c;c=(new C(this.variable)).cacheReference(a);m=c[0];c=c[1]}c=new b(c,this.args);c.isNew=this.isNew;m=new B("typeof "+m.compile(a)+' \x3d\x3d\x3d "function"');return new G(m,new C(c),{soak:!0})}m=this;for(d=[];;)if(m.variable instanceof b)d.push(m),m=m.variable;else{if(!(m.variable instanceof C))break;d.push(m);if(!((m=m.variable.base)instanceof b))break}var e=d.reverse();d=0;for(l=e.length;d<l;d++)m=e[d],c&&(m.variable instanceof b?m.variable=
c:m.variable.base=c),c=Ea(a,m,"variable");return c};b.prototype.compileNode=function(a){var b,l,m;null!=(b=this.variable)&&(b.front=this.front);b=T.compileSplattedArray(a,this.args,!0);if(b.length)return this.compileSplat(a,b);b=[];var c=this.args;var e=l=0;for(m=c.length;l<m;e=++l){var f=c[e];e&&b.push(this.makeCode(", "));b.push.apply(b,f.compileToFragments(a,va))}f=[];this instanceof xa?(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,Ka)),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 xa)return[].concat(this.makeCode(this.superReference(a)+".apply("+this.superThis(a)+", "),b,this.makeCode(")"));if(this.isNew){var l=this.tab+Fa;return[].concat(this.makeCode("(function(func, args, ctor) {\n"+l+"ctor.prototype \x3d func.prototype;\n"+l+"var child \x3d new ctor, result \x3d func.apply(child, args);\n"+
l+"return Object(result) \x3d\x3d\x3d result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(a,va),this.makeCode(", "),b,this.makeCode(", function(){})"))}l=[];var m=new C(this.variable);if((d=m.properties.pop())&&m.isComplex()){var c=a.scope.freeVariable("ref");l=l.concat(this.makeCode("("+c+" \x3d "),m.compileToFragments(a,va),this.makeCode(")"),d.compileToFragments(a))}else m=m.compileToFragments(a,Ka),Ra.test(ca(m))&&(m=this.wrapInBraces(m)),d?(c=ca(m),m.push.apply(m,d.compileToFragments(a))):
c="null",l=l.concat(m);return l.concat(this.makeCode(".apply("+c+", "),b,this.makeCode(")"))};return b}(ta);e.SuperCall=xa=function(a){function b(a){b.__super__.constructor.call(this,null,null!=a?a:[new T(new y("arguments"))]);this.isBare=null!=a}v(b,a);b.prototype.superReference=function(a){var b=a.scope.namedMethod();if(null!=b&&b.klass){var l=b.klass;var m=b.name;var c=b.variable;if(l.isComplex()){var e=new y(a.scope.parent.freeVariable("base"));var f=new C(new P(new x(e,l)));c.base=f;c.properties.splice(0,
l.properties.length)}if(m.isComplex()||m instanceof Q&&m.index.isAssignable()){var h=new y(a.scope.parent.freeVariable("name"));m=new Q(new x(h,m.index));c.properties.pop();c.properties.push(m)}f=[new ra(new L("__super__"))];b["static"]&&f.push(new ra(new L("constructor")));f.push(null!=h?new Q(h):m);return(new C(null!=e?e:l,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}(za);e.RegexWithInterpolations=function(a){function b(a){null==a&&(a=[]);b.__super__.constructor.call(this,new C(new y("RegExp")),a,!1)}v(b,a);return b}(za);e.TaggedTemplateCall=function(b){function m(b,d,c){d instanceof D&&(d=new A(a.wrap([new C(d)])));m.__super__.constructor.call(this,b,[d],c)}v(m,b);m.prototype.compileNode=function(a){a.inTaggedTemplateCall=!0;return this.variable.compileToFragments(a,Ka).concat(this.args[0].compileToFragments(a,
va))};return m}(za);e.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 za(new C(new B(La("extend",a))),[this.child,this.parent])).compileToFragments(a)};return b}(ta);e.Access=ra=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 l=this.name.unwrap();
return l instanceof L?(b=l.value,0<=R.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}(ta);e.Index=Q=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,Da),this.makeCode("]"))};b.prototype.isComplex=function(){return this.index.isComplex()};
return b}(ta);e.Range=U=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 l=this.cacheToCodeFragments(this.from.cache(a,va,b));this.fromC=l[0];this.fromVar=l[1];l=this.cacheToCodeFragments(this.to.cache(a,va,b));this.toC=l[0];this.toVar=l[1];if(l=la(a,"step"))a=this.cacheToCodeFragments(l.cache(a,va,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!=l&&l.isNumber()?Number(this.stepVar):null};b.prototype.compileNode=function(a){var b,l,c,m;this.fromVar||this.compileVariables(a);if(!a.index)return this.compileArray(a);var e=null!=this.fromNum&&null!=this.toNum;var f=la(a,"index");var h=(a=la(a,"name"))&&a!==f;var n=f+" \x3d "+this.fromC;this.toC!==this.toVar&&(n+=", "+this.toC);this.step!==
this.stepVar&&(n+=", "+this.step);var k=[f+" \x3c"+this.equals,f+" \x3e"+this.equals];var q=k[0];k=k[1];q=null!=this.stepNum?0<this.stepNum?q+" "+this.toVar:k+" "+this.toVar:e?(c=[this.fromNum,this.toNum],l=c[0],m=c[1],c,l<=m?q+" "+m:k+" "+m):(b=this.stepVar?this.stepVar+" \x3e 0":this.fromVar+" \x3c\x3d "+this.toVar,b+" ? "+q+" "+this.toVar+" : "+k+" "+this.toVar);b=this.stepVar?f+" +\x3d "+this.stepVar:e?h?l<=m?"++"+f:"--"+f:l<=m?f+"++":f+"--":h?b+" ? ++"+f+" : --"+f:b+" ? "+f+"++ : "+f+"--";h&&
(n=a+" \x3d "+n);h&&(b=a+" \x3d "+b);return[this.makeCode(n+"; "+q+"; "+b)]};b.prototype.compileArray=function(a){var b,l,c;if((b=null!=this.fromNum&&null!=this.toNum)&&20>=Math.abs(this.fromNum-this.toNum)){var m=function(){c=[];for(var a=l=this.fromNum,b=this.toNum;l<=b?a<=b:a>=b;l<=b?a++:a--)c.push(a);return c}.apply(this);this.exclusive&&m.pop();return[this.makeCode("["+m.join(", ")+"]")]}var e=this.tab+Fa;var f=a.scope.freeVariable("i",{single:!0});var h=a.scope.freeVariable("results");var n=
"\n"+e+h+" \x3d [];";if(b)a.index=f,b=ca(this.compileNode(a));else{var k=f+" \x3d "+this.fromC+(this.toC!==this.toVar?", "+this.toC:"");b=this.fromVar+" \x3c\x3d "+this.toVar;b="var "+k+"; "+b+" ? "+f+" \x3c"+this.equals+" "+this.toVar+" : "+f+" \x3e"+this.equals+" "+this.toVar+"; "+b+" ? "+f+"++ : "+f+"--"}f="{ "+h+".push("+f+"); }\n"+e+"return "+h+";\n"+a.indent;a=function(a){return null!=a?a.contains(Wa):void 0};if(a(this.from)||a(this.to))m=", arguments";return[this.makeCode("(function() {"+n+
"\n"+e+"for ("+b+")"+f+"}).apply(this"+(null!=m?m:"")+")")]};return b}(ta);e.Slice=Z=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 l=b.to;var c=(b=b.from)&&b.compileToFragments(a,Da)||[this.makeCode("0")];if(l){b=l.compileToFragments(a,Da);var m=ca(b);if(this.range.exclusive||-1!==+m)var e=", "+(this.range.exclusive?m:l.isNumber()?""+(+m+1):(b=l.compileToFragments(a,Ka),"+"+ca(b)+
" + 1 || 9e9"))}return[this.makeCode(".slice("+ca(c)+(e||"")+")")]};return b}(ta);e.Obj=q=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,l,c;var m=this.properties;if(this.generated){var e=0;for(b=m.length;e<b;e++){var f=m[e];f instanceof C&&f.error("cannot have an implicit value in an implicit object")}}e=b=0;for(f=m.length;b<f;e=++b){var h=m[e];if((h.variable||h).base instanceof
P)break}f=e<m.length;var n=a.indent+=Fa;var k=this.lastNonComment(this.properties);b=[];if(f){var q=a.scope.freeVariable("obj");b.push(this.makeCode("(\n"+n+q+" \x3d "))}b.push(this.makeCode("{"+(0===m.length||0===e?"}":"\n")));var w=l=0;for(c=m.length;l<c;w=++l){h=m[w];w===e&&(0!==w&&b.push(this.makeCode("\n"+n+"}")),b.push(this.makeCode(",\n")));var t=w===m.length-1||w===e-1?"":h===k||h instanceof p?"\n":",\n";var r=h instanceof p?"":n;f&&w<e&&(r+=Fa);h instanceof x&&("object"!==h.context&&h.operatorToken.error("unexpected "+
h.operatorToken.value),h.variable instanceof C&&h.variable.hasProperties()&&h.variable.error("invalid object key"));h instanceof C&&h["this"]&&(h=new x(h.properties[0].name,h,"object"));h instanceof p||(w<e?h instanceof x||(h=new x(h,h,"object")):(h instanceof x?(w=h.variable,h=h.value):(h=h.base.cache(a),w=h[0],h=h[1],w instanceof y&&(w=new L(w.value))),h=new x(new C(new y(q),[new ra(w)]),h)));r&&b.push(this.makeCode(r));b.push.apply(b,h.compileToFragments(a,na));t&&b.push(this.makeCode(t))}f?b.push(this.makeCode(",\n"+
n+q+"\n"+this.tab+")")):0!==m.length&&b.push(this.makeCode("\n"+this.tab+"}"));return this.front&&!f?this.wrapInBraces(b):b};b.prototype.assigns=function(a){var b;var l=this.properties;var c=0;for(b=l.length;c<b;c++){var m=l[c];if(m.assigns(a))return!0}return!1};return b}(ta);e.Arr=r=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+=Fa;var l=T.compileSplattedArray(a,
this.objects);if(l.length)return l;l=[];var c=this.objects;var m=[];var e=0;for(b=c.length;e<b;e++){var f=c[e];m.push(f.compileToFragments(a,va))}e=b=0;for(c=m.length;b<c;e=++b)f=m[e],e&&l.push(this.makeCode(", ")),l.push.apply(l,f);0<=ca(l).indexOf("\n")?(l.unshift(this.makeCode("[\n"+a.indent)),l.push(this.makeCode("\n"+this.tab+"]"))):(l.unshift(this.makeCode("[")),l.push(this.makeCode("]")));return l};b.prototype.assigns=function(a){var b;var l=this.objects;var c=0;for(b=l.length;c<b;c++){var m=
l[c];if(m.assigns(a))return!0}return!1};return b}(ta);e.Class=f=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 ra&&a.name:this.variable.base;if(!(b instanceof
y||b instanceof L))return this.defaultClassVariableName;b=b.value;a||(a=Aa(b))&&this.variable.error(a);return 0<=R.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 k&&b.bound)return b.context=a})};c.prototype.addBoundFunctions=function(a){var b;var l=this.boundFuncs;var c=0;for(b=l.length;c<b;c++){var m=l[c];m=(new C(new E,[new ra(m)])).compile(a);this.ctor.body.unshift(new B(m+
" \x3d "+La("bind",a)+"("+m+", this)"))}};c.prototype.addProperties=function(a,b,c){var d;var l=a.base.properties.slice(0);var m;for(m=[];d=l.shift();){if(d instanceof x){var e=d.variable.base;delete d.context;var f=d.value;"constructor"===e.value?(this.ctor&&d.error("cannot define more than one constructor in a class"),f.bound&&d.error("cannot define a constructor as a bound function"),f instanceof k?d=this.ctor=f:(this.externalCtor=c.classScope.freeVariable("ctor"),d=new x(new y(this.externalCtor),
f))):d.variable["this"]?f["static"]=!0:(a=e.isComplex()?new Q(e):new ra(e),d.variable=new C(new y(b),[new ra(new L("prototype")),a]),f instanceof k&&f.bound&&(this.boundFuncs.push(e),f.bound=!1))}m.push(d)}return ea(m)};c.prototype.walkBody=function(b,d){return this.traverseChildren(!1,function(l){return function(m){var e,f,h;var Ca=!0;if(m instanceof c)return!1;if(m instanceof a){var n=e=m.expressions;var k=f=0;for(h=n.length;f<h;k=++f){var q=n[k];q instanceof x&&q.variable.looksStatic(b)?q.value["static"]=
!0:q instanceof C&&q.isObject(!0)&&(Ca=!1,e[k]=l.addProperties(q,b,d))}m.expressions=ia(e)}return Ca&&!(m instanceof c)}}(this))};c.prototype.hoistDirectivePrologue=function(){var a,b;var c=0;for(a=this.body.expressions;(b=a[c])&&b instanceof p||b instanceof C&&b.isString();)++c;return this.directives=a.splice(0,c)};c.prototype.ensureConstructor=function(a){this.ctor||(this.ctor=new k,this.externalCtor?this.ctor.body.push(new B(this.externalCtor+".apply(this, arguments)")):this.parent&&this.ctor.body.push(new B(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,l,c;(l=this.body.jumps())&&l.error("Class bodies cannot contain pure statements");(d=this.body.contains(Wa))&&d.error("Class bodies shouldn't reference arguments");var m=this.determineName();var e=new y(m);l=new k([],a.wrap([this.body]));d=[];b.classScope=
l.makeScope(b.scope);this.hoistDirectivePrologue();this.setContext(m);this.walkBody(m,b);this.ensureConstructor(m);this.addBoundFunctions(b);this.body.spaced=!0;this.body.expressions.push(e);this.parent&&(m=new y(b.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new F(e,m)),l.params.push(new K(m)),d.push(this.parent));(c=this.body.expressions).unshift.apply(c,this.directives);c=new P(new za(l,d));this.variable&&(c=new x(this.variable,c,null,{moduleDeclaration:this.moduleDeclaration}));
return c.compileToFragments(b)};return c}(ta);e.ModuleDeclaration=Y=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=oa;b.prototype.makeReturn=oa;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}(ta);e.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 l=[];l.push(this.makeCode(this.tab+"import "));null!=this.clause&&l.push.apply(l,this.clause.compileNode(a));null!=(null!=(b=this.source)?b.value:void 0)&&(null!==this.clause&&l.push(this.makeCode(" from ")),l.push(this.makeCode(this.source.value)));
l.push(this.makeCode(";"));return l};return b}(Y);e.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}(ta);e.ExportDeclaration=Y=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 l=[];l.push(this.makeCode(this.tab+"export "));this instanceof J&&l.push(this.makeCode("default "));this instanceof J||!(this.clause instanceof x||this.clause instanceof f)||(this.clause instanceof f&&!this.clause.variable&&this.clause.error("anonymous classes cannot be exported"),l.push(this.makeCode("var ")),this.clause.moduleDeclaration="export");l=null!=this.clause.body&&this.clause.body instanceof a?l.concat(this.clause.compileToFragments(b,
na)):l.concat(this.clause.compileNode(b));null!=(null!=(d=this.source)?d.value:void 0)&&l.push(this.makeCode(" from "+this.source.value));l.push(this.makeCode(";"));return l};return c}(Y);e.ExportNamedDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Y);e.ExportDefaultDeclaration=J=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Y);e.ExportAllDeclaration=function(a){function b(){return b.__super__.constructor.apply(this,
arguments)}v(b,a);return b}(Y);e.ModuleSpecifierList=Y=function(a){function b(a){this.specifiers=a}v(b,a);b.prototype.children=["specifiers"];b.prototype.compileNode=function(a){var b;var l=[];a.indent+=Fa;var c=this.specifiers;var m=[];var e=0;for(b=c.length;e<b;e++){var f=c[e];m.push(f.compileToFragments(a,va))}if(0!==this.specifiers.length){l.push(this.makeCode("{\n"+a.indent));e=b=0;for(c=m.length;b<c;e=++b)f=m[e],e&&l.push(this.makeCode(",\n"+a.indent)),l.push.apply(l,f);l.push(this.makeCode("\n}"))}else l.push(this.makeCode("{}"));
return l};return b}(ta);e.ImportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Y);e.ExportSpecifierList=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Y);e.ModuleSpecifier=n=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}(ta);e.ImportSpecifier=Y=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<=R.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}(n);e.ImportDefaultSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Y);e.ImportNamespaceSpecifier=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}v(b,a);return b}(Y);e.ExportSpecifier=function(a){function b(a,d){b.__super__.constructor.call(this,a,d,"export")}v(b,a);return b}(n);e.Assign=x=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)===na&&null!=this.context&&(this.moduleDeclaration||0<=R.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 Ea(a,this,"variable")};b.prototype.compileNode=function(a){var b,c,l,e,f,m,h;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"===(e=this.context)||"\x26\x26\x3d"===e||"?\x3d"===e)return this.compileConditional(a);
if("**\x3d"===(f=this.context)||"//\x3d"===f||"%%\x3d"===f)return this.compileSpecialMath(a)}this.value instanceof k&&(this.value["static"]?(this.value.klass=this.variable.base,this.value.name=this.variable.properties[0],this.value.variable=this.variable):2<=(null!=(m=this.variable.properties)?m.length:void 0)&&(m=this.variable.properties,e=3<=m.length?M.call(m,0,l=m.length-2):(l=0,[]),f=m[l++],l=m[l++],"prototype"===(null!=(h=f.name)?h.value:void 0)&&(this.value.klass=new C(this.variable.base,e),
this.value.name=l,this.value.variable=this.variable)));this.context||(h=this.variable.unwrapAll(),h.isAssignable()||this.variable.error("'"+this.variable.compile(a)+"' can't be assigned"),"function"===typeof h.hasProperties&&h.hasProperties()||(this.moduleDeclaration?(this.checkAssignability(a,h),a.scope.add(h.value,this.moduleDeclaration)):this.param?a.scope.add(h.value,"var"):(this.checkAssignability(a,h),a.scope.find(h.value))));h=this.value.compileToFragments(a,va);c&&this.variable.base instanceof
q&&(this.variable.front=!0);c=this.variable.compileToFragments(a,va);if("object"===this.context){if(b=ca(c),0<=R.call(ma,b))c.unshift(this.makeCode('"')),c.push(this.makeCode('"'));return c.concat(this.makeCode(": "),h)}b=c.concat(this.makeCode(" "+(this.context||"\x3d")+" "),h);return a.level<=va?b:this.wrapInBraces(b)};b.prototype.compilePatternMatch=function(a){var d,c,l;var e=a.level===na;var f=this.value;var m=this.variable.base.objects;if(!(l=m.length)){var n=f.compileToFragments(a);return a.level>=
Ha?this.wrapInBraces(n):n}var k=m[0];1===l&&k instanceof I&&k.error("Destructuring assignment has no target");var q=this.variable.isObject();if(e&&1===l&&!(k instanceof T)){var p=null;if(k instanceof b&&"object"===k.context){n=k;var t=n.variable;var r=t.base;k=n.value;k instanceof b&&(p=k.value,k=k.variable)}else k instanceof b&&(p=k.value,k=k.variable),r=q?k["this"]?k.properties[0].name:new L(k.unwrap().value):new w(0);var x=r.unwrap()instanceof L;f=new C(f);f.properties.push(new (x?ra:Q)(r));(c=
Aa(k.unwrap().value))&&k.error(c);p&&(f=new h("?",f,p));return(new b(k,f,null,{param:this.param})).compileToFragments(a,na)}var v=f.compileToFragments(a,va);var u=ca(v);n=[];t=!1;f.unwrap()instanceof y&&!this.variable.assigns(u)||(n.push([this.makeCode((p=a.scope.freeVariable("ref"))+" \x3d ")].concat(M.call(v))),v=[this.makeCode(p)],u=p);p=f=0;for(d=m.length;f<d;p=++f){k=m[p];r=p;if(!t&&k instanceof T){c=k.name.unwrap().value;k=k.unwrap();r=l+" \x3c\x3d "+u+".length ? "+La("slice",a)+".call("+u+
", "+p;if(x=l-p-1){var K=a.scope.freeVariable("i",{single:!0});r+=", "+K+" \x3d "+u+".length - "+x+") : ("+K+" \x3d "+p+", [])"}else r+=") : []";r=new B(r);t=K+"++"}else if(!t&&k instanceof I){if(x=l-p-1)1===x?t=u+".length - 1":(K=a.scope.freeVariable("i",{single:!0}),r=new B(K+" \x3d "+u+".length - "+x),t=K+"++",n.push(r.compileToFragments(a,va)));continue}else(k instanceof T||k instanceof I)&&k.error("multiple splats/expansions are disallowed in an assignment"),p=null,k instanceof b&&"object"===
k.context?(r=k.variable,r=r.base,k=k.value,k instanceof b&&(p=k.value,k=k.variable)):(k instanceof b&&(p=k.value,k=k.variable),r=q?k["this"]?k.properties[0].name:new L(k.unwrap().value):new B(t||r)),c=k.unwrap().value,x=r.unwrap()instanceof L,r=new C(new B(u),[new (x?ra:Q)(r)]),p&&(r=new h("?",r,p));null!=c&&(c=Aa(c))&&k.error(c);n.push((new b(k,r,null,{param:this.param,subpattern:!0})).compileToFragments(a,va))}e||this.subpattern||n.push(v);n=this.joinFragmentArrays(n,", ");return a.level<va?n:this.wrapInBraces(n)};
b.prototype.compileConditional=function(a){var d=this.variable.cacheReference(a);var c=d[0];d=d[1];c.properties.length||!(c.base instanceof B)||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<=R.call(this.context,"?"))return a.isExistentialEquals=!0,(new G(new z(c),d,{type:"if"})).addElse(new b(d,this.value,"\x3d")).compileToFragments(a);c=(new h(this.context.slice(0,
-1),c,new b(d,this.value,"\x3d"))).compileToFragments(a);return a.level<=va?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 h(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 l=b.to;var e=b.exclusive;var f=this.variable.compile(a);if(c){var m=this.cacheToCodeFragments(c.cache(a,Ha));b=m[0];m=m[1]}else b=
m="0";l?null!=c&&c.isNumber()&&l.isNumber()?(l=l.compile(a)-m,e||(l+=1)):(l=l.compile(a,Ka)+" - "+m,e||(l+=" + 1")):l="9e9";e=this.value.cache(a,va);c=e[0];e=e[1];l=[].concat(this.makeCode("[].splice.apply("+f+", ["+b+", "+l+"].concat("),c,this.makeCode(")), "),e);return a.level>na?this.wrapInBraces(l):l};return b}(ta);e.Code=k=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 h&&a.isYield()||
a instanceof S})}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 ya(a,this.body,this)};c.prototype.compileNode=function(b){var d,l,e,f;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 y(this.context))],new a([this])),d=new za(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+=Fa;delete b.bare;delete b.isExistentialEquals;d=[];var m=[];var k=this.params;var n=0;for(e=k.length;n<e;n++){var q=k[n];q instanceof I||b.scope.parameter(q.asReference(b))}k=this.params;n=0;for(e=k.length;n<e;n++)if(q=k[n],q.splat||q instanceof I){n=this.params;var p=0;for(q=n.length;p<q;p++){var w=n[p];w instanceof I||!w.name.value||b.scope.add(w.name.value,"var",!0)}p=new x(new C(new r(function(){var a;
var d=this.params;var c=[];var l=0;for(a=d.length;l<a;l++)w=d[l],c.push(w.asReference(b));return c}.call(this))),new C(new y("arguments")));break}var t=this.params;k=0;for(n=t.length;k<n;k++){q=t[k];if(q.isComplex()){var v=f=q.asReference(b);q.value&&(v=new h("?",f,q.value));m.push(new x(new C(q.name),v,"\x3d",{param:!0}))}else f=q,q.value&&(e=new B(f.name.value+" \x3d\x3d null"),v=new x(new C(q.name),q.value,"\x3d"),m.push(new G(e,v)));p||d.push(f)}q=this.body.isEmpty();p&&m.unshift(p);m.length&&
(l=this.body.expressions).unshift.apply(l,m);l=p=0;for(m=d.length;p<m;l=++p)w=d[l],d[l]=w.compileToFragments(b),b.scope.parameter(ca(d[l]));var u=[];this.eachParamName(function(a,b){0<=R.call(u,a)&&b.error("multiple parameters named "+a);return u.push(a)});q||this.noReturn||this.body.makeReturn();l="function";this.isGenerator&&(l+="*");this.ctor&&(l+=" "+this.name);m=[this.makeCode(l+"(")];l=q=0;for(p=d.length;q<p;l=++q)w=d[l],l&&m.push(this.makeCode(", ")),m.push.apply(m,w);m.push(this.makeCode(") {"));
this.body.isEmpty()||(m=m.concat(this.makeCode("\n"),this.body.compileWithDeclarations(b),this.makeCode("\n"+this.tab)));m.push(this.makeCode("}"));return this.ctor?[this.makeCode(this.tab)].concat(M.call(m)):this.front||b.level>=Ka?this.wrapInBraces(m):m};c.prototype.eachParamName=function(a){var b;var c=this.params;var l=[];var e=0;for(b=c.length;e<b;e++){var f=c[e];l.push(f.eachName(a))}return l};c.prototype.traverseChildren=function(a,b){if(a)return c.__super__.traverseChildren.call(this,a,b)};
return c}(ta);e.Param=K=function(a){function b(a,b,c){this.name=a;this.value=b;this.splat=c;(a=Aa(this.name.unwrapAll().value))&&this.name.error(a);this.name instanceof q&&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,va)};b.prototype.asReference=function(a){if(this.reference)return this.reference;var b=this.name;b["this"]?(b=b.properties[0].name.value,
0<=R.call(ma,b)&&(b="_"+b),b=new y(a.scope.freeVariable(b))):b.isComplex()&&(b=new y(a.scope.freeVariable("arg")));b=new C(b);this.splat&&(b=new T(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,c;null==b&&(b=this.name);var l=function(b){return a("@"+b.properties[0].name.value,b)};if(b instanceof B)return a(b.value,b);if(b instanceof C)return l(b);b=null!=(d=b.objects)?
d:[];d=0;for(c=b.length;d<c;d++){var e=b[d];e instanceof x&&null==e.context&&(e=e.variable);e instanceof x?(e.value instanceof x&&(e=e.value),this.eachName(a,e.value.unwrap())):e instanceof T?(e=e.name.unwrap(),a(e.value,e)):e instanceof C?e.isArray()||e.isObject()?this.eachName(a,e.base):e["this"]?l(e):a(e.base.value,e.base):e instanceof I||e.error("illegal parameter "+e.compile())}};return b}(ta);e.Splat=T=function(a){function b(a){this.name=a.compile?a:new B(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,l,f,m;for(l=-1;(e=d[++l])&&!(e instanceof b););if(l>=d.length)return[];if(1===d.length)return e=d[0],d=e.compileToFragments(a,va),c?d:[].concat(e.makeCode(La("slice",a)+".call("),d,e.makeCode(")"));c=d.slice(l);var h=f=0;for(m=c.length;f<
m;h=++f){e=c[h];var k=e.compileToFragments(a,va);c[h]=e instanceof b?[].concat(e.makeCode(La("slice",a)+".call("),k,e.makeCode(")")):[].concat(e.makeCode("["),k,e.makeCode("]"))}if(0===l)return e=d[0],a=e.joinFragmentArrays(c.slice(1),", "),c[0].concat(e.makeCode(".concat("),a,e.makeCode(")"));f=d.slice(0,l);m=[];k=0;for(h=f.length;k<h;k++)e=f[k],m.push(e.compileToFragments(a,va));e=d[0].joinFragmentArrays(m,", ");a=d[l].joinFragmentArrays(c,", ");c=d[d.length-1];return[].concat(d[0].makeCode("["),
e,d[l].makeCode("].concat("),a,c.makeCode(")"))};return b}(ta);e.Expansion=I=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}(ta);e.While=Y=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+=Fa;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 G((new P(this.guard)).invert(),new V("continue"))):this.guard&&(e=a.wrap([new G(this.guard,e)]))),e=[].concat(this.makeCode("\n"),e.compileToFragments(b,na),this.makeCode("\n"+this.tab)));b=[].concat(this.makeCode(c+this.tab+"while ("),this.condition.compileToFragments(b,
Da),this.makeCode(") {"),e,this.makeCode("}"));this.returns&&b.push(this.makeCode("\n"+this.tab+"return "+d+";"));return b};return c}(ta);e.Op=h=function(a){function b(a,b,d,e){if("in"===a)return new O(b,d);if("do"===a)return this.generateDo(b);if("new"===a){if(b instanceof za&&!b["do"]&&!b.isNew)return b.newInstance();if(b instanceof k&&b.bound||b["do"])b=new P(b)}this.operator=c[a]||a;this.first=b;this.second=d;this.flip=!!e;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,c;if(this.isChainable()&&this.first.isChainable()){var e=!0;for(a=this;a&&a.operator;)e&&(e=a.operator in d),a=a.first;if(!e)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&&(e=this.first.unwrap())instanceof b&&("!"===(c=e.operator)||"in"===c||"instanceof"===c)?e:new b("!",this)};b.prototype.unfoldSoak=function(a){var b;return("++"===(b=this.operator)||"--"===b||"delete"===b)&&Ea(a,this,"first")};b.prototype.generateDo=function(a){var b,d;var c=[];var e=(a instanceof x&&(b=a.value.unwrap())instanceof k?b:a).params||[];b=0;for(d=e.length;b<d;b++){var l=e[b];l.value?(c.push(l.value),delete l.value):c.push(l)}a=new za(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=Aa(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,Ha),b=this.second.compileToFragments(a,Ha),d=[].concat(d,this.makeCode(" "+this.operator+" "),b),a.level<=Ha?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,Ha).concat(this.makeCode(" "+(this.invert?"\x26\x26":"||")+" "),
b.compileToFragments(a),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(a,Ha));return this.wrapInBraces(a)};b.prototype.compileExistence=function(a){if(this.first.isComplex()){var b=new y(a.scope.freeVariable("ref"));var d=new P(new x(b,this.first))}else b=d=this.first;return(new G(new z(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 z)return this.first.negated=
!this.first.negated,this.first.compileToFragments(a);if(a.level>=Ka)return(new P(this)).compileToFragments(a);var e="+"===c||"-"===c;("new"===c||"typeof"===c||"delete"===c||e&&this.first instanceof b&&this.first.operator===c)&&d.push([this.makeCode(" ")]);if(e&&this.first instanceof b||"new"===c&&this.first.isStatement(a))this.first=new P(this.first);d.push(this.first.compileToFragments(a,Ha));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<=R.call(Object.keys(this.first),"expression")&&!(this.first instanceof aa)?null!=this.first.expression&&d.push(this.first.expression.compileToFragments(a,Ha)):(a.level>=Da&&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,Ha)),a.level>=Da&&d.push([this.makeCode(")")]));return this.joinFragmentArrays(d,
"")};b.prototype.compilePower=function(a){var b=new C(new y("Math"),[new ra(new L("pow"))]);return(new za(b,[this.first,this.second])).compileToFragments(a)};b.prototype.compileFloorDivision=function(a){var d=new C(new y("Math"),[new ra(new L("floor"))]);var c=this.second.isComplex()?new P(this.second):this.second;c=new b("/",this.first,c);return(new za(d,[c])).compileToFragments(a)};b.prototype.compileModulo=function(a){var b=new C(new B(La("modulo",a)));return(new za(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}(ta);e.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=sa;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 l=c[e];if(l instanceof T){var f=!0;break}}if(!f)return this.compileOrTest(a)}return this.compileLoopTest(a)};
b.prototype.compileOrTest=function(a){var b,c;var e=this.object.cache(a,Ha);var f=e[0];var l=e[1];var h=this.negated?[" !\x3d\x3d "," \x26\x26 "]:[" \x3d\x3d\x3d "," || "];e=h[0];h=h[1];var m=[];var k=this.array.base.objects;var n=b=0;for(c=k.length;b<c;n=++b){var q=k[n];n&&m.push(this.makeCode(h));m=m.concat(n?l:f,this.makeCode(e),q.compileToFragments(a,Ka))}return a.level<Ha?m:this.wrapInBraces(m)};b.prototype.compileLoopTest=function(a){var b=this.object.cache(a,va);var c=b[0];var e=b[1];b=[].concat(this.makeCode(La("indexOf",
a)+".call("),this.array.compileToFragments(a,va),this.makeCode(", "),e,this.makeCode(") "+(this.negated?"\x3c 0":"\x3e\x3d 0")));if(ca(c)===ca(e))return b;b=c.concat(this.makeCode(", "),b);return a.level<va?b:this.wrapInBraces(b)};b.prototype.toString=function(a){return b.__super__.toString.call(this,a,this.constructor.name+(this.negated?"!":""))};return b}(ta);e.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+=Fa;var f=this.attempt.compileToFragments(a,na);var l=this.recovery?(b=a.scope.freeVariable("error",{reserve:!1}),e=new y(b),
this.errorVariable?(c=Aa(this.errorVariable.unwrapAll().value),c?this.errorVariable.error(c):void 0,this.recovery.unshift(new x(this.errorVariable,e))):void 0,[].concat(this.makeCode(" catch ("),e.compileToFragments(a),this.makeCode(") {\n"),this.recovery.compileToFragments(a,na),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,
na),this.makeCode("\n"+this.tab+"}")):[];return[].concat(this.makeCode(this.tab+"try {\n"),f,this.makeCode("\n"+this.tab+"}"),l,a)};return b}(ta);e.Throw=aa=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=oa;b.prototype.compileNode=function(a){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(a),this.makeCode(";"))};return b}(ta);e.Existence=z=function(a){function b(a){this.expression=
a}v(b,a);b.prototype.children=["expression"];b.prototype.invert=sa;b.prototype.compileNode=function(a){this.expression.front=this.front;var b=this.expression.compile(a,Ha);if(this.expression.unwrap()instanceof y&&!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<=gb?b:"("+b+")")]};return b}(ta);e.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,Da);return a.level<Ha&&(b instanceof h||b instanceof za||b instanceof N&&b.returns)&&(a.level<gb||3>=c.length)?c:this.wrapInBraces(c)};return b}(ta);
e.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 l=e[f];l instanceof D?(l=l.value.slice(1,-1),l=
l.replace(/(\\*)(`|\$\{)/g,function(a,b,d){return 0===b.length%2?b+"\\"+d:a}),c.push(this.makeCode(l))):(c.push(this.makeCode("${")),c.push.apply(c,l.compileToFragments(a,Da)),c.push(this.makeCode("}")))}c.push(this.makeCode("`"));return c};return b}(P);e.For=N=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 U&&!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,l,h,k;var n=a.wrap([this.body]);var m=n.expressions;m=m[m.length-1];(null!=m?m.jumps():void 0)instanceof H&&(this.returns=!1);var q=this.range?this.source.base:this.source;var p=b.scope;this.pattern||(e=this.name&&this.name.compile(b,va));m=this.index&&this.index.compile(b,va);e&&!this.pattern&&
p.find(e);!m||this.index instanceof C||p.find(m);this.returns&&(c=p.freeVariable("results"));this.from?this.pattern&&(f=p.freeVariable("x",{single:!0})):f=this.object&&m||p.freeVariable("i",{single:!0});var w=(this.range||this.from)&&e||m||f;var r=w!==f?w+" \x3d ":"";if(this.step&&!this.range){m=this.cacheToCodeFragments(this.step.cache(b,va,Za));var t=m[0];var v=m[1];this.step.isNumber()&&(h=Number(v))}this.pattern&&(e=f);var u=m=k="";var K=this.tab+Fa;if(this.range)var A=q.compileToFragments(ja(b,
{index:f,name:e,step:this.step,isComplex:Za}));else{var z=this.source.compile(b,va);!e&&!this.own||this.source.unwrap()instanceof y||(u+=""+this.tab+(q=p.freeVariable("ref"))+" \x3d "+z+";\n",z=q);!e||this.pattern||this.from||(l=e+" \x3d "+z+"["+w+"]");this.object||this.from||(t!==v&&(u+=""+this.tab+t+";\n"),e=0>h,this.step&&null!=h&&e||(d=p.freeVariable("len")),A=""+r+f+" \x3d 0, "+d+" \x3d "+z+".length",t=""+r+f+" \x3d "+z+".length - 1",d=f+" \x3c "+d,p=f+" \x3e\x3d 0",this.step?(null!=h?e&&(d=
p,A=t):(d=v+" \x3e 0 ? "+d+" : "+p,A="("+v+" \x3e 0 ? ("+A+") : "+t+")"),f=f+" +\x3d "+v):f=""+(w!==f?"++"+f:f+"++"),A=[this.makeCode(A+"; "+d+"; "+r+f)])}if(this.returns){var U=""+this.tab+c+" \x3d [];\n";var D="\n"+this.tab+"return "+c+";";n.makeReturn(c)}this.guard&&(1<n.expressions.length?n.expressions.unshift(new G((new P(this.guard)).invert(),new V("continue"))):this.guard&&(n=a.wrap([new G(this.guard,n)])));this.pattern&&n.expressions.unshift(new x(this.name,this.from?new y(w):new B(z+"["+
w+"]")));c=[].concat(this.makeCode(u),this.pluckDirectCall(b,n));l&&(k="\n"+K+l+";");this.object?(A=[this.makeCode(w+" in "+z)],this.own&&(m="\n"+K+"if (!"+La("hasProp",b)+".call("+z+", "+w+")) continue;")):this.from&&(A=[this.makeCode(w+" of "+z)]);(b=n.compileToFragments(ja(b,{indent:K}),na))&&0<b.length&&(b=[].concat(this.makeCode("\n"),b,this.makeCode("\n")));return[].concat(c,this.makeCode(""+(U||"")+this.tab+"for ("),A,this.makeCode(") {"+m+k),b,this.makeCode(this.tab+"}"+(D||"")))};c.prototype.pluckDirectCall=
function(a,b){var d,c,e,f,h,l,n;var m=[];var q=b.expressions;var p=d=0;for(c=q.length;d<c;p=++d){var w=q[p];w=w.unwrapAll();if(w instanceof za){var r=null!=(e=w.variable)?e.unwrapAll():void 0;if(r instanceof k||r instanceof C&&(null!=(f=r.base)?f.unwrapAll():void 0)instanceof k&&1===r.properties.length&&("call"===(h=null!=(l=r.properties[0].name)?l.value:void 0)||"apply"===h)){var t=(null!=(n=r.base)?n.unwrapAll():void 0)||r;var v=new y(a.scope.freeVariable("fn"));var u=new C(v);r.base&&(u=[u,r],
r.base=u[0],u=u[1]);b.expressions[p]=new za(u,w.args);m=m.concat(this.makeCode(this.tab),(new x(v,t)).compileToFragments(a,na),this.makeCode(";\n"))}}}return m};return c}(Y);e.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 h=e[f];h=h[1];if(h=h.jumps(a))return h}return null!=
(c=this.otherwise)?c.jumps(a):void 0};c.prototype.makeReturn=function(b){var d,c;var e=this.cases;var f=0;for(d=e.length;f<d;f++){var h=e[f];h[1].makeReturn(b)}b&&(this.otherwise||(this.otherwise=new a([new B("void 0")])));null!=(c=this.otherwise)&&c.makeReturn(b);return this};c.prototype.compileNode=function(a){var b,c,e,f;var h=a.indent+Fa;var l=a.indent=h+Fa;var k=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(a,Da):this.makeCode("false"),this.makeCode(") {\n"));
var n=this.cases;var m=c=0;for(e=n.length;c<e;m=++c){var q=n[m];var p=q[0];q=q[1];var w=ia([p]);p=0;for(f=w.length;p<f;p++){var r=w[p];this.subject||(r=r.invert());k=k.concat(this.makeCode(h+"case "),r.compileToFragments(a,Da),this.makeCode(":\n"))}0<(b=q.compileToFragments(a,na)).length&&(k=k.concat(b,this.makeCode("\n")));if(m===this.cases.length-1&&!this.otherwise)break;m=this.lastNonComment(q.expressions);m instanceof H||m instanceof B&&m.jumps()&&"debugger"!==m.value||k.push(r.makeCode(l+"break;\n"))}this.otherwise&&
this.otherwise.expressions.length&&k.push.apply(k,[this.makeCode(h+"default:\n")].concat(M.call(this.otherwise.compileToFragments(a,na)),[this.makeCode("\n")]));k.push(this.makeCode(this.tab+"}"));return k};return c}(ta);e.If=G=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)===na||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 B("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 e=a.indent+Fa;var f=this.condition.compileToFragments(a,Da);var h=this.ensureBlock(this.body).compileToFragments(ja(a,{indent:e}));h=[].concat(this.makeCode("if ("),f,this.makeCode(") {\n"),h,this.makeCode("\n"+this.tab+"}"));b||h.unshift(this.makeCode(this.tab));if(!this.elseBody)return h;b=h.concat(this.makeCode(" else "));
this.isChain?(a.chainChild=!0,b=b.concat(this.elseBody.unwrap().compileToFragments(a,na))):b=b.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(ja(a,{indent:e}),na),this.makeCode("\n"+this.tab+"}"));return b};c.prototype.compileExpression=function(a){var b=this.condition.compileToFragments(a,gb);var c=this.bodyNode().compileToFragments(a,va);var e=this.elseBodyNode()?this.elseBodyNode().compileToFragments(a,va):[this.makeCode("void 0")];e=b.concat(this.makeCode(" ? "),c,this.makeCode(" : "),
e);return a.level>=gb?this.wrapInBraces(e):e};c.prototype.unfoldSoak=function(){return this.soak&&this};return c}(ta);var jc={extend:function(a){return"function(child, parent) { for (var key in parent) { if ("+La("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 na=1;var Da=2;var va=3;var gb=4;var Ha=5;var Ka=6;var Fa=" ";var Ra=/^[+-]?\d+$/;var La=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,jc[a](b));return c.utilities[a]=d};var Ga=function(a,b){a=a.replace(/\n/g,"$\x26"+b);return a.replace(/\s+$/,"")};var Wa=function(a){return a instanceof y&&"arguments"===a.value};var da=function(a){return a instanceof E||a instanceof k&&a.bound||a instanceof xa};var Za=function(a){return a.isComplex()||("function"===typeof a.isAssignable?a.isAssignable():void 0)};var Ea=function(a,b,c){if(a=b[c].unfoldSoak(a))return b[c]=a.body,a.body=new C(b),a}}).call(this);return e}();
u["./sourcemap"]=function(){var e={};(function(){var u=function(){function e(e){this.line=e;this.columns=[]}e.prototype.add=function(e,a,b){var r=a[0];a=a[1];null==b&&(b={});if(!this.columns[e]||!b.noReplace)return this.columns[e]={line:this.line,column:e,sourceLine:r,sourceColumn:a}};e.prototype.sourceLocation=function(e){for(var a;!((a=this.columns[e])||0>=e);)e--;return a&&[a.sourceLine,a.sourceColumn]};return e}();e=function(){function e(){this.lines=[]}e.prototype.add=function(e,a,b){var r;null==
b&&(b={});var f=a[0];a=a[1];return((r=this.lines)[f]||(r[f]=new u(f))).add(a,e,b)};e.prototype.sourceLocation=function(e){var a;var b=e[0];for(e=e[1];!((a=this.lines[b])||0>=b);)b--;return a&&a.sourceLocation(e)};e.prototype.generate=function(e,a){var b,r,f,k,t,p,u;null==e&&(e={});null==a&&(a=null);var x=f=r=u=0;var J=!1;var F="";var N=this.lines;var y=b=0;for(k=N.length;b<k;y=++b)if(y=N[y]){var G=y.columns;y=0;for(t=G.length;y<t;y++)if(p=G[y]){for(;u<p.line;)r=0,J=!1,F+=";",u++;J&&(F+=",");F+=this.encodeVlq(p.column-
r);r=p.column;F+=this.encodeVlq(0);F+=this.encodeVlq(p.sourceLine-f);f=p.sourceLine;F+=this.encodeVlq(p.sourceColumn-x);x=p.sourceColumn;J=!0}}F={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:F};e.inlineMap&&(F.sourcesContent=[a]);return F};e.prototype.encodeVlq=function(e){var a;var b="";for(a=(Math.abs(e)<<1)+(0>e?1:0);a||!b;)e=a&31,(a>>=5)&&(e|=32),b+=this.encodeBase64(e);return b};e.prototype.encodeBase64=function(e){var a;if(!(a=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]))throw Error("Cannot Base64 encode value: "+e);return a};return e}()}).call(this);return e}();u["./coffee-script"]=function(){var e={};(function(){var ra,r,x={}.hasOwnProperty;var a=u("fs");var b=u("vm");var za=u("path");var f=u("./lexer").Lexer;var k=u("./parser").parser;var t=u("./helpers");var p=u("./sourcemap");var z=u("../../package.json");e.VERSION=z.version;e.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"];e.helpers=
t;var I=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.");}};z=function(a){return function(b,e){null==e&&(e={});try{return a.call(this,b,e)}catch(h){var c=h;if("string"!==typeof b)throw c;throw t.updateSyntaxError(c,b,e.filename);}}};var J={};var F=
{};e.compile=ra=z(function(a,b){var c,e,f,n;var r=t.extend;b=r({},b);var u=b.sourceMap||b.inlineMap||null==b.filename;r=b.filename||"\x3canonymous\x3e";J[r]=a;u&&(f=new p);var y=O.tokenize(a,b);var x=b;var z=[];var B=0;for(c=y.length;B<c;B++){var G=y[B];"IDENTIFIER"===G[0]&&z.push(G[1])}x.referencedVars=z;if(null==b.bare||!0!==b.bare)for(x=0,B=y.length;x<B;x++)if(G=y[x],"IMPORT"===(e=G[0])||"EXPORT"===e){b.bare=!0;break}B=k.parse(y).compileToFragments(b);y=0;b.header&&(y+=1);b.shiftLine&&(y+=1);G=
0;e="";c=0;for(z=B.length;c<z;c++){x=B[c];if(u){x.locationData&&!/^[;\s]*$/.test(x.code)&&f.add([x.locationData.first_line,x.locationData.first_column],[y,G],{noReplace:!0});var N=t.count(x.code,"\n");y+=N;G=N?x.code.length-(x.code.lastIndexOf("\n")+1):G+x.code.length}e+=x.code}b.header&&(G="Generated by CoffeeScript "+this.VERSION,e="// "+G+"\n"+e);if(u){var D=f.generate(b,a);F[r]=f}b.inlineMap&&(a=I(JSON.stringify(D)),r="//# sourceURL\x3d"+(null!=(n=b.filename)?n:"coffeescript"),e=e+"\n"+("//# sourceMappingURL\x3ddata:application/json;base64,"+
a)+"\n"+r);return b.sourceMap?{js:e,sourceMap:f,v3SourceMap:JSON.stringify(D,null,2)}:e});e.tokens=z(function(a,b){return O.tokenize(a,b)});e.nodes=z(function(a,b){return"string"===typeof a?k.parse(O.tokenize(a,b)):k.parse(a)});e.run=function(b,c){var e;null==c&&(c={});var f=u.main;f.filename=process.argv[1]=c.filename?a.realpathSync(c.filename):"\x3canonymous\x3e";f.moduleCache&&(f.moduleCache={});var h=null!=c.filename?za.dirname(a.realpathSync(c.filename)):a.realpathSync(".");f.paths=u("module")._nodeModulePaths(h);
if(!t.isCoffee(f.filename)||u.extensions)b=ra(b,c),b=null!=(e=b.js)?e:b;return f._compile(b,f.filename)};e.eval=function(a,c){var e,f,h,k,n;null==c&&(c={});if(a=a.trim()){var p=null!=(h=b.Script.createContext)?h:b.createContext;h=null!=(f=b.isContext)?f:function(a){return c.sandbox instanceof p().constructor};if(p){if(null!=c.sandbox){if(h(c.sandbox))var r=c.sandbox;else for(k in r=p(),h=c.sandbox,h)x.call(h,k)&&(f=h[k],r[k]=f);r.global=r.root=r.GLOBAL=r}else r=global;r.__filename=c.filename||"eval";
r.__dirname=za.dirname(r.__filename);if(r===global&&!r.module&&!r.require){var t=u("module");r.module=e=new t(c.modulename||"eval");r.require=f=function(a){return t._load(a,e,!0)};e.filename=r.__filename;var y=Object.getOwnPropertyNames(u);h=0;for(n=y.length;h<n;h++){var z=y[h];"paths"!==z&&"arguments"!==z&&"caller"!==z&&(f[z]=u[z])}f.paths=e.paths=t._nodeModulePaths(process.cwd());f.resolve=function(a){return t._resolveFilename(a,e)}}}h={};for(k in c)x.call(c,k)&&(f=c[k],h[k]=f);h.bare=!0;a=ra(a,
h);return r===global?b.runInThisContext(a):b.runInContext(a,r)}};e.register=function(){return u("./register")};if(u.extensions){var N=this.FILE_EXTENSIONS;var y=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 G=0;for(r=N.length;G<r;G++)z=N[G],y(z)}e._compileFile=function(b,c,e){null==c&&(c=!1);null==e&&(e=!1);var f=a.readFileSync(b,"utf8");f=65279===f.charCodeAt(0)?
f.substring(1):f;try{var h=ra(f,{filename:b,sourceMap:c,inlineMap:e,sourceFiles:[b],literate:t.isLiterate(b)})}catch(K){throw c=K,t.updateSyntaxError(c,f,b);}return h};var O=new f;k.lexer={lex:function(){var a;if(a=k.tokens[this.pos++]){var b=a[0];this.yytext=a[1];this.yylloc=a[2];k.errorToken=a.origin||a;this.yylineno=this.yylloc.first_line}else b="";return b},setInput:function(a){k.tokens=a;return this.pos=0},upcomingInput:function(){return""}};k.yy=u("./nodes");k.yy.parseError=function(a,b){var c=
k.errorToken;var e=k.tokens;var f=c[0];var n=c[1];a=c[2];n=function(){switch(!1){case c!==e[e.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 t.nameWhitespaceCharacter(n)}}();return t.throwSyntaxError("unexpected "+n,a)};var Q=function(a,b){var c;if(a.isNative())var e="native";else{a.isEval()?
(c=a.getScriptNameOrSourceURL())||a.getEvalOrigin():c=a.getFileName();c||(c="\x3canonymous\x3e");var f=a.getLineNumber();e=a.getColumnNumber();e=(b=b(c,f,e))?c+":"+b[0]+":"+b[1]:c+":"+f+":"+e}c=a.getFunctionName();f=a.isConstructor();if(a.isToplevel()||f)return f?"new "+(c||"\x3canonymous\x3e")+" ("+e+")":c?c+" ("+e+")":e;f=a.getMethodName();var k=a.getTypeName();return c?(b=a="",k&&c.indexOf(k)&&(b=k+"."),f&&c.indexOf("."+f)!==c.length-f.length-1&&(a=" [as "+f+"]"),""+b+c+a+" ("+e+")"):k+"."+(f||
"\x3canonymous\x3e")+" ("+e+")"};var B=function(a){return null!=F[a]?F[a]:null!=F["\x3canonymous\x3e"]?F["\x3canonymous\x3e"]:null!=J[a]?(a=ra(J[a],{filename:a,sourceMap:!0,literate:t.isLiterate(a)}),a.sourceMap):null};Error.prepareStackTrace=function(a,b){var c;var f=function(a,b,c){var e;a=B(a);null!=a&&(e=a.sourceLocation([b-1,c-1]));return null!=e?[e[0]+1,e[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()===e.run)break;h.push(" at "+Q(c,
f))}return h}();return a.toString()+"\n"+h.join("\n")+"\n"}}).call(this);return e}();u["./browser"]=function(){(function(){var e=[].indexOf||function(a){for(var b=0,e=this.length;b<e;b++)if(b in this&&this[b]===a)return b;return-1};var ra=u("./coffee-script");ra.require=u;var r=ra.compile;ra.eval=function(a,b){null==b&&(b={});null==b.bare&&(b.bare=!0);return eval(r(a,b))};ra.run=function(a,b){null==b&&(b={});b.bare=!0;b.shiftLine=!0;return Function(r(a,b))()};if("undefined"!==typeof window&&null!==
window){"undefined"!==typeof btoa&&null!==btoa&&"undefined"!==typeof JSON&&null!==JSON&&(r=function(a,b){null==b&&(b={});b.inlineMap=!0;return ra.compile(a,b)});ra.load=function(a,b,e,f){null==e&&(e={});null==f&&(f=!1);e.sourceFiles=[a];var k=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest;k.open("GET",a,!0);"overrideMimeType"in k&&k.overrideMimeType("text/plain");k.onreadystatechange=function(){var r;if(4===k.readyState){if(0===(r=k.status)||200===r)r=
[k.responseText,e],f||ra.run.apply(ra,r);else throw Error("Could not load "+a);if(b)return b(r)}};return k.send(null)};var x=function(){var a,b,r;var f=window.document.getElementsByTagName("script");var k=["text/coffeescript","text/literate-coffeescript"];var t=function(){var a,b;var p=[];var t=0;for(a=f.length;t<a;t++)r=f[t],(b=r.type,0<=e.call(k,b))&&p.push(r);return p}();var p=0;var u=function(){var a=t[p];if(a instanceof Array)return ra.run.apply(ra,a),p++,u()};var x=function(a,b){var e;var f=
{literate:a.type===k[1]};if(e=a.src||a.getAttribute("data-src"))return ra.load(e,function(a){t[b]=a;return u()},f,!0);f.sourceFiles=["embedded"];return t[b]=[a.innerHTML,f]};var J=a=0;for(b=t.length;a<b;J=++a){var F=t[J];x(F,J)}return u()};window.addEventListener?window.addEventListener("DOMContentLoaded",x,!1):window.attachEvent("onload",x)}}).call(this);return{}}();return u["./coffee-script"]}();"function"===typeof define&&define.amd?define(function(){return xa}):u.CoffeeScript=xa})(this);

View File

@@ -112,6 +112,9 @@ code, pre, pre > code, textarea {
font-weight: normal;
text-transform: uppercase;
}
.nowrap {
white-space: nowrap;
}
div.anchor {
position: relative;
top: -90px;
@@ -591,18 +594,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>
@@ -612,10 +615,10 @@ 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.5">1.12.5</a></p>
<blockquote class="uneditable-code-block"><pre><code class="language-bash">npm install -g coffee-script
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/1.12.7">1.12.7</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>
</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>, <a href="/v2/#jsx">JSX</a>, <span class="nowrap"><a href="/v2/#splats">object rest/spread syntax</a></span>, and JavaScript generated using ES2015+ syntax. <a href="/v2/">Learn more</a>.</p>
<h2>Overview</h2>
<p><em>CoffeeScript on the left, compiled JavaScript output on the right.</em></p>
@@ -738,14 +741,16 @@ 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 class="uneditable-code-block"><pre><code class="language-bash">npm install --global coffee-script
<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>When you need CoffeeScript as a dependency of a project, within that projects folder you can install it locally:</p>
<blockquote class="uneditable-code-block"><pre><code class="language-bash">npm install --save coffee-script
</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 class="uneditable-code-block"><pre><code class="language-bash">npm install --save coffeescript
</code></pre>
</blockquote>
</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>
@@ -842,8 +847,7 @@ cubes = (function() {
<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>
<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>
@@ -1470,7 +1474,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>
@@ -1625,7 +1629,7 @@ zip = <span class="keyword">typeof</span> lottery.drawWinner === <span class="st
<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>
<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>
@@ -1950,6 +1954,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>
@@ -1984,6 +1989,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>]
@@ -2184,7 +2190,7 @@ 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>
<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>
@@ -2319,7 +2325,7 @@ OPERATOR = <span class="regexp">/^(?:[-=]&gt;|[-+*\/%&lt;&gt;&amp;|^!?=]=|&gt;&g
<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>
@@ -2342,7 +2348,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>;
@@ -2405,7 +2411,8 @@ 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>
@@ -2434,16 +2441,16 @@ 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 '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>
</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>
<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>“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>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>
@@ -2451,22 +2458,22 @@ task(<span class="string">'build:parser'</span>, <span class="string">'rebuild t
<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>
<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>
@@ -2474,10 +2481,9 @@ task(<span class="string">'build:parser'</span>, <span class="string">'rebuild t
<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>
@@ -2487,7 +2493,7 @@ task(<span class="string">'build:parser'</span>, <span class="string">'rebuild t
<h2>Resources</h2>
<ul>
<li>
<p><a href="http://github.com/jashkenas/coffeescript/">Source Code</a><br>
<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>
@@ -2495,11 +2501,11 @@ Use <code>bin/coffee</code> to test your changes,<br>
<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>
<p><a href="v1/test.html">Browser Tests</a><br>
<p><a href="/v1/test.html">Browser Tests</a><br>
Run CoffeeScripts test suite in your current browser.</p>
</li>
<li>
<p><a href="http://github.com/jashkenas/coffeescript/issues">CoffeeScript Issues</a><br>
<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>
@@ -2507,11 +2513,11 @@ Bug reports, feature proposals, and ideas for changes to the language belong her
If youd like to ask a question, the mailing list is a good place to get help.</p>
</li>
<li>
<p><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>.</p>
<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="http://github.com/jashkenas/coffeescript/wiki/FAQ">The FAQ</a><br>
<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>
@@ -2531,6 +2537,26 @@ The CoffeeScript logo is available in SVG for use in presentations.</p>
<span class="bookmark" id="changelog"></span>
<h2>Change Log</h2>
<div class="anchor" id="1.12.7"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/1.12.6...1.12.7">1.12.7</a>
<span class="timestamp"> &mdash; <time datetime="2017-07-16">July 16, 2017</time></span>
</h2><ul>
<li>Fix regressions in 1.12.6 related to chained function calls and indented <code>return</code> and <code>throw</code> arguments.</li>
<li>The REPL no longer warns about assigning to <code>_</code>.</li>
</ul>
<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>
@@ -2566,7 +2592,7 @@ The CoffeeScript logo is available in SVG for use in presentations.</p>
<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">
@@ -2585,7 +2611,7 @@ The CoffeeScript logo is available in SVG for use in presentations.</p>
<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>
@@ -2800,7 +2826,7 @@ six = -&gt;
<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>
@@ -2907,7 +2933,7 @@ six = -&gt;
<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>
@@ -2974,7 +3000,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>
@@ -2990,7 +3016,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>
@@ -3056,7 +3082,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>
@@ -3071,7 +3097,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", ->
@@ -4684,6 +4699,119 @@ 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}'
\ ^\^^^^^^^^^^^^^
'''
test "#4283: error message for implicit call", ->
assertErrorFormat '''
console.log {search, users, contacts users_to_display}
''', '''
[stdin]:1:29: error: unexpected implicit function call
console.log {search, users, contacts users_to_display}
^^^^^^^^
'''
test "#3199: error message for call indented non-object", ->
assertErrorFormat '''
fn = ->
fn
1
''', '''
[stdin]:3:1: error: unexpected indentation
1
^^
'''
test "#3199: error message for call indented comprehension", ->
assertErrorFormat '''
fn = ->
fn
x for x in [1, 2, 3]
''', '''
[stdin]:3:1: error: unexpected indentation
x for x in [1, 2, 3]
^^
'''
test "#3199: error message for return indented non-object", ->
assertErrorFormat '''
return
1
''', '''
[stdin]:2:3: error: unexpected number
1
^
'''
test "#3199: error message for return indented comprehension", ->
assertErrorFormat '''
return
x for x in [1, 2, 3]
''', '''
[stdin]:2:3: error: unexpected identifier
x for x in [1, 2, 3]
^
'''
</script>
<script type="text/x-coffeescript" class="test" id="eval">
if vm = require? 'vm'
@@ -4994,6 +5122,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
@@ -5064,6 +5195,47 @@ 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
test "#4568: refine sameLine implicit object tagging", ->
condition = yes
fn = -> yes
x =
fn bar: {
foo: 123
} if not condition
eq x, undefined
# Nested blocks caused by paren unwrapping
test "#1492: Nested blocks don't cause double semicolons", ->
js = CoffeeScript.compile '(0;0)'
@@ -5121,6 +5293,13 @@ test "#1275: allow indentation before closing brackets", ->
)
eq 1, a
test "#3199: return multiline implicit object", ->
y = do ->
if no then return
type: 'a'
msg: 'b'
eq undefined, y
</script>
<script type="text/x-coffeescript" class="test" id="function_invocation">
# Function Invocation
@@ -7635,12 +7814,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", ->
@@ -7952,6 +8125,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 = """
@@ -9151,6 +9346,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
@@ -10117,6 +10324,37 @@ test "#3795: Escape otherwise invalid characters", ->
ok ///#{a}\0
1///.test 'a\x001'
test "#4248: Unicode code point escapes", ->
# Support for the `u` flag in regexes was added in Node 6.
return if new RegExp().unicode is undefined
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
@@ -10188,6 +10426,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()
@@ -10861,10 +11104,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}}"
@@ -11307,6 +11550,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>
@@ -162,7 +159,7 @@ evaluated from <code>lib/coffeescript</code>.</p>
<div class="content"><div class='highlight'><pre>exports.VERSION = packageJson.version
exports.FILE_EXTENSIONS = [<span class="hljs-string">'.coffee'</span>, <span class="hljs-string">'.litcoffee'</span>, <span class="hljs-string">'.coffee.md'</span>]</pre></div></div>
exports.FILE_EXTENSIONS = FILE_EXTENSIONS = [<span class="hljs-string">'.coffee'</span>, <span class="hljs-string">'.litcoffee'</span>, <span class="hljs-string">'.coffee.md'</span>]</pre></div></div>
</li>
@@ -255,7 +252,7 @@ didnt create a source map (faster) but something went wrong and we need
a stack trace. Assuming that most of the time, code isnt throwing
exceptions, its probably more efficient to compile twice only when we
need a stack trace, rather than always generating a source map even when
its not likely to be used. Save in form of <code>filename</code>: <code>(source)</code></p>
its not likely to be used. Save in form of <code>filename</code>: [<code>(source)</code>]</p>
</div>
@@ -270,7 +267,7 @@ its not likely to be used. Save in form of <code>filename</code>: <code>(sour
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Also save source maps if generated, in form of <code>filename</code>: <code>(source map)</code>.</p>
<p>Also save source maps if generated, in form of <code>(source)</code>: [<code>(source map)</code>].</p>
</div>
@@ -318,7 +315,10 @@ we need to recompile it to get a source map for <code>prepareStackTrace</code>.<
<div class="content"><div class='highlight'><pre> generateSourceMap = options.sourceMap <span class="hljs-keyword">or</span> options.inlineMap <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> options.filename?
filename = options.filename <span class="hljs-keyword">or</span> <span class="hljs-string">'&lt;anonymous&gt;'</span>
sources[filename] = code
checkShebangLine filename, code
sources[filename] ?= []
sources[filename].push code
map = <span class="hljs-keyword">new</span> SourceMap <span class="hljs-keyword">if</span> generateSourceMap
tokens = lexer.tokenize code, options</pre></div></div>
@@ -429,8 +429,9 @@ the same name.</p>
js = <span class="hljs-string">"// <span class="hljs-subst">#{header}</span>\n<span class="hljs-subst">#{js}</span>"</span>
<span class="hljs-keyword">if</span> generateSourceMap
v3SourceMap = map.generate(options, code)
sourceMaps[filename] = map
v3SourceMap = map.generate options, code
sourceMaps[filename] ?= []
sourceMaps[filename].push map
<span class="hljs-keyword">if</span> options.inlineMap
encoded = base64encode JSON.stringify v3SourceMap
@@ -493,13 +494,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 +514,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 +523,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
@@ -755,22 +544,20 @@ directly as a “Jison lexer”.</p>
@yylineno = @yylloc.first_line
<span class="hljs-keyword">else</span>
tag = <span class="hljs-string">''</span>
tag
setInput: <span class="hljs-function"><span class="hljs-params">(tokens)</span> -&gt;</span>
parser.tokens = tokens
@pos = <span class="hljs-number">0</span>
upcomingInput: <span class="hljs-function">-&gt;</span>
<span class="hljs-string">""</span></pre></div></div>
upcomingInput: <span class="hljs-function">-&gt;</span> <span class="hljs-string">''</span></pre></div></div>
</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 +568,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 +583,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 +611,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 +629,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 +661,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>
@@ -916,29 +703,87 @@ Modified to handle sourceMap</p>
<span class="hljs-keyword">else</span>
fileLocation
<span class="hljs-function">
<span class="hljs-title">getSourceMap</span> = <span class="hljs-params">(filename)</span> -&gt;</span>
<span class="hljs-keyword">if</span> sourceMaps[filename]?
sourceMaps[filename]</pre></div></div>
<span class="hljs-title">getSourceMap</span> = <span class="hljs-params">(filename, line, column)</span> -&gt;</span></pre></div></div>
</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
filename of the script file.</p>
<p>Skip files that we didnt compile, like Node system files that appear in
the stack trace, as they never have source maps.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> sourceMaps[<span class="hljs-string">'&lt;anonymous&gt;'</span>]?
sourceMaps[<span class="hljs-string">'&lt;anonymous&gt;'</span>]
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> sources[filename]?
answer = compile sources[filename],
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span> <span class="hljs-keyword">unless</span> filename <span class="hljs-keyword">is</span> <span class="hljs-string">'&lt;anonymous&gt;'</span> <span class="hljs-keyword">or</span> filename.slice(filename.lastIndexOf(<span class="hljs-string">'.'</span>)) <span class="hljs-keyword">in</span> FILE_EXTENSIONS
<span class="hljs-keyword">if</span> filename <span class="hljs-keyword">isnt</span> <span class="hljs-string">'&lt;anonymous&gt;'</span> <span class="hljs-keyword">and</span> sourceMaps[filename]?
<span class="hljs-keyword">return</span> sourceMaps[filename][sourceMaps[filename].length - <span class="hljs-number">1</span>]</pre></div></div>
</li>
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>CoffeeScript compiled in a browser or via <code>CoffeeScript.compile</code> or <code>.run</code>
may get compiled with <code>options.filename</code> thats missing, which becomes
<code>&lt;anonymous&gt;</code>; but the runtime might request the stack trace with the
filename of the script file. See if we have a source map cached under
<code>&lt;anonymous&gt;</code> that matches the error.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> sourceMaps[<span class="hljs-string">'&lt;anonymous&gt;'</span>]?</pre></div></div>
</li>
<li id="section-30">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-30">&#182;</a>
</div>
<p>Work backwards from the most recent anonymous source maps, until we find
one that works. This isnt foolproof; there is a chance that multiple
source maps will have line/column pairs that match. But we have no other
way to match them. <code>frame.getFunction().toString()</code> doesnt always work,
and its not foolproof either.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span> map <span class="hljs-keyword">in</span> sourceMaps[<span class="hljs-string">'&lt;anonymous&gt;'</span>] <span class="hljs-keyword">by</span> <span class="hljs-number">-1</span>
sourceLocation = map.sourceLocation [line - <span class="hljs-number">1</span>, column - <span class="hljs-number">1</span>]
<span class="hljs-keyword">return</span> map <span class="hljs-keyword">if</span> sourceLocation?[<span class="hljs-number">0</span>]? <span class="hljs-keyword">and</span> sourceLocation[<span class="hljs-number">1</span>]?</pre></div></div>
</li>
<li id="section-31">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-31">&#182;</a>
</div>
<p>If all else fails, recompile this source to get a source map. We need the
previous section (for <code>&lt;anonymous&gt;</code>) despite this option, because after it
gets compiled we will still need to look it up from
<code>sourceMaps[&#39;&lt;anonymous&gt;&#39;]</code> in order to find and return it. Thats why we
start searching from the end in the previous block, because most of the
time the source map we want is the last one.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> sources[filename]?
answer = compile sources[filename][sources[filename].length - <span class="hljs-number">1</span>],
filename: filename
sourceMap: <span class="hljs-literal">yes</span>
literate: helpers.isLiterate filename
@@ -949,11 +794,11 @@ filename of the script file.</p>
</li>
<li id="section-39">
<li id="section-32">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-39">&#182;</a>
<a class="pilcrow" href="#section-32">&#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
@@ -964,7 +809,7 @@ positions.</p>
<div class="content"><div class='highlight'><pre>Error.prepareStackTrace = <span class="hljs-function"><span class="hljs-params">(err, stack)</span> -&gt;</span>
<span class="hljs-function"> <span class="hljs-title">getSourceMapping</span> = <span class="hljs-params">(filename, line, column)</span> -&gt;</span>
sourceMap = getSourceMap filename
sourceMap = getSourceMap filename, line, column
answer = sourceMap.sourceLocation [line - <span class="hljs-number">1</span>, column - <span class="hljs-number">1</span>] <span class="hljs-keyword">if</span> sourceMap?
<span class="hljs-keyword">if</span> answer? <span class="hljs-keyword">then</span> [answer[<span class="hljs-number">0</span>] + <span class="hljs-number">1</span>, answer[<span class="hljs-number">1</span>] + <span class="hljs-number">1</span>] <span class="hljs-keyword">else</span> <span class="hljs-literal">null</span>
@@ -972,7 +817,20 @@ positions.</p>
<span class="hljs-keyword">break</span> <span class="hljs-keyword">if</span> frame.getFunction() <span class="hljs-keyword">is</span> exports.run
<span class="hljs-string">" at <span class="hljs-subst">#{formatSourcePosition frame, getSourceMapping}</span>"</span>
<span class="hljs-string">"<span class="hljs-subst">#{err.toString()}</span>\n<span class="hljs-subst">#{frames.join <span class="hljs-string">'\n'</span>}</span>\n"</span></pre></div></div>
<span class="hljs-string">"<span class="hljs-subst">#{err.toString()}</span>\n<span class="hljs-subst">#{frames.join <span class="hljs-string">'\n'</span>}</span>\n"</span>
<span class="hljs-function">
<span class="hljs-title">checkShebangLine</span> = <span class="hljs-params">(file, input)</span> -&gt;</span>
firstLine = input.split(<span class="hljs-regexp">/$/m</span>)[<span class="hljs-number">0</span>]
rest = firstLine?.match(<span class="hljs-regexp">/^#!\s*([^\s]+\s*)(.*)/</span>)
args = rest?[<span class="hljs-number">2</span>]?.split(<span class="hljs-regexp">/\s/</span>).filter (s) -&gt; s <span class="hljs-keyword">isnt</span> <span class="hljs-string">''</span>
<span class="hljs-keyword">if</span> args?.length &gt; <span class="hljs-number">1</span>
<span class="hljs-built_in">console</span>.error <span class="hljs-string">'''
The script to be run begins with a shebang line with more than one
argument. This script will fail on platforms such as Linux which only
allow a single argument.
'''</span>
<span class="hljs-built_in">console</span>.error <span class="hljs-string">"The shebang line was: '<span class="hljs-subst">#{firstLine}</span>' in file '<span class="hljs-subst">#{file}</span>'"</span>
<span class="hljs-built_in">console</span>.error <span class="hljs-string">"The arguments were: <span class="hljs-subst">#{JSON.stringify args}</span>"</span></pre></div></div>
</li>

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>
@@ -180,7 +180,7 @@ useWinPathSep = path.sep <span class="hljs-keyword">is</span> <span class="hljs
</div>
<div class="content"><div class='highlight'><pre>BANNER = <span class="hljs-string">'''
Usage: coffee [options] path/to/script.coffee -- [args]
Usage: coffee [options] path/to/script.coffee [args]
If called without options, `coffee` will run your script.
'''</span></pre></div></div>
@@ -199,25 +199,25 @@ useWinPathSep = path.sep <span class="hljs-keyword">is</span> <span class="hljs
</div>
<div class="content"><div class='highlight'><pre>SWITCHES = [
[<span class="hljs-string">'-b'</span>, <span class="hljs-string">'--bare'</span>, <span class="hljs-string">'compile without a top-level function wrapper'</span>]
[<span class="hljs-string">'-c'</span>, <span class="hljs-string">'--compile'</span>, <span class="hljs-string">'compile to JavaScript and save as .js files'</span>]
[<span class="hljs-string">'-e'</span>, <span class="hljs-string">'--eval'</span>, <span class="hljs-string">'pass a string from the command line as input'</span>]
[<span class="hljs-string">'-h'</span>, <span class="hljs-string">'--help'</span>, <span class="hljs-string">'display this help message'</span>]
[<span class="hljs-string">'-i'</span>, <span class="hljs-string">'--interactive'</span>, <span class="hljs-string">'run an interactive CoffeeScript REPL'</span>]
[<span class="hljs-string">'-j'</span>, <span class="hljs-string">'--join [FILE]'</span>, <span class="hljs-string">'concatenate the source CoffeeScript before compiling'</span>]
[<span class="hljs-string">'-m'</span>, <span class="hljs-string">'--map'</span>, <span class="hljs-string">'generate source map and save as .js.map files'</span>]
[<span class="hljs-string">'-M'</span>, <span class="hljs-string">'--inline-map'</span>, <span class="hljs-string">'generate source map and include it directly in output'</span>]
[<span class="hljs-string">'-n'</span>, <span class="hljs-string">'--nodes'</span>, <span class="hljs-string">'print out the parse tree that the parser produces'</span>]
[ <span class="hljs-string">'--nodejs [ARGS]'</span>, <span class="hljs-string">'pass options directly to the "node" binary'</span>]
[ <span class="hljs-string">'--no-header'</span>, <span class="hljs-string">'suppress the "Generated by" header'</span>]
[<span class="hljs-string">'-o'</span>, <span class="hljs-string">'--output [DIR]'</span>, <span class="hljs-string">'set the output directory for compiled JavaScript'</span>]
[<span class="hljs-string">'-p'</span>, <span class="hljs-string">'--print'</span>, <span class="hljs-string">'print out the compiled JavaScript'</span>]
[<span class="hljs-string">'-b'</span>, <span class="hljs-string">'--bare'</span>, <span class="hljs-string">'compile without a top-level function wrapper'</span>]
[<span class="hljs-string">'-c'</span>, <span class="hljs-string">'--compile'</span>, <span class="hljs-string">'compile to JavaScript and save as .js files'</span>]
[<span class="hljs-string">'-e'</span>, <span class="hljs-string">'--eval'</span>, <span class="hljs-string">'pass a string from the command line as input'</span>]
[<span class="hljs-string">'-h'</span>, <span class="hljs-string">'--help'</span>, <span class="hljs-string">'display this help message'</span>]
[<span class="hljs-string">'-i'</span>, <span class="hljs-string">'--interactive'</span>, <span class="hljs-string">'run an interactive CoffeeScript REPL'</span>]
[<span class="hljs-string">'-j'</span>, <span class="hljs-string">'--join [FILE]'</span>, <span class="hljs-string">'concatenate the source CoffeeScript before compiling'</span>]
[<span class="hljs-string">'-m'</span>, <span class="hljs-string">'--map'</span>, <span class="hljs-string">'generate source map and save as .js.map files'</span>]
[<span class="hljs-string">'-M'</span>, <span class="hljs-string">'--inline-map'</span>, <span class="hljs-string">'generate source map and include it directly in output'</span>]
[<span class="hljs-string">'-n'</span>, <span class="hljs-string">'--nodes'</span>, <span class="hljs-string">'print out the parse tree that the parser produces'</span>]
[ <span class="hljs-string">'--nodejs [ARGS]'</span>, <span class="hljs-string">'pass options directly to the "node" binary'</span>]
[ <span class="hljs-string">'--no-header'</span>, <span class="hljs-string">'suppress the "Generated by" header'</span>]
[<span class="hljs-string">'-o'</span>, <span class="hljs-string">'--output [PATH]'</span>, <span class="hljs-string">'set the output path or path/filename for compiled JavaScript'</span>]
[<span class="hljs-string">'-p'</span>, <span class="hljs-string">'--print'</span>, <span class="hljs-string">'print out the compiled JavaScript'</span>]
[<span class="hljs-string">'-r'</span>, <span class="hljs-string">'--require [MODULE*]'</span>, <span class="hljs-string">'require the given module before eval or REPL'</span>]
[<span class="hljs-string">'-s'</span>, <span class="hljs-string">'--stdio'</span>, <span class="hljs-string">'listen for and compile scripts over stdio'</span>]
[<span class="hljs-string">'-l'</span>, <span class="hljs-string">'--literate'</span>, <span class="hljs-string">'treat stdio as literate style coffeescript'</span>]
[<span class="hljs-string">'-t'</span>, <span class="hljs-string">'--tokens'</span>, <span class="hljs-string">'print out the tokens that the lexer/rewriter produce'</span>]
[<span class="hljs-string">'-v'</span>, <span class="hljs-string">'--version'</span>, <span class="hljs-string">'display the version number'</span>]
[<span class="hljs-string">'-w'</span>, <span class="hljs-string">'--watch'</span>, <span class="hljs-string">'watch scripts for changes and rerun commands'</span>]
[<span class="hljs-string">'-s'</span>, <span class="hljs-string">'--stdio'</span>, <span class="hljs-string">'listen for and compile scripts over stdio'</span>]
[<span class="hljs-string">'-l'</span>, <span class="hljs-string">'--literate'</span>, <span class="hljs-string">'treat stdio as literate style coffeescript'</span>]
[<span class="hljs-string">'-t'</span>, <span class="hljs-string">'--tokens'</span>, <span class="hljs-string">'print out the tokens that the lexer/rewriter produce'</span>]
[<span class="hljs-string">'-v'</span>, <span class="hljs-string">'--version'</span>, <span class="hljs-string">'display the version number'</span>]
[<span class="hljs-string">'-w'</span>, <span class="hljs-string">'--watch'</span>, <span class="hljs-string">'watch scripts for changes and rerun commands'</span>]
]</pre></div></div>
</li>
@@ -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,7 +259,22 @@ 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>
parseOptions()</pre></div></div>
optionParser = buildCSOptionParser()
<span class="hljs-keyword">try</span> parseOptions()
<span class="hljs-keyword">catch</span> err
<span class="hljs-built_in">console</span>.error <span class="hljs-string">"option parsing error: <span class="hljs-subst">#{err.message}</span>"</span>
process.exit <span class="hljs-number">1</span>
<span class="hljs-keyword">if</span> (<span class="hljs-keyword">not</span> opts.doubleDashed) <span class="hljs-keyword">and</span> (opts.arguments[<span class="hljs-number">1</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'--'</span>)
printWarn <span class="hljs-string">'''
coffee was invoked with '--' as the second positional argument, which is
now deprecated. To pass '--' as an argument to a script to run, put an
additional '--' before the path to your script.
'--' will be removed from the argument list.
'''</span>
printWarn <span class="hljs-string">"The positional arguments were: <span class="hljs-subst">#{JSON.stringify opts.arguments}</span>"</span>
opts.arguments = [opts.arguments[<span class="hljs-number">0</span>]].concat opts.arguments[<span class="hljs-number">2.</span>.]</pre></div></div>
</li>
@@ -287,7 +305,45 @@ Many flags cause us to divert before compiling anything. Flags passed after
process.argv = process.argv[<span class="hljs-number">0.</span><span class="hljs-number">.1</span>].concat literals
process.argv[<span class="hljs-number">0</span>] = <span class="hljs-string">'coffee'</span>
opts.output = path.resolve opts.output <span class="hljs-keyword">if</span> opts.output
<span class="hljs-keyword">if</span> opts.output
outputBasename = path.basename opts.output
<span class="hljs-keyword">if</span> <span class="hljs-string">'.'</span> <span class="hljs-keyword">in</span> outputBasename <span class="hljs-keyword">and</span>
outputBasename <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> [<span class="hljs-string">'.'</span>, <span class="hljs-string">'..'</span>] <span class="hljs-keyword">and</span>
<span class="hljs-keyword">not</span> helpers.ends(opts.output, path.sep)</pre></div></div>
</li>
<li id="section-9">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>An output filename was specified, e.g. <code>/dist/scripts.js</code>.</p>
</div>
<div class="content"><div class='highlight'><pre> opts.outputFilename = outputBasename
opts.outputPath = path.resolve path.dirname opts.output
<span class="hljs-keyword">else</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>An output path was specified, e.g. <code>/dist</code>.</p>
</div>
<div class="content"><div class='highlight'><pre> opts.outputFilename = <span class="hljs-literal">null</span>
opts.outputPath = path.resolve opts.output
<span class="hljs-keyword">if</span> opts.join
opts.join = path.resolve opts.join
<span class="hljs-built_in">console</span>.error <span class="hljs-string">'''
@@ -310,19 +366,19 @@ Many flags cause us to divert before compiling anything. Flags passed after
<span class="hljs-function">
<span class="hljs-title">makePrelude</span> = <span class="hljs-params">(requires)</span> -&gt;</span>
requires.map (<span class="hljs-built_in">module</span>) -&gt;
[_, name, <span class="hljs-built_in">module</span>] = match <span class="hljs-keyword">if</span> match = <span class="hljs-built_in">module</span>.match(<span class="hljs-regexp">/^(.*)=(.*)$/</span>)
name ||= helpers.baseFileName <span class="hljs-built_in">module</span>, <span class="hljs-literal">yes</span>, useWinPathSep
<span class="hljs-string">"<span class="hljs-subst">#{name}</span> = require('<span class="hljs-subst">#{<span class="hljs-built_in">module</span>}</span>')"</span>
[full, name, <span class="hljs-built_in">module</span>] = match <span class="hljs-keyword">if</span> match = <span class="hljs-built_in">module</span>.match(<span class="hljs-regexp">/^(.*)=(.*)$/</span>)
name <span class="hljs-keyword">or</span>= helpers.baseFileName <span class="hljs-built_in">module</span>, <span class="hljs-literal">yes</span>, useWinPathSep
<span class="hljs-string">"global['<span class="hljs-subst">#{name}</span>'] = require('<span class="hljs-subst">#{<span class="hljs-built_in">module</span>}</span>')"</span>
.join <span class="hljs-string">';'</span></pre></div></div>
</li>
<li id="section-9">
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Compile a path, which could be a script or a directory. If a directory
is passed, recursively compile all .coffee, .litcoffee, and .coffee.md
@@ -364,7 +420,7 @@ extension source files in it and all subdirectories.</p>
code = fs.readFileSync source
<span class="hljs-keyword">catch</span> err
<span class="hljs-keyword">if</span> err.code <span class="hljs-keyword">is</span> <span class="hljs-string">'ENOENT'</span> <span class="hljs-keyword">then</span> <span class="hljs-keyword">return</span> <span class="hljs-keyword">else</span> <span class="hljs-keyword">throw</span> err
compileScript(source, code.toString(), base)
compileScript source, code.toString(), base
<span class="hljs-keyword">else</span>
notSources[source] = <span class="hljs-literal">yes</span>
<span class="hljs-function">
@@ -381,53 +437,56 @@ extension source files in it and all subdirectories.</p>
</li>
<li id="section-10">
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Compile a single source script, containing the given code, according to the
requested options. If evaluating the script directly sets <code>__filename</code>,
requested options. If evaluating the script directly, set <code>__filename</code>,
<code>__dirname</code> and <code>module.filename</code> to be correct relative to the scripts path.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">compileScript</span> = <span class="hljs-params">(file, input, base = <span class="hljs-literal">null</span>)</span> -&gt;</span>
o = opts
options = compileOptions file, base
<span class="hljs-keyword">try</span>
t = task = {file, input, options}
task = {file, input, options}
CoffeeScript.emit <span class="hljs-string">'compile'</span>, task
<span class="hljs-keyword">if</span> o.tokens
printTokens CoffeeScript.tokens t.input, t.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.nodes
printLine CoffeeScript.nodes(t.input, t.options).toString().trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.run
<span class="hljs-keyword">if</span> opts.tokens
printTokens CoffeeScript.tokens task.input, task.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> opts.nodes
printLine CoffeeScript.nodes(task.input, task.options).toString().trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> opts.run
CoffeeScript.register()
CoffeeScript.eval opts.prelude, t.options <span class="hljs-keyword">if</span> opts.prelude
CoffeeScript.run t.input, t.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.join <span class="hljs-keyword">and</span> t.file <span class="hljs-keyword">isnt</span> o.join
t.input = helpers.invertLiterate t.input <span class="hljs-keyword">if</span> helpers.isLiterate file
sourceCode[sources.indexOf(t.file)] = t.input
CoffeeScript.eval opts.prelude, task.options <span class="hljs-keyword">if</span> opts.prelude
CoffeeScript.run task.input, task.options
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> opts.join <span class="hljs-keyword">and</span> task.file <span class="hljs-keyword">isnt</span> opts.join
task.input = helpers.invertLiterate task.input <span class="hljs-keyword">if</span> helpers.isLiterate file
sourceCode[sources.indexOf(task.file)] = task.input
compileJoin()
<span class="hljs-keyword">else</span>
compiled = CoffeeScript.compile t.input, t.options
t.output = compiled
<span class="hljs-keyword">if</span> o.map
t.output = compiled.js
t.sourceMap = compiled.v3SourceMap
compiled = CoffeeScript.compile task.input, task.options
task.output = compiled
<span class="hljs-keyword">if</span> opts.map
task.output = compiled.js
task.sourceMap = compiled.v3SourceMap
CoffeeScript.emit <span class="hljs-string">'success'</span>, task
<span class="hljs-keyword">if</span> o.<span class="hljs-built_in">print</span>
printLine t.output.trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> o.compile <span class="hljs-keyword">or</span> o.map
writeJs base, t.file, t.output, options.jsPath, t.sourceMap
<span class="hljs-keyword">if</span> opts.<span class="hljs-built_in">print</span>
printLine task.output.trim()
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> opts.compile <span class="hljs-keyword">or</span> opts.map
saveTo = <span class="hljs-keyword">if</span> opts.outputFilename <span class="hljs-keyword">and</span> sources.length <span class="hljs-keyword">is</span> <span class="hljs-number">1</span>
path.join opts.outputPath, opts.outputFilename
<span class="hljs-keyword">else</span>
options.jsPath
writeJs base, task.file, task.output, saveTo, task.sourceMap
<span class="hljs-keyword">catch</span> err
CoffeeScript.emit <span class="hljs-string">'failure'</span>, err, task
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> CoffeeScript.listeners(<span class="hljs-string">'failure'</span>).length
message = err?.stack <span class="hljs-keyword">or</span> <span class="hljs-string">"<span class="hljs-subst">#{err}</span>"</span>
<span class="hljs-keyword">if</span> o.watch
<span class="hljs-keyword">if</span> opts.watch
printLine message + <span class="hljs-string">'\x07'</span>
<span class="hljs-keyword">else</span>
printWarn message
@@ -436,11 +495,11 @@ requested options. If evaluating the script directly sets <code>__filename</code
</li>
<li id="section-11">
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>Attach the appropriate listeners to compile scripts incoming over <strong>stdin</strong>,
and write them back to <strong>stdout</strong>.</p>
@@ -458,11 +517,11 @@ and write them back to <strong>stdout</strong>.</p>
</li>
<li id="section-12">
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>If all of the source files are done being read, concatenate and compile
them together.</p>
@@ -480,11 +539,11 @@ them together.</p>
</li>
<li id="section-13">
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Watch a source CoffeeScript file using <code>fs.watch</code>, recompiling it every
time the file is updated. May be used in combination with other options,
@@ -540,11 +599,11 @@ such as <code>--print</code>.</p>
</li>
<li id="section-14">
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Watch a directory of files for new additions.</p>
@@ -591,11 +650,11 @@ such as <code>--print</code>.</p>
</li>
<li id="section-15">
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Remove a file from our source list, and source code cache. Optionally remove
the compiled JS version as well.</p>
@@ -620,11 +679,11 @@ the compiled JS version as well.</p>
</li>
<li id="section-16">
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Get the corresponding output JavaScript path for a source file.</p>
@@ -633,22 +692,22 @@ the compiled JS version as well.</p>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">outputPath</span> = <span class="hljs-params">(source, base, extension=<span class="hljs-string">".js"</span>)</span> -&gt;</span>
basename = helpers.baseFileName source, <span class="hljs-literal">yes</span>, useWinPathSep
srcDir = path.dirname source
<span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> opts.output
dir = srcDir
dir = <span class="hljs-keyword">unless</span> opts.outputPath
srcDir
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> source <span class="hljs-keyword">is</span> base
dir = opts.output
opts.outputPath
<span class="hljs-keyword">else</span>
dir = path.join opts.output, path.relative base, srcDir
path.join opts.outputPath, path.relative base, srcDir
path.join dir, basename + extension</pre></div></div>
</li>
<li id="section-17">
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>Recursively mkdir, like <code>mkdir -p</code>.</p>
@@ -670,11 +729,11 @@ the compiled JS version as well.</p>
</li>
<li id="section-18">
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Write out a JavaScript source file with the compiled code. By default, files
are written out in <code>cwd</code> as <code>.js</code> files with the same name, but the output
@@ -708,11 +767,11 @@ same directory as the <code>.js</code> file.</p>
</li>
<li id="section-19">
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Convenience for cleaner setTimeouts.</p>
@@ -723,11 +782,11 @@ same directory as the <code>.js</code> file.</p>
</li>
<li id="section-20">
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>When watching scripts, its useful to log changes with the timestamp.</p>
@@ -739,11 +798,11 @@ same directory as the <code>.js</code> file.</p>
</li>
<li id="section-21">
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Pretty-print a stream of tokens, sans location data.</p>
@@ -759,11 +818,11 @@ same directory as the <code>.js</code> file.</p>
</li>
<li id="section-22">
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Use the <a href="optparse.html">OptionParser module</a> to extract all options from
<code>process.argv</code> that are specified in <code>SWITCHES</code>.</p>
@@ -771,7 +830,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)
@@ -780,11 +838,11 @@ same directory as the <code>.js</code> file.</p>
</li>
<li id="section-23">
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>The compile-time options to pass to the CoffeeScript compiler.</p>
@@ -820,11 +878,11 @@ same directory as the <code>.js</code> file.</p>
</li>
<li id="section-24">
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Start up a new Node.js instance with the arguments in <code>--nodejs</code> passed to
the <code>node</code> binary, preserving the other options.</p>
@@ -839,16 +897,19 @@ the <code>node</code> binary, preserving the other options.</p>
cwd: process.cwd()
env: process.env
stdio: [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>]
<span class="hljs-keyword">for</span> signal <span class="hljs-keyword">in</span> [<span class="hljs-string">'SIGINT'</span>, <span class="hljs-string">'SIGTERM'</span>]
process.<span class="hljs-literal">on</span> signal, <span class="hljs-keyword">do</span> (signal) -&gt;
-&gt; p.kill signal
p.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function"><span class="hljs-params">(code)</span> -&gt;</span> process.exit code</pre></div></div>
</li>
<li id="section-25">
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Print the <code>--help</code> usage message and exit. Deprecated switches are not
shown.</p>
@@ -856,16 +917,16 @@ 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>
<li id="section-26">
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>Print the <code>--version</code> message and exit.</p>

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>
@@ -209,8 +209,8 @@ previous nonterminal.</p>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">o</span> = <span class="hljs-params">(patternString, action, options)</span> -&gt;</span>
patternString = patternString.replace <span class="hljs-regexp">/\s{2,}/g</span>, <span class="hljs-string">' '</span>
patternCount = patternString.split(<span class="hljs-string">' '</span>).length
<span class="hljs-keyword">return</span> [patternString, <span class="hljs-string">'$$ = $1;'</span>, options] <span class="hljs-keyword">unless</span> action
action = <span class="hljs-keyword">if</span> match = unwrap.exec action <span class="hljs-keyword">then</span> match[<span class="hljs-number">1</span>] <span class="hljs-keyword">else</span> <span class="hljs-string">"(<span class="hljs-subst">#{action}</span>())"</span></pre></div></div>
<span class="hljs-keyword">if</span> action
action = <span class="hljs-keyword">if</span> match = unwrap.exec action <span class="hljs-keyword">then</span> match[<span class="hljs-number">1</span>] <span class="hljs-keyword">else</span> <span class="hljs-string">"(<span class="hljs-subst">#{action}</span>())"</span></pre></div></div>
</li>
@@ -221,12 +221,12 @@ 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>
<div class="content"><div class='highlight'><pre> action = action.replace <span class="hljs-regexp">/\bnew /g</span>, <span class="hljs-string">'$&amp;yy.'</span>
action = action.replace <span class="hljs-regexp">/\b(?:Block\.wrap|extend)\b/g</span>, <span class="hljs-string">'yy.$&amp;'</span></pre></div></div>
<div class="content"><div class='highlight'><pre> action = action.replace <span class="hljs-regexp">/\bnew /g</span>, <span class="hljs-string">'$&amp;yy.'</span>
action = action.replace <span class="hljs-regexp">/\b(?:Block\.wrap|extend)\b/g</span>, <span class="hljs-string">'yy.$&amp;'</span></pre></div></div>
</li>
@@ -237,22 +237,23 @@ previous nonterminal.</p>
<div class="pilwrap ">
<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
just be passed through unaffected.</p>
<p>Returns strings of functions to add to <code>parser.js</code> which add extra data
that nodes may have, such as comments or location data. Location data
is added to the first parameter passed in, and the parameter is returned.
If the parameter is not a node, it will just be passed through unaffected.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">addLocationDataFn</span> = <span class="hljs-params">(first, last)</span> -&gt;</span>
<span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> last
<span class="hljs-string">"yy.addLocationDataFn(@<span class="hljs-subst">#{first}</span>)"</span>
<span class="hljs-keyword">else</span>
<span class="hljs-string">"yy.addLocationDataFn(@<span class="hljs-subst">#{first}</span>, @<span class="hljs-subst">#{last}</span>)"</span>
<div class="content"><div class='highlight'><pre><span class="hljs-function"> <span class="hljs-title">getAddDataToNodeFunctionString</span> = <span class="hljs-params">(first, last)</span> -&gt;</span>
<span class="hljs-string">"yy.addDataToNode(yy, @<span class="hljs-subst">#{first}</span><span class="hljs-subst">#{<span class="hljs-keyword">if</span> last <span class="hljs-keyword">then</span> <span class="hljs-string">", @<span class="hljs-subst">#{last}</span>"</span> <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>}</span>)"</span>
action = action.replace <span class="hljs-regexp">/LOC\(([0-9]*)\)/g</span>, addLocationDataFn(<span class="hljs-string">'$1'</span>)
action = action.replace <span class="hljs-regexp">/LOC\(([0-9]*),\s*([0-9]*)\)/g</span>, addLocationDataFn(<span class="hljs-string">'$1'</span>, <span class="hljs-string">'$2'</span>)
action = action.replace <span class="hljs-regexp">/LOC\(([0-9]*)\)/g</span>, getAddDataToNodeFunctionString(<span class="hljs-string">'$1'</span>)
action = action.replace <span class="hljs-regexp">/LOC\(([0-9]*),\s*([0-9]*)\)/g</span>, getAddDataToNodeFunctionString(<span class="hljs-string">'$1'</span>, <span class="hljs-string">'$2'</span>)
performActionFunctionString = <span class="hljs-string">"$$ = <span class="hljs-subst">#{getAddDataToNodeFunctionString(<span class="hljs-number">1</span>, patternCount)}</span>(<span class="hljs-subst">#{action}</span>);"</span>
<span class="hljs-keyword">else</span>
performActionFunctionString = <span class="hljs-string">'$$ = $1;'</span>
[patternString, <span class="hljs-string">"$$ = <span class="hljs-subst">#{addLocationDataFn(<span class="hljs-number">1</span>, patternCount)}</span>(<span class="hljs-subst">#{action}</span>);"</span>, options]</pre></div></div>
[patternString, performActionFunctionString, options]</pre></div></div>
</li>
@@ -292,7 +293,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>
@@ -380,7 +381,6 @@ grammar.</p>
<div class="content"><div class='highlight'><pre> Statement: [
o <span class="hljs-string">'Return'</span>
o <span class="hljs-string">'Comment'</span>
o <span class="hljs-string">'STATEMENT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> StatementLiteral $<span class="hljs-number">1</span>
o <span class="hljs-string">'Import'</span>
o <span class="hljs-string">'Export'</span>
@@ -404,7 +404,6 @@ them somewhat circular.</p>
<div class="content"><div class='highlight'><pre> Expression: [
o <span class="hljs-string">'Value'</span>
o <span class="hljs-string">'Invocation'</span>
o <span class="hljs-string">'Code'</span>
o <span class="hljs-string">'Operation'</span>
o <span class="hljs-string">'Assign'</span>
@@ -446,6 +445,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: [
@@ -499,11 +499,11 @@ through and printed to JavaScript.</p>
o <span class="hljs-string">'AlphaNumeric'</span>
o <span class="hljs-string">'JS'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> PassthroughLiteral $<span class="hljs-number">1</span>
o <span class="hljs-string">'Regex'</span>
o <span class="hljs-string">'UNDEFINED'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> UndefinedLiteral
o <span class="hljs-string">'NULL'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> NullLiteral
o <span class="hljs-string">'UNDEFINED'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> UndefinedLiteral $<span class="hljs-number">1</span>
o <span class="hljs-string">'NULL'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> NullLiteral $<span class="hljs-number">1</span>
o <span class="hljs-string">'BOOL'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> BooleanLiteral $<span class="hljs-number">1</span>
o <span class="hljs-string">'INFINITY'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> InfinityLiteral $<span class="hljs-number">1</span>
o <span class="hljs-string">'NAN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> NaNLiteral
o <span class="hljs-string">'NAN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> NaNLiteral $<span class="hljs-number">1</span>
]</pre></div></div>
</li>
@@ -541,6 +541,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 :
@@ -551,7 +552,6 @@ the ordinary <strong>Assign</strong> is that these allow numbers and strings as
o <span class="hljs-string">'SimpleObjAssignable =
INDENT Expression OUTDENT'</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">4</span>, <span class="hljs-literal">null</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">'Comment'</span>
]
SimpleObjAssignable: [
@@ -574,23 +574,36 @@ 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>A return statement from a function body.</p>
<p>Object literal spread properties.</p>
</div>
<div class="content"><div class='highlight'><pre> Return: [
o <span class="hljs-string">'RETURN Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Return $<span class="hljs-number">2</span>
o <span class="hljs-string">'RETURN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Return
<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">'... 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">2</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>
o <span class="hljs-string">'... ObjSpreadExpr'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Splat $<span class="hljs-number">2</span>
]
YieldReturn: [
o <span class="hljs-string">'YIELD RETURN Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> YieldReturn $<span class="hljs-number">3</span>
o <span class="hljs-string">'YIELD RETURN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> YieldReturn
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>, <span class="hljs-literal">no</span>, $<span class="hljs-number">1</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>
]
AwaitReturn: [
o <span class="hljs-string">'AWAIT RETURN Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> AwaitReturn $<span class="hljs-number">3</span>
o <span class="hljs-string">'AWAIT RETURN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> AwaitReturn
ObjSpreadIdentifier: [
o <span class="hljs-string">'SimpleObjAssignable ObjSpreadAccessor'</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">2</span>
o <span class="hljs-string">'ObjSpreadExpr ObjSpreadAccessor'</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">2</span>
]
ObjSpreadAccessor: [
o <span class="hljs-string">'. Property'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Access $<span class="hljs-number">2</span>
o <span class="hljs-string">'INDEX_START IndexValue INDEX_END'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">2</span>
]</pre></div></div>
</li>
@@ -602,12 +615,24 @@ the ordinary <strong>Assign</strong> is that these allow numbers and strings as
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>A block comment.</p>
<p>A return statement from a function body.</p>
</div>
<div class="content"><div class='highlight'><pre> Comment: [
o <span class="hljs-string">'HERECOMMENT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Comment $<span class="hljs-number">1</span>
<div class="content"><div class='highlight'><pre> Return: [
o <span class="hljs-string">'RETURN Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Return $<span class="hljs-number">2</span>
o <span class="hljs-string">'RETURN INDENT Object OUTDENT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Return <span class="hljs-keyword">new</span> Value $<span class="hljs-number">3</span>
o <span class="hljs-string">'RETURN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Return
]
YieldReturn: [
o <span class="hljs-string">'YIELD RETURN Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> YieldReturn $<span class="hljs-number">3</span>
o <span class="hljs-string">'YIELD RETURN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> YieldReturn
]
AwaitReturn: [
o <span class="hljs-string">'AWAIT RETURN Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> AwaitReturn $<span class="hljs-number">3</span>
o <span class="hljs-string">'AWAIT RETURN'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> AwaitReturn
]</pre></div></div>
</li>
@@ -644,8 +669,8 @@ functions, and <code>=&gt;</code> is for functions bound to the current value of
</div>
<div class="content"><div class='highlight'><pre> FuncGlyph: [
o <span class="hljs-string">'-&gt;'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-string">'func'</span>
o <span class="hljs-string">'=&gt;'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-string">'boundfunc'</span>
o <span class="hljs-string">'-&gt;'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> FuncGlyph $<span class="hljs-number">1</span>
o <span class="hljs-string">'=&gt;'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> FuncGlyph $<span class="hljs-number">1</span>
]</pre></div></div>
</li>
@@ -704,6 +729,7 @@ that hoovers up the remaining arguments.</p>
<div class="content"><div class='highlight'><pre> Param: [
o <span class="hljs-string">'ParamVar'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Param $<span class="hljs-number">1</span>
o <span class="hljs-string">'ParamVar ...'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Param $<span class="hljs-number">1</span>, <span class="hljs-literal">null</span>, <span class="hljs-literal">on</span>
o <span class="hljs-string">'... ParamVar'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Param $<span class="hljs-number">2</span>, <span class="hljs-literal">null</span>, <span class="hljs-literal">on</span>
o <span class="hljs-string">'ParamVar = Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Param $<span class="hljs-number">1</span>, $<span class="hljs-number">3</span>
o <span class="hljs-string">'...'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Expansion
]</pre></div></div>
@@ -743,6 +769,7 @@ that hoovers up the remaining arguments.</p>
<div class="content"><div class='highlight'><pre> Splat: [
o <span class="hljs-string">'Expression ...'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Splat $<span class="hljs-number">1</span>
o <span class="hljs-string">'... Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Splat $<span class="hljs-number">2</span>
]</pre></div></div>
</li>
@@ -761,7 +788,7 @@ that hoovers up the remaining arguments.</p>
<div class="content"><div class='highlight'><pre> SimpleAssignable: [
o <span class="hljs-string">'Identifier'</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">'Value Accessor'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">1.</span>add $<span class="hljs-number">2</span>
o <span class="hljs-string">'Invocation Accessor'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value $<span class="hljs-number">1</span>, [].concat $<span class="hljs-number">2</span>
o <span class="hljs-string">'Code Accessor'</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">2</span>
o <span class="hljs-string">'ThisProperty'</span>
]</pre></div></div>
@@ -803,8 +830,9 @@ as functions, indexed into, named as a class, etc.</p>
o <span class="hljs-string">'Literal'</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">'Parenthetical'</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">'Range'</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">'Invocation'</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">'This'</span>
o <span class="hljs-string">'Super'</span>
o <span class="hljs-string">'Super'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value $<span class="hljs-number">1</span>
]</pre></div></div>
</li>
@@ -821,8 +849,8 @@ as functions, indexed into, named as a class, etc.</p>
</div>
<div class="content"><div class='highlight'><pre> Super: [
o <span class="hljs-string">'SUPER . Property'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Super LOC(<span class="hljs-number">3</span>) <span class="hljs-keyword">new</span> Access $<span class="hljs-number">3</span>
o <span class="hljs-string">'SUPER INDEX_START Expression INDEX_END'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Super LOC(<span class="hljs-number">3</span>) <span class="hljs-keyword">new</span> Index $<span class="hljs-number">3</span>
o <span class="hljs-string">'SUPER . Property'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Super LOC(<span class="hljs-number">3</span>)(<span class="hljs-keyword">new</span> Access $<span class="hljs-number">3</span>), [], <span class="hljs-literal">no</span>, $<span class="hljs-number">1</span>
o <span class="hljs-string">'SUPER INDEX_START Expression INDEX_END'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Super LOC(<span class="hljs-number">3</span>)(<span class="hljs-keyword">new</span> Index $<span class="hljs-number">3</span>), [], <span class="hljs-literal">no</span>, $<span class="hljs-number">1</span>
]</pre></div></div>
</li>
@@ -863,7 +891,7 @@ or by array index or slice.</p>
<div class="content"><div class='highlight'><pre> Index: [
o <span class="hljs-string">'INDEX_START IndexValue INDEX_END'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">2</span>
o <span class="hljs-string">'INDEX_SOAK Index'</span>, <span class="hljs-function">-&gt;</span> extend $<span class="hljs-number">2</span>, soak : <span class="hljs-literal">yes</span>
o <span class="hljs-string">'INDEX_SOAK Index'</span>, <span class="hljs-function">-&gt;</span> extend $<span class="hljs-number">2</span>, soak: <span class="hljs-literal">yes</span>
]
IndexValue: [
@@ -1015,8 +1043,7 @@ and optional references to the superclass.</p>
<div class="content"><div class='highlight'><pre> Invocation: [
o <span class="hljs-string">'Value OptFuncExist String'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> TaggedTemplateCall $<span class="hljs-number">1</span>, $<span class="hljs-number">3</span>, $<span class="hljs-number">2</span>
o <span class="hljs-string">'Value OptFuncExist 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">3</span>, $<span class="hljs-number">2</span>
o <span class="hljs-string">'Invocation OptFuncExist 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">3</span>, $<span class="hljs-number">2</span>
o <span class="hljs-string">'SUPER OptFuncExist 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">3</span>, $<span class="hljs-number">2</span>
o <span class="hljs-string">'SUPER OptFuncExist 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">3</span>, $<span class="hljs-number">2</span>, $<span class="hljs-number">1</span>
]</pre></div></div>
</li>
@@ -1069,8 +1096,8 @@ and optional references to the superclass.</p>
</div>
<div class="content"><div class='highlight'><pre> This: [
o <span class="hljs-string">'THIS'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> ThisLiteral
o <span class="hljs-string">'@'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> ThisLiteral
o <span class="hljs-string">'THIS'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> ThisLiteral $<span class="hljs-number">1</span>
o <span class="hljs-string">'@'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> ThisLiteral $<span class="hljs-number">1</span>
]</pre></div></div>
</li>
@@ -1087,7 +1114,7 @@ and optional references to the superclass.</p>
</div>
<div class="content"><div class='highlight'><pre> ThisProperty: [
o <span class="hljs-string">'@ Property'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value LOC(<span class="hljs-number">1</span>)(<span class="hljs-keyword">new</span> ThisLiteral), [LOC(<span class="hljs-number">2</span>)(<span class="hljs-keyword">new</span> Access($<span class="hljs-number">2</span>))], <span class="hljs-string">'this'</span>
o <span class="hljs-string">'@ Property'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value LOC(<span class="hljs-number">1</span>)(<span class="hljs-keyword">new</span> ThisLiteral $<span class="hljs-number">1</span>), [LOC(<span class="hljs-number">2</span>)(<span class="hljs-keyword">new</span> Access($<span class="hljs-number">2</span>))], <span class="hljs-string">'this'</span>
]</pre></div></div>
</li>
@@ -1279,6 +1306,7 @@ having the newlines wouldnt make sense.</p>
<div class="content"><div class='highlight'><pre> Throw: [
o <span class="hljs-string">'THROW Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Throw $<span class="hljs-number">2</span>
o <span class="hljs-string">'THROW INDENT Object OUTDENT'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Throw <span class="hljs-keyword">new</span> Value $<span class="hljs-number">3</span>
]</pre></div></div>
</li>
@@ -1590,7 +1618,6 @@ 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>

View File

@@ -121,9 +121,6 @@ arrays, count characters, that sort of thing.</p>
</div>
<div class="content"><div class='highlight'><pre>
md = <span class="hljs-built_in">require</span>(<span class="hljs-string">'markdown-it'</span>)()</pre></div></div>
</li>
@@ -331,16 +328,38 @@ looking for a particular method in an options hash.</p>
<div class="pilwrap ">
<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.” Uses <a href="https://markdown-it.github.io/">MarkdownIt</a>
to tell the difference between Markdown and code blocks.</p>
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>
out = []
md.renderer.rules =</pre></div></div>
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>
@@ -351,27 +370,6 @@ to tell the difference between Markdown and code blocks.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Delete all other rules, since all we want are the code blocks.</p>
</div>
<div class="content"><div class='highlight'><pre> code_block: <span class="hljs-function"><span class="hljs-params">(tokens, idx, options, env, slf)</span> -&gt;</span>
startLine = tokens[idx].map[<span class="hljs-number">0</span>]
lines = tokens[idx].content.split <span class="hljs-string">'\n'</span>
<span class="hljs-keyword">for</span> line, i <span class="hljs-keyword">in</span> lines
out[startLine + i] = line
md.render code
out.join <span class="hljs-string">'\n'</span></pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#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>
@@ -384,7 +382,28 @@ If <code>last</code> is not provided, this will simply return <code>first</code>
first_line: first.first_line
first_column: first.first_column
last_line: last.last_line
last_column: last.last_column</pre></div></div>
last_column: last.last_column
<span class="hljs-function">
<span class="hljs-title">buildLocationHash</span> = <span class="hljs-params">(loc)</span> -&gt;</span>
<span class="hljs-string">"<span class="hljs-subst">#{loc.first_line}</span>x<span class="hljs-subst">#{loc.first_column}</span>-<span class="hljs-subst">#{loc.last_line}</span>x<span class="hljs-subst">#{loc.last_column}</span>"</span></pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<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.
The object is returned either way.</p>
</div>
<div class="content"><div class='highlight'><pre>exports.addDataToNode = <span class="hljs-function"><span class="hljs-params">(parserState, first, last)</span> -&gt;</span>
(obj) -&gt;</pre></div></div>
</li>
@@ -395,18 +414,12 @@ If <code>last</code> is not provided, this will simply return <code>first</code>
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#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.
The object is returned either way.</p>
<p>Add location data</p>
</div>
<div class="content"><div class='highlight'><pre>exports.addLocationDataFn = <span class="hljs-function"><span class="hljs-params">(first, last)</span> -&gt;</span>
(obj) -&gt;
<span class="hljs-keyword">if</span> ((<span class="hljs-keyword">typeof</span> obj) <span class="hljs-keyword">is</span> <span class="hljs-string">'object'</span>) <span class="hljs-keyword">and</span> (!!obj[<span class="hljs-string">'updateLocationDataIfMissing'</span>])
obj.updateLocationDataIfMissing buildLocationData(first, last)
<span class="hljs-keyword">return</span> obj</pre></div></div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> obj?.updateLocationDataIfMissing? <span class="hljs-keyword">and</span> first?
obj.updateLocationDataIfMissing buildLocationData(first, last)</pre></div></div>
</li>
@@ -417,6 +430,40 @@ The object is returned either way.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>Add comments data</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> parserState.tokenComments
parserState.tokenComments = {}
<span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> parserState.parser.tokens <span class="hljs-keyword">when</span> token.comments
tokenHash = buildLocationHash token[<span class="hljs-number">2</span>]
<span class="hljs-keyword">unless</span> parserState.tokenComments[tokenHash]?
parserState.tokenComments[tokenHash] = token.comments
<span class="hljs-keyword">else</span>
parserState.tokenComments[tokenHash].push token.comments...
<span class="hljs-keyword">if</span> obj.locationData?
objHash = buildLocationHash obj.locationData
<span class="hljs-keyword">if</span> parserState.tokenComments[objHash]?
attachCommentsToNode parserState.tokenComments[objHash], obj
obj
exports.attachCommentsToNode = attachCommentsToNode = <span class="hljs-function"><span class="hljs-params">(comments, node)</span> -&gt;</span>
<span class="hljs-keyword">return</span> <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> comments? <span class="hljs-keyword">or</span> comments.length <span class="hljs-keyword">is</span> <span class="hljs-number">0</span>
node.comments ?= []
node.comments.push comments...</pre></div></div>
</li>
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>Convert jison location data to a string.
<code>obj</code> can be a token, or a locationData.</p>
@@ -435,11 +482,11 @@ The object is returned either way.</p>
</li>
<li id="section-18">
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>A <code>.coffee.md</code> compatible version of <code>basename</code>, that returns the file sans-extension.</p>
@@ -458,11 +505,11 @@ The object is returned either way.</p>
</li>
<li id="section-19">
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>Determine if a filename represents a CoffeeScript file.</p>
@@ -473,11 +520,11 @@ The object is returned either way.</p>
</li>
<li id="section-20">
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Determine if a filename represents a Literate CoffeeScript file.</p>
@@ -488,11 +535,11 @@ The object is returned either way.</p>
</li>
<li id="section-21">
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Throws a SyntaxError from a given location.
The errors <code>toString</code> will return an error message following the “standard”
@@ -509,11 +556,11 @@ marker showing where the error is.</p>
</li>
<li id="section-22">
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
<a class="pilcrow" href="#section-23">&#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
@@ -528,11 +575,11 @@ compile CoffeeScript for example).</p>
</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>Update a compiler SyntaxError with source code information if it didnt have
it already.</p>
@@ -544,11 +591,11 @@ it already.</p>
</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>Avoid screwing up the <code>stack</code> property of other errors (i.e. possible bugs).</p>
@@ -574,11 +621,11 @@ it already.</p>
</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>Show only the first line on multi-line errors.</p>
@@ -590,11 +637,11 @@ it already.</p>
</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>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>
@@ -155,8 +157,8 @@ option) list, and all subsequent arguments are left unparsed.</p>
</div>
<div class="content"><div class='highlight'><pre> constructor: <span class="hljs-function"><span class="hljs-params">(rules, @banner)</span> -&gt;</span>
@rules = buildRules rules</pre></div></div>
<div class="content"><div class='highlight'><pre> constructor: <span class="hljs-function"><span class="hljs-params">(ruleDeclarations, @banner)</span> -&gt;</span>
@rules = buildRules ruleDeclarations</pre></div></div>
</li>
@@ -176,20 +178,7 @@ youre responsible for interpreting the options object.</p>
</div>
<div class="content"><div class='highlight'><pre> parse: <span class="hljs-function"><span class="hljs-params">(args)</span> -&gt;</span>
options = arguments: []
skippingArgument = <span class="hljs-literal">no</span>
originalArgs = args
args = normalizeArguments args
<span class="hljs-keyword">for</span> arg, i <span class="hljs-keyword">in</span> args
<span class="hljs-keyword">if</span> skippingArgument
skippingArgument = <span class="hljs-literal">no</span>
<span class="hljs-keyword">continue</span>
<span class="hljs-keyword">if</span> arg <span class="hljs-keyword">is</span> <span class="hljs-string">'--'</span>
pos = originalArgs.indexOf <span class="hljs-string">'--'</span>
options.arguments = options.arguments.concat originalArgs[(pos + <span class="hljs-number">1</span>)..]
<span class="hljs-keyword">break</span>
isOption = !!(arg.match(LONG_FLAG) <span class="hljs-keyword">or</span> arg.match(SHORT_FLAG))</pre></div></div>
<div class="content"><div class='highlight'><pre> parse: <span class="hljs-function"><span class="hljs-params">(args)</span> -&gt;</span></pre></div></div>
</li>
@@ -200,27 +189,18 @@ youre responsible for interpreting the options object.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-5">&#182;</a>
</div>
<p>the CS option parser is a little odd; options after the first
non-option argument are treated as non-option arguments themselves</p>
<p>The CoffeeScript option parser is a little odd; options after the first
non-option argument are treated as non-option arguments themselves.
Optional arguments are normalized by expanding merged flags into multiple
flags. This allows you to have <code>-wl</code> be the same as <code>--watch --lint</code>.
Note that executable scripts with a shebang (<code>#!</code>) line should use the
line <code>#!/usr/bin/env coffee</code>, or <code>#!/absolute/path/to/coffee</code>, without a
<code>--</code> argument after, because that will fail on Linux (see #3946).</p>
</div>
<div class="content"><div class='highlight'><pre> seenNonOptionArg = options.arguments.length &gt; <span class="hljs-number">0</span>
<span class="hljs-keyword">unless</span> seenNonOptionArg
matchedRule = <span class="hljs-literal">no</span>
<span class="hljs-keyword">for</span> rule <span class="hljs-keyword">in</span> @rules
<span class="hljs-keyword">if</span> rule.shortFlag <span class="hljs-keyword">is</span> arg <span class="hljs-keyword">or</span> rule.longFlag <span class="hljs-keyword">is</span> arg
value = <span class="hljs-literal">true</span>
<span class="hljs-keyword">if</span> rule.hasArgument
skippingArgument = <span class="hljs-literal">yes</span>
value = args[i + <span class="hljs-number">1</span>]
options[rule.name] = <span class="hljs-keyword">if</span> rule.isList <span class="hljs-keyword">then</span> (options[rule.name] <span class="hljs-keyword">or</span> []).concat value <span class="hljs-keyword">else</span> value
matchedRule = <span class="hljs-literal">yes</span>
<span class="hljs-keyword">break</span>
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"unrecognized option: <span class="hljs-subst">#{arg}</span>"</span> <span class="hljs-keyword">if</span> isOption <span class="hljs-keyword">and</span> <span class="hljs-keyword">not</span> matchedRule
<span class="hljs-keyword">if</span> seenNonOptionArg <span class="hljs-keyword">or</span> <span class="hljs-keyword">not</span> isOption
options.arguments.push arg
options</pre></div></div>
<div class="content"><div class='highlight'><pre> {rules, positional} = normalizeArguments args, @rules.flagDict
options = {}</pre></div></div>
</li>
@@ -231,20 +211,27 @@ non-option argument are treated as non-option arguments themselves</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-6">&#182;</a>
</div>
<p>Return the help text for this <strong>OptionParser</strong>, listing and describing all
of the valid options, for <code>--help</code> and such.</p>
<p>The <code>argument</code> field is added to the rule instance non-destructively by
<code>normalizeArguments</code>.</p>
</div>
<div class="content"><div class='highlight'><pre> help: <span class="hljs-function">-&gt;</span>
lines = []
lines.unshift <span class="hljs-string">"<span class="hljs-subst">#{@banner}</span>\n"</span> <span class="hljs-keyword">if</span> @banner
<span class="hljs-keyword">for</span> rule <span class="hljs-keyword">in</span> @rules
spaces = <span class="hljs-number">15</span> - rule.longFlag.length
spaces = <span class="hljs-keyword">if</span> spaces &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> repeat <span class="hljs-string">' '</span>, spaces <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
letPart = <span class="hljs-keyword">if</span> rule.shortFlag <span class="hljs-keyword">then</span> rule.shortFlag + <span class="hljs-string">', '</span> <span class="hljs-keyword">else</span> <span class="hljs-string">' '</span>
lines.push <span class="hljs-string">' '</span> + letPart + rule.longFlag + spaces + rule.description
<span class="hljs-string">"\n<span class="hljs-subst">#{ lines.join(<span class="hljs-string">'\n'</span>) }</span>\n"</span></pre></div></div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span> {hasArgument, argument, isList, name} <span class="hljs-keyword">in</span> rules
<span class="hljs-keyword">if</span> hasArgument
<span class="hljs-keyword">if</span> isList
options[name] ?= []
options[name].push argument
<span class="hljs-keyword">else</span>
options[name] = argument
<span class="hljs-keyword">else</span>
options[name] = <span class="hljs-literal">true</span>
<span class="hljs-keyword">if</span> positional[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'--'</span>
options.doubleDashed = <span class="hljs-literal">yes</span>
positional = positional[<span class="hljs-number">1.</span>.]
options.arguments = positional
options</pre></div></div>
</li>
@@ -255,10 +242,21 @@ of the valid options, for <code>--help</code> and such.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-7">&#182;</a>
</div>
<h2 id="helpers">Helpers</h2>
<p>Return the help text for this <strong>OptionParser</strong>, listing and describing all
of the valid options, for <code>--help</code> and such.</p>
</div>
<div class="content"><div class='highlight'><pre> help: <span class="hljs-function">-&gt;</span>
lines = []
lines.unshift <span class="hljs-string">"<span class="hljs-subst">#{@banner}</span>\n"</span> <span class="hljs-keyword">if</span> @banner
<span class="hljs-keyword">for</span> rule <span class="hljs-keyword">in</span> @rules.ruleList
spaces = <span class="hljs-number">15</span> - rule.longFlag.length
spaces = <span class="hljs-keyword">if</span> spaces &gt; <span class="hljs-number">0</span> <span class="hljs-keyword">then</span> repeat <span class="hljs-string">' '</span>, spaces <span class="hljs-keyword">else</span> <span class="hljs-string">''</span>
letPart = <span class="hljs-keyword">if</span> rule.shortFlag <span class="hljs-keyword">then</span> rule.shortFlag + <span class="hljs-string">', '</span> <span class="hljs-keyword">else</span> <span class="hljs-string">' '</span>
lines.push <span class="hljs-string">' '</span> + letPart + rule.longFlag + spaces + rule.description
<span class="hljs-string">"\n<span class="hljs-subst">#{ lines.join(<span class="hljs-string">'\n'</span>) }</span>\n"</span></pre></div></div>
</li>
@@ -268,7 +266,8 @@ of the valid options, for <code>--help</code> and such.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-8">&#182;</a>
</div>
<h2 id="helpers">Helpers</h2>
</div>
</li>
@@ -280,15 +279,9 @@ of the valid options, for <code>--help</code> and such.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Regex matchers for option flags.</p>
</div>
<div class="content"><div class='highlight'><pre>LONG_FLAG = <span class="hljs-regexp">/^(--\w[\w\-]*)/</span>
SHORT_FLAG = <span class="hljs-regexp">/^(-\w)$/</span>
MULTI_FLAG = <span class="hljs-regexp">/^-(\w{2,})/</span>
OPTIONAL = <span class="hljs-regexp">/\[(\w+(\*?))\]/</span></pre></div></div>
</li>
@@ -298,15 +291,13 @@ OPTIONAL = <span class="hljs-regexp">/\[(\w+(\*?))\]/</span></pre></div></div>
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Build and return the list of option rules. If the optional <em>short-flag</em> is
unspecified, leave it out by padding with <code>null</code>.</p>
<p>Regex matchers for option flags on the command line and their rules.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildRules</span> = <span class="hljs-params">(rules)</span> -&gt;</span>
<span class="hljs-keyword">for</span> tuple <span class="hljs-keyword">in</span> rules
tuple.unshift <span class="hljs-literal">null</span> <span class="hljs-keyword">if</span> tuple.length &lt; <span class="hljs-number">3</span>
buildRule tuple...</pre></div></div>
<div class="content"><div class='highlight'><pre>LONG_FLAG = <span class="hljs-regexp">/^(--\w[\w\-]*)/</span>
SHORT_FLAG = <span class="hljs-regexp">/^(-\w)$/</span>
MULTI_FLAG = <span class="hljs-regexp">/^-(\w{2,})/</span></pre></div></div>
</li>
@@ -317,22 +308,12 @@ unspecified, leave it out by padding with <code>null</code>.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Build a rule from a <code>-o</code> short flag, a <code>--output [DIR]</code> long flag, and the
description of what the option does.</p>
<p>Matches the long flag part of a rule for an option with an argument. Not
applied to anything in process.argv.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildRule</span> = <span class="hljs-params">(shortFlag, longFlag, description, options = {})</span> -&gt;</span>
match = longFlag.match(OPTIONAL)
longFlag = longFlag.match(LONG_FLAG)[<span class="hljs-number">1</span>]
{
name: longFlag.substr <span class="hljs-number">2</span>
shortFlag: shortFlag
longFlag: longFlag
description: description
hasArgument: !!(match <span class="hljs-keyword">and</span> match[<span class="hljs-number">1</span>])
isList: !!(match <span class="hljs-keyword">and</span> match[<span class="hljs-number">2</span>])
}</pre></div></div>
<div class="content"><div class='highlight'><pre>OPTIONAL = <span class="hljs-regexp">/\[(\w+(\*?))\]/</span></pre></div></div>
</li>
@@ -343,20 +324,156 @@ description of what the option does.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Normalize arguments by expanding merged flags into multiple flags. This allows
you to have <code>-wl</code> be the same as <code>--watch --lint</code>.</p>
<p>Build and return the list of option rules. If the optional <em>short-flag</em> is
unspecified, leave it out by padding with <code>null</code>.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">normalizeArguments</span> = <span class="hljs-params">(args)</span> -&gt;</span>
args = args[..]
result = []
<span class="hljs-keyword">for</span> arg <span class="hljs-keyword">in</span> args
<span class="hljs-keyword">if</span> match = arg.match MULTI_FLAG
result.push <span class="hljs-string">'-'</span> + l <span class="hljs-keyword">for</span> l <span class="hljs-keyword">in</span> match[<span class="hljs-number">1</span>].split <span class="hljs-string">''</span>
<span class="hljs-keyword">else</span>
result.push arg
result</pre></div></div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildRules</span> = <span class="hljs-params">(ruleDeclarations)</span> -&gt;</span>
ruleList = <span class="hljs-keyword">for</span> tuple <span class="hljs-keyword">in</span> ruleDeclarations
tuple.unshift <span class="hljs-literal">null</span> <span class="hljs-keyword">if</span> tuple.length &lt; <span class="hljs-number">3</span>
buildRule tuple...
flagDict = {}
<span class="hljs-keyword">for</span> rule <span class="hljs-keyword">in</span> ruleList</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p><code>shortFlag</code> is null if not provided in the rule.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span> flag <span class="hljs-keyword">in</span> [rule.shortFlag, rule.longFlag] <span class="hljs-keyword">when</span> flag?
<span class="hljs-keyword">if</span> flagDict[flag]?
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"flag <span class="hljs-subst">#{flag}</span> for switch <span class="hljs-subst">#{rule.name}</span>
was already declared for switch <span class="hljs-subst">#{flagDict[flag].name}</span>"</span>
flagDict[flag] = rule
{ruleList, flagDict}</pre></div></div>
</li>
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Build a rule from a <code>-o</code> short flag, a <code>--output [DIR]</code> long flag, and the
description of what the option does.</p>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-function"><span class="hljs-title">buildRule</span> = <span class="hljs-params">(shortFlag, longFlag, description)</span> -&gt;</span>
match = longFlag.match(OPTIONAL)
shortFlag = shortFlag?.match(SHORT_FLAG)[<span class="hljs-number">1</span>]
longFlag = longFlag.match(LONG_FLAG)[<span class="hljs-number">1</span>]
{
name: longFlag.replace <span class="hljs-regexp">/^--/</span>, <span class="hljs-string">''</span>
shortFlag: shortFlag
longFlag: longFlag
description: description
hasArgument: !!(match <span class="hljs-keyword">and</span> match[<span class="hljs-number">1</span>])
isList: !!(match <span class="hljs-keyword">and</span> match[<span class="hljs-number">2</span>])
}
<span class="hljs-function">
<span class="hljs-title">normalizeArguments</span> = <span class="hljs-params">(args, flagDict)</span> -&gt;</span>
rules = []
positional = []
needsArgOpt = <span class="hljs-literal">null</span>
<span class="hljs-keyword">for</span> arg, argIndex <span class="hljs-keyword">in</span> args</pre></div></div>
</li>
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>If the previous argument given to the script was an option that uses the
next command-line argument as its argument, create copy of the options
rule with an <code>argument</code> field.</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> needsArgOpt?
withArg = Object.assign {}, needsArgOpt.rule, {argument: arg}
rules.push withArg
needsArgOpt = <span class="hljs-literal">null</span>
<span class="hljs-keyword">continue</span>
multiFlags = arg.match(MULTI_FLAG)?[<span class="hljs-number">1</span>]
.split(<span class="hljs-string">''</span>)
.map (flagName) -&gt; <span class="hljs-string">"-<span class="hljs-subst">#{flagName}</span>"</span>
<span class="hljs-keyword">if</span> multiFlags?
multiOpts = multiFlags.map (flag) -&gt;
rule = flagDict[flag]
<span class="hljs-keyword">unless</span> rule?
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"unrecognized option <span class="hljs-subst">#{flag}</span> in multi-flag <span class="hljs-subst">#{arg}</span>"</span>
{rule, flag}</pre></div></div>
</li>
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Only the last flag in a multi-flag may have an argument.</p>
</div>
<div class="content"><div class='highlight'><pre> [innerOpts..., lastOpt] = multiOpts
<span class="hljs-keyword">for</span> {rule, flag} <span class="hljs-keyword">in</span> innerOpts
<span class="hljs-keyword">if</span> rule.hasArgument
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"cannot use option <span class="hljs-subst">#{flag}</span> in multi-flag <span class="hljs-subst">#{arg}</span> except
as the last option, because it needs an argument"</span>
rules.push rule
<span class="hljs-keyword">if</span> lastOpt.rule.hasArgument
needsArgOpt = lastOpt
<span class="hljs-keyword">else</span>
rules.push lastOpt.rule
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> ([LONG_FLAG, SHORT_FLAG].some (pat) -&gt; arg.match(pat)?)
singleRule = flagDict[arg]
<span class="hljs-keyword">unless</span> singleRule?
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"unrecognized option <span class="hljs-subst">#{arg}</span>"</span>
<span class="hljs-keyword">if</span> singleRule.hasArgument
needsArgOpt = {rule: singleRule, flag: arg}
<span class="hljs-keyword">else</span>
rules.push singleRule
<span class="hljs-keyword">else</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>This is a positional argument.</p>
</div>
<div class="content"><div class='highlight'><pre> positional = args[argIndex..]
<span class="hljs-keyword">break</span>
<span class="hljs-keyword">if</span> needsArgOpt?
<span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> Error <span class="hljs-string">"value required for <span class="hljs-subst">#{needsArgOpt.flag}</span>, but it was the last
argument provided"</span>
{rules, positional}</pre></div></div>
</li>

0
docs/v2/annotated-source/public/fonts/roboto-black.eot Executable file → Normal file
View File

0
docs/v2/annotated-source/public/fonts/roboto-black.ttf Executable file → Normal file
View File

View File

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,16 @@
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>
sawSIGINT = <span class="hljs-literal">no</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>
@@ -191,7 +195,7 @@ Unwrap that too.</p>
</div>
<div class="content"><div class='highlight'><pre> {Block, Assign, Value, Literal} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./nodes'</span>
<div class="content"><div class='highlight'><pre> {Block, Assign, Value, Literal, Call, Code} = <span class="hljs-built_in">require</span> <span class="hljs-string">'./nodes'</span>
<span class="hljs-keyword">try</span></pre></div></div>
@@ -223,9 +227,7 @@ Unwrap that too.</p>
</div>
<div class="content"><div class='highlight'><pre> referencedVars = (
token[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens <span class="hljs-keyword">when</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'IDENTIFIER'</span>
)</pre></div></div>
<div class="content"><div class='highlight'><pre> referencedVars = (token[<span class="hljs-number">1</span>] <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> tokens <span class="hljs-keyword">when</span> token[<span class="hljs-number">0</span>] <span class="hljs-keyword">is</span> <span class="hljs-string">'IDENTIFIER'</span>)</pre></div></div>
</li>
@@ -251,16 +253,11 @@ Unwrap that too.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-9">&#182;</a>
</div>
<p>Add assignment to <code>_</code> variable to force the input to be an expression.</p>
<p>Add assignment to <code>__</code> variable to force the input to be an expression.</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>
]
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
<span class="hljs-keyword">catch</span> err</pre></div></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>]</pre></div></div>
</li>
@@ -271,6 +268,60 @@ Unwrap that too.</p>
<div class="pilwrap ">
<a class="pilcrow" href="#section-10">&#182;</a>
</div>
<p>Wrap the expression in a closure to support top-level <code>await</code></p>
</div>
<div class="content"><div class='highlight'><pre> ast = <span class="hljs-keyword">new</span> Code [], ast
isAsync = ast.isAsync</pre></div></div>
</li>
<li id="section-11">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
</div>
<p>Invoke the wrapping closure</p>
</div>
<div class="content"><div class='highlight'><pre> ast = <span class="hljs-keyword">new</span> Block [<span class="hljs-keyword">new</span> Call ast]
js = ast.compile {bare: <span class="hljs-literal">yes</span>, locals: Object.keys(context), referencedVars, sharedScope: <span class="hljs-literal">yes</span>}
result = runInContext js, context, filename</pre></div></div>
</li>
<li id="section-12">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
</div>
<p>Await an async result, if necessary</p>
</div>
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> isAsync
result.<span class="hljs-keyword">then</span> (resolvedResult) -&gt;
cb <span class="hljs-literal">null</span>, resolvedResult <span class="hljs-keyword">unless</span> sawSIGINT
sawSIGINT = <span class="hljs-literal">no</span>
<span class="hljs-keyword">else</span>
cb <span class="hljs-literal">null</span>, result
<span class="hljs-keyword">catch</span> err</pre></div></div>
</li>
<li id="section-13">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
</div>
<p>ASTs <code>compile</code> does not add source code information to syntax errors.</p>
</div>
@@ -290,11 +341,11 @@ Unwrap that too.</p>
</li>
<li id="section-11">
<li id="section-14">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-11">&#182;</a>
<a class="pilcrow" href="#section-14">&#182;</a>
</div>
<p>Node 0.11.12 changed API, prompt is now _prompt.</p>
@@ -311,11 +362,11 @@ Unwrap that too.</p>
</li>
<li id="section-12">
<li id="section-15">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-12">&#182;</a>
<a class="pilcrow" href="#section-15">&#182;</a>
</div>
<p>Proxy nodes line listener</p>
@@ -336,11 +387,11 @@ Unwrap that too.</p>
</li>
<li id="section-13">
<li id="section-16">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-13">&#182;</a>
<a class="pilcrow" href="#section-16">&#182;</a>
</div>
<p>Handle Ctrl-v</p>
@@ -353,11 +404,11 @@ Unwrap that too.</p>
</li>
<li id="section-14">
<li id="section-17">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-14">&#182;</a>
<a class="pilcrow" href="#section-17">&#182;</a>
</div>
<p>allow arbitrarily switching between modes any time before multiple lines are entered</p>
@@ -372,11 +423,11 @@ Unwrap that too.</p>
</li>
<li id="section-15">
<li id="section-18">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-15">&#182;</a>
<a class="pilcrow" href="#section-18">&#182;</a>
</div>
<p>no-op unless the current line is empty</p>
@@ -387,11 +438,11 @@ Unwrap that too.</p>
</li>
<li id="section-16">
<li id="section-19">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-16">&#182;</a>
<a class="pilcrow" href="#section-19">&#182;</a>
</div>
<p>eval, print, loop</p>
@@ -406,11 +457,11 @@ Unwrap that too.</p>
</li>
<li id="section-17">
<li id="section-20">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-17">&#182;</a>
<a class="pilcrow" href="#section-20">&#182;</a>
</div>
<p>XXX: multiline hack</p>
@@ -428,11 +479,11 @@ Unwrap that too.</p>
</li>
<li id="section-18">
<li id="section-21">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-18">&#182;</a>
<a class="pilcrow" href="#section-21">&#182;</a>
</div>
<p>Store and load command history from a file</p>
@@ -445,11 +496,11 @@ Unwrap that too.</p>
</li>
<li id="section-19">
<li id="section-22">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-19">&#182;</a>
<a class="pilcrow" href="#section-22">&#182;</a>
</div>
<p>Get file info and at most maxSize of command history</p>
@@ -461,11 +512,11 @@ Unwrap that too.</p>
</li>
<li id="section-20">
<li id="section-23">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-20">&#182;</a>
<a class="pilcrow" href="#section-23">&#182;</a>
</div>
<p>Read last <code>size</code> bytes from the file</p>
@@ -479,11 +530,11 @@ Unwrap that too.</p>
</li>
<li id="section-21">
<li id="section-24">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-21">&#182;</a>
<a class="pilcrow" href="#section-24">&#182;</a>
</div>
<p>Set the history on the interpreter</p>
@@ -494,11 +545,11 @@ Unwrap that too.</p>
</li>
<li id="section-22">
<li id="section-25">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-22">&#182;</a>
<a class="pilcrow" href="#section-25">&#182;</a>
</div>
<p>If the history file was truncated we should pop off a potential partial line</p>
@@ -509,11 +560,11 @@ Unwrap that too.</p>
</li>
<li id="section-23">
<li id="section-26">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-23">&#182;</a>
<a class="pilcrow" href="#section-26">&#182;</a>
</div>
<p>Shift off the final blank newline</p>
@@ -531,29 +582,43 @@ Unwrap that too.</p>
</li>
<li id="section-24">
<li id="section-27">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-24">&#182;</a>
<a class="pilcrow" href="#section-27">&#182;</a>
</div>
<p>Save the latest command in the file</p>
</div>
<div class="content"><div class='highlight'><pre> fs.writeSync fd, <span class="hljs-string">"<span class="hljs-subst">#{code}</span>\n"</span>
lastLine = code
lastLine = code</pre></div></div>
</li>
<li id="section-28">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-28">&#182;</a>
</div>
<p>XXX: The SIGINT event from REPLServer is undocumented, so this is a bit fragile</p>
</div>
<div class="content"><div class='highlight'><pre> repl.<span class="hljs-literal">on</span> <span class="hljs-string">'SIGINT'</span>, <span class="hljs-function">-&gt;</span> sawSIGINT = <span class="hljs-literal">yes</span>
repl.<span class="hljs-literal">on</span> <span class="hljs-string">'exit'</span>, <span class="hljs-function">-&gt;</span> fs.closeSync fd</pre></div></div>
</li>
<li id="section-25">
<li id="section-29">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-25">&#182;</a>
<a class="pilcrow" href="#section-29">&#182;</a>
</div>
<p>Add a command to show the history stack</p>
@@ -570,11 +635,11 @@ Unwrap that too.</p>
</li>
<li id="section-26">
<li id="section-30">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-26">&#182;</a>
<a class="pilcrow" href="#section-30">&#182;</a>
</div>
<p>Node 0.11 changed API, a command such as .help is now stored as help</p>
@@ -585,7 +650,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>
@@ -603,11 +668,11 @@ Unwrap that too.</p>
</li>
<li id="section-27">
<li id="section-31">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-27">&#182;</a>
<a class="pilcrow" href="#section-31">&#182;</a>
</div>
<p>Adapt help inherited from the node REPL</p>

File diff suppressed because it is too large Load Diff

View File

@@ -370,11 +370,18 @@ column for the current line:</p>
</div>
<div class="content"><div class='highlight'><pre> v3 =
<div class="content"><div class='highlight'><pre> sources = <span class="hljs-keyword">if</span> options.sourceFiles
options.sourceFiles
<span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> options.filename
[options.filename]
<span class="hljs-keyword">else</span>
[<span class="hljs-string">'&lt;anonymous&gt;'</span>]
v3 =
version: <span class="hljs-number">3</span>
file: options.generatedFile <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>
sourceRoot: options.sourceRoot <span class="hljs-keyword">or</span> <span class="hljs-string">''</span>
sources: options.sourceFiles <span class="hljs-keyword">or</span> [<span class="hljs-string">''</span>]
sources: sources
names: []
mappings: buffer
@@ -406,7 +413,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

@@ -1,8 +1,10 @@
# Eat lunch.
eat = (food) -> "#{food} eaten."
eat food for food in ['toast', 'cheese', 'wine']
# Fine five course dining.
courses = ['greens', 'caviar', 'truffles', 'roast', 'cake']
menu = (i, dish) -> "Menu Item #{i}: #{dish}"
menu i + 1, dish for dish, i in courses
# Health conscious meal.

View File

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

View File

@@ -1,4 +0,0 @@
###
SkinnyMochaHalfCaffScript Compiler v1.0
Released under the MIT License
###

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

@@ -2,5 +2,5 @@ $ 'body'
.click (e) ->
$ '.box'
.fadeIn 'fast'
.addClass '.active'
.addClass 'show'
.css 'background', 'white'

View File

@@ -1 +1,7 @@
code = 2 * 617 # The code is 1234
###
Fortune Cookie Reader v1.0
Released under the MIT License
###
sayFortune = (fortune) ->
console.log fortune # in bed!

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

@@ -1,9 +1,6 @@
OPERATOR = /// ^ (
?: [-=]> # function
| [-+*/%<>&|^!?=]= # compound assign / compare
| >>>=? # zero-fill right shift
| ([-+:])\1 # doubles
| ([&|<>])\2=? # logic / shift
| \?\. # soak access
| \.{2,3} # range or splat
) ///
NUMBER = ///
^ 0b[01]+ | # binary
^ 0o[0-7]+ | # octal
^ 0x[\da-f]+ | # hex
^ \d*\.?\d+ (?:e[+-]?\d+)? # decimal
///i

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

@@ -0,0 +1,4 @@
# @flow
fn = (str ###: string ###, num ###: number ###) ###: string ### ->
str + num

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,142 +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.
<section id="breaking-changes-default-values">
### 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')
```
</section>
<section id="breaking-changes-bound-generator-functions">
### 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')
```
</section>
<section id="breaking-changes-classes">
### 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
```
</section>
<section id="breaking-changes-bare-super">
### 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')
```
</section>
<section id="breaking-changes-super-in-non-class-methods">
### `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')
```
</section>
<section id="breaking-changes-dynamic-class-keys-exclude-executable-class-scope">
### 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`
```
</section>
<section id="breaking-changes-literate-coffeescript">
### Literate CoffeeScript now parsed by a Markdown library
The CoffeeScript 1.x implementation of Literate CoffeeScript relies on indentation to tell apart code blocks from documentation, and as such it can get confused by Markdown features that also use indentation like lists. In CoffeeScript 2 this has been refactored to now use [Markdown-It](https://github.com/markdown-it/markdown-it) to detect Markdown sections rather than just looking at indentation. The only significant difference is that now if you want to include a code block in documentation, as opposed to the compiler recognizing that code block as code, it must have at least one line fully unindented. Wrapping it in HTML tags is no longer sufficient.
Code blocks interspersed with lists may need to be refactored. In general, code blocks should be separated by a blank line between documentation, and should 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.

View File

@@ -0,0 +1,34 @@
### Argument parsing and shebang (`#!`) lines
In CoffeeScript 1.x, `--` was required after the path and filename of the script to be run, but before any arguments passed to that script. This convention is now deprecated. So instead of:
```bash
coffee [options] path/to/script.coffee -- [args]
```
Now you would just type:
```bash
coffee [options] path/to/script.coffee [args]
```
The deprecated version will still work, but it will print a warning before running the script.
On non-Windows platforms, a `.coffee` file can be made executable by adding a shebang (`#!`) line at the top of the file and marking the file as executable. For example:
```coffee
#!/usr/bin/env coffee
x = 2 + 2
console.log x
```
If this were saved as `executable.coffee`, it could be made executable and run:
```bash
▶ chmod +x ./executable.coffee
▶ ./executable.coffee
4
```
In CoffeeScript 1.x, this used to fail when trying to pass arguments to the script. Some users on OS X worked around the problem by using `#!/usr/bin/env coffee --` as the first line of the file. That didnt work on Linux, however, which cannot parse shebang lines with more than a single argument. While such scripts will still run on OS X, CoffeeScript will now display a warning before compiling or evaluating files that begin with a too-long shebang line. Now that CoffeeScript 2 supports passing arguments without needing `--`, we recommend simply changing the shebang lines in such scripts to just `#!/usr/bin/env coffee`.

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 accommodated 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

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

View File

@@ -1,4 +1,82 @@
## Change Log
## Changelog
```
releaseHeader('2017-09-02', '2.0.0-beta5', '2.0.0-beta4')
```
* Node 6 is now supported, and we will try to maintain that as the minimum required version for CoffeeScript 2 via the `coffee` command or Node API. Older versions of Node, or non-evergreen browsers, can compile via the [browser compiler](./browser-compiler/coffeescript.js).
* The command line `--output` flag now allows you to specify an output filename, not just an output folder.
* The command line `--require` flag now properly handles filenames or module names that are invalid identifiers (like an NPM module with a hyphen in the name).
* `Object.assign`, output when object destructuring is used, is polyfilled using the same polyfill that Babel outputs. This means that polyfills shouldnt be required unless support for Internet Explorer 8 or below is desired (or your own code uses a feature that requires a polyfill). See [ES2015+ Output](#es2015plus-output).
* A string or JSX interpolation that contains only a comment (`"a#{### comment ###}b"` or `<div>{### comment ###}</div>`) is now output (`` `a${/* comment */}b` ``)
* Interpolated strings (ES2015 template literals) that contain quotation marks no longer have the quotation marks escaped: `` `say "${message}"` ``
* It is now possible to chain after a function literal (for example, to define a function and then call `.call` on it).
* The results of the async tests are included in the output when you run `cake test`.
* Bugfixes for object destructuring; expansions in function parameters; generated reference variables in function parameters; chained functions after `do`; splats after existential operator soaks in arrays (`[a?.b...]`); trailing `if` with splat in arrays or function parameters (`[a if b...]`); attempting to `throw` an `if`, `for`, `switch`, `while` or other invalid construct.
* Bugfixes for syntactical edge cases: semicolons after `=` and other “mid-expression” tokens; spaces after `::`; and scripts that begin with `:` or `*`.
* Bugfixes for source maps generated via the Node API; and stack trace line numbers when compiling CoffeeScript via the Node API from within a `.coffee` file.
```
releaseHeader('2017-08-03', '2.0.0-beta4', '2.0.0-beta3')
```
* This release includes [all the changes from 1.12.6 to 1.12.7](#1.12.7).
* [Line comments](#comments) (starting with `#`) are now output in the generated JavaScript.
* [Block comments](#comments) (delimited by `###`) are now allowed anywhere, including inline where they previously werent possible. This provides support for [static type annotations](#type-annotations) using Flows comments-based syntax.
* Spread syntax (`...` for objects) is now supported in JSX tags: `<div {props...} />`.
* Argument parsing for scripts run via `coffee` is improved. See [breaking changes](#breaking-changes-argument-parsing-and-shebang-lines).
* CLI: Propagate `SIGINT` and `SIGTERM` signals when node is forked.
* `await` in the REPL is now allowed without requiring a wrapper function.
* `do super` is now allowed, and other accesses of `super` like `super.x.y` or `super['x'].y` now work.
* Splat/spread syntax triple dots are now allowed on either the left or the right (so `props...` or `...props` are both valid).
* Tagged template literals are recognized as callable functions.
* Bugfixes for object spread syntax in nested properties.
* Bugfixes for destructured function parameter default values.
```
releaseHeader('2017-07-16', '1.12.7', '1.12.6')
```
* Fix regressions in 1.12.6 related to chained function calls and indented `return` and `throw` arguments.
* The REPL no longer warns about assigning to `_`.
```
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')
@@ -206,11 +284,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.
@@ -241,7 +314,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.
@@ -348,7 +421,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`.
@@ -428,7 +501,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')
@@ -447,7 +520,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')
@@ -524,7 +597,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')
@@ -542,7 +615,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,21 +1,17 @@
## CoffeeScript 2
### Why CoffeeScript When Theres ES2015+?
### Whats New In CoffeeScript 2?
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](#modules) (`import` and `export` statements) and [JSX](#jsx), 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 a cleaner, terser syntax that uses less punctuation and enforces indentation, to make code easier to read and reason about. Increased clarity leads to increased quality, and fewer bugs. This benefit of CoffeeScript remains, even in an ES2015+ world.
### ES2015+ Output
CoffeeScript 2 supports many of the latest ES2015+ features, output using 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 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).
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 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 -p *.coffee | babel --presets env > app.js
```
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

@@ -0,0 +1,37 @@
### Command Line
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:
| 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:
* Compile a directory tree of `.coffee` files in `src` into a parallel tree of `.js` files in `lib`:<br>
`coffee --compile --output lib/ src/`
* Watch a file for changes, and recompile it every time the file is saved:<br>
`coffee --watch --compile experimental.coffee`
* Concatenate a list of files into a single script:<br>
`coffee --join project.js --compile src/*.coffee`
* Print out the compiled JS from a one-liner:<br>
`coffee -bpe "alert i for i in [0..10]"`
* All together now, watch and recompile an entire project as you work on it:<br>
`coffee -o lib/ -cw src/`
* Start the CoffeeScript REPL (`Ctrl-D` to exit, `Ctrl-V`for multi-line):<br>
`coffee`

View File

@@ -1,13 +1,9 @@
## Comments
In CoffeeScript, comments are denoted by the `#` character. Everything from a `#` to the end of the line is ignored by the compiler, and will be excluded from the JavaScript output.
In CoffeeScript, comments are denoted by the `#` character to the end of a line, or from `###` to the next appearance of `###`. Comments are ignored by the compiler, though the compiler makes its best effort at reinserting your comments into the output JavaScript after compilation.
```
codeFor('comment')
```
Sometimes youd like to pass a block comment through to the generated JavaScript. For example, when you need to embed a licensing header at the top of a file. Block comments, which mirror the syntax for block strings, are preserved in the generated output.
```
codeFor('block_comment')
```
Inline `###` comments make [type annotations](#type-annotations) possible.

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

@@ -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

@@ -0,0 +1,15 @@
### 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
```
Note that [babel-preset-env](https://babeljs.io/docs/plugins/preset-env/) doesnt automatically supply polyfills for your code. CoffeeScript itself will output [`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) if you use the `in` operator, or destructuring or spread/rest syntax; and [`Function.bind`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) if you use a bound (`=>`) method in a class. Both are supported in Internet Explorer 9+ and all more recent browsers, but you will need to supply polyfills if you need to support Internet Explorer 8 or below and are using features that would cause these methods to be output, or in your own code are using similarly modern methods. One option is [`babel-polyfill`](https://babeljs.io/docs/usage/polyfill/), though there are many [other](https://hackernoon.com/polyfills-everything-you-ever-wanted-to-know-or-maybe-a-bit-less-7c8de164e423) [strategies](https://philipwalton.com/articles/loading-polyfills-only-when-needed/).

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/):
```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:
```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,7 +2,7 @@
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 %>)
```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; regular `.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

@@ -0,0 +1,25 @@
### 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. It can include a path (relative or absolute).
* `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

@@ -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')
@@ -34,8 +36,9 @@ All together now:
| `true`, `yes`, `on` | `true` |
| `false`, `no`, `off`&emsp; | `false` |
| `@`, `this` | `this` |
| `of` | `in` |
| `in` | _no JS equivalent_ |
| `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` |

View File

@@ -1,6 +1,6 @@
## Overview
_CoffeeScript on the <span class="hidden-md-up">top</span><span class="hidden-sm-down">left</span>, compiled JavaScript output on the <span class="hidden-md-up">bottom</span><span class="hidden-sm-down">right</span>. The CoffeeScript is editable!_
_CoffeeScript on the <span class="d-md-none">top</span><span class="d-none d-md-inline">left</span>, compiled JavaScript output on the <span class="d-md-none">bottom</span><span class="d-none d-md-inline">right</span>. The CoffeeScript is editable!_
```
codeFor('overview', 'cubes', false)

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,17 @@
## Type Annotations
Static type checking can be achieved in CoffeeScript by using [Flow](https://flow.org/)s [Comment Types syntax](https://flow.org/en/docs/types/comments/):
```
codeFor('type_annotations')
```
CoffeeScript does not do any type checking itself; the JavaScript output you see above needs to get passed to Flow for it to validate your code. We expect most people will use a [build tool](#es2015plus-output) for this, but heres how to do it the simplest way possible using the [CoffeeScript](#cli) and [Flow](https://flow.org/en/docs/usage/) command-line tools, assuming youve already [installed Flow](https://flow.org/en/docs/install/) and the [latest CoffeeScript](#installation) in your project folder:
```bash
coffee --bare --no-header --compile app.coffee && npm run flow
```
`--bare` and `--no-header` are important because Flow requires the first line of the file to be the comment `// @flow`. If you configure your build chain to compile CoffeeScript and pass the result to Flow in-memory, you can get better performance than this example; and a proper build tool should be able to watch your CoffeeScript files and recompile and type-check them for you on save.
If you know of another way to achieve static type checking with CoffeeScript, please [create an issue](https://github.com/jashkenas/coffeescript/issues/new) and let us know.

View File

@@ -1,34 +1,3 @@
## Unsupported ECMAScript Features
There are a few ECMAScript features that CoffeeScript intentionally doesnt support.
<section id="unsupported-let-const">
### `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
```
</section>
<section id="unsupported-get-set">
### `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')
```
</section>

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')
```

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