@angular/core 17.0.3 → 17.0.5
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/esm2022/src/application_init.mjs +2 -2
- package/esm2022/src/defer/instructions.mjs +3 -2
- package/esm2022/src/defer/utils.mjs +2 -2
- package/esm2022/src/image_performance_warning.mjs +14 -3
- package/esm2022/src/render3/features/host_directives_feature.mjs +20 -13
- package/esm2022/src/render3/instructions/change_detection.mjs +4 -5
- package/esm2022/src/render3/instructions/control_flow.mjs +9 -11
- package/esm2022/src/render3/util/view_utils.mjs +11 -12
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +19 -10
- package/fesm2022/core.mjs +56 -41
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +21 -12
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +4 -7
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +506 -364
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +855 -517
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/control-flow-migration/schema.json +6 -0
- package/schematics/ng-generate/standalone-migration/bundle.js +818 -623
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
|
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
// bazel-out/
|
|
66
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
67
67
|
var control_flow_migration_exports = {};
|
|
68
68
|
__export(control_flow_migration_exports, {
|
|
69
69
|
default: () => control_flow_migration_default
|
|
@@ -72,22 +72,22 @@ module.exports = __toCommonJS(control_flow_migration_exports);
|
|
|
72
72
|
var import_schematics = require("@angular-devkit/schematics");
|
|
73
73
|
var import_path3 = require("path");
|
|
74
74
|
|
|
75
|
-
// bazel-out/
|
|
75
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
76
76
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
77
77
|
|
|
78
|
-
// bazel-out/
|
|
78
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
|
|
79
79
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
80
80
|
|
|
81
|
-
// bazel-out/
|
|
81
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
82
82
|
function normalizePath(path2) {
|
|
83
83
|
return path2.replace(/\\/g, "/");
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
// bazel-out/
|
|
86
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
87
87
|
var import_path = require("path");
|
|
88
88
|
var import_typescript4 = __toESM(require("typescript"), 1);
|
|
89
89
|
|
|
90
|
-
// bazel-out/
|
|
90
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
91
91
|
var path = __toESM(require("path"), 1);
|
|
92
92
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
93
93
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -104,7 +104,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
104
104
|
return import_typescript3.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
// bazel-out/
|
|
107
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
108
108
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
109
109
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
110
110
|
return import_typescript4.default.createProgram(rootNames, options, host);
|
|
@@ -137,7 +137,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
137
137
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
// bazel-out/
|
|
140
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
141
141
|
var _SELECTOR_REGEXP = new RegExp(
|
|
142
142
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
143
143
|
"g"
|
|
@@ -445,7 +445,7 @@ var SelectorContext = class {
|
|
|
445
445
|
}
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
// bazel-out/
|
|
448
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/core.mjs
|
|
449
449
|
var ViewEncapsulation;
|
|
450
450
|
(function(ViewEncapsulation2) {
|
|
451
451
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -507,7 +507,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
507
507
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
// bazel-out/
|
|
510
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
511
511
|
var textEncoder;
|
|
512
512
|
function computeDigest(message) {
|
|
513
513
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -540,6 +540,9 @@ var _SerializerVisitor = class {
|
|
|
540
540
|
visitIcuPlaceholder(ph, context) {
|
|
541
541
|
return `<ph icu name="${ph.name}">${ph.value.visit(this)}</ph>`;
|
|
542
542
|
}
|
|
543
|
+
visitBlockPlaceholder(ph, context) {
|
|
544
|
+
return `<ph block name="${ph.startName}">${ph.children.map((child) => child.visit(this)).join(", ")}</ph name="${ph.closeName}">`;
|
|
545
|
+
}
|
|
543
546
|
};
|
|
544
547
|
var serializerVisitor = new _SerializerVisitor();
|
|
545
548
|
function serializeNodes(nodes) {
|
|
@@ -744,7 +747,7 @@ function wordAt(bytes, index, endian) {
|
|
|
744
747
|
return word;
|
|
745
748
|
}
|
|
746
749
|
|
|
747
|
-
// bazel-out/
|
|
750
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
748
751
|
var TypeModifier;
|
|
749
752
|
(function(TypeModifier2) {
|
|
750
753
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1699,7 +1702,7 @@ function serializeTags(tags) {
|
|
|
1699
1702
|
return out;
|
|
1700
1703
|
}
|
|
1701
1704
|
|
|
1702
|
-
// bazel-out/
|
|
1705
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1703
1706
|
var CONSTANT_PREFIX = "_c";
|
|
1704
1707
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1705
1708
|
var KEY_CONTEXT = {};
|
|
@@ -1882,7 +1885,7 @@ function isLongStringLiteral(expr) {
|
|
|
1882
1885
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1883
1886
|
}
|
|
1884
1887
|
|
|
1885
|
-
// bazel-out/
|
|
1888
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1886
1889
|
var CORE = "@angular/core";
|
|
1887
1890
|
var _Identifiers = class {
|
|
1888
1891
|
};
|
|
@@ -2515,7 +2518,7 @@ var Identifiers = _Identifiers;
|
|
|
2515
2518
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2516
2519
|
})();
|
|
2517
2520
|
|
|
2518
|
-
// bazel-out/
|
|
2521
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2519
2522
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2520
2523
|
function dashCaseToCamelCase(input) {
|
|
2521
2524
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2603,7 +2606,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2603
2606
|
return [truthy, falsy];
|
|
2604
2607
|
}
|
|
2605
2608
|
|
|
2606
|
-
// bazel-out/
|
|
2609
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2607
2610
|
var VERSION = 3;
|
|
2608
2611
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2609
2612
|
var SourceMapGenerator = class {
|
|
@@ -2732,7 +2735,7 @@ function toBase64Digit(value) {
|
|
|
2732
2735
|
return B64_DIGITS[value];
|
|
2733
2736
|
}
|
|
2734
2737
|
|
|
2735
|
-
// bazel-out/
|
|
2738
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2736
2739
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2737
2740
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2738
2741
|
var _INDENT_WITH = " ";
|
|
@@ -3217,7 +3220,7 @@ function _createIndent(count) {
|
|
|
3217
3220
|
return res;
|
|
3218
3221
|
}
|
|
3219
3222
|
|
|
3220
|
-
// bazel-out/
|
|
3223
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3221
3224
|
function typeWithParameters(type, numParams) {
|
|
3222
3225
|
if (numParams === 0) {
|
|
3223
3226
|
return expressionType(type);
|
|
@@ -3282,7 +3285,7 @@ function generateForwardRef(expr) {
|
|
|
3282
3285
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3283
3286
|
}
|
|
3284
3287
|
|
|
3285
|
-
// bazel-out/
|
|
3288
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3286
3289
|
var R3FactoryDelegateType;
|
|
3287
3290
|
(function(R3FactoryDelegateType2) {
|
|
3288
3291
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3427,7 +3430,7 @@ function getInjectFn(target) {
|
|
|
3427
3430
|
}
|
|
3428
3431
|
}
|
|
3429
3432
|
|
|
3430
|
-
// bazel-out/
|
|
3433
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3431
3434
|
var Comment = class {
|
|
3432
3435
|
constructor(value, sourceSpan) {
|
|
3433
3436
|
this.value = value;
|
|
@@ -3585,43 +3588,47 @@ var BlockNode = class {
|
|
|
3585
3588
|
}
|
|
3586
3589
|
};
|
|
3587
3590
|
var DeferredBlockPlaceholder = class extends BlockNode {
|
|
3588
|
-
constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3591
|
+
constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
3589
3592
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3590
3593
|
this.children = children;
|
|
3591
3594
|
this.minimumTime = minimumTime;
|
|
3595
|
+
this.i18n = i18n2;
|
|
3592
3596
|
}
|
|
3593
3597
|
visit(visitor) {
|
|
3594
3598
|
return visitor.visitDeferredBlockPlaceholder(this);
|
|
3595
3599
|
}
|
|
3596
3600
|
};
|
|
3597
3601
|
var DeferredBlockLoading = class extends BlockNode {
|
|
3598
|
-
constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3602
|
+
constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
3599
3603
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3600
3604
|
this.children = children;
|
|
3601
3605
|
this.afterTime = afterTime;
|
|
3602
3606
|
this.minimumTime = minimumTime;
|
|
3607
|
+
this.i18n = i18n2;
|
|
3603
3608
|
}
|
|
3604
3609
|
visit(visitor) {
|
|
3605
3610
|
return visitor.visitDeferredBlockLoading(this);
|
|
3606
3611
|
}
|
|
3607
3612
|
};
|
|
3608
3613
|
var DeferredBlockError = class extends BlockNode {
|
|
3609
|
-
constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3614
|
+
constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
3610
3615
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3611
3616
|
this.children = children;
|
|
3617
|
+
this.i18n = i18n2;
|
|
3612
3618
|
}
|
|
3613
3619
|
visit(visitor) {
|
|
3614
3620
|
return visitor.visitDeferredBlockError(this);
|
|
3615
3621
|
}
|
|
3616
3622
|
};
|
|
3617
3623
|
var DeferredBlock = class extends BlockNode {
|
|
3618
|
-
constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan) {
|
|
3624
|
+
constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
3619
3625
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3620
3626
|
this.children = children;
|
|
3621
3627
|
this.placeholder = placeholder;
|
|
3622
3628
|
this.loading = loading;
|
|
3623
3629
|
this.error = error2;
|
|
3624
3630
|
this.mainBlockSpan = mainBlockSpan;
|
|
3631
|
+
this.i18n = i18n2;
|
|
3625
3632
|
this.triggers = triggers;
|
|
3626
3633
|
this.prefetchTriggers = prefetchTriggers;
|
|
3627
3634
|
this.definedTriggers = Object.keys(triggers);
|
|
@@ -3642,10 +3649,10 @@ var DeferredBlock = class extends BlockNode {
|
|
|
3642
3649
|
}
|
|
3643
3650
|
};
|
|
3644
3651
|
var SwitchBlock = class extends BlockNode {
|
|
3645
|
-
constructor(expression,
|
|
3652
|
+
constructor(expression, cases2, unknownBlocks, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3646
3653
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3647
3654
|
this.expression = expression;
|
|
3648
|
-
this.cases =
|
|
3655
|
+
this.cases = cases2;
|
|
3649
3656
|
this.unknownBlocks = unknownBlocks;
|
|
3650
3657
|
}
|
|
3651
3658
|
visit(visitor) {
|
|
@@ -3653,17 +3660,18 @@ var SwitchBlock = class extends BlockNode {
|
|
|
3653
3660
|
}
|
|
3654
3661
|
};
|
|
3655
3662
|
var SwitchBlockCase = class extends BlockNode {
|
|
3656
|
-
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3663
|
+
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
3657
3664
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3658
3665
|
this.expression = expression;
|
|
3659
3666
|
this.children = children;
|
|
3667
|
+
this.i18n = i18n2;
|
|
3660
3668
|
}
|
|
3661
3669
|
visit(visitor) {
|
|
3662
3670
|
return visitor.visitSwitchBlockCase(this);
|
|
3663
3671
|
}
|
|
3664
3672
|
};
|
|
3665
3673
|
var ForLoopBlock = class extends BlockNode {
|
|
3666
|
-
constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3674
|
+
constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
3667
3675
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3668
3676
|
this.item = item;
|
|
3669
3677
|
this.expression = expression;
|
|
@@ -3673,15 +3681,17 @@ var ForLoopBlock = class extends BlockNode {
|
|
|
3673
3681
|
this.children = children;
|
|
3674
3682
|
this.empty = empty;
|
|
3675
3683
|
this.mainBlockSpan = mainBlockSpan;
|
|
3684
|
+
this.i18n = i18n2;
|
|
3676
3685
|
}
|
|
3677
3686
|
visit(visitor) {
|
|
3678
3687
|
return visitor.visitForLoopBlock(this);
|
|
3679
3688
|
}
|
|
3680
3689
|
};
|
|
3681
3690
|
var ForLoopBlockEmpty = class extends BlockNode {
|
|
3682
|
-
constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3691
|
+
constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
3683
3692
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3684
3693
|
this.children = children;
|
|
3694
|
+
this.i18n = i18n2;
|
|
3685
3695
|
}
|
|
3686
3696
|
visit(visitor) {
|
|
3687
3697
|
return visitor.visitForLoopBlockEmpty(this);
|
|
@@ -3697,11 +3707,12 @@ var IfBlock = class extends BlockNode {
|
|
|
3697
3707
|
}
|
|
3698
3708
|
};
|
|
3699
3709
|
var IfBlockBranch = class extends BlockNode {
|
|
3700
|
-
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3710
|
+
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
3701
3711
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3702
3712
|
this.expression = expression;
|
|
3703
3713
|
this.children = children;
|
|
3704
3714
|
this.expressionAlias = expressionAlias;
|
|
3715
|
+
this.i18n = i18n2;
|
|
3705
3716
|
}
|
|
3706
3717
|
visit(visitor) {
|
|
3707
3718
|
return visitor.visitIfBlockBranch(this);
|
|
@@ -3800,7 +3811,7 @@ function visitAll(visitor, nodes) {
|
|
|
3800
3811
|
return result;
|
|
3801
3812
|
}
|
|
3802
3813
|
|
|
3803
|
-
// bazel-out/
|
|
3814
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3804
3815
|
var Message = class {
|
|
3805
3816
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3806
3817
|
this.nodes = nodes;
|
|
@@ -3844,10 +3855,10 @@ var Container = class {
|
|
|
3844
3855
|
}
|
|
3845
3856
|
};
|
|
3846
3857
|
var Icu2 = class {
|
|
3847
|
-
constructor(expression, type,
|
|
3858
|
+
constructor(expression, type, cases2, sourceSpan, expressionPlaceholder) {
|
|
3848
3859
|
this.expression = expression;
|
|
3849
3860
|
this.type = type;
|
|
3850
|
-
this.cases =
|
|
3861
|
+
this.cases = cases2;
|
|
3851
3862
|
this.sourceSpan = sourceSpan;
|
|
3852
3863
|
this.expressionPlaceholder = expressionPlaceholder;
|
|
3853
3864
|
}
|
|
@@ -3891,6 +3902,21 @@ var IcuPlaceholder = class {
|
|
|
3891
3902
|
return visitor.visitIcuPlaceholder(this, context);
|
|
3892
3903
|
}
|
|
3893
3904
|
};
|
|
3905
|
+
var BlockPlaceholder = class {
|
|
3906
|
+
constructor(name, parameters, startName, closeName, children, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3907
|
+
this.name = name;
|
|
3908
|
+
this.parameters = parameters;
|
|
3909
|
+
this.startName = startName;
|
|
3910
|
+
this.closeName = closeName;
|
|
3911
|
+
this.children = children;
|
|
3912
|
+
this.sourceSpan = sourceSpan;
|
|
3913
|
+
this.startSourceSpan = startSourceSpan;
|
|
3914
|
+
this.endSourceSpan = endSourceSpan;
|
|
3915
|
+
}
|
|
3916
|
+
visit(visitor, context) {
|
|
3917
|
+
return visitor.visitBlockPlaceholder(this, context);
|
|
3918
|
+
}
|
|
3919
|
+
};
|
|
3894
3920
|
var RecurseVisitor = class {
|
|
3895
3921
|
visitText(text2, context) {
|
|
3896
3922
|
}
|
|
@@ -3909,6 +3935,9 @@ var RecurseVisitor = class {
|
|
|
3909
3935
|
}
|
|
3910
3936
|
visitIcuPlaceholder(ph, context) {
|
|
3911
3937
|
}
|
|
3938
|
+
visitBlockPlaceholder(ph, context) {
|
|
3939
|
+
ph.children.forEach((child) => child.visit(this));
|
|
3940
|
+
}
|
|
3912
3941
|
};
|
|
3913
3942
|
function serializeMessage(messageNodes) {
|
|
3914
3943
|
const visitor = new LocalizeMessageStringVisitor();
|
|
@@ -3936,9 +3965,13 @@ var LocalizeMessageStringVisitor = class {
|
|
|
3936
3965
|
visitIcuPlaceholder(ph) {
|
|
3937
3966
|
return `{$${ph.name}}`;
|
|
3938
3967
|
}
|
|
3968
|
+
visitBlockPlaceholder(ph) {
|
|
3969
|
+
const children = ph.children.map((child) => child.visit(this)).join("");
|
|
3970
|
+
return `{$${ph.startName}}${children}{$${ph.closeName}}`;
|
|
3971
|
+
}
|
|
3939
3972
|
};
|
|
3940
3973
|
|
|
3941
|
-
// bazel-out/
|
|
3974
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
3942
3975
|
var _Visitor = class {
|
|
3943
3976
|
visitTag(tag) {
|
|
3944
3977
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -3966,12 +3999,12 @@ ${doctype.dtd}
|
|
|
3966
3999
|
};
|
|
3967
4000
|
var _visitor = new _Visitor();
|
|
3968
4001
|
|
|
3969
|
-
// bazel-out/
|
|
4002
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
3970
4003
|
function toPublicName(internalName) {
|
|
3971
4004
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
3972
4005
|
}
|
|
3973
4006
|
|
|
3974
|
-
// bazel-out/
|
|
4007
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
3975
4008
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
3976
4009
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
3977
4010
|
var I18N_ATTR = "i18n";
|
|
@@ -4073,7 +4106,7 @@ function declareI18nVariable(variable2) {
|
|
|
4073
4106
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4074
4107
|
}
|
|
4075
4108
|
|
|
4076
|
-
// bazel-out/
|
|
4109
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4077
4110
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4078
4111
|
var TEMPORARY_NAME = "_t";
|
|
4079
4112
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4296,7 +4329,7 @@ function getInstructionStatements(instructions) {
|
|
|
4296
4329
|
return statements;
|
|
4297
4330
|
}
|
|
4298
4331
|
|
|
4299
|
-
// bazel-out/
|
|
4332
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4300
4333
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4301
4334
|
let result = null;
|
|
4302
4335
|
const factoryMeta = {
|
|
@@ -4381,7 +4414,7 @@ function createFactoryFunction(type) {
|
|
|
4381
4414
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4382
4415
|
}
|
|
4383
4416
|
|
|
4384
|
-
// bazel-out/
|
|
4417
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4385
4418
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4386
4419
|
/^\s*$/,
|
|
4387
4420
|
/[<>]/,
|
|
@@ -4403,7 +4436,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4403
4436
|
}
|
|
4404
4437
|
}
|
|
4405
4438
|
|
|
4406
|
-
// bazel-out/
|
|
4439
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4407
4440
|
var InterpolationConfig = class {
|
|
4408
4441
|
static fromArray(markers) {
|
|
4409
4442
|
if (!markers) {
|
|
@@ -4418,8 +4451,9 @@ var InterpolationConfig = class {
|
|
|
4418
4451
|
}
|
|
4419
4452
|
};
|
|
4420
4453
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4454
|
+
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4421
4455
|
|
|
4422
|
-
// bazel-out/
|
|
4456
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4423
4457
|
var $EOF = 0;
|
|
4424
4458
|
var $BSPACE = 8;
|
|
4425
4459
|
var $TAB = 9;
|
|
@@ -4501,7 +4535,7 @@ function isQuote(code) {
|
|
|
4501
4535
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4502
4536
|
}
|
|
4503
4537
|
|
|
4504
|
-
// bazel-out/
|
|
4538
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4505
4539
|
var ParseLocation = class {
|
|
4506
4540
|
constructor(file, offset, line, col) {
|
|
4507
4541
|
this.file = file;
|
|
@@ -4648,7 +4682,7 @@ function sanitizeIdentifier(name) {
|
|
|
4648
4682
|
return name.replace(/\W/g, "_");
|
|
4649
4683
|
}
|
|
4650
4684
|
|
|
4651
|
-
// bazel-out/
|
|
4685
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4652
4686
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4653
4687
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4654
4688
|
constructor() {
|
|
@@ -4741,7 +4775,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4741
4775
|
}
|
|
4742
4776
|
};
|
|
4743
4777
|
|
|
4744
|
-
// bazel-out/
|
|
4778
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4745
4779
|
var policy;
|
|
4746
4780
|
function getPolicy() {
|
|
4747
4781
|
if (policy === void 0) {
|
|
@@ -4779,7 +4813,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4779
4813
|
return fn2.bind(_global);
|
|
4780
4814
|
}
|
|
4781
4815
|
|
|
4782
|
-
// bazel-out/
|
|
4816
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4783
4817
|
var JitEvaluator = class {
|
|
4784
4818
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4785
4819
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4870,7 +4904,7 @@ function isUseStrictStatement(statement) {
|
|
|
4870
4904
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4871
4905
|
}
|
|
4872
4906
|
|
|
4873
|
-
// bazel-out/
|
|
4907
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4874
4908
|
function compileInjector(meta) {
|
|
4875
4909
|
const definitionMap = new DefinitionMap();
|
|
4876
4910
|
if (meta.providers !== null) {
|
|
@@ -4887,7 +4921,7 @@ function createInjectorType(meta) {
|
|
|
4887
4921
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4888
4922
|
}
|
|
4889
4923
|
|
|
4890
|
-
// bazel-out/
|
|
4924
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4891
4925
|
var R3JitReflector = class {
|
|
4892
4926
|
constructor(context) {
|
|
4893
4927
|
this.context = context;
|
|
@@ -4903,7 +4937,7 @@ var R3JitReflector = class {
|
|
|
4903
4937
|
}
|
|
4904
4938
|
};
|
|
4905
4939
|
|
|
4906
|
-
// bazel-out/
|
|
4940
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4907
4941
|
var R3SelectorScopeMode;
|
|
4908
4942
|
(function(R3SelectorScopeMode2) {
|
|
4909
4943
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5044,7 +5078,7 @@ function tupleOfTypes(types) {
|
|
|
5044
5078
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5045
5079
|
}
|
|
5046
5080
|
|
|
5047
|
-
// bazel-out/
|
|
5081
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5048
5082
|
function compilePipeFromMetadata(metadata) {
|
|
5049
5083
|
const definitionMapValues = [];
|
|
5050
5084
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5065,7 +5099,7 @@ function createPipeType(metadata) {
|
|
|
5065
5099
|
]));
|
|
5066
5100
|
}
|
|
5067
5101
|
|
|
5068
|
-
// bazel-out/
|
|
5102
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5069
5103
|
var R3TemplateDependencyKind;
|
|
5070
5104
|
(function(R3TemplateDependencyKind2) {
|
|
5071
5105
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5073,7 +5107,7 @@ var R3TemplateDependencyKind;
|
|
|
5073
5107
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5074
5108
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5075
5109
|
|
|
5076
|
-
// bazel-out/
|
|
5110
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5077
5111
|
var ParserError = class {
|
|
5078
5112
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5079
5113
|
this.input = input;
|
|
@@ -5739,7 +5773,7 @@ var BoundElementProperty = class {
|
|
|
5739
5773
|
}
|
|
5740
5774
|
};
|
|
5741
5775
|
|
|
5742
|
-
// bazel-out/
|
|
5776
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5743
5777
|
var _EventHandlerVars = class {
|
|
5744
5778
|
};
|
|
5745
5779
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6380,7 +6414,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6380
6414
|
}
|
|
6381
6415
|
};
|
|
6382
6416
|
|
|
6383
|
-
// bazel-out/
|
|
6417
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6384
6418
|
var _SECURITY_SCHEMA;
|
|
6385
6419
|
function SECURITY_SCHEMA() {
|
|
6386
6420
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6438,7 +6472,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6438
6472
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6439
6473
|
}
|
|
6440
6474
|
|
|
6441
|
-
// bazel-out/
|
|
6475
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6442
6476
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6443
6477
|
"inherit",
|
|
6444
6478
|
"initial",
|
|
@@ -6909,7 +6943,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6909
6943
|
}
|
|
6910
6944
|
}
|
|
6911
6945
|
|
|
6912
|
-
// bazel-out/
|
|
6946
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6913
6947
|
var OpKind;
|
|
6914
6948
|
(function(OpKind2) {
|
|
6915
6949
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7063,8 +7097,13 @@ var DerivedRepeaterVarIdentity;
|
|
|
7063
7097
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
|
|
7064
7098
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
7065
7099
|
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
7100
|
+
var I18nContextKind;
|
|
7101
|
+
(function(I18nContextKind2) {
|
|
7102
|
+
I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
|
|
7103
|
+
I18nContextKind2[I18nContextKind2["Icu"] = 1] = "Icu";
|
|
7104
|
+
})(I18nContextKind || (I18nContextKind = {}));
|
|
7066
7105
|
|
|
7067
|
-
// bazel-out/
|
|
7106
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7068
7107
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7069
7108
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7070
7109
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7096,7 +7135,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7096
7135
|
return expr[UsesVarOffset] === true;
|
|
7097
7136
|
}
|
|
7098
7137
|
|
|
7099
|
-
// bazel-out/
|
|
7138
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7100
7139
|
function createStatementOp(statement) {
|
|
7101
7140
|
return __spreadValues({
|
|
7102
7141
|
kind: OpKind.Statement,
|
|
@@ -7118,7 +7157,7 @@ var NEW_OP = {
|
|
|
7118
7157
|
next: null
|
|
7119
7158
|
};
|
|
7120
7159
|
|
|
7121
|
-
// bazel-out/
|
|
7160
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7122
7161
|
function createInterpolateTextOp(xref, interpolation, i18nPlaceholders, sourceSpan) {
|
|
7123
7162
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7124
7163
|
kind: OpKind.InterpolateText,
|
|
@@ -7229,13 +7268,13 @@ function createConditionalOp(target, targetSlot, test, conditions, sourceSpan) {
|
|
|
7229
7268
|
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
|
|
7230
7269
|
}
|
|
7231
7270
|
function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
|
|
7232
|
-
return __spreadValues({
|
|
7271
|
+
return __spreadValues(__spreadValues({
|
|
7233
7272
|
kind: OpKind.Repeater,
|
|
7234
7273
|
target: repeaterCreate2,
|
|
7235
7274
|
targetSlot,
|
|
7236
7275
|
collection,
|
|
7237
7276
|
sourceSpan
|
|
7238
|
-
}, NEW_OP);
|
|
7277
|
+
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7239
7278
|
}
|
|
7240
7279
|
function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
|
|
7241
7280
|
return __spreadValues(__spreadValues({
|
|
@@ -7267,7 +7306,7 @@ function createI18nApplyOp(target, handle, sourceSpan) {
|
|
|
7267
7306
|
}, NEW_OP);
|
|
7268
7307
|
}
|
|
7269
7308
|
|
|
7270
|
-
// bazel-out/
|
|
7309
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7271
7310
|
var _a;
|
|
7272
7311
|
var _b;
|
|
7273
7312
|
var _c;
|
|
@@ -8118,7 +8157,7 @@ function isStringLiteral(expr) {
|
|
|
8118
8157
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8119
8158
|
}
|
|
8120
8159
|
|
|
8121
|
-
// bazel-out/
|
|
8160
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8122
8161
|
var _OpList = class {
|
|
8123
8162
|
constructor() {
|
|
8124
8163
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8309,14 +8348,14 @@ var OpList = _OpList;
|
|
|
8309
8348
|
_OpList.nextListId = 0;
|
|
8310
8349
|
})();
|
|
8311
8350
|
|
|
8312
|
-
// bazel-out/
|
|
8351
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8313
8352
|
var SlotHandle = class {
|
|
8314
8353
|
constructor() {
|
|
8315
8354
|
this.slot = null;
|
|
8316
8355
|
}
|
|
8317
8356
|
};
|
|
8318
8357
|
|
|
8319
|
-
// bazel-out/
|
|
8358
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8320
8359
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8321
8360
|
OpKind.Element,
|
|
8322
8361
|
OpKind.ElementStart,
|
|
@@ -8548,9 +8587,10 @@ function createIcuEndOp(xref) {
|
|
|
8548
8587
|
xref
|
|
8549
8588
|
}, NEW_OP);
|
|
8550
8589
|
}
|
|
8551
|
-
function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
8590
|
+
function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
|
|
8552
8591
|
return __spreadValues({
|
|
8553
8592
|
kind: OpKind.I18nContext,
|
|
8593
|
+
contextKind,
|
|
8554
8594
|
xref,
|
|
8555
8595
|
i18nBlock,
|
|
8556
8596
|
message,
|
|
@@ -8560,7 +8600,7 @@ function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
|
8560
8600
|
}, NEW_OP);
|
|
8561
8601
|
}
|
|
8562
8602
|
|
|
8563
|
-
// bazel-out/
|
|
8603
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8564
8604
|
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8565
8605
|
return __spreadValues(__spreadValues({
|
|
8566
8606
|
kind: OpKind.HostProperty,
|
|
@@ -8571,10 +8611,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan)
|
|
|
8571
8611
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8572
8612
|
}
|
|
8573
8613
|
|
|
8574
|
-
// bazel-out/
|
|
8614
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8575
8615
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8576
8616
|
|
|
8577
|
-
// bazel-out/
|
|
8617
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8578
8618
|
var CompilationJobKind;
|
|
8579
8619
|
(function(CompilationJobKind2) {
|
|
8580
8620
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8681,7 +8721,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8681
8721
|
}
|
|
8682
8722
|
};
|
|
8683
8723
|
|
|
8684
|
-
// bazel-out/
|
|
8724
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8685
8725
|
function deleteAnyCasts(job) {
|
|
8686
8726
|
for (const unit of job.units) {
|
|
8687
8727
|
for (const op of unit.ops()) {
|
|
@@ -8699,7 +8739,7 @@ function removeAnys(e) {
|
|
|
8699
8739
|
return e;
|
|
8700
8740
|
}
|
|
8701
8741
|
|
|
8702
|
-
// bazel-out/
|
|
8742
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8703
8743
|
function applyI18nExpressions(job) {
|
|
8704
8744
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8705
8745
|
for (const unit of job.units) {
|
|
@@ -8730,10 +8770,9 @@ function needsApplication(i18nContexts, op) {
|
|
|
8730
8770
|
return false;
|
|
8731
8771
|
}
|
|
8732
8772
|
|
|
8733
|
-
// bazel-out/
|
|
8773
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8734
8774
|
function assignI18nSlotDependencies(job) {
|
|
8735
8775
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8736
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8737
8776
|
let lastSlotConsumer = null;
|
|
8738
8777
|
let currentI18nOp = null;
|
|
8739
8778
|
for (const unit of job.units) {
|
|
@@ -8749,21 +8788,17 @@ function assignI18nSlotDependencies(job) {
|
|
|
8749
8788
|
i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
|
|
8750
8789
|
currentI18nOp = null;
|
|
8751
8790
|
break;
|
|
8752
|
-
case OpKind.I18nContext:
|
|
8753
|
-
i18nContexts.set(op.xref, op);
|
|
8754
|
-
break;
|
|
8755
8791
|
}
|
|
8756
8792
|
}
|
|
8757
8793
|
for (const op of unit.update) {
|
|
8758
8794
|
if (op.kind === OpKind.I18nExpression) {
|
|
8759
|
-
|
|
8760
|
-
op.target = i18nLastSlotConsumers.get(i18nContext.i18nBlock);
|
|
8795
|
+
op.target = i18nLastSlotConsumers.get(op.target);
|
|
8761
8796
|
}
|
|
8762
8797
|
}
|
|
8763
8798
|
}
|
|
8764
8799
|
}
|
|
8765
8800
|
|
|
8766
|
-
// bazel-out/
|
|
8801
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8767
8802
|
function createOpXrefMap(unit) {
|
|
8768
8803
|
const map = /* @__PURE__ */ new Map();
|
|
8769
8804
|
for (const op of unit.create) {
|
|
@@ -8775,7 +8810,7 @@ function createOpXrefMap(unit) {
|
|
|
8775
8810
|
return map;
|
|
8776
8811
|
}
|
|
8777
8812
|
|
|
8778
|
-
// bazel-out/
|
|
8813
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8779
8814
|
function extractAttributes(job) {
|
|
8780
8815
|
for (const unit of job.units) {
|
|
8781
8816
|
const elements = createOpXrefMap(unit);
|
|
@@ -8842,7 +8877,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8842
8877
|
}
|
|
8843
8878
|
}
|
|
8844
8879
|
|
|
8845
|
-
// bazel-out/
|
|
8880
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8846
8881
|
function lookupElement2(elements, xref) {
|
|
8847
8882
|
const el = elements.get(xref);
|
|
8848
8883
|
if (el === void 0) {
|
|
@@ -8892,7 +8927,7 @@ function specializeBindings(job) {
|
|
|
8892
8927
|
}
|
|
8893
8928
|
}
|
|
8894
8929
|
|
|
8895
|
-
// bazel-out/
|
|
8930
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8896
8931
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8897
8932
|
Identifiers.attribute,
|
|
8898
8933
|
Identifiers.classProp,
|
|
@@ -8958,7 +8993,7 @@ function chainOperationsInList(opList) {
|
|
|
8958
8993
|
}
|
|
8959
8994
|
}
|
|
8960
8995
|
|
|
8961
|
-
// bazel-out/
|
|
8996
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
8962
8997
|
function collapseSingletonInterpolations(job) {
|
|
8963
8998
|
for (const unit of job.units) {
|
|
8964
8999
|
for (const op of unit.update) {
|
|
@@ -8970,7 +9005,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
8970
9005
|
}
|
|
8971
9006
|
}
|
|
8972
9007
|
|
|
8973
|
-
// bazel-out/
|
|
9008
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
8974
9009
|
function generateConditionalExpressions(job) {
|
|
8975
9010
|
for (const unit of job.units) {
|
|
8976
9011
|
for (const op of unit.ops()) {
|
|
@@ -9007,7 +9042,7 @@ function generateConditionalExpressions(job) {
|
|
|
9007
9042
|
}
|
|
9008
9043
|
}
|
|
9009
9044
|
|
|
9010
|
-
// bazel-out/
|
|
9045
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
9011
9046
|
var TagContentType;
|
|
9012
9047
|
(function(TagContentType2) {
|
|
9013
9048
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -9040,7 +9075,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
9040
9075
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
9041
9076
|
}
|
|
9042
9077
|
|
|
9043
|
-
// bazel-out/
|
|
9078
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9044
9079
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9045
9080
|
["&&", BinaryOperator.And],
|
|
9046
9081
|
[">", BinaryOperator.Bigger],
|
|
@@ -9090,7 +9125,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9090
9125
|
return literal(value);
|
|
9091
9126
|
}
|
|
9092
9127
|
|
|
9093
|
-
// bazel-out/
|
|
9128
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9094
9129
|
function collectElementConsts(job) {
|
|
9095
9130
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9096
9131
|
for (const unit of job.units) {
|
|
@@ -9224,7 +9259,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9224
9259
|
return literalArr(attrArray);
|
|
9225
9260
|
}
|
|
9226
9261
|
|
|
9227
|
-
// bazel-out/
|
|
9262
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9228
9263
|
function createDeferDepsFns(job) {
|
|
9229
9264
|
for (const unit of job.units) {
|
|
9230
9265
|
for (const op of unit.create) {
|
|
@@ -9252,18 +9287,22 @@ function createDeferDepsFns(job) {
|
|
|
9252
9287
|
}
|
|
9253
9288
|
}
|
|
9254
9289
|
|
|
9255
|
-
// bazel-out/
|
|
9290
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9256
9291
|
function createI18nContexts(job) {
|
|
9292
|
+
const rootContexts = /* @__PURE__ */ new Map();
|
|
9257
9293
|
let currentI18nOp = null;
|
|
9258
9294
|
let xref;
|
|
9259
9295
|
for (const unit of job.units) {
|
|
9260
9296
|
for (const op of unit.create) {
|
|
9261
9297
|
switch (op.kind) {
|
|
9262
9298
|
case OpKind.I18nStart:
|
|
9263
|
-
xref = job.allocateXrefId();
|
|
9264
|
-
unit.create.push(createI18nContextOp(xref, op.xref, op.message, null));
|
|
9265
|
-
op.context = xref;
|
|
9266
9299
|
currentI18nOp = op;
|
|
9300
|
+
if (op.xref === op.root) {
|
|
9301
|
+
xref = job.allocateXrefId();
|
|
9302
|
+
unit.create.push(createI18nContextOp(I18nContextKind.RootI18n, xref, op.xref, op.message, null));
|
|
9303
|
+
op.context = xref;
|
|
9304
|
+
rootContexts.set(op.xref, xref);
|
|
9305
|
+
}
|
|
9267
9306
|
break;
|
|
9268
9307
|
case OpKind.I18nEnd:
|
|
9269
9308
|
currentI18nOp = null;
|
|
@@ -9274,7 +9313,7 @@ function createI18nContexts(job) {
|
|
|
9274
9313
|
}
|
|
9275
9314
|
if (op.message.id !== currentI18nOp.message.id) {
|
|
9276
9315
|
xref = job.allocateXrefId();
|
|
9277
|
-
unit.create.push(createI18nContextOp(xref, currentI18nOp.xref, op.message, null));
|
|
9316
|
+
unit.create.push(createI18nContextOp(I18nContextKind.Icu, xref, currentI18nOp.xref, op.message, null));
|
|
9278
9317
|
op.context = xref;
|
|
9279
9318
|
} else {
|
|
9280
9319
|
op.context = currentI18nOp.context;
|
|
@@ -9283,9 +9322,16 @@ function createI18nContexts(job) {
|
|
|
9283
9322
|
}
|
|
9284
9323
|
}
|
|
9285
9324
|
}
|
|
9325
|
+
for (const unit of job.units) {
|
|
9326
|
+
for (const op of unit.create) {
|
|
9327
|
+
if (op.kind === OpKind.I18nStart && op.xref !== op.root) {
|
|
9328
|
+
op.context = rootContexts.get(op.root);
|
|
9329
|
+
}
|
|
9330
|
+
}
|
|
9331
|
+
}
|
|
9286
9332
|
}
|
|
9287
9333
|
|
|
9288
|
-
// bazel-out/
|
|
9334
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9289
9335
|
function configureDeferInstructions(job) {
|
|
9290
9336
|
for (const unit of job.units) {
|
|
9291
9337
|
for (const op of unit.create) {
|
|
@@ -9302,7 +9348,7 @@ function configureDeferInstructions(job) {
|
|
|
9302
9348
|
}
|
|
9303
9349
|
}
|
|
9304
9350
|
|
|
9305
|
-
// bazel-out/
|
|
9351
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9306
9352
|
function resolveDeferTargetNames(job) {
|
|
9307
9353
|
const scopes = /* @__PURE__ */ new Map();
|
|
9308
9354
|
function getScopeForView2(view) {
|
|
@@ -9396,7 +9442,7 @@ var Scope = class {
|
|
|
9396
9442
|
}
|
|
9397
9443
|
};
|
|
9398
9444
|
|
|
9399
|
-
// bazel-out/
|
|
9445
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9400
9446
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9401
9447
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9402
9448
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9423,7 +9469,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9423
9469
|
}
|
|
9424
9470
|
}
|
|
9425
9471
|
|
|
9426
|
-
// bazel-out/
|
|
9472
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9427
9473
|
function expandSafeReads(job) {
|
|
9428
9474
|
for (const unit of job.units) {
|
|
9429
9475
|
for (const op of unit.ops()) {
|
|
@@ -9559,7 +9605,7 @@ function ternaryTransform(e) {
|
|
|
9559
9605
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9560
9606
|
}
|
|
9561
9607
|
|
|
9562
|
-
// bazel-out/
|
|
9608
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9563
9609
|
var ESCAPE = "\uFFFD";
|
|
9564
9610
|
var ELEMENT_MARKER = "#";
|
|
9565
9611
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9570,7 +9616,7 @@ var LIST_END_MARKER = "]";
|
|
|
9570
9616
|
var LIST_DELIMITER = "|";
|
|
9571
9617
|
function extractI18nMessages(job) {
|
|
9572
9618
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
9573
|
-
const
|
|
9619
|
+
const i18nBlocks = /* @__PURE__ */ new Map();
|
|
9574
9620
|
for (const unit of job.units) {
|
|
9575
9621
|
for (const op of unit.create) {
|
|
9576
9622
|
switch (op.kind) {
|
|
@@ -9578,7 +9624,7 @@ function extractI18nMessages(job) {
|
|
|
9578
9624
|
i18nContexts.set(op.xref, op);
|
|
9579
9625
|
break;
|
|
9580
9626
|
case OpKind.I18nStart:
|
|
9581
|
-
|
|
9627
|
+
i18nBlocks.set(op.xref, op);
|
|
9582
9628
|
break;
|
|
9583
9629
|
}
|
|
9584
9630
|
}
|
|
@@ -9603,11 +9649,12 @@ function extractI18nMessages(job) {
|
|
|
9603
9649
|
if (!op.context) {
|
|
9604
9650
|
throw Error("ICU op should have its context set.");
|
|
9605
9651
|
}
|
|
9606
|
-
|
|
9607
|
-
|
|
9652
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
9653
|
+
if (i18nContext.contextKind === I18nContextKind.Icu) {
|
|
9608
9654
|
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
9609
9655
|
unit.create.push(subMessage);
|
|
9610
|
-
const
|
|
9656
|
+
const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
|
|
9657
|
+
const parentMessage = i18nBlockMessages.get(rootI18nId);
|
|
9611
9658
|
parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
|
|
9612
9659
|
}
|
|
9613
9660
|
OpList.remove(op);
|
|
@@ -9620,30 +9667,67 @@ function extractI18nMessages(job) {
|
|
|
9620
9667
|
}
|
|
9621
9668
|
}
|
|
9622
9669
|
function createI18nMessage(job, context, messagePlaceholder) {
|
|
9623
|
-
let needsPostprocessing = context.
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
}
|
|
9628
|
-
}
|
|
9629
|
-
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formatParams(context.params), formatParams(context.postprocessingParams), needsPostprocessing);
|
|
9670
|
+
let [formattedParams, needsPostprocessing] = formatParams(context.params);
|
|
9671
|
+
const [formattedPostprocessingParams] = formatParams(context.postprocessingParams);
|
|
9672
|
+
needsPostprocessing || (needsPostprocessing = formattedPostprocessingParams.size > 0);
|
|
9673
|
+
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
|
|
9630
9674
|
}
|
|
9631
9675
|
function formatParams(params) {
|
|
9632
|
-
const
|
|
9676
|
+
const formattedParams = /* @__PURE__ */ new Map();
|
|
9677
|
+
let needsPostprocessing = false;
|
|
9633
9678
|
for (const [placeholder, placeholderValues] of params) {
|
|
9634
|
-
const serializedValues = formatParamValues(placeholderValues);
|
|
9679
|
+
const [serializedValues, paramNeedsPostprocessing] = formatParamValues(placeholderValues);
|
|
9680
|
+
needsPostprocessing || (needsPostprocessing = paramNeedsPostprocessing);
|
|
9635
9681
|
if (serializedValues !== null) {
|
|
9636
|
-
|
|
9682
|
+
formattedParams.set(placeholder, literal(serializedValues));
|
|
9637
9683
|
}
|
|
9638
9684
|
}
|
|
9639
|
-
return
|
|
9685
|
+
return [formattedParams, needsPostprocessing];
|
|
9640
9686
|
}
|
|
9641
9687
|
function formatParamValues(values) {
|
|
9642
9688
|
if (values.length === 0) {
|
|
9643
|
-
return null;
|
|
9689
|
+
return [null, false];
|
|
9644
9690
|
}
|
|
9691
|
+
collapseElementTemplatePairs(values);
|
|
9645
9692
|
const serializedValues = values.map((value) => formatValue(value));
|
|
9646
|
-
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}
|
|
9693
|
+
return serializedValues.length === 1 ? [serializedValues[0], false] : [`${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`, true];
|
|
9694
|
+
}
|
|
9695
|
+
function collapseElementTemplatePairs(values) {
|
|
9696
|
+
var _a2;
|
|
9697
|
+
const valueIndiciesBySubTemplateIndex = /* @__PURE__ */ new Map();
|
|
9698
|
+
for (let i = 0; i < values.length; i++) {
|
|
9699
|
+
const value = values[i];
|
|
9700
|
+
if (value.subTemplateIndex !== null && value.flags & (I18nParamValueFlags.ElementTag | I18nParamValueFlags.TemplateTag)) {
|
|
9701
|
+
const valueIndicies = (_a2 = valueIndiciesBySubTemplateIndex.get(value.subTemplateIndex)) != null ? _a2 : [];
|
|
9702
|
+
valueIndicies.push(i);
|
|
9703
|
+
valueIndiciesBySubTemplateIndex.set(value.subTemplateIndex, valueIndicies);
|
|
9704
|
+
}
|
|
9705
|
+
}
|
|
9706
|
+
for (const [subTemplateIndex, valueIndicies] of valueIndiciesBySubTemplateIndex) {
|
|
9707
|
+
if (valueIndicies.length > 1) {
|
|
9708
|
+
const elementIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.ElementTag);
|
|
9709
|
+
const templateIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.TemplateTag);
|
|
9710
|
+
if (elementIndex !== void 0 && templateIndex !== void 0) {
|
|
9711
|
+
const elementValue = values[elementIndex];
|
|
9712
|
+
const templateValue = values[templateIndex];
|
|
9713
|
+
let compundValue;
|
|
9714
|
+
if (elementValue.flags & I18nParamValueFlags.OpenTag && elementValue.flags & I18nParamValueFlags.CloseTag) {
|
|
9715
|
+
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9716
|
+
} else if (elementValue.flags & I18nParamValueFlags.OpenTag) {
|
|
9717
|
+
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}`;
|
|
9718
|
+
} else {
|
|
9719
|
+
compundValue = `${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9720
|
+
}
|
|
9721
|
+
values.splice(elementIndex, 1, { value: compundValue, subTemplateIndex, flags: I18nParamValueFlags.None });
|
|
9722
|
+
values.splice(templateIndex, 1, null);
|
|
9723
|
+
}
|
|
9724
|
+
}
|
|
9725
|
+
}
|
|
9726
|
+
for (let i = values.length - 1; i >= 0; i--) {
|
|
9727
|
+
if (values[i] === null) {
|
|
9728
|
+
values.splice(i, 1);
|
|
9729
|
+
}
|
|
9730
|
+
}
|
|
9647
9731
|
}
|
|
9648
9732
|
function formatValue(value) {
|
|
9649
9733
|
if (value.flags === I18nParamValueFlags.None) {
|
|
@@ -9666,7 +9750,7 @@ function formatValue(value) {
|
|
|
9666
9750
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9667
9751
|
}
|
|
9668
9752
|
|
|
9669
|
-
// bazel-out/
|
|
9753
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9670
9754
|
function generateAdvance(job) {
|
|
9671
9755
|
for (const unit of job.units) {
|
|
9672
9756
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9698,7 +9782,7 @@ function generateAdvance(job) {
|
|
|
9698
9782
|
}
|
|
9699
9783
|
}
|
|
9700
9784
|
|
|
9701
|
-
// bazel-out/
|
|
9785
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9702
9786
|
function generateProjectionDefs(job) {
|
|
9703
9787
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9704
9788
|
const selectors = [];
|
|
@@ -9722,7 +9806,7 @@ function generateProjectionDefs(job) {
|
|
|
9722
9806
|
}
|
|
9723
9807
|
}
|
|
9724
9808
|
|
|
9725
|
-
// bazel-out/
|
|
9809
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9726
9810
|
function generateVariables(job) {
|
|
9727
9811
|
recursivelyProcessView(job.root, null);
|
|
9728
9812
|
}
|
|
@@ -9810,7 +9894,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9810
9894
|
return newOps;
|
|
9811
9895
|
}
|
|
9812
9896
|
|
|
9813
|
-
// bazel-out/
|
|
9897
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9814
9898
|
function collectConstExpressions(job) {
|
|
9815
9899
|
for (const unit of job.units) {
|
|
9816
9900
|
for (const op of unit.ops()) {
|
|
@@ -9824,7 +9908,7 @@ function collectConstExpressions(job) {
|
|
|
9824
9908
|
}
|
|
9825
9909
|
}
|
|
9826
9910
|
|
|
9827
|
-
// bazel-out/
|
|
9911
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9828
9912
|
var STYLE_DOT = "style.";
|
|
9829
9913
|
var CLASS_DOT = "class.";
|
|
9830
9914
|
var STYLE_BANG = "style!";
|
|
@@ -9882,7 +9966,7 @@ function parseProperty(name) {
|
|
|
9882
9966
|
return { property: property2, suffix };
|
|
9883
9967
|
}
|
|
9884
9968
|
|
|
9885
|
-
// bazel-out/
|
|
9969
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9886
9970
|
function mapLiteral(obj, quoted = false) {
|
|
9887
9971
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9888
9972
|
key,
|
|
@@ -9891,7 +9975,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9891
9975
|
})));
|
|
9892
9976
|
}
|
|
9893
9977
|
|
|
9894
|
-
// bazel-out/
|
|
9978
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9895
9979
|
var IcuSerializerVisitor = class {
|
|
9896
9980
|
visitText(text2) {
|
|
9897
9981
|
return text2.value;
|
|
@@ -9910,6 +9994,9 @@ var IcuSerializerVisitor = class {
|
|
|
9910
9994
|
visitPlaceholder(ph) {
|
|
9911
9995
|
return this.formatPh(ph.name);
|
|
9912
9996
|
}
|
|
9997
|
+
visitBlockPlaceholder(ph) {
|
|
9998
|
+
return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join("")}${this.formatPh(ph.closeName)}`;
|
|
9999
|
+
}
|
|
9913
10000
|
visitIcuPlaceholder(ph, context) {
|
|
9914
10001
|
return this.formatPh(ph.name);
|
|
9915
10002
|
}
|
|
@@ -9922,7 +10009,7 @@ function serializeIcuNode(icu) {
|
|
|
9922
10009
|
return icu.visit(serializer);
|
|
9923
10010
|
}
|
|
9924
10011
|
|
|
9925
|
-
// bazel-out/
|
|
10012
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9926
10013
|
var TokenType;
|
|
9927
10014
|
(function(TokenType2) {
|
|
9928
10015
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10283,7 +10370,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10283
10370
|
return result;
|
|
10284
10371
|
}
|
|
10285
10372
|
|
|
10286
|
-
// bazel-out/
|
|
10373
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10287
10374
|
var SplitInterpolation = class {
|
|
10288
10375
|
constructor(strings, expressions, offsets) {
|
|
10289
10376
|
this.strings = strings;
|
|
@@ -11177,7 +11264,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11177
11264
|
return offsetMap;
|
|
11178
11265
|
}
|
|
11179
11266
|
|
|
11180
|
-
// bazel-out/
|
|
11267
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11181
11268
|
var NodeWithI18n = class {
|
|
11182
11269
|
constructor(sourceSpan, i18n2) {
|
|
11183
11270
|
this.sourceSpan = sourceSpan;
|
|
@@ -11195,11 +11282,11 @@ var Text4 = class extends NodeWithI18n {
|
|
|
11195
11282
|
}
|
|
11196
11283
|
};
|
|
11197
11284
|
var Expansion = class extends NodeWithI18n {
|
|
11198
|
-
constructor(switchValue, type,
|
|
11285
|
+
constructor(switchValue, type, cases2, sourceSpan, switchValueSourceSpan, i18n2) {
|
|
11199
11286
|
super(sourceSpan, i18n2);
|
|
11200
11287
|
this.switchValue = switchValue;
|
|
11201
11288
|
this.type = type;
|
|
11202
|
-
this.cases =
|
|
11289
|
+
this.cases = cases2;
|
|
11203
11290
|
this.switchValueSourceSpan = switchValueSourceSpan;
|
|
11204
11291
|
}
|
|
11205
11292
|
visit(visitor, context) {
|
|
@@ -11253,12 +11340,12 @@ var Comment2 = class {
|
|
|
11253
11340
|
return visitor.visitComment(this, context);
|
|
11254
11341
|
}
|
|
11255
11342
|
};
|
|
11256
|
-
var Block = class {
|
|
11257
|
-
constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null) {
|
|
11343
|
+
var Block = class extends NodeWithI18n {
|
|
11344
|
+
constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null, i18n2) {
|
|
11345
|
+
super(sourceSpan, i18n2);
|
|
11258
11346
|
this.name = name;
|
|
11259
11347
|
this.parameters = parameters;
|
|
11260
11348
|
this.children = children;
|
|
11261
|
-
this.sourceSpan = sourceSpan;
|
|
11262
11349
|
this.nameSpan = nameSpan;
|
|
11263
11350
|
this.startSourceSpan = startSourceSpan;
|
|
11264
11351
|
this.endSourceSpan = endSourceSpan;
|
|
@@ -11329,11 +11416,11 @@ var RecursiveVisitor = class {
|
|
|
11329
11416
|
}
|
|
11330
11417
|
};
|
|
11331
11418
|
|
|
11332
|
-
// bazel-out/
|
|
11419
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11333
11420
|
var ElementSchemaRegistry = class {
|
|
11334
11421
|
};
|
|
11335
11422
|
|
|
11336
|
-
// bazel-out/
|
|
11423
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11337
11424
|
var BOOLEAN = "boolean";
|
|
11338
11425
|
var NUMBER = "number";
|
|
11339
11426
|
var STRING = "string";
|
|
@@ -11686,7 +11773,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11686
11773
|
}
|
|
11687
11774
|
}
|
|
11688
11775
|
|
|
11689
|
-
// bazel-out/
|
|
11776
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11690
11777
|
var HtmlTagDefinition = class {
|
|
11691
11778
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11692
11779
|
this.closedByChildren = {};
|
|
@@ -11804,7 +11891,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11804
11891
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11805
11892
|
}
|
|
11806
11893
|
|
|
11807
|
-
// bazel-out/
|
|
11894
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11808
11895
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11809
11896
|
"A": "LINK",
|
|
11810
11897
|
"B": "BOLD_TEXT",
|
|
@@ -11877,6 +11964,24 @@ var PlaceholderRegistry = class {
|
|
|
11877
11964
|
getUniquePlaceholder(name) {
|
|
11878
11965
|
return this._generateUniqueName(name.toUpperCase());
|
|
11879
11966
|
}
|
|
11967
|
+
getStartBlockPlaceholderName(name, parameters) {
|
|
11968
|
+
const signature = this._hashBlock(name, parameters);
|
|
11969
|
+
if (this._signatureToName[signature]) {
|
|
11970
|
+
return this._signatureToName[signature];
|
|
11971
|
+
}
|
|
11972
|
+
const placeholder = this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(name)}`);
|
|
11973
|
+
this._signatureToName[signature] = placeholder;
|
|
11974
|
+
return placeholder;
|
|
11975
|
+
}
|
|
11976
|
+
getCloseBlockPlaceholderName(name) {
|
|
11977
|
+
const signature = this._hashClosingBlock(name);
|
|
11978
|
+
if (this._signatureToName[signature]) {
|
|
11979
|
+
return this._signatureToName[signature];
|
|
11980
|
+
}
|
|
11981
|
+
const placeholder = this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(name)}`);
|
|
11982
|
+
this._signatureToName[signature] = placeholder;
|
|
11983
|
+
return placeholder;
|
|
11984
|
+
}
|
|
11880
11985
|
_hashTag(tag, attrs, isVoid) {
|
|
11881
11986
|
const start = `<${tag}`;
|
|
11882
11987
|
const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join("");
|
|
@@ -11886,6 +11991,16 @@ var PlaceholderRegistry = class {
|
|
|
11886
11991
|
_hashClosingTag(tag) {
|
|
11887
11992
|
return this._hashTag(`/${tag}`, {}, false);
|
|
11888
11993
|
}
|
|
11994
|
+
_hashBlock(name, parameters) {
|
|
11995
|
+
const params = parameters.length === 0 ? "" : ` (${parameters.sort().join("; ")})`;
|
|
11996
|
+
return `@${name}${params} {}`;
|
|
11997
|
+
}
|
|
11998
|
+
_hashClosingBlock(name) {
|
|
11999
|
+
return this._hashBlock(`close_${name}`, []);
|
|
12000
|
+
}
|
|
12001
|
+
_toSnakeCase(name) {
|
|
12002
|
+
return name.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
12003
|
+
}
|
|
11889
12004
|
_generateUniqueName(base) {
|
|
11890
12005
|
const seen = this._placeHolderNameCounts.hasOwnProperty(base);
|
|
11891
12006
|
if (!seen) {
|
|
@@ -11898,19 +12013,20 @@ var PlaceholderRegistry = class {
|
|
|
11898
12013
|
}
|
|
11899
12014
|
};
|
|
11900
12015
|
|
|
11901
|
-
// bazel-out/
|
|
12016
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11902
12017
|
var _expParser = new Parser(new Lexer());
|
|
11903
|
-
function createI18nMessageFactory(interpolationConfig) {
|
|
11904
|
-
const visitor = new _I18nVisitor(_expParser, interpolationConfig);
|
|
12018
|
+
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12019
|
+
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
11905
12020
|
return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);
|
|
11906
12021
|
}
|
|
11907
12022
|
function noopVisitNodeFn(_html, i18n2) {
|
|
11908
12023
|
return i18n2;
|
|
11909
12024
|
}
|
|
11910
12025
|
var _I18nVisitor = class {
|
|
11911
|
-
constructor(_expressionParser, _interpolationConfig) {
|
|
12026
|
+
constructor(_expressionParser, _interpolationConfig, _containerBlocks) {
|
|
11912
12027
|
this._expressionParser = _expressionParser;
|
|
11913
12028
|
this._interpolationConfig = _interpolationConfig;
|
|
12029
|
+
this._containerBlocks = _containerBlocks;
|
|
11914
12030
|
}
|
|
11915
12031
|
toI18nMessage(nodes, meaning = "", description = "", customId = "", visitNodeFn) {
|
|
11916
12032
|
const context = {
|
|
@@ -11985,11 +12101,27 @@ var _I18nVisitor = class {
|
|
|
11985
12101
|
throw new Error("Unreachable code");
|
|
11986
12102
|
}
|
|
11987
12103
|
visitBlock(block, context) {
|
|
12104
|
+
var _a2;
|
|
11988
12105
|
const children = visitAll2(this, block.children, context);
|
|
11989
|
-
|
|
12106
|
+
if (this._containerBlocks.has(block.name)) {
|
|
12107
|
+
return new Container(children, block.sourceSpan);
|
|
12108
|
+
}
|
|
12109
|
+
const parameters = block.parameters.map((param) => param.expression);
|
|
12110
|
+
const startPhName = context.placeholderRegistry.getStartBlockPlaceholderName(block.name, parameters);
|
|
12111
|
+
const closePhName = context.placeholderRegistry.getCloseBlockPlaceholderName(block.name);
|
|
12112
|
+
context.placeholderToContent[startPhName] = {
|
|
12113
|
+
text: block.startSourceSpan.toString(),
|
|
12114
|
+
sourceSpan: block.startSourceSpan
|
|
12115
|
+
};
|
|
12116
|
+
context.placeholderToContent[closePhName] = {
|
|
12117
|
+
text: block.endSourceSpan ? block.endSourceSpan.toString() : "}",
|
|
12118
|
+
sourceSpan: (_a2 = block.endSourceSpan) != null ? _a2 : block.sourceSpan
|
|
12119
|
+
};
|
|
12120
|
+
const node = new BlockPlaceholder(block.name, parameters, startPhName, closePhName, children, block.sourceSpan, block.startSourceSpan, block.endSourceSpan);
|
|
11990
12121
|
return context.visitNodeFn(block, node);
|
|
11991
12122
|
}
|
|
11992
12123
|
visitBlockParameter(_parameter, _context) {
|
|
12124
|
+
throw new Error("Unreachable code");
|
|
11993
12125
|
}
|
|
11994
12126
|
_visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {
|
|
11995
12127
|
const nodes = [];
|
|
@@ -12060,14 +12192,14 @@ function extractPlaceholderName(input) {
|
|
|
12060
12192
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12061
12193
|
}
|
|
12062
12194
|
|
|
12063
|
-
// bazel-out/
|
|
12195
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12064
12196
|
var I18nError = class extends ParseError {
|
|
12065
12197
|
constructor(span, msg) {
|
|
12066
12198
|
super(span, msg);
|
|
12067
12199
|
}
|
|
12068
12200
|
};
|
|
12069
12201
|
|
|
12070
|
-
// bazel-out/
|
|
12202
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12071
12203
|
var NAMED_ENTITIES = {
|
|
12072
12204
|
"AElig": "\xC6",
|
|
12073
12205
|
"AMP": "&",
|
|
@@ -14198,7 +14330,7 @@ var NAMED_ENTITIES = {
|
|
|
14198
14330
|
var NGSP_UNICODE = "\uE500";
|
|
14199
14331
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14200
14332
|
|
|
14201
|
-
// bazel-out/
|
|
14333
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14202
14334
|
var TokenError = class extends ParseError {
|
|
14203
14335
|
constructor(errorMsg, tokenType, span) {
|
|
14204
14336
|
super(span, errorMsg);
|
|
@@ -15119,7 +15251,7 @@ var CursorError = class {
|
|
|
15119
15251
|
}
|
|
15120
15252
|
};
|
|
15121
15253
|
|
|
15122
|
-
// bazel-out/
|
|
15254
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15123
15255
|
var TreeError = class extends ParseError {
|
|
15124
15256
|
static create(elementName, span, msg) {
|
|
15125
15257
|
return new TreeError(elementName, span, msg);
|
|
@@ -15220,19 +15352,19 @@ var _TreeBuilder = class {
|
|
|
15220
15352
|
_consumeExpansion(token) {
|
|
15221
15353
|
const switchValue = this._advance();
|
|
15222
15354
|
const type = this._advance();
|
|
15223
|
-
const
|
|
15355
|
+
const cases2 = [];
|
|
15224
15356
|
while (this._peek.type === 20) {
|
|
15225
15357
|
const expCase = this._parseExpansionCase();
|
|
15226
15358
|
if (!expCase)
|
|
15227
15359
|
return;
|
|
15228
|
-
|
|
15360
|
+
cases2.push(expCase);
|
|
15229
15361
|
}
|
|
15230
15362
|
if (this._peek.type !== 23) {
|
|
15231
15363
|
this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`));
|
|
15232
15364
|
return;
|
|
15233
15365
|
}
|
|
15234
15366
|
const sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end, token.sourceSpan.fullStart);
|
|
15235
|
-
this._addToParent(new Expansion(switchValue.parts[0], type.parts[0],
|
|
15367
|
+
this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases2, sourceSpan, switchValue.sourceSpan));
|
|
15236
15368
|
this._advance();
|
|
15237
15369
|
}
|
|
15238
15370
|
_parseExpansionCase() {
|
|
@@ -15503,7 +15635,7 @@ function decodeEntity(match, entity) {
|
|
|
15503
15635
|
return match;
|
|
15504
15636
|
}
|
|
15505
15637
|
|
|
15506
|
-
// bazel-out/
|
|
15638
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15507
15639
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15508
15640
|
"iframe|srcdoc",
|
|
15509
15641
|
"*|innerhtml",
|
|
@@ -15518,7 +15650,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15518
15650
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15519
15651
|
}
|
|
15520
15652
|
|
|
15521
|
-
// bazel-out/
|
|
15653
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15522
15654
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15523
15655
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15524
15656
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15529,16 +15661,17 @@ var setI18nRefs = (htmlNode, i18nNode) => {
|
|
|
15529
15661
|
return i18nNode;
|
|
15530
15662
|
};
|
|
15531
15663
|
var I18nMetaVisitor = class {
|
|
15532
|
-
constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false) {
|
|
15664
|
+
constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false, containerBlocks = DEFAULT_CONTAINER_BLOCKS) {
|
|
15533
15665
|
this.interpolationConfig = interpolationConfig;
|
|
15534
15666
|
this.keepI18nAttrs = keepI18nAttrs;
|
|
15535
15667
|
this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;
|
|
15668
|
+
this.containerBlocks = containerBlocks;
|
|
15536
15669
|
this.hasI18nMeta = false;
|
|
15537
15670
|
this._errors = [];
|
|
15538
15671
|
}
|
|
15539
15672
|
_generateI18nMessage(nodes, meta = "", visitNodeFn) {
|
|
15540
15673
|
const { meaning, description, customId } = this._parseMetadata(meta);
|
|
15541
|
-
const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig);
|
|
15674
|
+
const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig, this.containerBlocks);
|
|
15542
15675
|
const message = createI18nMessage2(nodes, meaning, description, customId, visitNodeFn);
|
|
15543
15676
|
this._setMessageId(message, meta);
|
|
15544
15677
|
this._setLegacyIds(message, meta);
|
|
@@ -15674,7 +15807,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15674
15807
|
return jsDocComment(tags);
|
|
15675
15808
|
}
|
|
15676
15809
|
|
|
15677
|
-
// bazel-out/
|
|
15810
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15678
15811
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15679
15812
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15680
15813
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15713,6 +15846,9 @@ var GetMsgSerializerVisitor = class {
|
|
|
15713
15846
|
visitPlaceholder(ph) {
|
|
15714
15847
|
return this.formatPh(ph.name);
|
|
15715
15848
|
}
|
|
15849
|
+
visitBlockPlaceholder(ph) {
|
|
15850
|
+
return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join("")}${this.formatPh(ph.closeName)}`;
|
|
15851
|
+
}
|
|
15716
15852
|
visitIcuPlaceholder(ph, context) {
|
|
15717
15853
|
return this.formatPh(ph.name);
|
|
15718
15854
|
}
|
|
@@ -15722,7 +15858,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15722
15858
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15723
15859
|
}
|
|
15724
15860
|
|
|
15725
|
-
// bazel-out/
|
|
15861
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15726
15862
|
function createLocalizeStatements(variable2, message, params) {
|
|
15727
15863
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15728
15864
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15761,6 +15897,12 @@ var LocalizeSerializerVisitor = class {
|
|
|
15761
15897
|
visitPlaceholder(ph) {
|
|
15762
15898
|
this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));
|
|
15763
15899
|
}
|
|
15900
|
+
visitBlockPlaceholder(ph) {
|
|
15901
|
+
var _a2, _b2;
|
|
15902
|
+
this.pieces.push(this.createPlaceholderPiece(ph.startName, (_a2 = ph.startSourceSpan) != null ? _a2 : ph.sourceSpan));
|
|
15903
|
+
ph.children.forEach((child) => child.visit(this));
|
|
15904
|
+
this.pieces.push(this.createPlaceholderPiece(ph.closeName, (_b2 = ph.endSourceSpan) != null ? _b2 : ph.sourceSpan));
|
|
15905
|
+
}
|
|
15764
15906
|
visitIcuPlaceholder(ph) {
|
|
15765
15907
|
this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan, this.placeholderToMessage[ph.name]));
|
|
15766
15908
|
}
|
|
@@ -15805,7 +15947,7 @@ function createEmptyMessagePart(location) {
|
|
|
15805
15947
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15806
15948
|
}
|
|
15807
15949
|
|
|
15808
|
-
// bazel-out/
|
|
15950
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
15809
15951
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15810
15952
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
15811
15953
|
function collectI18nConsts(job) {
|
|
@@ -15900,7 +16042,7 @@ function assertAllParamsResolved(op) {
|
|
|
15900
16042
|
}
|
|
15901
16043
|
}
|
|
15902
16044
|
|
|
15903
|
-
// bazel-out/
|
|
16045
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15904
16046
|
function extractI18nText(job) {
|
|
15905
16047
|
var _a2;
|
|
15906
16048
|
for (const unit of job.units) {
|
|
@@ -15959,7 +16101,7 @@ function extractI18nText(job) {
|
|
|
15959
16101
|
}
|
|
15960
16102
|
}
|
|
15961
16103
|
|
|
15962
|
-
// bazel-out/
|
|
16104
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
15963
16105
|
function liftLocalRefs(job) {
|
|
15964
16106
|
for (const unit of job.units) {
|
|
15965
16107
|
for (const op of unit.create) {
|
|
@@ -15989,48 +16131,7 @@ function serializeLocalRefs(refs) {
|
|
|
15989
16131
|
return literalArr(constRefs);
|
|
15990
16132
|
}
|
|
15991
16133
|
|
|
15992
|
-
// bazel-out/
|
|
15993
|
-
function mergeI18nContexts(job) {
|
|
15994
|
-
const i18nOps = /* @__PURE__ */ new Map();
|
|
15995
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
15996
|
-
for (const unit of job.units) {
|
|
15997
|
-
for (const op of unit.create) {
|
|
15998
|
-
switch (op.kind) {
|
|
15999
|
-
case OpKind.I18nStart:
|
|
16000
|
-
if (!op.context) {
|
|
16001
|
-
throw Error("I18n op should have its context set.");
|
|
16002
|
-
}
|
|
16003
|
-
i18nOps.set(op.xref, op);
|
|
16004
|
-
break;
|
|
16005
|
-
case OpKind.I18nContext:
|
|
16006
|
-
i18nContexts.set(op.xref, op);
|
|
16007
|
-
break;
|
|
16008
|
-
}
|
|
16009
|
-
}
|
|
16010
|
-
}
|
|
16011
|
-
for (const childI18nOp of i18nOps.values()) {
|
|
16012
|
-
if (childI18nOp.xref !== childI18nOp.root) {
|
|
16013
|
-
const childContext = i18nContexts.get(childI18nOp.context);
|
|
16014
|
-
const rootI18nOp = i18nOps.get(childI18nOp.root);
|
|
16015
|
-
const rootContext = i18nContexts.get(rootI18nOp.context);
|
|
16016
|
-
mergeParams(rootContext.params, childContext.params);
|
|
16017
|
-
mergeParams(rootContext.postprocessingParams, childContext.postprocessingParams);
|
|
16018
|
-
}
|
|
16019
|
-
}
|
|
16020
|
-
}
|
|
16021
|
-
function mergeParams(to, from) {
|
|
16022
|
-
for (const [placeholder, fromValues] of from) {
|
|
16023
|
-
const toValues = to.get(placeholder) || [];
|
|
16024
|
-
const flags = fromValues[0].flags;
|
|
16025
|
-
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
16026
|
-
to.set(placeholder, [...fromValues, ...toValues]);
|
|
16027
|
-
} else {
|
|
16028
|
-
to.set(placeholder, [...toValues, ...fromValues]);
|
|
16029
|
-
}
|
|
16030
|
-
}
|
|
16031
|
-
}
|
|
16032
|
-
|
|
16033
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16134
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16034
16135
|
function emitNamespaceChanges(job) {
|
|
16035
16136
|
for (const unit of job.units) {
|
|
16036
16137
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16046,7 +16147,7 @@ function emitNamespaceChanges(job) {
|
|
|
16046
16147
|
}
|
|
16047
16148
|
}
|
|
16048
16149
|
|
|
16049
|
-
// bazel-out/
|
|
16150
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16050
16151
|
function parse(value) {
|
|
16051
16152
|
const styles = [];
|
|
16052
16153
|
let i = 0;
|
|
@@ -16107,7 +16208,7 @@ function hyphenate2(value) {
|
|
|
16107
16208
|
}).toLowerCase();
|
|
16108
16209
|
}
|
|
16109
16210
|
|
|
16110
|
-
// bazel-out/
|
|
16211
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16111
16212
|
function nameFunctionsAndVariables(job) {
|
|
16112
16213
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16113
16214
|
}
|
|
@@ -16222,7 +16323,7 @@ function stripImportant(name) {
|
|
|
16222
16323
|
return name;
|
|
16223
16324
|
}
|
|
16224
16325
|
|
|
16225
|
-
// bazel-out/
|
|
16326
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16226
16327
|
function mergeNextContextExpressions(job) {
|
|
16227
16328
|
for (const unit of job.units) {
|
|
16228
16329
|
for (const op of unit.create) {
|
|
@@ -16268,7 +16369,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16268
16369
|
}
|
|
16269
16370
|
}
|
|
16270
16371
|
|
|
16271
|
-
// bazel-out/
|
|
16372
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16272
16373
|
var CONTAINER_TAG = "ng-container";
|
|
16273
16374
|
function generateNgContainerOps(job) {
|
|
16274
16375
|
for (const unit of job.units) {
|
|
@@ -16285,7 +16386,7 @@ function generateNgContainerOps(job) {
|
|
|
16285
16386
|
}
|
|
16286
16387
|
}
|
|
16287
16388
|
|
|
16288
|
-
// bazel-out/
|
|
16389
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16289
16390
|
function lookupElement3(elements, xref) {
|
|
16290
16391
|
const el = elements.get(xref);
|
|
16291
16392
|
if (el === void 0) {
|
|
@@ -16315,7 +16416,7 @@ function disableBindings(job) {
|
|
|
16315
16416
|
}
|
|
16316
16417
|
}
|
|
16317
16418
|
|
|
16318
|
-
// bazel-out/
|
|
16419
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16319
16420
|
function generateNullishCoalesceExpressions(job) {
|
|
16320
16421
|
for (const unit of job.units) {
|
|
16321
16422
|
for (const op of unit.ops()) {
|
|
@@ -16331,7 +16432,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16331
16432
|
}
|
|
16332
16433
|
}
|
|
16333
16434
|
|
|
16334
|
-
// bazel-out/
|
|
16435
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16335
16436
|
function kindTest(kind) {
|
|
16336
16437
|
return (op) => op.kind === kind;
|
|
16337
16438
|
}
|
|
@@ -16405,7 +16506,7 @@ function keepLast(ops) {
|
|
|
16405
16506
|
return ops.slice(ops.length - 1);
|
|
16406
16507
|
}
|
|
16407
16508
|
|
|
16408
|
-
// bazel-out/
|
|
16509
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16409
16510
|
function parseExtractedStyles(job) {
|
|
16410
16511
|
for (const unit of job.units) {
|
|
16411
16512
|
for (const op of unit.create) {
|
|
@@ -16428,7 +16529,7 @@ function parseExtractedStyles(job) {
|
|
|
16428
16529
|
}
|
|
16429
16530
|
}
|
|
16430
16531
|
|
|
16431
|
-
// bazel-out/
|
|
16532
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16432
16533
|
function removeContentSelectors(job) {
|
|
16433
16534
|
for (const unit of job.units) {
|
|
16434
16535
|
const elements = createOpXrefMap(unit);
|
|
@@ -16452,7 +16553,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16452
16553
|
return el;
|
|
16453
16554
|
}
|
|
16454
16555
|
|
|
16455
|
-
// bazel-out/
|
|
16556
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16456
16557
|
function createPipes(job) {
|
|
16457
16558
|
for (const unit of job.units) {
|
|
16458
16559
|
processPipeBindingsInView(unit);
|
|
@@ -16500,7 +16601,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16500
16601
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16501
16602
|
}
|
|
16502
16603
|
|
|
16503
|
-
// bazel-out/
|
|
16604
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16504
16605
|
function createVariadicPipes(job) {
|
|
16505
16606
|
for (const unit of job.units) {
|
|
16506
16607
|
for (const op of unit.update) {
|
|
@@ -16517,7 +16618,7 @@ function createVariadicPipes(job) {
|
|
|
16517
16618
|
}
|
|
16518
16619
|
}
|
|
16519
16620
|
|
|
16520
|
-
// bazel-out/
|
|
16621
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16521
16622
|
function propagateI18nBlocks(job) {
|
|
16522
16623
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16523
16624
|
}
|
|
@@ -16541,9 +16642,10 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16541
16642
|
subTemplateIndex++;
|
|
16542
16643
|
wrapTemplateWithI18n(templateView, i18nBlock);
|
|
16543
16644
|
}
|
|
16544
|
-
propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
|
|
16645
|
+
subTemplateIndex = propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
|
|
16545
16646
|
}
|
|
16546
16647
|
}
|
|
16648
|
+
return subTemplateIndex;
|
|
16547
16649
|
}
|
|
16548
16650
|
function wrapTemplateWithI18n(unit, parentI18n) {
|
|
16549
16651
|
var _a2;
|
|
@@ -16554,7 +16656,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16554
16656
|
}
|
|
16555
16657
|
}
|
|
16556
16658
|
|
|
16557
|
-
// bazel-out/
|
|
16659
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16558
16660
|
function extractPureFunctions(job) {
|
|
16559
16661
|
for (const view of job.units) {
|
|
16560
16662
|
for (const op of view.ops()) {
|
|
@@ -16596,7 +16698,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16596
16698
|
}
|
|
16597
16699
|
};
|
|
16598
16700
|
|
|
16599
|
-
// bazel-out/
|
|
16701
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16600
16702
|
function generatePureLiteralStructures(job) {
|
|
16601
16703
|
for (const unit of job.units) {
|
|
16602
16704
|
for (const op of unit.update) {
|
|
@@ -16643,7 +16745,7 @@ function transformLiteralMap(expr) {
|
|
|
16643
16745
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16644
16746
|
}
|
|
16645
16747
|
|
|
16646
|
-
// bazel-out/
|
|
16748
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16647
16749
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16648
16750
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16649
16751
|
}
|
|
@@ -16842,8 +16944,8 @@ function repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByF
|
|
|
16842
16944
|
}
|
|
16843
16945
|
return call(Identifiers.repeaterCreate, args, sourceSpan);
|
|
16844
16946
|
}
|
|
16845
|
-
function repeater(
|
|
16846
|
-
return call(Identifiers.repeater, [
|
|
16947
|
+
function repeater(collection, sourceSpan) {
|
|
16948
|
+
return call(Identifiers.repeater, [collection], sourceSpan);
|
|
16847
16949
|
}
|
|
16848
16950
|
function deferWhen(prefetch, expr, sourceSpan) {
|
|
16849
16951
|
return call(prefetch ? Identifiers.deferPrefetchWhen : Identifiers.deferWhen, [expr], sourceSpan);
|
|
@@ -17154,7 +17256,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17154
17256
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17155
17257
|
}
|
|
17156
17258
|
|
|
17157
|
-
// bazel-out/
|
|
17259
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17158
17260
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
17159
17261
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
17160
17262
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -17401,7 +17503,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17401
17503
|
OpList.replace(op, conditional(op.targetSlot.slot, op.processed, op.contextValue, op.sourceSpan));
|
|
17402
17504
|
break;
|
|
17403
17505
|
case OpKind.Repeater:
|
|
17404
|
-
OpList.replace(op, repeater(op.
|
|
17506
|
+
OpList.replace(op, repeater(op.collection, op.sourceSpan));
|
|
17405
17507
|
break;
|
|
17406
17508
|
case OpKind.DeferWhen:
|
|
17407
17509
|
OpList.replace(op, deferWhen(op.prefetch, op.expr, op.sourceSpan));
|
|
@@ -17483,7 +17585,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17483
17585
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17484
17586
|
}
|
|
17485
17587
|
|
|
17486
|
-
// bazel-out/
|
|
17588
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17487
17589
|
function removeEmptyBindings(job) {
|
|
17488
17590
|
for (const unit of job.units) {
|
|
17489
17591
|
for (const op of unit.update) {
|
|
@@ -17504,7 +17606,7 @@ function removeEmptyBindings(job) {
|
|
|
17504
17606
|
}
|
|
17505
17607
|
}
|
|
17506
17608
|
|
|
17507
|
-
// bazel-out/
|
|
17609
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17508
17610
|
function removeI18nContexts(job) {
|
|
17509
17611
|
for (const unit of job.units) {
|
|
17510
17612
|
for (const op of unit.create) {
|
|
@@ -17520,7 +17622,7 @@ function removeI18nContexts(job) {
|
|
|
17520
17622
|
}
|
|
17521
17623
|
}
|
|
17522
17624
|
|
|
17523
|
-
// bazel-out/
|
|
17625
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17524
17626
|
function generateRepeaterDerivedVars(job) {
|
|
17525
17627
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17526
17628
|
for (const unit of job.units) {
|
|
@@ -17552,7 +17654,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17552
17654
|
}
|
|
17553
17655
|
}
|
|
17554
17656
|
|
|
17555
|
-
// bazel-out/
|
|
17657
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17556
17658
|
function resolveContexts(job) {
|
|
17557
17659
|
for (const unit of job.units) {
|
|
17558
17660
|
processLexicalScope(unit, unit.create);
|
|
@@ -17593,7 +17695,7 @@ function processLexicalScope(view, ops) {
|
|
|
17593
17695
|
}
|
|
17594
17696
|
}
|
|
17595
17697
|
|
|
17596
|
-
// bazel-out/
|
|
17698
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17597
17699
|
function resolveDollarEvent(job) {
|
|
17598
17700
|
for (const unit of job.units) {
|
|
17599
17701
|
transformDollarEvent(unit, unit.create);
|
|
@@ -17614,7 +17716,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
17614
17716
|
}
|
|
17615
17717
|
}
|
|
17616
17718
|
|
|
17617
|
-
// bazel-out/
|
|
17719
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17618
17720
|
function resolveI18nElementPlaceholders(job) {
|
|
17619
17721
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17620
17722
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -17630,55 +17732,67 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17630
17732
|
}
|
|
17631
17733
|
}
|
|
17632
17734
|
}
|
|
17633
|
-
|
|
17634
|
-
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
17639
|
-
|
|
17735
|
+
resolvePlaceholdersForView(job, job.root, i18nContexts, elements);
|
|
17736
|
+
}
|
|
17737
|
+
function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
|
|
17738
|
+
let currentOps = null;
|
|
17739
|
+
for (const op of unit.create) {
|
|
17740
|
+
switch (op.kind) {
|
|
17741
|
+
case OpKind.I18nStart:
|
|
17742
|
+
if (!op.context) {
|
|
17743
|
+
throw Error("Could not find i18n context for i18n op");
|
|
17744
|
+
}
|
|
17745
|
+
currentOps = { i18nBlock: op, i18nContext: i18nContexts.get(op.context) };
|
|
17746
|
+
break;
|
|
17747
|
+
case OpKind.I18nEnd:
|
|
17748
|
+
currentOps = null;
|
|
17749
|
+
break;
|
|
17750
|
+
case OpKind.ElementStart:
|
|
17751
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17752
|
+
if (currentOps === null) {
|
|
17753
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17640
17754
|
}
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
|
|
17644
|
-
|
|
17645
|
-
break;
|
|
17646
|
-
case OpKind.ElementStart:
|
|
17647
|
-
if (op.i18nPlaceholder !== void 0) {
|
|
17648
|
-
if (currentOps === null) {
|
|
17649
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17650
|
-
}
|
|
17651
|
-
const { startName, closeName } = op.i18nPlaceholder;
|
|
17652
|
-
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17653
|
-
if (closeName === "") {
|
|
17654
|
-
flags |= I18nParamValueFlags.CloseTag;
|
|
17655
|
-
}
|
|
17656
|
-
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17755
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
17756
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17757
|
+
if (closeName === "") {
|
|
17758
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
17657
17759
|
}
|
|
17658
|
-
|
|
17659
|
-
|
|
17660
|
-
|
|
17661
|
-
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
|
|
17665
|
-
|
|
17666
|
-
if (closeName !== "") {
|
|
17667
|
-
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17668
|
-
}
|
|
17760
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17761
|
+
}
|
|
17762
|
+
break;
|
|
17763
|
+
case OpKind.ElementEnd:
|
|
17764
|
+
const startOp = elements.get(op.xref);
|
|
17765
|
+
if (startOp && startOp.i18nPlaceholder !== void 0) {
|
|
17766
|
+
if (currentOps === null) {
|
|
17767
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17669
17768
|
}
|
|
17670
|
-
|
|
17671
|
-
|
|
17672
|
-
|
|
17673
|
-
if (currentOps === null) {
|
|
17674
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17675
|
-
}
|
|
17676
|
-
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17677
|
-
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.startName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag);
|
|
17678
|
-
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17769
|
+
const { closeName } = startOp.i18nPlaceholder;
|
|
17770
|
+
if (closeName !== "") {
|
|
17771
|
+
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17679
17772
|
}
|
|
17680
|
-
|
|
17681
|
-
|
|
17773
|
+
}
|
|
17774
|
+
break;
|
|
17775
|
+
case OpKind.Template:
|
|
17776
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17777
|
+
if (currentOps === null) {
|
|
17778
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17779
|
+
}
|
|
17780
|
+
let startFlags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
17781
|
+
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17782
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
17783
|
+
const isSelfClosing = closeName === "";
|
|
17784
|
+
if (isSelfClosing) {
|
|
17785
|
+
startFlags |= I18nParamValueFlags.CloseTag;
|
|
17786
|
+
}
|
|
17787
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, subTemplateIndex, startFlags);
|
|
17788
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17789
|
+
if (!isSelfClosing) {
|
|
17790
|
+
addParam(currentOps.i18nContext.params, closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17791
|
+
}
|
|
17792
|
+
} else {
|
|
17793
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17794
|
+
}
|
|
17795
|
+
break;
|
|
17682
17796
|
}
|
|
17683
17797
|
}
|
|
17684
17798
|
}
|
|
@@ -17697,7 +17811,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
17697
17811
|
params.set(placeholder, values);
|
|
17698
17812
|
}
|
|
17699
17813
|
|
|
17700
|
-
// bazel-out/
|
|
17814
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17701
17815
|
function resolveI18nExpressionPlaceholders(job) {
|
|
17702
17816
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
17703
17817
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
@@ -17718,8 +17832,8 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17718
17832
|
for (const op of unit.update) {
|
|
17719
17833
|
if (op.kind === OpKind.I18nExpression) {
|
|
17720
17834
|
const i18nContext = i18nContexts.get(op.context);
|
|
17721
|
-
const index = expressionIndices.get(
|
|
17722
|
-
const subTemplateIndex = subTemplateIndicies.get(
|
|
17835
|
+
const index = expressionIndices.get(op.target) || 0;
|
|
17836
|
+
const subTemplateIndex = subTemplateIndicies.get(op.target);
|
|
17723
17837
|
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
17724
17838
|
const values = params.get(op.i18nPlaceholder) || [];
|
|
17725
17839
|
values.push({
|
|
@@ -17728,36 +17842,20 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17728
17842
|
flags: I18nParamValueFlags.ExpressionIndex
|
|
17729
17843
|
});
|
|
17730
17844
|
params.set(op.i18nPlaceholder, values);
|
|
17731
|
-
expressionIndices.set(
|
|
17845
|
+
expressionIndices.set(op.target, index + 1);
|
|
17732
17846
|
}
|
|
17733
17847
|
}
|
|
17734
17848
|
}
|
|
17735
17849
|
}
|
|
17736
17850
|
|
|
17737
|
-
// bazel-out/
|
|
17851
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
|
|
17738
17852
|
function resolveI18nIcuPlaceholders(job) {
|
|
17739
|
-
const contextOps = /* @__PURE__ */ new Map();
|
|
17740
17853
|
for (const unit of job.units) {
|
|
17741
17854
|
for (const op of unit.create) {
|
|
17742
|
-
|
|
17743
|
-
|
|
17744
|
-
|
|
17745
|
-
|
|
17746
|
-
}
|
|
17747
|
-
}
|
|
17748
|
-
}
|
|
17749
|
-
for (const unit of job.units) {
|
|
17750
|
-
for (const op of unit.create) {
|
|
17751
|
-
switch (op.kind) {
|
|
17752
|
-
case OpKind.IcuStart:
|
|
17753
|
-
if (op.context === null) {
|
|
17754
|
-
throw Error("Icu should have its i18n context set.");
|
|
17755
|
-
}
|
|
17756
|
-
const i18nContext = contextOps.get(op.context);
|
|
17757
|
-
for (const node of op.message.nodes) {
|
|
17758
|
-
node.visit(new ResolveIcuPlaceholdersVisitor(i18nContext.postprocessingParams));
|
|
17759
|
-
}
|
|
17760
|
-
break;
|
|
17855
|
+
if (op.kind === OpKind.I18nContext && op.contextKind === I18nContextKind.Icu) {
|
|
17856
|
+
for (const node of op.message.nodes) {
|
|
17857
|
+
node.visit(new ResolveIcuPlaceholdersVisitor(op.postprocessingParams));
|
|
17858
|
+
}
|
|
17761
17859
|
}
|
|
17762
17860
|
}
|
|
17763
17861
|
}
|
|
@@ -17767,9 +17865,8 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
17767
17865
|
super();
|
|
17768
17866
|
this.params = params;
|
|
17769
17867
|
}
|
|
17770
|
-
|
|
17868
|
+
visitContainerPlaceholder(placeholder) {
|
|
17771
17869
|
var _a2, _b2;
|
|
17772
|
-
super.visitTagPlaceholder(placeholder);
|
|
17773
17870
|
if (placeholder.startName && placeholder.startSourceSpan && !this.params.has(placeholder.startName)) {
|
|
17774
17871
|
this.params.set(placeholder.startName, [{
|
|
17775
17872
|
value: (_a2 = placeholder.startSourceSpan) == null ? void 0 : _a2.toString(),
|
|
@@ -17785,9 +17882,17 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
17785
17882
|
}]);
|
|
17786
17883
|
}
|
|
17787
17884
|
}
|
|
17885
|
+
visitTagPlaceholder(placeholder) {
|
|
17886
|
+
super.visitTagPlaceholder(placeholder);
|
|
17887
|
+
this.visitContainerPlaceholder(placeholder);
|
|
17888
|
+
}
|
|
17889
|
+
visitBlockPlaceholder(placeholder) {
|
|
17890
|
+
super.visitBlockPlaceholder(placeholder);
|
|
17891
|
+
this.visitContainerPlaceholder(placeholder);
|
|
17892
|
+
}
|
|
17788
17893
|
};
|
|
17789
17894
|
|
|
17790
|
-
// bazel-out/
|
|
17895
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17791
17896
|
function resolveNames(job) {
|
|
17792
17897
|
for (const unit of job.units) {
|
|
17793
17898
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -17851,7 +17956,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
17851
17956
|
}
|
|
17852
17957
|
}
|
|
17853
17958
|
|
|
17854
|
-
// bazel-out/
|
|
17959
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
17855
17960
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
17856
17961
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
17857
17962
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -17888,7 +17993,7 @@ function isIframeElement(op) {
|
|
|
17888
17993
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
17889
17994
|
}
|
|
17890
17995
|
|
|
17891
|
-
// bazel-out/
|
|
17996
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
17892
17997
|
function saveAndRestoreView(job) {
|
|
17893
17998
|
for (const unit of job.units) {
|
|
17894
17999
|
unit.create.prepend([
|
|
@@ -17933,7 +18038,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
17933
18038
|
}
|
|
17934
18039
|
}
|
|
17935
18040
|
|
|
17936
|
-
// bazel-out/
|
|
18041
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
17937
18042
|
function allocateSlots(job) {
|
|
17938
18043
|
const slotMap = /* @__PURE__ */ new Map();
|
|
17939
18044
|
for (const unit of job.units) {
|
|
@@ -17958,7 +18063,7 @@ function allocateSlots(job) {
|
|
|
17958
18063
|
}
|
|
17959
18064
|
}
|
|
17960
18065
|
|
|
17961
|
-
// bazel-out/
|
|
18066
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
17962
18067
|
function specializeStyleBindings(job) {
|
|
17963
18068
|
for (const unit of job.units) {
|
|
17964
18069
|
for (const op of unit.update) {
|
|
@@ -17988,7 +18093,7 @@ function specializeStyleBindings(job) {
|
|
|
17988
18093
|
}
|
|
17989
18094
|
}
|
|
17990
18095
|
|
|
17991
|
-
// bazel-out/
|
|
18096
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
17992
18097
|
function generateTemporaryVariables(job) {
|
|
17993
18098
|
for (const unit of job.units) {
|
|
17994
18099
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18046,7 +18151,7 @@ function assignName(names, expr) {
|
|
|
18046
18151
|
expr.name = name;
|
|
18047
18152
|
}
|
|
18048
18153
|
|
|
18049
|
-
// bazel-out/
|
|
18154
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18050
18155
|
function generateTrackFns(job) {
|
|
18051
18156
|
for (const unit of job.units) {
|
|
18052
18157
|
for (const op of unit.create) {
|
|
@@ -18076,7 +18181,7 @@ function generateTrackFns(job) {
|
|
|
18076
18181
|
}
|
|
18077
18182
|
}
|
|
18078
18183
|
|
|
18079
|
-
// bazel-out/
|
|
18184
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18080
18185
|
function optimizeTrackFns(job) {
|
|
18081
18186
|
for (const unit of job.units) {
|
|
18082
18187
|
for (const op of unit.create) {
|
|
@@ -18123,7 +18228,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18123
18228
|
return true;
|
|
18124
18229
|
}
|
|
18125
18230
|
|
|
18126
|
-
// bazel-out/
|
|
18231
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18127
18232
|
function generateTrackVariables(job) {
|
|
18128
18233
|
for (const unit of job.units) {
|
|
18129
18234
|
for (const op of unit.create) {
|
|
@@ -18144,7 +18249,7 @@ function generateTrackVariables(job) {
|
|
|
18144
18249
|
}
|
|
18145
18250
|
}
|
|
18146
18251
|
|
|
18147
|
-
// bazel-out/
|
|
18252
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18148
18253
|
function countVariables(job) {
|
|
18149
18254
|
for (const unit of job.units) {
|
|
18150
18255
|
let varCount = 0;
|
|
@@ -18249,7 +18354,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18249
18354
|
return true;
|
|
18250
18355
|
}
|
|
18251
18356
|
|
|
18252
|
-
// bazel-out/
|
|
18357
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18253
18358
|
function optimizeVariables(job) {
|
|
18254
18359
|
for (const unit of job.units) {
|
|
18255
18360
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18499,7 +18604,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18499
18604
|
}
|
|
18500
18605
|
}
|
|
18501
18606
|
|
|
18502
|
-
// bazel-out/
|
|
18607
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18503
18608
|
function wrapI18nIcus(job) {
|
|
18504
18609
|
for (const unit of job.units) {
|
|
18505
18610
|
let currentI18nOp = null;
|
|
@@ -18529,7 +18634,7 @@ function wrapI18nIcus(job) {
|
|
|
18529
18634
|
}
|
|
18530
18635
|
}
|
|
18531
18636
|
|
|
18532
|
-
// bazel-out/
|
|
18637
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18533
18638
|
var phases = [
|
|
18534
18639
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18535
18640
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
@@ -18572,7 +18677,6 @@ var phases = [
|
|
|
18572
18677
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
18573
18678
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
18574
18679
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nIcuPlaceholders },
|
|
18575
|
-
{ kind: CompilationJobKind.Tmpl, fn: mergeI18nContexts },
|
|
18576
18680
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
18577
18681
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
18578
18682
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
@@ -18694,7 +18798,7 @@ function emitHostBindingFunction(job) {
|
|
|
18694
18798
|
);
|
|
18695
18799
|
}
|
|
18696
18800
|
|
|
18697
|
-
// bazel-out/
|
|
18801
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18698
18802
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18699
18803
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
18700
18804
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
@@ -19275,10 +19379,10 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19275
19379
|
return null;
|
|
19276
19380
|
}
|
|
19277
19381
|
|
|
19278
|
-
// bazel-out/
|
|
19382
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19279
19383
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19280
19384
|
|
|
19281
|
-
// bazel-out/
|
|
19385
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19282
19386
|
var IMPORTANT_FLAG = "!important";
|
|
19283
19387
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19284
19388
|
var StylingBuilder = class {
|
|
@@ -19611,7 +19715,7 @@ function isEmptyExpression(ast) {
|
|
|
19611
19715
|
return ast instanceof EmptyExpr;
|
|
19612
19716
|
}
|
|
19613
19717
|
|
|
19614
|
-
// bazel-out/
|
|
19718
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19615
19719
|
var HtmlParser = class extends Parser2 {
|
|
19616
19720
|
constructor() {
|
|
19617
19721
|
super(getHtmlTagDefinition);
|
|
@@ -19621,7 +19725,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19621
19725
|
}
|
|
19622
19726
|
};
|
|
19623
19727
|
|
|
19624
|
-
// bazel-out/
|
|
19728
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19625
19729
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19626
19730
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19627
19731
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19687,7 +19791,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19687
19791
|
return result;
|
|
19688
19792
|
}
|
|
19689
19793
|
|
|
19690
|
-
// bazel-out/
|
|
19794
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19691
19795
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19692
19796
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19693
19797
|
var CLASS_PREFIX = "class";
|
|
@@ -20007,7 +20111,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20007
20111
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20008
20112
|
}
|
|
20009
20113
|
|
|
20010
|
-
// bazel-out/
|
|
20114
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20011
20115
|
function isStyleUrlResolvable(url) {
|
|
20012
20116
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20013
20117
|
return false;
|
|
@@ -20016,7 +20120,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20016
20120
|
}
|
|
20017
20121
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20018
20122
|
|
|
20019
|
-
// bazel-out/
|
|
20123
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20020
20124
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20021
20125
|
var LINK_ELEMENT = "link";
|
|
20022
20126
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20086,7 +20190,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20086
20190
|
return selectAttr;
|
|
20087
20191
|
}
|
|
20088
20192
|
|
|
20089
|
-
// bazel-out/
|
|
20193
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20090
20194
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20091
20195
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20092
20196
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20104,18 +20208,18 @@ function createIfBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20104
20208
|
const branches = [];
|
|
20105
20209
|
const mainBlockParams = parseConditionalBlockParameters(ast, errors, bindingParser);
|
|
20106
20210
|
if (mainBlockParams !== null) {
|
|
20107
|
-
branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll2(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan));
|
|
20211
|
+
branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll2(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan, ast.i18n));
|
|
20108
20212
|
}
|
|
20109
20213
|
for (const block of connectedBlocks) {
|
|
20110
20214
|
if (ELSE_IF_PATTERN.test(block.name)) {
|
|
20111
20215
|
const params = parseConditionalBlockParameters(block, errors, bindingParser);
|
|
20112
20216
|
if (params !== null) {
|
|
20113
20217
|
const children = visitAll2(visitor, block.children, block.children);
|
|
20114
|
-
branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
|
|
20218
|
+
branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));
|
|
20115
20219
|
}
|
|
20116
20220
|
} else if (block.name === "else") {
|
|
20117
20221
|
const children = visitAll2(visitor, block.children, block.children);
|
|
20118
|
-
branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
|
|
20222
|
+
branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));
|
|
20119
20223
|
}
|
|
20120
20224
|
}
|
|
20121
20225
|
const ifBlockStartSourceSpan = branches.length > 0 ? branches[0].startSourceSpan : ast.startSourceSpan;
|
|
@@ -20143,7 +20247,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20143
20247
|
} else if (block.parameters.length > 0) {
|
|
20144
20248
|
errors.push(new ParseError(block.sourceSpan, "@empty block cannot have parameters"));
|
|
20145
20249
|
} else {
|
|
20146
|
-
empty = new ForLoopBlockEmpty(visitAll2(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan);
|
|
20250
|
+
empty = new ForLoopBlockEmpty(visitAll2(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n);
|
|
20147
20251
|
}
|
|
20148
20252
|
} else {
|
|
20149
20253
|
errors.push(new ParseError(block.sourceSpan, `Unrecognized @for loop block "${block.name}"`));
|
|
@@ -20155,7 +20259,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20155
20259
|
} else {
|
|
20156
20260
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
20157
20261
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
20158
|
-
node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll2(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan);
|
|
20262
|
+
node = new ForLoopBlock(params.itemName, params.expression, params.trackBy.expression, params.trackBy.keywordSpan, params.context, visitAll2(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan, ast.nameSpan, ast.i18n);
|
|
20159
20263
|
}
|
|
20160
20264
|
}
|
|
20161
20265
|
return { node, errors };
|
|
@@ -20163,7 +20267,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20163
20267
|
function createSwitchBlock(ast, visitor, bindingParser) {
|
|
20164
20268
|
const errors = validateSwitchBlock(ast);
|
|
20165
20269
|
const primaryExpression = ast.parameters.length > 0 ? parseBlockParameterToBinding(ast.parameters[0], bindingParser) : bindingParser.parseBinding("", false, ast.sourceSpan, 0);
|
|
20166
|
-
const
|
|
20270
|
+
const cases2 = [];
|
|
20167
20271
|
const unknownBlocks = [];
|
|
20168
20272
|
let defaultCase = null;
|
|
20169
20273
|
for (const node of ast.children) {
|
|
@@ -20175,18 +20279,18 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
20175
20279
|
continue;
|
|
20176
20280
|
}
|
|
20177
20281
|
const expression = node.name === "case" ? parseBlockParameterToBinding(node.parameters[0], bindingParser) : null;
|
|
20178
|
-
const ast2 = new SwitchBlockCase(expression, visitAll2(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan);
|
|
20282
|
+
const ast2 = new SwitchBlockCase(expression, visitAll2(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan, node.i18n);
|
|
20179
20283
|
if (expression === null) {
|
|
20180
20284
|
defaultCase = ast2;
|
|
20181
20285
|
} else {
|
|
20182
|
-
|
|
20286
|
+
cases2.push(ast2);
|
|
20183
20287
|
}
|
|
20184
20288
|
}
|
|
20185
20289
|
if (defaultCase !== null) {
|
|
20186
|
-
|
|
20290
|
+
cases2.push(defaultCase);
|
|
20187
20291
|
}
|
|
20188
20292
|
return {
|
|
20189
|
-
node: new SwitchBlock(primaryExpression,
|
|
20293
|
+
node: new SwitchBlock(primaryExpression, cases2, unknownBlocks, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan),
|
|
20190
20294
|
errors
|
|
20191
20295
|
};
|
|
20192
20296
|
}
|
|
@@ -20377,7 +20481,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20377
20481
|
return expression.slice(start, end);
|
|
20378
20482
|
}
|
|
20379
20483
|
|
|
20380
|
-
// bazel-out/
|
|
20484
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20381
20485
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20382
20486
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20383
20487
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -20641,7 +20745,7 @@ function parseDeferredTime(value) {
|
|
|
20641
20745
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20642
20746
|
}
|
|
20643
20747
|
|
|
20644
|
-
// bazel-out/
|
|
20748
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20645
20749
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20646
20750
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20647
20751
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20663,7 +20767,7 @@ function createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20663
20767
|
endOfLastSourceSpan = lastConnectedBlock.sourceSpan.end;
|
|
20664
20768
|
}
|
|
20665
20769
|
const sourceSpanWithConnectedBlocks = new ParseSourceSpan(ast.sourceSpan.start, endOfLastSourceSpan);
|
|
20666
|
-
const node = new DeferredBlock(visitAll2(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan);
|
|
20770
|
+
const node = new DeferredBlock(visitAll2(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan, ast.i18n);
|
|
20667
20771
|
return { node, errors };
|
|
20668
20772
|
}
|
|
20669
20773
|
function parseConnectedBlocks(connectedBlocks, errors, visitor) {
|
|
@@ -20721,7 +20825,7 @@ function parsePlaceholderBlock(ast, visitor) {
|
|
|
20721
20825
|
throw new Error(`Unrecognized parameter in @placeholder block: "${param.expression}"`);
|
|
20722
20826
|
}
|
|
20723
20827
|
}
|
|
20724
|
-
return new DeferredBlockPlaceholder(visitAll2(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20828
|
+
return new DeferredBlockPlaceholder(visitAll2(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
20725
20829
|
}
|
|
20726
20830
|
function parseLoadingBlock(ast, visitor) {
|
|
20727
20831
|
let afterTime = null;
|
|
@@ -20749,13 +20853,13 @@ function parseLoadingBlock(ast, visitor) {
|
|
|
20749
20853
|
throw new Error(`Unrecognized parameter in @loading block: "${param.expression}"`);
|
|
20750
20854
|
}
|
|
20751
20855
|
}
|
|
20752
|
-
return new DeferredBlockLoading(visitAll2(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20856
|
+
return new DeferredBlockLoading(visitAll2(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
20753
20857
|
}
|
|
20754
20858
|
function parseErrorBlock(ast, visitor) {
|
|
20755
20859
|
if (ast.parameters.length > 0) {
|
|
20756
20860
|
throw new Error(`@error block cannot have parameters`);
|
|
20757
20861
|
}
|
|
20758
|
-
return new DeferredBlockError(visitAll2(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20862
|
+
return new DeferredBlockError(visitAll2(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
20759
20863
|
}
|
|
20760
20864
|
function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
20761
20865
|
const triggers = {};
|
|
@@ -20776,7 +20880,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20776
20880
|
return { triggers, prefetchTriggers };
|
|
20777
20881
|
}
|
|
20778
20882
|
|
|
20779
|
-
// bazel-out/
|
|
20883
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20780
20884
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20781
20885
|
var KW_BIND_IDX = 1;
|
|
20782
20886
|
var KW_LET_IDX = 2;
|
|
@@ -21207,7 +21311,7 @@ function textContents(node) {
|
|
|
21207
21311
|
}
|
|
21208
21312
|
}
|
|
21209
21313
|
|
|
21210
|
-
// bazel-out/
|
|
21314
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21211
21315
|
var TagType;
|
|
21212
21316
|
(function(TagType2) {
|
|
21213
21317
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21239,6 +21343,11 @@ var I18nContext = class {
|
|
|
21239
21343
|
const content = { type, index, ctx: this.id, isVoid: node.isVoid, closed };
|
|
21240
21344
|
updatePlaceholderMap(this.placeholders, ph, content);
|
|
21241
21345
|
}
|
|
21346
|
+
appendBlockPart(node, index, closed) {
|
|
21347
|
+
const ph = closed ? node.closeName : node.startName;
|
|
21348
|
+
const content = { type: TagType.TEMPLATE, index, ctx: this.id, closed };
|
|
21349
|
+
updatePlaceholderMap(this.placeholders, ph, content);
|
|
21350
|
+
}
|
|
21242
21351
|
get icus() {
|
|
21243
21352
|
return this._registry.icus;
|
|
21244
21353
|
}
|
|
@@ -21268,6 +21377,11 @@ var I18nContext = class {
|
|
|
21268
21377
|
this.appendTag(TagType.TEMPLATE, node, index, true);
|
|
21269
21378
|
this._unresolvedCtxCount++;
|
|
21270
21379
|
}
|
|
21380
|
+
appendBlock(node, index) {
|
|
21381
|
+
this.appendBlockPart(node, index, false);
|
|
21382
|
+
this.appendBlockPart(node, index, true);
|
|
21383
|
+
this._unresolvedCtxCount++;
|
|
21384
|
+
}
|
|
21271
21385
|
appendElement(node, index, closed) {
|
|
21272
21386
|
this.appendTag(TagType.ELEMENT, node, index, closed);
|
|
21273
21387
|
}
|
|
@@ -21342,7 +21456,7 @@ function serializePlaceholderValue(value) {
|
|
|
21342
21456
|
}
|
|
21343
21457
|
}
|
|
21344
21458
|
|
|
21345
|
-
// bazel-out/
|
|
21459
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21346
21460
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21347
21461
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21348
21462
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -21463,12 +21577,18 @@ var TemplateDefinitionBuilder = class {
|
|
|
21463
21577
|
this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);
|
|
21464
21578
|
});
|
|
21465
21579
|
}
|
|
21466
|
-
buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n2) {
|
|
21580
|
+
buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n2, variableAliases) {
|
|
21467
21581
|
this._ngContentSelectorsOffset = ngContentSelectorsOffset;
|
|
21468
21582
|
if (this._namespace !== Identifiers.namespaceHTML) {
|
|
21469
21583
|
this.creationInstruction(null, this._namespace);
|
|
21470
21584
|
}
|
|
21471
|
-
variables.forEach((v) =>
|
|
21585
|
+
variables.forEach((v) => {
|
|
21586
|
+
const alias = variableAliases == null ? void 0 : variableAliases[v.name];
|
|
21587
|
+
this.registerContextVariables(v.name, v.value);
|
|
21588
|
+
if (alias) {
|
|
21589
|
+
this.registerContextVariables(alias, v.value);
|
|
21590
|
+
}
|
|
21591
|
+
});
|
|
21472
21592
|
const initI18nContext = this.i18nContext || isI18nRootNode(i18n2) && !isSingleI18nIcu(i18n2) && !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n2);
|
|
21473
21593
|
const selfClosingI18nInstruction = hasTextChildrenOnly(nodes);
|
|
21474
21594
|
if (initI18nContext) {
|
|
@@ -21523,12 +21643,12 @@ var TemplateDefinitionBuilder = class {
|
|
|
21523
21643
|
this._constants.prepareStatements.push(...statements);
|
|
21524
21644
|
return _ref;
|
|
21525
21645
|
}
|
|
21526
|
-
registerContextVariables(
|
|
21646
|
+
registerContextVariables(name, value) {
|
|
21527
21647
|
const scopedName = this._bindingScope.freshReferenceName();
|
|
21528
21648
|
const retrievalLevel = this.level;
|
|
21529
|
-
const isDirect =
|
|
21530
|
-
const lhs = variable(
|
|
21531
|
-
this._bindingScope.set(retrievalLevel,
|
|
21649
|
+
const isDirect = value === DIRECT_CONTEXT_REFERENCE;
|
|
21650
|
+
const lhs = variable(name + scopedName);
|
|
21651
|
+
this._bindingScope.set(retrievalLevel, name, (scope) => {
|
|
21532
21652
|
return isDirect && scope.bindingLevel === retrievalLevel && !scope.isListenerScope() ? variable(CONTEXT_NAME) : lhs;
|
|
21533
21653
|
}, 1, (scope, relativeLevel) => {
|
|
21534
21654
|
let rhs;
|
|
@@ -21546,7 +21666,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
21546
21666
|
rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);
|
|
21547
21667
|
}
|
|
21548
21668
|
return [
|
|
21549
|
-
lhs.set(isDirect ? rhs : rhs.prop(
|
|
21669
|
+
lhs.set(isDirect ? rhs : rhs.prop(value || IMPLICIT_REFERENCE)).toConstDecl()
|
|
21550
21670
|
];
|
|
21551
21671
|
});
|
|
21552
21672
|
}
|
|
@@ -21885,16 +22005,20 @@ var TemplateDefinitionBuilder = class {
|
|
|
21885
22005
|
this.creationInstruction(span, isNgContainer2 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);
|
|
21886
22006
|
}
|
|
21887
22007
|
}
|
|
21888
|
-
prepareEmbeddedTemplateFn(children, contextNameSuffix, variables = [],
|
|
22008
|
+
prepareEmbeddedTemplateFn(children, contextNameSuffix, variables = [], i18nMeta, variableAliases) {
|
|
21889
22009
|
const index = this.allocateDataSlot();
|
|
21890
|
-
if (this.i18n &&
|
|
21891
|
-
|
|
22010
|
+
if (this.i18n && i18nMeta) {
|
|
22011
|
+
if (i18nMeta instanceof BlockPlaceholder) {
|
|
22012
|
+
this.i18n.appendBlock(i18nMeta, index);
|
|
22013
|
+
} else {
|
|
22014
|
+
this.i18n.appendTemplate(i18nMeta, index);
|
|
22015
|
+
}
|
|
21892
22016
|
}
|
|
21893
22017
|
const contextName = `${this.contextName}${contextNameSuffix}_${index}`;
|
|
21894
22018
|
const name = `${contextName}_Template`;
|
|
21895
22019
|
const visitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, index, name, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this.deferBlocks, this.elementLocations, this._constants);
|
|
21896
22020
|
this._nestedTemplateFns.push(() => {
|
|
21897
|
-
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset,
|
|
22021
|
+
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, i18nMeta, variableAliases);
|
|
21898
22022
|
this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(name));
|
|
21899
22023
|
if (visitor._ngContentReservedSlots.length) {
|
|
21900
22024
|
this._ngContentReservedSlots.push(...visitor._ngContentReservedSlots);
|
|
@@ -22004,7 +22128,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22004
22128
|
tagName = inferredData.tagName;
|
|
22005
22129
|
attrsExprs = inferredData.attrsExprs;
|
|
22006
22130
|
}
|
|
22007
|
-
const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs);
|
|
22131
|
+
const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs, void 0, branch.i18n);
|
|
22008
22132
|
const processedExpression = expression === null ? null : expression.visit(this._valueConverter);
|
|
22009
22133
|
return { index: templateIndex, expression: processedExpression, alias: expressionAlias };
|
|
22010
22134
|
});
|
|
@@ -22038,7 +22162,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22038
22162
|
}
|
|
22039
22163
|
visitSwitchBlock(block) {
|
|
22040
22164
|
const caseData = block.cases.map((currentCase) => {
|
|
22041
|
-
const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan);
|
|
22165
|
+
const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
|
|
22042
22166
|
const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
|
|
22043
22167
|
return { index, expression };
|
|
22044
22168
|
});
|
|
@@ -22066,12 +22190,12 @@ var TemplateDefinitionBuilder = class {
|
|
|
22066
22190
|
if (!metadata) {
|
|
22067
22191
|
throw new Error("Could not resolve `defer` block metadata. Block may need to be analyzed.");
|
|
22068
22192
|
}
|
|
22069
|
-
const primaryTemplateIndex = this.createEmbeddedTemplateFn(null, deferred.children, "_Defer", deferred.sourceSpan);
|
|
22070
|
-
const loadingIndex = loading ? this.createEmbeddedTemplateFn(null, loading.children, "_DeferLoading", loading.sourceSpan) : null;
|
|
22193
|
+
const primaryTemplateIndex = this.createEmbeddedTemplateFn(null, deferred.children, "_Defer", deferred.sourceSpan, void 0, void 0, void 0, deferred.i18n);
|
|
22194
|
+
const loadingIndex = loading ? this.createEmbeddedTemplateFn(null, loading.children, "_DeferLoading", loading.sourceSpan, void 0, void 0, void 0, loading.i18n) : null;
|
|
22071
22195
|
const loadingConsts = loading ? trimTrailingNulls([literal(loading.minimumTime), literal(loading.afterTime)]) : null;
|
|
22072
|
-
const placeholderIndex = placeholder ? this.createEmbeddedTemplateFn(null, placeholder.children, "_DeferPlaceholder", placeholder.sourceSpan) : null;
|
|
22196
|
+
const placeholderIndex = placeholder ? this.createEmbeddedTemplateFn(null, placeholder.children, "_DeferPlaceholder", placeholder.sourceSpan, void 0, void 0, void 0, placeholder.i18n) : null;
|
|
22073
22197
|
const placeholderConsts = placeholder && placeholder.minimumTime !== null ? literalArr([literal(placeholder.minimumTime)]) : null;
|
|
22074
|
-
const errorIndex = error2 ? this.createEmbeddedTemplateFn(null, error2.children, "_DeferError", error2.sourceSpan) : null;
|
|
22198
|
+
const errorIndex = error2 ? this.createEmbeddedTemplateFn(null, error2.children, "_DeferError", error2.sourceSpan, void 0, void 0, void 0, error2.i18n) : null;
|
|
22075
22199
|
const deferredIndex = this.allocateDataSlot();
|
|
22076
22200
|
const depsFnName = `${this.contextName}_Defer_${deferredIndex}_DepsFn`;
|
|
22077
22201
|
this.creationInstruction(deferred.sourceSpan, Identifiers.defer, trimTrailingNulls([
|
|
@@ -22180,11 +22304,14 @@ var TemplateDefinitionBuilder = class {
|
|
|
22180
22304
|
visitForLoopBlock(block) {
|
|
22181
22305
|
const blockIndex = this.allocateDataSlot();
|
|
22182
22306
|
const { tagName, attrsExprs } = this.inferProjectionDataFromInsertionPoint(block);
|
|
22183
|
-
const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count]
|
|
22307
|
+
const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count], block.i18n, {
|
|
22308
|
+
[block.contextVariables.$index.name]: this.getLevelSpecificVariableName("$index", this.level + 1),
|
|
22309
|
+
[block.contextVariables.$count.name]: this.getLevelSpecificVariableName("$count", this.level + 1)
|
|
22310
|
+
});
|
|
22184
22311
|
const { expression: trackByExpression, usesComponentInstance: trackByUsesComponentInstance } = this.createTrackByFunction(block);
|
|
22185
22312
|
let emptyData = null;
|
|
22186
22313
|
if (block.empty !== null) {
|
|
22187
|
-
emptyData = this.prepareEmbeddedTemplateFn(block.empty.children, "_ForEmpty");
|
|
22314
|
+
emptyData = this.prepareEmbeddedTemplateFn(block.empty.children, "_ForEmpty", void 0, block.empty.i18n);
|
|
22188
22315
|
this.allocateBindingSlots(null);
|
|
22189
22316
|
}
|
|
22190
22317
|
this.registerComputedLoopVariables(block, primaryData.scope);
|
|
@@ -22206,16 +22333,31 @@ var TemplateDefinitionBuilder = class {
|
|
|
22206
22333
|
return params;
|
|
22207
22334
|
});
|
|
22208
22335
|
const value = block.expression.visit(this._valueConverter);
|
|
22209
|
-
this.
|
|
22336
|
+
this.updateInstructionWithAdvance(blockIndex, block.sourceSpan, Identifiers.repeater, () => [this.convertPropertyBinding(value)]);
|
|
22210
22337
|
}
|
|
22211
22338
|
registerComputedLoopVariables(block, bindingScope) {
|
|
22212
|
-
const indexLocalName = block.contextVariables.$index.name;
|
|
22213
|
-
const countLocalName = block.contextVariables.$count.name;
|
|
22214
22339
|
const level = bindingScope.bindingLevel;
|
|
22215
|
-
bindingScope.set(level, block.contextVariables.$odd.name, (scope) =>
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
bindingScope.set(level, block.contextVariables.$
|
|
22340
|
+
bindingScope.set(level, block.contextVariables.$odd.name, (scope, retrievalLevel) => {
|
|
22341
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").modulo(literal(2)).notIdentical(literal(0));
|
|
22342
|
+
});
|
|
22343
|
+
bindingScope.set(level, block.contextVariables.$even.name, (scope, retrievalLevel) => {
|
|
22344
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").modulo(literal(2)).identical(literal(0));
|
|
22345
|
+
});
|
|
22346
|
+
bindingScope.set(level, block.contextVariables.$first.name, (scope, retrievalLevel) => {
|
|
22347
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").identical(literal(0));
|
|
22348
|
+
});
|
|
22349
|
+
bindingScope.set(level, block.contextVariables.$last.name, (scope, retrievalLevel) => {
|
|
22350
|
+
const index = this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index");
|
|
22351
|
+
const count = this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$count");
|
|
22352
|
+
return index.identical(count.minus(literal(1)));
|
|
22353
|
+
});
|
|
22354
|
+
}
|
|
22355
|
+
getLevelSpecificVariableName(name, level) {
|
|
22356
|
+
return `\u0275${name}_${level}`;
|
|
22357
|
+
}
|
|
22358
|
+
getLevelSpecificForLoopVariable(block, scope, retrievalLevel, name) {
|
|
22359
|
+
const scopeName = scope.bindingLevel === retrievalLevel ? block.contextVariables[name].name : this.getLevelSpecificVariableName(name, retrievalLevel);
|
|
22360
|
+
return scope.get(scopeName);
|
|
22219
22361
|
}
|
|
22220
22362
|
optimizeTrackByFunction(block) {
|
|
22221
22363
|
const indexLocalName = block.contextVariables.$index.name;
|
|
@@ -22625,7 +22767,7 @@ var BindingScope = class {
|
|
|
22625
22767
|
if (value.declareLocalCallback && !value.declare) {
|
|
22626
22768
|
value.declare = true;
|
|
22627
22769
|
}
|
|
22628
|
-
return typeof value.lhs === "function" ? value.lhs(this) : value.lhs;
|
|
22770
|
+
return typeof value.lhs === "function" ? value.lhs(this, value.retrievalLevel) : value.lhs;
|
|
22629
22771
|
}
|
|
22630
22772
|
current = current.parent;
|
|
22631
22773
|
}
|
|
@@ -22701,7 +22843,7 @@ var BindingScope = class {
|
|
|
22701
22843
|
const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);
|
|
22702
22844
|
componentValue.declare = true;
|
|
22703
22845
|
this.maybeRestoreView();
|
|
22704
|
-
const lhs = typeof componentValue.lhs === "function" ? componentValue.lhs(this) : componentValue.lhs;
|
|
22846
|
+
const lhs = typeof componentValue.lhs === "function" ? componentValue.lhs(this, componentValue.retrievalLevel) : componentValue.lhs;
|
|
22705
22847
|
return name === DIRECT_CONTEXT_REFERENCE ? lhs : lhs.prop(name);
|
|
22706
22848
|
}
|
|
22707
22849
|
maybeRestoreView() {
|
|
@@ -23006,7 +23148,7 @@ function createClosureModeGuard2() {
|
|
|
23006
23148
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23007
23149
|
}
|
|
23008
23150
|
|
|
23009
|
-
// bazel-out/
|
|
23151
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23010
23152
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23011
23153
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23012
23154
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23057,6 +23199,9 @@ function addFeatures(definitionMap, meta) {
|
|
|
23057
23199
|
break;
|
|
23058
23200
|
}
|
|
23059
23201
|
}
|
|
23202
|
+
if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
|
|
23203
|
+
features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
|
|
23204
|
+
}
|
|
23060
23205
|
if (meta.usesInheritance) {
|
|
23061
23206
|
features.push(importExpr(Identifiers.InheritDefinitionFeature));
|
|
23062
23207
|
}
|
|
@@ -23069,9 +23214,6 @@ function addFeatures(definitionMap, meta) {
|
|
|
23069
23214
|
if (meta.hasOwnProperty("template") && meta.isStandalone) {
|
|
23070
23215
|
features.push(importExpr(Identifiers.StandaloneFeature));
|
|
23071
23216
|
}
|
|
23072
|
-
if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
|
|
23073
|
-
features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
|
|
23074
|
-
}
|
|
23075
23217
|
if (features.length) {
|
|
23076
23218
|
definitionMap.set("features", literalArr(features));
|
|
23077
23219
|
}
|
|
@@ -23608,7 +23750,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
23608
23750
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
23609
23751
|
}
|
|
23610
23752
|
|
|
23611
|
-
// bazel-out/
|
|
23753
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
23612
23754
|
var R3TargetBinder = class {
|
|
23613
23755
|
constructor(directiveMatcher) {
|
|
23614
23756
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -24213,11 +24355,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24213
24355
|
return templateEntities;
|
|
24214
24356
|
}
|
|
24215
24357
|
|
|
24216
|
-
// bazel-out/
|
|
24358
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24217
24359
|
var ResourceLoader = class {
|
|
24218
24360
|
};
|
|
24219
24361
|
|
|
24220
|
-
// bazel-out/
|
|
24362
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24221
24363
|
var CompilerFacadeImpl = class {
|
|
24222
24364
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24223
24365
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24769,17 +24911,17 @@ function publishFacade(global) {
|
|
|
24769
24911
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24770
24912
|
}
|
|
24771
24913
|
|
|
24772
|
-
// bazel-out/
|
|
24773
|
-
var VERSION2 = new Version("17.0.
|
|
24914
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
24915
|
+
var VERSION2 = new Version("17.0.5");
|
|
24774
24916
|
|
|
24775
|
-
// bazel-out/
|
|
24917
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
24776
24918
|
var _VisitorMode;
|
|
24777
24919
|
(function(_VisitorMode2) {
|
|
24778
24920
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
24779
24921
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
24780
24922
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
24781
24923
|
|
|
24782
|
-
// bazel-out/
|
|
24924
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
24783
24925
|
var XmlTagDefinition = class {
|
|
24784
24926
|
constructor() {
|
|
24785
24927
|
this.closedByParent = false;
|
|
@@ -24801,7 +24943,7 @@ var XmlTagDefinition = class {
|
|
|
24801
24943
|
};
|
|
24802
24944
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
24803
24945
|
|
|
24804
|
-
// bazel-out/
|
|
24946
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
24805
24947
|
var FactoryTarget2;
|
|
24806
24948
|
(function(FactoryTarget3) {
|
|
24807
24949
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -24811,13 +24953,14 @@ var FactoryTarget2;
|
|
|
24811
24953
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
24812
24954
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
24813
24955
|
|
|
24814
|
-
// bazel-out/
|
|
24956
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
24815
24957
|
publishFacade(_global);
|
|
24816
24958
|
|
|
24817
|
-
// bazel-out/
|
|
24959
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/types.mjs
|
|
24818
24960
|
var ngtemplate = "ng-template";
|
|
24819
24961
|
var boundngifelse = "[ngIfElse]";
|
|
24820
24962
|
var boundngifthenelse = "[ngIfThenElse]";
|
|
24963
|
+
var boundngifthen = "[ngIfThen]";
|
|
24821
24964
|
var nakedngfor = "ngFor";
|
|
24822
24965
|
function allFormsOf(selector) {
|
|
24823
24966
|
return [
|
|
@@ -24874,17 +25017,44 @@ var ElementToMigrate = class {
|
|
|
24874
25017
|
this.thenAttr = thenAttr;
|
|
24875
25018
|
this.forAttrs = forAttrs;
|
|
24876
25019
|
}
|
|
24877
|
-
getCondition(
|
|
24878
|
-
const
|
|
24879
|
-
|
|
25020
|
+
getCondition() {
|
|
25021
|
+
const chunks = this.attr.value.split(";");
|
|
25022
|
+
let condition = chunks[0];
|
|
25023
|
+
const elseIx = condition.indexOf(" else ");
|
|
25024
|
+
const thenIx = condition.indexOf(" then ");
|
|
25025
|
+
if (thenIx > -1) {
|
|
25026
|
+
condition = condition.slice(0, thenIx);
|
|
25027
|
+
} else if (elseIx > -1) {
|
|
25028
|
+
condition = condition.slice(0, elseIx);
|
|
25029
|
+
}
|
|
25030
|
+
let letVar = chunks.find((c) => c.search(/\s*let\s/) > -1);
|
|
25031
|
+
return condition + (letVar ? ";" + letVar : "");
|
|
24880
25032
|
}
|
|
24881
25033
|
getTemplateName(targetStr, secondStr) {
|
|
24882
25034
|
const targetLocation = this.attr.value.indexOf(targetStr);
|
|
24883
|
-
|
|
24884
|
-
|
|
24885
|
-
|
|
25035
|
+
const secondTargetLocation = secondStr ? this.attr.value.indexOf(secondStr) : void 0;
|
|
25036
|
+
return this.attr.value.slice(targetLocation + targetStr.length, secondTargetLocation).replace(":", "").trim().split(";")[0].trim();
|
|
25037
|
+
}
|
|
25038
|
+
getValueEnd(offset) {
|
|
25039
|
+
return (this.attr.valueSpan ? this.attr.valueSpan.end.offset + 1 : this.attr.keySpan.end.offset) - offset;
|
|
25040
|
+
}
|
|
25041
|
+
hasChildren() {
|
|
25042
|
+
return this.el.children.length > 0;
|
|
25043
|
+
}
|
|
25044
|
+
getChildSpan(offset) {
|
|
25045
|
+
const childStart = this.el.children[0].sourceSpan.start.offset - offset;
|
|
25046
|
+
const childEnd = this.el.children[this.el.children.length - 1].sourceSpan.end.offset - offset;
|
|
25047
|
+
return { childStart, childEnd };
|
|
25048
|
+
}
|
|
25049
|
+
shouldRemoveElseAttr() {
|
|
25050
|
+
return (this.el.name === "ng-template" || this.el.name === "ng-container") && this.elseAttr !== void 0;
|
|
25051
|
+
}
|
|
25052
|
+
getElseAttrStr() {
|
|
25053
|
+
if (this.elseAttr !== void 0) {
|
|
25054
|
+
const elseValStr = this.elseAttr.value !== "" ? `="${this.elseAttr.value}"` : "";
|
|
25055
|
+
return `${this.elseAttr.name}${elseValStr}`;
|
|
24886
25056
|
}
|
|
24887
|
-
return
|
|
25057
|
+
return "";
|
|
24888
25058
|
}
|
|
24889
25059
|
start(offset) {
|
|
24890
25060
|
var _a2;
|
|
@@ -24900,17 +25070,34 @@ var ElementToMigrate = class {
|
|
|
24900
25070
|
}
|
|
24901
25071
|
};
|
|
24902
25072
|
var Template2 = class {
|
|
24903
|
-
constructor(el, i18n2) {
|
|
25073
|
+
constructor(el, name, i18n2) {
|
|
24904
25074
|
__publicField(this, "el");
|
|
25075
|
+
__publicField(this, "name");
|
|
24905
25076
|
__publicField(this, "count", 0);
|
|
24906
25077
|
__publicField(this, "contents", "");
|
|
24907
25078
|
__publicField(this, "children", "");
|
|
24908
25079
|
__publicField(this, "i18n", null);
|
|
25080
|
+
__publicField(this, "attributes");
|
|
24909
25081
|
this.el = el;
|
|
25082
|
+
this.name = name;
|
|
25083
|
+
this.attributes = el.attrs;
|
|
24910
25084
|
this.i18n = i18n2;
|
|
24911
25085
|
}
|
|
25086
|
+
get isNgTemplateOutlet() {
|
|
25087
|
+
return this.attributes.find((attr) => attr.name === "*ngTemplateOutlet") !== void 0;
|
|
25088
|
+
}
|
|
25089
|
+
get outletContext() {
|
|
25090
|
+
const letVar = this.attributes.find((attr) => attr.name.startsWith("let-"));
|
|
25091
|
+
return letVar ? `; context: {$implicit: ${letVar.name.split("-")[1]}}` : "";
|
|
25092
|
+
}
|
|
25093
|
+
generateTemplateOutlet() {
|
|
25094
|
+
var _a2;
|
|
25095
|
+
const attr = this.attributes.find((attr2) => attr2.name === "*ngTemplateOutlet");
|
|
25096
|
+
const outletValue = (_a2 = attr == null ? void 0 : attr.value) != null ? _a2 : this.name.slice(1);
|
|
25097
|
+
return `<ng-container *ngTemplateOutlet="${outletValue}${this.outletContext}"></ng-container>`;
|
|
25098
|
+
}
|
|
24912
25099
|
generateContents(tmpl) {
|
|
24913
|
-
this.contents = tmpl.slice(this.el.sourceSpan.start.offset, this.el.sourceSpan.end.offset
|
|
25100
|
+
this.contents = tmpl.slice(this.el.sourceSpan.start.offset, this.el.sourceSpan.end.offset);
|
|
24914
25101
|
this.children = "";
|
|
24915
25102
|
if (this.el.children.length > 0) {
|
|
24916
25103
|
this.children = tmpl.slice(this.el.children[0].sourceSpan.start.offset, this.el.children[this.el.children.length - 1].sourceSpan.end.offset);
|
|
@@ -24921,16 +25108,18 @@ var AnalyzedFile = class {
|
|
|
24921
25108
|
constructor() {
|
|
24922
25109
|
__publicField(this, "ranges", []);
|
|
24923
25110
|
__publicField(this, "removeCommonModule", false);
|
|
25111
|
+
__publicField(this, "sourceFilePath", "");
|
|
24924
25112
|
}
|
|
24925
25113
|
getSortedRanges() {
|
|
24926
|
-
const templateRanges = this.ranges.slice().filter((x) => x.type
|
|
25114
|
+
const templateRanges = this.ranges.slice().filter((x) => x.type !== "import").sort((aStart, bStart) => bStart.start - aStart.start);
|
|
24927
25115
|
const importRanges = this.ranges.slice().filter((x) => x.type === "import").sort((aStart, bStart) => bStart.start - aStart.start);
|
|
24928
25116
|
return [...templateRanges, ...importRanges];
|
|
24929
25117
|
}
|
|
24930
|
-
static addRange(path2, analyzedFiles, range) {
|
|
25118
|
+
static addRange(path2, sourceFilePath, analyzedFiles, range) {
|
|
24931
25119
|
let analysis = analyzedFiles.get(path2);
|
|
24932
25120
|
if (!analysis) {
|
|
24933
25121
|
analysis = new AnalyzedFile();
|
|
25122
|
+
analysis.sourceFilePath = sourceFilePath;
|
|
24934
25123
|
analyzedFiles.set(path2, analysis);
|
|
24935
25124
|
}
|
|
24936
25125
|
const duplicate = analysis.ranges.find((current) => current.start === range.start && current.end === range.end);
|
|
@@ -24978,7 +25167,7 @@ var ElementCollector = class extends RecursiveVisitor {
|
|
|
24978
25167
|
for (const attr of el.attrs) {
|
|
24979
25168
|
if (this._attributes.includes(attr.name)) {
|
|
24980
25169
|
const elseAttr = el.attrs.find((x) => x.name === boundngifelse);
|
|
24981
|
-
const thenAttr = el.attrs.find((x) => x.name === boundngifthenelse);
|
|
25170
|
+
const thenAttr = el.attrs.find((x) => x.name === boundngifthenelse || x.name === boundngifthen);
|
|
24982
25171
|
const forAttrs = attr.name === nakedngfor ? this.getForAttrs(el) : void 0;
|
|
24983
25172
|
this.elements.push(new ElementToMigrate(el, attr, elseAttr, thenAttr, forAttrs));
|
|
24984
25173
|
}
|
|
@@ -25027,16 +25216,18 @@ var TemplateCollector = class extends RecursiveVisitor {
|
|
|
25027
25216
|
templateAttr = attr;
|
|
25028
25217
|
}
|
|
25029
25218
|
}
|
|
25030
|
-
if (templateAttr !== null) {
|
|
25219
|
+
if (templateAttr !== null && !this.templates.has(templateAttr.name)) {
|
|
25220
|
+
this.templates.set(templateAttr.name, new Template2(el, templateAttr.name, i18n2));
|
|
25031
25221
|
this.elements.push(new ElementToMigrate(el, templateAttr));
|
|
25032
|
-
|
|
25222
|
+
} else if (templateAttr !== null) {
|
|
25223
|
+
throw new Error(`A duplicate ng-template name "${templateAttr.name}" was found. The control flow migration requires unique ng-template names within a component.`);
|
|
25033
25224
|
}
|
|
25034
25225
|
}
|
|
25035
25226
|
super.visitElement(el, null);
|
|
25036
25227
|
}
|
|
25037
25228
|
};
|
|
25038
25229
|
|
|
25039
|
-
// bazel-out/
|
|
25230
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/util.mjs
|
|
25040
25231
|
var import_path2 = require("path");
|
|
25041
25232
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
25042
25233
|
var importRemovals = [
|
|
@@ -25060,13 +25251,19 @@ function analyze(sourceFile, analyzedFiles) {
|
|
|
25060
25251
|
}
|
|
25061
25252
|
});
|
|
25062
25253
|
}
|
|
25254
|
+
function checkIfShouldChange(decl, removeCommonModule) {
|
|
25255
|
+
const clause = decl.getChildAt(1);
|
|
25256
|
+
return !(!removeCommonModule && clause.namedBindings && import_typescript5.default.isNamedImports(clause.namedBindings) && clause.namedBindings.elements.length === 1 && clause.namedBindings.elements[0].getText() === "CommonModule");
|
|
25257
|
+
}
|
|
25063
25258
|
function updateImportDeclaration(decl, removeCommonModule) {
|
|
25064
25259
|
const clause = decl.getChildAt(1);
|
|
25065
25260
|
const updatedClause = updateImportClause(clause, removeCommonModule);
|
|
25066
25261
|
if (updatedClause === null) {
|
|
25067
25262
|
return "";
|
|
25068
25263
|
}
|
|
25069
|
-
const printer = import_typescript5.default.createPrinter(
|
|
25264
|
+
const printer = import_typescript5.default.createPrinter({
|
|
25265
|
+
removeComments: true
|
|
25266
|
+
});
|
|
25070
25267
|
const updated = import_typescript5.default.factory.updateImportDeclaration(decl, decl.modifiers, updatedClause, decl.moduleSpecifier, void 0);
|
|
25071
25268
|
return printer.printNode(import_typescript5.default.EmitHint.Unspecified, updated, clause.getSourceFile());
|
|
25072
25269
|
}
|
|
@@ -25082,10 +25279,15 @@ function updateImportClause(clause, removeCommonModule) {
|
|
|
25082
25279
|
return clause;
|
|
25083
25280
|
}
|
|
25084
25281
|
function updateClassImports(propAssignment, removeCommonModule) {
|
|
25085
|
-
const printer = import_typescript5.default.createPrinter(
|
|
25282
|
+
const printer = import_typescript5.default.createPrinter({
|
|
25283
|
+
removeComments: true
|
|
25284
|
+
});
|
|
25086
25285
|
const importList = propAssignment.initializer;
|
|
25087
25286
|
const removals = removeCommonModule ? importWithCommonRemovals : importRemovals;
|
|
25088
25287
|
const elements = importList.elements.filter((el) => !removals.includes(el.getText()));
|
|
25288
|
+
if (elements.length === importList.elements.length) {
|
|
25289
|
+
return null;
|
|
25290
|
+
}
|
|
25089
25291
|
const updatedElements = import_typescript5.default.factory.updateArrayLiteralExpression(importList, elements);
|
|
25090
25292
|
const updatedAssignment = import_typescript5.default.factory.updatePropertyAssignment(propAssignment, propAssignment.name, updatedElements);
|
|
25091
25293
|
return printer.printNode(import_typescript5.default.EmitHint.Unspecified, updatedAssignment, updatedAssignment.getSourceFile());
|
|
@@ -25098,7 +25300,7 @@ function analyzeImportDeclarations(node, sourceFile, analyzedFiles) {
|
|
|
25098
25300
|
if (clause.namedBindings && import_typescript5.default.isNamedImports(clause.namedBindings)) {
|
|
25099
25301
|
const elements = clause.namedBindings.elements.filter((el) => importWithCommonRemovals.includes(el.getText()));
|
|
25100
25302
|
if (elements.length > 0) {
|
|
25101
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, { start: node.getStart(), end: node.getEnd(), node, type: "import" });
|
|
25303
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, { start: node.getStart(), end: node.getEnd(), node, type: "import" });
|
|
25102
25304
|
}
|
|
25103
25305
|
}
|
|
25104
25306
|
}
|
|
@@ -25117,7 +25319,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25117
25319
|
}
|
|
25118
25320
|
switch (prop.name.text) {
|
|
25119
25321
|
case "template":
|
|
25120
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, {
|
|
25322
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, {
|
|
25121
25323
|
start: prop.initializer.getStart() + 1,
|
|
25122
25324
|
end: prop.initializer.getEnd() - 1,
|
|
25123
25325
|
node: prop,
|
|
@@ -25125,7 +25327,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25125
25327
|
});
|
|
25126
25328
|
break;
|
|
25127
25329
|
case "imports":
|
|
25128
|
-
AnalyzedFile.addRange(sourceFile.fileName, analyzedFiles, {
|
|
25330
|
+
AnalyzedFile.addRange(sourceFile.fileName, sourceFile.fileName, analyzedFiles, {
|
|
25129
25331
|
start: prop.name.getStart(),
|
|
25130
25332
|
end: prop.initializer.getEnd(),
|
|
25131
25333
|
node: prop,
|
|
@@ -25135,7 +25337,7 @@ function analyzeDecorators(node, sourceFile, analyzedFiles) {
|
|
|
25135
25337
|
case "templateUrl":
|
|
25136
25338
|
if (import_typescript5.default.isStringLiteralLike(prop.initializer)) {
|
|
25137
25339
|
const path2 = (0, import_path2.join)((0, import_path2.dirname)(sourceFile.fileName), prop.initializer.text);
|
|
25138
|
-
AnalyzedFile.addRange(path2, analyzedFiles, { start: 0, node: prop, type: "
|
|
25340
|
+
AnalyzedFile.addRange(path2, sourceFile.fileName, analyzedFiles, { start: 0, node: prop, type: "templateUrl" });
|
|
25139
25341
|
}
|
|
25140
25342
|
break;
|
|
25141
25343
|
}
|
|
@@ -25201,7 +25403,7 @@ function reduceNestingOffset(el, nestLevel, offset, postOffsets) {
|
|
|
25201
25403
|
}
|
|
25202
25404
|
return offset;
|
|
25203
25405
|
}
|
|
25204
|
-
function
|
|
25406
|
+
function getTemplates(template2) {
|
|
25205
25407
|
var _a2;
|
|
25206
25408
|
const parsed = parseTemplate2(template2);
|
|
25207
25409
|
if (parsed !== null) {
|
|
@@ -25209,7 +25411,7 @@ function countTemplateUsage(template2) {
|
|
|
25209
25411
|
visitAll2(visitor, parsed.rootNodes);
|
|
25210
25412
|
for (let [key, tmpl] of visitor.templates) {
|
|
25211
25413
|
const escapeKey = escapeRegExp(key.slice(1));
|
|
25212
|
-
const regex = new RegExp(`[^a-zA-Z0-9-<]${escapeKey}\\W`, "gm");
|
|
25414
|
+
const regex = new RegExp(`[^a-zA-Z0-9-<']${escapeKey}\\W`, "gm");
|
|
25213
25415
|
const matches = template2.match(regex);
|
|
25214
25416
|
tmpl.count = (_a2 = matches == null ? void 0 : matches.length) != null ? _a2 : 0;
|
|
25215
25417
|
tmpl.generateContents(template2);
|
|
@@ -25219,27 +25421,47 @@ function countTemplateUsage(template2) {
|
|
|
25219
25421
|
return /* @__PURE__ */ new Map();
|
|
25220
25422
|
}
|
|
25221
25423
|
function wrapIntoI18nContainer(i18nAttr, content) {
|
|
25424
|
+
const { start, middle, end } = generatei18nContainer(i18nAttr, content);
|
|
25425
|
+
return `${start}${middle}${end}`;
|
|
25426
|
+
}
|
|
25427
|
+
function generatei18nContainer(i18nAttr, middle) {
|
|
25222
25428
|
const i18n2 = i18nAttr.value === "" ? "i18n" : `i18n="${i18nAttr.value}"`;
|
|
25223
|
-
return `<ng-container ${i18n2}
|
|
25429
|
+
return { start: `<ng-container ${i18n2}>`, middle, end: `</ng-container>` };
|
|
25224
25430
|
}
|
|
25225
25431
|
function processNgTemplates(template2) {
|
|
25226
|
-
|
|
25227
|
-
|
|
25228
|
-
const
|
|
25229
|
-
|
|
25230
|
-
|
|
25231
|
-
|
|
25232
|
-
|
|
25233
|
-
|
|
25234
|
-
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
|
|
25238
|
-
|
|
25432
|
+
try {
|
|
25433
|
+
const templates = getTemplates(template2);
|
|
25434
|
+
for (const [name, t] of templates) {
|
|
25435
|
+
const replaceRegex = new RegExp(`${name}\\|`, "g");
|
|
25436
|
+
const forRegex = new RegExp(`${name}\\#`, "g");
|
|
25437
|
+
const forMatches = [...template2.matchAll(forRegex)];
|
|
25438
|
+
const matches = [...forMatches, ...template2.matchAll(replaceRegex)];
|
|
25439
|
+
let safeToRemove = true;
|
|
25440
|
+
if (matches.length > 0) {
|
|
25441
|
+
if (t.i18n !== null) {
|
|
25442
|
+
const container = wrapIntoI18nContainer(t.i18n, t.children);
|
|
25443
|
+
template2 = template2.replace(replaceRegex, container);
|
|
25444
|
+
} else if (t.children.trim() === "" && t.isNgTemplateOutlet) {
|
|
25445
|
+
template2 = template2.replace(replaceRegex, t.generateTemplateOutlet());
|
|
25446
|
+
} else if (forMatches.length > 0) {
|
|
25447
|
+
if (t.count === 2) {
|
|
25448
|
+
template2 = template2.replace(forRegex, t.children);
|
|
25449
|
+
} else {
|
|
25450
|
+
template2 = template2.replace(forRegex, t.generateTemplateOutlet());
|
|
25451
|
+
safeToRemove = false;
|
|
25452
|
+
}
|
|
25453
|
+
} else {
|
|
25454
|
+
template2 = template2.replace(replaceRegex, t.children);
|
|
25455
|
+
}
|
|
25456
|
+
if (t.count === matches.length + 1 && safeToRemove) {
|
|
25457
|
+
template2 = template2.replace(t.contents, "");
|
|
25458
|
+
}
|
|
25239
25459
|
}
|
|
25240
25460
|
}
|
|
25461
|
+
return { migrated: template2, err: void 0 };
|
|
25462
|
+
} catch (err) {
|
|
25463
|
+
return { migrated: template2, err };
|
|
25241
25464
|
}
|
|
25242
|
-
return template2;
|
|
25243
25465
|
}
|
|
25244
25466
|
function canRemoveCommonModule(template2) {
|
|
25245
25467
|
const parsed = parseTemplate2(template2);
|
|
@@ -25253,20 +25475,24 @@ function canRemoveCommonModule(template2) {
|
|
|
25253
25475
|
}
|
|
25254
25476
|
function removeImports(template2, node, removeCommonModule) {
|
|
25255
25477
|
if (template2.startsWith("imports") && import_typescript5.default.isPropertyAssignment(node)) {
|
|
25256
|
-
|
|
25257
|
-
|
|
25478
|
+
const updatedImport = updateClassImports(node, removeCommonModule);
|
|
25479
|
+
return updatedImport != null ? updatedImport : template2;
|
|
25480
|
+
} else if (import_typescript5.default.isImportDeclaration(node) && checkIfShouldChange(node, removeCommonModule)) {
|
|
25258
25481
|
return updateImportDeclaration(node, removeCommonModule);
|
|
25259
25482
|
}
|
|
25260
25483
|
return template2;
|
|
25261
25484
|
}
|
|
25262
25485
|
function getOriginals(etm, tmpl, offset) {
|
|
25263
25486
|
if (etm.el.children.length > 0) {
|
|
25487
|
+
const childStart = etm.el.children[0].sourceSpan.start.offset - offset;
|
|
25488
|
+
const childEnd = etm.el.children[etm.el.children.length - 1].sourceSpan.end.offset - offset;
|
|
25264
25489
|
const start2 = tmpl.slice(etm.el.sourceSpan.start.offset - offset, etm.el.children[0].sourceSpan.start.offset - offset);
|
|
25265
25490
|
const end = tmpl.slice(etm.el.children[etm.el.children.length - 1].sourceSpan.end.offset - offset, etm.el.sourceSpan.end.offset - offset);
|
|
25266
|
-
|
|
25491
|
+
const childLength = childEnd - childStart;
|
|
25492
|
+
return { start: start2, end, childLength };
|
|
25267
25493
|
}
|
|
25268
25494
|
const start = tmpl.slice(etm.el.sourceSpan.start.offset - offset, etm.el.sourceSpan.end.offset - offset);
|
|
25269
|
-
return { start, end: "" };
|
|
25495
|
+
return { start, end: "", childLength: 0 };
|
|
25270
25496
|
}
|
|
25271
25497
|
function isI18nTemplate(etm, i18nAttr) {
|
|
25272
25498
|
return etm.el.name === "ng-template" && i18nAttr !== void 0 && (etm.el.attrs.length === 2 || etm.el.attrs.length === 3 && etm.elseAttr !== void 0);
|
|
@@ -25277,30 +25503,78 @@ function isRemovableContainer(etm) {
|
|
|
25277
25503
|
function getMainBlock(etm, tmpl, offset) {
|
|
25278
25504
|
const i18nAttr = etm.el.attrs.find((x) => x.name === "i18n");
|
|
25279
25505
|
if (isRemovableContainer(etm)) {
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25506
|
+
let middle2 = "";
|
|
25507
|
+
if (etm.hasChildren()) {
|
|
25508
|
+
const { childStart: childStart2, childEnd: childEnd2 } = etm.getChildSpan(offset);
|
|
25509
|
+
middle2 = tmpl.slice(childStart2, childEnd2);
|
|
25510
|
+
}
|
|
25283
25511
|
return { start: "", middle: middle2, end: "" };
|
|
25284
25512
|
} else if (isI18nTemplate(etm, i18nAttr)) {
|
|
25285
|
-
const childStart2 = etm.
|
|
25286
|
-
|
|
25287
|
-
const middle2 = wrapIntoI18nContainer(i18nAttr, tmpl.slice(childStart2, childEnd2));
|
|
25288
|
-
return { start: "", middle: middle2, end: "" };
|
|
25513
|
+
const { childStart: childStart2, childEnd: childEnd2 } = etm.getChildSpan(offset);
|
|
25514
|
+
return generatei18nContainer(i18nAttr, tmpl.slice(childStart2, childEnd2));
|
|
25289
25515
|
}
|
|
25290
25516
|
const attrStart = etm.attr.keySpan.start.offset - 1 - offset;
|
|
25291
|
-
const valEnd =
|
|
25292
|
-
|
|
25293
|
-
let
|
|
25294
|
-
if (etm.
|
|
25295
|
-
|
|
25296
|
-
childEnd = etm.el.children[etm.el.children.length - 1].sourceSpan.end.offset - offset;
|
|
25517
|
+
const valEnd = etm.getValueEnd(offset);
|
|
25518
|
+
const { childStart, childEnd } = etm.hasChildren() ? etm.getChildSpan(offset) : { childStart: valEnd, childEnd: valEnd };
|
|
25519
|
+
let start = tmpl.slice(etm.start(offset), attrStart) + tmpl.slice(valEnd, childStart);
|
|
25520
|
+
if (etm.shouldRemoveElseAttr()) {
|
|
25521
|
+
start = start.replace(etm.getElseAttrStr(), "");
|
|
25297
25522
|
}
|
|
25298
|
-
let start = tmpl.slice(etm.start(offset), attrStart);
|
|
25299
|
-
start += tmpl.slice(valEnd, childStart);
|
|
25300
25523
|
const middle = tmpl.slice(childStart, childEnd);
|
|
25301
25524
|
const end = tmpl.slice(childEnd, etm.end(offset));
|
|
25302
25525
|
return { start, middle, end };
|
|
25303
25526
|
}
|
|
25527
|
+
var selfClosingList = "input|br|img|base|wbr|area|col|embed|hr|link|meta|param|source|track";
|
|
25528
|
+
function formatTemplate(tmpl, templateType) {
|
|
25529
|
+
if (tmpl.indexOf("\n") > -1) {
|
|
25530
|
+
let openSelfClosingEl = false;
|
|
25531
|
+
const openBlockRegex = /^\s*\@(if|switch|case|default|for)|^\s*\}\s\@else/;
|
|
25532
|
+
const openElRegex = /^\s*<([a-z0-9]+)(?![^>]*\/>)[^>]*>?/;
|
|
25533
|
+
const selfClosingRegex = new RegExp(`^\\s*<(${selfClosingList}).+\\/?>`);
|
|
25534
|
+
const openSelfClosingRegex = new RegExp(`^\\s*<(${selfClosingList})(?![^>]*\\/>)[^>]*$`);
|
|
25535
|
+
const closeBlockRegex = /^\s*\}\s*$|^\s*\}\s\@else/;
|
|
25536
|
+
const closeElRegex = /\s*<\/([a-zA-Z0-9\-]+)*>/;
|
|
25537
|
+
const closeMultiLineElRegex = /^\s*([a-zA-Z0-9\-\[\]]+)?=?"?([^”<]+)?"?\s?\/>$/;
|
|
25538
|
+
const closeSelfClosingMultiLineRegex = /^\s*([a-zA-Z0-9\-\[\]]+)?=?"?([^”\/<]+)?"?\s?>$/;
|
|
25539
|
+
const singleLineElRegex = /\s*<([a-zA-Z0-9]+)(?![^>]*\/>)[^>]*>.*<\/([a-zA-Z0-9\-]+)*>/;
|
|
25540
|
+
const lines = tmpl.split("\n");
|
|
25541
|
+
const formatted = [];
|
|
25542
|
+
let indent = "";
|
|
25543
|
+
let mindent = "";
|
|
25544
|
+
for (let [index, line] of lines.entries()) {
|
|
25545
|
+
if (line.trim() === "" && index !== 0 && index !== lines.length - 1) {
|
|
25546
|
+
continue;
|
|
25547
|
+
}
|
|
25548
|
+
if (templateType === "template" && index <= 1) {
|
|
25549
|
+
const ind = line.search(/\S/);
|
|
25550
|
+
mindent = ind > -1 ? line.slice(0, ind) : "";
|
|
25551
|
+
}
|
|
25552
|
+
if ((closeBlockRegex.test(line) || closeElRegex.test(line) && (!singleLineElRegex.test(line) && !closeMultiLineElRegex.test(line))) && indent !== "") {
|
|
25553
|
+
indent = indent.slice(2);
|
|
25554
|
+
}
|
|
25555
|
+
formatted.push(mindent + indent + line.trim());
|
|
25556
|
+
if (closeMultiLineElRegex.test(line)) {
|
|
25557
|
+
indent = indent.slice(2);
|
|
25558
|
+
if (openSelfClosingEl) {
|
|
25559
|
+
openSelfClosingEl = false;
|
|
25560
|
+
}
|
|
25561
|
+
}
|
|
25562
|
+
if (closeSelfClosingMultiLineRegex.test(line) && openSelfClosingEl) {
|
|
25563
|
+
openSelfClosingEl = false;
|
|
25564
|
+
indent = indent.slice(2);
|
|
25565
|
+
}
|
|
25566
|
+
if ((openBlockRegex.test(line) || openElRegex.test(line)) && !singleLineElRegex.test(line) && !selfClosingRegex.test(line) && !openSelfClosingRegex.test(line)) {
|
|
25567
|
+
indent += " ";
|
|
25568
|
+
}
|
|
25569
|
+
if (openSelfClosingRegex.test(line)) {
|
|
25570
|
+
openSelfClosingEl = true;
|
|
25571
|
+
indent += " ";
|
|
25572
|
+
}
|
|
25573
|
+
}
|
|
25574
|
+
tmpl = formatted.join("\n");
|
|
25575
|
+
}
|
|
25576
|
+
return tmpl;
|
|
25577
|
+
}
|
|
25304
25578
|
function forEachClass(sourceFile, callback) {
|
|
25305
25579
|
sourceFile.forEachChild(function walk(node) {
|
|
25306
25580
|
if (import_typescript5.default.isClassDeclaration(node) || import_typescript5.default.isImportDeclaration(node)) {
|
|
@@ -25310,7 +25584,85 @@ function forEachClass(sourceFile, callback) {
|
|
|
25310
25584
|
});
|
|
25311
25585
|
}
|
|
25312
25586
|
|
|
25313
|
-
// bazel-out/
|
|
25587
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/cases.mjs
|
|
25588
|
+
var boundcase = "[ngSwitchCase]";
|
|
25589
|
+
var switchcase = "*ngSwitchCase";
|
|
25590
|
+
var nakedcase = "ngSwitchCase";
|
|
25591
|
+
var switchdefault = "*ngSwitchDefault";
|
|
25592
|
+
var nakeddefault = "ngSwitchDefault";
|
|
25593
|
+
var cases = [
|
|
25594
|
+
boundcase,
|
|
25595
|
+
switchcase,
|
|
25596
|
+
nakedcase,
|
|
25597
|
+
switchdefault,
|
|
25598
|
+
nakeddefault
|
|
25599
|
+
];
|
|
25600
|
+
function migrateCase(template2) {
|
|
25601
|
+
let errors = [];
|
|
25602
|
+
let parsed = parseTemplate2(template2);
|
|
25603
|
+
if (parsed === null) {
|
|
25604
|
+
return { migrated: template2, errors, changed: false };
|
|
25605
|
+
}
|
|
25606
|
+
let result = template2;
|
|
25607
|
+
const visitor = new ElementCollector(cases);
|
|
25608
|
+
visitAll2(visitor, parsed.rootNodes);
|
|
25609
|
+
calculateNesting(visitor, hasLineBreaks(template2));
|
|
25610
|
+
let offset = 0;
|
|
25611
|
+
let nestLevel = -1;
|
|
25612
|
+
let postOffsets = [];
|
|
25613
|
+
for (const el of visitor.elements) {
|
|
25614
|
+
let migrateResult = { tmpl: result, offsets: { pre: 0, post: 0 } };
|
|
25615
|
+
offset = reduceNestingOffset(el, nestLevel, offset, postOffsets);
|
|
25616
|
+
if (el.attr.name === switchcase || el.attr.name === nakedcase || el.attr.name === boundcase) {
|
|
25617
|
+
try {
|
|
25618
|
+
migrateResult = migrateNgSwitchCase(el, result, offset);
|
|
25619
|
+
} catch (error2) {
|
|
25620
|
+
errors.push({ type: switchcase, error: error2 });
|
|
25621
|
+
}
|
|
25622
|
+
} else if (el.attr.name === switchdefault || el.attr.name === nakeddefault) {
|
|
25623
|
+
try {
|
|
25624
|
+
migrateResult = migrateNgSwitchDefault(el, result, offset);
|
|
25625
|
+
} catch (error2) {
|
|
25626
|
+
errors.push({ type: switchdefault, error: error2 });
|
|
25627
|
+
}
|
|
25628
|
+
}
|
|
25629
|
+
result = migrateResult.tmpl;
|
|
25630
|
+
offset += migrateResult.offsets.pre;
|
|
25631
|
+
postOffsets.push(migrateResult.offsets.post);
|
|
25632
|
+
nestLevel = el.nestCount;
|
|
25633
|
+
}
|
|
25634
|
+
const changed = visitor.elements.length > 0;
|
|
25635
|
+
return { migrated: result, errors, changed };
|
|
25636
|
+
}
|
|
25637
|
+
function migrateNgSwitchCase(etm, tmpl, offset) {
|
|
25638
|
+
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
25639
|
+
const leadingSpace = etm.hasLineBreaks ? "" : " ";
|
|
25640
|
+
const condition = etm.attr.value;
|
|
25641
|
+
const originals = getOriginals(etm, tmpl, offset);
|
|
25642
|
+
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25643
|
+
const startBlock = `${leadingSpace}@case (${condition}) {${leadingSpace}${lbString}${start}`;
|
|
25644
|
+
const endBlock = `${end}${lbString}${leadingSpace}}`;
|
|
25645
|
+
const defaultBlock = startBlock + middle + endBlock;
|
|
25646
|
+
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + defaultBlock + tmpl.slice(etm.end(offset));
|
|
25647
|
+
const pre = originals.start.length - startBlock.length;
|
|
25648
|
+
const post = originals.end.length - endBlock.length;
|
|
25649
|
+
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25650
|
+
}
|
|
25651
|
+
function migrateNgSwitchDefault(etm, tmpl, offset) {
|
|
25652
|
+
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
25653
|
+
const leadingSpace = etm.hasLineBreaks ? "" : " ";
|
|
25654
|
+
const originals = getOriginals(etm, tmpl, offset);
|
|
25655
|
+
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25656
|
+
const startBlock = `${leadingSpace}@default {${leadingSpace}${lbString}${start}`;
|
|
25657
|
+
const endBlock = `${end}${lbString}${leadingSpace}}`;
|
|
25658
|
+
const defaultBlock = startBlock + middle + endBlock;
|
|
25659
|
+
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + defaultBlock + tmpl.slice(etm.end(offset));
|
|
25660
|
+
const pre = originals.start.length - startBlock.length;
|
|
25661
|
+
const post = originals.end.length - endBlock.length;
|
|
25662
|
+
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25663
|
+
}
|
|
25664
|
+
|
|
25665
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/fors.mjs
|
|
25314
25666
|
var ngfor = "*ngFor";
|
|
25315
25667
|
var nakedngfor2 = "ngFor";
|
|
25316
25668
|
var fors = [
|
|
@@ -25330,7 +25682,7 @@ function migrateFor(template2) {
|
|
|
25330
25682
|
let errors = [];
|
|
25331
25683
|
let parsed = parseTemplate2(template2);
|
|
25332
25684
|
if (parsed === null) {
|
|
25333
|
-
return { migrated: template2, errors };
|
|
25685
|
+
return { migrated: template2, errors, changed: false };
|
|
25334
25686
|
}
|
|
25335
25687
|
let result = template2;
|
|
25336
25688
|
const visitor = new ElementCollector(fors);
|
|
@@ -25352,7 +25704,8 @@ function migrateFor(template2) {
|
|
|
25352
25704
|
postOffsets.push(migrateResult.offsets.post);
|
|
25353
25705
|
nestLevel = el.nestCount;
|
|
25354
25706
|
}
|
|
25355
|
-
|
|
25707
|
+
const changed = visitor.elements.length > 0;
|
|
25708
|
+
return { migrated: result, errors, changed };
|
|
25356
25709
|
}
|
|
25357
25710
|
function migrateNgFor(etm, tmpl, offset) {
|
|
25358
25711
|
if (etm.forAttrs !== void 0) {
|
|
@@ -25365,20 +25718,26 @@ function migrateStandardNgFor(etm, tmpl, offset) {
|
|
|
25365
25718
|
const aliasWithAsRegexp = /(count|index|first|last|even|odd)\s+as/gm;
|
|
25366
25719
|
const aliases = [];
|
|
25367
25720
|
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
25368
|
-
const lbSpaces = etm.hasLineBreaks ? `
|
|
25369
|
-
` : "";
|
|
25370
25721
|
const parts = getNgForParts(etm.attr.value);
|
|
25371
25722
|
const originals = getOriginals(etm, tmpl, offset);
|
|
25372
25723
|
const condition = parts[0].replace("let ", "");
|
|
25724
|
+
if (condition.indexOf(" as ") > -1) {
|
|
25725
|
+
let errorMessage = `Found an aliased collection on an ngFor: "${condition}". Collection aliasing is not supported with @for. Refactor the code to remove the \`as\` alias and re-run the migration.`;
|
|
25726
|
+
throw new Error(errorMessage);
|
|
25727
|
+
}
|
|
25373
25728
|
const loopVar = condition.split(" of ")[0];
|
|
25374
25729
|
let trackBy = loopVar;
|
|
25375
25730
|
let aliasedIndex = null;
|
|
25731
|
+
let tmplPlaceholder = "";
|
|
25376
25732
|
for (let i = 1; i < parts.length; i++) {
|
|
25377
25733
|
const part = parts[i].trim();
|
|
25378
25734
|
if (part.startsWith("trackBy:")) {
|
|
25379
25735
|
const trackByFn = part.replace("trackBy:", "").trim();
|
|
25380
25736
|
trackBy = `${trackByFn}($index, ${loopVar})`;
|
|
25381
25737
|
}
|
|
25738
|
+
if (part.startsWith("template:")) {
|
|
25739
|
+
tmplPlaceholder = `#${part.split(":")[1].trim()}#`;
|
|
25740
|
+
}
|
|
25382
25741
|
if (part.match(aliasWithEqualRegexp)) {
|
|
25383
25742
|
const aliasParts = part.split("=");
|
|
25384
25743
|
aliases.push(` ${aliasParts[0].trim()} = $${aliasParts[1].trim()}`);
|
|
@@ -25398,10 +25757,18 @@ function migrateStandardNgFor(etm, tmpl, offset) {
|
|
|
25398
25757
|
trackBy = trackBy.replace("$index", aliasedIndex);
|
|
25399
25758
|
}
|
|
25400
25759
|
const aliasStr = aliases.length > 0 ? `;${aliases.join(";")}` : "";
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
|
|
25404
|
-
|
|
25760
|
+
let startBlock = `@for (${condition}; track ${trackBy}${aliasStr}) {${lbString}`;
|
|
25761
|
+
let endBlock = `${lbString}}`;
|
|
25762
|
+
let forBlock = "";
|
|
25763
|
+
if (tmplPlaceholder !== "") {
|
|
25764
|
+
startBlock = startBlock + tmplPlaceholder;
|
|
25765
|
+
forBlock = startBlock + endBlock;
|
|
25766
|
+
} else {
|
|
25767
|
+
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25768
|
+
startBlock += start;
|
|
25769
|
+
endBlock = end + endBlock;
|
|
25770
|
+
forBlock = startBlock + middle + endBlock;
|
|
25771
|
+
}
|
|
25405
25772
|
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + forBlock + tmpl.slice(etm.end(offset));
|
|
25406
25773
|
const pre = originals.start.length - startBlock.length;
|
|
25407
25774
|
const post = originals.end.length - endBlock.length;
|
|
@@ -25427,7 +25794,7 @@ function migrateBoundNgFor(etm, tmpl, offset) {
|
|
|
25427
25794
|
}
|
|
25428
25795
|
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25429
25796
|
const startBlock = `@for (${condition}; track ${trackBy}${aliasStr}) {
|
|
25430
|
-
|
|
25797
|
+
${start}`;
|
|
25431
25798
|
const endBlock = `${end}
|
|
25432
25799
|
}`;
|
|
25433
25800
|
const forBlock = startBlock + middle + endBlock;
|
|
@@ -25468,7 +25835,7 @@ function getNgForParts(expression) {
|
|
|
25468
25835
|
return parts;
|
|
25469
25836
|
}
|
|
25470
25837
|
|
|
25471
|
-
// bazel-out/
|
|
25838
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/ifs.mjs
|
|
25472
25839
|
var ngif = "*ngIf";
|
|
25473
25840
|
var boundngif = "[ngIf]";
|
|
25474
25841
|
var nakedngif = "ngIf";
|
|
@@ -25481,7 +25848,7 @@ function migrateIf(template2) {
|
|
|
25481
25848
|
let errors = [];
|
|
25482
25849
|
let parsed = parseTemplate2(template2);
|
|
25483
25850
|
if (parsed === null) {
|
|
25484
|
-
return { migrated: template2, errors };
|
|
25851
|
+
return { migrated: template2, errors, changed: false };
|
|
25485
25852
|
}
|
|
25486
25853
|
let result = template2;
|
|
25487
25854
|
const visitor = new ElementCollector(ifs);
|
|
@@ -25503,11 +25870,12 @@ function migrateIf(template2) {
|
|
|
25503
25870
|
postOffsets.push(migrateResult.offsets.post);
|
|
25504
25871
|
nestLevel = el.nestCount;
|
|
25505
25872
|
}
|
|
25506
|
-
|
|
25873
|
+
const changed = visitor.elements.length > 0;
|
|
25874
|
+
return { migrated: result, errors, changed };
|
|
25507
25875
|
}
|
|
25508
25876
|
function migrateNgIf(etm, tmpl, offset) {
|
|
25509
|
-
const matchThen = etm.attr.value.match(
|
|
25510
|
-
const matchElse = etm.attr.value.match(
|
|
25877
|
+
const matchThen = etm.attr.value.match(/;?\s*then/gm);
|
|
25878
|
+
const matchElse = etm.attr.value.match(/;?\s*else/gm);
|
|
25511
25879
|
if (etm.thenAttr !== void 0 || etm.elseAttr !== void 0) {
|
|
25512
25880
|
return buildBoundIfElseBlock(etm, tmpl, offset);
|
|
25513
25881
|
} else if (matchThen && matchThen.length > 0) {
|
|
@@ -25519,7 +25887,7 @@ function migrateNgIf(etm, tmpl, offset) {
|
|
|
25519
25887
|
}
|
|
25520
25888
|
function buildIfBlock(etm, tmpl, offset) {
|
|
25521
25889
|
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
25522
|
-
const condition = etm.attr.value.replace(" as ", "; as ");
|
|
25890
|
+
const condition = etm.attr.value.replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
25523
25891
|
const originals = getOriginals(etm, tmpl, offset);
|
|
25524
25892
|
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25525
25893
|
const startBlock = `@if (${condition}) {${lbString}${start}`;
|
|
@@ -25531,7 +25899,7 @@ function buildIfBlock(etm, tmpl, offset) {
|
|
|
25531
25899
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25532
25900
|
}
|
|
25533
25901
|
function buildStandardIfElseBlock(etm, tmpl, elseString, offset) {
|
|
25534
|
-
const condition = etm.getCondition(
|
|
25902
|
+
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
25535
25903
|
const elsePlaceholder = `#${etm.getTemplateName(elseString)}|`;
|
|
25536
25904
|
return buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset);
|
|
25537
25905
|
}
|
|
@@ -25560,7 +25928,7 @@ function buildIfElseBlock(etm, tmpl, condition, elsePlaceholder, offset) {
|
|
|
25560
25928
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25561
25929
|
}
|
|
25562
25930
|
function buildStandardIfThenElseBlock(etm, tmpl, thenString, elseString, offset) {
|
|
25563
|
-
const condition = etm.getCondition(
|
|
25931
|
+
const condition = etm.getCondition().replace(" as ", "; as ").replace(/;\s*let/g, "; as");
|
|
25564
25932
|
const thenPlaceholder = `#${etm.getTemplateName(thenString, elseString)}|`;
|
|
25565
25933
|
const elsePlaceholder = `#${etm.getTemplateName(elseString)}|`;
|
|
25566
25934
|
return buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceholder, offset);
|
|
@@ -25575,31 +25943,21 @@ function buildIfThenElseBlock(etm, tmpl, condition, thenPlaceholder, elsePlaceho
|
|
|
25575
25943
|
const tmplStart = tmpl.slice(0, etm.start(offset));
|
|
25576
25944
|
const tmplEnd = tmpl.slice(etm.end(offset));
|
|
25577
25945
|
const updatedTmpl = tmplStart + ifThenElseBlock + tmplEnd;
|
|
25578
|
-
const pre = originals.start.length - startBlock.length;
|
|
25946
|
+
const pre = originals.start.length + originals.childLength - startBlock.length;
|
|
25579
25947
|
const post = originals.end.length - postBlock.length;
|
|
25580
25948
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25581
25949
|
}
|
|
25582
25950
|
|
|
25583
|
-
// bazel-out/
|
|
25951
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/switches.mjs
|
|
25584
25952
|
var ngswitch = "[ngSwitch]";
|
|
25585
|
-
var boundcase = "[ngSwitchCase]";
|
|
25586
|
-
var switchcase = "*ngSwitchCase";
|
|
25587
|
-
var nakedcase = "ngSwitchCase";
|
|
25588
|
-
var switchdefault = "*ngSwitchDefault";
|
|
25589
|
-
var nakeddefault = "ngSwitchDefault";
|
|
25590
25953
|
var switches = [
|
|
25591
|
-
ngswitch
|
|
25592
|
-
boundcase,
|
|
25593
|
-
switchcase,
|
|
25594
|
-
nakedcase,
|
|
25595
|
-
switchdefault,
|
|
25596
|
-
nakeddefault
|
|
25954
|
+
ngswitch
|
|
25597
25955
|
];
|
|
25598
25956
|
function migrateSwitch(template2) {
|
|
25599
25957
|
let errors = [];
|
|
25600
25958
|
let parsed = parseTemplate2(template2);
|
|
25601
25959
|
if (parsed === null) {
|
|
25602
|
-
return { migrated: template2, errors };
|
|
25960
|
+
return { migrated: template2, errors, changed: false };
|
|
25603
25961
|
}
|
|
25604
25962
|
let result = template2;
|
|
25605
25963
|
const visitor = new ElementCollector(switches);
|
|
@@ -25617,25 +25975,14 @@ function migrateSwitch(template2) {
|
|
|
25617
25975
|
} catch (error2) {
|
|
25618
25976
|
errors.push({ type: ngswitch, error: error2 });
|
|
25619
25977
|
}
|
|
25620
|
-
} else if (el.attr.name === switchcase || el.attr.name === nakedcase || el.attr.name === boundcase) {
|
|
25621
|
-
try {
|
|
25622
|
-
migrateResult = migrateNgSwitchCase(el, result, offset);
|
|
25623
|
-
} catch (error2) {
|
|
25624
|
-
errors.push({ type: ngswitch, error: error2 });
|
|
25625
|
-
}
|
|
25626
|
-
} else if (el.attr.name === switchdefault || el.attr.name === nakeddefault) {
|
|
25627
|
-
try {
|
|
25628
|
-
migrateResult = migrateNgSwitchDefault(el, result, offset);
|
|
25629
|
-
} catch (error2) {
|
|
25630
|
-
errors.push({ type: ngswitch, error: error2 });
|
|
25631
|
-
}
|
|
25632
25978
|
}
|
|
25633
25979
|
result = migrateResult.tmpl;
|
|
25634
25980
|
offset += migrateResult.offsets.pre;
|
|
25635
25981
|
postOffsets.push(migrateResult.offsets.post);
|
|
25636
25982
|
nestLevel = el.nestCount;
|
|
25637
25983
|
}
|
|
25638
|
-
|
|
25984
|
+
const changed = visitor.elements.length > 0;
|
|
25985
|
+
return { migrated: result, errors, changed };
|
|
25639
25986
|
}
|
|
25640
25987
|
function migrateNgSwitch(etm, tmpl, offset) {
|
|
25641
25988
|
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
@@ -25650,50 +25997,35 @@ function migrateNgSwitch(etm, tmpl, offset) {
|
|
|
25650
25997
|
const post = originals.end.length - endBlock.length;
|
|
25651
25998
|
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25652
25999
|
}
|
|
25653
|
-
function migrateNgSwitchCase(etm, tmpl, offset) {
|
|
25654
|
-
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
25655
|
-
const lbSpaces = etm.hasLineBreaks ? " " : "";
|
|
25656
|
-
const leadingSpace = etm.hasLineBreaks ? "" : " ";
|
|
25657
|
-
const condition = etm.attr.value;
|
|
25658
|
-
const originals = getOriginals(etm, tmpl, offset);
|
|
25659
|
-
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25660
|
-
const startBlock = `${leadingSpace}@case (${condition}) {${leadingSpace}${lbString}${lbSpaces}${start}`;
|
|
25661
|
-
const endBlock = `${end}${lbString}${leadingSpace}}`;
|
|
25662
|
-
const defaultBlock = startBlock + middle + endBlock;
|
|
25663
|
-
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + defaultBlock + tmpl.slice(etm.end(offset));
|
|
25664
|
-
const pre = originals.start.length - startBlock.length;
|
|
25665
|
-
const post = originals.end.length - endBlock.length;
|
|
25666
|
-
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25667
|
-
}
|
|
25668
|
-
function migrateNgSwitchDefault(etm, tmpl, offset) {
|
|
25669
|
-
const lbString = etm.hasLineBreaks ? "\n" : "";
|
|
25670
|
-
const lbSpaces = etm.hasLineBreaks ? " " : "";
|
|
25671
|
-
const leadingSpace = etm.hasLineBreaks ? "" : " ";
|
|
25672
|
-
const originals = getOriginals(etm, tmpl, offset);
|
|
25673
|
-
const { start, middle, end } = getMainBlock(etm, tmpl, offset);
|
|
25674
|
-
const startBlock = `${leadingSpace}@default {${leadingSpace}${lbString}${lbSpaces}${start}`;
|
|
25675
|
-
const endBlock = `${end}${lbString}${leadingSpace}}`;
|
|
25676
|
-
const defaultBlock = startBlock + middle + endBlock;
|
|
25677
|
-
const updatedTmpl = tmpl.slice(0, etm.start(offset)) + defaultBlock + tmpl.slice(etm.end(offset));
|
|
25678
|
-
const pre = originals.start.length - startBlock.length;
|
|
25679
|
-
const post = originals.end.length - endBlock.length;
|
|
25680
|
-
return { tmpl: updatedTmpl, offsets: { pre, post } };
|
|
25681
|
-
}
|
|
25682
26000
|
|
|
25683
|
-
// bazel-out/
|
|
25684
|
-
function migrateTemplate(template2, templateType, node, file) {
|
|
26001
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/migration.mjs
|
|
26002
|
+
function migrateTemplate(template2, templateType, node, file, format = true, analyzedFiles) {
|
|
25685
26003
|
let errors = [];
|
|
25686
26004
|
let migrated = template2;
|
|
25687
|
-
if (templateType === "template") {
|
|
26005
|
+
if (templateType === "template" || templateType === "templateUrl") {
|
|
25688
26006
|
const ifResult = migrateIf(template2);
|
|
25689
26007
|
const forResult = migrateFor(ifResult.migrated);
|
|
25690
26008
|
const switchResult = migrateSwitch(forResult.migrated);
|
|
25691
|
-
|
|
26009
|
+
const caseResult = migrateCase(switchResult.migrated);
|
|
26010
|
+
const templateResult = processNgTemplates(caseResult.migrated);
|
|
26011
|
+
if (templateResult.err !== void 0) {
|
|
26012
|
+
return { migrated: template2, errors: [{ type: "template", error: templateResult.err }] };
|
|
26013
|
+
}
|
|
26014
|
+
migrated = templateResult.migrated;
|
|
26015
|
+
const changed = ifResult.changed || forResult.changed || switchResult.changed || caseResult.changed;
|
|
26016
|
+
if (format && changed) {
|
|
26017
|
+
migrated = formatTemplate(migrated, templateType);
|
|
26018
|
+
}
|
|
25692
26019
|
file.removeCommonModule = canRemoveCommonModule(template2);
|
|
26020
|
+
if (templateType === "templateUrl" && analyzedFiles !== null && analyzedFiles.has(file.sourceFilePath)) {
|
|
26021
|
+
const componentFile = analyzedFiles.get(file.sourceFilePath);
|
|
26022
|
+
componentFile.removeCommonModule = file.removeCommonModule;
|
|
26023
|
+
}
|
|
25693
26024
|
errors = [
|
|
25694
26025
|
...ifResult.errors,
|
|
25695
26026
|
...forResult.errors,
|
|
25696
|
-
...switchResult.errors
|
|
26027
|
+
...switchResult.errors,
|
|
26028
|
+
...caseResult.errors
|
|
25697
26029
|
];
|
|
25698
26030
|
} else {
|
|
25699
26031
|
migrated = removeImports(template2, node, file.removeCommonModule);
|
|
@@ -25701,7 +26033,7 @@ function migrateTemplate(template2, templateType, node, file) {
|
|
|
25701
26033
|
return { migrated, errors };
|
|
25702
26034
|
}
|
|
25703
26035
|
|
|
25704
|
-
// bazel-out/
|
|
26036
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/ng-generate/control-flow-migration/index.mjs
|
|
25705
26037
|
function control_flow_migration_default(options) {
|
|
25706
26038
|
return (tree, context) => __async(this, null, function* () {
|
|
25707
26039
|
const basePath = process.cwd();
|
|
@@ -25742,7 +26074,9 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25742
26074
|
for (const sourceFile of sourceFiles) {
|
|
25743
26075
|
analyze(sourceFile, analysis);
|
|
25744
26076
|
}
|
|
25745
|
-
|
|
26077
|
+
const paths = sortFilePaths([...analysis.keys()]);
|
|
26078
|
+
for (const path2 of paths) {
|
|
26079
|
+
const file = analysis.get(path2);
|
|
25746
26080
|
const ranges = file.getSortedRanges();
|
|
25747
26081
|
const relativePath = (0, import_path3.relative)(basePath, path2);
|
|
25748
26082
|
const content = tree.readText(relativePath);
|
|
@@ -25750,7 +26084,7 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25750
26084
|
for (const { start, end, node, type } of ranges) {
|
|
25751
26085
|
const template2 = content.slice(start, end);
|
|
25752
26086
|
const length = (end != null ? end : content.length) - start;
|
|
25753
|
-
const { migrated, errors } = migrateTemplate(template2, type, node, file);
|
|
26087
|
+
const { migrated, errors } = migrateTemplate(template2, type, node, file, schematicOptions.format, analysis);
|
|
25754
26088
|
if (migrated !== null) {
|
|
25755
26089
|
update.remove(start, length);
|
|
25756
26090
|
update.insertLeft(start, migrated);
|
|
@@ -25767,6 +26101,10 @@ function runControlFlowMigration(tree, tsconfigPath, basePath, pathToMigrate, sc
|
|
|
25767
26101
|
}
|
|
25768
26102
|
return errorList;
|
|
25769
26103
|
}
|
|
26104
|
+
function sortFilePaths(names) {
|
|
26105
|
+
names.sort((a, _) => a.endsWith(".html") ? -1 : 0);
|
|
26106
|
+
return names;
|
|
26107
|
+
}
|
|
25770
26108
|
function generateErrorMessage(path2, errors) {
|
|
25771
26109
|
let errorMessage = `Template "${path2}" encountered ${errors.length} errors during migration:
|
|
25772
26110
|
`;
|