@angular/core 15.0.1 → 15.0.3
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/esm2020/src/di/create_injector.mjs +1 -1
- package/esm2020/src/render/api.mjs +1 -3
- package/esm2020/src/render3/assert.mjs +1 -10
- package/esm2020/src/render3/component_ref.mjs +1 -12
- package/esm2020/src/render3/index.mjs +2 -2
- package/esm2020/src/render3/instructions/shared.mjs +95 -169
- package/esm2020/src/render3/interfaces/view.mjs +1 -10
- package/esm2020/src/render3/namespaces.mjs +1 -8
- package/esm2020/src/render3/node_manipulation.mjs +3 -7
- package/esm2020/src/render3/node_selector_matcher.mjs +1 -4
- package/esm2020/src/render3/query.mjs +1 -6
- package/esm2020/src/render3/state.mjs +1 -4
- package/esm2020/src/render3/util/discovery_utils.mjs +3 -32
- package/esm2020/src/render3/util/view_utils.mjs +1 -15
- package/esm2020/src/util/array_utils.mjs +3 -71
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +270 -1248
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +273 -1251
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +270 -1248
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +273 -1251
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +1 -222
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
- package/esm2020/src/render3/instructions/lview_debug.mjs +0 -684
- package/esm2020/src/util/named_array_type.mjs +0 -40
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.
|
|
2
|
+
* @license Angular v15.0.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { getDebugNode
|
|
7
|
+
import { getDebugNode, RendererFactory2 as RendererFactory2$1, InjectionToken as InjectionToken$1, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, resolveForwardRef as resolveForwardRef$1, ɵNG_COMP_DEF, ɵRender3NgModuleRef, ApplicationInitStatus, LOCALE_ID as LOCALE_ID$1, ɵDEFAULT_LOCALE_ID, ɵsetLocaleId, ɵRender3ComponentFactory, ɵcompileComponent, ɵNG_DIR_DEF, ɵcompileDirective, ɵNG_PIPE_DEF, ɵcompilePipe, ɵNG_MOD_DEF, ɵtransitiveScopesFor, ɵpatchComponentDefWithScope, ɵNG_INJ_DEF, ɵcompileNgModuleDefs, NgZone, Compiler, COMPILER_OPTIONS, ɵNgModuleFactory, ɵisEnvironmentProviders, ModuleWithComponentFactories, ɵconvertToBitFlags, Injector as Injector$1, InjectFlags as InjectFlags$1, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵsetUnknownElementStrictMode as ɵsetUnknownElementStrictMode$1, ɵsetUnknownPropertyStrictMode as ɵsetUnknownPropertyStrictMode$1, ɵgetUnknownElementStrictMode as ɵgetUnknownElementStrictMode$1, ɵgetUnknownPropertyStrictMode as ɵgetUnknownPropertyStrictMode$1, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
|
|
8
8
|
import { ResourceLoader } from '@angular/compiler';
|
|
9
9
|
import { Subject, Subscription } from 'rxjs';
|
|
10
10
|
|
|
@@ -85,7 +85,7 @@ class ComponentFixture {
|
|
|
85
85
|
this._onErrorSubscription = null;
|
|
86
86
|
this.changeDetectorRef = componentRef.changeDetectorRef;
|
|
87
87
|
this.elementRef = componentRef.location;
|
|
88
|
-
this.debugElement = getDebugNode
|
|
88
|
+
this.debugElement = getDebugNode(this.elementRef.nativeElement);
|
|
89
89
|
this.componentInstance = componentRef.instance;
|
|
90
90
|
this.nativeElement = this.elementRef.nativeElement;
|
|
91
91
|
this.componentRef = componentRef;
|
|
@@ -1094,17 +1094,6 @@ function assertOneOf(value, ...validValues) {
|
|
|
1094
1094
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1095
1095
|
* found in the LICENSE file at https://angular.io/license
|
|
1096
1096
|
*/
|
|
1097
|
-
/**
|
|
1098
|
-
* Equivalent to ES6 spread, add each item to an array.
|
|
1099
|
-
*
|
|
1100
|
-
* @param items The items to add
|
|
1101
|
-
* @param arr The array to which you want to add the items
|
|
1102
|
-
*/
|
|
1103
|
-
function addAllToArray(items, arr) {
|
|
1104
|
-
for (let i = 0; i < items.length; i++) {
|
|
1105
|
-
arr.push(items[i]);
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1108
1097
|
/**
|
|
1109
1098
|
* Determines if the contents of two arrays is identical
|
|
1110
1099
|
*
|
|
@@ -1132,25 +1121,8 @@ function arrayEquals(a, b, identityAccessor) {
|
|
|
1132
1121
|
/**
|
|
1133
1122
|
* Flattens an array.
|
|
1134
1123
|
*/
|
|
1135
|
-
function flatten$1(list
|
|
1136
|
-
|
|
1137
|
-
dst = list;
|
|
1138
|
-
for (let i = 0; i < list.length; i++) {
|
|
1139
|
-
let item = list[i];
|
|
1140
|
-
if (Array.isArray(item)) {
|
|
1141
|
-
// we need to inline it.
|
|
1142
|
-
if (dst === list) {
|
|
1143
|
-
// Our assumption that the list was already flat was wrong and
|
|
1144
|
-
// we need to clone flat since we need to write to it.
|
|
1145
|
-
dst = list.slice(0, i);
|
|
1146
|
-
}
|
|
1147
|
-
flatten$1(item, dst);
|
|
1148
|
-
}
|
|
1149
|
-
else if (dst !== list) {
|
|
1150
|
-
dst.push(item);
|
|
1151
|
-
}
|
|
1152
|
-
}
|
|
1153
|
-
return dst;
|
|
1124
|
+
function flatten$1(list) {
|
|
1125
|
+
return list.flat(Number.POSITIVE_INFINITY);
|
|
1154
1126
|
}
|
|
1155
1127
|
function deepForEach(input, fn) {
|
|
1156
1128
|
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
|
|
@@ -1260,46 +1232,6 @@ function arrayInsert2(array, index, value1, value2) {
|
|
|
1260
1232
|
array[index + 1] = value2;
|
|
1261
1233
|
}
|
|
1262
1234
|
}
|
|
1263
|
-
/**
|
|
1264
|
-
* Insert a `value` into an `array` so that the array remains sorted.
|
|
1265
|
-
*
|
|
1266
|
-
* NOTE:
|
|
1267
|
-
* - Duplicates are not allowed, and are ignored.
|
|
1268
|
-
* - This uses binary search algorithm for fast inserts.
|
|
1269
|
-
*
|
|
1270
|
-
* @param array A sorted array to insert into.
|
|
1271
|
-
* @param value The value to insert.
|
|
1272
|
-
* @returns index of the inserted value.
|
|
1273
|
-
*/
|
|
1274
|
-
function arrayInsertSorted(array, value) {
|
|
1275
|
-
let index = arrayIndexOfSorted(array, value);
|
|
1276
|
-
if (index < 0) {
|
|
1277
|
-
// if we did not find it insert it.
|
|
1278
|
-
index = ~index;
|
|
1279
|
-
arrayInsert(array, index, value);
|
|
1280
|
-
}
|
|
1281
|
-
return index;
|
|
1282
|
-
}
|
|
1283
|
-
/**
|
|
1284
|
-
* Remove `value` from a sorted `array`.
|
|
1285
|
-
*
|
|
1286
|
-
* NOTE:
|
|
1287
|
-
* - This uses binary search algorithm for fast removals.
|
|
1288
|
-
*
|
|
1289
|
-
* @param array A sorted array to remove from.
|
|
1290
|
-
* @param value The value to remove.
|
|
1291
|
-
* @returns index of the removed value.
|
|
1292
|
-
* - positive index if value found and removed.
|
|
1293
|
-
* - negative index if value not found. (`~index` to get the value where it should have been
|
|
1294
|
-
* inserted)
|
|
1295
|
-
*/
|
|
1296
|
-
function arrayRemoveSorted(array, value) {
|
|
1297
|
-
const index = arrayIndexOfSorted(array, value);
|
|
1298
|
-
if (index >= 0) {
|
|
1299
|
-
arraySplice(array, index, 1);
|
|
1300
|
-
}
|
|
1301
|
-
return index;
|
|
1302
|
-
}
|
|
1303
1235
|
/**
|
|
1304
1236
|
* Get an index of an `value` in a sorted `array`.
|
|
1305
1237
|
*
|
|
@@ -2855,18 +2787,9 @@ const EMBEDDED_VIEW_INJECTOR = 21;
|
|
|
2855
2787
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
2856
2788
|
*/
|
|
2857
2789
|
const HEADER_OFFSET = 22;
|
|
2858
|
-
/**
|
|
2859
|
-
* Converts `TViewType` into human readable text.
|
|
2860
|
-
* Make sure this matches with `TViewType`
|
|
2861
|
-
*/
|
|
2862
|
-
const TViewTypeAsString = [
|
|
2863
|
-
'Root',
|
|
2864
|
-
'Component',
|
|
2865
|
-
'Embedded', // 2
|
|
2866
|
-
];
|
|
2867
2790
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2868
2791
|
// failure based on types.
|
|
2869
|
-
const unusedValueExportToPlacateAjd$
|
|
2792
|
+
const unusedValueExportToPlacateAjd$4 = 1;
|
|
2870
2793
|
|
|
2871
2794
|
/**
|
|
2872
2795
|
* @license
|
|
@@ -2911,7 +2834,7 @@ const MOVED_VIEWS = 9;
|
|
|
2911
2834
|
const CONTAINER_HEADER_OFFSET = 10;
|
|
2912
2835
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2913
2836
|
// failure based on types.
|
|
2914
|
-
const unusedValueExportToPlacateAjd$
|
|
2837
|
+
const unusedValueExportToPlacateAjd$3 = 1;
|
|
2915
2838
|
|
|
2916
2839
|
/**
|
|
2917
2840
|
* @license
|
|
@@ -2996,11 +2919,6 @@ function assertHasParent(tNode) {
|
|
|
2996
2919
|
assertDefined(tNode, 'currentTNode should exist!');
|
|
2997
2920
|
assertDefined(tNode.parent, 'currentTNode should have a parent');
|
|
2998
2921
|
}
|
|
2999
|
-
function assertDataNext(lView, index, arr) {
|
|
3000
|
-
if (arr == null)
|
|
3001
|
-
arr = lView;
|
|
3002
|
-
assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);
|
|
3003
|
-
}
|
|
3004
2922
|
function assertLContainer(value) {
|
|
3005
2923
|
assertDefined(value, 'LContainer must be defined');
|
|
3006
2924
|
assertEqual(isLContainer(value), true, 'Expecting LContainer');
|
|
@@ -3031,10 +2949,6 @@ function assertIndexInDeclRange(lView, index) {
|
|
|
3031
2949
|
const tView = lView[1];
|
|
3032
2950
|
assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
|
|
3033
2951
|
}
|
|
3034
|
-
function assertIndexInVarsRange(lView, index) {
|
|
3035
|
-
const tView = lView[1];
|
|
3036
|
-
assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);
|
|
3037
|
-
}
|
|
3038
2952
|
function assertIndexInExpandoRange(lView, index) {
|
|
3039
2953
|
const tView = lView[1];
|
|
3040
2954
|
assertBetween(tView.expandoStartIndex, lView.length, index);
|
|
@@ -3253,14 +3167,7 @@ const profiler = function (event, instance, hookOrListener) {
|
|
|
3253
3167
|
* found in the LICENSE file at https://angular.io/license
|
|
3254
3168
|
*/
|
|
3255
3169
|
const SVG_NAMESPACE = 'svg';
|
|
3256
|
-
const SVG_NAMESPACE_URI = 'http://www.w3.org/2000/svg';
|
|
3257
3170
|
const MATH_ML_NAMESPACE = 'math';
|
|
3258
|
-
const MATH_ML_NAMESPACE_URI = 'http://www.w3.org/1998/MathML/';
|
|
3259
|
-
function getNamespaceUri(namespace) {
|
|
3260
|
-
const name = namespace.toLowerCase();
|
|
3261
|
-
return name === SVG_NAMESPACE ? SVG_NAMESPACE_URI :
|
|
3262
|
-
(name === MATH_ML_NAMESPACE ? MATH_ML_NAMESPACE_URI : null);
|
|
3263
|
-
}
|
|
3264
3171
|
|
|
3265
3172
|
/**
|
|
3266
3173
|
* @license
|
|
@@ -3309,20 +3216,6 @@ function unwrapLView(value) {
|
|
|
3309
3216
|
}
|
|
3310
3217
|
return null;
|
|
3311
3218
|
}
|
|
3312
|
-
/**
|
|
3313
|
-
* Returns `LContainer` or `null` if not found.
|
|
3314
|
-
* @param value wrapped value of `RNode`, `LView`, `LContainer`
|
|
3315
|
-
*/
|
|
3316
|
-
function unwrapLContainer(value) {
|
|
3317
|
-
while (Array.isArray(value)) {
|
|
3318
|
-
// This check is same as `isLContainer()` but we don't call at as we don't want to call
|
|
3319
|
-
// `Array.isArray()` twice and give JITer more work for inlining.
|
|
3320
|
-
if (value[TYPE] === true)
|
|
3321
|
-
return value;
|
|
3322
|
-
value = value[HOST];
|
|
3323
|
-
}
|
|
3324
|
-
return null;
|
|
3325
|
-
}
|
|
3326
3219
|
/**
|
|
3327
3220
|
* Retrieves an element value from the provided `viewData`, by unwrapping
|
|
3328
3221
|
* from any containers, component views, or style contexts.
|
|
@@ -3582,9 +3475,6 @@ function isCurrentTNodeParent() {
|
|
|
3582
3475
|
function setCurrentTNodeAsNotParent() {
|
|
3583
3476
|
instructionState.lFrame.isParent = false;
|
|
3584
3477
|
}
|
|
3585
|
-
function setCurrentTNodeAsParent() {
|
|
3586
|
-
instructionState.lFrame.isParent = true;
|
|
3587
|
-
}
|
|
3588
3478
|
function getContextLView() {
|
|
3589
3479
|
const contextLView = instructionState.lFrame.contextLView;
|
|
3590
3480
|
ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
|
|
@@ -4307,7 +4197,7 @@ function isFactory(obj) {
|
|
|
4307
4197
|
}
|
|
4308
4198
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
4309
4199
|
// failure based on types.
|
|
4310
|
-
const unusedValueExportToPlacateAjd$
|
|
4200
|
+
const unusedValueExportToPlacateAjd$2 = 1;
|
|
4311
4201
|
|
|
4312
4202
|
/**
|
|
4313
4203
|
* Converts `TNodeType` into human readable text.
|
|
@@ -4326,7 +4216,7 @@ function toTNodeTypeAsString(tNodeType) {
|
|
|
4326
4216
|
}
|
|
4327
4217
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
4328
4218
|
// failure based on types.
|
|
4329
|
-
const unusedValueExportToPlacateAjd$
|
|
4219
|
+
const unusedValueExportToPlacateAjd$1 = 1;
|
|
4330
4220
|
/**
|
|
4331
4221
|
* Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.
|
|
4332
4222
|
*
|
|
@@ -6366,28 +6256,6 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
6366
6256
|
}
|
|
6367
6257
|
}
|
|
6368
6258
|
|
|
6369
|
-
/**
|
|
6370
|
-
* @license
|
|
6371
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6372
|
-
*
|
|
6373
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6374
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6375
|
-
*/
|
|
6376
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6377
|
-
// failure based on types.
|
|
6378
|
-
const unusedValueExportToPlacateAjd$4 = 1;
|
|
6379
|
-
|
|
6380
|
-
/**
|
|
6381
|
-
* @license
|
|
6382
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6383
|
-
*
|
|
6384
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6385
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6386
|
-
*/
|
|
6387
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6388
|
-
// failure based on types.
|
|
6389
|
-
const unusedValueExportToPlacateAjd$3 = 1;
|
|
6390
|
-
|
|
6391
6259
|
/**
|
|
6392
6260
|
* @license
|
|
6393
6261
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6459,7 +6327,6 @@ function getNearestLContainer(viewOrContainer) {
|
|
|
6459
6327
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6460
6328
|
* found in the LICENSE file at https://angular.io/license
|
|
6461
6329
|
*/
|
|
6462
|
-
const unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$8;
|
|
6463
6330
|
/**
|
|
6464
6331
|
* NOTE: for performance reasons, the possible actions are inlined within the function instead of
|
|
6465
6332
|
* being passed as an argument.
|
|
@@ -9441,7 +9308,6 @@ function unwrapElementRef(value) {
|
|
|
9441
9308
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9442
9309
|
* found in the LICENSE file at https://angular.io/license
|
|
9443
9310
|
*/
|
|
9444
|
-
const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
|
|
9445
9311
|
/**
|
|
9446
9312
|
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
|
9447
9313
|
*
|
|
@@ -9525,7 +9391,7 @@ class Version {
|
|
|
9525
9391
|
/**
|
|
9526
9392
|
* @publicApi
|
|
9527
9393
|
*/
|
|
9528
|
-
const VERSION = new Version('15.0.
|
|
9394
|
+
const VERSION = new Version('15.0.3');
|
|
9529
9395
|
|
|
9530
9396
|
/**
|
|
9531
9397
|
* @license
|
|
@@ -9791,7 +9657,6 @@ function classIndexOf(className, classToSearch, startingIndex) {
|
|
|
9791
9657
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9792
9658
|
* found in the LICENSE file at https://angular.io/license
|
|
9793
9659
|
*/
|
|
9794
|
-
const unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4;
|
|
9795
9660
|
const NG_TEMPLATE_SELECTOR = 'ng-template';
|
|
9796
9661
|
/**
|
|
9797
9662
|
* Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)
|
|
@@ -11226,902 +11091,96 @@ class ReflectiveInjector_ {
|
|
|
11226
11091
|
return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);
|
|
11227
11092
|
}
|
|
11228
11093
|
/** @internal */
|
|
11229
|
-
_getByKeyDefault(key, notFoundValue, visibility) {
|
|
11230
|
-
let inj;
|
|
11231
|
-
if (visibility instanceof SkipSelf) {
|
|
11232
|
-
inj = this.parent;
|
|
11233
|
-
}
|
|
11234
|
-
else {
|
|
11235
|
-
inj = this;
|
|
11236
|
-
}
|
|
11237
|
-
while (inj instanceof ReflectiveInjector_) {
|
|
11238
|
-
const inj_ = inj;
|
|
11239
|
-
const obj = inj_._getObjByKeyId(key.id);
|
|
11240
|
-
if (obj !== UNDEFINED)
|
|
11241
|
-
return obj;
|
|
11242
|
-
inj = inj_.parent;
|
|
11243
|
-
}
|
|
11244
|
-
if (inj !== null) {
|
|
11245
|
-
return inj.get(key.token, notFoundValue);
|
|
11246
|
-
}
|
|
11247
|
-
else {
|
|
11248
|
-
return this._throwOrNull(key, notFoundValue);
|
|
11249
|
-
}
|
|
11250
|
-
}
|
|
11251
|
-
get displayName() {
|
|
11252
|
-
const providers = _mapProviders(this, (b) => ' "' + b.key.displayName + '" ')
|
|
11253
|
-
.join(', ');
|
|
11254
|
-
return `ReflectiveInjector(providers: [${providers}])`;
|
|
11255
|
-
}
|
|
11256
|
-
toString() {
|
|
11257
|
-
return this.displayName;
|
|
11258
|
-
}
|
|
11259
|
-
}
|
|
11260
|
-
ReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));
|
|
11261
|
-
function _mapProviders(injector, fn) {
|
|
11262
|
-
const res = [];
|
|
11263
|
-
for (let i = 0; i < injector._providers.length; ++i) {
|
|
11264
|
-
res[i] = fn(injector.getProviderAtIndex(i));
|
|
11265
|
-
}
|
|
11266
|
-
return res;
|
|
11267
|
-
}
|
|
11268
|
-
|
|
11269
|
-
/**
|
|
11270
|
-
* @license
|
|
11271
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11272
|
-
*
|
|
11273
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11274
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11275
|
-
*/
|
|
11276
|
-
|
|
11277
|
-
/**
|
|
11278
|
-
* @license
|
|
11279
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11280
|
-
*
|
|
11281
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11282
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11283
|
-
*/
|
|
11284
|
-
|
|
11285
|
-
/**
|
|
11286
|
-
* @license
|
|
11287
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11288
|
-
*
|
|
11289
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11290
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11291
|
-
*/
|
|
11292
|
-
function ɵɵdirectiveInject(token, flags = InjectFlags.Default) {
|
|
11293
|
-
const lView = getLView();
|
|
11294
|
-
// Fall back to inject() if view hasn't been created. This situation can happen in tests
|
|
11295
|
-
// if inject utilities are used before bootstrapping.
|
|
11296
|
-
if (lView === null) {
|
|
11297
|
-
// Verify that we will not get into infinite loop.
|
|
11298
|
-
ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
|
|
11299
|
-
return ɵɵinject(token, flags);
|
|
11300
|
-
}
|
|
11301
|
-
const tNode = getCurrentTNode();
|
|
11302
|
-
return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
|
|
11303
|
-
}
|
|
11304
|
-
/**
|
|
11305
|
-
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
11306
|
-
* particular class.
|
|
11307
|
-
*
|
|
11308
|
-
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
11309
|
-
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
11310
|
-
*
|
|
11311
|
-
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
11312
|
-
* and thus in the stack trace.
|
|
11313
|
-
*
|
|
11314
|
-
* @codeGenApi
|
|
11315
|
-
*/
|
|
11316
|
-
function ɵɵinvalidFactory() {
|
|
11317
|
-
const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';
|
|
11318
|
-
throw new Error(msg);
|
|
11319
|
-
}
|
|
11320
|
-
|
|
11321
|
-
/**
|
|
11322
|
-
* @license
|
|
11323
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11324
|
-
*
|
|
11325
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11326
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11327
|
-
*/
|
|
11328
|
-
/**
|
|
11329
|
-
* THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
|
|
11330
|
-
*/
|
|
11331
|
-
/**
|
|
11332
|
-
* Creates an `Array` construction with a given name. This is useful when
|
|
11333
|
-
* looking for memory consumption to see what time of array it is.
|
|
11334
|
-
*
|
|
11335
|
-
*
|
|
11336
|
-
* @param name Name to give to the constructor
|
|
11337
|
-
* @returns A subclass of `Array` if possible. This can only be done in
|
|
11338
|
-
* environments which support `class` construct.
|
|
11339
|
-
*/
|
|
11340
|
-
function createNamedArrayType(name) {
|
|
11341
|
-
// This should never be called in prod mode, so let's verify that is the case.
|
|
11342
|
-
if (ngDevMode) {
|
|
11343
|
-
try {
|
|
11344
|
-
// If this function were compromised the following could lead to arbitrary
|
|
11345
|
-
// script execution. We bless it with Trusted Types anyway since this
|
|
11346
|
-
// function is stripped out of production binaries.
|
|
11347
|
-
return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
|
|
11348
|
-
}
|
|
11349
|
-
catch (e) {
|
|
11350
|
-
// If it does not work just give up and fall back to regular Array.
|
|
11351
|
-
return Array;
|
|
11352
|
-
}
|
|
11353
|
-
}
|
|
11354
|
-
else {
|
|
11355
|
-
throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
|
|
11356
|
-
}
|
|
11357
|
-
}
|
|
11358
|
-
|
|
11359
|
-
/**
|
|
11360
|
-
* @license
|
|
11361
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11362
|
-
*
|
|
11363
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11364
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11365
|
-
*/
|
|
11366
|
-
function toTStylingRange(prev, next) {
|
|
11367
|
-
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11368
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11369
|
-
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11370
|
-
}
|
|
11371
|
-
function getTStylingRangePrev(tStylingRange) {
|
|
11372
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11373
|
-
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
11374
|
-
}
|
|
11375
|
-
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
11376
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11377
|
-
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
11378
|
-
2 /* StylingRange.PREV_DUPLICATE */;
|
|
11379
|
-
}
|
|
11380
|
-
function setTStylingRangePrev(tStylingRange, previous) {
|
|
11381
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11382
|
-
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11383
|
-
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
11384
|
-
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
11385
|
-
}
|
|
11386
|
-
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
11387
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11388
|
-
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
11389
|
-
}
|
|
11390
|
-
function getTStylingRangeNext(tStylingRange) {
|
|
11391
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11392
|
-
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
11393
|
-
}
|
|
11394
|
-
function setTStylingRangeNext(tStylingRange, next) {
|
|
11395
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11396
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11397
|
-
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
11398
|
-
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11399
|
-
}
|
|
11400
|
-
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
11401
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11402
|
-
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
11403
|
-
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
11404
|
-
}
|
|
11405
|
-
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
11406
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11407
|
-
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
11408
|
-
}
|
|
11409
|
-
function getTStylingRangeTail(tStylingRange) {
|
|
11410
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11411
|
-
const next = getTStylingRangeNext(tStylingRange);
|
|
11412
|
-
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
11413
|
-
}
|
|
11414
|
-
|
|
11415
|
-
/**
|
|
11416
|
-
* @license
|
|
11417
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11418
|
-
*
|
|
11419
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11420
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11421
|
-
*/
|
|
11422
|
-
/**
|
|
11423
|
-
* Patch a `debug` property on top of the existing object.
|
|
11424
|
-
*
|
|
11425
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11426
|
-
*
|
|
11427
|
-
* @param obj Object to patch
|
|
11428
|
-
* @param debug Value to patch
|
|
11429
|
-
*/
|
|
11430
|
-
function attachDebugObject(obj, debug) {
|
|
11431
|
-
if (ngDevMode) {
|
|
11432
|
-
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
11433
|
-
}
|
|
11434
|
-
else {
|
|
11435
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11436
|
-
}
|
|
11437
|
-
}
|
|
11438
|
-
/**
|
|
11439
|
-
* Patch a `debug` property getter on top of the existing object.
|
|
11440
|
-
*
|
|
11441
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11442
|
-
*
|
|
11443
|
-
* @param obj Object to patch
|
|
11444
|
-
* @param debugGetter Getter returning a value to patch
|
|
11445
|
-
*/
|
|
11446
|
-
function attachDebugGetter(obj, debugGetter) {
|
|
11447
|
-
if (ngDevMode) {
|
|
11448
|
-
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
11449
|
-
}
|
|
11450
|
-
else {
|
|
11451
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11452
|
-
}
|
|
11453
|
-
}
|
|
11454
|
-
|
|
11455
|
-
/**
|
|
11456
|
-
* @license
|
|
11457
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11458
|
-
*
|
|
11459
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11460
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11461
|
-
*/
|
|
11462
|
-
/*
|
|
11463
|
-
* This file contains conditionally attached classes which provide human readable (debug) level
|
|
11464
|
-
* information for `LView`, `LContainer` and other internal data structures. These data structures
|
|
11465
|
-
* are stored internally as array which makes it very difficult during debugging to reason about the
|
|
11466
|
-
* current state of the system.
|
|
11467
|
-
*
|
|
11468
|
-
* Patching the array with extra property does change the array's hidden class' but it does not
|
|
11469
|
-
* change the cost of access, therefore this patching should not have significant if any impact in
|
|
11470
|
-
* `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)
|
|
11471
|
-
*
|
|
11472
|
-
* So instead of seeing:
|
|
11473
|
-
* ```
|
|
11474
|
-
* Array(30) [Object, 659, null, …]
|
|
11475
|
-
* ```
|
|
11476
|
-
*
|
|
11477
|
-
* You get to see:
|
|
11478
|
-
* ```
|
|
11479
|
-
* LViewDebug {
|
|
11480
|
-
* views: [...],
|
|
11481
|
-
* flags: {attached: true, ...}
|
|
11482
|
-
* nodes: [
|
|
11483
|
-
* {html: '<div id="123">', ..., nodes: [
|
|
11484
|
-
* {html: '<span>', ..., nodes: null}
|
|
11485
|
-
* ]}
|
|
11486
|
-
* ]
|
|
11487
|
-
* }
|
|
11488
|
-
* ```
|
|
11489
|
-
*/
|
|
11490
|
-
let LVIEW_COMPONENT_CACHE;
|
|
11491
|
-
let LVIEW_EMBEDDED_CACHE;
|
|
11492
|
-
let LVIEW_ROOT;
|
|
11493
|
-
let LVIEW_COMPONENT;
|
|
11494
|
-
let LVIEW_EMBEDDED;
|
|
11495
|
-
/**
|
|
11496
|
-
* This function clones a blueprint and creates LView.
|
|
11497
|
-
*
|
|
11498
|
-
* Simple slice will keep the same type, and we need it to be LView
|
|
11499
|
-
*/
|
|
11500
|
-
function cloneToLViewFromTViewBlueprint(tView) {
|
|
11501
|
-
const debugTView = tView;
|
|
11502
|
-
const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
|
|
11503
|
-
return lView.concat(tView.blueprint);
|
|
11504
|
-
}
|
|
11505
|
-
class LRootView extends Array {
|
|
11506
|
-
}
|
|
11507
|
-
class LComponentView extends Array {
|
|
11508
|
-
}
|
|
11509
|
-
class LEmbeddedView extends Array {
|
|
11510
|
-
}
|
|
11511
|
-
function getLViewToClone(type, name) {
|
|
11512
|
-
switch (type) {
|
|
11513
|
-
case 0 /* TViewType.Root */:
|
|
11514
|
-
if (LVIEW_ROOT === undefined)
|
|
11515
|
-
LVIEW_ROOT = new LRootView();
|
|
11516
|
-
return LVIEW_ROOT;
|
|
11517
|
-
case 1 /* TViewType.Component */:
|
|
11518
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11519
|
-
if (LVIEW_COMPONENT === undefined)
|
|
11520
|
-
LVIEW_COMPONENT = new LComponentView();
|
|
11521
|
-
return LVIEW_COMPONENT;
|
|
11522
|
-
}
|
|
11523
|
-
if (LVIEW_COMPONENT_CACHE === undefined)
|
|
11524
|
-
LVIEW_COMPONENT_CACHE = new Map();
|
|
11525
|
-
let componentArray = LVIEW_COMPONENT_CACHE.get(name);
|
|
11526
|
-
if (componentArray === undefined) {
|
|
11527
|
-
componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
|
|
11528
|
-
LVIEW_COMPONENT_CACHE.set(name, componentArray);
|
|
11529
|
-
}
|
|
11530
|
-
return componentArray;
|
|
11531
|
-
case 2 /* TViewType.Embedded */:
|
|
11532
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11533
|
-
if (LVIEW_EMBEDDED === undefined)
|
|
11534
|
-
LVIEW_EMBEDDED = new LEmbeddedView();
|
|
11535
|
-
return LVIEW_EMBEDDED;
|
|
11536
|
-
}
|
|
11537
|
-
if (LVIEW_EMBEDDED_CACHE === undefined)
|
|
11538
|
-
LVIEW_EMBEDDED_CACHE = new Map();
|
|
11539
|
-
let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
|
|
11540
|
-
if (embeddedArray === undefined) {
|
|
11541
|
-
embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
|
|
11542
|
-
LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
|
|
11543
|
-
}
|
|
11544
|
-
return embeddedArray;
|
|
11545
|
-
}
|
|
11546
|
-
}
|
|
11547
|
-
function nameSuffix(text) {
|
|
11548
|
-
if (text == null)
|
|
11549
|
-
return '';
|
|
11550
|
-
const index = text.lastIndexOf('_Template');
|
|
11551
|
-
return '_' + (index === -1 ? text : text.slice(0, index));
|
|
11552
|
-
}
|
|
11553
|
-
/**
|
|
11554
|
-
* This class is a debug version of Object literal so that we can have constructor name show up
|
|
11555
|
-
* in
|
|
11556
|
-
* debug tools in ngDevMode.
|
|
11557
|
-
*/
|
|
11558
|
-
const TViewConstructor = class TView {
|
|
11559
|
-
constructor(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) {
|
|
11560
|
-
this.type = type;
|
|
11561
|
-
this.blueprint = blueprint;
|
|
11562
|
-
this.template = template;
|
|
11563
|
-
this.queries = queries;
|
|
11564
|
-
this.viewQuery = viewQuery;
|
|
11565
|
-
this.declTNode = declTNode;
|
|
11566
|
-
this.data = data;
|
|
11567
|
-
this.bindingStartIndex = bindingStartIndex;
|
|
11568
|
-
this.expandoStartIndex = expandoStartIndex;
|
|
11569
|
-
this.hostBindingOpCodes = hostBindingOpCodes;
|
|
11570
|
-
this.firstCreatePass = firstCreatePass;
|
|
11571
|
-
this.firstUpdatePass = firstUpdatePass;
|
|
11572
|
-
this.staticViewQueries = staticViewQueries;
|
|
11573
|
-
this.staticContentQueries = staticContentQueries;
|
|
11574
|
-
this.preOrderHooks = preOrderHooks;
|
|
11575
|
-
this.preOrderCheckHooks = preOrderCheckHooks;
|
|
11576
|
-
this.contentHooks = contentHooks;
|
|
11577
|
-
this.contentCheckHooks = contentCheckHooks;
|
|
11578
|
-
this.viewHooks = viewHooks;
|
|
11579
|
-
this.viewCheckHooks = viewCheckHooks;
|
|
11580
|
-
this.destroyHooks = destroyHooks;
|
|
11581
|
-
this.cleanup = cleanup;
|
|
11582
|
-
this.contentQueries = contentQueries;
|
|
11583
|
-
this.components = components;
|
|
11584
|
-
this.directiveRegistry = directiveRegistry;
|
|
11585
|
-
this.pipeRegistry = pipeRegistry;
|
|
11586
|
-
this.firstChild = firstChild;
|
|
11587
|
-
this.schemas = schemas;
|
|
11588
|
-
this.consts = consts;
|
|
11589
|
-
this.incompleteFirstPass = incompleteFirstPass;
|
|
11590
|
-
this._decls = _decls;
|
|
11591
|
-
this._vars = _vars;
|
|
11592
|
-
}
|
|
11593
|
-
get template_() {
|
|
11594
|
-
const buf = [];
|
|
11595
|
-
processTNodeChildren(this.firstChild, buf);
|
|
11596
|
-
return buf.join('');
|
|
11597
|
-
}
|
|
11598
|
-
get type_() {
|
|
11599
|
-
return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;
|
|
11600
|
-
}
|
|
11601
|
-
};
|
|
11602
|
-
class TNode {
|
|
11603
|
-
constructor(tView_, //
|
|
11604
|
-
type, //
|
|
11605
|
-
index, //
|
|
11606
|
-
insertBeforeIndex, //
|
|
11607
|
-
injectorIndex, //
|
|
11608
|
-
componentOffset, //
|
|
11609
|
-
directiveStart, //
|
|
11610
|
-
directiveEnd, //
|
|
11611
|
-
directiveStylingLast, //
|
|
11612
|
-
propertyBindings, //
|
|
11613
|
-
flags, //
|
|
11614
|
-
providerIndexes, //
|
|
11615
|
-
value, //
|
|
11616
|
-
attrs, //
|
|
11617
|
-
mergedAttrs, //
|
|
11618
|
-
localNames, //
|
|
11619
|
-
initialInputs, //
|
|
11620
|
-
inputs, //
|
|
11621
|
-
outputs, //
|
|
11622
|
-
tViews, //
|
|
11623
|
-
next, //
|
|
11624
|
-
projectionNext, //
|
|
11625
|
-
child, //
|
|
11626
|
-
parent, //
|
|
11627
|
-
projection, //
|
|
11628
|
-
styles, //
|
|
11629
|
-
stylesWithoutHost, //
|
|
11630
|
-
residualStyles, //
|
|
11631
|
-
classes, //
|
|
11632
|
-
classesWithoutHost, //
|
|
11633
|
-
residualClasses, //
|
|
11634
|
-
classBindings, //
|
|
11635
|
-
styleBindings) {
|
|
11636
|
-
this.tView_ = tView_;
|
|
11637
|
-
this.type = type;
|
|
11638
|
-
this.index = index;
|
|
11639
|
-
this.insertBeforeIndex = insertBeforeIndex;
|
|
11640
|
-
this.injectorIndex = injectorIndex;
|
|
11641
|
-
this.componentOffset = componentOffset;
|
|
11642
|
-
this.directiveStart = directiveStart;
|
|
11643
|
-
this.directiveEnd = directiveEnd;
|
|
11644
|
-
this.directiveStylingLast = directiveStylingLast;
|
|
11645
|
-
this.propertyBindings = propertyBindings;
|
|
11646
|
-
this.flags = flags;
|
|
11647
|
-
this.providerIndexes = providerIndexes;
|
|
11648
|
-
this.value = value;
|
|
11649
|
-
this.attrs = attrs;
|
|
11650
|
-
this.mergedAttrs = mergedAttrs;
|
|
11651
|
-
this.localNames = localNames;
|
|
11652
|
-
this.initialInputs = initialInputs;
|
|
11653
|
-
this.inputs = inputs;
|
|
11654
|
-
this.outputs = outputs;
|
|
11655
|
-
this.tViews = tViews;
|
|
11656
|
-
this.next = next;
|
|
11657
|
-
this.projectionNext = projectionNext;
|
|
11658
|
-
this.child = child;
|
|
11659
|
-
this.parent = parent;
|
|
11660
|
-
this.projection = projection;
|
|
11661
|
-
this.styles = styles;
|
|
11662
|
-
this.stylesWithoutHost = stylesWithoutHost;
|
|
11663
|
-
this.residualStyles = residualStyles;
|
|
11664
|
-
this.classes = classes;
|
|
11665
|
-
this.classesWithoutHost = classesWithoutHost;
|
|
11666
|
-
this.residualClasses = residualClasses;
|
|
11667
|
-
this.classBindings = classBindings;
|
|
11668
|
-
this.styleBindings = styleBindings;
|
|
11669
|
-
}
|
|
11670
|
-
/**
|
|
11671
|
-
* Return a human debug version of the set of `NodeInjector`s which will be consulted when
|
|
11672
|
-
* resolving tokens from this `TNode`.
|
|
11673
|
-
*
|
|
11674
|
-
* When debugging applications, it is often difficult to determine which `NodeInjector`s will be
|
|
11675
|
-
* consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be
|
|
11676
|
-
* consulted in order when resolving a token starting at this `TNode`.
|
|
11677
|
-
*
|
|
11678
|
-
* The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is
|
|
11679
|
-
* difficult to reason about.
|
|
11680
|
-
*
|
|
11681
|
-
* @param lView The `LView` instance for this `TNode`.
|
|
11682
|
-
*/
|
|
11683
|
-
debugNodeInjectorPath(lView) {
|
|
11684
|
-
const path = [];
|
|
11685
|
-
let injectorIndex = getInjectorIndex(this, lView);
|
|
11686
|
-
if (injectorIndex === -1) {
|
|
11687
|
-
// Looks like the current `TNode` does not have `NodeInjector` associated with it => look for
|
|
11688
|
-
// parent NodeInjector.
|
|
11689
|
-
const parentLocation = getParentInjectorLocation(this, lView);
|
|
11690
|
-
if (parentLocation !== NO_PARENT_INJECTOR) {
|
|
11691
|
-
// We found a parent, so start searching from the parent location.
|
|
11692
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11693
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11694
|
-
}
|
|
11695
|
-
else {
|
|
11696
|
-
// No parents have been found, so there are no `NodeInjector`s to consult.
|
|
11697
|
-
}
|
|
11698
|
-
}
|
|
11699
|
-
while (injectorIndex !== -1) {
|
|
11700
|
-
ngDevMode && assertNodeInjector(lView, injectorIndex);
|
|
11701
|
-
const tNode = lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];
|
|
11702
|
-
path.push(buildDebugNode(tNode, lView));
|
|
11703
|
-
const parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];
|
|
11704
|
-
if (parentLocation === NO_PARENT_INJECTOR) {
|
|
11705
|
-
injectorIndex = -1;
|
|
11706
|
-
}
|
|
11707
|
-
else {
|
|
11708
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11709
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11710
|
-
}
|
|
11711
|
-
}
|
|
11712
|
-
return path;
|
|
11713
|
-
}
|
|
11714
|
-
get type_() {
|
|
11715
|
-
return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;
|
|
11716
|
-
}
|
|
11717
|
-
get flags_() {
|
|
11718
|
-
const flags = [];
|
|
11719
|
-
if (this.flags & 8 /* TNodeFlags.hasClassInput */)
|
|
11720
|
-
flags.push('TNodeFlags.hasClassInput');
|
|
11721
|
-
if (this.flags & 4 /* TNodeFlags.hasContentQuery */)
|
|
11722
|
-
flags.push('TNodeFlags.hasContentQuery');
|
|
11723
|
-
if (this.flags & 16 /* TNodeFlags.hasStyleInput */)
|
|
11724
|
-
flags.push('TNodeFlags.hasStyleInput');
|
|
11725
|
-
if (this.flags & 64 /* TNodeFlags.hasHostBindings */)
|
|
11726
|
-
flags.push('TNodeFlags.hasHostBindings');
|
|
11727
|
-
if (this.flags & 1 /* TNodeFlags.isDirectiveHost */)
|
|
11728
|
-
flags.push('TNodeFlags.isDirectiveHost');
|
|
11729
|
-
if (this.flags & 32 /* TNodeFlags.isDetached */)
|
|
11730
|
-
flags.push('TNodeFlags.isDetached');
|
|
11731
|
-
if (this.flags & 2 /* TNodeFlags.isProjected */)
|
|
11732
|
-
flags.push('TNodeFlags.isProjected');
|
|
11733
|
-
return flags.join('|');
|
|
11734
|
-
}
|
|
11735
|
-
get template_() {
|
|
11736
|
-
if (this.type & 1 /* TNodeType.Text */)
|
|
11737
|
-
return this.value;
|
|
11738
|
-
const buf = [];
|
|
11739
|
-
const tagName = typeof this.value === 'string' && this.value || this.type_;
|
|
11740
|
-
buf.push('<', tagName);
|
|
11741
|
-
if (this.flags) {
|
|
11742
|
-
buf.push(' ', this.flags_);
|
|
11743
|
-
}
|
|
11744
|
-
if (this.attrs) {
|
|
11745
|
-
for (let i = 0; i < this.attrs.length;) {
|
|
11746
|
-
const attrName = this.attrs[i++];
|
|
11747
|
-
if (typeof attrName == 'number') {
|
|
11748
|
-
break;
|
|
11749
|
-
}
|
|
11750
|
-
const attrValue = this.attrs[i++];
|
|
11751
|
-
buf.push(' ', attrName, '="', attrValue, '"');
|
|
11752
|
-
}
|
|
11753
|
-
}
|
|
11754
|
-
buf.push('>');
|
|
11755
|
-
processTNodeChildren(this.child, buf);
|
|
11756
|
-
buf.push('</', tagName, '>');
|
|
11757
|
-
return buf.join('');
|
|
11758
|
-
}
|
|
11759
|
-
get styleBindings_() {
|
|
11760
|
-
return toDebugStyleBinding(this, false);
|
|
11761
|
-
}
|
|
11762
|
-
get classBindings_() {
|
|
11763
|
-
return toDebugStyleBinding(this, true);
|
|
11764
|
-
}
|
|
11765
|
-
get providerIndexStart_() {
|
|
11766
|
-
return this.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;
|
|
11767
|
-
}
|
|
11768
|
-
get providerIndexEnd_() {
|
|
11769
|
-
return this.providerIndexStart_ +
|
|
11770
|
-
(this.providerIndexes >>> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */);
|
|
11771
|
-
}
|
|
11772
|
-
}
|
|
11773
|
-
const TNodeDebug = TNode;
|
|
11774
|
-
function toDebugStyleBinding(tNode, isClassBased) {
|
|
11775
|
-
const tData = tNode.tView_.data;
|
|
11776
|
-
const bindings = [];
|
|
11777
|
-
const range = isClassBased ? tNode.classBindings : tNode.styleBindings;
|
|
11778
|
-
const prev = getTStylingRangePrev(range);
|
|
11779
|
-
const next = getTStylingRangeNext(range);
|
|
11780
|
-
let isTemplate = next !== 0;
|
|
11781
|
-
let cursor = isTemplate ? next : prev;
|
|
11782
|
-
while (cursor !== 0) {
|
|
11783
|
-
const itemKey = tData[cursor];
|
|
11784
|
-
const itemRange = tData[cursor + 1];
|
|
11785
|
-
bindings.unshift({
|
|
11786
|
-
key: itemKey,
|
|
11787
|
-
index: cursor,
|
|
11788
|
-
isTemplate: isTemplate,
|
|
11789
|
-
prevDuplicate: getTStylingRangePrevDuplicate(itemRange),
|
|
11790
|
-
nextDuplicate: getTStylingRangeNextDuplicate(itemRange),
|
|
11791
|
-
nextIndex: getTStylingRangeNext(itemRange),
|
|
11792
|
-
prevIndex: getTStylingRangePrev(itemRange),
|
|
11793
|
-
});
|
|
11794
|
-
if (cursor === prev)
|
|
11795
|
-
isTemplate = false;
|
|
11796
|
-
cursor = getTStylingRangePrev(itemRange);
|
|
11797
|
-
}
|
|
11798
|
-
bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);
|
|
11799
|
-
return bindings;
|
|
11800
|
-
}
|
|
11801
|
-
function processTNodeChildren(tNode, buf) {
|
|
11802
|
-
while (tNode) {
|
|
11803
|
-
buf.push(tNode.template_);
|
|
11804
|
-
tNode = tNode.next;
|
|
11805
|
-
}
|
|
11806
|
-
}
|
|
11807
|
-
class TViewData extends Array {
|
|
11808
|
-
}
|
|
11809
|
-
let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
|
|
11810
|
-
// `LView` constructor could have side-effects.
|
|
11811
|
-
/**
|
|
11812
|
-
* This function clones a blueprint and creates TData.
|
|
11813
|
-
*
|
|
11814
|
-
* Simple slice will keep the same type, and we need it to be TData
|
|
11815
|
-
*/
|
|
11816
|
-
function cloneToTViewData(list) {
|
|
11817
|
-
if (TVIEWDATA_EMPTY === undefined)
|
|
11818
|
-
TVIEWDATA_EMPTY = new TViewData();
|
|
11819
|
-
return TVIEWDATA_EMPTY.concat(list);
|
|
11820
|
-
}
|
|
11821
|
-
class LViewBlueprint extends Array {
|
|
11822
|
-
}
|
|
11823
|
-
class MatchesArray extends Array {
|
|
11824
|
-
}
|
|
11825
|
-
class TViewComponents extends Array {
|
|
11826
|
-
}
|
|
11827
|
-
class TNodeLocalNames extends Array {
|
|
11828
|
-
}
|
|
11829
|
-
class TNodeInitialInputs extends Array {
|
|
11830
|
-
}
|
|
11831
|
-
class LCleanup extends Array {
|
|
11832
|
-
}
|
|
11833
|
-
class TCleanup extends Array {
|
|
11834
|
-
}
|
|
11835
|
-
function attachLViewDebug(lView) {
|
|
11836
|
-
attachDebugObject(lView, new LViewDebug(lView));
|
|
11837
|
-
}
|
|
11838
|
-
function attachLContainerDebug(lContainer) {
|
|
11839
|
-
attachDebugObject(lContainer, new LContainerDebug(lContainer));
|
|
11840
|
-
}
|
|
11841
|
-
function toDebug(obj) {
|
|
11842
|
-
if (obj) {
|
|
11843
|
-
const debug = obj.debug;
|
|
11844
|
-
assertDefined(debug, 'Object does not have a debug representation.');
|
|
11845
|
-
return debug;
|
|
11846
|
-
}
|
|
11847
|
-
else {
|
|
11848
|
-
return obj;
|
|
11849
|
-
}
|
|
11850
|
-
}
|
|
11851
|
-
/**
|
|
11852
|
-
* Use this method to unwrap a native element in `LView` and convert it into HTML for easier
|
|
11853
|
-
* reading.
|
|
11854
|
-
*
|
|
11855
|
-
* @param value possibly wrapped native DOM node.
|
|
11856
|
-
* @param includeChildren If `true` then the serialized HTML form will include child elements
|
|
11857
|
-
* (same
|
|
11858
|
-
* as `outerHTML`). If `false` then the serialized HTML form will only contain the element
|
|
11859
|
-
* itself
|
|
11860
|
-
* (will not serialize child elements).
|
|
11861
|
-
*/
|
|
11862
|
-
function toHtml(value, includeChildren = false) {
|
|
11863
|
-
const node = unwrapRNode(value);
|
|
11864
|
-
if (node) {
|
|
11865
|
-
switch (node.nodeType) {
|
|
11866
|
-
case Node.TEXT_NODE:
|
|
11867
|
-
return node.textContent;
|
|
11868
|
-
case Node.COMMENT_NODE:
|
|
11869
|
-
return `<!--${node.textContent}-->`;
|
|
11870
|
-
case Node.ELEMENT_NODE:
|
|
11871
|
-
const outerHTML = node.outerHTML;
|
|
11872
|
-
if (includeChildren) {
|
|
11873
|
-
return outerHTML;
|
|
11874
|
-
}
|
|
11875
|
-
else {
|
|
11876
|
-
const innerHTML = '>' + node.innerHTML + '<';
|
|
11877
|
-
return (outerHTML.split(innerHTML)[0]) + '>';
|
|
11878
|
-
}
|
|
11879
|
-
}
|
|
11880
|
-
}
|
|
11881
|
-
return null;
|
|
11882
|
-
}
|
|
11883
|
-
class LViewDebug {
|
|
11884
|
-
constructor(_raw_lView) {
|
|
11885
|
-
this._raw_lView = _raw_lView;
|
|
11886
|
-
}
|
|
11887
|
-
/**
|
|
11888
|
-
* Flags associated with the `LView` unpacked into a more readable state.
|
|
11889
|
-
*/
|
|
11890
|
-
get flags() {
|
|
11891
|
-
const flags = this._raw_lView[FLAGS];
|
|
11892
|
-
return {
|
|
11893
|
-
__raw__flags__: flags,
|
|
11894
|
-
initPhaseState: flags & 3 /* LViewFlags.InitPhaseStateMask */,
|
|
11895
|
-
creationMode: !!(flags & 4 /* LViewFlags.CreationMode */),
|
|
11896
|
-
firstViewPass: !!(flags & 8 /* LViewFlags.FirstLViewPass */),
|
|
11897
|
-
checkAlways: !!(flags & 16 /* LViewFlags.CheckAlways */),
|
|
11898
|
-
dirty: !!(flags & 32 /* LViewFlags.Dirty */),
|
|
11899
|
-
attached: !!(flags & 64 /* LViewFlags.Attached */),
|
|
11900
|
-
destroyed: !!(flags & 128 /* LViewFlags.Destroyed */),
|
|
11901
|
-
isRoot: !!(flags & 256 /* LViewFlags.IsRoot */),
|
|
11902
|
-
indexWithinInitPhase: flags >> 11 /* LViewFlags.IndexWithinInitPhaseShift */,
|
|
11903
|
-
};
|
|
11904
|
-
}
|
|
11905
|
-
get parent() {
|
|
11906
|
-
return toDebug(this._raw_lView[PARENT]);
|
|
11907
|
-
}
|
|
11908
|
-
get hostHTML() {
|
|
11909
|
-
return toHtml(this._raw_lView[HOST], true);
|
|
11910
|
-
}
|
|
11911
|
-
get html() {
|
|
11912
|
-
return (this.nodes || []).map(mapToHTML).join('');
|
|
11913
|
-
}
|
|
11914
|
-
get context() {
|
|
11915
|
-
return this._raw_lView[CONTEXT];
|
|
11916
|
-
}
|
|
11917
|
-
/**
|
|
11918
|
-
* The tree of nodes associated with the current `LView`. The nodes have been normalized into
|
|
11919
|
-
* a tree structure with relevant details pulled out for readability.
|
|
11920
|
-
*/
|
|
11921
|
-
get nodes() {
|
|
11922
|
-
const lView = this._raw_lView;
|
|
11923
|
-
const tNode = lView[TVIEW].firstChild;
|
|
11924
|
-
return toDebugNodes(tNode, lView);
|
|
11925
|
-
}
|
|
11926
|
-
get template() {
|
|
11927
|
-
return this.tView.template_;
|
|
11928
|
-
}
|
|
11929
|
-
get tView() {
|
|
11930
|
-
return this._raw_lView[TVIEW];
|
|
11931
|
-
}
|
|
11932
|
-
get cleanup() {
|
|
11933
|
-
return this._raw_lView[CLEANUP];
|
|
11934
|
-
}
|
|
11935
|
-
get injector() {
|
|
11936
|
-
return this._raw_lView[INJECTOR$1];
|
|
11937
|
-
}
|
|
11938
|
-
get rendererFactory() {
|
|
11939
|
-
return this._raw_lView[RENDERER_FACTORY];
|
|
11940
|
-
}
|
|
11941
|
-
get renderer() {
|
|
11942
|
-
return this._raw_lView[RENDERER];
|
|
11943
|
-
}
|
|
11944
|
-
get sanitizer() {
|
|
11945
|
-
return this._raw_lView[SANITIZER];
|
|
11946
|
-
}
|
|
11947
|
-
get childHead() {
|
|
11948
|
-
return toDebug(this._raw_lView[CHILD_HEAD]);
|
|
11949
|
-
}
|
|
11950
|
-
get next() {
|
|
11951
|
-
return toDebug(this._raw_lView[NEXT]);
|
|
11952
|
-
}
|
|
11953
|
-
get childTail() {
|
|
11954
|
-
return toDebug(this._raw_lView[CHILD_TAIL]);
|
|
11955
|
-
}
|
|
11956
|
-
get declarationView() {
|
|
11957
|
-
return toDebug(this._raw_lView[DECLARATION_VIEW]);
|
|
11958
|
-
}
|
|
11959
|
-
get queries() {
|
|
11960
|
-
return this._raw_lView[QUERIES];
|
|
11961
|
-
}
|
|
11962
|
-
get tHost() {
|
|
11963
|
-
return this._raw_lView[T_HOST];
|
|
11964
|
-
}
|
|
11965
|
-
get id() {
|
|
11966
|
-
return this._raw_lView[ID];
|
|
11967
|
-
}
|
|
11968
|
-
get decls() {
|
|
11969
|
-
return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
|
|
11970
|
-
}
|
|
11971
|
-
get vars() {
|
|
11972
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);
|
|
11973
|
-
}
|
|
11974
|
-
get expando() {
|
|
11975
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);
|
|
11976
|
-
}
|
|
11977
|
-
/**
|
|
11978
|
-
* Normalized view of child views (and containers) attached at this location.
|
|
11979
|
-
*/
|
|
11980
|
-
get childViews() {
|
|
11981
|
-
const childViews = [];
|
|
11982
|
-
let child = this.childHead;
|
|
11983
|
-
while (child) {
|
|
11984
|
-
childViews.push(child);
|
|
11985
|
-
child = child.next;
|
|
11094
|
+
_getByKeyDefault(key, notFoundValue, visibility) {
|
|
11095
|
+
let inj;
|
|
11096
|
+
if (visibility instanceof SkipSelf) {
|
|
11097
|
+
inj = this.parent;
|
|
11098
|
+
}
|
|
11099
|
+
else {
|
|
11100
|
+
inj = this;
|
|
11101
|
+
}
|
|
11102
|
+
while (inj instanceof ReflectiveInjector_) {
|
|
11103
|
+
const inj_ = inj;
|
|
11104
|
+
const obj = inj_._getObjByKeyId(key.id);
|
|
11105
|
+
if (obj !== UNDEFINED)
|
|
11106
|
+
return obj;
|
|
11107
|
+
inj = inj_.parent;
|
|
11108
|
+
}
|
|
11109
|
+
if (inj !== null) {
|
|
11110
|
+
return inj.get(key.token, notFoundValue);
|
|
11111
|
+
}
|
|
11112
|
+
else {
|
|
11113
|
+
return this._throwOrNull(key, notFoundValue);
|
|
11986
11114
|
}
|
|
11987
|
-
return childViews;
|
|
11988
|
-
}
|
|
11989
|
-
}
|
|
11990
|
-
function mapToHTML(node) {
|
|
11991
|
-
if (node.type === 'ElementContainer') {
|
|
11992
|
-
return (node.children || []).map(mapToHTML).join('');
|
|
11993
11115
|
}
|
|
11994
|
-
|
|
11995
|
-
|
|
11116
|
+
get displayName() {
|
|
11117
|
+
const providers = _mapProviders(this, (b) => ' "' + b.key.displayName + '" ')
|
|
11118
|
+
.join(', ');
|
|
11119
|
+
return `ReflectiveInjector(providers: [${providers}])`;
|
|
11996
11120
|
}
|
|
11997
|
-
|
|
11998
|
-
return
|
|
11121
|
+
toString() {
|
|
11122
|
+
return this.displayName;
|
|
11999
11123
|
}
|
|
12000
11124
|
}
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
11125
|
+
ReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));
|
|
11126
|
+
function _mapProviders(injector, fn) {
|
|
11127
|
+
const res = [];
|
|
11128
|
+
for (let i = 0; i < injector._providers.length; ++i) {
|
|
11129
|
+
res[i] = fn(injector.getProviderAtIndex(i));
|
|
12005
11130
|
}
|
|
12006
|
-
return
|
|
11131
|
+
return res;
|
|
12007
11132
|
}
|
|
11133
|
+
|
|
12008
11134
|
/**
|
|
12009
|
-
*
|
|
11135
|
+
* @license
|
|
11136
|
+
* Copyright Google LLC All Rights Reserved.
|
|
12010
11137
|
*
|
|
12011
|
-
*
|
|
12012
|
-
*
|
|
11138
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11139
|
+
* found in the LICENSE file at https://angular.io/license
|
|
12013
11140
|
*/
|
|
12014
|
-
|
|
12015
|
-
if (tNode) {
|
|
12016
|
-
const debugNodes = [];
|
|
12017
|
-
let tNodeCursor = tNode;
|
|
12018
|
-
while (tNodeCursor) {
|
|
12019
|
-
debugNodes.push(buildDebugNode(tNodeCursor, lView));
|
|
12020
|
-
tNodeCursor = tNodeCursor.next;
|
|
12021
|
-
}
|
|
12022
|
-
return debugNodes;
|
|
12023
|
-
}
|
|
12024
|
-
else {
|
|
12025
|
-
return [];
|
|
12026
|
-
}
|
|
12027
|
-
}
|
|
12028
|
-
function buildDebugNode(tNode, lView) {
|
|
12029
|
-
const rawValue = lView[tNode.index];
|
|
12030
|
-
const native = unwrapRNode(rawValue);
|
|
12031
|
-
const factories = [];
|
|
12032
|
-
const instances = [];
|
|
12033
|
-
const tView = lView[TVIEW];
|
|
12034
|
-
for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
|
|
12035
|
-
const def = tView.data[i];
|
|
12036
|
-
factories.push(def.type);
|
|
12037
|
-
instances.push(lView[i]);
|
|
12038
|
-
}
|
|
12039
|
-
return {
|
|
12040
|
-
html: toHtml(native),
|
|
12041
|
-
type: toTNodeTypeAsString(tNode.type),
|
|
12042
|
-
tNode,
|
|
12043
|
-
native: native,
|
|
12044
|
-
children: toDebugNodes(tNode.child, lView),
|
|
12045
|
-
factories,
|
|
12046
|
-
instances,
|
|
12047
|
-
injector: buildNodeInjectorDebug(tNode, tView, lView),
|
|
12048
|
-
get injectorResolutionPath() {
|
|
12049
|
-
return tNode.debugNodeInjectorPath(lView);
|
|
12050
|
-
},
|
|
12051
|
-
};
|
|
12052
|
-
}
|
|
12053
|
-
function buildNodeInjectorDebug(tNode, tView, lView) {
|
|
12054
|
-
const viewProviders = [];
|
|
12055
|
-
for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {
|
|
12056
|
-
viewProviders.push(tView.data[i]);
|
|
12057
|
-
}
|
|
12058
|
-
const providers = [];
|
|
12059
|
-
for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {
|
|
12060
|
-
providers.push(tView.data[i]);
|
|
12061
|
-
}
|
|
12062
|
-
const nodeInjectorDebug = {
|
|
12063
|
-
bloom: toBloom(lView, tNode.injectorIndex),
|
|
12064
|
-
cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),
|
|
12065
|
-
providers,
|
|
12066
|
-
viewProviders,
|
|
12067
|
-
parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],
|
|
12068
|
-
};
|
|
12069
|
-
return nodeInjectorDebug;
|
|
12070
|
-
}
|
|
11141
|
+
|
|
12071
11142
|
/**
|
|
12072
|
-
*
|
|
11143
|
+
* @license
|
|
11144
|
+
* Copyright Google LLC All Rights Reserved.
|
|
12073
11145
|
*
|
|
12074
|
-
*
|
|
12075
|
-
*
|
|
11146
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11147
|
+
* found in the LICENSE file at https://angular.io/license
|
|
12076
11148
|
*/
|
|
12077
|
-
|
|
12078
|
-
const value = array[idx];
|
|
12079
|
-
// If not a number we print 8 `?` to retain alignment but let user know that it was called on
|
|
12080
|
-
// wrong type.
|
|
12081
|
-
if (typeof value !== 'number')
|
|
12082
|
-
return '????????';
|
|
12083
|
-
// We prefix 0s so that we have constant length number
|
|
12084
|
-
const text = '00000000' + value.toString(2);
|
|
12085
|
-
return text.substring(text.length - 8);
|
|
12086
|
-
}
|
|
11149
|
+
|
|
12087
11150
|
/**
|
|
12088
|
-
*
|
|
11151
|
+
* @license
|
|
11152
|
+
* Copyright Google LLC All Rights Reserved.
|
|
12089
11153
|
*
|
|
12090
|
-
*
|
|
12091
|
-
*
|
|
11154
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11155
|
+
* found in the LICENSE file at https://angular.io/license
|
|
12092
11156
|
*/
|
|
12093
|
-
function
|
|
12094
|
-
|
|
12095
|
-
|
|
11157
|
+
function ɵɵdirectiveInject(token, flags = InjectFlags.Default) {
|
|
11158
|
+
const lView = getLView();
|
|
11159
|
+
// Fall back to inject() if view hasn't been created. This situation can happen in tests
|
|
11160
|
+
// if inject utilities are used before bootstrapping.
|
|
11161
|
+
if (lView === null) {
|
|
11162
|
+
// Verify that we will not get into infinite loop.
|
|
11163
|
+
ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
|
|
11164
|
+
return ɵɵinject(token, flags);
|
|
12096
11165
|
}
|
|
12097
|
-
|
|
11166
|
+
const tNode = getCurrentTNode();
|
|
11167
|
+
return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
|
|
12098
11168
|
}
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
return this._raw_lContainer[MOVED_VIEWS];
|
|
12115
|
-
}
|
|
12116
|
-
get host() {
|
|
12117
|
-
return this._raw_lContainer[HOST];
|
|
12118
|
-
}
|
|
12119
|
-
get native() {
|
|
12120
|
-
return this._raw_lContainer[NATIVE];
|
|
12121
|
-
}
|
|
12122
|
-
get next() {
|
|
12123
|
-
return toDebug(this._raw_lContainer[NEXT]);
|
|
12124
|
-
}
|
|
11169
|
+
/**
|
|
11170
|
+
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
11171
|
+
* particular class.
|
|
11172
|
+
*
|
|
11173
|
+
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
11174
|
+
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
11175
|
+
*
|
|
11176
|
+
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
11177
|
+
* and thus in the stack trace.
|
|
11178
|
+
*
|
|
11179
|
+
* @codeGenApi
|
|
11180
|
+
*/
|
|
11181
|
+
function ɵɵinvalidFactory() {
|
|
11182
|
+
const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';
|
|
11183
|
+
throw new Error(msg);
|
|
12125
11184
|
}
|
|
12126
11185
|
|
|
12127
11186
|
/**
|
|
@@ -12197,7 +11256,7 @@ function renderChildComponents(hostLView, components) {
|
|
|
12197
11256
|
}
|
|
12198
11257
|
}
|
|
12199
11258
|
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
|
|
12200
|
-
const lView =
|
|
11259
|
+
const lView = tView.blueprint.slice();
|
|
12201
11260
|
lView[HOST] = host;
|
|
12202
11261
|
lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;
|
|
12203
11262
|
if (embeddedViewInjector !== null ||
|
|
@@ -12221,7 +11280,6 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
|
|
|
12221
11280
|
assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
12222
11281
|
lView[DECLARATION_COMPONENT_VIEW] =
|
|
12223
11282
|
tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
|
|
12224
|
-
ngDevMode && attachLViewDebug(lView);
|
|
12225
11283
|
return lView;
|
|
12226
11284
|
}
|
|
12227
11285
|
function getOrCreateTNode(tView, index, type, name, attrs) {
|
|
@@ -12604,73 +11662,38 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12604
11662
|
const initialViewLength = bindingStartIndex + vars;
|
|
12605
11663
|
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
|
|
12606
11664
|
const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
|
|
12607
|
-
const tView = blueprint[TVIEW] =
|
|
12608
|
-
|
|
12609
|
-
blueprint
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
viewQuery
|
|
12613
|
-
declTNode
|
|
12614
|
-
|
|
12615
|
-
bindingStartIndex
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
typeof directives === 'function' ?
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
false, // incompleteFirstPass: boolean
|
|
12640
|
-
decls, // ngDevMode only: decls
|
|
12641
|
-
vars) :
|
|
12642
|
-
{
|
|
12643
|
-
type: type,
|
|
12644
|
-
blueprint: blueprint,
|
|
12645
|
-
template: templateFn,
|
|
12646
|
-
queries: null,
|
|
12647
|
-
viewQuery: viewQuery,
|
|
12648
|
-
declTNode: declTNode,
|
|
12649
|
-
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
12650
|
-
bindingStartIndex: bindingStartIndex,
|
|
12651
|
-
expandoStartIndex: initialViewLength,
|
|
12652
|
-
hostBindingOpCodes: null,
|
|
12653
|
-
firstCreatePass: true,
|
|
12654
|
-
firstUpdatePass: true,
|
|
12655
|
-
staticViewQueries: false,
|
|
12656
|
-
staticContentQueries: false,
|
|
12657
|
-
preOrderHooks: null,
|
|
12658
|
-
preOrderCheckHooks: null,
|
|
12659
|
-
contentHooks: null,
|
|
12660
|
-
contentCheckHooks: null,
|
|
12661
|
-
viewHooks: null,
|
|
12662
|
-
viewCheckHooks: null,
|
|
12663
|
-
destroyHooks: null,
|
|
12664
|
-
cleanup: null,
|
|
12665
|
-
contentQueries: null,
|
|
12666
|
-
components: null,
|
|
12667
|
-
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
12668
|
-
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
12669
|
-
firstChild: null,
|
|
12670
|
-
schemas: schemas,
|
|
12671
|
-
consts: consts,
|
|
12672
|
-
incompleteFirstPass: false
|
|
12673
|
-
};
|
|
11665
|
+
const tView = blueprint[TVIEW] = {
|
|
11666
|
+
type: type,
|
|
11667
|
+
blueprint: blueprint,
|
|
11668
|
+
template: templateFn,
|
|
11669
|
+
queries: null,
|
|
11670
|
+
viewQuery: viewQuery,
|
|
11671
|
+
declTNode: declTNode,
|
|
11672
|
+
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
11673
|
+
bindingStartIndex: bindingStartIndex,
|
|
11674
|
+
expandoStartIndex: initialViewLength,
|
|
11675
|
+
hostBindingOpCodes: null,
|
|
11676
|
+
firstCreatePass: true,
|
|
11677
|
+
firstUpdatePass: true,
|
|
11678
|
+
staticViewQueries: false,
|
|
11679
|
+
staticContentQueries: false,
|
|
11680
|
+
preOrderHooks: null,
|
|
11681
|
+
preOrderCheckHooks: null,
|
|
11682
|
+
contentHooks: null,
|
|
11683
|
+
contentCheckHooks: null,
|
|
11684
|
+
viewHooks: null,
|
|
11685
|
+
viewCheckHooks: null,
|
|
11686
|
+
destroyHooks: null,
|
|
11687
|
+
cleanup: null,
|
|
11688
|
+
contentQueries: null,
|
|
11689
|
+
components: null,
|
|
11690
|
+
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
11691
|
+
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
11692
|
+
firstChild: null,
|
|
11693
|
+
schemas: schemas,
|
|
11694
|
+
consts: consts,
|
|
11695
|
+
incompleteFirstPass: false
|
|
11696
|
+
};
|
|
12674
11697
|
if (ngDevMode) {
|
|
12675
11698
|
// For performance reasons it is important that the tView retains the same shape during runtime.
|
|
12676
11699
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12680,7 +11703,7 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12680
11703
|
return tView;
|
|
12681
11704
|
}
|
|
12682
11705
|
function createViewBlueprint(bindingStartIndex, initialViewLength) {
|
|
12683
|
-
const blueprint =
|
|
11706
|
+
const blueprint = [];
|
|
12684
11707
|
for (let i = 0; i < initialViewLength; i++) {
|
|
12685
11708
|
blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
|
|
12686
11709
|
}
|
|
@@ -12733,74 +11756,40 @@ function createTNode(tView, tParent, type, index, value, attrs) {
|
|
|
12733
11756
|
ngDevMode && ngDevMode.tNode++;
|
|
12734
11757
|
ngDevMode && tParent && assertTNodeForTView(tParent, tView);
|
|
12735
11758
|
let injectorIndex = tParent ? tParent.injectorIndex : -1;
|
|
12736
|
-
const tNode =
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
-1,
|
|
12743
|
-
-1,
|
|
12744
|
-
-1,
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
0,
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
null,
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
0,
|
|
12769
|
-
|
|
12770
|
-
{
|
|
12771
|
-
type,
|
|
12772
|
-
index,
|
|
12773
|
-
insertBeforeIndex: null,
|
|
12774
|
-
injectorIndex,
|
|
12775
|
-
directiveStart: -1,
|
|
12776
|
-
directiveEnd: -1,
|
|
12777
|
-
directiveStylingLast: -1,
|
|
12778
|
-
componentOffset: -1,
|
|
12779
|
-
propertyBindings: null,
|
|
12780
|
-
flags: 0,
|
|
12781
|
-
providerIndexes: 0,
|
|
12782
|
-
value: value,
|
|
12783
|
-
attrs: attrs,
|
|
12784
|
-
mergedAttrs: null,
|
|
12785
|
-
localNames: null,
|
|
12786
|
-
initialInputs: undefined,
|
|
12787
|
-
inputs: null,
|
|
12788
|
-
outputs: null,
|
|
12789
|
-
tViews: null,
|
|
12790
|
-
next: null,
|
|
12791
|
-
projectionNext: null,
|
|
12792
|
-
child: null,
|
|
12793
|
-
parent: tParent,
|
|
12794
|
-
projection: null,
|
|
12795
|
-
styles: null,
|
|
12796
|
-
stylesWithoutHost: null,
|
|
12797
|
-
residualStyles: undefined,
|
|
12798
|
-
classes: null,
|
|
12799
|
-
classesWithoutHost: null,
|
|
12800
|
-
residualClasses: undefined,
|
|
12801
|
-
classBindings: 0,
|
|
12802
|
-
styleBindings: 0,
|
|
12803
|
-
};
|
|
11759
|
+
const tNode = {
|
|
11760
|
+
type,
|
|
11761
|
+
index,
|
|
11762
|
+
insertBeforeIndex: null,
|
|
11763
|
+
injectorIndex,
|
|
11764
|
+
directiveStart: -1,
|
|
11765
|
+
directiveEnd: -1,
|
|
11766
|
+
directiveStylingLast: -1,
|
|
11767
|
+
componentOffset: -1,
|
|
11768
|
+
propertyBindings: null,
|
|
11769
|
+
flags: 0,
|
|
11770
|
+
providerIndexes: 0,
|
|
11771
|
+
value: value,
|
|
11772
|
+
attrs: attrs,
|
|
11773
|
+
mergedAttrs: null,
|
|
11774
|
+
localNames: null,
|
|
11775
|
+
initialInputs: undefined,
|
|
11776
|
+
inputs: null,
|
|
11777
|
+
outputs: null,
|
|
11778
|
+
tViews: null,
|
|
11779
|
+
next: null,
|
|
11780
|
+
projectionNext: null,
|
|
11781
|
+
child: null,
|
|
11782
|
+
parent: tParent,
|
|
11783
|
+
projection: null,
|
|
11784
|
+
styles: null,
|
|
11785
|
+
stylesWithoutHost: null,
|
|
11786
|
+
residualStyles: undefined,
|
|
11787
|
+
classes: null,
|
|
11788
|
+
classesWithoutHost: null,
|
|
11789
|
+
residualClasses: undefined,
|
|
11790
|
+
classBindings: 0,
|
|
11791
|
+
styleBindings: 0,
|
|
11792
|
+
};
|
|
12804
11793
|
if (ngDevMode) {
|
|
12805
11794
|
// For performance reasons it is important that the tNode retains the same shape during runtime.
|
|
12806
11795
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12857,7 +11846,7 @@ function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMa
|
|
|
12857
11846
|
const end = tNode.directiveEnd;
|
|
12858
11847
|
const tViewData = tView.data;
|
|
12859
11848
|
const tNodeAttrs = tNode.attrs;
|
|
12860
|
-
const inputsFromAttrs =
|
|
11849
|
+
const inputsFromAttrs = [];
|
|
12861
11850
|
let inputsStore = null;
|
|
12862
11851
|
let outputsStore = null;
|
|
12863
11852
|
for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
|
|
@@ -13126,6 +12115,12 @@ function lastSelectedElementIdx(hostBindingOpCodes) {
|
|
|
13126
12115
|
function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
13127
12116
|
const start = tNode.directiveStart;
|
|
13128
12117
|
const end = tNode.directiveEnd;
|
|
12118
|
+
// The component view needs to be created before creating the node injector
|
|
12119
|
+
// since it is used to inject some special symbols like `ChangeDetectorRef`.
|
|
12120
|
+
if (isComponentHost(tNode)) {
|
|
12121
|
+
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
12122
|
+
addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);
|
|
12123
|
+
}
|
|
13129
12124
|
if (!tView.firstCreatePass) {
|
|
13130
12125
|
getOrCreateNodeInjectorForNode(tNode, lView);
|
|
13131
12126
|
}
|
|
@@ -13133,19 +12128,14 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
|
13133
12128
|
const initialInputs = tNode.initialInputs;
|
|
13134
12129
|
for (let i = start; i < end; i++) {
|
|
13135
12130
|
const def = tView.data[i];
|
|
13136
|
-
const isComponent = isComponentDef(def);
|
|
13137
|
-
if (isComponent) {
|
|
13138
|
-
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
13139
|
-
addComponentLogic(lView, tNode, def);
|
|
13140
|
-
}
|
|
13141
12131
|
const directive = getNodeInjectable(lView, tView, i, tNode);
|
|
13142
12132
|
attachPatchData(directive, lView);
|
|
13143
12133
|
if (initialInputs !== null) {
|
|
13144
12134
|
setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);
|
|
13145
12135
|
}
|
|
13146
|
-
if (
|
|
12136
|
+
if (isComponentDef(def)) {
|
|
13147
12137
|
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
13148
|
-
componentView[CONTEXT] =
|
|
12138
|
+
componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);
|
|
13149
12139
|
}
|
|
13150
12140
|
}
|
|
13151
12141
|
}
|
|
@@ -13195,7 +12185,7 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
13195
12185
|
for (let i = 0; i < registry.length; i++) {
|
|
13196
12186
|
const def = registry[i];
|
|
13197
12187
|
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
|
|
13198
|
-
matches || (matches =
|
|
12188
|
+
matches || (matches = []);
|
|
13199
12189
|
if (isComponentDef(def)) {
|
|
13200
12190
|
if (ngDevMode) {
|
|
13201
12191
|
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
|
|
@@ -13253,13 +12243,12 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
|
13253
12243
|
ngDevMode && assertFirstCreatePass(tView);
|
|
13254
12244
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
13255
12245
|
hostTNode.componentOffset = componentOffset;
|
|
13256
|
-
(tView.components || (tView.components =
|
|
13257
|
-
.push(hostTNode.index);
|
|
12246
|
+
(tView.components || (tView.components = [])).push(hostTNode.index);
|
|
13258
12247
|
}
|
|
13259
12248
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
13260
12249
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
13261
12250
|
if (localRefs) {
|
|
13262
|
-
const localNames = tNode.localNames =
|
|
12251
|
+
const localNames = tNode.localNames = [];
|
|
13263
12252
|
// Local names must be stored in tNode in the same order that localRefs are defined
|
|
13264
12253
|
// in the template to ensure the data is loaded in the same slots as their refs
|
|
13265
12254
|
// in the template (for template queries).
|
|
@@ -13442,9 +12431,6 @@ function generateInitialInputs(inputs, directiveIndex, attrs) {
|
|
|
13442
12431
|
//////////////////////////
|
|
13443
12432
|
//// ViewContainer & View
|
|
13444
12433
|
//////////////////////////
|
|
13445
|
-
// Not sure why I need to do `any` here but TS complains later.
|
|
13446
|
-
const LContainerArray = class LContainer extends Array {
|
|
13447
|
-
};
|
|
13448
12434
|
/**
|
|
13449
12435
|
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
13450
12436
|
*
|
|
@@ -13457,20 +12443,20 @@ const LContainerArray = class LContainer extends Array {
|
|
|
13457
12443
|
*/
|
|
13458
12444
|
function createLContainer(hostNative, currentView, native, tNode) {
|
|
13459
12445
|
ngDevMode && assertLView(currentView);
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
12446
|
+
const lContainer = [
|
|
12447
|
+
hostNative,
|
|
12448
|
+
true,
|
|
12449
|
+
false,
|
|
12450
|
+
currentView,
|
|
12451
|
+
null,
|
|
12452
|
+
0,
|
|
12453
|
+
tNode,
|
|
12454
|
+
native,
|
|
12455
|
+
null,
|
|
12456
|
+
null, // moved views
|
|
12457
|
+
];
|
|
13471
12458
|
ngDevMode &&
|
|
13472
12459
|
assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
|
|
13473
|
-
ngDevMode && attachLContainerDebug(lContainer);
|
|
13474
12460
|
return lContainer;
|
|
13475
12461
|
}
|
|
13476
12462
|
/**
|
|
@@ -13744,10 +12730,10 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
|
|
|
13744
12730
|
}
|
|
13745
12731
|
function getOrCreateLViewCleanup(view) {
|
|
13746
12732
|
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
|
13747
|
-
return view[CLEANUP] || (view[CLEANUP] =
|
|
12733
|
+
return view[CLEANUP] || (view[CLEANUP] = []);
|
|
13748
12734
|
}
|
|
13749
12735
|
function getOrCreateTViewCleanup(tView) {
|
|
13750
|
-
return tView.cleanup || (tView.cleanup =
|
|
12736
|
+
return tView.cleanup || (tView.cleanup = []);
|
|
13751
12737
|
}
|
|
13752
12738
|
/**
|
|
13753
12739
|
* There are cases where the sub component's renderer needs to be included
|
|
@@ -14359,17 +13345,6 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
14359
13345
|
return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);
|
|
14360
13346
|
}
|
|
14361
13347
|
}
|
|
14362
|
-
const componentFactoryResolver = new ComponentFactoryResolver();
|
|
14363
|
-
/**
|
|
14364
|
-
* Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
|
|
14365
|
-
* ComponentFactoryResolver
|
|
14366
|
-
* already exists, retrieves the existing ComponentFactoryResolver.
|
|
14367
|
-
*
|
|
14368
|
-
* @returns The ComponentFactoryResolver instance to use
|
|
14369
|
-
*/
|
|
14370
|
-
function injectComponentFactoryResolver() {
|
|
14371
|
-
return componentFactoryResolver;
|
|
14372
|
-
}
|
|
14373
13348
|
/**
|
|
14374
13349
|
* Represents an instance of a Component created via a {@link ComponentFactory}.
|
|
14375
13350
|
*
|
|
@@ -16955,6 +15930,62 @@ function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
|
|
|
16955
15930
|
return ɵɵpropertyInterpolateV;
|
|
16956
15931
|
}
|
|
16957
15932
|
|
|
15933
|
+
/**
|
|
15934
|
+
* @license
|
|
15935
|
+
* Copyright Google LLC All Rights Reserved.
|
|
15936
|
+
*
|
|
15937
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
15938
|
+
* found in the LICENSE file at https://angular.io/license
|
|
15939
|
+
*/
|
|
15940
|
+
function toTStylingRange(prev, next) {
|
|
15941
|
+
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15942
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15943
|
+
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15944
|
+
}
|
|
15945
|
+
function getTStylingRangePrev(tStylingRange) {
|
|
15946
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15947
|
+
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
15948
|
+
}
|
|
15949
|
+
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
15950
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15951
|
+
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
15952
|
+
2 /* StylingRange.PREV_DUPLICATE */;
|
|
15953
|
+
}
|
|
15954
|
+
function setTStylingRangePrev(tStylingRange, previous) {
|
|
15955
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15956
|
+
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15957
|
+
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
15958
|
+
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
15959
|
+
}
|
|
15960
|
+
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
15961
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15962
|
+
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
15963
|
+
}
|
|
15964
|
+
function getTStylingRangeNext(tStylingRange) {
|
|
15965
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15966
|
+
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
15967
|
+
}
|
|
15968
|
+
function setTStylingRangeNext(tStylingRange, next) {
|
|
15969
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15970
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15971
|
+
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
15972
|
+
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15973
|
+
}
|
|
15974
|
+
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
15975
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15976
|
+
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
15977
|
+
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
15978
|
+
}
|
|
15979
|
+
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
15980
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15981
|
+
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
15982
|
+
}
|
|
15983
|
+
function getTStylingRangeTail(tStylingRange) {
|
|
15984
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15985
|
+
const next = getTStylingRangeNext(tStylingRange);
|
|
15986
|
+
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
15987
|
+
}
|
|
15988
|
+
|
|
16958
15989
|
/**
|
|
16959
15990
|
* @license
|
|
16960
15991
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -20007,7 +19038,7 @@ var I18nCreateOpCode;
|
|
|
20007
19038
|
})(I18nCreateOpCode || (I18nCreateOpCode = {}));
|
|
20008
19039
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
20009
19040
|
// failure based on types.
|
|
20010
|
-
const unusedValueExportToPlacateAjd
|
|
19041
|
+
const unusedValueExportToPlacateAjd = 1;
|
|
20011
19042
|
|
|
20012
19043
|
/**
|
|
20013
19044
|
* @license
|
|
@@ -20776,6 +19807,46 @@ function loadIcuContainerVisitor() {
|
|
|
20776
19807
|
return icuContainerIteratorStart;
|
|
20777
19808
|
}
|
|
20778
19809
|
|
|
19810
|
+
/**
|
|
19811
|
+
* @license
|
|
19812
|
+
* Copyright Google LLC All Rights Reserved.
|
|
19813
|
+
*
|
|
19814
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
19815
|
+
* found in the LICENSE file at https://angular.io/license
|
|
19816
|
+
*/
|
|
19817
|
+
/**
|
|
19818
|
+
* Patch a `debug` property on top of the existing object.
|
|
19819
|
+
*
|
|
19820
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19821
|
+
*
|
|
19822
|
+
* @param obj Object to patch
|
|
19823
|
+
* @param debug Value to patch
|
|
19824
|
+
*/
|
|
19825
|
+
function attachDebugObject(obj, debug) {
|
|
19826
|
+
if (ngDevMode) {
|
|
19827
|
+
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
19828
|
+
}
|
|
19829
|
+
else {
|
|
19830
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19831
|
+
}
|
|
19832
|
+
}
|
|
19833
|
+
/**
|
|
19834
|
+
* Patch a `debug` property getter on top of the existing object.
|
|
19835
|
+
*
|
|
19836
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19837
|
+
*
|
|
19838
|
+
* @param obj Object to patch
|
|
19839
|
+
* @param debugGetter Getter returning a value to patch
|
|
19840
|
+
*/
|
|
19841
|
+
function attachDebugGetter(obj, debugGetter) {
|
|
19842
|
+
if (ngDevMode) {
|
|
19843
|
+
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
19844
|
+
}
|
|
19845
|
+
else {
|
|
19846
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19847
|
+
}
|
|
19848
|
+
}
|
|
19849
|
+
|
|
20779
19850
|
/**
|
|
20780
19851
|
* @license
|
|
20781
19852
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -22745,32 +21816,6 @@ function sortListeners(a, b) {
|
|
|
22745
21816
|
function isDirectiveDefHack(obj) {
|
|
22746
21817
|
return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
|
|
22747
21818
|
}
|
|
22748
|
-
/**
|
|
22749
|
-
* Returns the attached `DebugNode` instance for an element in the DOM.
|
|
22750
|
-
*
|
|
22751
|
-
* @param element DOM element which is owned by an existing component's view.
|
|
22752
|
-
*/
|
|
22753
|
-
function getDebugNode(element) {
|
|
22754
|
-
if (ngDevMode && !(element instanceof Node)) {
|
|
22755
|
-
throw new Error('Expecting instance of DOM Element');
|
|
22756
|
-
}
|
|
22757
|
-
const lContext = getLContext(element);
|
|
22758
|
-
const lView = lContext ? lContext.lView : null;
|
|
22759
|
-
if (lView === null) {
|
|
22760
|
-
return null;
|
|
22761
|
-
}
|
|
22762
|
-
const nodeIndex = lContext.nodeIndex;
|
|
22763
|
-
if (nodeIndex !== -1) {
|
|
22764
|
-
const valueInLView = lView[nodeIndex];
|
|
22765
|
-
// this means that value in the lView is a component with its own
|
|
22766
|
-
// data. In this situation the TNode is not accessed at the same spot.
|
|
22767
|
-
const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);
|
|
22768
|
-
ngDevMode &&
|
|
22769
|
-
assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');
|
|
22770
|
-
return buildDebugNode(tNode, lView);
|
|
22771
|
-
}
|
|
22772
|
-
return null;
|
|
22773
|
-
}
|
|
22774
21819
|
/**
|
|
22775
21820
|
* Retrieve the component `LView` from component/element.
|
|
22776
21821
|
*
|
|
@@ -23990,29 +23035,6 @@ function createContainerRef(hostTNode, hostLView) {
|
|
|
23990
23035
|
* Use of this source code is governed by an MIT-style license that can be
|
|
23991
23036
|
* found in the LICENSE file at https://angular.io/license
|
|
23992
23037
|
*/
|
|
23993
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
23994
|
-
// failure based on types.
|
|
23995
|
-
const unusedValueExportToPlacateAjd$1 = 1;
|
|
23996
|
-
|
|
23997
|
-
/**
|
|
23998
|
-
* @license
|
|
23999
|
-
* Copyright Google LLC All Rights Reserved.
|
|
24000
|
-
*
|
|
24001
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
24002
|
-
* found in the LICENSE file at https://angular.io/license
|
|
24003
|
-
*/
|
|
24004
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
24005
|
-
// failure based on types.
|
|
24006
|
-
const unusedValueExportToPlacateAjd = 1;
|
|
24007
|
-
|
|
24008
|
-
/**
|
|
24009
|
-
* @license
|
|
24010
|
-
* Copyright Google LLC All Rights Reserved.
|
|
24011
|
-
*
|
|
24012
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
24013
|
-
* found in the LICENSE file at https://angular.io/license
|
|
24014
|
-
*/
|
|
24015
|
-
const unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$6 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd;
|
|
24016
23038
|
class LQuery_ {
|
|
24017
23039
|
constructor(queryList) {
|
|
24018
23040
|
this.queryList = queryList;
|