ember-source 3.28.2 → 3.28.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/build-metadata.json +3 -3
- package/dist/ember-template-compiler.js +318 -675
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +4 -5
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +1 -2
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +1 -1
- package/package.json +16 -16
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
7
7
|
* @license Licensed under MIT license
|
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
9
|
-
* @version 3.28.
|
|
9
|
+
* @version 3.28.6
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/* eslint-disable no-var */
|
|
@@ -3188,25 +3188,6 @@ define("@glimmer/compiler", ["exports", "ember-babel", "@glimmer/syntax", "@glim
|
|
|
3188
3188
|
return ResultArray;
|
|
3189
3189
|
}();
|
|
3190
3190
|
|
|
3191
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
3192
|
-
if (!privateMap.has(receiver)) {
|
|
3193
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
3194
|
-
}
|
|
3195
|
-
|
|
3196
|
-
privateMap.set(receiver, value);
|
|
3197
|
-
return value;
|
|
3198
|
-
};
|
|
3199
|
-
|
|
3200
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
3201
|
-
if (!privateMap.has(receiver)) {
|
|
3202
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
3203
|
-
}
|
|
3204
|
-
|
|
3205
|
-
return privateMap.get(receiver);
|
|
3206
|
-
};
|
|
3207
|
-
|
|
3208
|
-
var _keywords, _type;
|
|
3209
|
-
|
|
3210
3191
|
var KeywordImpl = /*#__PURE__*/function () {
|
|
3211
3192
|
function KeywordImpl(keyword, type, delegate) {
|
|
3212
3193
|
this.keyword = keyword;
|
|
@@ -3303,23 +3284,20 @@ define("@glimmer/compiler", ["exports", "ember-babel", "@glimmer/syntax", "@glim
|
|
|
3303
3284
|
|
|
3304
3285
|
var Keywords = /*#__PURE__*/function () {
|
|
3305
3286
|
function Keywords(type) {
|
|
3306
|
-
_keywords
|
|
3307
|
-
|
|
3308
|
-
_type.set(this, void 0);
|
|
3309
|
-
|
|
3310
|
-
__classPrivateFieldSet(this, _type, type);
|
|
3287
|
+
this._keywords = [];
|
|
3288
|
+
this._type = type;
|
|
3311
3289
|
}
|
|
3312
3290
|
|
|
3313
3291
|
var _proto7 = Keywords.prototype;
|
|
3314
3292
|
|
|
3315
3293
|
_proto7.kw = function kw(name, delegate) {
|
|
3316
|
-
|
|
3294
|
+
this._keywords.push(keyword(name, this._type, delegate));
|
|
3317
3295
|
|
|
3318
3296
|
return this;
|
|
3319
3297
|
};
|
|
3320
3298
|
|
|
3321
3299
|
_proto7.translate = function translate(node$$1, state) {
|
|
3322
|
-
for (var _iterator3 = (0, _emberBabel.createForOfIteratorHelperLoose)(
|
|
3300
|
+
for (var _iterator3 = (0, _emberBabel.createForOfIteratorHelperLoose)(this._keywords), _step3; !(_step3 = _iterator3()).done;) {
|
|
3323
3301
|
var _keyword2 = _step3.value;
|
|
3324
3302
|
|
|
3325
3303
|
var _result2 = _keyword2.translate(node$$1, state);
|
|
@@ -3333,9 +3311,7 @@ define("@glimmer/compiler", ["exports", "ember-babel", "@glimmer/syntax", "@glim
|
|
|
3333
3311
|
|
|
3334
3312
|
if (path && path.type === 'Path' && path.ref.type === 'Free' && (0, _syntax.isKeyword)(path.ref.name)) {
|
|
3335
3313
|
var name = path.ref.name;
|
|
3336
|
-
|
|
3337
|
-
var usedType = __classPrivateFieldGet(this, _type);
|
|
3338
|
-
|
|
3314
|
+
var usedType = this._type;
|
|
3339
3315
|
var validTypes = _syntax.KEYWORDS_TYPES[name];
|
|
3340
3316
|
|
|
3341
3317
|
if (validTypes.indexOf(usedType) === -1) {
|
|
@@ -3349,7 +3325,6 @@ define("@glimmer/compiler", ["exports", "ember-babel", "@glimmer/syntax", "@glim
|
|
|
3349
3325
|
return Keywords;
|
|
3350
3326
|
}();
|
|
3351
3327
|
|
|
3352
|
-
_keywords = new WeakMap(), _type = new WeakMap();
|
|
3353
3328
|
var typesToReadableName = {
|
|
3354
3329
|
Append: 'an append statement',
|
|
3355
3330
|
Block: 'a block statement',
|
|
@@ -5000,71 +4975,42 @@ define("@glimmer/compiler", ["exports", "ember-babel", "@glimmer/syntax", "@glim
|
|
|
5000
4975
|
}();
|
|
5001
4976
|
|
|
5002
4977
|
var VISIT_STMTS = new NormalizationStatements();
|
|
5003
|
-
|
|
5004
|
-
var __classPrivateFieldSet$1 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
5005
|
-
if (!privateMap.has(receiver)) {
|
|
5006
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
5007
|
-
}
|
|
5008
|
-
|
|
5009
|
-
privateMap.set(receiver, value);
|
|
5010
|
-
return value;
|
|
5011
|
-
};
|
|
5012
|
-
|
|
5013
|
-
var __classPrivateFieldGet$1 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
5014
|
-
if (!privateMap.has(receiver)) {
|
|
5015
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
5016
|
-
}
|
|
5017
|
-
|
|
5018
|
-
return privateMap.get(receiver);
|
|
5019
|
-
};
|
|
5020
|
-
|
|
5021
|
-
var _currentScope, _cursorCount;
|
|
5022
4978
|
/**
|
|
5023
4979
|
* This is the mutable state for this compiler pass.
|
|
5024
4980
|
*/
|
|
5025
4981
|
|
|
5026
|
-
|
|
5027
4982
|
var NormalizationState = /*#__PURE__*/function () {
|
|
5028
4983
|
function NormalizationState(block, isStrict) {
|
|
5029
4984
|
this.isStrict = isStrict;
|
|
5030
|
-
|
|
5031
|
-
_currentScope
|
|
5032
|
-
|
|
5033
|
-
_cursorCount.set(this, 0);
|
|
5034
|
-
|
|
5035
|
-
__classPrivateFieldSet$1(this, _currentScope, block);
|
|
4985
|
+
this._cursorCount = 0;
|
|
4986
|
+
this._currentScope = block;
|
|
5036
4987
|
}
|
|
5037
4988
|
|
|
5038
4989
|
var _proto13 = NormalizationState.prototype;
|
|
5039
4990
|
|
|
5040
4991
|
_proto13.generateUniqueCursor = function generateUniqueCursor() {
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
return "%cursor:" + (__classPrivateFieldSet$1(this, _cursorCount, (_a = +__classPrivateFieldGet$1(this, _cursorCount)) + 1), _a) + "%";
|
|
4992
|
+
return "%cursor:" + this._cursorCount++ + "%";
|
|
5044
4993
|
};
|
|
5045
4994
|
|
|
5046
4995
|
_proto13.visitBlock = function visitBlock(block) {
|
|
5047
|
-
var oldBlock =
|
|
5048
|
-
|
|
5049
|
-
__classPrivateFieldSet$1(this, _currentScope, block.scope);
|
|
4996
|
+
var oldBlock = this._currentScope;
|
|
4997
|
+
this._currentScope = block.scope;
|
|
5050
4998
|
|
|
5051
4999
|
try {
|
|
5052
5000
|
return VISIT_STMTS.visitList(block.body, this);
|
|
5053
5001
|
} finally {
|
|
5054
|
-
|
|
5002
|
+
this._currentScope = oldBlock;
|
|
5055
5003
|
}
|
|
5056
5004
|
};
|
|
5057
5005
|
|
|
5058
5006
|
(0, _emberBabel.createClass)(NormalizationState, [{
|
|
5059
5007
|
key: "scope",
|
|
5060
5008
|
get: function get() {
|
|
5061
|
-
return
|
|
5009
|
+
return this._currentScope;
|
|
5062
5010
|
}
|
|
5063
5011
|
}]);
|
|
5064
5012
|
return NormalizationState;
|
|
5065
5013
|
}();
|
|
5066
|
-
|
|
5067
|
-
_currentScope = new WeakMap(), _cursorCount = new WeakMap();
|
|
5068
5014
|
/**
|
|
5069
5015
|
* Normalize the AST from @glimmer/syntax into the HIR. The HIR has special
|
|
5070
5016
|
* instructions for keywords like `{{yield}}`, `(has-block)` and
|
|
@@ -5104,6 +5050,7 @@ define("@glimmer/compiler", ["exports", "ember-babel", "@glimmer/syntax", "@glim
|
|
|
5104
5050
|
* ```
|
|
5105
5051
|
*/
|
|
5106
5052
|
|
|
5053
|
+
|
|
5107
5054
|
function normalize$1(source, root, isStrict) {
|
|
5108
5055
|
// create a new context for the normalization pass
|
|
5109
5056
|
var state = new NormalizationState(root.table, isStrict);
|
|
@@ -6215,18 +6162,16 @@ define("@glimmer/compiler", ["exports", "ember-babel", "@glimmer/syntax", "@glim
|
|
|
6215
6162
|
isStrictMode: (_b = options.strictMode) !== null && _b !== void 0 ? _b : false
|
|
6216
6163
|
};
|
|
6217
6164
|
|
|
6218
|
-
if (
|
|
6165
|
+
if (usedLocals.length === 0) {
|
|
6219
6166
|
delete templateJSONObject.scope;
|
|
6220
6167
|
} // JSON is javascript
|
|
6221
6168
|
|
|
6222
6169
|
|
|
6223
6170
|
var stringified = JSON.stringify(templateJSONObject);
|
|
6224
6171
|
|
|
6225
|
-
if (
|
|
6172
|
+
if (usedLocals.length > 0) {
|
|
6226
6173
|
var scopeFn = "()=>[" + usedLocals.join(',') + "]";
|
|
6227
6174
|
stringified = stringified.replace("\"" + SCOPE_PLACEHOLDER + "\"", scopeFn);
|
|
6228
|
-
} else {
|
|
6229
|
-
stringified = stringified.replace("\"" + SCOPE_PLACEHOLDER + "\"", 'null');
|
|
6230
6175
|
}
|
|
6231
6176
|
|
|
6232
6177
|
return stringified;
|
|
@@ -7909,27 +7854,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
7909
7854
|
|
|
7910
7855
|
return SourceSlice;
|
|
7911
7856
|
}();
|
|
7912
|
-
|
|
7913
|
-
_exports.SourceSlice = SourceSlice;
|
|
7914
|
-
|
|
7915
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
7916
|
-
if (!privateMap.has(receiver)) {
|
|
7917
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
7918
|
-
}
|
|
7919
|
-
|
|
7920
|
-
privateMap.set(receiver, value);
|
|
7921
|
-
return value;
|
|
7922
|
-
};
|
|
7923
|
-
|
|
7924
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
7925
|
-
if (!privateMap.has(receiver)) {
|
|
7926
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
7927
|
-
}
|
|
7928
|
-
|
|
7929
|
-
return privateMap.get(receiver);
|
|
7930
|
-
};
|
|
7931
|
-
|
|
7932
|
-
var _whens, _map, _whens_1;
|
|
7933
7857
|
/**
|
|
7934
7858
|
* This file implements the DSL used by span and offset in places where they need to exhaustively
|
|
7935
7859
|
* consider all combinations of states (Handlebars offsets, character offsets and invisible/broken
|
|
@@ -7940,20 +7864,19 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
7940
7864
|
*/
|
|
7941
7865
|
|
|
7942
7866
|
|
|
7867
|
+
_exports.SourceSlice = SourceSlice;
|
|
7943
7868
|
var MatchAny = 'MATCH_ANY';
|
|
7944
7869
|
var IsInvisible = 'IS_INVISIBLE';
|
|
7945
7870
|
|
|
7946
7871
|
var WhenList = /*#__PURE__*/function () {
|
|
7947
7872
|
function WhenList(whens) {
|
|
7948
|
-
_whens
|
|
7949
|
-
|
|
7950
|
-
__classPrivateFieldSet(this, _whens, whens);
|
|
7873
|
+
this._whens = whens;
|
|
7951
7874
|
}
|
|
7952
7875
|
|
|
7953
7876
|
var _proto2 = WhenList.prototype;
|
|
7954
7877
|
|
|
7955
7878
|
_proto2.first = function first(kind) {
|
|
7956
|
-
for (var _iterator = (0, _emberBabel.createForOfIteratorHelperLoose)(
|
|
7879
|
+
for (var _iterator = (0, _emberBabel.createForOfIteratorHelperLoose)(this._whens), _step; !(_step = _iterator()).done;) {
|
|
7957
7880
|
var _when = _step.value;
|
|
7958
7881
|
|
|
7959
7882
|
var _value = _when.match(kind);
|
|
@@ -7969,17 +7892,15 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
7969
7892
|
return WhenList;
|
|
7970
7893
|
}();
|
|
7971
7894
|
|
|
7972
|
-
_whens = new WeakMap();
|
|
7973
|
-
|
|
7974
7895
|
var When = /*#__PURE__*/function () {
|
|
7975
7896
|
function When() {
|
|
7976
|
-
_map
|
|
7897
|
+
this._map = new Map();
|
|
7977
7898
|
}
|
|
7978
7899
|
|
|
7979
7900
|
var _proto3 = When.prototype;
|
|
7980
7901
|
|
|
7981
7902
|
_proto3.get = function get(pattern, or) {
|
|
7982
|
-
var value =
|
|
7903
|
+
var value = this._map.get(pattern);
|
|
7983
7904
|
|
|
7984
7905
|
if (value) {
|
|
7985
7906
|
return value;
|
|
@@ -7987,22 +7908,22 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
7987
7908
|
|
|
7988
7909
|
value = or();
|
|
7989
7910
|
|
|
7990
|
-
|
|
7911
|
+
this._map.set(pattern, value);
|
|
7991
7912
|
|
|
7992
7913
|
return value;
|
|
7993
7914
|
};
|
|
7994
7915
|
|
|
7995
7916
|
_proto3.add = function add(pattern, out) {
|
|
7996
|
-
|
|
7917
|
+
this._map.set(pattern, out);
|
|
7997
7918
|
};
|
|
7998
7919
|
|
|
7999
7920
|
_proto3.match = function match(kind) {
|
|
8000
7921
|
var pattern = patternFor(kind);
|
|
8001
7922
|
var out = [];
|
|
8002
7923
|
|
|
8003
|
-
var exact =
|
|
7924
|
+
var exact = this._map.get(pattern);
|
|
8004
7925
|
|
|
8005
|
-
var fallback =
|
|
7926
|
+
var fallback = this._map.get(MatchAny);
|
|
8006
7927
|
|
|
8007
7928
|
if (exact) {
|
|
8008
7929
|
out.push(exact);
|
|
@@ -8018,15 +7939,13 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8018
7939
|
return When;
|
|
8019
7940
|
}();
|
|
8020
7941
|
|
|
8021
|
-
_map = new WeakMap();
|
|
8022
|
-
|
|
8023
7942
|
function match(callback) {
|
|
8024
7943
|
return callback(new Matcher()).check();
|
|
8025
7944
|
}
|
|
8026
7945
|
|
|
8027
7946
|
var Matcher = /*#__PURE__*/function () {
|
|
8028
7947
|
function Matcher() {
|
|
8029
|
-
|
|
7948
|
+
this._whens = new When();
|
|
8030
7949
|
}
|
|
8031
7950
|
/**
|
|
8032
7951
|
* You didn't exhaustively match all possibilities.
|
|
@@ -8044,7 +7963,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8044
7963
|
};
|
|
8045
7964
|
|
|
8046
7965
|
_proto4.matchFor = function matchFor(left, right) {
|
|
8047
|
-
var nesteds =
|
|
7966
|
+
var nesteds = this._whens.match(left);
|
|
8048
7967
|
|
|
8049
7968
|
var callback = new WhenList(nesteds).first(right);
|
|
8050
7969
|
return callback;
|
|
@@ -8052,7 +7971,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8052
7971
|
|
|
8053
7972
|
_proto4.when = function when(left, right, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8054
7973
|
callback) {
|
|
8055
|
-
|
|
7974
|
+
this._whens.get(left, function () {
|
|
8056
7975
|
return new When();
|
|
8057
7976
|
}).add(right, callback);
|
|
8058
7977
|
|
|
@@ -8062,8 +7981,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8062
7981
|
return Matcher;
|
|
8063
7982
|
}();
|
|
8064
7983
|
|
|
8065
|
-
_whens_1 = new WeakMap();
|
|
8066
|
-
|
|
8067
7984
|
function patternFor(kind) {
|
|
8068
7985
|
switch (kind) {
|
|
8069
7986
|
case "Broken"
|
|
@@ -8080,26 +7997,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8080
7997
|
default:
|
|
8081
7998
|
return kind;
|
|
8082
7999
|
}
|
|
8083
|
-
}
|
|
8084
|
-
|
|
8085
|
-
var __classPrivateFieldGet$1 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
8086
|
-
if (!privateMap.has(receiver)) {
|
|
8087
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
8088
|
-
}
|
|
8089
|
-
|
|
8090
|
-
return privateMap.get(receiver);
|
|
8091
|
-
};
|
|
8092
|
-
|
|
8093
|
-
var __classPrivateFieldSet$1 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
8094
|
-
if (!privateMap.has(receiver)) {
|
|
8095
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
8096
|
-
}
|
|
8097
|
-
|
|
8098
|
-
privateMap.set(receiver, value);
|
|
8099
|
-
return value;
|
|
8100
|
-
};
|
|
8101
|
-
|
|
8102
|
-
var _locPos, _charPos; // eslint-disable-next-line import/no-extraneous-dependencies
|
|
8000
|
+
} // eslint-disable-next-line import/no-extraneous-dependencies
|
|
8103
8001
|
|
|
8104
8002
|
/**
|
|
8105
8003
|
* Used to indicate that an attempt to convert a `SourcePosition` to a character offset failed. It
|
|
@@ -8242,7 +8140,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8242
8140
|
;
|
|
8243
8141
|
/** Computed from char offset */
|
|
8244
8142
|
|
|
8245
|
-
_locPos
|
|
8143
|
+
this._locPos = null;
|
|
8246
8144
|
}
|
|
8247
8145
|
/**
|
|
8248
8146
|
* This is already a `CharPosition`.
|
|
@@ -8286,15 +8184,15 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8286
8184
|
* computing the `HbsPosition` should be a one-time operation.
|
|
8287
8185
|
*/
|
|
8288
8186
|
_proto6.toHbsPos = function toHbsPos() {
|
|
8289
|
-
var locPos =
|
|
8187
|
+
var locPos = this._locPos;
|
|
8290
8188
|
|
|
8291
8189
|
if (locPos === null) {
|
|
8292
8190
|
var hbsPos = this.source.hbsPosFor(this.charPos);
|
|
8293
8191
|
|
|
8294
8192
|
if (hbsPos === null) {
|
|
8295
|
-
|
|
8193
|
+
this._locPos = locPos = BROKEN;
|
|
8296
8194
|
} else {
|
|
8297
|
-
|
|
8195
|
+
this._locPos = locPos = new HbsPosition(this.source, hbsPos, this.charPos);
|
|
8298
8196
|
}
|
|
8299
8197
|
}
|
|
8300
8198
|
|
|
@@ -8310,8 +8208,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8310
8208
|
return CharPosition;
|
|
8311
8209
|
}();
|
|
8312
8210
|
|
|
8313
|
-
_locPos = new WeakMap();
|
|
8314
|
-
|
|
8315
8211
|
var HbsPosition = /*#__PURE__*/function () {
|
|
8316
8212
|
function HbsPosition(source, hbsPos, charPos) {
|
|
8317
8213
|
if (charPos === void 0) {
|
|
@@ -8323,10 +8219,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8323
8219
|
this.kind = "HbsPosition"
|
|
8324
8220
|
/* HbsPosition */
|
|
8325
8221
|
;
|
|
8326
|
-
|
|
8327
|
-
_charPos.set(this, void 0);
|
|
8328
|
-
|
|
8329
|
-
__classPrivateFieldSet$1(this, _charPos, charPos === null ? null : new CharPosition(source, charPos));
|
|
8222
|
+
this._charPos = charPos === null ? null : new CharPosition(source, charPos);
|
|
8330
8223
|
}
|
|
8331
8224
|
/**
|
|
8332
8225
|
* Lazily compute the character offset from the {@see SourcePosition}. Once an `HbsPosition` has
|
|
@@ -8341,15 +8234,15 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8341
8234
|
var _proto7 = HbsPosition.prototype;
|
|
8342
8235
|
|
|
8343
8236
|
_proto7.toCharPos = function toCharPos() {
|
|
8344
|
-
var charPos =
|
|
8237
|
+
var charPos = this._charPos;
|
|
8345
8238
|
|
|
8346
8239
|
if (charPos === null) {
|
|
8347
8240
|
var charPosNumber = this.source.charPosFor(this.hbsPos);
|
|
8348
8241
|
|
|
8349
8242
|
if (charPosNumber === null) {
|
|
8350
|
-
|
|
8243
|
+
this._charPos = charPos = BROKEN;
|
|
8351
8244
|
} else {
|
|
8352
|
-
|
|
8245
|
+
this._charPos = charPos = new CharPosition(this.source, charPosNumber);
|
|
8353
8246
|
}
|
|
8354
8247
|
}
|
|
8355
8248
|
|
|
@@ -8384,8 +8277,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8384
8277
|
return HbsPosition;
|
|
8385
8278
|
}();
|
|
8386
8279
|
|
|
8387
|
-
_charPos = new WeakMap();
|
|
8388
|
-
|
|
8389
8280
|
var InvisiblePosition = /*#__PURE__*/function () {
|
|
8390
8281
|
function InvisiblePosition(kind, // whatever was provided, possibly broken
|
|
8391
8282
|
pos) {
|
|
@@ -8474,26 +8365,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8474
8365
|
}).when(MatchAny, MatchAny, function () {
|
|
8475
8366
|
return false;
|
|
8476
8367
|
});
|
|
8477
|
-
});
|
|
8478
|
-
|
|
8479
|
-
var __classPrivateFieldGet$2 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
8480
|
-
if (!privateMap.has(receiver)) {
|
|
8481
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
8482
|
-
}
|
|
8483
|
-
|
|
8484
|
-
return privateMap.get(receiver);
|
|
8485
|
-
};
|
|
8486
|
-
|
|
8487
|
-
var __classPrivateFieldSet$2 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
8488
|
-
if (!privateMap.has(receiver)) {
|
|
8489
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
8490
|
-
}
|
|
8491
|
-
|
|
8492
|
-
privateMap.set(receiver, value);
|
|
8493
|
-
return value;
|
|
8494
|
-
};
|
|
8495
|
-
|
|
8496
|
-
var _locPosSpan, _charPosSpan, _providedHbsLoc; // eslint-disable-next-line import/no-extraneous-dependencies
|
|
8368
|
+
}); // eslint-disable-next-line import/no-extraneous-dependencies
|
|
8497
8369
|
|
|
8498
8370
|
/**
|
|
8499
8371
|
* A `SourceSpan` object represents a span of characters inside of a template source.
|
|
@@ -8800,8 +8672,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8800
8672
|
this.kind = "CharPosition"
|
|
8801
8673
|
/* CharPosition */
|
|
8802
8674
|
;
|
|
8803
|
-
|
|
8804
|
-
_locPosSpan.set(this, null);
|
|
8675
|
+
this._locPosSpan = null;
|
|
8805
8676
|
}
|
|
8806
8677
|
|
|
8807
8678
|
var _proto10 = CharPositionSpan.prototype;
|
|
@@ -8829,19 +8700,19 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8829
8700
|
_proto10.locDidUpdate = function locDidUpdate() {};
|
|
8830
8701
|
|
|
8831
8702
|
_proto10.toHbsSpan = function toHbsSpan() {
|
|
8832
|
-
var locPosSpan =
|
|
8703
|
+
var locPosSpan = this._locPosSpan;
|
|
8833
8704
|
|
|
8834
8705
|
if (locPosSpan === null) {
|
|
8835
8706
|
var start = this.charPositions.start.toHbsPos();
|
|
8836
8707
|
var end = this.charPositions.end.toHbsPos();
|
|
8837
8708
|
|
|
8838
8709
|
if (start === null || end === null) {
|
|
8839
|
-
locPosSpan =
|
|
8710
|
+
locPosSpan = this._locPosSpan = BROKEN;
|
|
8840
8711
|
} else {
|
|
8841
|
-
locPosSpan =
|
|
8712
|
+
locPosSpan = this._locPosSpan = new HbsSpan(this.source, {
|
|
8842
8713
|
start: start,
|
|
8843
8714
|
end: end
|
|
8844
|
-
})
|
|
8715
|
+
});
|
|
8845
8716
|
}
|
|
8846
8717
|
}
|
|
8847
8718
|
|
|
@@ -8867,8 +8738,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8867
8738
|
return CharPositionSpan;
|
|
8868
8739
|
}();
|
|
8869
8740
|
|
|
8870
|
-
_locPosSpan = new WeakMap();
|
|
8871
|
-
|
|
8872
8741
|
var HbsSpan = /*#__PURE__*/function () {
|
|
8873
8742
|
function HbsSpan(source, hbsPositions, providedHbsLoc) {
|
|
8874
8743
|
if (providedHbsLoc === void 0) {
|
|
@@ -8880,13 +8749,8 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8880
8749
|
this.kind = "HbsPosition"
|
|
8881
8750
|
/* HbsPosition */
|
|
8882
8751
|
;
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
_providedHbsLoc.set(this, void 0);
|
|
8888
|
-
|
|
8889
|
-
__classPrivateFieldSet$2(this, _providedHbsLoc, providedHbsLoc);
|
|
8752
|
+
this._charPosSpan = null;
|
|
8753
|
+
this._providedHbsLoc = providedHbsLoc;
|
|
8890
8754
|
}
|
|
8891
8755
|
|
|
8892
8756
|
var _proto11 = HbsSpan.prototype;
|
|
@@ -8903,17 +8767,16 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8903
8767
|
};
|
|
8904
8768
|
|
|
8905
8769
|
_proto11.updateProvided = function updateProvided(pos, edge) {
|
|
8906
|
-
if (
|
|
8907
|
-
|
|
8770
|
+
if (this._providedHbsLoc) {
|
|
8771
|
+
this._providedHbsLoc[edge] = pos;
|
|
8908
8772
|
} // invalidate computed character offsets
|
|
8909
8773
|
|
|
8910
8774
|
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
__classPrivateFieldSet$2(this, _providedHbsLoc, {
|
|
8775
|
+
this._charPosSpan = null;
|
|
8776
|
+
this._providedHbsLoc = {
|
|
8914
8777
|
start: pos,
|
|
8915
8778
|
end: pos
|
|
8916
|
-
}
|
|
8779
|
+
};
|
|
8917
8780
|
};
|
|
8918
8781
|
|
|
8919
8782
|
_proto11.locDidUpdate = function locDidUpdate(_ref10) {
|
|
@@ -8960,19 +8823,19 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8960
8823
|
};
|
|
8961
8824
|
|
|
8962
8825
|
_proto11.toCharPosSpan = function toCharPosSpan() {
|
|
8963
|
-
var charPosSpan =
|
|
8826
|
+
var charPosSpan = this._charPosSpan;
|
|
8964
8827
|
|
|
8965
8828
|
if (charPosSpan === null) {
|
|
8966
8829
|
var start = this.hbsPositions.start.toCharPos();
|
|
8967
8830
|
var end = this.hbsPositions.end.toCharPos();
|
|
8968
8831
|
|
|
8969
8832
|
if (start && end) {
|
|
8970
|
-
charPosSpan =
|
|
8833
|
+
charPosSpan = this._charPosSpan = new CharPositionSpan(this.source, {
|
|
8971
8834
|
start: start,
|
|
8972
8835
|
end: end
|
|
8973
|
-
})
|
|
8836
|
+
});
|
|
8974
8837
|
} else {
|
|
8975
|
-
charPosSpan =
|
|
8838
|
+
charPosSpan = this._charPosSpan = BROKEN;
|
|
8976
8839
|
return null;
|
|
8977
8840
|
}
|
|
8978
8841
|
}
|
|
@@ -8983,8 +8846,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
8983
8846
|
return HbsSpan;
|
|
8984
8847
|
}();
|
|
8985
8848
|
|
|
8986
|
-
_charPosSpan = new WeakMap(), _providedHbsLoc = new WeakMap();
|
|
8987
|
-
|
|
8988
8849
|
var InvisibleSpan = /*#__PURE__*/function () {
|
|
8989
8850
|
function InvisibleSpan(kind, // whatever was provided, possibly broken
|
|
8990
8851
|
loc, // if the span represents a synthetic string
|
|
@@ -9232,7 +9093,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
9232
9093
|
this.loc = loc;
|
|
9233
9094
|
this.type = 'PathExpression';
|
|
9234
9095
|
this.this = false;
|
|
9235
|
-
this.data = false;
|
|
9096
|
+
this.data = false; // Cache for the head value.
|
|
9097
|
+
|
|
9098
|
+
this._head = undefined;
|
|
9236
9099
|
var parts = tail.slice();
|
|
9237
9100
|
|
|
9238
9101
|
if (head.type === 'ThisHead') {
|
|
@@ -9250,6 +9113,10 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
9250
9113
|
(0, _emberBabel.createClass)(PathExpressionImplV1, [{
|
|
9251
9114
|
key: "head",
|
|
9252
9115
|
get: function get() {
|
|
9116
|
+
if (this._head) {
|
|
9117
|
+
return this._head;
|
|
9118
|
+
}
|
|
9119
|
+
|
|
9253
9120
|
var firstPart;
|
|
9254
9121
|
|
|
9255
9122
|
if (this.this) {
|
|
@@ -9263,7 +9130,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
9263
9130
|
var firstPartLoc = this.loc.collapse('start').sliceStartChars({
|
|
9264
9131
|
chars: firstPart.length
|
|
9265
9132
|
}).loc;
|
|
9266
|
-
return publicBuilder.head(firstPart, firstPartLoc);
|
|
9133
|
+
return this._head = publicBuilder.head(firstPart, firstPartLoc);
|
|
9267
9134
|
}
|
|
9268
9135
|
}, {
|
|
9269
9136
|
key: "tail",
|
|
@@ -10056,8 +9923,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
10056
9923
|
return /*#__PURE__*/function () {
|
|
10057
9924
|
function _class(fields) {
|
|
10058
9925
|
this.type = type;
|
|
10059
|
-
this
|
|
10060
|
-
copy(fields, this);
|
|
9926
|
+
(0, _util.assign)(this, fields);
|
|
10061
9927
|
}
|
|
10062
9928
|
|
|
10063
9929
|
return _class;
|
|
@@ -10069,8 +9935,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
10069
9935
|
fields: function fields() {
|
|
10070
9936
|
return /*#__PURE__*/function () {
|
|
10071
9937
|
function _class2(fields) {
|
|
10072
|
-
this
|
|
10073
|
-
copy(fields, this);
|
|
9938
|
+
(0, _util.assign)(this, fields);
|
|
10074
9939
|
}
|
|
10075
9940
|
|
|
10076
9941
|
return _class2;
|
|
@@ -10079,17 +9944,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
10079
9944
|
};
|
|
10080
9945
|
}
|
|
10081
9946
|
}
|
|
10082
|
-
|
|
10083
|
-
function keys(object) {
|
|
10084
|
-
return Object.keys(object);
|
|
10085
|
-
}
|
|
10086
|
-
|
|
10087
|
-
function copy(object1, object2) {
|
|
10088
|
-
for (var _iterator2 = (0, _emberBabel.createForOfIteratorHelperLoose)(keys(object1)), _step2; !(_step2 = _iterator2()).done;) {
|
|
10089
|
-
var _key2 = _step2.value;
|
|
10090
|
-
object2[_key2] = object1[_key2];
|
|
10091
|
-
}
|
|
10092
|
-
}
|
|
10093
9947
|
/**
|
|
10094
9948
|
* Corresponds to syntaxes with positional and named arguments:
|
|
10095
9949
|
*
|
|
@@ -10312,34 +10166,13 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
10312
10166
|
return ElementModifier;
|
|
10313
10167
|
}(node('ElementModifier').fields());
|
|
10314
10168
|
|
|
10315
|
-
var __classPrivateFieldSet$3 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
10316
|
-
if (!privateMap.has(receiver)) {
|
|
10317
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
10318
|
-
}
|
|
10319
|
-
|
|
10320
|
-
privateMap.set(receiver, value);
|
|
10321
|
-
return value;
|
|
10322
|
-
};
|
|
10323
|
-
|
|
10324
|
-
var __classPrivateFieldGet$3 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
10325
|
-
if (!privateMap.has(receiver)) {
|
|
10326
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
10327
|
-
}
|
|
10328
|
-
|
|
10329
|
-
return privateMap.get(receiver);
|
|
10330
|
-
};
|
|
10331
|
-
|
|
10332
|
-
var _span;
|
|
10333
|
-
|
|
10334
10169
|
var SpanList = /*#__PURE__*/function () {
|
|
10335
10170
|
function SpanList(span) {
|
|
10336
10171
|
if (span === void 0) {
|
|
10337
10172
|
span = [];
|
|
10338
10173
|
}
|
|
10339
10174
|
|
|
10340
|
-
_span
|
|
10341
|
-
|
|
10342
|
-
__classPrivateFieldSet$3(this, _span, span);
|
|
10175
|
+
this._span = span;
|
|
10343
10176
|
}
|
|
10344
10177
|
|
|
10345
10178
|
SpanList.range = function range(span, fallback) {
|
|
@@ -10353,17 +10186,15 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
10353
10186
|
var _proto20 = SpanList.prototype;
|
|
10354
10187
|
|
|
10355
10188
|
_proto20.add = function add(offset) {
|
|
10356
|
-
|
|
10189
|
+
this._span.push(offset);
|
|
10357
10190
|
};
|
|
10358
10191
|
|
|
10359
10192
|
_proto20.getRangeOffset = function getRangeOffset(fallback) {
|
|
10360
|
-
if (
|
|
10193
|
+
if (this._span.length === 0) {
|
|
10361
10194
|
return fallback;
|
|
10362
10195
|
} else {
|
|
10363
|
-
var first =
|
|
10364
|
-
|
|
10365
|
-
var last = __classPrivateFieldGet$3(this, _span)[__classPrivateFieldGet$3(this, _span).length - 1];
|
|
10366
|
-
|
|
10196
|
+
var first = this._span[0];
|
|
10197
|
+
var last = this._span[this._span.length - 1];
|
|
10367
10198
|
return first.extend(last);
|
|
10368
10199
|
}
|
|
10369
10200
|
};
|
|
@@ -10372,7 +10203,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
10372
10203
|
}();
|
|
10373
10204
|
|
|
10374
10205
|
_exports.SpanList = SpanList;
|
|
10375
|
-
_span = new WeakMap();
|
|
10376
10206
|
|
|
10377
10207
|
function loc(span) {
|
|
10378
10208
|
if (Array.isArray(span)) {
|
|
@@ -11144,8 +10974,8 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
11144
10974
|
this.buffer += "<" + el.tag;
|
|
11145
10975
|
var parts = [].concat(el.attributes, el.modifiers, el.comments).sort(sortByLoc);
|
|
11146
10976
|
|
|
11147
|
-
for (var
|
|
11148
|
-
var _part =
|
|
10977
|
+
for (var _iterator2 = (0, _emberBabel.createForOfIteratorHelperLoose)(parts), _step2; !(_step2 = _iterator2()).done;) {
|
|
10978
|
+
var _part = _step2.value;
|
|
11149
10979
|
this.buffer += ' ';
|
|
11150
10980
|
|
|
11151
10981
|
switch (_part.type) {
|
|
@@ -11556,170 +11386,8 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
11556
11386
|
return new TraversalError('Replacing and removing in key handlers is not yet supported.', node, null, key);
|
|
11557
11387
|
}
|
|
11558
11388
|
|
|
11559
|
-
function getLocalName(node) {
|
|
11560
|
-
switch (node.type) {
|
|
11561
|
-
case 'ElementNode':
|
|
11562
|
-
// unfortunately the ElementNode stores `tag` as a string
|
|
11563
|
-
// if that changes in glimmer-vm this will need to be updated
|
|
11564
|
-
return node.tag.split('.')[0];
|
|
11565
|
-
|
|
11566
|
-
case 'SubExpression':
|
|
11567
|
-
case 'MustacheStatement':
|
|
11568
|
-
case 'BlockStatement':
|
|
11569
|
-
return getLocalName(node.path);
|
|
11570
|
-
|
|
11571
|
-
case 'UndefinedLiteral':
|
|
11572
|
-
case 'NullLiteral':
|
|
11573
|
-
case 'BooleanLiteral':
|
|
11574
|
-
case 'StringLiteral':
|
|
11575
|
-
case 'NumberLiteral':
|
|
11576
|
-
case 'TextNode':
|
|
11577
|
-
case 'Template':
|
|
11578
|
-
case 'Block':
|
|
11579
|
-
case 'CommentStatement':
|
|
11580
|
-
case 'MustacheCommentStatement':
|
|
11581
|
-
case 'PartialStatement':
|
|
11582
|
-
case 'ElementModifierStatement':
|
|
11583
|
-
case 'AttrNode':
|
|
11584
|
-
case 'ConcatStatement':
|
|
11585
|
-
case 'Program':
|
|
11586
|
-
case 'Hash':
|
|
11587
|
-
case 'HashPair':
|
|
11588
|
-
return undefined;
|
|
11589
|
-
|
|
11590
|
-
case 'PathExpression':
|
|
11591
|
-
default:
|
|
11592
|
-
return node.parts.length ? node.parts[0] : undefined;
|
|
11593
|
-
}
|
|
11594
|
-
}
|
|
11595
|
-
|
|
11596
|
-
function getLocals(node) {
|
|
11597
|
-
switch (node.type) {
|
|
11598
|
-
case 'ElementNode':
|
|
11599
|
-
case 'Program':
|
|
11600
|
-
case 'Block':
|
|
11601
|
-
case 'Template':
|
|
11602
|
-
return node.blockParams;
|
|
11603
|
-
|
|
11604
|
-
case 'BlockStatement':
|
|
11605
|
-
return node.program.blockParams;
|
|
11606
|
-
|
|
11607
|
-
default:
|
|
11608
|
-
return undefined;
|
|
11609
|
-
}
|
|
11610
|
-
}
|
|
11611
|
-
|
|
11612
|
-
var TransformScope = /*#__PURE__*/function () {
|
|
11613
|
-
function TransformScope(locals) {
|
|
11614
|
-
this.locals = locals;
|
|
11615
|
-
this.hasPartial = false;
|
|
11616
|
-
this.usedLocals = {};
|
|
11617
|
-
|
|
11618
|
-
for (var _iterator4 = (0, _emberBabel.createForOfIteratorHelperLoose)(locals), _step4; !(_step4 = _iterator4()).done;) {
|
|
11619
|
-
var _local = _step4.value;
|
|
11620
|
-
this.usedLocals[_local] = false;
|
|
11621
|
-
}
|
|
11622
|
-
}
|
|
11623
|
-
|
|
11624
|
-
var _proto24 = TransformScope.prototype;
|
|
11625
|
-
|
|
11626
|
-
_proto24.child = function child(node) {
|
|
11627
|
-
var locals = getLocals(node);
|
|
11628
|
-
return locals ? new ChildTransformScope(locals, this) : this;
|
|
11629
|
-
};
|
|
11630
|
-
|
|
11631
|
-
_proto24.usePartial = function usePartial() {
|
|
11632
|
-
this.hasPartial = true;
|
|
11633
|
-
};
|
|
11634
|
-
|
|
11635
|
-
return TransformScope;
|
|
11636
|
-
}();
|
|
11637
|
-
|
|
11638
|
-
var RootTransformScope = /*#__PURE__*/function (_TransformScope) {
|
|
11639
|
-
(0, _emberBabel.inheritsLoose)(RootTransformScope, _TransformScope);
|
|
11640
|
-
|
|
11641
|
-
function RootTransformScope(node) {
|
|
11642
|
-
var _a;
|
|
11643
|
-
|
|
11644
|
-
var locals = (_a = getLocals(node)) !== null && _a !== void 0 ? _a : [];
|
|
11645
|
-
return _TransformScope.call(this, locals) || this;
|
|
11646
|
-
}
|
|
11647
|
-
|
|
11648
|
-
var _proto25 = RootTransformScope.prototype;
|
|
11649
|
-
|
|
11650
|
-
_proto25.useLocal = function useLocal(node) {
|
|
11651
|
-
var name = getLocalName(node);
|
|
11652
|
-
|
|
11653
|
-
if (name && name in this.usedLocals) {
|
|
11654
|
-
this.usedLocals[name] = true;
|
|
11655
|
-
}
|
|
11656
|
-
};
|
|
11657
|
-
|
|
11658
|
-
_proto25.isLocal = function isLocal(name) {
|
|
11659
|
-
return this.locals.indexOf(name) !== -1;
|
|
11660
|
-
};
|
|
11661
|
-
|
|
11662
|
-
_proto25.currentUnusedLocals = function currentUnusedLocals() {
|
|
11663
|
-
var _this6 = this;
|
|
11664
|
-
|
|
11665
|
-
if (!this.hasPartial && this.locals.length > 0) {
|
|
11666
|
-
return this.locals.filter(function (local) {
|
|
11667
|
-
return !_this6.usedLocals[local];
|
|
11668
|
-
});
|
|
11669
|
-
}
|
|
11670
|
-
|
|
11671
|
-
return false;
|
|
11672
|
-
};
|
|
11673
|
-
|
|
11674
|
-
return RootTransformScope;
|
|
11675
|
-
}(TransformScope);
|
|
11676
|
-
|
|
11677
|
-
var ChildTransformScope = /*#__PURE__*/function (_TransformScope2) {
|
|
11678
|
-
(0, _emberBabel.inheritsLoose)(ChildTransformScope, _TransformScope2);
|
|
11679
|
-
|
|
11680
|
-
function ChildTransformScope(locals, parent) {
|
|
11681
|
-
var _this7;
|
|
11682
|
-
|
|
11683
|
-
_this7 = _TransformScope2.call(this, locals) || this;
|
|
11684
|
-
_this7.parent = parent;
|
|
11685
|
-
return _this7;
|
|
11686
|
-
}
|
|
11687
|
-
|
|
11688
|
-
var _proto26 = ChildTransformScope.prototype;
|
|
11689
|
-
|
|
11690
|
-
_proto26.useLocal = function useLocal(node) {
|
|
11691
|
-
var name = getLocalName(node);
|
|
11692
|
-
|
|
11693
|
-
if (name && name in this.usedLocals) {
|
|
11694
|
-
this.usedLocals[name] = true;
|
|
11695
|
-
} else {
|
|
11696
|
-
this.parent.useLocal(node);
|
|
11697
|
-
}
|
|
11698
|
-
};
|
|
11699
|
-
|
|
11700
|
-
_proto26.isLocal = function isLocal(name) {
|
|
11701
|
-
return this.locals.indexOf(name) !== -1 || this.parent.isLocal(name);
|
|
11702
|
-
};
|
|
11703
|
-
|
|
11704
|
-
_proto26.currentUnusedLocals = function currentUnusedLocals() {
|
|
11705
|
-
if (!this.hasPartial && this.locals.length > 0) {
|
|
11706
|
-
// We only care about the last local, because if it is used then it implies
|
|
11707
|
-
// usage of the others (specifically when in a child block, |foo bar|)
|
|
11708
|
-
if (!this.usedLocals[this.locals[this.locals.length - 1]]) {
|
|
11709
|
-
return [this.locals[this.locals.length - 1]];
|
|
11710
|
-
}
|
|
11711
|
-
}
|
|
11712
|
-
|
|
11713
|
-
return false;
|
|
11714
|
-
};
|
|
11715
|
-
|
|
11716
|
-
return ChildTransformScope;
|
|
11717
|
-
}(TransformScope);
|
|
11718
|
-
|
|
11719
11389
|
var WalkerPath = /*#__PURE__*/function () {
|
|
11720
11390
|
function WalkerPath(node, parent, parentKey) {
|
|
11721
|
-
var _this8 = this;
|
|
11722
|
-
|
|
11723
11391
|
if (parent === void 0) {
|
|
11724
11392
|
parent = null;
|
|
11725
11393
|
}
|
|
@@ -11731,28 +11399,16 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
11731
11399
|
this.node = node;
|
|
11732
11400
|
this.parent = parent;
|
|
11733
11401
|
this.parentKey = parentKey;
|
|
11734
|
-
this.scope = parent ? parent.scope.child(node) : new RootTransformScope(node); // Consume in scope values
|
|
11735
|
-
|
|
11736
|
-
if (node.type === 'PathExpression') {
|
|
11737
|
-
this.scope.useLocal(node);
|
|
11738
|
-
}
|
|
11739
|
-
|
|
11740
|
-
if (node.type === 'ElementNode') {
|
|
11741
|
-
this.scope.useLocal(node);
|
|
11742
|
-
node.children.forEach(function (node) {
|
|
11743
|
-
return _this8.scope.useLocal(node);
|
|
11744
|
-
});
|
|
11745
|
-
}
|
|
11746
11402
|
}
|
|
11747
11403
|
|
|
11748
|
-
var
|
|
11404
|
+
var _proto24 = WalkerPath.prototype;
|
|
11749
11405
|
|
|
11750
|
-
|
|
11751
|
-
var
|
|
11406
|
+
_proto24.parents = function parents() {
|
|
11407
|
+
var _this6 = this,
|
|
11752
11408
|
_ref15;
|
|
11753
11409
|
|
|
11754
11410
|
return _ref15 = {}, _ref15[Symbol.iterator] = function () {
|
|
11755
|
-
return new PathParentsIterator(
|
|
11411
|
+
return new PathParentsIterator(_this6);
|
|
11756
11412
|
}, _ref15;
|
|
11757
11413
|
};
|
|
11758
11414
|
|
|
@@ -11772,9 +11428,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
11772
11428
|
this.path = path;
|
|
11773
11429
|
}
|
|
11774
11430
|
|
|
11775
|
-
var
|
|
11431
|
+
var _proto25 = PathParentsIterator.prototype;
|
|
11776
11432
|
|
|
11777
|
-
|
|
11433
|
+
_proto25.next = function next() {
|
|
11778
11434
|
if (this.path.parent) {
|
|
11779
11435
|
this.path = this.path.parent;
|
|
11780
11436
|
return {
|
|
@@ -11869,10 +11525,10 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
11869
11525
|
}
|
|
11870
11526
|
|
|
11871
11527
|
if (result === undefined) {
|
|
11872
|
-
var
|
|
11528
|
+
var keys = visitorKeys[node.type];
|
|
11873
11529
|
|
|
11874
|
-
for (var i = 0; i <
|
|
11875
|
-
var key =
|
|
11530
|
+
for (var i = 0; i < keys.length; i++) {
|
|
11531
|
+
var key = keys[i]; // we know if it has child keys we can widen to a ParentNode
|
|
11876
11532
|
|
|
11877
11533
|
visitKey(visitor, handler, path, key);
|
|
11878
11534
|
}
|
|
@@ -11994,9 +11650,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
11994
11650
|
this.stack = [];
|
|
11995
11651
|
}
|
|
11996
11652
|
|
|
11997
|
-
var
|
|
11653
|
+
var _proto26 = Walker.prototype;
|
|
11998
11654
|
|
|
11999
|
-
|
|
11655
|
+
_proto26.visit = function visit(node, callback) {
|
|
12000
11656
|
if (!node) {
|
|
12001
11657
|
return;
|
|
12002
11658
|
}
|
|
@@ -12014,7 +11670,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12014
11670
|
this.stack.pop();
|
|
12015
11671
|
};
|
|
12016
11672
|
|
|
12017
|
-
|
|
11673
|
+
_proto26.children = function children(node, callback) {
|
|
12018
11674
|
switch (node.type) {
|
|
12019
11675
|
case 'Block':
|
|
12020
11676
|
case 'Template':
|
|
@@ -12167,16 +11823,16 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12167
11823
|
var Builders = /*#__PURE__*/function () {
|
|
12168
11824
|
function Builders() {}
|
|
12169
11825
|
|
|
12170
|
-
var
|
|
11826
|
+
var _proto27 = Builders.prototype;
|
|
12171
11827
|
|
|
12172
|
-
|
|
11828
|
+
_proto27.pos = function pos(line, column) {
|
|
12173
11829
|
return {
|
|
12174
11830
|
line: line,
|
|
12175
11831
|
column: column
|
|
12176
11832
|
};
|
|
12177
11833
|
};
|
|
12178
11834
|
|
|
12179
|
-
|
|
11835
|
+
_proto27.blockItself = function blockItself(_ref16) {
|
|
12180
11836
|
var body = _ref16.body,
|
|
12181
11837
|
blockParams = _ref16.blockParams,
|
|
12182
11838
|
_ref16$chained = _ref16.chained,
|
|
@@ -12191,7 +11847,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12191
11847
|
};
|
|
12192
11848
|
};
|
|
12193
11849
|
|
|
12194
|
-
|
|
11850
|
+
_proto27.template = function template(_ref17) {
|
|
12195
11851
|
var body = _ref17.body,
|
|
12196
11852
|
blockParams = _ref17.blockParams,
|
|
12197
11853
|
loc = _ref17.loc;
|
|
@@ -12203,7 +11859,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12203
11859
|
};
|
|
12204
11860
|
};
|
|
12205
11861
|
|
|
12206
|
-
|
|
11862
|
+
_proto27.mustache = function mustache(_ref18) {
|
|
12207
11863
|
var path = _ref18.path,
|
|
12208
11864
|
params = _ref18.params,
|
|
12209
11865
|
hash = _ref18.hash,
|
|
@@ -12226,7 +11882,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12226
11882
|
};
|
|
12227
11883
|
};
|
|
12228
11884
|
|
|
12229
|
-
|
|
11885
|
+
_proto27.block = function block(_ref19) {
|
|
12230
11886
|
var path = _ref19.path,
|
|
12231
11887
|
params = _ref19.params,
|
|
12232
11888
|
hash = _ref19.hash,
|
|
@@ -12254,7 +11910,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12254
11910
|
};
|
|
12255
11911
|
};
|
|
12256
11912
|
|
|
12257
|
-
|
|
11913
|
+
_proto27.comment = function comment(value, loc) {
|
|
12258
11914
|
return {
|
|
12259
11915
|
type: 'CommentStatement',
|
|
12260
11916
|
value: value,
|
|
@@ -12262,7 +11918,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12262
11918
|
};
|
|
12263
11919
|
};
|
|
12264
11920
|
|
|
12265
|
-
|
|
11921
|
+
_proto27.mustacheComment = function mustacheComment(value, loc) {
|
|
12266
11922
|
return {
|
|
12267
11923
|
type: 'MustacheCommentStatement',
|
|
12268
11924
|
value: value,
|
|
@@ -12270,7 +11926,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12270
11926
|
};
|
|
12271
11927
|
};
|
|
12272
11928
|
|
|
12273
|
-
|
|
11929
|
+
_proto27.concat = function concat(parts, loc) {
|
|
12274
11930
|
return {
|
|
12275
11931
|
type: 'ConcatStatement',
|
|
12276
11932
|
parts: parts,
|
|
@@ -12278,7 +11934,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12278
11934
|
};
|
|
12279
11935
|
};
|
|
12280
11936
|
|
|
12281
|
-
|
|
11937
|
+
_proto27.element = function element(_ref20) {
|
|
12282
11938
|
var tag = _ref20.tag,
|
|
12283
11939
|
selfClosing = _ref20.selfClosing,
|
|
12284
11940
|
attrs = _ref20.attrs,
|
|
@@ -12300,7 +11956,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12300
11956
|
};
|
|
12301
11957
|
};
|
|
12302
11958
|
|
|
12303
|
-
|
|
11959
|
+
_proto27.elementModifier = function elementModifier(_ref21) {
|
|
12304
11960
|
var path = _ref21.path,
|
|
12305
11961
|
params = _ref21.params,
|
|
12306
11962
|
hash = _ref21.hash,
|
|
@@ -12314,7 +11970,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12314
11970
|
};
|
|
12315
11971
|
};
|
|
12316
11972
|
|
|
12317
|
-
|
|
11973
|
+
_proto27.attr = function attr(_ref22) {
|
|
12318
11974
|
var name = _ref22.name,
|
|
12319
11975
|
value = _ref22.value,
|
|
12320
11976
|
loc = _ref22.loc;
|
|
@@ -12326,7 +11982,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12326
11982
|
};
|
|
12327
11983
|
};
|
|
12328
11984
|
|
|
12329
|
-
|
|
11985
|
+
_proto27.text = function text(_ref23) {
|
|
12330
11986
|
var chars = _ref23.chars,
|
|
12331
11987
|
loc = _ref23.loc;
|
|
12332
11988
|
return {
|
|
@@ -12336,7 +11992,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12336
11992
|
};
|
|
12337
11993
|
};
|
|
12338
11994
|
|
|
12339
|
-
|
|
11995
|
+
_proto27.sexpr = function sexpr(_ref24) {
|
|
12340
11996
|
var path = _ref24.path,
|
|
12341
11997
|
params = _ref24.params,
|
|
12342
11998
|
hash = _ref24.hash,
|
|
@@ -12350,7 +12006,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12350
12006
|
};
|
|
12351
12007
|
};
|
|
12352
12008
|
|
|
12353
|
-
|
|
12009
|
+
_proto27.path = function path(_ref25) {
|
|
12354
12010
|
var head = _ref25.head,
|
|
12355
12011
|
tail = _ref25.tail,
|
|
12356
12012
|
loc = _ref25.loc;
|
|
@@ -12362,7 +12018,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12362
12018
|
return new PathExpressionImplV1(original, head, tail, loc);
|
|
12363
12019
|
};
|
|
12364
12020
|
|
|
12365
|
-
|
|
12021
|
+
_proto27.head = function head(_head2, loc) {
|
|
12366
12022
|
if (_head2[0] === '@') {
|
|
12367
12023
|
return this.atName(_head2, loc);
|
|
12368
12024
|
} else if (_head2 === 'this') {
|
|
@@ -12372,14 +12028,14 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12372
12028
|
}
|
|
12373
12029
|
};
|
|
12374
12030
|
|
|
12375
|
-
|
|
12031
|
+
_proto27.this = function _this(loc) {
|
|
12376
12032
|
return {
|
|
12377
12033
|
type: 'ThisHead',
|
|
12378
12034
|
loc: loc
|
|
12379
12035
|
};
|
|
12380
12036
|
};
|
|
12381
12037
|
|
|
12382
|
-
|
|
12038
|
+
_proto27.atName = function atName(name, loc) {
|
|
12383
12039
|
return {
|
|
12384
12040
|
type: 'AtHead',
|
|
12385
12041
|
name: name,
|
|
@@ -12387,7 +12043,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12387
12043
|
};
|
|
12388
12044
|
};
|
|
12389
12045
|
|
|
12390
|
-
|
|
12046
|
+
_proto27.var = function _var(name, loc) {
|
|
12391
12047
|
return {
|
|
12392
12048
|
type: 'VarHead',
|
|
12393
12049
|
name: name,
|
|
@@ -12395,7 +12051,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12395
12051
|
};
|
|
12396
12052
|
};
|
|
12397
12053
|
|
|
12398
|
-
|
|
12054
|
+
_proto27.hash = function hash(pairs, loc) {
|
|
12399
12055
|
return {
|
|
12400
12056
|
type: 'Hash',
|
|
12401
12057
|
pairs: pairs || [],
|
|
@@ -12403,7 +12059,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12403
12059
|
};
|
|
12404
12060
|
};
|
|
12405
12061
|
|
|
12406
|
-
|
|
12062
|
+
_proto27.pair = function pair(_ref26) {
|
|
12407
12063
|
var key = _ref26.key,
|
|
12408
12064
|
value = _ref26.value,
|
|
12409
12065
|
loc = _ref26.loc;
|
|
@@ -12415,7 +12071,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12415
12071
|
};
|
|
12416
12072
|
};
|
|
12417
12073
|
|
|
12418
|
-
|
|
12074
|
+
_proto27.literal = function literal(_ref27) {
|
|
12419
12075
|
var type = _ref27.type,
|
|
12420
12076
|
value = _ref27.value,
|
|
12421
12077
|
loc = _ref27.loc;
|
|
@@ -12427,7 +12083,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12427
12083
|
};
|
|
12428
12084
|
};
|
|
12429
12085
|
|
|
12430
|
-
|
|
12086
|
+
_proto27.undefined = function (_undefined2) {
|
|
12431
12087
|
function undefined() {
|
|
12432
12088
|
return _undefined2.apply(this, arguments);
|
|
12433
12089
|
}
|
|
@@ -12444,14 +12100,14 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12444
12100
|
});
|
|
12445
12101
|
});
|
|
12446
12102
|
|
|
12447
|
-
|
|
12103
|
+
_proto27.null = function _null() {
|
|
12448
12104
|
return this.literal({
|
|
12449
12105
|
type: 'NullLiteral',
|
|
12450
12106
|
value: null
|
|
12451
12107
|
});
|
|
12452
12108
|
};
|
|
12453
12109
|
|
|
12454
|
-
|
|
12110
|
+
_proto27.string = function string(value, loc) {
|
|
12455
12111
|
return this.literal({
|
|
12456
12112
|
type: 'StringLiteral',
|
|
12457
12113
|
value: value,
|
|
@@ -12459,7 +12115,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12459
12115
|
});
|
|
12460
12116
|
};
|
|
12461
12117
|
|
|
12462
|
-
|
|
12118
|
+
_proto27.boolean = function boolean(value, loc) {
|
|
12463
12119
|
return this.literal({
|
|
12464
12120
|
type: 'BooleanLiteral',
|
|
12465
12121
|
value: value,
|
|
@@ -12467,7 +12123,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12467
12123
|
});
|
|
12468
12124
|
};
|
|
12469
12125
|
|
|
12470
|
-
|
|
12126
|
+
_proto27.number = function number(value, loc) {
|
|
12471
12127
|
return this.literal({
|
|
12472
12128
|
type: 'NumberLiteral',
|
|
12473
12129
|
value: value,
|
|
@@ -12521,40 +12177,40 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12521
12177
|
this.tokenizer = new _simpleHtmlTokenizer.EventedTokenizer(this, entityParser, mode);
|
|
12522
12178
|
}
|
|
12523
12179
|
|
|
12524
|
-
var
|
|
12180
|
+
var _proto28 = Parser.prototype;
|
|
12525
12181
|
|
|
12526
|
-
|
|
12182
|
+
_proto28.offset = function offset() {
|
|
12527
12183
|
var _this$tokenizer = this.tokenizer,
|
|
12528
12184
|
line = _this$tokenizer.line,
|
|
12529
12185
|
column = _this$tokenizer.column;
|
|
12530
12186
|
return this.source.offsetFor(line, column);
|
|
12531
12187
|
};
|
|
12532
12188
|
|
|
12533
|
-
|
|
12189
|
+
_proto28.pos = function pos(_ref28) {
|
|
12534
12190
|
var line = _ref28.line,
|
|
12535
12191
|
column = _ref28.column;
|
|
12536
12192
|
return this.source.offsetFor(line, column);
|
|
12537
12193
|
};
|
|
12538
12194
|
|
|
12539
|
-
|
|
12195
|
+
_proto28.finish = function finish(node) {
|
|
12540
12196
|
return (0, _util.assign)({}, node, {
|
|
12541
12197
|
loc: node.loc.until(this.offset())
|
|
12542
12198
|
}); // node.loc = node.loc.withEnd(end);
|
|
12543
12199
|
};
|
|
12544
12200
|
|
|
12545
|
-
|
|
12201
|
+
_proto28.acceptTemplate = function acceptTemplate(node) {
|
|
12546
12202
|
return this[node.type](node);
|
|
12547
12203
|
};
|
|
12548
12204
|
|
|
12549
|
-
|
|
12205
|
+
_proto28.acceptNode = function acceptNode(node) {
|
|
12550
12206
|
return this[node.type](node);
|
|
12551
12207
|
};
|
|
12552
12208
|
|
|
12553
|
-
|
|
12209
|
+
_proto28.currentElement = function currentElement() {
|
|
12554
12210
|
return this.elementStack[this.elementStack.length - 1];
|
|
12555
12211
|
};
|
|
12556
12212
|
|
|
12557
|
-
|
|
12213
|
+
_proto28.sourceForNode = function sourceForNode(node, endNode) {
|
|
12558
12214
|
var firstLine = node.loc.start.line - 1;
|
|
12559
12215
|
var currentLine = firstLine - 1;
|
|
12560
12216
|
var firstColumn = node.loc.start.column;
|
|
@@ -12637,9 +12293,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12637
12293
|
return _Parser.apply(this, arguments) || this;
|
|
12638
12294
|
}
|
|
12639
12295
|
|
|
12640
|
-
var
|
|
12296
|
+
var _proto29 = HandlebarsNodeVisitors.prototype;
|
|
12641
12297
|
|
|
12642
|
-
|
|
12298
|
+
_proto29.Program = function Program(program) {
|
|
12643
12299
|
var body = [];
|
|
12644
12300
|
var node;
|
|
12645
12301
|
|
|
@@ -12681,7 +12337,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12681
12337
|
return node;
|
|
12682
12338
|
};
|
|
12683
12339
|
|
|
12684
|
-
|
|
12340
|
+
_proto29.BlockStatement = function BlockStatement(block) {
|
|
12685
12341
|
if (this.tokenizer.state === "comment"
|
|
12686
12342
|
/* comment */
|
|
12687
12343
|
) {
|
|
@@ -12728,7 +12384,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12728
12384
|
appendChild(parentProgram, node);
|
|
12729
12385
|
};
|
|
12730
12386
|
|
|
12731
|
-
|
|
12387
|
+
_proto29.MustacheStatement = function MustacheStatement(rawMustache) {
|
|
12732
12388
|
var tokenizer = this.tokenizer;
|
|
12733
12389
|
|
|
12734
12390
|
if (tokenizer.state === 'comment') {
|
|
@@ -12837,14 +12493,14 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12837
12493
|
return mustache;
|
|
12838
12494
|
};
|
|
12839
12495
|
|
|
12840
|
-
|
|
12496
|
+
_proto29.appendDynamicAttributeValuePart = function appendDynamicAttributeValuePart(part) {
|
|
12841
12497
|
this.finalizeTextPart();
|
|
12842
12498
|
var attr = this.currentAttr;
|
|
12843
12499
|
attr.isDynamic = true;
|
|
12844
12500
|
attr.parts.push(part);
|
|
12845
12501
|
};
|
|
12846
12502
|
|
|
12847
|
-
|
|
12503
|
+
_proto29.finalizeTextPart = function finalizeTextPart() {
|
|
12848
12504
|
var attr = this.currentAttr;
|
|
12849
12505
|
var text = attr.currentPart;
|
|
12850
12506
|
|
|
@@ -12854,17 +12510,17 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12854
12510
|
}
|
|
12855
12511
|
};
|
|
12856
12512
|
|
|
12857
|
-
|
|
12513
|
+
_proto29.startTextPart = function startTextPart() {
|
|
12858
12514
|
this.currentAttr.currentPart = null;
|
|
12859
12515
|
};
|
|
12860
12516
|
|
|
12861
|
-
|
|
12517
|
+
_proto29.ContentStatement = function ContentStatement(content) {
|
|
12862
12518
|
updateTokenizerLocation(this.tokenizer, content);
|
|
12863
12519
|
this.tokenizer.tokenizePart(content.value);
|
|
12864
12520
|
this.tokenizer.flushData();
|
|
12865
12521
|
};
|
|
12866
12522
|
|
|
12867
|
-
|
|
12523
|
+
_proto29.CommentStatement = function CommentStatement(rawComment) {
|
|
12868
12524
|
var tokenizer = this.tokenizer;
|
|
12869
12525
|
|
|
12870
12526
|
if (tokenizer.state === "comment"
|
|
@@ -12904,23 +12560,23 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12904
12560
|
return comment;
|
|
12905
12561
|
};
|
|
12906
12562
|
|
|
12907
|
-
|
|
12563
|
+
_proto29.PartialStatement = function PartialStatement(partial) {
|
|
12908
12564
|
throw generateSyntaxError("Handlebars partials are not supported", this.source.spanFor(partial.loc));
|
|
12909
12565
|
};
|
|
12910
12566
|
|
|
12911
|
-
|
|
12567
|
+
_proto29.PartialBlockStatement = function PartialBlockStatement(partialBlock) {
|
|
12912
12568
|
throw generateSyntaxError("Handlebars partial blocks are not supported", this.source.spanFor(partialBlock.loc));
|
|
12913
12569
|
};
|
|
12914
12570
|
|
|
12915
|
-
|
|
12571
|
+
_proto29.Decorator = function Decorator(decorator) {
|
|
12916
12572
|
throw generateSyntaxError("Handlebars decorators are not supported", this.source.spanFor(decorator.loc));
|
|
12917
12573
|
};
|
|
12918
12574
|
|
|
12919
|
-
|
|
12575
|
+
_proto29.DecoratorBlock = function DecoratorBlock(decoratorBlock) {
|
|
12920
12576
|
throw generateSyntaxError("Handlebars decorator blocks are not supported", this.source.spanFor(decoratorBlock.loc));
|
|
12921
12577
|
};
|
|
12922
12578
|
|
|
12923
|
-
|
|
12579
|
+
_proto29.SubExpression = function SubExpression(sexpr) {
|
|
12924
12580
|
var _acceptCallNodes3 = acceptCallNodes(this, sexpr),
|
|
12925
12581
|
path = _acceptCallNodes3.path,
|
|
12926
12582
|
params = _acceptCallNodes3.params,
|
|
@@ -12934,7 +12590,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
12934
12590
|
});
|
|
12935
12591
|
};
|
|
12936
12592
|
|
|
12937
|
-
|
|
12593
|
+
_proto29.PathExpression = function PathExpression(path) {
|
|
12938
12594
|
var original = path.original;
|
|
12939
12595
|
var parts;
|
|
12940
12596
|
|
|
@@ -13027,7 +12683,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13027
12683
|
return new PathExpressionImplV1(path.original, pathHead, parts, this.source.spanFor(path.loc));
|
|
13028
12684
|
};
|
|
13029
12685
|
|
|
13030
|
-
|
|
12686
|
+
_proto29.Hash = function Hash(hash) {
|
|
13031
12687
|
var pairs = [];
|
|
13032
12688
|
|
|
13033
12689
|
for (var i = 0; i < hash.pairs.length; i++) {
|
|
@@ -13042,7 +12698,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13042
12698
|
return b.hash(pairs, this.source.spanFor(hash.loc));
|
|
13043
12699
|
};
|
|
13044
12700
|
|
|
13045
|
-
|
|
12701
|
+
_proto29.StringLiteral = function StringLiteral(string) {
|
|
13046
12702
|
return b.literal({
|
|
13047
12703
|
type: 'StringLiteral',
|
|
13048
12704
|
value: string.value,
|
|
@@ -13050,7 +12706,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13050
12706
|
});
|
|
13051
12707
|
};
|
|
13052
12708
|
|
|
13053
|
-
|
|
12709
|
+
_proto29.BooleanLiteral = function BooleanLiteral(boolean) {
|
|
13054
12710
|
return b.literal({
|
|
13055
12711
|
type: 'BooleanLiteral',
|
|
13056
12712
|
value: boolean.value,
|
|
@@ -13058,7 +12714,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13058
12714
|
});
|
|
13059
12715
|
};
|
|
13060
12716
|
|
|
13061
|
-
|
|
12717
|
+
_proto29.NumberLiteral = function NumberLiteral(number) {
|
|
13062
12718
|
return b.literal({
|
|
13063
12719
|
type: 'NumberLiteral',
|
|
13064
12720
|
value: number.value,
|
|
@@ -13066,7 +12722,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13066
12722
|
});
|
|
13067
12723
|
};
|
|
13068
12724
|
|
|
13069
|
-
|
|
12725
|
+
_proto29.UndefinedLiteral = function UndefinedLiteral(undef) {
|
|
13070
12726
|
return b.literal({
|
|
13071
12727
|
type: 'UndefinedLiteral',
|
|
13072
12728
|
value: undefined,
|
|
@@ -13074,7 +12730,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13074
12730
|
});
|
|
13075
12731
|
};
|
|
13076
12732
|
|
|
13077
|
-
|
|
12733
|
+
_proto29.NullLiteral = function NullLiteral(nul) {
|
|
13078
12734
|
return b.literal({
|
|
13079
12735
|
type: 'NullLiteral',
|
|
13080
12736
|
value: null,
|
|
@@ -13174,57 +12830,57 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13174
12830
|
(0, _emberBabel.inheritsLoose)(TokenizerEventHandlers, _HandlebarsNodeVisito);
|
|
13175
12831
|
|
|
13176
12832
|
function TokenizerEventHandlers() {
|
|
13177
|
-
var
|
|
12833
|
+
var _this7;
|
|
13178
12834
|
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
return
|
|
12835
|
+
_this7 = _HandlebarsNodeVisito.apply(this, arguments) || this;
|
|
12836
|
+
_this7.tagOpenLine = 0;
|
|
12837
|
+
_this7.tagOpenColumn = 0;
|
|
12838
|
+
return _this7;
|
|
13183
12839
|
}
|
|
13184
12840
|
|
|
13185
|
-
var
|
|
12841
|
+
var _proto30 = TokenizerEventHandlers.prototype;
|
|
13186
12842
|
|
|
13187
|
-
|
|
12843
|
+
_proto30.reset = function reset() {
|
|
13188
12844
|
this.currentNode = null;
|
|
13189
12845
|
} // Comment
|
|
13190
12846
|
;
|
|
13191
12847
|
|
|
13192
|
-
|
|
12848
|
+
_proto30.beginComment = function beginComment() {
|
|
13193
12849
|
this.currentNode = b.comment('', this.source.offsetFor(this.tagOpenLine, this.tagOpenColumn));
|
|
13194
12850
|
};
|
|
13195
12851
|
|
|
13196
|
-
|
|
12852
|
+
_proto30.appendToCommentData = function appendToCommentData(char) {
|
|
13197
12853
|
this.currentComment.value += char;
|
|
13198
12854
|
};
|
|
13199
12855
|
|
|
13200
|
-
|
|
12856
|
+
_proto30.finishComment = function finishComment() {
|
|
13201
12857
|
appendChild(this.currentElement(), this.finish(this.currentComment));
|
|
13202
12858
|
} // Data
|
|
13203
12859
|
;
|
|
13204
12860
|
|
|
13205
|
-
|
|
12861
|
+
_proto30.beginData = function beginData() {
|
|
13206
12862
|
this.currentNode = b.text({
|
|
13207
12863
|
chars: '',
|
|
13208
12864
|
loc: this.offset().collapsed()
|
|
13209
12865
|
});
|
|
13210
12866
|
};
|
|
13211
12867
|
|
|
13212
|
-
|
|
12868
|
+
_proto30.appendToData = function appendToData(char) {
|
|
13213
12869
|
this.currentData.chars += char;
|
|
13214
12870
|
};
|
|
13215
12871
|
|
|
13216
|
-
|
|
12872
|
+
_proto30.finishData = function finishData() {
|
|
13217
12873
|
this.currentData.loc = this.currentData.loc.withEnd(this.offset());
|
|
13218
12874
|
appendChild(this.currentElement(), this.currentData);
|
|
13219
12875
|
} // Tags - basic
|
|
13220
12876
|
;
|
|
13221
12877
|
|
|
13222
|
-
|
|
12878
|
+
_proto30.tagOpen = function tagOpen() {
|
|
13223
12879
|
this.tagOpenLine = this.tokenizer.line;
|
|
13224
12880
|
this.tagOpenColumn = this.tokenizer.column;
|
|
13225
12881
|
};
|
|
13226
12882
|
|
|
13227
|
-
|
|
12883
|
+
_proto30.beginStartTag = function beginStartTag() {
|
|
13228
12884
|
this.currentNode = {
|
|
13229
12885
|
type: 'StartTag',
|
|
13230
12886
|
name: '',
|
|
@@ -13236,7 +12892,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13236
12892
|
};
|
|
13237
12893
|
};
|
|
13238
12894
|
|
|
13239
|
-
|
|
12895
|
+
_proto30.beginEndTag = function beginEndTag() {
|
|
13240
12896
|
this.currentNode = {
|
|
13241
12897
|
type: 'EndTag',
|
|
13242
12898
|
name: '',
|
|
@@ -13248,7 +12904,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13248
12904
|
};
|
|
13249
12905
|
};
|
|
13250
12906
|
|
|
13251
|
-
|
|
12907
|
+
_proto30.finishTag = function finishTag() {
|
|
13252
12908
|
var tag = this.finish(this.currentTag);
|
|
13253
12909
|
|
|
13254
12910
|
if (tag.type === 'StartTag') {
|
|
@@ -13269,7 +12925,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13269
12925
|
}
|
|
13270
12926
|
};
|
|
13271
12927
|
|
|
13272
|
-
|
|
12928
|
+
_proto30.finishStartTag = function finishStartTag() {
|
|
13273
12929
|
var _this$finish = this.finish(this.currentStartTag),
|
|
13274
12930
|
name = _this$finish.name,
|
|
13275
12931
|
attrs = _this$finish.attributes,
|
|
@@ -13291,7 +12947,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13291
12947
|
this.elementStack.push(element);
|
|
13292
12948
|
};
|
|
13293
12949
|
|
|
13294
|
-
|
|
12950
|
+
_proto30.finishEndTag = function finishEndTag(isVoid) {
|
|
13295
12951
|
var tag = this.finish(this.currentTag);
|
|
13296
12952
|
var element = this.elementStack.pop();
|
|
13297
12953
|
var parent = this.currentElement();
|
|
@@ -13301,17 +12957,17 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13301
12957
|
appendChild(parent, element);
|
|
13302
12958
|
};
|
|
13303
12959
|
|
|
13304
|
-
|
|
12960
|
+
_proto30.markTagAsSelfClosing = function markTagAsSelfClosing() {
|
|
13305
12961
|
this.currentTag.selfClosing = true;
|
|
13306
12962
|
} // Tags - name
|
|
13307
12963
|
;
|
|
13308
12964
|
|
|
13309
|
-
|
|
12965
|
+
_proto30.appendToTagName = function appendToTagName(char) {
|
|
13310
12966
|
this.currentTag.name += char;
|
|
13311
12967
|
} // Tags - attributes
|
|
13312
12968
|
;
|
|
13313
12969
|
|
|
13314
|
-
|
|
12970
|
+
_proto30.beginAttribute = function beginAttribute() {
|
|
13315
12971
|
var offset = this.offset();
|
|
13316
12972
|
this.currentAttribute = {
|
|
13317
12973
|
name: '',
|
|
@@ -13324,17 +12980,17 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13324
12980
|
};
|
|
13325
12981
|
};
|
|
13326
12982
|
|
|
13327
|
-
|
|
12983
|
+
_proto30.appendToAttributeName = function appendToAttributeName(char) {
|
|
13328
12984
|
this.currentAttr.name += char;
|
|
13329
12985
|
};
|
|
13330
12986
|
|
|
13331
|
-
|
|
12987
|
+
_proto30.beginAttributeValue = function beginAttributeValue(isQuoted) {
|
|
13332
12988
|
this.currentAttr.isQuoted = isQuoted;
|
|
13333
12989
|
this.startTextPart();
|
|
13334
12990
|
this.currentAttr.valueSpan = this.offset().collapsed();
|
|
13335
12991
|
};
|
|
13336
12992
|
|
|
13337
|
-
|
|
12993
|
+
_proto30.appendToAttributeValue = function appendToAttributeValue(char) {
|
|
13338
12994
|
var parts = this.currentAttr.parts;
|
|
13339
12995
|
var lastPart = parts[parts.length - 1];
|
|
13340
12996
|
var current = this.currentAttr.currentPart;
|
|
@@ -13361,7 +13017,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13361
13017
|
}
|
|
13362
13018
|
};
|
|
13363
13019
|
|
|
13364
|
-
|
|
13020
|
+
_proto30.finishAttributeValue = function finishAttributeValue() {
|
|
13365
13021
|
this.finalizeTextPart();
|
|
13366
13022
|
var tag = this.currentTag;
|
|
13367
13023
|
var tokenizerPos = this.offset();
|
|
@@ -13390,11 +13046,11 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13390
13046
|
this.currentStartTag.attributes.push(attribute);
|
|
13391
13047
|
};
|
|
13392
13048
|
|
|
13393
|
-
|
|
13049
|
+
_proto30.reportSyntaxError = function reportSyntaxError(message) {
|
|
13394
13050
|
throw generateSyntaxError(message, this.offset().collapsed());
|
|
13395
13051
|
};
|
|
13396
13052
|
|
|
13397
|
-
|
|
13053
|
+
_proto30.assembleConcatenatedValue = function assembleConcatenatedValue(parts) {
|
|
13398
13054
|
for (var i = 0; i < parts.length; i++) {
|
|
13399
13055
|
var part = parts[i];
|
|
13400
13056
|
|
|
@@ -13409,7 +13065,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13409
13065
|
return b.concat(parts, this.source.spanFor(first.loc).extend(this.source.spanFor(last.loc)));
|
|
13410
13066
|
};
|
|
13411
13067
|
|
|
13412
|
-
|
|
13068
|
+
_proto30.validateEndTag = function validateEndTag(tag, element, selfClosing) {
|
|
13413
13069
|
var error;
|
|
13414
13070
|
|
|
13415
13071
|
if (voidMap[tag.name] && !selfClosing) {
|
|
@@ -13428,7 +13084,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13428
13084
|
}
|
|
13429
13085
|
};
|
|
13430
13086
|
|
|
13431
|
-
|
|
13087
|
+
_proto30.assembleAttributeValue = function assembleAttributeValue(parts, isQuoted, isDynamic, span) {
|
|
13432
13088
|
if (isDynamic) {
|
|
13433
13089
|
if (isQuoted) {
|
|
13434
13090
|
return this.assembleConcatenatedValue(parts);
|
|
@@ -13466,9 +13122,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13466
13122
|
return _EntityParser.call(this, {}) || this;
|
|
13467
13123
|
}
|
|
13468
13124
|
|
|
13469
|
-
var
|
|
13125
|
+
var _proto31 = CodemodEntityParser.prototype;
|
|
13470
13126
|
|
|
13471
|
-
|
|
13127
|
+
_proto31.parse = function parse() {
|
|
13472
13128
|
return undefined;
|
|
13473
13129
|
};
|
|
13474
13130
|
|
|
@@ -13541,25 +13197,6 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13541
13197
|
return program;
|
|
13542
13198
|
}
|
|
13543
13199
|
|
|
13544
|
-
var __classPrivateFieldSet$4 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
13545
|
-
if (!privateMap.has(receiver)) {
|
|
13546
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
13547
|
-
}
|
|
13548
|
-
|
|
13549
|
-
privateMap.set(receiver, value);
|
|
13550
|
-
return value;
|
|
13551
|
-
};
|
|
13552
|
-
|
|
13553
|
-
var __classPrivateFieldGet$4 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
13554
|
-
if (!privateMap.has(receiver)) {
|
|
13555
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
13556
|
-
}
|
|
13557
|
-
|
|
13558
|
-
return privateMap.get(receiver);
|
|
13559
|
-
};
|
|
13560
|
-
|
|
13561
|
-
var _hasEval;
|
|
13562
|
-
|
|
13563
13200
|
var SymbolTable = /*#__PURE__*/function () {
|
|
13564
13201
|
function SymbolTable() {}
|
|
13565
13202
|
|
|
@@ -13567,13 +13204,13 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13567
13204
|
return new ProgramSymbolTable(locals, customizeComponentName);
|
|
13568
13205
|
};
|
|
13569
13206
|
|
|
13570
|
-
var
|
|
13207
|
+
var _proto32 = SymbolTable.prototype;
|
|
13571
13208
|
|
|
13572
|
-
|
|
13573
|
-
var
|
|
13209
|
+
_proto32.child = function child(locals) {
|
|
13210
|
+
var _this8 = this;
|
|
13574
13211
|
|
|
13575
13212
|
var symbols = locals.map(function (name) {
|
|
13576
|
-
return
|
|
13213
|
+
return _this8.allocate(name);
|
|
13577
13214
|
});
|
|
13578
13215
|
return new BlockSymbolTable(this, locals, symbols);
|
|
13579
13216
|
};
|
|
@@ -13587,38 +13224,36 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13587
13224
|
(0, _emberBabel.inheritsLoose)(ProgramSymbolTable, _SymbolTable);
|
|
13588
13225
|
|
|
13589
13226
|
function ProgramSymbolTable(templateLocals, customizeComponentName) {
|
|
13590
|
-
var
|
|
13591
|
-
|
|
13592
|
-
_this12 = _SymbolTable.call(this) || this;
|
|
13593
|
-
_this12.templateLocals = templateLocals;
|
|
13594
|
-
_this12.customizeComponentName = customizeComponentName;
|
|
13595
|
-
_this12.symbols = [];
|
|
13596
|
-
_this12.upvars = [];
|
|
13597
|
-
_this12.size = 1;
|
|
13598
|
-
_this12.named = (0, _util.dict)();
|
|
13599
|
-
_this12.blocks = (0, _util.dict)();
|
|
13600
|
-
_this12.usedTemplateLocals = [];
|
|
13227
|
+
var _this9;
|
|
13601
13228
|
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13229
|
+
_this9 = _SymbolTable.call(this) || this;
|
|
13230
|
+
_this9.templateLocals = templateLocals;
|
|
13231
|
+
_this9.customizeComponentName = customizeComponentName;
|
|
13232
|
+
_this9.symbols = [];
|
|
13233
|
+
_this9.upvars = [];
|
|
13234
|
+
_this9.size = 1;
|
|
13235
|
+
_this9.named = (0, _util.dict)();
|
|
13236
|
+
_this9.blocks = (0, _util.dict)();
|
|
13237
|
+
_this9.usedTemplateLocals = [];
|
|
13238
|
+
_this9._hasEval = false;
|
|
13239
|
+
return _this9;
|
|
13605
13240
|
}
|
|
13606
13241
|
|
|
13607
|
-
var
|
|
13242
|
+
var _proto33 = ProgramSymbolTable.prototype;
|
|
13608
13243
|
|
|
13609
|
-
|
|
13244
|
+
_proto33.getUsedTemplateLocals = function getUsedTemplateLocals() {
|
|
13610
13245
|
return this.usedTemplateLocals;
|
|
13611
13246
|
};
|
|
13612
13247
|
|
|
13613
|
-
|
|
13614
|
-
|
|
13248
|
+
_proto33.setHasEval = function setHasEval() {
|
|
13249
|
+
this._hasEval = true;
|
|
13615
13250
|
};
|
|
13616
13251
|
|
|
13617
|
-
|
|
13252
|
+
_proto33.has = function has(name) {
|
|
13618
13253
|
return this.templateLocals.indexOf(name) !== -1;
|
|
13619
13254
|
};
|
|
13620
13255
|
|
|
13621
|
-
|
|
13256
|
+
_proto33.get = function get(name) {
|
|
13622
13257
|
var index = this.usedTemplateLocals.indexOf(name);
|
|
13623
13258
|
|
|
13624
13259
|
if (index !== -1) {
|
|
@@ -13630,18 +13265,18 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13630
13265
|
return [index, true];
|
|
13631
13266
|
};
|
|
13632
13267
|
|
|
13633
|
-
|
|
13268
|
+
_proto33.getLocalsMap = function getLocalsMap() {
|
|
13634
13269
|
return (0, _util.dict)();
|
|
13635
13270
|
};
|
|
13636
13271
|
|
|
13637
|
-
|
|
13272
|
+
_proto33.getEvalInfo = function getEvalInfo() {
|
|
13638
13273
|
var locals = this.getLocalsMap();
|
|
13639
13274
|
return Object.keys(locals).map(function (symbol) {
|
|
13640
13275
|
return locals[symbol];
|
|
13641
13276
|
});
|
|
13642
13277
|
};
|
|
13643
13278
|
|
|
13644
|
-
|
|
13279
|
+
_proto33.allocateFree = function allocateFree(name, resolution) {
|
|
13645
13280
|
// If the name in question is an uppercase (i.e. angle-bracket) component invocation, run
|
|
13646
13281
|
// the optional `customizeComponentName` function provided to the precompiler.
|
|
13647
13282
|
if (resolution.resolution() === 39
|
|
@@ -13661,7 +13296,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13661
13296
|
return index;
|
|
13662
13297
|
};
|
|
13663
13298
|
|
|
13664
|
-
|
|
13299
|
+
_proto33.allocateNamed = function allocateNamed(name) {
|
|
13665
13300
|
var named = this.named[name];
|
|
13666
13301
|
|
|
13667
13302
|
if (!named) {
|
|
@@ -13671,7 +13306,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13671
13306
|
return named;
|
|
13672
13307
|
};
|
|
13673
13308
|
|
|
13674
|
-
|
|
13309
|
+
_proto33.allocateBlock = function allocateBlock(name) {
|
|
13675
13310
|
if (name === 'inverse') {
|
|
13676
13311
|
name = 'else';
|
|
13677
13312
|
}
|
|
@@ -13685,7 +13320,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13685
13320
|
return block;
|
|
13686
13321
|
};
|
|
13687
13322
|
|
|
13688
|
-
|
|
13323
|
+
_proto33.allocate = function allocate(identifier) {
|
|
13689
13324
|
this.symbols.push(identifier);
|
|
13690
13325
|
return this.size++;
|
|
13691
13326
|
};
|
|
@@ -13693,73 +13328,72 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13693
13328
|
(0, _emberBabel.createClass)(ProgramSymbolTable, [{
|
|
13694
13329
|
key: "hasEval",
|
|
13695
13330
|
get: function get() {
|
|
13696
|
-
return
|
|
13331
|
+
return this._hasEval;
|
|
13697
13332
|
}
|
|
13698
13333
|
}]);
|
|
13699
13334
|
return ProgramSymbolTable;
|
|
13700
13335
|
}(SymbolTable);
|
|
13701
13336
|
|
|
13702
13337
|
_exports.ProgramSymbolTable = ProgramSymbolTable;
|
|
13703
|
-
_hasEval = new WeakMap();
|
|
13704
13338
|
|
|
13705
13339
|
var BlockSymbolTable = /*#__PURE__*/function (_SymbolTable2) {
|
|
13706
13340
|
(0, _emberBabel.inheritsLoose)(BlockSymbolTable, _SymbolTable2);
|
|
13707
13341
|
|
|
13708
13342
|
function BlockSymbolTable(parent, symbols, slots) {
|
|
13709
|
-
var
|
|
13343
|
+
var _this10;
|
|
13710
13344
|
|
|
13711
|
-
|
|
13712
|
-
|
|
13713
|
-
|
|
13714
|
-
|
|
13715
|
-
return
|
|
13345
|
+
_this10 = _SymbolTable2.call(this) || this;
|
|
13346
|
+
_this10.parent = parent;
|
|
13347
|
+
_this10.symbols = symbols;
|
|
13348
|
+
_this10.slots = slots;
|
|
13349
|
+
return _this10;
|
|
13716
13350
|
}
|
|
13717
13351
|
|
|
13718
|
-
var
|
|
13352
|
+
var _proto34 = BlockSymbolTable.prototype;
|
|
13719
13353
|
|
|
13720
|
-
|
|
13354
|
+
_proto34.has = function has(name) {
|
|
13721
13355
|
return this.symbols.indexOf(name) !== -1 || this.parent.has(name);
|
|
13722
13356
|
};
|
|
13723
13357
|
|
|
13724
|
-
|
|
13358
|
+
_proto34.get = function get(name) {
|
|
13725
13359
|
var slot = this.symbols.indexOf(name);
|
|
13726
13360
|
return slot === -1 ? this.parent.get(name) : [this.slots[slot], false];
|
|
13727
13361
|
};
|
|
13728
13362
|
|
|
13729
|
-
|
|
13730
|
-
var
|
|
13363
|
+
_proto34.getLocalsMap = function getLocalsMap() {
|
|
13364
|
+
var _this11 = this;
|
|
13731
13365
|
|
|
13732
13366
|
var dict$$1 = this.parent.getLocalsMap();
|
|
13733
13367
|
this.symbols.forEach(function (symbol) {
|
|
13734
|
-
return dict$$1[symbol] =
|
|
13368
|
+
return dict$$1[symbol] = _this11.get(symbol)[0];
|
|
13735
13369
|
});
|
|
13736
13370
|
return dict$$1;
|
|
13737
13371
|
};
|
|
13738
13372
|
|
|
13739
|
-
|
|
13373
|
+
_proto34.getEvalInfo = function getEvalInfo() {
|
|
13740
13374
|
var locals = this.getLocalsMap();
|
|
13741
13375
|
return Object.keys(locals).map(function (symbol) {
|
|
13742
13376
|
return locals[symbol];
|
|
13743
13377
|
});
|
|
13744
13378
|
};
|
|
13745
13379
|
|
|
13746
|
-
|
|
13380
|
+
_proto34.setHasEval = function setHasEval() {
|
|
13747
13381
|
this.parent.setHasEval();
|
|
13748
13382
|
};
|
|
13749
13383
|
|
|
13750
|
-
|
|
13384
|
+
_proto34.allocateFree = function allocateFree(name, resolution) {
|
|
13751
13385
|
return this.parent.allocateFree(name, resolution);
|
|
13752
13386
|
};
|
|
13753
13387
|
|
|
13754
|
-
|
|
13388
|
+
_proto34.allocateNamed = function allocateNamed(name) {
|
|
13755
13389
|
return this.parent.allocateNamed(name);
|
|
13756
13390
|
};
|
|
13757
13391
|
|
|
13758
|
-
|
|
13392
|
+
_proto34.allocateBlock = function allocateBlock(name) {
|
|
13759
13393
|
return this.parent.allocateBlock(name);
|
|
13760
13394
|
};
|
|
13761
13395
|
|
|
13762
|
-
|
|
13396
|
+
_proto34.allocate = function allocate(identifier) {
|
|
13763
13397
|
return this.parent.allocate(identifier);
|
|
13764
13398
|
};
|
|
13765
13399
|
|
|
@@ -13790,10 +13424,10 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13790
13424
|
var Builder = /*#__PURE__*/function () {
|
|
13791
13425
|
function Builder() {}
|
|
13792
13426
|
|
|
13793
|
-
var
|
|
13427
|
+
var _proto35 = Builder.prototype;
|
|
13794
13428
|
|
|
13795
13429
|
// TEMPLATE //
|
|
13796
|
-
|
|
13430
|
+
_proto35.template = function template(symbols, body, loc$$1) {
|
|
13797
13431
|
return new Template({
|
|
13798
13432
|
table: symbols,
|
|
13799
13433
|
body: body,
|
|
@@ -13802,7 +13436,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13802
13436
|
} // INTERNAL (these nodes cannot be reached when doing general-purpose visiting) //
|
|
13803
13437
|
;
|
|
13804
13438
|
|
|
13805
|
-
|
|
13439
|
+
_proto35.block = function block(symbols, body, loc$$1) {
|
|
13806
13440
|
return new Block({
|
|
13807
13441
|
scope: symbols,
|
|
13808
13442
|
body: body,
|
|
@@ -13810,7 +13444,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13810
13444
|
});
|
|
13811
13445
|
};
|
|
13812
13446
|
|
|
13813
|
-
|
|
13447
|
+
_proto35.namedBlock = function namedBlock(name, block, loc$$1) {
|
|
13814
13448
|
return new NamedBlock({
|
|
13815
13449
|
name: name,
|
|
13816
13450
|
block: block,
|
|
@@ -13821,7 +13455,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13821
13455
|
});
|
|
13822
13456
|
};
|
|
13823
13457
|
|
|
13824
|
-
|
|
13458
|
+
_proto35.simpleNamedBlock = function simpleNamedBlock(name, block, loc$$1) {
|
|
13825
13459
|
return new BuildElement({
|
|
13826
13460
|
selfClosing: false,
|
|
13827
13461
|
attrs: [],
|
|
@@ -13831,14 +13465,14 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13831
13465
|
}).named(name, block, loc$$1);
|
|
13832
13466
|
};
|
|
13833
13467
|
|
|
13834
|
-
|
|
13468
|
+
_proto35.slice = function slice(chars, loc$$1) {
|
|
13835
13469
|
return new SourceSlice({
|
|
13836
13470
|
loc: loc$$1,
|
|
13837
13471
|
chars: chars
|
|
13838
13472
|
});
|
|
13839
13473
|
};
|
|
13840
13474
|
|
|
13841
|
-
|
|
13475
|
+
_proto35.args = function args(positional, named, loc$$1) {
|
|
13842
13476
|
return new Args({
|
|
13843
13477
|
loc: loc$$1,
|
|
13844
13478
|
positional: positional,
|
|
@@ -13846,28 +13480,28 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13846
13480
|
});
|
|
13847
13481
|
};
|
|
13848
13482
|
|
|
13849
|
-
|
|
13483
|
+
_proto35.positional = function positional(exprs, loc$$1) {
|
|
13850
13484
|
return new PositionalArguments({
|
|
13851
13485
|
loc: loc$$1,
|
|
13852
13486
|
exprs: exprs
|
|
13853
13487
|
});
|
|
13854
13488
|
};
|
|
13855
13489
|
|
|
13856
|
-
|
|
13490
|
+
_proto35.namedArgument = function namedArgument(key, value) {
|
|
13857
13491
|
return new NamedArgument({
|
|
13858
13492
|
name: key,
|
|
13859
13493
|
value: value
|
|
13860
13494
|
});
|
|
13861
13495
|
};
|
|
13862
13496
|
|
|
13863
|
-
|
|
13497
|
+
_proto35.named = function named(entries, loc$$1) {
|
|
13864
13498
|
return new NamedArguments({
|
|
13865
13499
|
loc: loc$$1,
|
|
13866
13500
|
entries: entries
|
|
13867
13501
|
});
|
|
13868
13502
|
};
|
|
13869
13503
|
|
|
13870
|
-
|
|
13504
|
+
_proto35.attr = function attr(_ref29, loc$$1) {
|
|
13871
13505
|
var name = _ref29.name,
|
|
13872
13506
|
value = _ref29.value,
|
|
13873
13507
|
trusting = _ref29.trusting;
|
|
@@ -13879,14 +13513,14 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13879
13513
|
});
|
|
13880
13514
|
};
|
|
13881
13515
|
|
|
13882
|
-
|
|
13516
|
+
_proto35.splatAttr = function splatAttr(symbol, loc$$1) {
|
|
13883
13517
|
return new SplatAttr({
|
|
13884
13518
|
symbol: symbol,
|
|
13885
13519
|
loc: loc$$1
|
|
13886
13520
|
});
|
|
13887
13521
|
};
|
|
13888
13522
|
|
|
13889
|
-
|
|
13523
|
+
_proto35.arg = function arg(_ref30, loc$$1) {
|
|
13890
13524
|
var name = _ref30.name,
|
|
13891
13525
|
value = _ref30.value,
|
|
13892
13526
|
trusting = _ref30.trusting;
|
|
@@ -13899,7 +13533,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13899
13533
|
} // EXPRESSIONS //
|
|
13900
13534
|
;
|
|
13901
13535
|
|
|
13902
|
-
|
|
13536
|
+
_proto35.path = function path(head, tail, loc$$1) {
|
|
13903
13537
|
return new PathExpression({
|
|
13904
13538
|
loc: loc$$1,
|
|
13905
13539
|
ref: head,
|
|
@@ -13907,13 +13541,13 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13907
13541
|
});
|
|
13908
13542
|
};
|
|
13909
13543
|
|
|
13910
|
-
|
|
13544
|
+
_proto35.self = function self(loc$$1) {
|
|
13911
13545
|
return new ThisReference({
|
|
13912
13546
|
loc: loc$$1
|
|
13913
13547
|
});
|
|
13914
13548
|
};
|
|
13915
13549
|
|
|
13916
|
-
|
|
13550
|
+
_proto35.at = function at(name, symbol, loc$$1) {
|
|
13917
13551
|
return new ArgReference({
|
|
13918
13552
|
loc: loc$$1,
|
|
13919
13553
|
name: new SourceSlice({
|
|
@@ -13924,7 +13558,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13924
13558
|
});
|
|
13925
13559
|
};
|
|
13926
13560
|
|
|
13927
|
-
|
|
13561
|
+
_proto35.freeVar = function freeVar(_ref31) {
|
|
13928
13562
|
var name = _ref31.name,
|
|
13929
13563
|
context = _ref31.context,
|
|
13930
13564
|
symbol = _ref31.symbol,
|
|
@@ -13937,7 +13571,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13937
13571
|
});
|
|
13938
13572
|
};
|
|
13939
13573
|
|
|
13940
|
-
|
|
13574
|
+
_proto35.localVar = function localVar(name, symbol, isTemplateLocal, loc$$1) {
|
|
13941
13575
|
return new LocalVarReference({
|
|
13942
13576
|
loc: loc$$1,
|
|
13943
13577
|
name: name,
|
|
@@ -13946,7 +13580,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13946
13580
|
});
|
|
13947
13581
|
};
|
|
13948
13582
|
|
|
13949
|
-
|
|
13583
|
+
_proto35.sexp = function sexp(parts, loc$$1) {
|
|
13950
13584
|
return new CallExpression({
|
|
13951
13585
|
loc: loc$$1,
|
|
13952
13586
|
callee: parts.callee,
|
|
@@ -13954,7 +13588,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13954
13588
|
});
|
|
13955
13589
|
};
|
|
13956
13590
|
|
|
13957
|
-
|
|
13591
|
+
_proto35.deprecatedCall = function deprecatedCall(arg, callee, loc$$1) {
|
|
13958
13592
|
return new DeprecatedCallExpression({
|
|
13959
13593
|
loc: loc$$1,
|
|
13960
13594
|
arg: arg,
|
|
@@ -13962,7 +13596,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13962
13596
|
});
|
|
13963
13597
|
};
|
|
13964
13598
|
|
|
13965
|
-
|
|
13599
|
+
_proto35.interpolate = function interpolate(parts, loc$$1) {
|
|
13966
13600
|
(0, _util.assertPresent)(parts);
|
|
13967
13601
|
return new InterpolateExpression({
|
|
13968
13602
|
loc: loc$$1,
|
|
@@ -13970,7 +13604,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13970
13604
|
});
|
|
13971
13605
|
};
|
|
13972
13606
|
|
|
13973
|
-
|
|
13607
|
+
_proto35.literal = function literal(value, loc$$1) {
|
|
13974
13608
|
return new LiteralExpression({
|
|
13975
13609
|
loc: loc$$1,
|
|
13976
13610
|
value: value
|
|
@@ -13978,7 +13612,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13978
13612
|
} // STATEMENTS //
|
|
13979
13613
|
;
|
|
13980
13614
|
|
|
13981
|
-
|
|
13615
|
+
_proto35.append = function append(_ref32, loc$$1) {
|
|
13982
13616
|
var table = _ref32.table,
|
|
13983
13617
|
trusting = _ref32.trusting,
|
|
13984
13618
|
value = _ref32.value;
|
|
@@ -13990,7 +13624,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
13990
13624
|
});
|
|
13991
13625
|
};
|
|
13992
13626
|
|
|
13993
|
-
|
|
13627
|
+
_proto35.modifier = function modifier(_ref33, loc$$1) {
|
|
13994
13628
|
var callee = _ref33.callee,
|
|
13995
13629
|
args = _ref33.args;
|
|
13996
13630
|
return new ElementModifier({
|
|
@@ -14000,14 +13634,14 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14000
13634
|
});
|
|
14001
13635
|
};
|
|
14002
13636
|
|
|
14003
|
-
|
|
13637
|
+
_proto35.namedBlocks = function namedBlocks(blocks, loc$$1) {
|
|
14004
13638
|
return new NamedBlocks({
|
|
14005
13639
|
loc: loc$$1,
|
|
14006
13640
|
blocks: blocks
|
|
14007
13641
|
});
|
|
14008
13642
|
};
|
|
14009
13643
|
|
|
14010
|
-
|
|
13644
|
+
_proto35.blockStatement = function blockStatement(_a, loc$$1) {
|
|
14011
13645
|
var symbols = _a.symbols,
|
|
14012
13646
|
program = _a.program,
|
|
14013
13647
|
_a$inverse = _a.inverse,
|
|
@@ -14030,7 +13664,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14030
13664
|
});
|
|
14031
13665
|
};
|
|
14032
13666
|
|
|
14033
|
-
|
|
13667
|
+
_proto35.element = function element(options) {
|
|
14034
13668
|
return new BuildElement(options);
|
|
14035
13669
|
};
|
|
14036
13670
|
|
|
@@ -14043,9 +13677,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14043
13677
|
this.builder = new Builder();
|
|
14044
13678
|
}
|
|
14045
13679
|
|
|
14046
|
-
var
|
|
13680
|
+
var _proto36 = BuildElement.prototype;
|
|
14047
13681
|
|
|
14048
|
-
|
|
13682
|
+
_proto36.simple = function simple(tag, body, loc$$1) {
|
|
14049
13683
|
return new SimpleElement((0, _util.assign)({
|
|
14050
13684
|
tag: tag,
|
|
14051
13685
|
body: body,
|
|
@@ -14054,7 +13688,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14054
13688
|
}, this.base));
|
|
14055
13689
|
};
|
|
14056
13690
|
|
|
14057
|
-
|
|
13691
|
+
_proto36.named = function named(name, block, loc$$1) {
|
|
14058
13692
|
return new NamedBlock((0, _util.assign)({
|
|
14059
13693
|
name: name,
|
|
14060
13694
|
block: block,
|
|
@@ -14063,7 +13697,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14063
13697
|
}, this.base));
|
|
14064
13698
|
};
|
|
14065
13699
|
|
|
14066
|
-
|
|
13700
|
+
_proto36.selfClosingComponent = function selfClosingComponent(callee, loc$$1) {
|
|
14067
13701
|
return new InvokeComponent((0, _util.assign)({
|
|
14068
13702
|
loc: loc$$1,
|
|
14069
13703
|
callee: callee,
|
|
@@ -14078,7 +13712,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14078
13712
|
}, this.base));
|
|
14079
13713
|
};
|
|
14080
13714
|
|
|
14081
|
-
|
|
13715
|
+
_proto36.componentWithDefaultBlock = function componentWithDefaultBlock(callee, children, symbols, loc$$1) {
|
|
14082
13716
|
var block = this.builder.block(symbols, children, loc$$1);
|
|
14083
13717
|
var namedBlock = this.builder.namedBlock(SourceSlice.synthetic('default'), block, loc$$1); // BUILDER.simpleNamedBlock('default', children, symbols, loc);
|
|
14084
13718
|
|
|
@@ -14089,7 +13723,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14089
13723
|
}, this.base));
|
|
14090
13724
|
};
|
|
14091
13725
|
|
|
14092
|
-
|
|
13726
|
+
_proto36.componentWithNamedBlocks = function componentWithNamedBlocks(callee, blocks, loc$$1) {
|
|
14093
13727
|
return new InvokeComponent((0, _util.assign)({
|
|
14094
13728
|
loc: loc$$1,
|
|
14095
13729
|
callee: callee,
|
|
@@ -14272,13 +13906,13 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14272
13906
|
this.builder = new Builder();
|
|
14273
13907
|
}
|
|
14274
13908
|
|
|
14275
|
-
var
|
|
13909
|
+
var _proto37 = BlockContext.prototype;
|
|
14276
13910
|
|
|
14277
|
-
|
|
13911
|
+
_proto37.loc = function loc(loc$$1) {
|
|
14278
13912
|
return this.source.spanFor(loc$$1);
|
|
14279
13913
|
};
|
|
14280
13914
|
|
|
14281
|
-
|
|
13915
|
+
_proto37.resolutionFor = function resolutionFor(node$$1, resolution) {
|
|
14282
13916
|
if (this.strict) {
|
|
14283
13917
|
return {
|
|
14284
13918
|
resolution: STRICT_RESOLUTION
|
|
@@ -14306,7 +13940,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14306
13940
|
}
|
|
14307
13941
|
};
|
|
14308
13942
|
|
|
14309
|
-
|
|
13943
|
+
_proto37.isFreeVar = function isFreeVar(callee) {
|
|
14310
13944
|
if (callee.type === 'PathExpression') {
|
|
14311
13945
|
if (callee.head.type !== 'VarHead') {
|
|
14312
13946
|
return false;
|
|
@@ -14320,15 +13954,15 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14320
13954
|
}
|
|
14321
13955
|
};
|
|
14322
13956
|
|
|
14323
|
-
|
|
13957
|
+
_proto37.hasBinding = function hasBinding(name) {
|
|
14324
13958
|
return this.table.has(name);
|
|
14325
13959
|
};
|
|
14326
13960
|
|
|
14327
|
-
|
|
13961
|
+
_proto37.child = function child(blockParams) {
|
|
14328
13962
|
return new BlockContext(this.source, this.options, this.table.child(blockParams));
|
|
14329
13963
|
};
|
|
14330
13964
|
|
|
14331
|
-
|
|
13965
|
+
_proto37.customizeComponentName = function customizeComponentName(input) {
|
|
14332
13966
|
if (this.options.customizeComponentName) {
|
|
14333
13967
|
return this.options.customizeComponentName(input);
|
|
14334
13968
|
} else {
|
|
@@ -14356,9 +13990,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14356
13990
|
this.block = block;
|
|
14357
13991
|
}
|
|
14358
13992
|
|
|
14359
|
-
var
|
|
13993
|
+
var _proto38 = ExpressionNormalizer.prototype;
|
|
14360
13994
|
|
|
14361
|
-
|
|
13995
|
+
_proto38.normalize = function normalize(expr, resolution) {
|
|
14362
13996
|
switch (expr.type) {
|
|
14363
13997
|
case 'NullLiteral':
|
|
14364
13998
|
case 'BooleanLiteral':
|
|
@@ -14383,14 +14017,14 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14383
14017
|
}
|
|
14384
14018
|
};
|
|
14385
14019
|
|
|
14386
|
-
|
|
14020
|
+
_proto38.path = function path(expr, resolution) {
|
|
14387
14021
|
var headOffsets = this.block.loc(expr.head.loc);
|
|
14388
14022
|
var tail = []; // start with the head
|
|
14389
14023
|
|
|
14390
14024
|
var offset = headOffsets;
|
|
14391
14025
|
|
|
14392
|
-
for (var
|
|
14393
|
-
var _part2 =
|
|
14026
|
+
for (var _iterator3 = (0, _emberBabel.createForOfIteratorHelperLoose)(expr.tail), _step3; !(_step3 = _iterator3()).done;) {
|
|
14027
|
+
var _part2 = _step3.value;
|
|
14394
14028
|
offset = offset.sliceStartChars({
|
|
14395
14029
|
chars: _part2.length,
|
|
14396
14030
|
skipStart: 1
|
|
@@ -14409,24 +14043,24 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14409
14043
|
*/
|
|
14410
14044
|
;
|
|
14411
14045
|
|
|
14412
|
-
|
|
14413
|
-
var
|
|
14046
|
+
_proto38.callParts = function callParts(parts, context) {
|
|
14047
|
+
var _this12 = this;
|
|
14414
14048
|
|
|
14415
14049
|
var path = parts.path,
|
|
14416
14050
|
params = parts.params,
|
|
14417
14051
|
hash = parts.hash;
|
|
14418
14052
|
var callee = this.normalize(path, context);
|
|
14419
14053
|
var paramList = params.map(function (p) {
|
|
14420
|
-
return
|
|
14054
|
+
return _this12.normalize(p, ARGUMENT_RESOLUTION);
|
|
14421
14055
|
});
|
|
14422
14056
|
var paramLoc = SpanList.range(paramList, callee.loc.collapse('end'));
|
|
14423
14057
|
var namedLoc = this.block.loc(hash.loc);
|
|
14424
14058
|
var argsLoc = SpanList.range([paramLoc, namedLoc]);
|
|
14425
14059
|
var positional = this.block.builder.positional(params.map(function (p) {
|
|
14426
|
-
return
|
|
14060
|
+
return _this12.normalize(p, ARGUMENT_RESOLUTION);
|
|
14427
14061
|
}), paramLoc);
|
|
14428
14062
|
var named = this.block.builder.named(hash.pairs.map(function (p) {
|
|
14429
|
-
return
|
|
14063
|
+
return _this12.namedArgument(p);
|
|
14430
14064
|
}), this.block.loc(hash.loc));
|
|
14431
14065
|
return {
|
|
14432
14066
|
callee: callee,
|
|
@@ -14434,7 +14068,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14434
14068
|
};
|
|
14435
14069
|
};
|
|
14436
14070
|
|
|
14437
|
-
|
|
14071
|
+
_proto38.namedArgument = function namedArgument(pair) {
|
|
14438
14072
|
var offsets = this.block.loc(pair.loc);
|
|
14439
14073
|
var keyOffsets = offsets.sliceStartChars({
|
|
14440
14074
|
chars: pair.key.length
|
|
@@ -14456,7 +14090,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14456
14090
|
*/
|
|
14457
14091
|
;
|
|
14458
14092
|
|
|
14459
|
-
|
|
14093
|
+
_proto38.ref = function ref(head, resolution) {
|
|
14460
14094
|
var block = this.block;
|
|
14461
14095
|
var builder = block.builder,
|
|
14462
14096
|
table = block.table;
|
|
@@ -14508,9 +14142,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14508
14142
|
this.block = block;
|
|
14509
14143
|
}
|
|
14510
14144
|
|
|
14511
|
-
var
|
|
14145
|
+
var _proto39 = StatementNormalizer.prototype;
|
|
14512
14146
|
|
|
14513
|
-
|
|
14147
|
+
_proto39.normalize = function normalize(node$$1) {
|
|
14514
14148
|
switch (node$$1.type) {
|
|
14515
14149
|
case 'PartialStatement':
|
|
14516
14150
|
throw new Error("Handlebars partial syntax ({{> ...}}) is not allowed in Glimmer");
|
|
@@ -14548,7 +14182,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14548
14182
|
}
|
|
14549
14183
|
};
|
|
14550
14184
|
|
|
14551
|
-
|
|
14185
|
+
_proto39.MustacheCommentStatement = function MustacheCommentStatement(node$$1) {
|
|
14552
14186
|
var loc$$1 = this.block.loc(node$$1.loc);
|
|
14553
14187
|
var textLoc;
|
|
14554
14188
|
|
|
@@ -14574,7 +14208,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14574
14208
|
*/
|
|
14575
14209
|
;
|
|
14576
14210
|
|
|
14577
|
-
|
|
14211
|
+
_proto39.MustacheStatement = function MustacheStatement(mustache) {
|
|
14578
14212
|
var escaped = mustache.escaped;
|
|
14579
14213
|
var loc$$1 = this.block.loc(mustache.loc); // Normalize the call parts in AppendSyntaxContext
|
|
14580
14214
|
|
|
@@ -14595,7 +14229,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14595
14229
|
*/
|
|
14596
14230
|
;
|
|
14597
14231
|
|
|
14598
|
-
|
|
14232
|
+
_proto39.BlockStatement = function BlockStatement(block) {
|
|
14599
14233
|
var program = block.program,
|
|
14600
14234
|
inverse = block.inverse;
|
|
14601
14235
|
var loc$$1 = this.block.loc(block.loc);
|
|
@@ -14613,7 +14247,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14613
14247
|
}, callParts), loc$$1);
|
|
14614
14248
|
};
|
|
14615
14249
|
|
|
14616
|
-
|
|
14250
|
+
_proto39.Block = function Block(_ref34) {
|
|
14617
14251
|
var body = _ref34.body,
|
|
14618
14252
|
loc$$1 = _ref34.loc,
|
|
14619
14253
|
blockParams = _ref34.blockParams;
|
|
@@ -14653,10 +14287,10 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14653
14287
|
*/
|
|
14654
14288
|
|
|
14655
14289
|
|
|
14656
|
-
var
|
|
14290
|
+
var _proto40 = ElementNormalizer.prototype;
|
|
14657
14291
|
|
|
14658
|
-
|
|
14659
|
-
var
|
|
14292
|
+
_proto40.ElementNode = function ElementNode(element) {
|
|
14293
|
+
var _this13 = this;
|
|
14660
14294
|
|
|
14661
14295
|
var tag = element.tag,
|
|
14662
14296
|
selfClosing = element.selfClosing,
|
|
@@ -14672,15 +14306,15 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14672
14306
|
var attrs = element.attributes.filter(function (a) {
|
|
14673
14307
|
return a.name[0] !== '@';
|
|
14674
14308
|
}).map(function (a) {
|
|
14675
|
-
return
|
|
14309
|
+
return _this13.attr(a);
|
|
14676
14310
|
});
|
|
14677
14311
|
var args = element.attributes.filter(function (a) {
|
|
14678
14312
|
return a.name[0] === '@';
|
|
14679
14313
|
}).map(function (a) {
|
|
14680
|
-
return
|
|
14314
|
+
return _this13.arg(a);
|
|
14681
14315
|
});
|
|
14682
14316
|
var modifiers = element.modifiers.map(function (m) {
|
|
14683
|
-
return
|
|
14317
|
+
return _this13.modifier(m);
|
|
14684
14318
|
}); // the element's block params are in scope for the children
|
|
14685
14319
|
|
|
14686
14320
|
var child = this.ctx.child(element.blockParams);
|
|
@@ -14694,7 +14328,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14694
14328
|
componentArgs: args,
|
|
14695
14329
|
modifiers: modifiers,
|
|
14696
14330
|
comments: comments.map(function (c) {
|
|
14697
|
-
return new StatementNormalizer(
|
|
14331
|
+
return new StatementNormalizer(_this13.ctx).MustacheCommentStatement(c);
|
|
14698
14332
|
})
|
|
14699
14333
|
});
|
|
14700
14334
|
var children = new ElementChildren(el, loc$$1, childNodes, this.ctx);
|
|
@@ -14722,7 +14356,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14722
14356
|
}
|
|
14723
14357
|
};
|
|
14724
14358
|
|
|
14725
|
-
|
|
14359
|
+
_proto40.modifier = function modifier(m) {
|
|
14726
14360
|
var resolution = this.ctx.resolutionFor(m, ModifierSyntaxContext);
|
|
14727
14361
|
|
|
14728
14362
|
if (resolution.resolution === 'error') {
|
|
@@ -14743,7 +14377,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14743
14377
|
*/
|
|
14744
14378
|
;
|
|
14745
14379
|
|
|
14746
|
-
|
|
14380
|
+
_proto40.mustacheAttr = function mustacheAttr(mustache) {
|
|
14747
14381
|
// Normalize the call parts in AttrValueSyntaxContext
|
|
14748
14382
|
var sexp = this.ctx.builder.sexp(this.expr.callParts(mustache, AttrValueSyntaxContext(mustache)), this.ctx.loc(mustache.loc)); // If there are no params or hash, just return the function part as its own expression
|
|
14749
14383
|
|
|
@@ -14759,7 +14393,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14759
14393
|
*/
|
|
14760
14394
|
;
|
|
14761
14395
|
|
|
14762
|
-
|
|
14396
|
+
_proto40.attrPart = function attrPart(part) {
|
|
14763
14397
|
switch (part.type) {
|
|
14764
14398
|
case 'MustacheStatement':
|
|
14765
14399
|
return {
|
|
@@ -14775,14 +14409,14 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14775
14409
|
}
|
|
14776
14410
|
};
|
|
14777
14411
|
|
|
14778
|
-
|
|
14779
|
-
var
|
|
14412
|
+
_proto40.attrValue = function attrValue(part) {
|
|
14413
|
+
var _this14 = this;
|
|
14780
14414
|
|
|
14781
14415
|
switch (part.type) {
|
|
14782
14416
|
case 'ConcatStatement':
|
|
14783
14417
|
{
|
|
14784
14418
|
var parts = part.parts.map(function (p) {
|
|
14785
|
-
return
|
|
14419
|
+
return _this14.attrPart(p).expr;
|
|
14786
14420
|
});
|
|
14787
14421
|
return {
|
|
14788
14422
|
expr: this.ctx.builder.interpolate(parts, this.ctx.loc(part.loc)),
|
|
@@ -14795,7 +14429,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14795
14429
|
}
|
|
14796
14430
|
};
|
|
14797
14431
|
|
|
14798
|
-
|
|
14432
|
+
_proto40.attr = function attr(m) {
|
|
14799
14433
|
if (m.name === '...attributes') {
|
|
14800
14434
|
return this.ctx.builder.splatAttr(this.ctx.table.allocateBlock('attrs'), this.ctx.loc(m.loc));
|
|
14801
14435
|
}
|
|
@@ -14812,7 +14446,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14812
14446
|
}, offsets);
|
|
14813
14447
|
};
|
|
14814
14448
|
|
|
14815
|
-
|
|
14449
|
+
_proto40.maybeDeprecatedCall = function maybeDeprecatedCall(arg, part) {
|
|
14816
14450
|
if (this.ctx.strict) {
|
|
14817
14451
|
return null;
|
|
14818
14452
|
}
|
|
@@ -14862,7 +14496,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14862
14496
|
};
|
|
14863
14497
|
};
|
|
14864
14498
|
|
|
14865
|
-
|
|
14499
|
+
_proto40.arg = function arg(_arg) {
|
|
14866
14500
|
var offsets = this.ctx.loc(_arg.loc);
|
|
14867
14501
|
var nameSlice = offsets.sliceStartChars({
|
|
14868
14502
|
chars: _arg.name.length
|
|
@@ -14891,7 +14525,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14891
14525
|
*/
|
|
14892
14526
|
;
|
|
14893
14527
|
|
|
14894
|
-
|
|
14528
|
+
_proto40.classifyTag = function classifyTag(variable, tail, loc$$1) {
|
|
14895
14529
|
var uppercase = isUpperCase(variable);
|
|
14896
14530
|
var inScope = variable[0] === '@' || variable === 'this' || this.ctx.hasBinding(variable);
|
|
14897
14531
|
|
|
@@ -14987,9 +14621,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
14987
14621
|
return _Children.apply(this, arguments) || this;
|
|
14988
14622
|
}
|
|
14989
14623
|
|
|
14990
|
-
var
|
|
14624
|
+
var _proto41 = TemplateChildren.prototype;
|
|
14991
14625
|
|
|
14992
|
-
|
|
14626
|
+
_proto41.assertTemplate = function assertTemplate(table) {
|
|
14993
14627
|
if ((0, _util.isPresent)(this.namedBlocks)) {
|
|
14994
14628
|
throw generateSyntaxError("Unexpected named block at the top-level of a template", this.loc);
|
|
14995
14629
|
}
|
|
@@ -15007,9 +14641,9 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
15007
14641
|
return _Children2.apply(this, arguments) || this;
|
|
15008
14642
|
}
|
|
15009
14643
|
|
|
15010
|
-
var
|
|
14644
|
+
var _proto42 = BlockChildren.prototype;
|
|
15011
14645
|
|
|
15012
|
-
|
|
14646
|
+
_proto42.assertBlock = function assertBlock(table) {
|
|
15013
14647
|
if ((0, _util.isPresent)(this.namedBlocks)) {
|
|
15014
14648
|
throw generateSyntaxError("Unexpected named block nested in a normal block", this.loc);
|
|
15015
14649
|
}
|
|
@@ -15024,16 +14658,16 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
15024
14658
|
(0, _emberBabel.inheritsLoose)(ElementChildren, _Children3);
|
|
15025
14659
|
|
|
15026
14660
|
function ElementChildren(el, loc$$1, children, block) {
|
|
15027
|
-
var
|
|
14661
|
+
var _this15;
|
|
15028
14662
|
|
|
15029
|
-
|
|
15030
|
-
|
|
15031
|
-
return
|
|
14663
|
+
_this15 = _Children3.call(this, loc$$1, children, block) || this;
|
|
14664
|
+
_this15.el = el;
|
|
14665
|
+
return _this15;
|
|
15032
14666
|
}
|
|
15033
14667
|
|
|
15034
|
-
var
|
|
14668
|
+
var _proto43 = ElementChildren.prototype;
|
|
15035
14669
|
|
|
15036
|
-
|
|
14670
|
+
_proto43.assertNamedBlock = function assertNamedBlock(name, table) {
|
|
15037
14671
|
if (this.el.base.selfClosing) {
|
|
15038
14672
|
throw generateSyntaxError("<:" + name.chars + "/> is not a valid named block: named blocks cannot be self-closing", this.loc);
|
|
15039
14673
|
}
|
|
@@ -15054,7 +14688,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
15054
14688
|
return this.block.builder.namedBlock(name, this.block.builder.block(table, this.nonBlockChildren, offsets), this.loc);
|
|
15055
14689
|
};
|
|
15056
14690
|
|
|
15057
|
-
|
|
14691
|
+
_proto43.assertElement = function assertElement(name, hasBlockParams) {
|
|
15058
14692
|
if (hasBlockParams) {
|
|
15059
14693
|
throw generateSyntaxError("Unexpected block params in <" + name + ">: simple elements cannot have block params", this.loc);
|
|
15060
14694
|
}
|
|
@@ -15077,7 +14711,7 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
15077
14711
|
return this.el.simple(name, this.nonBlockChildren, this.loc);
|
|
15078
14712
|
};
|
|
15079
14713
|
|
|
15080
|
-
|
|
14714
|
+
_proto43.assertComponent = function assertComponent(name, table, hasBlockParams) {
|
|
15081
14715
|
if ((0, _util.isPresent)(this.namedBlocks) && this.hasSemanticContent) {
|
|
15082
14716
|
throw generateSyntaxError("Unexpected content inside <" + name + "> component invocation: when using named blocks, the tag cannot contain other content", this.loc);
|
|
15083
14717
|
}
|
|
@@ -15089,8 +14723,8 @@ define("@glimmer/syntax", ["exports", "ember-babel", "@glimmer/util", "simple-ht
|
|
|
15089
14723
|
|
|
15090
14724
|
var seenNames = new Set();
|
|
15091
14725
|
|
|
15092
|
-
for (var
|
|
15093
|
-
var _block =
|
|
14726
|
+
for (var _iterator4 = (0, _emberBabel.createForOfIteratorHelperLoose)(this.namedBlocks), _step4; !(_step4 = _iterator4()).done;) {
|
|
14727
|
+
var _block = _step4.value;
|
|
15094
14728
|
var _name2 = _block.name.chars;
|
|
15095
14729
|
|
|
15096
14730
|
if (seenNames.has(_name2)) {
|
|
@@ -20801,7 +20435,16 @@ define("ember-template-compiler/lib/system/compile-options", ["exports", "@ember
|
|
|
20801
20435
|
) {
|
|
20802
20436
|
options.strictMode = false;
|
|
20803
20437
|
options.locals = undefined;
|
|
20804
|
-
}
|
|
20438
|
+
}
|
|
20439
|
+
|
|
20440
|
+
if ('locals' in options && !options.locals) {
|
|
20441
|
+
// Glimmer's precompile options declare `locals` like:
|
|
20442
|
+
// locals?: string[]
|
|
20443
|
+
// but many in-use versions of babel-plugin-htmlbars-inline-precompile will
|
|
20444
|
+
// set locals to `null`. This used to work but only because glimmer was
|
|
20445
|
+
// ignoring locals for non-strict templates, and now it supports that case.
|
|
20446
|
+
delete options.locals;
|
|
20447
|
+
} // move `moduleName` into `meta` property
|
|
20805
20448
|
|
|
20806
20449
|
|
|
20807
20450
|
if (options.moduleName) {
|
|
@@ -21070,7 +20713,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
21070
20713
|
value: true
|
|
21071
20714
|
});
|
|
21072
20715
|
_exports.default = void 0;
|
|
21073
|
-
var _default = "3.28.
|
|
20716
|
+
var _default = "3.28.6";
|
|
21074
20717
|
_exports.default = _default;
|
|
21075
20718
|
});
|
|
21076
20719
|
define("simple-html-tokenizer", ["exports"], function (_exports) {
|