ngmin-rails 0.3.8.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -0
- data/lib/ngmin/rails/version.rb +1 -1
- data/vendor/ngmin.js +1171 -1361
- metadata +19 -5
- checksums.yaml +0 -7
data/README.md
CHANGED
@@ -21,6 +21,13 @@ Versioning
|
|
21
21
|
|
22
22
|
The ngmin-rails version number mirrors the version number for the version of ngmin that is bundled with it.
|
23
23
|
|
24
|
+
Help
|
25
|
+
----
|
26
|
+
|
27
|
+
* **Q**: I installed ngmin-rails, but my assets aren't getting processed with ngmin.
|
28
|
+
|
29
|
+
**A:** Remember to delete `tmp/cache/assets` or `touch` all the related asset files so that the cached versions get regenerated. If you've precompiled your assets into `public/assets`, you'll need to re-precompile them.
|
30
|
+
|
24
31
|
Hacking
|
25
32
|
-------
|
26
33
|
|
data/lib/ngmin/rails/version.rb
CHANGED
data/vendor/ngmin.js
CHANGED
@@ -2,21 +2,20 @@
|
|
2
2
|
|
3
3
|
var esprima = require('esprima'),
|
4
4
|
escodegen = require('escodegen'),
|
5
|
-
|
6
|
-
|
5
|
+
astral = require('astral')();
|
6
|
+
|
7
|
+
// register angular annotator in astral
|
8
|
+
require('astral-angular-annotate')(astral);
|
7
9
|
|
8
|
-
/*
|
9
|
-
* Given a JavaScript string, annotate the injectable AngularJS module methods
|
10
|
-
*/
|
11
10
|
window.annotate = exports.annotate = function (inputCode) {
|
12
|
-
|
11
|
+
|
12
|
+
var ast = esprima.parse(inputCode, {
|
13
13
|
tolerant: true
|
14
14
|
});
|
15
15
|
|
16
|
-
|
17
|
-
annotateAST(syntax);
|
16
|
+
astral.run(ast);
|
18
17
|
|
19
|
-
var generatedCode = escodegen.generate(
|
18
|
+
var generatedCode = escodegen.generate(ast, {
|
20
19
|
format: {
|
21
20
|
indent: {
|
22
21
|
style: ' '
|
@@ -27,7 +26,7 @@ window.annotate = exports.annotate = function (inputCode) {
|
|
27
26
|
return generatedCode;
|
28
27
|
};
|
29
28
|
|
30
|
-
},{"
|
29
|
+
},{"esprima":2,"escodegen":3,"astral":4,"astral-angular-annotate":5}],2:[function(require,module,exports){
|
31
30
|
(function(){/*
|
32
31
|
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
|
33
32
|
Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
|
@@ -3938,565 +3937,262 @@ parseStatement: true, parseSourceElement: true */
|
|
3938
3937
|
/* vim: set sw=4 ts=4 et tw=80 : */
|
3939
3938
|
|
3940
3939
|
})()
|
3940
|
+
},{}],5:[function(require,module,exports){
|
3941
|
+
|
3942
|
+
// expose each individual pass
|
3943
|
+
var markPass = exports.mark = require('./passes/mark');
|
3944
|
+
var refPass = exports.ref = require('./passes/ref');
|
3945
|
+
var annotatorPass = exports.annotator = require('./passes/annotator');
|
3946
|
+
|
3947
|
+
var pdoAnnotatorPass = exports.pdo = require('./passes/pdo');
|
3948
|
+
var ddoAnnotatorPass = exports.ddo = require('./passes/ddo');
|
3949
|
+
|
3950
|
+
// expose a convenience function to register all of the passes
|
3951
|
+
module.exports = function (astral) {
|
3952
|
+
[
|
3953
|
+
markPass,
|
3954
|
+
annotatorPass,
|
3955
|
+
refPass,
|
3956
|
+
pdoAnnotatorPass,
|
3957
|
+
ddoAnnotatorPass
|
3958
|
+
].forEach(function (pass) {
|
3959
|
+
astral.register(pass);
|
3960
|
+
});
|
3961
|
+
};
|
3962
|
+
|
3963
|
+
},{"./passes/mark":6,"./passes/ref":7,"./passes/annotator":8,"./passes/pdo":9,"./passes/ddo":10}],11:[function(require,module,exports){
|
3964
|
+
module.exports={
|
3965
|
+
"name": "escodegen",
|
3966
|
+
"description": "ECMAScript code generator",
|
3967
|
+
"homepage": "http://github.com/Constellation/escodegen.html",
|
3968
|
+
"main": "escodegen.js",
|
3969
|
+
"bin": {
|
3970
|
+
"esgenerate": "./bin/esgenerate.js",
|
3971
|
+
"escodegen": "./bin/escodegen.js"
|
3972
|
+
},
|
3973
|
+
"version": "0.0.23",
|
3974
|
+
"engines": {
|
3975
|
+
"node": ">=0.4.0"
|
3976
|
+
},
|
3977
|
+
"maintainers": [
|
3978
|
+
{
|
3979
|
+
"name": "Yusuke Suzuki",
|
3980
|
+
"email": "utatane.tea@gmail.com",
|
3981
|
+
"url": "http://github.com/Constellation"
|
3982
|
+
}
|
3983
|
+
],
|
3984
|
+
"repository": {
|
3985
|
+
"type": "git",
|
3986
|
+
"url": "http://github.com/Constellation/escodegen.git"
|
3987
|
+
},
|
3988
|
+
"dependencies": {
|
3989
|
+
"esprima": "~1.0.2",
|
3990
|
+
"estraverse": "~0.0.4",
|
3991
|
+
"source-map": ">= 0.1.2"
|
3992
|
+
},
|
3993
|
+
"optionalDependencies": {
|
3994
|
+
"source-map": ">= 0.1.2"
|
3995
|
+
},
|
3996
|
+
"devDependencies": {
|
3997
|
+
"esprima-moz": "*",
|
3998
|
+
"browserify": "*",
|
3999
|
+
"q": "*",
|
4000
|
+
"bower": "*",
|
4001
|
+
"semver": "*"
|
4002
|
+
},
|
4003
|
+
"licenses": [
|
4004
|
+
{
|
4005
|
+
"type": "BSD",
|
4006
|
+
"url": "http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD"
|
4007
|
+
}
|
4008
|
+
],
|
4009
|
+
"scripts": {
|
4010
|
+
"test": "node test/run.js",
|
4011
|
+
"release": "node tools/release.js",
|
4012
|
+
"build": "(echo '// Generated by browserify'; ./node_modules/.bin/browserify -i source-map tools/entry-point.js) > escodegen.browser.js"
|
4013
|
+
},
|
4014
|
+
"readme": "Escodegen ([escodegen](http://github.com/Constellation/escodegen)) is\n[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\n(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript))\ncode generator from [Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) AST.\nSee [online generator demo](http://constellation.github.com/escodegen/demo/index.html).\n\n\n### Install\n\nEscodegen can be used in a web browser:\n\n <script src=\"escodegen.browser.js\"></script>\n\nor in a Node.js application via the package manager:\n\n npm install escodegen\n\n\n### Usage\n\nA simple example: the program\n\n escodegen.generate({\n type: 'BinaryExpression',\n operator: '+',\n left: { type: 'Literal', value: 40 },\n right: { type: 'Literal', value: 2 }\n });\n\nproduces the string `'40 + 2'`\n\nSee the [API page](https://github.com/Constellation/escodegen/wiki/API) for\noptions. To run the tests, execute `npm test` in the root directory.\n\n\n### License\n\n#### Escodegen\n\nCopyright (C) 2012 [Yusuke Suzuki](http://github.com/Constellation)\n (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#### source-map\n\nSourceNodeMocks has a limited interface of mozilla/source-map SourceNode implementations.\n\nCopyright (c) 2009-2011, Mozilla Foundation and contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the names of the Mozilla Foundation nor the names of project\n contributors may be used to endorse or promote products derived from this\n software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n### Status\n\n[![Build Status](https://secure.travis-ci.org/Constellation/escodegen.png)](http://travis-ci.org/Constellation/escodegen)\n",
|
4015
|
+
"readmeFilename": "README.md",
|
4016
|
+
"bugs": {
|
4017
|
+
"url": "https://github.com/Constellation/escodegen/issues"
|
4018
|
+
},
|
4019
|
+
"_id": "escodegen@0.0.23",
|
4020
|
+
"dist": {
|
4021
|
+
"shasum": "f5534e3bf8f9ceb67b09975e68625a04e4b88291"
|
4022
|
+
},
|
4023
|
+
"_from": "escodegen@~0.0.15",
|
4024
|
+
"_resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.23.tgz"
|
4025
|
+
}
|
4026
|
+
|
3941
4027
|
},{}],3:[function(require,module,exports){
|
4028
|
+
(function(global){/*
|
4029
|
+
Copyright (C) 2012 Michael Ficarra <escodegen.copyright@michael.ficarra.me>
|
4030
|
+
Copyright (C) 2012 Robert Gust-Bardon <donate@robert.gust-bardon.org>
|
4031
|
+
Copyright (C) 2012 John Freeman <jfreeman08@gmail.com>
|
4032
|
+
Copyright (C) 2011-2012 Ariya Hidayat <ariya.hidayat@gmail.com>
|
4033
|
+
Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
|
4034
|
+
Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
|
4035
|
+
Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
|
4036
|
+
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
4037
|
+
Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
|
3942
4038
|
|
3943
|
-
|
3944
|
-
|
4039
|
+
Redistribution and use in source and binary forms, with or without
|
4040
|
+
modification, are permitted provided that the following conditions are met:
|
3945
4041
|
|
4042
|
+
* Redistributions of source code must retain the above copyright
|
4043
|
+
notice, this list of conditions and the following disclaimer.
|
4044
|
+
* Redistributions in binary form must reproduce the above copyright
|
4045
|
+
notice, this list of conditions and the following disclaimer in the
|
4046
|
+
documentation and/or other materials provided with the distribution.
|
3946
4047
|
|
3947
|
-
|
3948
|
-
|
4048
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
4049
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
4050
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
4051
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
4052
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
4053
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
4054
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
4055
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
4056
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
4057
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
4058
|
+
*/
|
3949
4059
|
|
4060
|
+
/*jslint bitwise:true */
|
4061
|
+
/*global escodegen:true, exports:true, generateStatement:true, generateExpression:true, generateFunctionBody:true, process:true, require:true, define:true, global:true*/
|
4062
|
+
(function () {
|
4063
|
+
'use strict';
|
3950
4064
|
|
3951
|
-
|
3952
|
-
|
3953
|
-
|
3954
|
-
|
4065
|
+
var Syntax,
|
4066
|
+
Precedence,
|
4067
|
+
BinaryPrecedence,
|
4068
|
+
Regex,
|
4069
|
+
VisitorKeys,
|
4070
|
+
VisitorOption,
|
4071
|
+
SourceNode,
|
4072
|
+
isArray,
|
4073
|
+
base,
|
4074
|
+
indent,
|
4075
|
+
json,
|
4076
|
+
renumber,
|
4077
|
+
hexadecimal,
|
4078
|
+
quotes,
|
4079
|
+
escapeless,
|
4080
|
+
newline,
|
4081
|
+
space,
|
4082
|
+
parentheses,
|
4083
|
+
semicolons,
|
4084
|
+
safeConcatenation,
|
4085
|
+
directive,
|
4086
|
+
extra,
|
4087
|
+
parse,
|
4088
|
+
sourceMap,
|
4089
|
+
traverse;
|
3955
4090
|
|
3956
|
-
|
3957
|
-
deepApply(syntax, signatures, function (chunk) {
|
3958
|
-
var originalFn,
|
3959
|
-
newParam,
|
3960
|
-
type;
|
4091
|
+
traverse = require('estraverse').traverse;
|
3961
4092
|
|
3962
|
-
|
3963
|
-
|
3964
|
-
|
3965
|
-
|
4093
|
+
Syntax = {
|
4094
|
+
AssignmentExpression: 'AssignmentExpression',
|
4095
|
+
ArrayExpression: 'ArrayExpression',
|
4096
|
+
ArrayPattern: 'ArrayPattern',
|
4097
|
+
BlockStatement: 'BlockStatement',
|
4098
|
+
BinaryExpression: 'BinaryExpression',
|
4099
|
+
BreakStatement: 'BreakStatement',
|
4100
|
+
CallExpression: 'CallExpression',
|
4101
|
+
CatchClause: 'CatchClause',
|
4102
|
+
ComprehensionBlock: 'ComprehensionBlock',
|
4103
|
+
ComprehensionExpression: 'ComprehensionExpression',
|
4104
|
+
ConditionalExpression: 'ConditionalExpression',
|
4105
|
+
ContinueStatement: 'ContinueStatement',
|
4106
|
+
DirectiveStatement: 'DirectiveStatement',
|
4107
|
+
DoWhileStatement: 'DoWhileStatement',
|
4108
|
+
DebuggerStatement: 'DebuggerStatement',
|
4109
|
+
EmptyStatement: 'EmptyStatement',
|
4110
|
+
ExpressionStatement: 'ExpressionStatement',
|
4111
|
+
ForStatement: 'ForStatement',
|
4112
|
+
ForInStatement: 'ForInStatement',
|
4113
|
+
FunctionDeclaration: 'FunctionDeclaration',
|
4114
|
+
FunctionExpression: 'FunctionExpression',
|
4115
|
+
Identifier: 'Identifier',
|
4116
|
+
IfStatement: 'IfStatement',
|
4117
|
+
Literal: 'Literal',
|
4118
|
+
LabeledStatement: 'LabeledStatement',
|
4119
|
+
LogicalExpression: 'LogicalExpression',
|
4120
|
+
MemberExpression: 'MemberExpression',
|
4121
|
+
NewExpression: 'NewExpression',
|
4122
|
+
ObjectExpression: 'ObjectExpression',
|
4123
|
+
ObjectPattern: 'ObjectPattern',
|
4124
|
+
Program: 'Program',
|
4125
|
+
Property: 'Property',
|
4126
|
+
ReturnStatement: 'ReturnStatement',
|
4127
|
+
SequenceExpression: 'SequenceExpression',
|
4128
|
+
SwitchStatement: 'SwitchStatement',
|
4129
|
+
SwitchCase: 'SwitchCase',
|
4130
|
+
ThisExpression: 'ThisExpression',
|
4131
|
+
ThrowStatement: 'ThrowStatement',
|
4132
|
+
TryStatement: 'TryStatement',
|
4133
|
+
UnaryExpression: 'UnaryExpression',
|
4134
|
+
UpdateExpression: 'UpdateExpression',
|
4135
|
+
VariableDeclaration: 'VariableDeclaration',
|
4136
|
+
VariableDeclarator: 'VariableDeclarator',
|
4137
|
+
WhileStatement: 'WhileStatement',
|
4138
|
+
WithStatement: 'WithStatement',
|
4139
|
+
YieldExpression: 'YieldExpression'
|
3966
4140
|
|
3967
|
-
|
3968
|
-
if (type === 'config' || type === 'run') {
|
3969
|
-
argIndex = 0;
|
3970
|
-
}
|
4141
|
+
};
|
3971
4142
|
|
3972
|
-
|
3973
|
-
|
3974
|
-
|
3975
|
-
|
3976
|
-
|
4143
|
+
Precedence = {
|
4144
|
+
Sequence: 0,
|
4145
|
+
Assignment: 1,
|
4146
|
+
Conditional: 2,
|
4147
|
+
LogicalOR: 3,
|
4148
|
+
LogicalAND: 4,
|
4149
|
+
BitwiseOR: 5,
|
4150
|
+
BitwiseXOR: 6,
|
4151
|
+
BitwiseAND: 7,
|
4152
|
+
Equality: 8,
|
4153
|
+
Relational: 9,
|
4154
|
+
BitwiseSHIFT: 10,
|
4155
|
+
Additive: 11,
|
4156
|
+
Multiplicative: 12,
|
4157
|
+
Unary: 13,
|
4158
|
+
Postfix: 14,
|
4159
|
+
Call: 15,
|
4160
|
+
New: 16,
|
4161
|
+
Member: 17,
|
4162
|
+
Primary: 18
|
4163
|
+
};
|
3977
4164
|
|
4165
|
+
BinaryPrecedence = {
|
4166
|
+
'||': Precedence.LogicalOR,
|
4167
|
+
'&&': Precedence.LogicalAND,
|
4168
|
+
'|': Precedence.BitwiseOR,
|
4169
|
+
'^': Precedence.BitwiseXOR,
|
4170
|
+
'&': Precedence.BitwiseAND,
|
4171
|
+
'==': Precedence.Equality,
|
4172
|
+
'!=': Precedence.Equality,
|
4173
|
+
'===': Precedence.Equality,
|
4174
|
+
'!==': Precedence.Equality,
|
4175
|
+
'is': Precedence.Equality,
|
4176
|
+
'isnt': Precedence.Equality,
|
4177
|
+
'<': Precedence.Relational,
|
4178
|
+
'>': Precedence.Relational,
|
4179
|
+
'<=': Precedence.Relational,
|
4180
|
+
'>=': Precedence.Relational,
|
4181
|
+
'in': Precedence.Relational,
|
4182
|
+
'instanceof': Precedence.Relational,
|
4183
|
+
'<<': Precedence.BitwiseSHIFT,
|
4184
|
+
'>>': Precedence.BitwiseSHIFT,
|
4185
|
+
'>>>': Precedence.BitwiseSHIFT,
|
4186
|
+
'+': Precedence.Additive,
|
4187
|
+
'-': Precedence.Additive,
|
4188
|
+
'*': Precedence.Multiplicative,
|
4189
|
+
'%': Precedence.Multiplicative,
|
4190
|
+
'/': Precedence.Multiplicative
|
4191
|
+
};
|
3978
4192
|
|
3979
|
-
|
3980
|
-
|
3981
|
-
|
3982
|
-
"type": "CallExpression",
|
3983
|
-
"callee": {
|
3984
|
-
"type": "MemberExpression",
|
3985
|
-
"object": {
|
3986
|
-
"ngModule": true
|
3987
|
-
},
|
3988
|
-
"property": {
|
3989
|
-
"type": "Identifier",
|
3990
|
-
"name": "directive"
|
3991
|
-
}
|
3992
|
-
}
|
3993
|
-
}], function (directiveChunk) {
|
3994
|
-
deepApply(directiveChunk, [{
|
3995
|
-
"type": "ReturnStatement",
|
3996
|
-
"argument": {
|
3997
|
-
"type": "ObjectExpression"
|
3998
|
-
}
|
3999
|
-
}], function (returnChunk) {
|
4000
|
-
deepApply(returnChunk, [{
|
4001
|
-
"type": "Property",
|
4002
|
-
"key": {
|
4003
|
-
"type": "Identifier",
|
4004
|
-
"name": "controller"
|
4005
|
-
},
|
4006
|
-
"value": {
|
4007
|
-
"type": "FunctionExpression"
|
4008
|
-
}
|
4009
|
-
}], function (controllerChunk) {
|
4010
|
-
controllerChunk.value = annotateInjectable(controllerChunk.value);
|
4011
|
-
});
|
4012
|
-
});
|
4013
|
-
});
|
4014
|
-
|
4015
|
-
// PDO annotations - defined by object
|
4016
|
-
|
4017
|
-
deepApply(syntax, [{
|
4018
|
-
"type": "CallExpression",
|
4019
|
-
"callee": {
|
4020
|
-
"type": "MemberExpression",
|
4021
|
-
"object": {
|
4022
|
-
"ngModule": true
|
4023
|
-
},
|
4024
|
-
"property": {
|
4025
|
-
"type": "Identifier",
|
4026
|
-
"name": "provider"
|
4027
|
-
}
|
4028
|
-
}
|
4029
|
-
}], function (providerChunk) {
|
4030
|
-
deepApply(providerChunk, [{
|
4031
|
-
"type": "ObjectExpression"
|
4032
|
-
}], function(objectChunk) {
|
4033
|
-
objectChunk.properties.forEach(function(property) {
|
4034
|
-
deepApply(property, [{
|
4035
|
-
"type": "Property",
|
4036
|
-
"key": {
|
4037
|
-
"type": "Identifier",
|
4038
|
-
"name": "$get"
|
4039
|
-
},
|
4040
|
-
"value": {
|
4041
|
-
"type": "FunctionExpression"
|
4042
|
-
}
|
4043
|
-
}], function(propertyChunk) {
|
4044
|
-
propertyChunk.value = annotateInjectable(propertyChunk.value);
|
4045
|
-
});
|
4046
|
-
});
|
4047
|
-
});
|
4048
|
-
});
|
4049
|
-
|
4050
|
-
// PDO annotations - defined by function
|
4051
|
-
|
4052
|
-
deepApply(syntax, [{
|
4053
|
-
"type": "CallExpression",
|
4054
|
-
"callee": {
|
4055
|
-
"type": "MemberExpression",
|
4056
|
-
"object": {
|
4057
|
-
"ngModule": true
|
4058
|
-
},
|
4059
|
-
"property": {
|
4060
|
-
"type": "Identifier",
|
4061
|
-
"name": "provider"
|
4062
|
-
}
|
4063
|
-
}
|
4064
|
-
}], function (providerChunk) {
|
4065
|
-
deepApply(providerChunk, [{
|
4066
|
-
"type": "ExpressionStatement",
|
4067
|
-
"expression": {
|
4068
|
-
"type": "AssignmentExpression",
|
4069
|
-
"left": {
|
4070
|
-
"type": "MemberExpression",
|
4071
|
-
"object": {
|
4072
|
-
"type": "ThisExpression"
|
4073
|
-
},
|
4074
|
-
"property": {
|
4075
|
-
"type": "Identifier",
|
4076
|
-
"name": "$get"
|
4077
|
-
}
|
4078
|
-
},
|
4079
|
-
"right": {
|
4080
|
-
"type": "FunctionExpression"
|
4081
|
-
}
|
4082
|
-
}
|
4083
|
-
}], function(pdoChunk) {
|
4084
|
-
pdoChunk.expression.right = annotateInjectable(pdoChunk.expression.right);
|
4085
|
-
});
|
4086
|
-
});
|
4087
|
-
|
4088
|
-
};
|
4089
|
-
|
4090
|
-
},{"./deep-apply":6,"./annotate-injectable":7,"../signatures/simple":8}],9:[function(require,module,exports){
|
4091
|
-
/*
|
4092
|
-
* Identify AST blocks that refer to an AngularJS module
|
4093
|
-
*/
|
4094
|
-
module.exports = {
|
4095
|
-
"type": "CallExpression",
|
4096
|
-
"callee": {
|
4097
|
-
"type": "MemberExpression",
|
4098
|
-
"object": {
|
4099
|
-
"type": "Identifier",
|
4100
|
-
"name": "angular"
|
4101
|
-
},
|
4102
|
-
"property": {
|
4103
|
-
"type": "Identifier",
|
4104
|
-
"name": "module"
|
4105
|
-
}
|
4106
|
-
}
|
4107
|
-
};
|
4108
|
-
|
4109
|
-
},{}],8:[function(require,module,exports){
|
4110
|
-
|
4111
|
-
/*
|
4112
|
-
* Simple AST structure to match against
|
4113
|
-
* ex: `angular.module('whatevs').controller( ... )`
|
4114
|
-
*/
|
4115
|
-
|
4116
|
-
module.exports = [
|
4117
|
-
|
4118
|
-
{
|
4119
|
-
"type": "CallExpression",
|
4120
|
-
"callee": {
|
4121
|
-
"type": "MemberExpression",
|
4122
|
-
"object": {
|
4123
|
-
"ngModule": true
|
4124
|
-
},
|
4125
|
-
"property": {
|
4126
|
-
"type": "Identifier",
|
4127
|
-
"name": /^(constant|value)$/
|
4128
|
-
}
|
4129
|
-
}
|
4130
|
-
},
|
4131
|
-
|
4132
|
-
{
|
4133
|
-
"type": "CallExpression",
|
4134
|
-
"callee": {
|
4135
|
-
"type": "MemberExpression",
|
4136
|
-
"object": {
|
4137
|
-
"ngModule": true
|
4138
|
-
},
|
4139
|
-
"property": {
|
4140
|
-
"type": "Identifier",
|
4141
|
-
"name": /^(controller|directive|filter|service|factory|decorator|provider)$/
|
4142
|
-
}
|
4143
|
-
},
|
4144
|
-
"arguments": [
|
4145
|
-
{},
|
4146
|
-
{
|
4147
|
-
"type": "FunctionExpression"
|
4148
|
-
}
|
4149
|
-
]
|
4150
|
-
},
|
4151
|
-
|
4152
|
-
{
|
4153
|
-
"type": "CallExpression",
|
4154
|
-
"callee": {
|
4155
|
-
"type": "MemberExpression",
|
4156
|
-
"object": {
|
4157
|
-
"ngModule": true
|
4158
|
-
},
|
4159
|
-
"property": {
|
4160
|
-
"type": "Identifier",
|
4161
|
-
"name": "provider"
|
4162
|
-
}
|
4163
|
-
},
|
4164
|
-
"arguments": [
|
4165
|
-
{},
|
4166
|
-
{
|
4167
|
-
"type": "ObjectExpression"
|
4168
|
-
}
|
4169
|
-
]
|
4170
|
-
},
|
4171
|
-
|
4172
|
-
{
|
4173
|
-
"type": "CallExpression",
|
4174
|
-
"callee": {
|
4175
|
-
"type": "MemberExpression",
|
4176
|
-
"object": {
|
4177
|
-
"ngModule": true
|
4178
|
-
},
|
4179
|
-
"property": {
|
4180
|
-
"type": "Identifier",
|
4181
|
-
"name": /^(config|run)$/
|
4182
|
-
}
|
4183
|
-
},
|
4184
|
-
"arguments": [
|
4185
|
-
{
|
4186
|
-
"type": "FunctionExpression"
|
4187
|
-
}
|
4188
|
-
]
|
4189
|
-
}
|
4190
|
-
|
4191
|
-
];
|
4192
|
-
|
4193
|
-
},{}],10:[function(require,module,exports){
|
4194
|
-
module.exports = {
|
4195
|
-
"type": "VariableDeclarator",
|
4196
|
-
"init": {
|
4197
|
-
"ngModule": true
|
4198
|
-
}
|
4199
|
-
};
|
4200
|
-
|
4201
|
-
},{}],11:[function(require,module,exports){
|
4202
|
-
module.exports = {
|
4203
|
-
"type": "ExpressionStatement",
|
4204
|
-
"expression": {
|
4205
|
-
"type": "AssignmentExpression",
|
4206
|
-
"operator": "=",
|
4207
|
-
"left": {
|
4208
|
-
"type": "Identifier"
|
4209
|
-
},
|
4210
|
-
"right": {
|
4211
|
-
"ngModule": true
|
4212
|
-
}
|
4213
|
-
}
|
4214
|
-
};
|
4215
|
-
|
4216
|
-
},{}],7:[function(require,module,exports){
|
4217
|
-
|
4218
|
-
// given an AST chunk for a fn,
|
4219
|
-
// return an AST chunk representing an annotation array
|
4220
|
-
var annotateInjectable = module.exports = function (originalFn) {
|
4221
|
-
// if there's nothing to inject, don't annotate
|
4222
|
-
if (!originalFn.params || originalFn.params.length === 0) {
|
4223
|
-
return originalFn;
|
4224
|
-
}
|
4225
|
-
|
4226
|
-
var newParam = {
|
4227
|
-
type: 'ArrayExpression',
|
4228
|
-
elements: []
|
4229
|
-
};
|
4230
|
-
|
4231
|
-
originalFn.params.forEach(function (param) {
|
4232
|
-
newParam.elements.push({
|
4233
|
-
"type": "Literal",
|
4234
|
-
"value": param.name
|
4235
|
-
});
|
4236
|
-
});
|
4237
|
-
newParam.elements.push(originalFn);
|
4238
|
-
return newParam;
|
4239
|
-
};
|
4240
|
-
|
4241
|
-
},{}],12:[function(require,module,exports){
|
4242
|
-
module.exports={
|
4243
|
-
"name": "escodegen",
|
4244
|
-
"description": "ECMAScript code generator",
|
4245
|
-
"homepage": "http://github.com/Constellation/escodegen.html",
|
4246
|
-
"main": "escodegen.js",
|
4247
|
-
"bin": {
|
4248
|
-
"esgenerate": "./bin/esgenerate.js",
|
4249
|
-
"escodegen": "./bin/escodegen.js"
|
4250
|
-
},
|
4251
|
-
"version": "0.0.22",
|
4252
|
-
"engines": {
|
4253
|
-
"node": ">=0.4.0"
|
4254
|
-
},
|
4255
|
-
"maintainers": [
|
4256
|
-
{
|
4257
|
-
"name": "Yusuke Suzuki",
|
4258
|
-
"email": "utatane.tea@gmail.com",
|
4259
|
-
"url": "http://github.com/Constellation"
|
4260
|
-
}
|
4261
|
-
],
|
4262
|
-
"repository": {
|
4263
|
-
"type": "git",
|
4264
|
-
"url": "http://github.com/Constellation/escodegen.git"
|
4265
|
-
},
|
4266
|
-
"dependencies": {
|
4267
|
-
"esprima": "~1.0.2",
|
4268
|
-
"estraverse": "~0.0.4",
|
4269
|
-
"source-map": ">= 0.1.2"
|
4270
|
-
},
|
4271
|
-
"optionalDependencies": {
|
4272
|
-
"source-map": ">= 0.1.2"
|
4273
|
-
},
|
4274
|
-
"devDependencies": {
|
4275
|
-
"esprima-moz": "*",
|
4276
|
-
"browserify": "*",
|
4277
|
-
"q": "*",
|
4278
|
-
"bower": "*",
|
4279
|
-
"semver": "*"
|
4280
|
-
},
|
4281
|
-
"licenses": [
|
4282
|
-
{
|
4283
|
-
"type": "BSD",
|
4284
|
-
"url": "http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD"
|
4285
|
-
}
|
4286
|
-
],
|
4287
|
-
"scripts": {
|
4288
|
-
"test": "node test/run.js",
|
4289
|
-
"release": "node tools/release.js",
|
4290
|
-
"build": "(echo '// Generated by browserify'; ./node_modules/.bin/browserify -i source-map tools/entry-point.js) > escodegen.browser.js"
|
4291
|
-
},
|
4292
|
-
"readme": "Escodegen ([escodegen](http://github.com/Constellation/escodegen)) is\n[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\n(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript))\ncode generator from [Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) AST.\nSee [online generator demo](http://constellation.github.com/escodegen/demo/index.html).\n\n\n### Install\n\nEscodegen can be used in a web browser:\n\n <script src=\"escodegen.browser.js\"></script>\n\nor in a Node.js application via the package manager:\n\n npm install escodegen\n\n\n### Usage\n\nA simple example: the program\n\n escodegen.generate({\n type: 'BinaryExpression',\n operator: '+',\n left: { type: 'Literal', value: 40 },\n right: { type: 'Literal', value: 2 }\n });\n\nproduces the string `'40 + 2'`\n\nSee the [API page](https://github.com/Constellation/escodegen/wiki/API) for\noptions. To run the tests, execute `npm test` in the root directory.\n\n\n### License\n\n#### Escodegen\n\nCopyright (C) 2012 [Yusuke Suzuki](http://github.com/Constellation)\n (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n#### source-map\n\nSourceNodeMocks has a limited interface of mozilla/source-map SourceNode implementations.\n\nCopyright (c) 2009-2011, Mozilla Foundation and contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the names of the Mozilla Foundation nor the names of project\n contributors may be used to endorse or promote products derived from this\n software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n### Status\n\n[![Build Status](https://secure.travis-ci.org/Constellation/escodegen.png)](http://travis-ci.org/Constellation/escodegen)\n",
|
4293
|
-
"readmeFilename": "README.md",
|
4294
|
-
"_id": "escodegen@0.0.22",
|
4295
|
-
"_from": "escodegen@~0.0.15"
|
4296
|
-
}
|
4297
|
-
|
4298
|
-
},{}],6:[function(require,module,exports){
|
4299
|
-
/*
|
4300
|
-
* Checks each property of the standard recursively against the candidate,
|
4301
|
-
* runs `cb` on all branches that match the standard
|
4302
|
-
*/
|
4303
|
-
|
4304
|
-
var deepCompare = require('./deep-compare.js');
|
4305
|
-
|
4306
|
-
var deepApply = module.exports = function (candidate, standards, cb) {
|
4307
|
-
// depth-first
|
4308
|
-
for (var prop in candidate) {
|
4309
|
-
if (candidate.hasOwnProperty(prop)) {
|
4310
|
-
|
4311
|
-
// array
|
4312
|
-
if (candidate[prop] instanceof Array) {
|
4313
|
-
for (var i = 0; i < candidate[prop].length; i += 1) {
|
4314
|
-
deepApply(candidate[prop][i], standards, cb);
|
4315
|
-
}
|
4316
|
-
|
4317
|
-
// object
|
4318
|
-
} else if (typeof candidate[prop] === 'object') {
|
4319
|
-
deepApply(candidate[prop], standards, cb);
|
4320
|
-
}
|
4321
|
-
}
|
4322
|
-
}
|
4323
|
-
|
4324
|
-
standards.forEach(function (standard) {
|
4325
|
-
if (deepCompare(candidate, standard)) {
|
4326
|
-
cb(candidate);
|
4327
|
-
}
|
4328
|
-
});
|
4329
|
-
};
|
4330
|
-
|
4331
|
-
},{"./deep-compare.js":13}],5:[function(require,module,exports){
|
4332
|
-
(function(global){/*
|
4333
|
-
Copyright (C) 2012 Michael Ficarra <escodegen.copyright@michael.ficarra.me>
|
4334
|
-
Copyright (C) 2012 Robert Gust-Bardon <donate@robert.gust-bardon.org>
|
4335
|
-
Copyright (C) 2012 John Freeman <jfreeman08@gmail.com>
|
4336
|
-
Copyright (C) 2011-2012 Ariya Hidayat <ariya.hidayat@gmail.com>
|
4337
|
-
Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
|
4338
|
-
Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
|
4339
|
-
Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
|
4340
|
-
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
4341
|
-
Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
|
4342
|
-
|
4343
|
-
Redistribution and use in source and binary forms, with or without
|
4344
|
-
modification, are permitted provided that the following conditions are met:
|
4345
|
-
|
4346
|
-
* Redistributions of source code must retain the above copyright
|
4347
|
-
notice, this list of conditions and the following disclaimer.
|
4348
|
-
* Redistributions in binary form must reproduce the above copyright
|
4349
|
-
notice, this list of conditions and the following disclaimer in the
|
4350
|
-
documentation and/or other materials provided with the distribution.
|
4351
|
-
|
4352
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
4353
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
4354
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
4355
|
-
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
4356
|
-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
4357
|
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
4358
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
4359
|
-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
4360
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
4361
|
-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
4362
|
-
*/
|
4363
|
-
|
4364
|
-
/*jslint bitwise:true */
|
4365
|
-
/*global escodegen:true, exports:true, generateStatement:true, generateExpression:true, generateFunctionBody:true, process:true, require:true, define:true, global:true*/
|
4366
|
-
(function () {
|
4367
|
-
'use strict';
|
4368
|
-
|
4369
|
-
var Syntax,
|
4370
|
-
Precedence,
|
4371
|
-
BinaryPrecedence,
|
4372
|
-
Regex,
|
4373
|
-
VisitorKeys,
|
4374
|
-
VisitorOption,
|
4375
|
-
SourceNode,
|
4376
|
-
isArray,
|
4377
|
-
base,
|
4378
|
-
indent,
|
4379
|
-
json,
|
4380
|
-
renumber,
|
4381
|
-
hexadecimal,
|
4382
|
-
quotes,
|
4383
|
-
escapeless,
|
4384
|
-
newline,
|
4385
|
-
space,
|
4386
|
-
parentheses,
|
4387
|
-
semicolons,
|
4388
|
-
safeConcatenation,
|
4389
|
-
directive,
|
4390
|
-
extra,
|
4391
|
-
parse,
|
4392
|
-
sourceMap,
|
4393
|
-
traverse;
|
4394
|
-
|
4395
|
-
traverse = require('estraverse').traverse;
|
4396
|
-
|
4397
|
-
Syntax = {
|
4398
|
-
AssignmentExpression: 'AssignmentExpression',
|
4399
|
-
ArrayExpression: 'ArrayExpression',
|
4400
|
-
ArrayPattern: 'ArrayPattern',
|
4401
|
-
BlockStatement: 'BlockStatement',
|
4402
|
-
BinaryExpression: 'BinaryExpression',
|
4403
|
-
BreakStatement: 'BreakStatement',
|
4404
|
-
CallExpression: 'CallExpression',
|
4405
|
-
CatchClause: 'CatchClause',
|
4406
|
-
ComprehensionBlock: 'ComprehensionBlock',
|
4407
|
-
ComprehensionExpression: 'ComprehensionExpression',
|
4408
|
-
ConditionalExpression: 'ConditionalExpression',
|
4409
|
-
ContinueStatement: 'ContinueStatement',
|
4410
|
-
DirectiveStatement: 'DirectiveStatement',
|
4411
|
-
DoWhileStatement: 'DoWhileStatement',
|
4412
|
-
DebuggerStatement: 'DebuggerStatement',
|
4413
|
-
EmptyStatement: 'EmptyStatement',
|
4414
|
-
ExpressionStatement: 'ExpressionStatement',
|
4415
|
-
ForStatement: 'ForStatement',
|
4416
|
-
ForInStatement: 'ForInStatement',
|
4417
|
-
FunctionDeclaration: 'FunctionDeclaration',
|
4418
|
-
FunctionExpression: 'FunctionExpression',
|
4419
|
-
Identifier: 'Identifier',
|
4420
|
-
IfStatement: 'IfStatement',
|
4421
|
-
Literal: 'Literal',
|
4422
|
-
LabeledStatement: 'LabeledStatement',
|
4423
|
-
LogicalExpression: 'LogicalExpression',
|
4424
|
-
MemberExpression: 'MemberExpression',
|
4425
|
-
NewExpression: 'NewExpression',
|
4426
|
-
ObjectExpression: 'ObjectExpression',
|
4427
|
-
ObjectPattern: 'ObjectPattern',
|
4428
|
-
Program: 'Program',
|
4429
|
-
Property: 'Property',
|
4430
|
-
ReturnStatement: 'ReturnStatement',
|
4431
|
-
SequenceExpression: 'SequenceExpression',
|
4432
|
-
SwitchStatement: 'SwitchStatement',
|
4433
|
-
SwitchCase: 'SwitchCase',
|
4434
|
-
ThisExpression: 'ThisExpression',
|
4435
|
-
ThrowStatement: 'ThrowStatement',
|
4436
|
-
TryStatement: 'TryStatement',
|
4437
|
-
UnaryExpression: 'UnaryExpression',
|
4438
|
-
UpdateExpression: 'UpdateExpression',
|
4439
|
-
VariableDeclaration: 'VariableDeclaration',
|
4440
|
-
VariableDeclarator: 'VariableDeclarator',
|
4441
|
-
WhileStatement: 'WhileStatement',
|
4442
|
-
WithStatement: 'WithStatement',
|
4443
|
-
YieldExpression: 'YieldExpression'
|
4444
|
-
|
4445
|
-
};
|
4446
|
-
|
4447
|
-
Precedence = {
|
4448
|
-
Sequence: 0,
|
4449
|
-
Assignment: 1,
|
4450
|
-
Conditional: 2,
|
4451
|
-
LogicalOR: 3,
|
4452
|
-
LogicalAND: 4,
|
4453
|
-
BitwiseOR: 5,
|
4454
|
-
BitwiseXOR: 6,
|
4455
|
-
BitwiseAND: 7,
|
4456
|
-
Equality: 8,
|
4457
|
-
Relational: 9,
|
4458
|
-
BitwiseSHIFT: 10,
|
4459
|
-
Additive: 11,
|
4460
|
-
Multiplicative: 12,
|
4461
|
-
Unary: 13,
|
4462
|
-
Postfix: 14,
|
4463
|
-
Call: 15,
|
4464
|
-
New: 16,
|
4465
|
-
Member: 17,
|
4466
|
-
Primary: 18
|
4467
|
-
};
|
4468
|
-
|
4469
|
-
BinaryPrecedence = {
|
4470
|
-
'||': Precedence.LogicalOR,
|
4471
|
-
'&&': Precedence.LogicalAND,
|
4472
|
-
'|': Precedence.BitwiseOR,
|
4473
|
-
'^': Precedence.BitwiseXOR,
|
4474
|
-
'&': Precedence.BitwiseAND,
|
4475
|
-
'==': Precedence.Equality,
|
4476
|
-
'!=': Precedence.Equality,
|
4477
|
-
'===': Precedence.Equality,
|
4478
|
-
'!==': Precedence.Equality,
|
4479
|
-
'is': Precedence.Equality,
|
4480
|
-
'isnt': Precedence.Equality,
|
4481
|
-
'<': Precedence.Relational,
|
4482
|
-
'>': Precedence.Relational,
|
4483
|
-
'<=': Precedence.Relational,
|
4484
|
-
'>=': Precedence.Relational,
|
4485
|
-
'in': Precedence.Relational,
|
4486
|
-
'instanceof': Precedence.Relational,
|
4487
|
-
'<<': Precedence.BitwiseSHIFT,
|
4488
|
-
'>>': Precedence.BitwiseSHIFT,
|
4489
|
-
'>>>': Precedence.BitwiseSHIFT,
|
4490
|
-
'+': Precedence.Additive,
|
4491
|
-
'-': Precedence.Additive,
|
4492
|
-
'*': Precedence.Multiplicative,
|
4493
|
-
'%': Precedence.Multiplicative,
|
4494
|
-
'/': Precedence.Multiplicative
|
4495
|
-
};
|
4496
|
-
|
4497
|
-
Regex = {
|
4498
|
-
NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]')
|
4499
|
-
};
|
4193
|
+
Regex = {
|
4194
|
+
NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]')
|
4195
|
+
};
|
4500
4196
|
|
4501
4197
|
function getDefaultOptions() {
|
4502
4198
|
// default options
|
@@ -5975,10 +5671,28 @@ var deepApply = module.exports = function (candidate, standards, cb) {
|
|
5975
5671
|
case Syntax.TryStatement:
|
5976
5672
|
result = ['try', maybeBlock(stmt.block)];
|
5977
5673
|
result = maybeBlockSuffix(stmt.block, result);
|
5978
|
-
|
5979
|
-
|
5980
|
-
|
5981
|
-
result =
|
5674
|
+
if (stmt.handlers) {
|
5675
|
+
// old interface
|
5676
|
+
for (i = 0, len = stmt.handlers.length; i < len; i += 1) {
|
5677
|
+
result = join(result, generateStatement(stmt.handlers[i]));
|
5678
|
+
if (stmt.finalizer || i + 1 !== len) {
|
5679
|
+
result = maybeBlockSuffix(stmt.handlers[i].body, result);
|
5680
|
+
}
|
5681
|
+
}
|
5682
|
+
} else {
|
5683
|
+
// new interface
|
5684
|
+
if (stmt.handler) {
|
5685
|
+
result = join(result, generateStatement(stmt.handler));
|
5686
|
+
if (stmt.finalizer || stmt.guardedHandlers.length > 0) {
|
5687
|
+
result = maybeBlockSuffix(stmt.handler.body, result);
|
5688
|
+
}
|
5689
|
+
}
|
5690
|
+
|
5691
|
+
for (i = 0, len = stmt.guardedHandlers.length; i < len; i += 1) {
|
5692
|
+
result = join(result, generateStatement(stmt.guardedHandlers[i]));
|
5693
|
+
if (stmt.finalizer || i + 1 !== len) {
|
5694
|
+
result = maybeBlockSuffix(stmt.guardedHandlers[i].body, result);
|
5695
|
+
}
|
5982
5696
|
}
|
5983
5697
|
}
|
5984
5698
|
if (stmt.finalizer) {
|
@@ -6542,177 +6256,53 @@ var deepApply = module.exports = function (candidate, standards, cb) {
|
|
6542
6256
|
return VisitorOption.Skip;
|
6543
6257
|
}
|
6544
6258
|
}
|
6545
|
-
});
|
6546
|
-
|
6547
|
-
traverse(tree, {
|
6548
|
-
cursor: 0,
|
6549
|
-
leave: function (node) {
|
6550
|
-
var comment;
|
6551
|
-
|
6552
|
-
while (this.cursor < comments.length) {
|
6553
|
-
comment = comments[this.cursor];
|
6554
|
-
if (node.range[1] < comment.extendedRange[0]) {
|
6555
|
-
break;
|
6556
|
-
}
|
6557
|
-
|
6558
|
-
if (node.range[1] === comment.extendedRange[0]) {
|
6559
|
-
if (!node.trailingComments) {
|
6560
|
-
node.trailingComments = [];
|
6561
|
-
}
|
6562
|
-
node.trailingComments.push(comment);
|
6563
|
-
comments.splice(this.cursor, 1);
|
6564
|
-
} else {
|
6565
|
-
this.cursor += 1;
|
6566
|
-
}
|
6567
|
-
}
|
6568
|
-
|
6569
|
-
// already out of owned node
|
6570
|
-
if (this.cursor === comments.length) {
|
6571
|
-
return VisitorOption.Break;
|
6572
|
-
}
|
6573
|
-
|
6574
|
-
if (comments[this.cursor].extendedRange[0] > node.range[1]) {
|
6575
|
-
return VisitorOption.Skip;
|
6576
|
-
}
|
6577
|
-
}
|
6578
|
-
});
|
6579
|
-
|
6580
|
-
return tree;
|
6581
|
-
}
|
6582
|
-
|
6583
|
-
exports.version = require('./package.json').version;
|
6584
|
-
exports.generate = generate;
|
6585
|
-
exports.attachComments = attachComments;
|
6586
|
-
exports.browser = false;
|
6587
|
-
}());
|
6588
|
-
/* vim: set sw=4 ts=4 et tw=80 : */
|
6589
|
-
|
6590
|
-
})(window)
|
6591
|
-
},{"./package.json":12,"estraverse":14,"source-map":15}],2:[function(require,module,exports){
|
6592
|
-
|
6593
|
-
/*
|
6594
|
-
* Add {"ngModule": true} property to matching modules
|
6595
|
-
*/
|
6596
|
-
|
6597
|
-
var deepApply = require('./deep-apply');
|
6598
|
-
|
6599
|
-
var signatures = [
|
6600
|
-
require('../signatures/module')
|
6601
|
-
].concat(require('../signatures/simple'));
|
6602
|
-
|
6603
|
-
var standards = [
|
6604
|
-
require('../signatures/decl'),
|
6605
|
-
require('../signatures/assign')
|
6606
|
-
];
|
6607
|
-
|
6608
|
-
var clone = require('clone');
|
6609
|
-
|
6610
|
-
var simpleSignatures = clone(require('../signatures/simple'));
|
6611
|
-
|
6612
|
-
//TODO: honor scope
|
6613
|
-
// returns true iff there were things to annotate
|
6614
|
-
var markASTModules = module.exports = function (syntax) {
|
6615
|
-
var changed = false;
|
6616
|
-
|
6617
|
-
|
6618
|
-
deepApply(syntax, signatures, function (chunk) {
|
6619
|
-
chunk.ngModule = true;
|
6620
|
-
if (!chunk.ngModule) {
|
6621
|
-
changed = true;
|
6622
|
-
}
|
6623
|
-
});
|
6624
|
-
|
6625
|
-
// module ref ids
|
6626
|
-
var modules = [];
|
6627
|
-
|
6628
|
-
// grab all module ref ids
|
6629
|
-
standards.forEach(function (standard) {
|
6630
|
-
deepApply(syntax, standards, function (branch) {
|
6631
|
-
var id;
|
6632
|
-
|
6633
|
-
try {
|
6634
|
-
id = branch.id.name;
|
6635
|
-
} catch (e) {
|
6636
|
-
id = branch.expression.left.name;
|
6637
|
-
}
|
6638
|
-
|
6639
|
-
if (modules.indexOf(id) === -1) {
|
6640
|
-
modules.push(id);
|
6641
|
-
}
|
6642
|
-
});
|
6643
|
-
});
|
6644
|
-
|
6645
|
-
var namedModuleMemberExpression = {
|
6646
|
-
"type": "Identifier",
|
6647
|
-
"name": new RegExp('^(' + modules.join('|') + ')$')
|
6648
|
-
};
|
6649
|
-
|
6650
|
-
simpleSignatures = simpleSignatures.map(function (signature) {
|
6651
|
-
signature.callee.object = namedModuleMemberExpression;
|
6652
|
-
return signature;
|
6653
|
-
});
|
6654
|
-
|
6655
|
-
deepApply(syntax, simpleSignatures, function (chunk) {
|
6656
|
-
if (!chunk.callee.object.ngModule) {
|
6657
|
-
changed = true;
|
6658
|
-
chunk.callee.object.ngModule = true;
|
6659
|
-
}
|
6660
|
-
});
|
6661
|
-
|
6662
|
-
return changed;
|
6663
|
-
};
|
6664
|
-
|
6665
|
-
},{"./deep-apply":6,"../signatures/module":9,"../signatures/simple":8,"../signatures/decl":10,"../signatures/assign":11,"clone":16}],13:[function(require,module,exports){
|
6666
|
-
/*
|
6667
|
-
* Checks each property of the standard recursively against the candidate,
|
6668
|
-
* ignoring additional properties of the candidate.
|
6669
|
-
* Returns true iff the candidate matches each of the standard's
|
6670
|
-
* properties
|
6671
|
-
*/
|
6672
|
-
|
6673
|
-
var deepCompare = module.exports = function (candidate, standard) {
|
6674
|
-
if (!standard && !candidate) {
|
6675
|
-
return true;
|
6676
|
-
} else if (standard && !candidate) {
|
6677
|
-
return false;
|
6678
|
-
}
|
6679
|
-
for (var prop in standard) {
|
6680
|
-
if (standard.hasOwnProperty(prop)) {
|
6259
|
+
});
|
6681
6260
|
|
6682
|
-
|
6683
|
-
|
6684
|
-
|
6261
|
+
traverse(tree, {
|
6262
|
+
cursor: 0,
|
6263
|
+
leave: function (node) {
|
6264
|
+
var comment;
|
6685
6265
|
|
6686
|
-
|
6687
|
-
|
6688
|
-
|
6689
|
-
|
6690
|
-
|
6266
|
+
while (this.cursor < comments.length) {
|
6267
|
+
comment = comments[this.cursor];
|
6268
|
+
if (node.range[1] < comment.extendedRange[0]) {
|
6269
|
+
break;
|
6270
|
+
}
|
6691
6271
|
|
6692
|
-
|
6693
|
-
|
6694
|
-
|
6695
|
-
|
6696
|
-
|
6697
|
-
|
6698
|
-
|
6272
|
+
if (node.range[1] === comment.extendedRange[0]) {
|
6273
|
+
if (!node.trailingComments) {
|
6274
|
+
node.trailingComments = [];
|
6275
|
+
}
|
6276
|
+
node.trailingComments.push(comment);
|
6277
|
+
comments.splice(this.cursor, 1);
|
6278
|
+
} else {
|
6279
|
+
this.cursor += 1;
|
6280
|
+
}
|
6281
|
+
}
|
6699
6282
|
|
6700
|
-
|
6701
|
-
|
6702
|
-
|
6703
|
-
|
6704
|
-
}
|
6283
|
+
// already out of owned node
|
6284
|
+
if (this.cursor === comments.length) {
|
6285
|
+
return VisitorOption.Break;
|
6286
|
+
}
|
6705
6287
|
|
6706
|
-
|
6707
|
-
|
6708
|
-
|
6709
|
-
|
6288
|
+
if (comments[this.cursor].extendedRange[0] > node.range[1]) {
|
6289
|
+
return VisitorOption.Skip;
|
6290
|
+
}
|
6291
|
+
}
|
6292
|
+
});
|
6293
|
+
|
6294
|
+
return tree;
|
6710
6295
|
}
|
6711
|
-
}
|
6712
|
-
return true;
|
6713
|
-
};
|
6714
6296
|
|
6715
|
-
|
6297
|
+
exports.version = require('./package.json').version;
|
6298
|
+
exports.generate = generate;
|
6299
|
+
exports.attachComments = attachComments;
|
6300
|
+
exports.browser = false;
|
6301
|
+
}());
|
6302
|
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
6303
|
+
|
6304
|
+
})(window)
|
6305
|
+
},{"./package.json":11,"estraverse":12,"source-map":13}],12:[function(require,module,exports){
|
6716
6306
|
(function(){/*
|
6717
6307
|
Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
|
6718
6308
|
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
|
@@ -6973,417 +6563,270 @@ var deepCompare = module.exports = function (candidate, standard) {
|
|
6973
6563
|
nodeType = wrappers[nodeType];
|
6974
6564
|
}
|
6975
6565
|
|
6976
|
-
if (visitor.enter) {
|
6977
|
-
target = visitor.enter(tuple[0], leavelist[leavelist.length - 1][0], notify);
|
6978
|
-
if (target !== undefined) {
|
6979
|
-
node = target;
|
6980
|
-
}
|
6981
|
-
tuple[1][tuple[2]] = node;
|
6982
|
-
tuple[0] = node;
|
6983
|
-
}
|
6984
|
-
|
6985
|
-
if (ret === VisitorOption.Break) {
|
6986
|
-
return result.top;
|
6987
|
-
}
|
6988
|
-
|
6989
|
-
if (tuple[0]) {
|
6990
|
-
worklist.push(marker);
|
6991
|
-
leavelist.push(tuple);
|
6992
|
-
|
6993
|
-
if (ret !== VisitorOption.Skip) {
|
6994
|
-
candidates = VisitorKeys[nodeType];
|
6995
|
-
current = candidates.length;
|
6996
|
-
while ((current -= 1) >= 0) {
|
6997
|
-
candidate = node[candidates[current]];
|
6998
|
-
if (candidate) {
|
6999
|
-
if (isArray(candidate)) {
|
7000
|
-
current2 = candidate.length;
|
7001
|
-
while ((current2 -= 1) >= 0) {
|
7002
|
-
if (candidate[current2]) {
|
7003
|
-
if(nodeType === Syntax.ObjectExpression && 'properties' === candidates[current] && null == candidates[current].type) {
|
7004
|
-
worklist.push([{type: 'PropertyWrapper', node: candidate[current2]}, candidate, current2]);
|
7005
|
-
} else {
|
7006
|
-
worklist.push([candidate[current2], candidate, current2]);
|
7007
|
-
}
|
7008
|
-
}
|
7009
|
-
}
|
7010
|
-
} else {
|
7011
|
-
worklist.push([candidate, node, candidates[current]]);
|
7012
|
-
}
|
7013
|
-
}
|
7014
|
-
}
|
7015
|
-
}
|
7016
|
-
}
|
7017
|
-
}
|
7018
|
-
}
|
7019
|
-
|
7020
|
-
return result.top;
|
7021
|
-
}
|
7022
|
-
|
7023
|
-
exports.version = '0.0.4';
|
7024
|
-
exports.Syntax = Syntax;
|
7025
|
-
exports.traverse = traverse;
|
7026
|
-
exports.replace = replace;
|
7027
|
-
exports.VisitorKeys = VisitorKeys;
|
7028
|
-
exports.VisitorOption = VisitorOption;
|
7029
|
-
}));
|
7030
|
-
/* vim: set sw=4 ts=4 et tw=80 : */
|
7031
|
-
|
7032
|
-
})()
|
7033
|
-
},{}],17:[function(require,module,exports){
|
7034
|
-
var events = require('events');
|
7035
|
-
|
7036
|
-
exports.isArray = isArray;
|
7037
|
-
exports.isDate = function(obj){return Object.prototype.toString.call(obj) === '[object Date]'};
|
7038
|
-
exports.isRegExp = function(obj){return Object.prototype.toString.call(obj) === '[object RegExp]'};
|
7039
|
-
|
7040
|
-
|
7041
|
-
exports.print = function () {};
|
7042
|
-
exports.puts = function () {};
|
7043
|
-
exports.debug = function() {};
|
7044
|
-
|
7045
|
-
exports.inspect = function(obj, showHidden, depth, colors) {
|
7046
|
-
var seen = [];
|
7047
|
-
|
7048
|
-
var stylize = function(str, styleType) {
|
7049
|
-
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
7050
|
-
var styles =
|
7051
|
-
{ 'bold' : [1, 22],
|
7052
|
-
'italic' : [3, 23],
|
7053
|
-
'underline' : [4, 24],
|
7054
|
-
'inverse' : [7, 27],
|
7055
|
-
'white' : [37, 39],
|
7056
|
-
'grey' : [90, 39],
|
7057
|
-
'black' : [30, 39],
|
7058
|
-
'blue' : [34, 39],
|
7059
|
-
'cyan' : [36, 39],
|
7060
|
-
'green' : [32, 39],
|
7061
|
-
'magenta' : [35, 39],
|
7062
|
-
'red' : [31, 39],
|
7063
|
-
'yellow' : [33, 39] };
|
7064
|
-
|
7065
|
-
var style =
|
7066
|
-
{ 'special': 'cyan',
|
7067
|
-
'number': 'blue',
|
7068
|
-
'boolean': 'yellow',
|
7069
|
-
'undefined': 'grey',
|
7070
|
-
'null': 'bold',
|
7071
|
-
'string': 'green',
|
7072
|
-
'date': 'magenta',
|
7073
|
-
// "name": intentionally not styling
|
7074
|
-
'regexp': 'red' }[styleType];
|
7075
|
-
|
7076
|
-
if (style) {
|
7077
|
-
return '\033[' + styles[style][0] + 'm' + str +
|
7078
|
-
'\033[' + styles[style][1] + 'm';
|
7079
|
-
} else {
|
7080
|
-
return str;
|
7081
|
-
}
|
7082
|
-
};
|
7083
|
-
if (! colors) {
|
7084
|
-
stylize = function(str, styleType) { return str; };
|
7085
|
-
}
|
7086
|
-
|
7087
|
-
function format(value, recurseTimes) {
|
7088
|
-
// Provide a hook for user-specified inspect functions.
|
7089
|
-
// Check that value is an object with an inspect function on it
|
7090
|
-
if (value && typeof value.inspect === 'function' &&
|
7091
|
-
// Filter out the util module, it's inspect function is special
|
7092
|
-
value !== exports &&
|
7093
|
-
// Also filter out any prototype objects using the circular check.
|
7094
|
-
!(value.constructor && value.constructor.prototype === value)) {
|
7095
|
-
return value.inspect(recurseTimes);
|
7096
|
-
}
|
7097
|
-
|
7098
|
-
// Primitive types cannot have properties
|
7099
|
-
switch (typeof value) {
|
7100
|
-
case 'undefined':
|
7101
|
-
return stylize('undefined', 'undefined');
|
7102
|
-
|
7103
|
-
case 'string':
|
7104
|
-
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
7105
|
-
.replace(/'/g, "\\'")
|
7106
|
-
.replace(/\\"/g, '"') + '\'';
|
7107
|
-
return stylize(simple, 'string');
|
7108
|
-
|
7109
|
-
case 'number':
|
7110
|
-
return stylize('' + value, 'number');
|
7111
|
-
|
7112
|
-
case 'boolean':
|
7113
|
-
return stylize('' + value, 'boolean');
|
7114
|
-
}
|
7115
|
-
// For some reason typeof null is "object", so special case here.
|
7116
|
-
if (value === null) {
|
7117
|
-
return stylize('null', 'null');
|
7118
|
-
}
|
7119
|
-
|
7120
|
-
// Look up the keys of the object.
|
7121
|
-
var visible_keys = Object_keys(value);
|
7122
|
-
var keys = showHidden ? Object_getOwnPropertyNames(value) : visible_keys;
|
7123
|
-
|
7124
|
-
// Functions without properties can be shortcutted.
|
7125
|
-
if (typeof value === 'function' && keys.length === 0) {
|
7126
|
-
if (isRegExp(value)) {
|
7127
|
-
return stylize('' + value, 'regexp');
|
7128
|
-
} else {
|
7129
|
-
var name = value.name ? ': ' + value.name : '';
|
7130
|
-
return stylize('[Function' + name + ']', 'special');
|
7131
|
-
}
|
7132
|
-
}
|
7133
|
-
|
7134
|
-
// Dates without properties can be shortcutted
|
7135
|
-
if (isDate(value) && keys.length === 0) {
|
7136
|
-
return stylize(value.toUTCString(), 'date');
|
7137
|
-
}
|
7138
|
-
|
7139
|
-
var base, type, braces;
|
7140
|
-
// Determine the object type
|
7141
|
-
if (isArray(value)) {
|
7142
|
-
type = 'Array';
|
7143
|
-
braces = ['[', ']'];
|
7144
|
-
} else {
|
7145
|
-
type = 'Object';
|
7146
|
-
braces = ['{', '}'];
|
7147
|
-
}
|
7148
|
-
|
7149
|
-
// Make functions say that they are functions
|
7150
|
-
if (typeof value === 'function') {
|
7151
|
-
var n = value.name ? ': ' + value.name : '';
|
7152
|
-
base = (isRegExp(value)) ? ' ' + value : ' [Function' + n + ']';
|
7153
|
-
} else {
|
7154
|
-
base = '';
|
7155
|
-
}
|
7156
|
-
|
7157
|
-
// Make dates with properties first say the date
|
7158
|
-
if (isDate(value)) {
|
7159
|
-
base = ' ' + value.toUTCString();
|
7160
|
-
}
|
7161
|
-
|
7162
|
-
if (keys.length === 0) {
|
7163
|
-
return braces[0] + base + braces[1];
|
7164
|
-
}
|
7165
|
-
|
7166
|
-
if (recurseTimes < 0) {
|
7167
|
-
if (isRegExp(value)) {
|
7168
|
-
return stylize('' + value, 'regexp');
|
7169
|
-
} else {
|
7170
|
-
return stylize('[Object]', 'special');
|
7171
|
-
}
|
7172
|
-
}
|
6566
|
+
if (visitor.enter) {
|
6567
|
+
target = visitor.enter(tuple[0], leavelist[leavelist.length - 1][0], notify);
|
6568
|
+
if (target !== undefined) {
|
6569
|
+
node = target;
|
6570
|
+
}
|
6571
|
+
tuple[1][tuple[2]] = node;
|
6572
|
+
tuple[0] = node;
|
6573
|
+
}
|
7173
6574
|
|
7174
|
-
|
6575
|
+
if (ret === VisitorOption.Break) {
|
6576
|
+
return result.top;
|
6577
|
+
}
|
7175
6578
|
|
7176
|
-
|
7177
|
-
|
7178
|
-
|
7179
|
-
|
7180
|
-
|
7181
|
-
|
7182
|
-
|
7183
|
-
|
7184
|
-
|
7185
|
-
|
7186
|
-
|
7187
|
-
|
7188
|
-
|
7189
|
-
|
7190
|
-
|
7191
|
-
|
7192
|
-
|
7193
|
-
|
7194
|
-
|
7195
|
-
|
7196
|
-
|
7197
|
-
|
7198
|
-
|
7199
|
-
|
7200
|
-
|
7201
|
-
|
7202
|
-
|
7203
|
-
|
7204
|
-
return ' ' + line;
|
7205
|
-
}).join('\n').substr(2);
|
7206
|
-
} else {
|
7207
|
-
str = '\n' + str.split('\n').map(function(line) {
|
7208
|
-
return ' ' + line;
|
7209
|
-
}).join('\n');
|
6579
|
+
if (tuple[0]) {
|
6580
|
+
worklist.push(marker);
|
6581
|
+
leavelist.push(tuple);
|
6582
|
+
|
6583
|
+
if (ret !== VisitorOption.Skip) {
|
6584
|
+
candidates = VisitorKeys[nodeType];
|
6585
|
+
current = candidates.length;
|
6586
|
+
while ((current -= 1) >= 0) {
|
6587
|
+
candidate = node[candidates[current]];
|
6588
|
+
if (candidate) {
|
6589
|
+
if (isArray(candidate)) {
|
6590
|
+
current2 = candidate.length;
|
6591
|
+
while ((current2 -= 1) >= 0) {
|
6592
|
+
if (candidate[current2]) {
|
6593
|
+
if(nodeType === Syntax.ObjectExpression && 'properties' === candidates[current] && null == candidates[current].type) {
|
6594
|
+
worklist.push([{type: 'PropertyWrapper', node: candidate[current2]}, candidate, current2]);
|
6595
|
+
} else {
|
6596
|
+
worklist.push([candidate[current2], candidate, current2]);
|
6597
|
+
}
|
6598
|
+
}
|
6599
|
+
}
|
6600
|
+
} else {
|
6601
|
+
worklist.push([candidate, node, candidates[current]]);
|
6602
|
+
}
|
6603
|
+
}
|
6604
|
+
}
|
6605
|
+
}
|
6606
|
+
}
|
7210
6607
|
}
|
7211
|
-
}
|
7212
|
-
} else {
|
7213
|
-
str = stylize('[Circular]', 'special');
|
7214
|
-
}
|
7215
|
-
}
|
7216
|
-
if (typeof name === 'undefined') {
|
7217
|
-
if (type === 'Array' && key.match(/^\d+$/)) {
|
7218
|
-
return str;
|
7219
|
-
}
|
7220
|
-
name = JSON.stringify('' + key);
|
7221
|
-
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
7222
|
-
name = name.substr(1, name.length - 2);
|
7223
|
-
name = stylize(name, 'name');
|
7224
|
-
} else {
|
7225
|
-
name = name.replace(/'/g, "\\'")
|
7226
|
-
.replace(/\\"/g, '"')
|
7227
|
-
.replace(/(^"|"$)/g, "'");
|
7228
|
-
name = stylize(name, 'string');
|
7229
6608
|
}
|
7230
|
-
}
|
7231
6609
|
|
7232
|
-
|
7233
|
-
}
|
6610
|
+
return result.top;
|
6611
|
+
}
|
7234
6612
|
|
7235
|
-
|
6613
|
+
exports.version = '0.0.4';
|
6614
|
+
exports.Syntax = Syntax;
|
6615
|
+
exports.traverse = traverse;
|
6616
|
+
exports.replace = replace;
|
6617
|
+
exports.VisitorKeys = VisitorKeys;
|
6618
|
+
exports.VisitorOption = VisitorOption;
|
6619
|
+
}));
|
6620
|
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
7236
6621
|
|
7237
|
-
|
7238
|
-
|
7239
|
-
numLinesEst++;
|
7240
|
-
if (cur.indexOf('\n') >= 0) numLinesEst++;
|
7241
|
-
return prev + cur.length + 1;
|
7242
|
-
}, 0);
|
6622
|
+
})()
|
6623
|
+
},{}],4:[function(require,module,exports){
|
7243
6624
|
|
7244
|
-
|
7245
|
-
output = braces[0] +
|
7246
|
-
(base === '' ? '' : base + '\n ') +
|
7247
|
-
' ' +
|
7248
|
-
output.join(',\n ') +
|
7249
|
-
' ' +
|
7250
|
-
braces[1];
|
6625
|
+
var clone = require('clone');
|
7251
6626
|
|
7252
|
-
|
7253
|
-
|
7254
|
-
|
6627
|
+
var Astral = function () {
|
6628
|
+
this._passes = {};
|
6629
|
+
this._info = {};
|
6630
|
+
};
|
7255
6631
|
|
7256
|
-
|
6632
|
+
Astral.prototype.register = function (pass) {
|
6633
|
+
if (!pass.name) {
|
6634
|
+
throw new Error("Expected '" + pass.name + "' pass to have a name");
|
7257
6635
|
}
|
7258
|
-
|
6636
|
+
if (!pass.run) {
|
6637
|
+
throw new Error("Expected '" + pass.name + "' pass to have a 'run' method");
|
6638
|
+
}
|
6639
|
+
if (!pass.prereqs || !(pass.prereqs instanceof Array)) {
|
6640
|
+
throw new Error("Expected '" + pass.name + "' pass to have a 'prereqs' Array");
|
6641
|
+
}
|
6642
|
+
this._passes[pass.name] = pass;
|
7259
6643
|
};
|
7260
6644
|
|
6645
|
+
// modifies the original AST
|
6646
|
+
Astral.prototype.run = function (ast) {
|
7261
6647
|
|
7262
|
-
function
|
7263
|
-
|
7264
|
-
|
7265
|
-
(ar && ar !== Object.prototype && isArray(ar.__proto__));
|
7266
|
-
}
|
6648
|
+
this._order().forEach(function (pass) {
|
6649
|
+
this._info[pass.name] = pass.run(ast, clone(this._info));
|
6650
|
+
}, this);
|
7267
6651
|
|
6652
|
+
return ast;
|
6653
|
+
};
|
7268
6654
|
|
7269
|
-
function isRegExp(re) {
|
7270
|
-
return re instanceof RegExp ||
|
7271
|
-
(typeof re === 'object' && Object.prototype.toString.call(re) === '[object RegExp]');
|
7272
|
-
}
|
7273
6655
|
|
6656
|
+
// returns the passes in order based on prereqs
|
6657
|
+
Astral.prototype._order = function (ast) {
|
7274
6658
|
|
7275
|
-
|
7276
|
-
if (d instanceof Date) return true;
|
7277
|
-
if (typeof d !== 'object') return false;
|
7278
|
-
var properties = Date.prototype && Object_getOwnPropertyNames(Date.prototype);
|
7279
|
-
var proto = d.__proto__ && Object_getOwnPropertyNames(d.__proto__);
|
7280
|
-
return JSON.stringify(proto) === JSON.stringify(properties);
|
7281
|
-
}
|
6659
|
+
var passes = this._passes;
|
7282
6660
|
|
7283
|
-
|
7284
|
-
return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
7285
|
-
}
|
6661
|
+
var order = [];
|
7286
6662
|
|
7287
|
-
var
|
7288
|
-
|
6663
|
+
var toOrder = Object.keys(passes).map(function (name) {
|
6664
|
+
return passes[name];
|
6665
|
+
}, this);
|
7289
6666
|
|
7290
|
-
|
7291
|
-
function timestamp() {
|
7292
|
-
var d = new Date();
|
7293
|
-
var time = [pad(d.getHours()),
|
7294
|
-
pad(d.getMinutes()),
|
7295
|
-
pad(d.getSeconds())].join(':');
|
7296
|
-
return [d.getDate(), months[d.getMonth()], time].join(' ');
|
7297
|
-
}
|
6667
|
+
var progress = false;
|
7298
6668
|
|
7299
|
-
|
6669
|
+
do {
|
6670
|
+
var add = toOrder.filter(function (pass) {
|
6671
|
+
return !pass.prereqs.
|
6672
|
+
map(function (prereq) {
|
6673
|
+
return passes[prereq];
|
6674
|
+
}).
|
6675
|
+
filter(function (prereq) {
|
6676
|
+
return prereq;
|
6677
|
+
}).
|
6678
|
+
some(function (prereq) {
|
6679
|
+
return order.indexOf(prereq) === -1;
|
6680
|
+
});
|
6681
|
+
});
|
6682
|
+
if (add.length > 0) {
|
6683
|
+
progress = true;
|
6684
|
+
|
6685
|
+
order = order.concat(add);
|
6686
|
+
add.forEach(function (a) {
|
6687
|
+
toOrder.splice(toOrder.indexOf(a), 1);
|
6688
|
+
});
|
6689
|
+
}
|
6690
|
+
} while (toOrder.length > 0 && progress);
|
7300
6691
|
|
7301
|
-
exports.pump = null;
|
7302
6692
|
|
7303
|
-
|
7304
|
-
|
7305
|
-
|
7306
|
-
|
6693
|
+
if (toOrder > 0) {
|
6694
|
+
return new Error("Unable to order " + toOrder.toString());
|
6695
|
+
}
|
6696
|
+
|
6697
|
+
return order;
|
7307
6698
|
};
|
7308
6699
|
|
7309
|
-
|
7310
|
-
|
7311
|
-
for (var key in obj) {
|
7312
|
-
if (Object.hasOwnProperty.call(obj, key)) res.push(key);
|
7313
|
-
}
|
7314
|
-
return res;
|
6700
|
+
module.exports = function () {
|
6701
|
+
return new Astral();
|
7315
6702
|
};
|
7316
6703
|
|
7317
|
-
|
7318
|
-
|
7319
|
-
|
7320
|
-
|
7321
|
-
|
6704
|
+
},{"clone":14}],9:[function(require,module,exports){
|
6705
|
+
|
6706
|
+
var annotateInjectable = require('../lib/annotate-injectable');
|
6707
|
+
var deepApply = require('../lib/deep-apply');
|
6708
|
+
|
6709
|
+
// mark provider description objects
|
6710
|
+
var pdoAnnotatorPass = {};
|
6711
|
+
pdoAnnotatorPass.name = 'angular:annotator:pdo';
|
6712
|
+
pdoAnnotatorPass.prereqs = [
|
6713
|
+
'angular:annotator:mark'
|
6714
|
+
];
|
6715
|
+
|
6716
|
+
pdoAnnotatorPass.run = function (ast, info) {
|
6717
|
+
|
6718
|
+
deepApply(ast, [{
|
6719
|
+
"type": "CallExpression",
|
6720
|
+
"callee": {
|
6721
|
+
"type": "MemberExpression",
|
6722
|
+
"object": {
|
6723
|
+
"ngModule": true
|
6724
|
+
},
|
6725
|
+
"property": {
|
6726
|
+
"type": "Identifier",
|
6727
|
+
"name": "provider"
|
6728
|
+
}
|
7322
6729
|
}
|
7323
|
-
|
7324
|
-
|
7325
|
-
|
7326
|
-
|
7327
|
-
|
6730
|
+
}], function (providerChunk) {
|
6731
|
+
|
6732
|
+
// PDO annotations - defined by function
|
6733
|
+
|
6734
|
+
deepApply(providerChunk, [{
|
6735
|
+
"type": "ExpressionStatement",
|
6736
|
+
"expression": {
|
6737
|
+
"type": "AssignmentExpression",
|
6738
|
+
"left": {
|
6739
|
+
"type": "MemberExpression",
|
6740
|
+
"object": {
|
6741
|
+
"type": "ThisExpression"
|
6742
|
+
},
|
6743
|
+
"property": {
|
6744
|
+
"type": "Identifier",
|
6745
|
+
"name": "$get"
|
6746
|
+
}
|
6747
|
+
},
|
6748
|
+
"right": {
|
6749
|
+
"type": "FunctionExpression"
|
7328
6750
|
}
|
7329
|
-
|
7330
|
-
|
7331
|
-
|
7332
|
-
|
7333
|
-
}
|
7334
|
-
if (typeof properties !== 'undefined' && Object.defineProperties) {
|
7335
|
-
Object.defineProperties(object, properties);
|
7336
|
-
}
|
7337
|
-
return object;
|
7338
|
-
};
|
6751
|
+
}
|
6752
|
+
}], function (pdoChunk) {
|
6753
|
+
pdoChunk.expression.right = annotateInjectable(pdoChunk.expression.right);
|
6754
|
+
});
|
7339
6755
|
|
7340
|
-
|
7341
|
-
|
7342
|
-
|
7343
|
-
|
7344
|
-
|
7345
|
-
|
7346
|
-
|
7347
|
-
|
7348
|
-
|
6756
|
+
// PDO annotations defined by object
|
6757
|
+
|
6758
|
+
deepApply(providerChunk, [{
|
6759
|
+
"type": "ObjectExpression"
|
6760
|
+
}], function(objectChunk) {
|
6761
|
+
objectChunk.properties.forEach(function (property) {
|
6762
|
+
deepApply(property, [{
|
6763
|
+
"type": "Property",
|
6764
|
+
"key": {
|
6765
|
+
"type": "Identifier",
|
6766
|
+
"name": "$get"
|
6767
|
+
},
|
6768
|
+
"value": {
|
6769
|
+
"type": "FunctionExpression"
|
6770
|
+
}
|
6771
|
+
}], function (propertyChunk) {
|
6772
|
+
propertyChunk.value = annotateInjectable(propertyChunk.value);
|
6773
|
+
});
|
6774
|
+
});
|
6775
|
+
});
|
7349
6776
|
});
|
7350
6777
|
};
|
7351
6778
|
|
7352
|
-
|
7353
|
-
exports.format = function(f) {
|
7354
|
-
if (typeof f !== 'string') {
|
7355
|
-
var objects = [];
|
7356
|
-
for (var i = 0; i < arguments.length; i++) {
|
7357
|
-
objects.push(exports.inspect(arguments[i]));
|
7358
|
-
}
|
7359
|
-
return objects.join(' ');
|
7360
|
-
}
|
6779
|
+
module.exports = pdoAnnotatorPass;
|
7361
6780
|
|
7362
|
-
|
7363
|
-
|
7364
|
-
|
7365
|
-
|
7366
|
-
|
7367
|
-
|
7368
|
-
|
7369
|
-
|
7370
|
-
|
7371
|
-
|
7372
|
-
|
7373
|
-
|
6781
|
+
},{"../lib/annotate-injectable":15,"../lib/deep-apply":16}],10:[function(require,module,exports){
|
6782
|
+
// mark directive description objects
|
6783
|
+
|
6784
|
+
var annotateInjectable = require('../lib/annotate-injectable');
|
6785
|
+
var deepApply = require('../lib/deep-apply');
|
6786
|
+
|
6787
|
+
var ddoAnnotatorPass = module.exports = {};
|
6788
|
+
ddoAnnotatorPass.name = 'angular:annotator:ddo';
|
6789
|
+
ddoAnnotatorPass.prereqs = [
|
6790
|
+
'angular:annotator:mark'
|
6791
|
+
];
|
6792
|
+
|
6793
|
+
ddoAnnotatorPass.run = function (ast, info) {
|
6794
|
+
deepApply(ast, [{
|
6795
|
+
"type": "CallExpression",
|
6796
|
+
"callee": {
|
6797
|
+
"type": "MemberExpression",
|
6798
|
+
"object": {
|
6799
|
+
"ngModule": true
|
6800
|
+
},
|
6801
|
+
"property": {
|
6802
|
+
"type": "Identifier",
|
6803
|
+
"name": "directive"
|
6804
|
+
}
|
7374
6805
|
}
|
6806
|
+
}], function (directiveChunk) {
|
6807
|
+
deepApply(directiveChunk, [{
|
6808
|
+
"type": "ReturnStatement",
|
6809
|
+
"argument": {
|
6810
|
+
"type": "ObjectExpression"
|
6811
|
+
}
|
6812
|
+
}], function (returnChunk) {
|
6813
|
+
deepApply(returnChunk, [{
|
6814
|
+
"type": "Property",
|
6815
|
+
"key": {
|
6816
|
+
"type": "Identifier",
|
6817
|
+
"name": "controller"
|
6818
|
+
},
|
6819
|
+
"value": {
|
6820
|
+
"type": "FunctionExpression"
|
6821
|
+
}
|
6822
|
+
}], function (controllerChunk) {
|
6823
|
+
controllerChunk.value = annotateInjectable(controllerChunk.value);
|
6824
|
+
});
|
6825
|
+
});
|
7375
6826
|
});
|
7376
|
-
for(var x = args[i]; i < len; x = args[++i]){
|
7377
|
-
if (x === null || typeof x !== 'object') {
|
7378
|
-
str += ' ' + x;
|
7379
|
-
} else {
|
7380
|
-
str += ' ' + exports.inspect(x);
|
7381
|
-
}
|
7382
|
-
}
|
7383
|
-
return str;
|
7384
6827
|
};
|
7385
6828
|
|
7386
|
-
},{"
|
6829
|
+
},{"../lib/annotate-injectable":15,"../lib/deep-apply":16}],17:[function(require,module,exports){
|
7387
6830
|
require=(function(e,t,n,r){function i(r){if(!n[r]){if(!t[r]){if(e)return e(r);throw new Error("Cannot find module '"+r+"'")}var s=n[r]={exports:{}};t[r][0](function(e){var n=t[r][1][e];return i(n?n:e)},s,s.exports)}return n[r].exports}for(var s=0;s<r.length;s++)i(r[s]);return i})(typeof require!=="undefined"&&require,{1:[function(require,module,exports){
|
7388
6831
|
exports.readIEEE754 = function(buffer, offset, isBE, mLen, nBytes) {
|
7389
6832
|
var e, m,
|
@@ -11248,10 +10691,23 @@ SlowBuffer.prototype.writeDoubleBE = Buffer.prototype.writeDoubleBE;
|
|
11248
10691
|
},{}]},{},[])
|
11249
10692
|
;;module.exports=require("buffer-browserify")
|
11250
10693
|
|
11251
|
-
},{}],
|
10694
|
+
},{}],14:[function(require,module,exports){
|
11252
10695
|
(function(Buffer){"use strict";
|
10696
|
+
function objectToString(o) {
|
10697
|
+
return Object.prototype.toString.call(o);
|
10698
|
+
}
|
11253
10699
|
|
11254
|
-
var util =
|
10700
|
+
var util = {
|
10701
|
+
isArray: function (ar) {
|
10702
|
+
return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]');
|
10703
|
+
},
|
10704
|
+
isDate: function (d) {
|
10705
|
+
return typeof d === 'object' && objectToString(d) === '[object Date]';
|
10706
|
+
},
|
10707
|
+
isRegExp: function (re) {
|
10708
|
+
return typeof re === 'object' && objectToString(re) === '[object RegExp]';
|
10709
|
+
}
|
10710
|
+
};
|
11255
10711
|
|
11256
10712
|
module.exports = clone;
|
11257
10713
|
|
@@ -11328,52 +10784,216 @@ function clone(parent, circular) {
|
|
11328
10784
|
return child;
|
11329
10785
|
}
|
11330
10786
|
|
11331
|
-
var i;
|
11332
|
-
if (circular) {
|
11333
|
-
var cloned = _clone(parent, '*');
|
10787
|
+
var i;
|
10788
|
+
if (circular) {
|
10789
|
+
var cloned = _clone(parent, '*');
|
10790
|
+
|
10791
|
+
// Now this object has been cloned. Let's check to see if there are any
|
10792
|
+
// circular references for it
|
10793
|
+
for(i in circularReplace) {
|
10794
|
+
var c = circularReplace[i];
|
10795
|
+
if (c && c.child && c.i in c.child) {
|
10796
|
+
c.child[c.i] = circularResolved[c.resolveTo];
|
10797
|
+
}
|
10798
|
+
}
|
10799
|
+
return cloned;
|
10800
|
+
} else {
|
10801
|
+
// Deep clone all properties of parent into child
|
10802
|
+
var child;
|
10803
|
+
if (typeof parent == 'object') {
|
10804
|
+
if (parent == null)
|
10805
|
+
return parent;
|
10806
|
+
if (parent.constructor.name === 'Array') {
|
10807
|
+
child = [];
|
10808
|
+
for(i in parent)
|
10809
|
+
child[i] = clone(parent[i], circular);
|
10810
|
+
}
|
10811
|
+
else if (util.isDate(parent))
|
10812
|
+
child = new Date(parent.getTime() );
|
10813
|
+
else if (util.isRegExp(parent))
|
10814
|
+
child = new RegExp(parent.source);
|
10815
|
+
else {
|
10816
|
+
child = {};
|
10817
|
+
child.__proto__ = parent.__proto__;
|
10818
|
+
for(i in parent)
|
10819
|
+
child[i] = clone(parent[i], circular);
|
10820
|
+
}
|
10821
|
+
}
|
10822
|
+
else
|
10823
|
+
child = parent; // Just a simple shallow clone will do
|
10824
|
+
return child;
|
10825
|
+
}
|
10826
|
+
}
|
10827
|
+
|
10828
|
+
/**
|
10829
|
+
* Simple flat clone using prototype, accepts only objects, usefull for property
|
10830
|
+
* override on FLAT configuration object (no nested props).
|
10831
|
+
*
|
10832
|
+
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
|
10833
|
+
* works.
|
10834
|
+
*/
|
10835
|
+
clone.clonePrototype = function(parent) {
|
10836
|
+
if (parent === null)
|
10837
|
+
return null;
|
10838
|
+
|
10839
|
+
var c = function () {};
|
10840
|
+
c.prototype = parent;
|
10841
|
+
return new c();
|
10842
|
+
};
|
10843
|
+
|
10844
|
+
})(require("__browserify_buffer").Buffer)
|
10845
|
+
},{"__browserify_buffer":17}],18:[function(require,module,exports){
|
10846
|
+
/*
|
10847
|
+
* Identify AST blocks that refer to an AngularJS module
|
10848
|
+
*/
|
10849
|
+
module.exports = {
|
10850
|
+
"type": "CallExpression",
|
10851
|
+
"callee": {
|
10852
|
+
"type": "MemberExpression",
|
10853
|
+
"object": {
|
10854
|
+
"type": "Identifier",
|
10855
|
+
"name": "angular"
|
10856
|
+
},
|
10857
|
+
"property": {
|
10858
|
+
"type": "Identifier",
|
10859
|
+
"name": "module"
|
10860
|
+
}
|
10861
|
+
}
|
10862
|
+
};
|
10863
|
+
|
10864
|
+
},{}],19:[function(require,module,exports){
|
10865
|
+
|
10866
|
+
/*
|
10867
|
+
* Simple AST structure to match against
|
10868
|
+
* ex: `angular.module('whatevs').controller( ... )`
|
10869
|
+
*/
|
10870
|
+
|
10871
|
+
module.exports = [
|
10872
|
+
|
10873
|
+
{
|
10874
|
+
"type": "CallExpression",
|
10875
|
+
"callee": {
|
10876
|
+
"type": "MemberExpression",
|
10877
|
+
"object": {
|
10878
|
+
"ngModule": true
|
10879
|
+
},
|
10880
|
+
"property": {
|
10881
|
+
"type": "Identifier",
|
10882
|
+
"name": /^(constant|value)$/
|
10883
|
+
}
|
10884
|
+
}
|
10885
|
+
},
|
10886
|
+
|
10887
|
+
{
|
10888
|
+
"type": "CallExpression",
|
10889
|
+
"callee": {
|
10890
|
+
"type": "MemberExpression",
|
10891
|
+
"object": {
|
10892
|
+
"ngModule": true
|
10893
|
+
},
|
10894
|
+
"property": {
|
10895
|
+
"type": "Identifier",
|
10896
|
+
"name": /^(controller|directive|filter|service|factory|decorator|provider)$/
|
10897
|
+
}
|
10898
|
+
},
|
10899
|
+
"arguments": [
|
10900
|
+
{},
|
10901
|
+
{
|
10902
|
+
"type": "FunctionExpression"
|
10903
|
+
}
|
10904
|
+
]
|
10905
|
+
},
|
10906
|
+
|
10907
|
+
{
|
10908
|
+
"type": "CallExpression",
|
10909
|
+
"callee": {
|
10910
|
+
"type": "MemberExpression",
|
10911
|
+
"object": {
|
10912
|
+
"ngModule": true
|
10913
|
+
},
|
10914
|
+
"property": {
|
10915
|
+
"type": "Identifier",
|
10916
|
+
"name": "provider"
|
10917
|
+
}
|
10918
|
+
},
|
10919
|
+
"arguments": [
|
10920
|
+
{},
|
10921
|
+
{
|
10922
|
+
"type": "ObjectExpression"
|
10923
|
+
}
|
10924
|
+
]
|
10925
|
+
},
|
10926
|
+
|
10927
|
+
{
|
10928
|
+
"type": "CallExpression",
|
10929
|
+
"callee": {
|
10930
|
+
"type": "MemberExpression",
|
10931
|
+
"object": {
|
10932
|
+
"ngModule": true
|
10933
|
+
},
|
10934
|
+
"property": {
|
10935
|
+
"type": "Identifier",
|
10936
|
+
"name": /^(config|run)$/
|
10937
|
+
}
|
10938
|
+
},
|
10939
|
+
"arguments": [
|
10940
|
+
{
|
10941
|
+
"type": "FunctionExpression"
|
10942
|
+
}
|
10943
|
+
]
|
10944
|
+
}
|
10945
|
+
|
10946
|
+
];
|
10947
|
+
|
10948
|
+
},{}],20:[function(require,module,exports){
|
10949
|
+
module.exports = {
|
10950
|
+
"type": "ExpressionStatement",
|
10951
|
+
"expression": {
|
10952
|
+
"type": "AssignmentExpression",
|
10953
|
+
"operator": "=",
|
10954
|
+
"left": {
|
10955
|
+
"type": "Identifier"
|
10956
|
+
},
|
10957
|
+
"right": {
|
10958
|
+
"ngModule": true
|
10959
|
+
}
|
10960
|
+
}
|
10961
|
+
};
|
10962
|
+
|
10963
|
+
},{}],21:[function(require,module,exports){
|
10964
|
+
module.exports = {
|
10965
|
+
"type": "VariableDeclarator",
|
10966
|
+
"init": {
|
10967
|
+
"ngModule": true
|
10968
|
+
}
|
10969
|
+
};
|
10970
|
+
|
10971
|
+
},{}],15:[function(require,module,exports){
|
11334
10972
|
|
11335
|
-
|
11336
|
-
|
11337
|
-
|
11338
|
-
|
11339
|
-
|
11340
|
-
|
11341
|
-
}
|
11342
|
-
}
|
11343
|
-
return cloned;
|
11344
|
-
} else {
|
11345
|
-
// Deep clone all properties of parent into child
|
11346
|
-
var child;
|
11347
|
-
if (typeof parent == 'object') {
|
11348
|
-
if (parent == null)
|
11349
|
-
return parent;
|
11350
|
-
if (parent.constructor.name === 'Array') {
|
11351
|
-
child = [];
|
11352
|
-
for(i in parent)
|
11353
|
-
child[i] = clone(parent[i], circular);
|
11354
|
-
}
|
11355
|
-
else if (util.isDate(parent))
|
11356
|
-
child = new Date(parent.getTime() );
|
11357
|
-
else if (util.isRegExp(parent))
|
11358
|
-
child = new RegExp(parent.source);
|
11359
|
-
else {
|
11360
|
-
child = {};
|
11361
|
-
child.__proto__ = parent.__proto__;
|
11362
|
-
for(i in parent)
|
11363
|
-
child[i] = clone(parent[i], circular);
|
11364
|
-
}
|
11365
|
-
}
|
11366
|
-
else
|
11367
|
-
child = parent; // Just a simple shallow clone will do
|
11368
|
-
return child;
|
10973
|
+
// given an AST chunk for a fn,
|
10974
|
+
// return an AST chunk representing an annotation array
|
10975
|
+
var annotateInjectable = module.exports = function (originalFn) {
|
10976
|
+
// if there's nothing to inject, don't annotate
|
10977
|
+
if (!originalFn.params || originalFn.params.length === 0) {
|
10978
|
+
return originalFn;
|
11369
10979
|
}
|
11370
|
-
}
|
11371
10980
|
|
11372
|
-
|
11373
|
-
|
10981
|
+
var newParam = {
|
10982
|
+
type: 'ArrayExpression',
|
10983
|
+
elements: []
|
10984
|
+
};
|
10985
|
+
|
10986
|
+
originalFn.params.forEach(function (param) {
|
10987
|
+
newParam.elements.push({
|
10988
|
+
"type": "Literal",
|
10989
|
+
"value": param.name
|
10990
|
+
});
|
10991
|
+
});
|
10992
|
+
newParam.elements.push(originalFn);
|
10993
|
+
return newParam;
|
10994
|
+
};
|
11374
10995
|
|
11375
|
-
}
|
11376
|
-
},{"util":17,"./clonePrototype.js":20,"__browserify_buffer":19}],15:[function(require,module,exports){
|
10996
|
+
},{}],13:[function(require,module,exports){
|
11377
10997
|
/*
|
11378
10998
|
* Copyright 2009-2011 Mozilla Foundation and contributors
|
11379
10999
|
* Licensed under the New BSD license. See LICENSE.txt or:
|
@@ -11383,268 +11003,374 @@ exports.SourceMapGenerator = require('./source-map/source-map-generator').Source
|
|
11383
11003
|
exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer;
|
11384
11004
|
exports.SourceNode = require('./source-map/source-node').SourceNode;
|
11385
11005
|
|
11386
|
-
},{"./source-map/source-map-generator":
|
11387
|
-
|
11388
|
-
|
11389
|
-
|
11006
|
+
},{"./source-map/source-map-generator":22,"./source-map/source-map-consumer":23,"./source-map/source-node":24}],16:[function(require,module,exports){
|
11007
|
+
/*
|
11008
|
+
* Checks each property of the standard recursively against the candidate,
|
11009
|
+
* runs `cb` on all branches that match the standard
|
11010
|
+
*/
|
11390
11011
|
|
11391
|
-
|
11392
|
-
var canSetImmediate = typeof window !== 'undefined'
|
11393
|
-
&& window.setImmediate;
|
11394
|
-
var canPost = typeof window !== 'undefined'
|
11395
|
-
&& window.postMessage && window.addEventListener
|
11396
|
-
;
|
11012
|
+
var deepCompare = require('./deep-compare.js');
|
11397
11013
|
|
11398
|
-
|
11399
|
-
|
11400
|
-
|
11014
|
+
var deepApply = module.exports = function (candidate, standards, cb) {
|
11015
|
+
// depth-first
|
11016
|
+
for (var prop in candidate) {
|
11017
|
+
if (candidate.hasOwnProperty(prop)) {
|
11401
11018
|
|
11402
|
-
|
11403
|
-
|
11404
|
-
|
11405
|
-
|
11406
|
-
|
11407
|
-
if (queue.length > 0) {
|
11408
|
-
var fn = queue.shift();
|
11409
|
-
fn();
|
11410
|
-
}
|
11411
|
-
}
|
11412
|
-
}, true);
|
11019
|
+
// array
|
11020
|
+
if (candidate[prop] instanceof Array) {
|
11021
|
+
for (var i = 0; i < candidate[prop].length; i += 1) {
|
11022
|
+
deepApply(candidate[prop][i], standards, cb);
|
11023
|
+
}
|
11413
11024
|
|
11414
|
-
|
11415
|
-
|
11416
|
-
|
11417
|
-
|
11025
|
+
// object
|
11026
|
+
} else if (typeof candidate[prop] === 'object') {
|
11027
|
+
deepApply(candidate[prop], standards, cb);
|
11028
|
+
}
|
11418
11029
|
}
|
11030
|
+
}
|
11419
11031
|
|
11420
|
-
|
11421
|
-
|
11422
|
-
|
11423
|
-
}
|
11032
|
+
standards.forEach(function (standard) {
|
11033
|
+
if (deepCompare(candidate, standard)) {
|
11034
|
+
cb(candidate);
|
11035
|
+
}
|
11036
|
+
});
|
11037
|
+
};
|
11424
11038
|
|
11425
|
-
|
11426
|
-
|
11427
|
-
process.env = {};
|
11428
|
-
process.argv = [];
|
11039
|
+
},{"./deep-compare.js":25}],7:[function(require,module,exports){
|
11040
|
+
// mark calls off of referenced 'ngModule's
|
11429
11041
|
|
11430
|
-
|
11431
|
-
throw new Error('process.binding is not supported');
|
11432
|
-
}
|
11042
|
+
var refPass = module.exports = require('astral-pass')();
|
11433
11043
|
|
11434
|
-
|
11435
|
-
|
11436
|
-
|
11437
|
-
|
11438
|
-
};
|
11044
|
+
refPass.name = 'angular:annotator:ref';
|
11045
|
+
refPass.prereqs = [
|
11046
|
+
'angular:annotator:mark'
|
11047
|
+
];
|
11439
11048
|
|
11440
|
-
|
11441
|
-
(
|
11049
|
+
refPass.
|
11050
|
+
when(require('../signatures/assign')).
|
11051
|
+
when(require('../signatures/decl')).
|
11052
|
+
do(function (chunk, info) {
|
11053
|
+
info = info[refPass.name];
|
11442
11054
|
|
11443
|
-
|
11444
|
-
|
11445
|
-
? Array.isArray
|
11446
|
-
: function (xs) {
|
11447
|
-
return Object.prototype.toString.call(xs) === '[object Array]'
|
11055
|
+
if (!info.modules) {
|
11056
|
+
info.modules = [];
|
11448
11057
|
}
|
11449
|
-
|
11450
|
-
|
11451
|
-
|
11452
|
-
|
11453
|
-
|
11058
|
+
|
11059
|
+
var id = chunk.id ?
|
11060
|
+
chunk.id.name :
|
11061
|
+
chunk.expression.left.name;
|
11062
|
+
|
11063
|
+
if (info.modules.indexOf(id) === -1) {
|
11064
|
+
info.modules.push(id);
|
11454
11065
|
}
|
11455
|
-
return -1;
|
11456
|
-
}
|
11457
11066
|
|
11458
|
-
|
11459
|
-
|
11460
|
-
// helps finding memory leaks.
|
11461
|
-
//
|
11462
|
-
// Obviously not all Emitters should be limited to 10. This function allows
|
11463
|
-
// that to be increased. Set to zero for unlimited.
|
11464
|
-
var defaultMaxListeners = 10;
|
11465
|
-
EventEmitter.prototype.setMaxListeners = function(n) {
|
11466
|
-
if (!this._events) this._events = {};
|
11467
|
-
this._events.maxListeners = n;
|
11468
|
-
};
|
11067
|
+
return info;
|
11068
|
+
});
|
11469
11069
|
|
11070
|
+
},{"../signatures/assign":20,"../signatures/decl":21,"astral-pass":26}],8:[function(require,module,exports){
|
11071
|
+
// annotate "ngModule"
|
11470
11072
|
|
11471
|
-
|
11472
|
-
|
11473
|
-
if (type === 'error') {
|
11474
|
-
if (!this._events || !this._events.error ||
|
11475
|
-
(isArray(this._events.error) && !this._events.error.length))
|
11476
|
-
{
|
11477
|
-
if (arguments[1] instanceof Error) {
|
11478
|
-
throw arguments[1]; // Unhandled 'error' event
|
11479
|
-
} else {
|
11480
|
-
throw new Error("Uncaught, unspecified 'error' event.");
|
11481
|
-
}
|
11482
|
-
return false;
|
11483
|
-
}
|
11484
|
-
}
|
11073
|
+
var annotateInjectable = require('../lib/annotate-injectable');
|
11074
|
+
var annotatorPass = module.exports = require('astral-pass')();
|
11485
11075
|
|
11486
|
-
|
11487
|
-
|
11488
|
-
|
11076
|
+
annotatorPass.name = 'angular:annotator';
|
11077
|
+
annotatorPass.prereqs = [
|
11078
|
+
'angular:annotator:mark'
|
11079
|
+
];
|
11489
11080
|
|
11490
|
-
|
11491
|
-
|
11492
|
-
|
11493
|
-
|
11494
|
-
|
11495
|
-
|
11496
|
-
|
11497
|
-
|
11498
|
-
|
11499
|
-
case 3:
|
11500
|
-
handler.call(this, arguments[1], arguments[2]);
|
11501
|
-
break;
|
11502
|
-
// slower
|
11503
|
-
default:
|
11504
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
11505
|
-
handler.apply(this, args);
|
11081
|
+
annotatorPass.
|
11082
|
+
when(require('../signatures/simple')).
|
11083
|
+
do(function (chunk, info) {
|
11084
|
+
var type;
|
11085
|
+
|
11086
|
+
if (chunk.callee &&
|
11087
|
+
chunk.callee.property &&
|
11088
|
+
chunk.callee.property.name) {
|
11089
|
+
type = chunk.callee.property.name;
|
11506
11090
|
}
|
11507
|
-
return true;
|
11508
11091
|
|
11509
|
-
|
11510
|
-
|
11092
|
+
var argIndex = 1;
|
11093
|
+
if (type === 'config' || type === 'run') {
|
11094
|
+
argIndex = 0;
|
11095
|
+
}
|
11511
11096
|
|
11512
|
-
|
11513
|
-
|
11514
|
-
listeners[i].apply(this, args);
|
11097
|
+
if (type === 'constant' || type === 'value') {
|
11098
|
+
return;
|
11515
11099
|
}
|
11516
|
-
|
11100
|
+
chunk.arguments[argIndex] = annotateInjectable(chunk.arguments[argIndex]);
|
11101
|
+
});
|
11517
11102
|
|
11518
|
-
|
11103
|
+
},{"../lib/annotate-injectable":15,"../signatures/simple":19,"astral-pass":26}],25:[function(require,module,exports){
|
11104
|
+
/*
|
11105
|
+
* Checks each property of the standard recursively against the candidate,
|
11106
|
+
* ignoring additional properties of the candidate.
|
11107
|
+
* Returns true iff the candidate matches each of the standard's
|
11108
|
+
* properties
|
11109
|
+
*/
|
11110
|
+
|
11111
|
+
var deepCompare = module.exports = function (candidate, standard) {
|
11112
|
+
if (!standard && !candidate) {
|
11113
|
+
return true;
|
11114
|
+
} else if (standard && !candidate) {
|
11519
11115
|
return false;
|
11520
11116
|
}
|
11521
|
-
|
11117
|
+
for (var prop in standard) {
|
11118
|
+
if (standard.hasOwnProperty(prop)) {
|
11522
11119
|
|
11523
|
-
//
|
11524
|
-
|
11525
|
-
|
11526
|
-
|
11527
|
-
|
11120
|
+
// undefinded case
|
11121
|
+
if (!candidate[prop]) {
|
11122
|
+
return false;
|
11123
|
+
|
11124
|
+
// regex
|
11125
|
+
} else if (standard[prop] instanceof RegExp) {
|
11126
|
+
if (!standard[prop].test(candidate[prop])) {
|
11127
|
+
return false;
|
11128
|
+
}
|
11129
|
+
|
11130
|
+
// array
|
11131
|
+
} else if (standard[prop] instanceof Array) {
|
11132
|
+
for (var i = 0; i < standard[prop].length; i += 1) {
|
11133
|
+
if (!deepCompare(candidate[prop][i], standard[prop][i])) {
|
11134
|
+
return false;
|
11135
|
+
}
|
11136
|
+
}
|
11137
|
+
|
11138
|
+
// object
|
11139
|
+
} else if (typeof standard[prop] === 'object') {
|
11140
|
+
if (!deepCompare(candidate[prop], standard[prop])) {
|
11141
|
+
return false;
|
11142
|
+
}
|
11143
|
+
|
11144
|
+
// primative case
|
11145
|
+
} else if (candidate[prop] !== standard[prop]) {
|
11146
|
+
return false;
|
11147
|
+
}
|
11148
|
+
}
|
11528
11149
|
}
|
11150
|
+
return true;
|
11151
|
+
};
|
11529
11152
|
|
11530
|
-
|
11153
|
+
},{}],6:[function(require,module,exports){
|
11154
|
+
// mark angular modules with "ngModule"
|
11531
11155
|
|
11532
|
-
|
11533
|
-
|
11534
|
-
this.emit('newListener', type, listener);
|
11156
|
+
var deepApply = require('../lib/deep-apply');
|
11157
|
+
var clone = require('clone');
|
11535
11158
|
|
11536
|
-
|
11537
|
-
|
11538
|
-
this._events[type] = listener;
|
11539
|
-
} else if (isArray(this._events[type])) {
|
11159
|
+
var modSigs = [ require('../signatures/module') ].
|
11160
|
+
concat(require('../signatures/simple'));
|
11540
11161
|
|
11541
|
-
|
11542
|
-
|
11543
|
-
|
11544
|
-
|
11545
|
-
|
11546
|
-
|
11547
|
-
|
11162
|
+
var refSigs = [
|
11163
|
+
require('../signatures/assign'),
|
11164
|
+
require('../signatures/decl')
|
11165
|
+
];
|
11166
|
+
|
11167
|
+
var idSigs = clone(require('../signatures/simple'));
|
11168
|
+
|
11169
|
+
var markPass = module.exports = {};
|
11170
|
+
|
11171
|
+
markPass.name = 'angular:annotator:mark';
|
11172
|
+
markPass.prereqs = [];
|
11173
|
+
markPass.run = function (ast, info) {
|
11174
|
+
|
11175
|
+
var moduleIds = [];
|
11176
|
+
|
11177
|
+
var findModules = function () {
|
11178
|
+
var res = false;
|
11179
|
+
deepApply(ast, modSigs, function (chunk) {
|
11180
|
+
if (!chunk.ngModule) {
|
11181
|
+
chunk.ngModule = true;
|
11182
|
+
res = true;
|
11548
11183
|
}
|
11184
|
+
});
|
11185
|
+
return res;
|
11186
|
+
};
|
11549
11187
|
|
11550
|
-
|
11551
|
-
|
11552
|
-
|
11553
|
-
|
11554
|
-
|
11555
|
-
|
11556
|
-
|
11188
|
+
var findRefs = function () {
|
11189
|
+
var refs = false,
|
11190
|
+
res = false;
|
11191
|
+
|
11192
|
+
// find refs
|
11193
|
+
|
11194
|
+
deepApply(ast, refSigs, function (chunk) {
|
11195
|
+
var id = chunk.id ?
|
11196
|
+
chunk.id.name :
|
11197
|
+
chunk.expression.left.name;
|
11198
|
+
|
11199
|
+
if (moduleIds.indexOf(id) === -1) {
|
11200
|
+
moduleIds.push(id);
|
11201
|
+
refs = true;
|
11557
11202
|
}
|
11203
|
+
});
|
11204
|
+
|
11205
|
+
// mark refs
|
11206
|
+
|
11207
|
+
if (refs) {
|
11208
|
+
|
11209
|
+
// update idSigs
|
11210
|
+
var namedModuleMemberExpression = {
|
11211
|
+
"type": "Identifier",
|
11212
|
+
"name": new RegExp('^(' + moduleIds.join('|') + ')$')
|
11213
|
+
};
|
11214
|
+
idSigs = idSigs.map(function (signature) {
|
11215
|
+
signature.callee.object = namedModuleMemberExpression;
|
11216
|
+
return signature;
|
11217
|
+
});
|
11218
|
+
|
11219
|
+
deepApply(ast, idSigs, function (chunk) {
|
11220
|
+
if (!chunk.ngModule) {
|
11221
|
+
chunk.callee.object.ngModule = true;
|
11222
|
+
res = true;
|
11223
|
+
}
|
11224
|
+
});
|
11558
11225
|
}
|
11559
11226
|
|
11560
|
-
|
11561
|
-
|
11562
|
-
} else {
|
11563
|
-
// Adding the second element, need to change to array.
|
11564
|
-
this._events[type] = [this._events[type], listener];
|
11565
|
-
}
|
11227
|
+
return res;
|
11228
|
+
};
|
11566
11229
|
|
11567
|
-
|
11230
|
+
while (findModules() || findRefs());
|
11568
11231
|
};
|
11569
11232
|
|
11570
|
-
|
11233
|
+
},{"../lib/deep-apply":16,"../signatures/module":18,"../signatures/simple":19,"../signatures/assign":20,"../signatures/decl":21,"clone":14}],26:[function(require,module,exports){
|
11571
11234
|
|
11572
|
-
|
11573
|
-
|
11574
|
-
|
11575
|
-
|
11576
|
-
listener.apply(this, arguments);
|
11577
|
-
});
|
11235
|
+
// TODO: investigate using falafel:
|
11236
|
+
// https://github.com/substack/node-falafel
|
11237
|
+
// or Rocambole:
|
11238
|
+
// https://github.com/millermedeiros/rocambole/
|
11578
11239
|
|
11579
|
-
|
11580
|
-
|
11240
|
+
var deepCompare = require('./lib/deep-compare');
|
11241
|
+
var deepApply = require('./lib/deep-apply');
|
11581
11242
|
|
11582
|
-
|
11583
|
-
|
11584
|
-
|
11585
|
-
}
|
11243
|
+
var Pass = function () {
|
11244
|
+
this._matchers = [];
|
11245
|
+
this._do = function () {}; // noop
|
11586
11246
|
|
11587
|
-
|
11588
|
-
|
11247
|
+
this.prereqs = [];
|
11248
|
+
};
|
11589
11249
|
|
11590
|
-
|
11250
|
+
Pass.prototype.run = function (ast, info) {
|
11251
|
+
var d = this._do;
|
11252
|
+
var name = this.name;
|
11591
11253
|
|
11592
|
-
|
11593
|
-
var i = indexOf(list, listener);
|
11594
|
-
if (i < 0) return this;
|
11595
|
-
list.splice(i, 1);
|
11596
|
-
if (list.length == 0)
|
11597
|
-
delete this._events[type];
|
11598
|
-
} else if (this._events[type] === listener) {
|
11599
|
-
delete this._events[type];
|
11600
|
-
}
|
11254
|
+
info[name] = {};
|
11601
11255
|
|
11602
|
-
|
11256
|
+
deepApply(ast, this._matchers, function (chunk) {
|
11257
|
+
info[name] = d(chunk, info);
|
11258
|
+
});
|
11259
|
+
|
11260
|
+
return info[name];
|
11603
11261
|
};
|
11604
11262
|
|
11605
|
-
|
11606
|
-
if (
|
11607
|
-
|
11263
|
+
Pass.prototype.when = function (matcher) {
|
11264
|
+
if (matcher instanceof Array) {
|
11265
|
+
matcher.forEach(function (m) {
|
11266
|
+
this.when(m);
|
11267
|
+
}, this);
|
11268
|
+
return this;
|
11269
|
+
}
|
11270
|
+
if (typeof matcher === 'function') {
|
11271
|
+
this._matchers.push(matcher);
|
11608
11272
|
return this;
|
11609
11273
|
}
|
11274
|
+
if (typeof matcher === 'object') {
|
11275
|
+
this._matchers.push(function (chunk) {
|
11276
|
+
return deepCompare(chunk, matcher);
|
11277
|
+
});
|
11278
|
+
return this;
|
11279
|
+
}
|
11280
|
+
throw new Error("Matcher expected to be an AST chunk object or a function");
|
11281
|
+
};
|
11610
11282
|
|
11611
|
-
|
11612
|
-
|
11613
|
-
return this;
|
11283
|
+
Pass.prototype.do = function (fn) {
|
11284
|
+
this._do = fn;
|
11614
11285
|
};
|
11615
11286
|
|
11616
|
-
|
11617
|
-
|
11618
|
-
if (!this._events[type]) this._events[type] = [];
|
11619
|
-
if (!isArray(this._events[type])) {
|
11620
|
-
this._events[type] = [this._events[type]];
|
11621
|
-
}
|
11622
|
-
return this._events[type];
|
11287
|
+
module.exports = function () {
|
11288
|
+
return new Pass();
|
11623
11289
|
};
|
11624
11290
|
|
11625
|
-
}
|
11626
|
-
|
11627
|
-
|
11291
|
+
},{"./lib/deep-compare":27,"./lib/deep-apply":28}],27:[function(require,module,exports){
|
11292
|
+
/*
|
11293
|
+
* Checks each property of the standard recursively against the candidate,
|
11294
|
+
* ignoring additional properties of the candidate.
|
11295
|
+
* Returns true iff the candidate matches each of the standard's
|
11296
|
+
* properties
|
11297
|
+
*/
|
11628
11298
|
|
11629
|
-
|
11630
|
-
|
11631
|
-
|
11632
|
-
|
11633
|
-
|
11634
|
-
|
11299
|
+
var deepCompare = module.exports = function (candidate, standard) {
|
11300
|
+
if (!standard && !candidate) {
|
11301
|
+
return true;
|
11302
|
+
} else if (standard && !candidate) {
|
11303
|
+
return false;
|
11304
|
+
}
|
11305
|
+
for (var prop in standard) {
|
11306
|
+
if (standard.hasOwnProperty(prop)) {
|
11307
|
+
|
11308
|
+
// undefinded case
|
11309
|
+
if (!candidate[prop]) {
|
11310
|
+
return false;
|
11311
|
+
|
11312
|
+
// regex
|
11313
|
+
} else if (standard[prop] instanceof RegExp) {
|
11314
|
+
if (!standard[prop].test(candidate[prop])) {
|
11315
|
+
return false;
|
11316
|
+
}
|
11317
|
+
|
11318
|
+
// array
|
11319
|
+
} else if (standard[prop] instanceof Array) {
|
11320
|
+
for (var i = 0; i < standard[prop].length; i += 1) {
|
11321
|
+
if (!deepCompare(candidate[prop][i], standard[prop][i])) {
|
11322
|
+
return false;
|
11323
|
+
}
|
11324
|
+
}
|
11325
|
+
|
11326
|
+
// object
|
11327
|
+
} else if (typeof standard[prop] === 'object') {
|
11328
|
+
if (!deepCompare(candidate[prop], standard[prop])) {
|
11329
|
+
return false;
|
11330
|
+
}
|
11331
|
+
|
11332
|
+
// primative case
|
11333
|
+
} else if (candidate[prop] !== standard[prop]) {
|
11334
|
+
return false;
|
11335
|
+
}
|
11336
|
+
}
|
11337
|
+
}
|
11338
|
+
return true;
|
11339
|
+
};
|
11340
|
+
|
11341
|
+
},{}],28:[function(require,module,exports){
|
11342
|
+
/*
|
11343
|
+
* Checks each property of the standard recursively against the candidate,
|
11344
|
+
* runs `cb` on all branches that match the standard
|
11635
11345
|
*/
|
11636
|
-
function clonePrototype(parent) {
|
11637
|
-
if (parent === null)
|
11638
|
-
return null;
|
11639
11346
|
|
11640
|
-
|
11641
|
-
ctor.prototype = parent;
|
11642
|
-
return new ctor();
|
11643
|
-
}
|
11347
|
+
var deepApply = module.exports = function (candidate, standards, cb) {
|
11644
11348
|
|
11645
|
-
|
11349
|
+
// per-order depth-first
|
11350
|
+
for (var prop in candidate) {
|
11351
|
+
if (candidate.hasOwnProperty(prop)) {
|
11646
11352
|
|
11647
|
-
|
11353
|
+
// array
|
11354
|
+
if (candidate[prop] instanceof Array) {
|
11355
|
+
for (var i = 0; i < candidate[prop].length; i += 1) {
|
11356
|
+
deepApply(candidate[prop][i], standards, cb);
|
11357
|
+
}
|
11358
|
+
|
11359
|
+
// object
|
11360
|
+
} else if (typeof candidate[prop] === 'object') {
|
11361
|
+
deepApply(candidate[prop], standards, cb);
|
11362
|
+
}
|
11363
|
+
}
|
11364
|
+
}
|
11365
|
+
|
11366
|
+
standards.forEach(function (standard) {
|
11367
|
+
if (standard(candidate)) {
|
11368
|
+
cb(candidate);
|
11369
|
+
}
|
11370
|
+
});
|
11371
|
+
};
|
11372
|
+
|
11373
|
+
},{}],22:[function(require,module,exports){
|
11648
11374
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
11649
11375
|
/*
|
11650
11376
|
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -12027,7 +11753,7 @@ define(function (require, exports, module) {
|
|
12027
11753
|
|
12028
11754
|
});
|
12029
11755
|
|
12030
|
-
},{"./base64-vlq":
|
11756
|
+
},{"./base64-vlq":29,"./util":30,"./array-set":31,"amdefine":32}],23:[function(require,module,exports){
|
12031
11757
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
12032
11758
|
/*
|
12033
11759
|
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -12339,17 +12065,21 @@ define(function (require, exports, module) {
|
|
12339
12065
|
}
|
12340
12066
|
|
12341
12067
|
if (this.sourceRoot) {
|
12342
|
-
|
12343
|
-
var relativeUrl = util.relative(this.sourceRoot, aSource);
|
12344
|
-
if (this._sources.has(relativeUrl)) {
|
12345
|
-
return this.sourcesContent[this._sources.indexOf(relativeUrl)];
|
12346
|
-
}
|
12068
|
+
aSource = util.relative(this.sourceRoot, aSource);
|
12347
12069
|
}
|
12348
12070
|
|
12349
12071
|
if (this._sources.has(aSource)) {
|
12350
12072
|
return this.sourcesContent[this._sources.indexOf(aSource)];
|
12351
12073
|
}
|
12352
12074
|
|
12075
|
+
var url;
|
12076
|
+
if (this.sourceRoot
|
12077
|
+
&& (url = util.urlParse(this.sourceRoot))
|
12078
|
+
&& (!url.path || url.path == "/")
|
12079
|
+
&& this._sources.has("/" + aSource)) {
|
12080
|
+
return this.sourcesContent[this._sources.indexOf("/" + aSource)];
|
12081
|
+
}
|
12082
|
+
|
12353
12083
|
throw new Error('"' + aSource + '" is not in the SourceMap.');
|
12354
12084
|
};
|
12355
12085
|
|
@@ -12455,7 +12185,7 @@ define(function (require, exports, module) {
|
|
12455
12185
|
|
12456
12186
|
});
|
12457
12187
|
|
12458
|
-
},{"./util":
|
12188
|
+
},{"./util":30,"./binary-search":33,"./array-set":31,"./base64-vlq":29,"amdefine":32}],24:[function(require,module,exports){
|
12459
12189
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
12460
12190
|
/*
|
12461
12191
|
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -12810,8 +12540,62 @@ define(function (require, exports, module) {
|
|
12810
12540
|
|
12811
12541
|
});
|
12812
12542
|
|
12813
|
-
},{"./source-map-generator":
|
12814
|
-
|
12543
|
+
},{"./source-map-generator":22,"./util":30,"amdefine":32}],34:[function(require,module,exports){
|
12544
|
+
// shim for using process in browser
|
12545
|
+
|
12546
|
+
var process = module.exports = {};
|
12547
|
+
|
12548
|
+
process.nextTick = (function () {
|
12549
|
+
var canSetImmediate = typeof window !== 'undefined'
|
12550
|
+
&& window.setImmediate;
|
12551
|
+
var canPost = typeof window !== 'undefined'
|
12552
|
+
&& window.postMessage && window.addEventListener
|
12553
|
+
;
|
12554
|
+
|
12555
|
+
if (canSetImmediate) {
|
12556
|
+
return function (f) { return window.setImmediate(f) };
|
12557
|
+
}
|
12558
|
+
|
12559
|
+
if (canPost) {
|
12560
|
+
var queue = [];
|
12561
|
+
window.addEventListener('message', function (ev) {
|
12562
|
+
if (ev.source === window && ev.data === 'process-tick') {
|
12563
|
+
ev.stopPropagation();
|
12564
|
+
if (queue.length > 0) {
|
12565
|
+
var fn = queue.shift();
|
12566
|
+
fn();
|
12567
|
+
}
|
12568
|
+
}
|
12569
|
+
}, true);
|
12570
|
+
|
12571
|
+
return function nextTick(fn) {
|
12572
|
+
queue.push(fn);
|
12573
|
+
window.postMessage('process-tick', '*');
|
12574
|
+
};
|
12575
|
+
}
|
12576
|
+
|
12577
|
+
return function nextTick(fn) {
|
12578
|
+
setTimeout(fn, 0);
|
12579
|
+
};
|
12580
|
+
})();
|
12581
|
+
|
12582
|
+
process.title = 'browser';
|
12583
|
+
process.browser = true;
|
12584
|
+
process.env = {};
|
12585
|
+
process.argv = [];
|
12586
|
+
|
12587
|
+
process.binding = function (name) {
|
12588
|
+
throw new Error('process.binding is not supported');
|
12589
|
+
}
|
12590
|
+
|
12591
|
+
// TODO(shtylman)
|
12592
|
+
process.cwd = function () { return '/' };
|
12593
|
+
process.chdir = function (dir) {
|
12594
|
+
throw new Error('process.chdir is not supported');
|
12595
|
+
};
|
12596
|
+
|
12597
|
+
},{}],32:[function(require,module,exports){
|
12598
|
+
(function(process,__filename){/** vim: et:ts=4:sw=4:sts=4
|
12815
12599
|
* @license amdefine 0.0.5 Copyright (c) 2011, The Dojo Foundation All Rights Reserved.
|
12816
12600
|
* Available via the MIT or new BSD license.
|
12817
12601
|
* see: http://github.com/jrburke/amdefine for details
|
@@ -13111,8 +12895,8 @@ function amdefine(module, require) {
|
|
13111
12895
|
|
13112
12896
|
module.exports = amdefine;
|
13113
12897
|
|
13114
|
-
})(require("__browserify_process"))
|
13115
|
-
},{"path":
|
12898
|
+
})(require("__browserify_process"),"/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js")
|
12899
|
+
},{"path":35,"__browserify_process":34}],35:[function(require,module,exports){
|
13116
12900
|
(function(process){function filter (xs, fn) {
|
13117
12901
|
var res = [];
|
13118
12902
|
for (var i = 0; i < xs.length; i++) {
|
@@ -13290,7 +13074,7 @@ exports.relative = function(from, to) {
|
|
13290
13074
|
};
|
13291
13075
|
|
13292
13076
|
})(require("__browserify_process"))
|
13293
|
-
},{"__browserify_process":
|
13077
|
+
},{"__browserify_process":34}],29:[function(require,module,exports){
|
13294
13078
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
13295
13079
|
/*
|
13296
13080
|
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -13436,7 +13220,7 @@ define(function (require, exports, module) {
|
|
13436
13220
|
|
13437
13221
|
});
|
13438
13222
|
|
13439
|
-
},{"./base64":
|
13223
|
+
},{"./base64":36,"amdefine":32}],30:[function(require,module,exports){
|
13440
13224
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
13441
13225
|
/*
|
13442
13226
|
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -13484,6 +13268,25 @@ define(function (require, exports, module) {
|
|
13484
13268
|
path: match[7]
|
13485
13269
|
};
|
13486
13270
|
}
|
13271
|
+
exports.urlParse = urlParse;
|
13272
|
+
|
13273
|
+
function urlGenerate(aParsedUrl) {
|
13274
|
+
var url = aParsedUrl.scheme + "://";
|
13275
|
+
if (aParsedUrl.auth) {
|
13276
|
+
url += aParsedUrl.auth + "@"
|
13277
|
+
}
|
13278
|
+
if (aParsedUrl.host) {
|
13279
|
+
url += aParsedUrl.host;
|
13280
|
+
}
|
13281
|
+
if (aParsedUrl.port) {
|
13282
|
+
url += ":" + aParsedUrl.port
|
13283
|
+
}
|
13284
|
+
if (aParsedUrl.path) {
|
13285
|
+
url += aParsedUrl.path;
|
13286
|
+
}
|
13287
|
+
return url;
|
13288
|
+
}
|
13289
|
+
exports.urlGenerate = urlGenerate;
|
13487
13290
|
|
13488
13291
|
function join(aRoot, aPath) {
|
13489
13292
|
var url;
|
@@ -13493,7 +13296,8 @@ define(function (require, exports, module) {
|
|
13493
13296
|
}
|
13494
13297
|
|
13495
13298
|
if (aPath.charAt(0) === '/' && (url = urlParse(aRoot))) {
|
13496
|
-
|
13299
|
+
url.path = aPath;
|
13300
|
+
return urlGenerate(url);
|
13497
13301
|
}
|
13498
13302
|
|
13499
13303
|
return aRoot.replace(/\/$/, '') + '/' + aPath;
|
@@ -13521,6 +13325,12 @@ define(function (require, exports, module) {
|
|
13521
13325
|
|
13522
13326
|
function relative(aRoot, aPath) {
|
13523
13327
|
aRoot = aRoot.replace(/\/$/, '');
|
13328
|
+
|
13329
|
+
var url = urlParse(aRoot);
|
13330
|
+
if (aPath.charAt(0) == "/" && url && url.path == "/") {
|
13331
|
+
return aPath.slice(1);
|
13332
|
+
}
|
13333
|
+
|
13524
13334
|
return aPath.indexOf(aRoot + '/') === 0
|
13525
13335
|
? aPath.substr(aRoot.length + 1)
|
13526
13336
|
: aPath;
|
@@ -13529,7 +13339,7 @@ define(function (require, exports, module) {
|
|
13529
13339
|
|
13530
13340
|
});
|
13531
13341
|
|
13532
|
-
},{"amdefine":
|
13342
|
+
},{"amdefine":32}],31:[function(require,module,exports){
|
13533
13343
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
13534
13344
|
/*
|
13535
13345
|
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -13627,7 +13437,7 @@ define(function (require, exports, module) {
|
|
13627
13437
|
|
13628
13438
|
});
|
13629
13439
|
|
13630
|
-
},{"./util":
|
13440
|
+
},{"./util":30,"amdefine":32}],33:[function(require,module,exports){
|
13631
13441
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
13632
13442
|
/*
|
13633
13443
|
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -13710,7 +13520,7 @@ define(function (require, exports, module) {
|
|
13710
13520
|
|
13711
13521
|
});
|
13712
13522
|
|
13713
|
-
},{"amdefine":
|
13523
|
+
},{"amdefine":32}],36:[function(require,module,exports){
|
13714
13524
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
13715
13525
|
/*
|
13716
13526
|
* Copyright 2011 Mozilla Foundation and contributors
|
@@ -13754,5 +13564,5 @@ define(function (require, exports, module) {
|
|
13754
13564
|
|
13755
13565
|
});
|
13756
13566
|
|
13757
|
-
},{"amdefine":
|
13567
|
+
},{"amdefine":32}]},{},[1])
|
13758
13568
|
;
|