@angular/core 17.1.0-next.0 → 17.1.0-next.2
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 +559 -415
- 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 +908 -568
- 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 +982 -691
- 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/migrations/block-template-entities/index.mjs
|
|
67
67
|
var block_template_entities_exports = {};
|
|
68
68
|
__export(block_template_entities_exports, {
|
|
69
69
|
default: () => block_template_entities_default
|
|
@@ -72,7 +72,7 @@ module.exports = __toCommonJS(block_template_entities_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/project_tsconfig_paths.mjs
|
|
76
76
|
var import_core = require("@angular-devkit/core");
|
|
77
77
|
function getProjectTsConfigPaths(tree) {
|
|
78
78
|
return __async(this, null, function* () {
|
|
@@ -152,11 +152,11 @@ function getWorkspace(tree) {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
// bazel-out/
|
|
155
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
156
156
|
var import_path = require("path");
|
|
157
157
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
158
158
|
|
|
159
|
-
// bazel-out/
|
|
159
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
160
160
|
var path = __toESM(require("path"), 1);
|
|
161
161
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
162
162
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -173,7 +173,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
173
173
|
return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
// bazel-out/
|
|
176
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
177
177
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
178
178
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
179
179
|
return import_typescript2.default.createProgram(rootNames, options, host);
|
|
@@ -206,7 +206,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
206
206
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
// bazel-out/
|
|
209
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/selector.mjs
|
|
210
210
|
var _SELECTOR_REGEXP = new RegExp(
|
|
211
211
|
`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,
|
|
212
212
|
"g"
|
|
@@ -514,7 +514,7 @@ var SelectorContext = class {
|
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
516
|
|
|
517
|
-
// bazel-out/
|
|
517
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/core.mjs
|
|
518
518
|
var ViewEncapsulation;
|
|
519
519
|
(function(ViewEncapsulation2) {
|
|
520
520
|
ViewEncapsulation2[ViewEncapsulation2["Emulated"] = 0] = "Emulated";
|
|
@@ -576,7 +576,7 @@ function parseSelectorToR3Selector(selector) {
|
|
|
576
576
|
return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : [];
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
-
// bazel-out/
|
|
579
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
580
580
|
var textEncoder;
|
|
581
581
|
function computeDigest(message) {
|
|
582
582
|
return sha1(serializeNodes(message.nodes).join("") + `[${message.meaning}]`);
|
|
@@ -609,6 +609,9 @@ var _SerializerVisitor = class {
|
|
|
609
609
|
visitIcuPlaceholder(ph, context) {
|
|
610
610
|
return `<ph icu name="${ph.name}">${ph.value.visit(this)}</ph>`;
|
|
611
611
|
}
|
|
612
|
+
visitBlockPlaceholder(ph, context) {
|
|
613
|
+
return `<ph block name="${ph.startName}">${ph.children.map((child) => child.visit(this)).join(", ")}</ph name="${ph.closeName}">`;
|
|
614
|
+
}
|
|
612
615
|
};
|
|
613
616
|
var serializerVisitor = new _SerializerVisitor();
|
|
614
617
|
function serializeNodes(nodes) {
|
|
@@ -813,7 +816,7 @@ function wordAt(bytes, index, endian) {
|
|
|
813
816
|
return word;
|
|
814
817
|
}
|
|
815
818
|
|
|
816
|
-
// bazel-out/
|
|
819
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
817
820
|
var TypeModifier;
|
|
818
821
|
(function(TypeModifier2) {
|
|
819
822
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1768,7 +1771,7 @@ function serializeTags(tags) {
|
|
|
1768
1771
|
return out;
|
|
1769
1772
|
}
|
|
1770
1773
|
|
|
1771
|
-
// bazel-out/
|
|
1774
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1772
1775
|
var CONSTANT_PREFIX = "_c";
|
|
1773
1776
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1774
1777
|
var KEY_CONTEXT = {};
|
|
@@ -1951,7 +1954,7 @@ function isLongStringLiteral(expr) {
|
|
|
1951
1954
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1952
1955
|
}
|
|
1953
1956
|
|
|
1954
|
-
// bazel-out/
|
|
1957
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1955
1958
|
var CORE = "@angular/core";
|
|
1956
1959
|
var _Identifiers = class {
|
|
1957
1960
|
};
|
|
@@ -2584,7 +2587,7 @@ var Identifiers = _Identifiers;
|
|
|
2584
2587
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2585
2588
|
})();
|
|
2586
2589
|
|
|
2587
|
-
// bazel-out/
|
|
2590
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2588
2591
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2589
2592
|
function dashCaseToCamelCase(input) {
|
|
2590
2593
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2672,7 +2675,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2672
2675
|
return [truthy, falsy];
|
|
2673
2676
|
}
|
|
2674
2677
|
|
|
2675
|
-
// bazel-out/
|
|
2678
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2676
2679
|
var VERSION = 3;
|
|
2677
2680
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2678
2681
|
var SourceMapGenerator = class {
|
|
@@ -2801,7 +2804,7 @@ function toBase64Digit(value) {
|
|
|
2801
2804
|
return B64_DIGITS[value];
|
|
2802
2805
|
}
|
|
2803
2806
|
|
|
2804
|
-
// bazel-out/
|
|
2807
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2805
2808
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2806
2809
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2807
2810
|
var _INDENT_WITH = " ";
|
|
@@ -3286,7 +3289,7 @@ function _createIndent(count) {
|
|
|
3286
3289
|
return res;
|
|
3287
3290
|
}
|
|
3288
3291
|
|
|
3289
|
-
// bazel-out/
|
|
3292
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3290
3293
|
function typeWithParameters(type, numParams) {
|
|
3291
3294
|
if (numParams === 0) {
|
|
3292
3295
|
return expressionType(type);
|
|
@@ -3351,7 +3354,7 @@ function generateForwardRef(expr) {
|
|
|
3351
3354
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3352
3355
|
}
|
|
3353
3356
|
|
|
3354
|
-
// bazel-out/
|
|
3357
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3355
3358
|
var R3FactoryDelegateType;
|
|
3356
3359
|
(function(R3FactoryDelegateType2) {
|
|
3357
3360
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3496,7 +3499,40 @@ function getInjectFn(target) {
|
|
|
3496
3499
|
}
|
|
3497
3500
|
}
|
|
3498
3501
|
|
|
3499
|
-
// bazel-out/
|
|
3502
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3503
|
+
var TagContentType;
|
|
3504
|
+
(function(TagContentType2) {
|
|
3505
|
+
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
3506
|
+
TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
|
|
3507
|
+
TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
|
|
3508
|
+
})(TagContentType || (TagContentType = {}));
|
|
3509
|
+
function splitNsName(elementName) {
|
|
3510
|
+
if (elementName[0] != ":") {
|
|
3511
|
+
return [null, elementName];
|
|
3512
|
+
}
|
|
3513
|
+
const colonIndex = elementName.indexOf(":", 1);
|
|
3514
|
+
if (colonIndex === -1) {
|
|
3515
|
+
throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
|
|
3516
|
+
}
|
|
3517
|
+
return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
|
|
3518
|
+
}
|
|
3519
|
+
function isNgContainer(tagName) {
|
|
3520
|
+
return splitNsName(tagName)[1] === "ng-container";
|
|
3521
|
+
}
|
|
3522
|
+
function isNgContent(tagName) {
|
|
3523
|
+
return splitNsName(tagName)[1] === "ng-content";
|
|
3524
|
+
}
|
|
3525
|
+
function isNgTemplate(tagName) {
|
|
3526
|
+
return splitNsName(tagName)[1] === "ng-template";
|
|
3527
|
+
}
|
|
3528
|
+
function getNsPrefix(fullName) {
|
|
3529
|
+
return fullName === null ? null : splitNsName(fullName)[0];
|
|
3530
|
+
}
|
|
3531
|
+
function mergeNsAndName(prefix, localName) {
|
|
3532
|
+
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3535
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3500
3536
|
var Comment = class {
|
|
3501
3537
|
constructor(value, sourceSpan) {
|
|
3502
3538
|
this.value = value;
|
|
@@ -3654,43 +3690,47 @@ var BlockNode = class {
|
|
|
3654
3690
|
}
|
|
3655
3691
|
};
|
|
3656
3692
|
var DeferredBlockPlaceholder = class extends BlockNode {
|
|
3657
|
-
constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3693
|
+
constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
3658
3694
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3659
3695
|
this.children = children;
|
|
3660
3696
|
this.minimumTime = minimumTime;
|
|
3697
|
+
this.i18n = i18n2;
|
|
3661
3698
|
}
|
|
3662
3699
|
visit(visitor) {
|
|
3663
3700
|
return visitor.visitDeferredBlockPlaceholder(this);
|
|
3664
3701
|
}
|
|
3665
3702
|
};
|
|
3666
3703
|
var DeferredBlockLoading = class extends BlockNode {
|
|
3667
|
-
constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3704
|
+
constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
3668
3705
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3669
3706
|
this.children = children;
|
|
3670
3707
|
this.afterTime = afterTime;
|
|
3671
3708
|
this.minimumTime = minimumTime;
|
|
3709
|
+
this.i18n = i18n2;
|
|
3672
3710
|
}
|
|
3673
3711
|
visit(visitor) {
|
|
3674
3712
|
return visitor.visitDeferredBlockLoading(this);
|
|
3675
3713
|
}
|
|
3676
3714
|
};
|
|
3677
3715
|
var DeferredBlockError = class extends BlockNode {
|
|
3678
|
-
constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3716
|
+
constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
3679
3717
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3680
3718
|
this.children = children;
|
|
3719
|
+
this.i18n = i18n2;
|
|
3681
3720
|
}
|
|
3682
3721
|
visit(visitor) {
|
|
3683
3722
|
return visitor.visitDeferredBlockError(this);
|
|
3684
3723
|
}
|
|
3685
3724
|
};
|
|
3686
3725
|
var DeferredBlock = class extends BlockNode {
|
|
3687
|
-
constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan) {
|
|
3726
|
+
constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n2) {
|
|
3688
3727
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3689
3728
|
this.children = children;
|
|
3690
3729
|
this.placeholder = placeholder;
|
|
3691
3730
|
this.loading = loading;
|
|
3692
3731
|
this.error = error2;
|
|
3693
3732
|
this.mainBlockSpan = mainBlockSpan;
|
|
3733
|
+
this.i18n = i18n2;
|
|
3694
3734
|
this.triggers = triggers;
|
|
3695
3735
|
this.prefetchTriggers = prefetchTriggers;
|
|
3696
3736
|
this.definedTriggers = Object.keys(triggers);
|
|
@@ -3722,17 +3762,18 @@ var SwitchBlock = class extends BlockNode {
|
|
|
3722
3762
|
}
|
|
3723
3763
|
};
|
|
3724
3764
|
var SwitchBlockCase = class extends BlockNode {
|
|
3725
|
-
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3765
|
+
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
3726
3766
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3727
3767
|
this.expression = expression;
|
|
3728
3768
|
this.children = children;
|
|
3769
|
+
this.i18n = i18n2;
|
|
3729
3770
|
}
|
|
3730
3771
|
visit(visitor) {
|
|
3731
3772
|
return visitor.visitSwitchBlockCase(this);
|
|
3732
3773
|
}
|
|
3733
3774
|
};
|
|
3734
3775
|
var ForLoopBlock = class extends BlockNode {
|
|
3735
|
-
constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3776
|
+
constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
3736
3777
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3737
3778
|
this.item = item;
|
|
3738
3779
|
this.expression = expression;
|
|
@@ -3742,15 +3783,17 @@ var ForLoopBlock = class extends BlockNode {
|
|
|
3742
3783
|
this.children = children;
|
|
3743
3784
|
this.empty = empty;
|
|
3744
3785
|
this.mainBlockSpan = mainBlockSpan;
|
|
3786
|
+
this.i18n = i18n2;
|
|
3745
3787
|
}
|
|
3746
3788
|
visit(visitor) {
|
|
3747
3789
|
return visitor.visitForLoopBlock(this);
|
|
3748
3790
|
}
|
|
3749
3791
|
};
|
|
3750
3792
|
var ForLoopBlockEmpty = class extends BlockNode {
|
|
3751
|
-
constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3793
|
+
constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
3752
3794
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3753
3795
|
this.children = children;
|
|
3796
|
+
this.i18n = i18n2;
|
|
3754
3797
|
}
|
|
3755
3798
|
visit(visitor) {
|
|
3756
3799
|
return visitor.visitForLoopBlockEmpty(this);
|
|
@@ -3766,11 +3809,12 @@ var IfBlock = class extends BlockNode {
|
|
|
3766
3809
|
}
|
|
3767
3810
|
};
|
|
3768
3811
|
var IfBlockBranch = class extends BlockNode {
|
|
3769
|
-
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3812
|
+
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n2) {
|
|
3770
3813
|
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3771
3814
|
this.expression = expression;
|
|
3772
3815
|
this.children = children;
|
|
3773
3816
|
this.expressionAlias = expressionAlias;
|
|
3817
|
+
this.i18n = i18n2;
|
|
3774
3818
|
}
|
|
3775
3819
|
visit(visitor) {
|
|
3776
3820
|
return visitor.visitIfBlockBranch(this);
|
|
@@ -3869,7 +3913,7 @@ function visitAll(visitor, nodes) {
|
|
|
3869
3913
|
return result;
|
|
3870
3914
|
}
|
|
3871
3915
|
|
|
3872
|
-
// bazel-out/
|
|
3916
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3873
3917
|
var Message = class {
|
|
3874
3918
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3875
3919
|
this.nodes = nodes;
|
|
@@ -3960,6 +4004,21 @@ var IcuPlaceholder = class {
|
|
|
3960
4004
|
return visitor.visitIcuPlaceholder(this, context);
|
|
3961
4005
|
}
|
|
3962
4006
|
};
|
|
4007
|
+
var BlockPlaceholder = class {
|
|
4008
|
+
constructor(name, parameters, startName, closeName, children, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
4009
|
+
this.name = name;
|
|
4010
|
+
this.parameters = parameters;
|
|
4011
|
+
this.startName = startName;
|
|
4012
|
+
this.closeName = closeName;
|
|
4013
|
+
this.children = children;
|
|
4014
|
+
this.sourceSpan = sourceSpan;
|
|
4015
|
+
this.startSourceSpan = startSourceSpan;
|
|
4016
|
+
this.endSourceSpan = endSourceSpan;
|
|
4017
|
+
}
|
|
4018
|
+
visit(visitor, context) {
|
|
4019
|
+
return visitor.visitBlockPlaceholder(this, context);
|
|
4020
|
+
}
|
|
4021
|
+
};
|
|
3963
4022
|
var RecurseVisitor = class {
|
|
3964
4023
|
visitText(text2, context) {
|
|
3965
4024
|
}
|
|
@@ -3978,6 +4037,9 @@ var RecurseVisitor = class {
|
|
|
3978
4037
|
}
|
|
3979
4038
|
visitIcuPlaceholder(ph, context) {
|
|
3980
4039
|
}
|
|
4040
|
+
visitBlockPlaceholder(ph, context) {
|
|
4041
|
+
ph.children.forEach((child) => child.visit(this));
|
|
4042
|
+
}
|
|
3981
4043
|
};
|
|
3982
4044
|
function serializeMessage(messageNodes) {
|
|
3983
4045
|
const visitor = new LocalizeMessageStringVisitor();
|
|
@@ -4005,9 +4067,13 @@ var LocalizeMessageStringVisitor = class {
|
|
|
4005
4067
|
visitIcuPlaceholder(ph) {
|
|
4006
4068
|
return `{$${ph.name}}`;
|
|
4007
4069
|
}
|
|
4070
|
+
visitBlockPlaceholder(ph) {
|
|
4071
|
+
const children = ph.children.map((child) => child.visit(this)).join("");
|
|
4072
|
+
return `{$${ph.startName}}${children}{$${ph.closeName}}`;
|
|
4073
|
+
}
|
|
4008
4074
|
};
|
|
4009
4075
|
|
|
4010
|
-
// bazel-out/
|
|
4076
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4011
4077
|
var _Visitor = class {
|
|
4012
4078
|
visitTag(tag) {
|
|
4013
4079
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4035,12 +4101,12 @@ ${doctype.dtd}
|
|
|
4035
4101
|
};
|
|
4036
4102
|
var _visitor = new _Visitor();
|
|
4037
4103
|
|
|
4038
|
-
// bazel-out/
|
|
4104
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4039
4105
|
function toPublicName(internalName) {
|
|
4040
4106
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4041
4107
|
}
|
|
4042
4108
|
|
|
4043
|
-
// bazel-out/
|
|
4109
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4044
4110
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4045
4111
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4046
4112
|
var I18N_ATTR = "i18n";
|
|
@@ -4142,7 +4208,7 @@ function declareI18nVariable(variable2) {
|
|
|
4142
4208
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4143
4209
|
}
|
|
4144
4210
|
|
|
4145
|
-
// bazel-out/
|
|
4211
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4146
4212
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4147
4213
|
var TEMPORARY_NAME = "_t";
|
|
4148
4214
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4309,6 +4375,23 @@ var DefinitionMap = class {
|
|
|
4309
4375
|
return literalMap(this.values);
|
|
4310
4376
|
}
|
|
4311
4377
|
};
|
|
4378
|
+
function createCssSelectorFromNode(node) {
|
|
4379
|
+
const elementName = node instanceof Element ? node.name : "ng-template";
|
|
4380
|
+
const attributes = getAttrsForDirectiveMatching(node);
|
|
4381
|
+
const cssSelector = new CssSelector();
|
|
4382
|
+
const elementNameNoNs = splitNsName(elementName)[1];
|
|
4383
|
+
cssSelector.setElement(elementNameNoNs);
|
|
4384
|
+
Object.getOwnPropertyNames(attributes).forEach((name) => {
|
|
4385
|
+
const nameNoNs = splitNsName(name)[1];
|
|
4386
|
+
const value = attributes[name];
|
|
4387
|
+
cssSelector.addAttribute(nameNoNs, value);
|
|
4388
|
+
if (name.toLowerCase() === "class") {
|
|
4389
|
+
const classes = value.trim().split(/\s+/);
|
|
4390
|
+
classes.forEach((className) => cssSelector.addClassName(className));
|
|
4391
|
+
}
|
|
4392
|
+
});
|
|
4393
|
+
return cssSelector;
|
|
4394
|
+
}
|
|
4312
4395
|
function getAttrsForDirectiveMatching(elOrTpl) {
|
|
4313
4396
|
const attributesMap = {};
|
|
4314
4397
|
if (elOrTpl instanceof Template && elOrTpl.tagName !== "ng-template") {
|
|
@@ -4365,7 +4448,7 @@ function getInstructionStatements(instructions) {
|
|
|
4365
4448
|
return statements;
|
|
4366
4449
|
}
|
|
4367
4450
|
|
|
4368
|
-
// bazel-out/
|
|
4451
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4369
4452
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4370
4453
|
let result = null;
|
|
4371
4454
|
const factoryMeta = {
|
|
@@ -4450,7 +4533,7 @@ function createFactoryFunction(type) {
|
|
|
4450
4533
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4451
4534
|
}
|
|
4452
4535
|
|
|
4453
|
-
// bazel-out/
|
|
4536
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4454
4537
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4455
4538
|
/^\s*$/,
|
|
4456
4539
|
/[<>]/,
|
|
@@ -4472,7 +4555,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4472
4555
|
}
|
|
4473
4556
|
}
|
|
4474
4557
|
|
|
4475
|
-
// bazel-out/
|
|
4558
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4476
4559
|
var InterpolationConfig = class {
|
|
4477
4560
|
static fromArray(markers) {
|
|
4478
4561
|
if (!markers) {
|
|
@@ -4487,8 +4570,9 @@ var InterpolationConfig = class {
|
|
|
4487
4570
|
}
|
|
4488
4571
|
};
|
|
4489
4572
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4573
|
+
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4490
4574
|
|
|
4491
|
-
// bazel-out/
|
|
4575
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4492
4576
|
var $EOF = 0;
|
|
4493
4577
|
var $BSPACE = 8;
|
|
4494
4578
|
var $TAB = 9;
|
|
@@ -4570,7 +4654,7 @@ function isQuote(code) {
|
|
|
4570
4654
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4571
4655
|
}
|
|
4572
4656
|
|
|
4573
|
-
// bazel-out/
|
|
4657
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4574
4658
|
var ParseLocation = class {
|
|
4575
4659
|
constructor(file, offset, line, col) {
|
|
4576
4660
|
this.file = file;
|
|
@@ -4717,7 +4801,7 @@ function sanitizeIdentifier(name) {
|
|
|
4717
4801
|
return name.replace(/\W/g, "_");
|
|
4718
4802
|
}
|
|
4719
4803
|
|
|
4720
|
-
// bazel-out/
|
|
4804
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4721
4805
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4722
4806
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4723
4807
|
constructor() {
|
|
@@ -4810,7 +4894,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4810
4894
|
}
|
|
4811
4895
|
};
|
|
4812
4896
|
|
|
4813
|
-
// bazel-out/
|
|
4897
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4814
4898
|
var policy;
|
|
4815
4899
|
function getPolicy() {
|
|
4816
4900
|
if (policy === void 0) {
|
|
@@ -4848,7 +4932,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4848
4932
|
return fn2.bind(_global);
|
|
4849
4933
|
}
|
|
4850
4934
|
|
|
4851
|
-
// bazel-out/
|
|
4935
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4852
4936
|
var JitEvaluator = class {
|
|
4853
4937
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4854
4938
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4939,7 +5023,7 @@ function isUseStrictStatement(statement) {
|
|
|
4939
5023
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4940
5024
|
}
|
|
4941
5025
|
|
|
4942
|
-
// bazel-out/
|
|
5026
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4943
5027
|
function compileInjector(meta) {
|
|
4944
5028
|
const definitionMap = new DefinitionMap();
|
|
4945
5029
|
if (meta.providers !== null) {
|
|
@@ -4956,7 +5040,7 @@ function createInjectorType(meta) {
|
|
|
4956
5040
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4957
5041
|
}
|
|
4958
5042
|
|
|
4959
|
-
// bazel-out/
|
|
5043
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4960
5044
|
var R3JitReflector = class {
|
|
4961
5045
|
constructor(context) {
|
|
4962
5046
|
this.context = context;
|
|
@@ -4972,7 +5056,7 @@ var R3JitReflector = class {
|
|
|
4972
5056
|
}
|
|
4973
5057
|
};
|
|
4974
5058
|
|
|
4975
|
-
// bazel-out/
|
|
5059
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4976
5060
|
var R3SelectorScopeMode;
|
|
4977
5061
|
(function(R3SelectorScopeMode2) {
|
|
4978
5062
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5113,7 +5197,7 @@ function tupleOfTypes(types) {
|
|
|
5113
5197
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5114
5198
|
}
|
|
5115
5199
|
|
|
5116
|
-
// bazel-out/
|
|
5200
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5117
5201
|
function compilePipeFromMetadata(metadata) {
|
|
5118
5202
|
const definitionMapValues = [];
|
|
5119
5203
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5134,7 +5218,7 @@ function createPipeType(metadata) {
|
|
|
5134
5218
|
]));
|
|
5135
5219
|
}
|
|
5136
5220
|
|
|
5137
|
-
// bazel-out/
|
|
5221
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5138
5222
|
var R3TemplateDependencyKind;
|
|
5139
5223
|
(function(R3TemplateDependencyKind2) {
|
|
5140
5224
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5142,7 +5226,7 @@ var R3TemplateDependencyKind;
|
|
|
5142
5226
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5143
5227
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5144
5228
|
|
|
5145
|
-
// bazel-out/
|
|
5229
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5146
5230
|
var ParserError = class {
|
|
5147
5231
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5148
5232
|
this.input = input;
|
|
@@ -5808,7 +5892,7 @@ var BoundElementProperty = class {
|
|
|
5808
5892
|
}
|
|
5809
5893
|
};
|
|
5810
5894
|
|
|
5811
|
-
// bazel-out/
|
|
5895
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5812
5896
|
var _EventHandlerVars = class {
|
|
5813
5897
|
};
|
|
5814
5898
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6449,7 +6533,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6449
6533
|
}
|
|
6450
6534
|
};
|
|
6451
6535
|
|
|
6452
|
-
// bazel-out/
|
|
6536
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6453
6537
|
var _SECURITY_SCHEMA;
|
|
6454
6538
|
function SECURITY_SCHEMA() {
|
|
6455
6539
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6507,7 +6591,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6507
6591
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6508
6592
|
}
|
|
6509
6593
|
|
|
6510
|
-
// bazel-out/
|
|
6594
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6511
6595
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6512
6596
|
"inherit",
|
|
6513
6597
|
"initial",
|
|
@@ -6978,7 +7062,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6978
7062
|
}
|
|
6979
7063
|
}
|
|
6980
7064
|
|
|
6981
|
-
// bazel-out/
|
|
7065
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6982
7066
|
var OpKind;
|
|
6983
7067
|
(function(OpKind2) {
|
|
6984
7068
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7132,8 +7216,13 @@ var DerivedRepeaterVarIdentity;
|
|
|
7132
7216
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
|
|
7133
7217
|
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
7134
7218
|
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
7219
|
+
var I18nContextKind;
|
|
7220
|
+
(function(I18nContextKind2) {
|
|
7221
|
+
I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
|
|
7222
|
+
I18nContextKind2[I18nContextKind2["Icu"] = 1] = "Icu";
|
|
7223
|
+
})(I18nContextKind || (I18nContextKind = {}));
|
|
7135
7224
|
|
|
7136
|
-
// bazel-out/
|
|
7225
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7137
7226
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7138
7227
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7139
7228
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7165,7 +7254,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7165
7254
|
return expr[UsesVarOffset] === true;
|
|
7166
7255
|
}
|
|
7167
7256
|
|
|
7168
|
-
// bazel-out/
|
|
7257
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7169
7258
|
function createStatementOp(statement) {
|
|
7170
7259
|
return __spreadValues({
|
|
7171
7260
|
kind: OpKind.Statement,
|
|
@@ -7187,7 +7276,7 @@ var NEW_OP = {
|
|
|
7187
7276
|
next: null
|
|
7188
7277
|
};
|
|
7189
7278
|
|
|
7190
|
-
// bazel-out/
|
|
7279
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7191
7280
|
function createInterpolateTextOp(xref, interpolation, i18nPlaceholders, sourceSpan) {
|
|
7192
7281
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7193
7282
|
kind: OpKind.InterpolateText,
|
|
@@ -7298,13 +7387,13 @@ function createConditionalOp(target, targetSlot, test, conditions, sourceSpan) {
|
|
|
7298
7387
|
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
|
|
7299
7388
|
}
|
|
7300
7389
|
function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
|
|
7301
|
-
return __spreadValues({
|
|
7390
|
+
return __spreadValues(__spreadValues({
|
|
7302
7391
|
kind: OpKind.Repeater,
|
|
7303
7392
|
target: repeaterCreate2,
|
|
7304
7393
|
targetSlot,
|
|
7305
7394
|
collection,
|
|
7306
7395
|
sourceSpan
|
|
7307
|
-
}, NEW_OP);
|
|
7396
|
+
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7308
7397
|
}
|
|
7309
7398
|
function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
|
|
7310
7399
|
return __spreadValues(__spreadValues({
|
|
@@ -7336,7 +7425,7 @@ function createI18nApplyOp(target, handle, sourceSpan) {
|
|
|
7336
7425
|
}, NEW_OP);
|
|
7337
7426
|
}
|
|
7338
7427
|
|
|
7339
|
-
// bazel-out/
|
|
7428
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7340
7429
|
var _a;
|
|
7341
7430
|
var _b;
|
|
7342
7431
|
var _c;
|
|
@@ -8187,7 +8276,7 @@ function isStringLiteral(expr) {
|
|
|
8187
8276
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8188
8277
|
}
|
|
8189
8278
|
|
|
8190
|
-
// bazel-out/
|
|
8279
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8191
8280
|
var _OpList = class {
|
|
8192
8281
|
constructor() {
|
|
8193
8282
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8378,14 +8467,14 @@ var OpList = _OpList;
|
|
|
8378
8467
|
_OpList.nextListId = 0;
|
|
8379
8468
|
})();
|
|
8380
8469
|
|
|
8381
|
-
// bazel-out/
|
|
8470
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8382
8471
|
var SlotHandle = class {
|
|
8383
8472
|
constructor() {
|
|
8384
8473
|
this.slot = null;
|
|
8385
8474
|
}
|
|
8386
8475
|
};
|
|
8387
8476
|
|
|
8388
|
-
// bazel-out/
|
|
8477
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8389
8478
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8390
8479
|
OpKind.Element,
|
|
8391
8480
|
OpKind.ElementStart,
|
|
@@ -8617,9 +8706,10 @@ function createIcuEndOp(xref) {
|
|
|
8617
8706
|
xref
|
|
8618
8707
|
}, NEW_OP);
|
|
8619
8708
|
}
|
|
8620
|
-
function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
8709
|
+
function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
|
|
8621
8710
|
return __spreadValues({
|
|
8622
8711
|
kind: OpKind.I18nContext,
|
|
8712
|
+
contextKind,
|
|
8623
8713
|
xref,
|
|
8624
8714
|
i18nBlock,
|
|
8625
8715
|
message,
|
|
@@ -8629,7 +8719,7 @@ function createI18nContextOp(xref, i18nBlock, message, sourceSpan) {
|
|
|
8629
8719
|
}, NEW_OP);
|
|
8630
8720
|
}
|
|
8631
8721
|
|
|
8632
|
-
// bazel-out/
|
|
8722
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8633
8723
|
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8634
8724
|
return __spreadValues(__spreadValues({
|
|
8635
8725
|
kind: OpKind.HostProperty,
|
|
@@ -8640,10 +8730,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan)
|
|
|
8640
8730
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8641
8731
|
}
|
|
8642
8732
|
|
|
8643
|
-
// bazel-out/
|
|
8733
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8644
8734
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8645
8735
|
|
|
8646
|
-
// bazel-out/
|
|
8736
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8647
8737
|
var CompilationJobKind;
|
|
8648
8738
|
(function(CompilationJobKind2) {
|
|
8649
8739
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8750,7 +8840,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8750
8840
|
}
|
|
8751
8841
|
};
|
|
8752
8842
|
|
|
8753
|
-
// bazel-out/
|
|
8843
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8754
8844
|
function deleteAnyCasts(job) {
|
|
8755
8845
|
for (const unit of job.units) {
|
|
8756
8846
|
for (const op of unit.ops()) {
|
|
@@ -8768,7 +8858,7 @@ function removeAnys(e) {
|
|
|
8768
8858
|
return e;
|
|
8769
8859
|
}
|
|
8770
8860
|
|
|
8771
|
-
// bazel-out/
|
|
8861
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8772
8862
|
function applyI18nExpressions(job) {
|
|
8773
8863
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8774
8864
|
for (const unit of job.units) {
|
|
@@ -8799,10 +8889,9 @@ function needsApplication(i18nContexts, op) {
|
|
|
8799
8889
|
return false;
|
|
8800
8890
|
}
|
|
8801
8891
|
|
|
8802
|
-
// bazel-out/
|
|
8892
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8803
8893
|
function assignI18nSlotDependencies(job) {
|
|
8804
8894
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8805
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8806
8895
|
let lastSlotConsumer = null;
|
|
8807
8896
|
let currentI18nOp = null;
|
|
8808
8897
|
for (const unit of job.units) {
|
|
@@ -8818,21 +8907,17 @@ function assignI18nSlotDependencies(job) {
|
|
|
8818
8907
|
i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
|
|
8819
8908
|
currentI18nOp = null;
|
|
8820
8909
|
break;
|
|
8821
|
-
case OpKind.I18nContext:
|
|
8822
|
-
i18nContexts.set(op.xref, op);
|
|
8823
|
-
break;
|
|
8824
8910
|
}
|
|
8825
8911
|
}
|
|
8826
8912
|
for (const op of unit.update) {
|
|
8827
8913
|
if (op.kind === OpKind.I18nExpression) {
|
|
8828
|
-
|
|
8829
|
-
op.target = i18nLastSlotConsumers.get(i18nContext.i18nBlock);
|
|
8914
|
+
op.target = i18nLastSlotConsumers.get(op.target);
|
|
8830
8915
|
}
|
|
8831
8916
|
}
|
|
8832
8917
|
}
|
|
8833
8918
|
}
|
|
8834
8919
|
|
|
8835
|
-
// bazel-out/
|
|
8920
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8836
8921
|
function createOpXrefMap(unit) {
|
|
8837
8922
|
const map = /* @__PURE__ */ new Map();
|
|
8838
8923
|
for (const op of unit.create) {
|
|
@@ -8844,7 +8929,7 @@ function createOpXrefMap(unit) {
|
|
|
8844
8929
|
return map;
|
|
8845
8930
|
}
|
|
8846
8931
|
|
|
8847
|
-
// bazel-out/
|
|
8932
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8848
8933
|
function extractAttributes(job) {
|
|
8849
8934
|
for (const unit of job.units) {
|
|
8850
8935
|
const elements = createOpXrefMap(unit);
|
|
@@ -8911,7 +8996,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8911
8996
|
}
|
|
8912
8997
|
}
|
|
8913
8998
|
|
|
8914
|
-
// bazel-out/
|
|
8999
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8915
9000
|
function lookupElement2(elements, xref) {
|
|
8916
9001
|
const el = elements.get(xref);
|
|
8917
9002
|
if (el === void 0) {
|
|
@@ -8961,7 +9046,7 @@ function specializeBindings(job) {
|
|
|
8961
9046
|
}
|
|
8962
9047
|
}
|
|
8963
9048
|
|
|
8964
|
-
// bazel-out/
|
|
9049
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8965
9050
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8966
9051
|
Identifiers.attribute,
|
|
8967
9052
|
Identifiers.classProp,
|
|
@@ -9027,7 +9112,7 @@ function chainOperationsInList(opList) {
|
|
|
9027
9112
|
}
|
|
9028
9113
|
}
|
|
9029
9114
|
|
|
9030
|
-
// bazel-out/
|
|
9115
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
9031
9116
|
function collapseSingletonInterpolations(job) {
|
|
9032
9117
|
for (const unit of job.units) {
|
|
9033
9118
|
for (const op of unit.update) {
|
|
@@ -9039,7 +9124,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9039
9124
|
}
|
|
9040
9125
|
}
|
|
9041
9126
|
|
|
9042
|
-
// bazel-out/
|
|
9127
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9043
9128
|
function generateConditionalExpressions(job) {
|
|
9044
9129
|
for (const unit of job.units) {
|
|
9045
9130
|
for (const op of unit.ops()) {
|
|
@@ -9076,40 +9161,7 @@ function generateConditionalExpressions(job) {
|
|
|
9076
9161
|
}
|
|
9077
9162
|
}
|
|
9078
9163
|
|
|
9079
|
-
// bazel-out/
|
|
9080
|
-
var TagContentType;
|
|
9081
|
-
(function(TagContentType2) {
|
|
9082
|
-
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
9083
|
-
TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
|
|
9084
|
-
TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
|
|
9085
|
-
})(TagContentType || (TagContentType = {}));
|
|
9086
|
-
function splitNsName(elementName) {
|
|
9087
|
-
if (elementName[0] != ":") {
|
|
9088
|
-
return [null, elementName];
|
|
9089
|
-
}
|
|
9090
|
-
const colonIndex = elementName.indexOf(":", 1);
|
|
9091
|
-
if (colonIndex === -1) {
|
|
9092
|
-
throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
|
|
9093
|
-
}
|
|
9094
|
-
return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
|
|
9095
|
-
}
|
|
9096
|
-
function isNgContainer(tagName) {
|
|
9097
|
-
return splitNsName(tagName)[1] === "ng-container";
|
|
9098
|
-
}
|
|
9099
|
-
function isNgContent(tagName) {
|
|
9100
|
-
return splitNsName(tagName)[1] === "ng-content";
|
|
9101
|
-
}
|
|
9102
|
-
function isNgTemplate(tagName) {
|
|
9103
|
-
return splitNsName(tagName)[1] === "ng-template";
|
|
9104
|
-
}
|
|
9105
|
-
function getNsPrefix(fullName) {
|
|
9106
|
-
return fullName === null ? null : splitNsName(fullName)[0];
|
|
9107
|
-
}
|
|
9108
|
-
function mergeNsAndName(prefix, localName) {
|
|
9109
|
-
return prefix ? `:${prefix}:${localName}` : localName;
|
|
9110
|
-
}
|
|
9111
|
-
|
|
9112
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9164
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9113
9165
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9114
9166
|
["&&", BinaryOperator.And],
|
|
9115
9167
|
[">", BinaryOperator.Bigger],
|
|
@@ -9159,7 +9211,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9159
9211
|
return literal(value);
|
|
9160
9212
|
}
|
|
9161
9213
|
|
|
9162
|
-
// bazel-out/
|
|
9214
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9163
9215
|
function collectElementConsts(job) {
|
|
9164
9216
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9165
9217
|
for (const unit of job.units) {
|
|
@@ -9293,7 +9345,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9293
9345
|
return literalArr(attrArray);
|
|
9294
9346
|
}
|
|
9295
9347
|
|
|
9296
|
-
// bazel-out/
|
|
9348
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9297
9349
|
function createDeferDepsFns(job) {
|
|
9298
9350
|
for (const unit of job.units) {
|
|
9299
9351
|
for (const op of unit.create) {
|
|
@@ -9321,18 +9373,22 @@ function createDeferDepsFns(job) {
|
|
|
9321
9373
|
}
|
|
9322
9374
|
}
|
|
9323
9375
|
|
|
9324
|
-
// bazel-out/
|
|
9376
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9325
9377
|
function createI18nContexts(job) {
|
|
9378
|
+
const rootContexts = /* @__PURE__ */ new Map();
|
|
9326
9379
|
let currentI18nOp = null;
|
|
9327
9380
|
let xref;
|
|
9328
9381
|
for (const unit of job.units) {
|
|
9329
9382
|
for (const op of unit.create) {
|
|
9330
9383
|
switch (op.kind) {
|
|
9331
9384
|
case OpKind.I18nStart:
|
|
9332
|
-
xref = job.allocateXrefId();
|
|
9333
|
-
unit.create.push(createI18nContextOp(xref, op.xref, op.message, null));
|
|
9334
|
-
op.context = xref;
|
|
9335
9385
|
currentI18nOp = op;
|
|
9386
|
+
if (op.xref === op.root) {
|
|
9387
|
+
xref = job.allocateXrefId();
|
|
9388
|
+
unit.create.push(createI18nContextOp(I18nContextKind.RootI18n, xref, op.xref, op.message, null));
|
|
9389
|
+
op.context = xref;
|
|
9390
|
+
rootContexts.set(op.xref, xref);
|
|
9391
|
+
}
|
|
9336
9392
|
break;
|
|
9337
9393
|
case OpKind.I18nEnd:
|
|
9338
9394
|
currentI18nOp = null;
|
|
@@ -9343,7 +9399,7 @@ function createI18nContexts(job) {
|
|
|
9343
9399
|
}
|
|
9344
9400
|
if (op.message.id !== currentI18nOp.message.id) {
|
|
9345
9401
|
xref = job.allocateXrefId();
|
|
9346
|
-
unit.create.push(createI18nContextOp(xref, currentI18nOp.xref, op.message, null));
|
|
9402
|
+
unit.create.push(createI18nContextOp(I18nContextKind.Icu, xref, currentI18nOp.xref, op.message, null));
|
|
9347
9403
|
op.context = xref;
|
|
9348
9404
|
} else {
|
|
9349
9405
|
op.context = currentI18nOp.context;
|
|
@@ -9352,9 +9408,16 @@ function createI18nContexts(job) {
|
|
|
9352
9408
|
}
|
|
9353
9409
|
}
|
|
9354
9410
|
}
|
|
9411
|
+
for (const unit of job.units) {
|
|
9412
|
+
for (const op of unit.create) {
|
|
9413
|
+
if (op.kind === OpKind.I18nStart && op.xref !== op.root) {
|
|
9414
|
+
op.context = rootContexts.get(op.root);
|
|
9415
|
+
}
|
|
9416
|
+
}
|
|
9417
|
+
}
|
|
9355
9418
|
}
|
|
9356
9419
|
|
|
9357
|
-
// bazel-out/
|
|
9420
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9358
9421
|
function configureDeferInstructions(job) {
|
|
9359
9422
|
for (const unit of job.units) {
|
|
9360
9423
|
for (const op of unit.create) {
|
|
@@ -9371,7 +9434,7 @@ function configureDeferInstructions(job) {
|
|
|
9371
9434
|
}
|
|
9372
9435
|
}
|
|
9373
9436
|
|
|
9374
|
-
// bazel-out/
|
|
9437
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9375
9438
|
function resolveDeferTargetNames(job) {
|
|
9376
9439
|
const scopes = /* @__PURE__ */ new Map();
|
|
9377
9440
|
function getScopeForView2(view) {
|
|
@@ -9465,7 +9528,7 @@ var Scope = class {
|
|
|
9465
9528
|
}
|
|
9466
9529
|
};
|
|
9467
9530
|
|
|
9468
|
-
// bazel-out/
|
|
9531
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9469
9532
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9470
9533
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9471
9534
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9492,7 +9555,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9492
9555
|
}
|
|
9493
9556
|
}
|
|
9494
9557
|
|
|
9495
|
-
// bazel-out/
|
|
9558
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9496
9559
|
function expandSafeReads(job) {
|
|
9497
9560
|
for (const unit of job.units) {
|
|
9498
9561
|
for (const op of unit.ops()) {
|
|
@@ -9628,7 +9691,7 @@ function ternaryTransform(e) {
|
|
|
9628
9691
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9629
9692
|
}
|
|
9630
9693
|
|
|
9631
|
-
// bazel-out/
|
|
9694
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9632
9695
|
var ESCAPE = "\uFFFD";
|
|
9633
9696
|
var ELEMENT_MARKER = "#";
|
|
9634
9697
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9639,7 +9702,7 @@ var LIST_END_MARKER = "]";
|
|
|
9639
9702
|
var LIST_DELIMITER = "|";
|
|
9640
9703
|
function extractI18nMessages(job) {
|
|
9641
9704
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
9642
|
-
const
|
|
9705
|
+
const i18nBlocks = /* @__PURE__ */ new Map();
|
|
9643
9706
|
for (const unit of job.units) {
|
|
9644
9707
|
for (const op of unit.create) {
|
|
9645
9708
|
switch (op.kind) {
|
|
@@ -9647,7 +9710,7 @@ function extractI18nMessages(job) {
|
|
|
9647
9710
|
i18nContexts.set(op.xref, op);
|
|
9648
9711
|
break;
|
|
9649
9712
|
case OpKind.I18nStart:
|
|
9650
|
-
|
|
9713
|
+
i18nBlocks.set(op.xref, op);
|
|
9651
9714
|
break;
|
|
9652
9715
|
}
|
|
9653
9716
|
}
|
|
@@ -9672,11 +9735,12 @@ function extractI18nMessages(job) {
|
|
|
9672
9735
|
if (!op.context) {
|
|
9673
9736
|
throw Error("ICU op should have its context set.");
|
|
9674
9737
|
}
|
|
9675
|
-
|
|
9676
|
-
|
|
9738
|
+
const i18nContext = i18nContexts.get(op.context);
|
|
9739
|
+
if (i18nContext.contextKind === I18nContextKind.Icu) {
|
|
9677
9740
|
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
9678
9741
|
unit.create.push(subMessage);
|
|
9679
|
-
const
|
|
9742
|
+
const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
|
|
9743
|
+
const parentMessage = i18nBlockMessages.get(rootI18nId);
|
|
9680
9744
|
parentMessage == null ? void 0 : parentMessage.subMessages.push(subMessage.xref);
|
|
9681
9745
|
}
|
|
9682
9746
|
OpList.remove(op);
|
|
@@ -9689,30 +9753,67 @@ function extractI18nMessages(job) {
|
|
|
9689
9753
|
}
|
|
9690
9754
|
}
|
|
9691
9755
|
function createI18nMessage(job, context, messagePlaceholder) {
|
|
9692
|
-
let needsPostprocessing = context.
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
}
|
|
9697
|
-
}
|
|
9698
|
-
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formatParams(context.params), formatParams(context.postprocessingParams), needsPostprocessing);
|
|
9756
|
+
let [formattedParams, needsPostprocessing] = formatParams(context.params);
|
|
9757
|
+
const [formattedPostprocessingParams] = formatParams(context.postprocessingParams);
|
|
9758
|
+
needsPostprocessing || (needsPostprocessing = formattedPostprocessingParams.size > 0);
|
|
9759
|
+
return createI18nMessageOp(job.allocateXrefId(), context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
|
|
9699
9760
|
}
|
|
9700
9761
|
function formatParams(params) {
|
|
9701
|
-
const
|
|
9762
|
+
const formattedParams = /* @__PURE__ */ new Map();
|
|
9763
|
+
let needsPostprocessing = false;
|
|
9702
9764
|
for (const [placeholder, placeholderValues] of params) {
|
|
9703
|
-
const serializedValues = formatParamValues(placeholderValues);
|
|
9765
|
+
const [serializedValues, paramNeedsPostprocessing] = formatParamValues(placeholderValues);
|
|
9766
|
+
needsPostprocessing || (needsPostprocessing = paramNeedsPostprocessing);
|
|
9704
9767
|
if (serializedValues !== null) {
|
|
9705
|
-
|
|
9768
|
+
formattedParams.set(placeholder, literal(serializedValues));
|
|
9706
9769
|
}
|
|
9707
9770
|
}
|
|
9708
|
-
return
|
|
9771
|
+
return [formattedParams, needsPostprocessing];
|
|
9709
9772
|
}
|
|
9710
9773
|
function formatParamValues(values) {
|
|
9711
9774
|
if (values.length === 0) {
|
|
9712
|
-
return null;
|
|
9775
|
+
return [null, false];
|
|
9713
9776
|
}
|
|
9777
|
+
collapseElementTemplatePairs(values);
|
|
9714
9778
|
const serializedValues = values.map((value) => formatValue(value));
|
|
9715
|
-
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}
|
|
9779
|
+
return serializedValues.length === 1 ? [serializedValues[0], false] : [`${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`, true];
|
|
9780
|
+
}
|
|
9781
|
+
function collapseElementTemplatePairs(values) {
|
|
9782
|
+
var _a2;
|
|
9783
|
+
const valueIndiciesBySubTemplateIndex = /* @__PURE__ */ new Map();
|
|
9784
|
+
for (let i = 0; i < values.length; i++) {
|
|
9785
|
+
const value = values[i];
|
|
9786
|
+
if (value.subTemplateIndex !== null && value.flags & (I18nParamValueFlags.ElementTag | I18nParamValueFlags.TemplateTag)) {
|
|
9787
|
+
const valueIndicies = (_a2 = valueIndiciesBySubTemplateIndex.get(value.subTemplateIndex)) != null ? _a2 : [];
|
|
9788
|
+
valueIndicies.push(i);
|
|
9789
|
+
valueIndiciesBySubTemplateIndex.set(value.subTemplateIndex, valueIndicies);
|
|
9790
|
+
}
|
|
9791
|
+
}
|
|
9792
|
+
for (const [subTemplateIndex, valueIndicies] of valueIndiciesBySubTemplateIndex) {
|
|
9793
|
+
if (valueIndicies.length > 1) {
|
|
9794
|
+
const elementIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.ElementTag);
|
|
9795
|
+
const templateIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.TemplateTag);
|
|
9796
|
+
if (elementIndex !== void 0 && templateIndex !== void 0) {
|
|
9797
|
+
const elementValue = values[elementIndex];
|
|
9798
|
+
const templateValue = values[templateIndex];
|
|
9799
|
+
let compundValue;
|
|
9800
|
+
if (elementValue.flags & I18nParamValueFlags.OpenTag && elementValue.flags & I18nParamValueFlags.CloseTag) {
|
|
9801
|
+
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9802
|
+
} else if (elementValue.flags & I18nParamValueFlags.OpenTag) {
|
|
9803
|
+
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}`;
|
|
9804
|
+
} else {
|
|
9805
|
+
compundValue = `${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9806
|
+
}
|
|
9807
|
+
values.splice(elementIndex, 1, { value: compundValue, subTemplateIndex, flags: I18nParamValueFlags.None });
|
|
9808
|
+
values.splice(templateIndex, 1, null);
|
|
9809
|
+
}
|
|
9810
|
+
}
|
|
9811
|
+
}
|
|
9812
|
+
for (let i = values.length - 1; i >= 0; i--) {
|
|
9813
|
+
if (values[i] === null) {
|
|
9814
|
+
values.splice(i, 1);
|
|
9815
|
+
}
|
|
9816
|
+
}
|
|
9716
9817
|
}
|
|
9717
9818
|
function formatValue(value) {
|
|
9718
9819
|
if (value.flags === I18nParamValueFlags.None) {
|
|
@@ -9735,7 +9836,7 @@ function formatValue(value) {
|
|
|
9735
9836
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9736
9837
|
}
|
|
9737
9838
|
|
|
9738
|
-
// bazel-out/
|
|
9839
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9739
9840
|
function generateAdvance(job) {
|
|
9740
9841
|
for (const unit of job.units) {
|
|
9741
9842
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9767,7 +9868,7 @@ function generateAdvance(job) {
|
|
|
9767
9868
|
}
|
|
9768
9869
|
}
|
|
9769
9870
|
|
|
9770
|
-
// bazel-out/
|
|
9871
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9771
9872
|
function generateProjectionDefs(job) {
|
|
9772
9873
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9773
9874
|
const selectors = [];
|
|
@@ -9791,7 +9892,7 @@ function generateProjectionDefs(job) {
|
|
|
9791
9892
|
}
|
|
9792
9893
|
}
|
|
9793
9894
|
|
|
9794
|
-
// bazel-out/
|
|
9895
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9795
9896
|
function generateVariables(job) {
|
|
9796
9897
|
recursivelyProcessView(job.root, null);
|
|
9797
9898
|
}
|
|
@@ -9879,7 +9980,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9879
9980
|
return newOps;
|
|
9880
9981
|
}
|
|
9881
9982
|
|
|
9882
|
-
// bazel-out/
|
|
9983
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9883
9984
|
function collectConstExpressions(job) {
|
|
9884
9985
|
for (const unit of job.units) {
|
|
9885
9986
|
for (const op of unit.ops()) {
|
|
@@ -9893,7 +9994,7 @@ function collectConstExpressions(job) {
|
|
|
9893
9994
|
}
|
|
9894
9995
|
}
|
|
9895
9996
|
|
|
9896
|
-
// bazel-out/
|
|
9997
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9897
9998
|
var STYLE_DOT = "style.";
|
|
9898
9999
|
var CLASS_DOT = "class.";
|
|
9899
10000
|
var STYLE_BANG = "style!";
|
|
@@ -9951,7 +10052,7 @@ function parseProperty(name) {
|
|
|
9951
10052
|
return { property: property2, suffix };
|
|
9952
10053
|
}
|
|
9953
10054
|
|
|
9954
|
-
// bazel-out/
|
|
10055
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9955
10056
|
function mapLiteral(obj, quoted = false) {
|
|
9956
10057
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9957
10058
|
key,
|
|
@@ -9960,7 +10061,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9960
10061
|
})));
|
|
9961
10062
|
}
|
|
9962
10063
|
|
|
9963
|
-
// bazel-out/
|
|
10064
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9964
10065
|
var IcuSerializerVisitor = class {
|
|
9965
10066
|
visitText(text2) {
|
|
9966
10067
|
return text2.value;
|
|
@@ -9979,6 +10080,9 @@ var IcuSerializerVisitor = class {
|
|
|
9979
10080
|
visitPlaceholder(ph) {
|
|
9980
10081
|
return this.formatPh(ph.name);
|
|
9981
10082
|
}
|
|
10083
|
+
visitBlockPlaceholder(ph) {
|
|
10084
|
+
return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join("")}${this.formatPh(ph.closeName)}`;
|
|
10085
|
+
}
|
|
9982
10086
|
visitIcuPlaceholder(ph, context) {
|
|
9983
10087
|
return this.formatPh(ph.name);
|
|
9984
10088
|
}
|
|
@@ -9991,7 +10095,7 @@ function serializeIcuNode(icu) {
|
|
|
9991
10095
|
return icu.visit(serializer);
|
|
9992
10096
|
}
|
|
9993
10097
|
|
|
9994
|
-
// bazel-out/
|
|
10098
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9995
10099
|
var TokenType;
|
|
9996
10100
|
(function(TokenType2) {
|
|
9997
10101
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10352,7 +10456,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10352
10456
|
return result;
|
|
10353
10457
|
}
|
|
10354
10458
|
|
|
10355
|
-
// bazel-out/
|
|
10459
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10356
10460
|
var SplitInterpolation = class {
|
|
10357
10461
|
constructor(strings, expressions, offsets) {
|
|
10358
10462
|
this.strings = strings;
|
|
@@ -11246,7 +11350,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11246
11350
|
return offsetMap;
|
|
11247
11351
|
}
|
|
11248
11352
|
|
|
11249
|
-
// bazel-out/
|
|
11353
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11250
11354
|
var NodeWithI18n = class {
|
|
11251
11355
|
constructor(sourceSpan, i18n2) {
|
|
11252
11356
|
this.sourceSpan = sourceSpan;
|
|
@@ -11322,12 +11426,12 @@ var Comment2 = class {
|
|
|
11322
11426
|
return visitor.visitComment(this, context);
|
|
11323
11427
|
}
|
|
11324
11428
|
};
|
|
11325
|
-
var Block = class {
|
|
11326
|
-
constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null) {
|
|
11429
|
+
var Block = class extends NodeWithI18n {
|
|
11430
|
+
constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null, i18n2) {
|
|
11431
|
+
super(sourceSpan, i18n2);
|
|
11327
11432
|
this.name = name;
|
|
11328
11433
|
this.parameters = parameters;
|
|
11329
11434
|
this.children = children;
|
|
11330
|
-
this.sourceSpan = sourceSpan;
|
|
11331
11435
|
this.nameSpan = nameSpan;
|
|
11332
11436
|
this.startSourceSpan = startSourceSpan;
|
|
11333
11437
|
this.endSourceSpan = endSourceSpan;
|
|
@@ -11398,11 +11502,11 @@ var RecursiveVisitor = class {
|
|
|
11398
11502
|
}
|
|
11399
11503
|
};
|
|
11400
11504
|
|
|
11401
|
-
// bazel-out/
|
|
11505
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11402
11506
|
var ElementSchemaRegistry = class {
|
|
11403
11507
|
};
|
|
11404
11508
|
|
|
11405
|
-
// bazel-out/
|
|
11509
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11406
11510
|
var BOOLEAN = "boolean";
|
|
11407
11511
|
var NUMBER = "number";
|
|
11408
11512
|
var STRING = "string";
|
|
@@ -11755,7 +11859,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11755
11859
|
}
|
|
11756
11860
|
}
|
|
11757
11861
|
|
|
11758
|
-
// bazel-out/
|
|
11862
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11759
11863
|
var HtmlTagDefinition = class {
|
|
11760
11864
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11761
11865
|
this.closedByChildren = {};
|
|
@@ -11873,7 +11977,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11873
11977
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11874
11978
|
}
|
|
11875
11979
|
|
|
11876
|
-
// bazel-out/
|
|
11980
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11877
11981
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11878
11982
|
"A": "LINK",
|
|
11879
11983
|
"B": "BOLD_TEXT",
|
|
@@ -11946,6 +12050,24 @@ var PlaceholderRegistry = class {
|
|
|
11946
12050
|
getUniquePlaceholder(name) {
|
|
11947
12051
|
return this._generateUniqueName(name.toUpperCase());
|
|
11948
12052
|
}
|
|
12053
|
+
getStartBlockPlaceholderName(name, parameters) {
|
|
12054
|
+
const signature = this._hashBlock(name, parameters);
|
|
12055
|
+
if (this._signatureToName[signature]) {
|
|
12056
|
+
return this._signatureToName[signature];
|
|
12057
|
+
}
|
|
12058
|
+
const placeholder = this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(name)}`);
|
|
12059
|
+
this._signatureToName[signature] = placeholder;
|
|
12060
|
+
return placeholder;
|
|
12061
|
+
}
|
|
12062
|
+
getCloseBlockPlaceholderName(name) {
|
|
12063
|
+
const signature = this._hashClosingBlock(name);
|
|
12064
|
+
if (this._signatureToName[signature]) {
|
|
12065
|
+
return this._signatureToName[signature];
|
|
12066
|
+
}
|
|
12067
|
+
const placeholder = this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(name)}`);
|
|
12068
|
+
this._signatureToName[signature] = placeholder;
|
|
12069
|
+
return placeholder;
|
|
12070
|
+
}
|
|
11949
12071
|
_hashTag(tag, attrs, isVoid) {
|
|
11950
12072
|
const start = `<${tag}`;
|
|
11951
12073
|
const strAttrs = Object.keys(attrs).sort().map((name) => ` ${name}=${attrs[name]}`).join("");
|
|
@@ -11955,6 +12077,16 @@ var PlaceholderRegistry = class {
|
|
|
11955
12077
|
_hashClosingTag(tag) {
|
|
11956
12078
|
return this._hashTag(`/${tag}`, {}, false);
|
|
11957
12079
|
}
|
|
12080
|
+
_hashBlock(name, parameters) {
|
|
12081
|
+
const params = parameters.length === 0 ? "" : ` (${parameters.sort().join("; ")})`;
|
|
12082
|
+
return `@${name}${params} {}`;
|
|
12083
|
+
}
|
|
12084
|
+
_hashClosingBlock(name) {
|
|
12085
|
+
return this._hashBlock(`close_${name}`, []);
|
|
12086
|
+
}
|
|
12087
|
+
_toSnakeCase(name) {
|
|
12088
|
+
return name.toUpperCase().replace(/[^A-Z0-9]/g, "_");
|
|
12089
|
+
}
|
|
11958
12090
|
_generateUniqueName(base) {
|
|
11959
12091
|
const seen = this._placeHolderNameCounts.hasOwnProperty(base);
|
|
11960
12092
|
if (!seen) {
|
|
@@ -11967,19 +12099,20 @@ var PlaceholderRegistry = class {
|
|
|
11967
12099
|
}
|
|
11968
12100
|
};
|
|
11969
12101
|
|
|
11970
|
-
// bazel-out/
|
|
12102
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11971
12103
|
var _expParser = new Parser(new Lexer());
|
|
11972
|
-
function createI18nMessageFactory(interpolationConfig) {
|
|
11973
|
-
const visitor = new _I18nVisitor(_expParser, interpolationConfig);
|
|
12104
|
+
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12105
|
+
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
11974
12106
|
return (nodes, meaning, description, customId, visitNodeFn) => visitor.toI18nMessage(nodes, meaning, description, customId, visitNodeFn);
|
|
11975
12107
|
}
|
|
11976
12108
|
function noopVisitNodeFn(_html, i18n2) {
|
|
11977
12109
|
return i18n2;
|
|
11978
12110
|
}
|
|
11979
12111
|
var _I18nVisitor = class {
|
|
11980
|
-
constructor(_expressionParser, _interpolationConfig) {
|
|
12112
|
+
constructor(_expressionParser, _interpolationConfig, _containerBlocks) {
|
|
11981
12113
|
this._expressionParser = _expressionParser;
|
|
11982
12114
|
this._interpolationConfig = _interpolationConfig;
|
|
12115
|
+
this._containerBlocks = _containerBlocks;
|
|
11983
12116
|
}
|
|
11984
12117
|
toI18nMessage(nodes, meaning = "", description = "", customId = "", visitNodeFn) {
|
|
11985
12118
|
const context = {
|
|
@@ -12054,11 +12187,27 @@ var _I18nVisitor = class {
|
|
|
12054
12187
|
throw new Error("Unreachable code");
|
|
12055
12188
|
}
|
|
12056
12189
|
visitBlock(block, context) {
|
|
12190
|
+
var _a2;
|
|
12057
12191
|
const children = visitAll2(this, block.children, context);
|
|
12058
|
-
|
|
12192
|
+
if (this._containerBlocks.has(block.name)) {
|
|
12193
|
+
return new Container(children, block.sourceSpan);
|
|
12194
|
+
}
|
|
12195
|
+
const parameters = block.parameters.map((param) => param.expression);
|
|
12196
|
+
const startPhName = context.placeholderRegistry.getStartBlockPlaceholderName(block.name, parameters);
|
|
12197
|
+
const closePhName = context.placeholderRegistry.getCloseBlockPlaceholderName(block.name);
|
|
12198
|
+
context.placeholderToContent[startPhName] = {
|
|
12199
|
+
text: block.startSourceSpan.toString(),
|
|
12200
|
+
sourceSpan: block.startSourceSpan
|
|
12201
|
+
};
|
|
12202
|
+
context.placeholderToContent[closePhName] = {
|
|
12203
|
+
text: block.endSourceSpan ? block.endSourceSpan.toString() : "}",
|
|
12204
|
+
sourceSpan: (_a2 = block.endSourceSpan) != null ? _a2 : block.sourceSpan
|
|
12205
|
+
};
|
|
12206
|
+
const node = new BlockPlaceholder(block.name, parameters, startPhName, closePhName, children, block.sourceSpan, block.startSourceSpan, block.endSourceSpan);
|
|
12059
12207
|
return context.visitNodeFn(block, node);
|
|
12060
12208
|
}
|
|
12061
12209
|
visitBlockParameter(_parameter, _context) {
|
|
12210
|
+
throw new Error("Unreachable code");
|
|
12062
12211
|
}
|
|
12063
12212
|
_visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {
|
|
12064
12213
|
const nodes = [];
|
|
@@ -12129,14 +12278,14 @@ function extractPlaceholderName(input) {
|
|
|
12129
12278
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12130
12279
|
}
|
|
12131
12280
|
|
|
12132
|
-
// bazel-out/
|
|
12281
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12133
12282
|
var I18nError = class extends ParseError {
|
|
12134
12283
|
constructor(span, msg) {
|
|
12135
12284
|
super(span, msg);
|
|
12136
12285
|
}
|
|
12137
12286
|
};
|
|
12138
12287
|
|
|
12139
|
-
// bazel-out/
|
|
12288
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12140
12289
|
var NAMED_ENTITIES = {
|
|
12141
12290
|
"AElig": "\xC6",
|
|
12142
12291
|
"AMP": "&",
|
|
@@ -14267,7 +14416,7 @@ var NAMED_ENTITIES = {
|
|
|
14267
14416
|
var NGSP_UNICODE = "\uE500";
|
|
14268
14417
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14269
14418
|
|
|
14270
|
-
// bazel-out/
|
|
14419
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14271
14420
|
var TokenError = class extends ParseError {
|
|
14272
14421
|
constructor(errorMsg, tokenType, span) {
|
|
14273
14422
|
super(span, errorMsg);
|
|
@@ -15188,7 +15337,7 @@ var CursorError = class {
|
|
|
15188
15337
|
}
|
|
15189
15338
|
};
|
|
15190
15339
|
|
|
15191
|
-
// bazel-out/
|
|
15340
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15192
15341
|
var TreeError = class extends ParseError {
|
|
15193
15342
|
static create(elementName, span, msg) {
|
|
15194
15343
|
return new TreeError(elementName, span, msg);
|
|
@@ -15572,7 +15721,7 @@ function decodeEntity(match, entity) {
|
|
|
15572
15721
|
return match;
|
|
15573
15722
|
}
|
|
15574
15723
|
|
|
15575
|
-
// bazel-out/
|
|
15724
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15576
15725
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15577
15726
|
"iframe|srcdoc",
|
|
15578
15727
|
"*|innerhtml",
|
|
@@ -15587,7 +15736,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15587
15736
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15588
15737
|
}
|
|
15589
15738
|
|
|
15590
|
-
// bazel-out/
|
|
15739
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15591
15740
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15592
15741
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15593
15742
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15598,16 +15747,17 @@ var setI18nRefs = (htmlNode, i18nNode) => {
|
|
|
15598
15747
|
return i18nNode;
|
|
15599
15748
|
};
|
|
15600
15749
|
var I18nMetaVisitor = class {
|
|
15601
|
-
constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false) {
|
|
15750
|
+
constructor(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, keepI18nAttrs = false, enableI18nLegacyMessageIdFormat = false, containerBlocks = DEFAULT_CONTAINER_BLOCKS) {
|
|
15602
15751
|
this.interpolationConfig = interpolationConfig;
|
|
15603
15752
|
this.keepI18nAttrs = keepI18nAttrs;
|
|
15604
15753
|
this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;
|
|
15754
|
+
this.containerBlocks = containerBlocks;
|
|
15605
15755
|
this.hasI18nMeta = false;
|
|
15606
15756
|
this._errors = [];
|
|
15607
15757
|
}
|
|
15608
15758
|
_generateI18nMessage(nodes, meta = "", visitNodeFn) {
|
|
15609
15759
|
const { meaning, description, customId } = this._parseMetadata(meta);
|
|
15610
|
-
const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig);
|
|
15760
|
+
const createI18nMessage2 = createI18nMessageFactory(this.interpolationConfig, this.containerBlocks);
|
|
15611
15761
|
const message = createI18nMessage2(nodes, meaning, description, customId, visitNodeFn);
|
|
15612
15762
|
this._setMessageId(message, meta);
|
|
15613
15763
|
this._setLegacyIds(message, meta);
|
|
@@ -15743,7 +15893,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15743
15893
|
return jsDocComment(tags);
|
|
15744
15894
|
}
|
|
15745
15895
|
|
|
15746
|
-
// bazel-out/
|
|
15896
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15747
15897
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15748
15898
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15749
15899
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15782,6 +15932,9 @@ var GetMsgSerializerVisitor = class {
|
|
|
15782
15932
|
visitPlaceholder(ph) {
|
|
15783
15933
|
return this.formatPh(ph.name);
|
|
15784
15934
|
}
|
|
15935
|
+
visitBlockPlaceholder(ph) {
|
|
15936
|
+
return `${this.formatPh(ph.startName)}${ph.children.map((child) => child.visit(this)).join("")}${this.formatPh(ph.closeName)}`;
|
|
15937
|
+
}
|
|
15785
15938
|
visitIcuPlaceholder(ph, context) {
|
|
15786
15939
|
return this.formatPh(ph.name);
|
|
15787
15940
|
}
|
|
@@ -15791,7 +15944,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15791
15944
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15792
15945
|
}
|
|
15793
15946
|
|
|
15794
|
-
// bazel-out/
|
|
15947
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15795
15948
|
function createLocalizeStatements(variable2, message, params) {
|
|
15796
15949
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15797
15950
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15830,6 +15983,12 @@ var LocalizeSerializerVisitor = class {
|
|
|
15830
15983
|
visitPlaceholder(ph) {
|
|
15831
15984
|
this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan));
|
|
15832
15985
|
}
|
|
15986
|
+
visitBlockPlaceholder(ph) {
|
|
15987
|
+
var _a2, _b2;
|
|
15988
|
+
this.pieces.push(this.createPlaceholderPiece(ph.startName, (_a2 = ph.startSourceSpan) != null ? _a2 : ph.sourceSpan));
|
|
15989
|
+
ph.children.forEach((child) => child.visit(this));
|
|
15990
|
+
this.pieces.push(this.createPlaceholderPiece(ph.closeName, (_b2 = ph.endSourceSpan) != null ? _b2 : ph.sourceSpan));
|
|
15991
|
+
}
|
|
15833
15992
|
visitIcuPlaceholder(ph) {
|
|
15834
15993
|
this.pieces.push(this.createPlaceholderPiece(ph.name, ph.sourceSpan, this.placeholderToMessage[ph.name]));
|
|
15835
15994
|
}
|
|
@@ -15874,7 +16033,7 @@ function createEmptyMessagePart(location) {
|
|
|
15874
16033
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15875
16034
|
}
|
|
15876
16035
|
|
|
15877
|
-
// bazel-out/
|
|
16036
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
15878
16037
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15879
16038
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
15880
16039
|
function collectI18nConsts(job) {
|
|
@@ -15969,7 +16128,7 @@ function assertAllParamsResolved(op) {
|
|
|
15969
16128
|
}
|
|
15970
16129
|
}
|
|
15971
16130
|
|
|
15972
|
-
// bazel-out/
|
|
16131
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15973
16132
|
function extractI18nText(job) {
|
|
15974
16133
|
var _a2;
|
|
15975
16134
|
for (const unit of job.units) {
|
|
@@ -16028,7 +16187,7 @@ function extractI18nText(job) {
|
|
|
16028
16187
|
}
|
|
16029
16188
|
}
|
|
16030
16189
|
|
|
16031
|
-
// bazel-out/
|
|
16190
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16032
16191
|
function liftLocalRefs(job) {
|
|
16033
16192
|
for (const unit of job.units) {
|
|
16034
16193
|
for (const op of unit.create) {
|
|
@@ -16058,48 +16217,7 @@ function serializeLocalRefs(refs) {
|
|
|
16058
16217
|
return literalArr(constRefs);
|
|
16059
16218
|
}
|
|
16060
16219
|
|
|
16061
|
-
// bazel-out/
|
|
16062
|
-
function mergeI18nContexts(job) {
|
|
16063
|
-
const i18nOps = /* @__PURE__ */ new Map();
|
|
16064
|
-
const i18nContexts = /* @__PURE__ */ new Map();
|
|
16065
|
-
for (const unit of job.units) {
|
|
16066
|
-
for (const op of unit.create) {
|
|
16067
|
-
switch (op.kind) {
|
|
16068
|
-
case OpKind.I18nStart:
|
|
16069
|
-
if (!op.context) {
|
|
16070
|
-
throw Error("I18n op should have its context set.");
|
|
16071
|
-
}
|
|
16072
|
-
i18nOps.set(op.xref, op);
|
|
16073
|
-
break;
|
|
16074
|
-
case OpKind.I18nContext:
|
|
16075
|
-
i18nContexts.set(op.xref, op);
|
|
16076
|
-
break;
|
|
16077
|
-
}
|
|
16078
|
-
}
|
|
16079
|
-
}
|
|
16080
|
-
for (const childI18nOp of i18nOps.values()) {
|
|
16081
|
-
if (childI18nOp.xref !== childI18nOp.root) {
|
|
16082
|
-
const childContext = i18nContexts.get(childI18nOp.context);
|
|
16083
|
-
const rootI18nOp = i18nOps.get(childI18nOp.root);
|
|
16084
|
-
const rootContext = i18nContexts.get(rootI18nOp.context);
|
|
16085
|
-
mergeParams(rootContext.params, childContext.params);
|
|
16086
|
-
mergeParams(rootContext.postprocessingParams, childContext.postprocessingParams);
|
|
16087
|
-
}
|
|
16088
|
-
}
|
|
16089
|
-
}
|
|
16090
|
-
function mergeParams(to, from) {
|
|
16091
|
-
for (const [placeholder, fromValues] of from) {
|
|
16092
|
-
const toValues = to.get(placeholder) || [];
|
|
16093
|
-
const flags = fromValues[0].flags;
|
|
16094
|
-
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
16095
|
-
to.set(placeholder, [...fromValues, ...toValues]);
|
|
16096
|
-
} else {
|
|
16097
|
-
to.set(placeholder, [...toValues, ...fromValues]);
|
|
16098
|
-
}
|
|
16099
|
-
}
|
|
16100
|
-
}
|
|
16101
|
-
|
|
16102
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16220
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16103
16221
|
function emitNamespaceChanges(job) {
|
|
16104
16222
|
for (const unit of job.units) {
|
|
16105
16223
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16115,7 +16233,7 @@ function emitNamespaceChanges(job) {
|
|
|
16115
16233
|
}
|
|
16116
16234
|
}
|
|
16117
16235
|
|
|
16118
|
-
// bazel-out/
|
|
16236
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16119
16237
|
function parse(value) {
|
|
16120
16238
|
const styles = [];
|
|
16121
16239
|
let i = 0;
|
|
@@ -16176,7 +16294,7 @@ function hyphenate2(value) {
|
|
|
16176
16294
|
}).toLowerCase();
|
|
16177
16295
|
}
|
|
16178
16296
|
|
|
16179
|
-
// bazel-out/
|
|
16297
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16180
16298
|
function nameFunctionsAndVariables(job) {
|
|
16181
16299
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16182
16300
|
}
|
|
@@ -16291,7 +16409,7 @@ function stripImportant(name) {
|
|
|
16291
16409
|
return name;
|
|
16292
16410
|
}
|
|
16293
16411
|
|
|
16294
|
-
// bazel-out/
|
|
16412
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16295
16413
|
function mergeNextContextExpressions(job) {
|
|
16296
16414
|
for (const unit of job.units) {
|
|
16297
16415
|
for (const op of unit.create) {
|
|
@@ -16337,7 +16455,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16337
16455
|
}
|
|
16338
16456
|
}
|
|
16339
16457
|
|
|
16340
|
-
// bazel-out/
|
|
16458
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16341
16459
|
var CONTAINER_TAG = "ng-container";
|
|
16342
16460
|
function generateNgContainerOps(job) {
|
|
16343
16461
|
for (const unit of job.units) {
|
|
@@ -16354,7 +16472,7 @@ function generateNgContainerOps(job) {
|
|
|
16354
16472
|
}
|
|
16355
16473
|
}
|
|
16356
16474
|
|
|
16357
|
-
// bazel-out/
|
|
16475
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16358
16476
|
function lookupElement3(elements, xref) {
|
|
16359
16477
|
const el = elements.get(xref);
|
|
16360
16478
|
if (el === void 0) {
|
|
@@ -16384,7 +16502,7 @@ function disableBindings(job) {
|
|
|
16384
16502
|
}
|
|
16385
16503
|
}
|
|
16386
16504
|
|
|
16387
|
-
// bazel-out/
|
|
16505
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16388
16506
|
function generateNullishCoalesceExpressions(job) {
|
|
16389
16507
|
for (const unit of job.units) {
|
|
16390
16508
|
for (const op of unit.ops()) {
|
|
@@ -16400,7 +16518,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16400
16518
|
}
|
|
16401
16519
|
}
|
|
16402
16520
|
|
|
16403
|
-
// bazel-out/
|
|
16521
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16404
16522
|
function kindTest(kind) {
|
|
16405
16523
|
return (op) => op.kind === kind;
|
|
16406
16524
|
}
|
|
@@ -16474,7 +16592,7 @@ function keepLast(ops) {
|
|
|
16474
16592
|
return ops.slice(ops.length - 1);
|
|
16475
16593
|
}
|
|
16476
16594
|
|
|
16477
|
-
// bazel-out/
|
|
16595
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16478
16596
|
function parseExtractedStyles(job) {
|
|
16479
16597
|
for (const unit of job.units) {
|
|
16480
16598
|
for (const op of unit.create) {
|
|
@@ -16497,7 +16615,7 @@ function parseExtractedStyles(job) {
|
|
|
16497
16615
|
}
|
|
16498
16616
|
}
|
|
16499
16617
|
|
|
16500
|
-
// bazel-out/
|
|
16618
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16501
16619
|
function removeContentSelectors(job) {
|
|
16502
16620
|
for (const unit of job.units) {
|
|
16503
16621
|
const elements = createOpXrefMap(unit);
|
|
@@ -16521,7 +16639,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16521
16639
|
return el;
|
|
16522
16640
|
}
|
|
16523
16641
|
|
|
16524
|
-
// bazel-out/
|
|
16642
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16525
16643
|
function createPipes(job) {
|
|
16526
16644
|
for (const unit of job.units) {
|
|
16527
16645
|
processPipeBindingsInView(unit);
|
|
@@ -16569,7 +16687,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16569
16687
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16570
16688
|
}
|
|
16571
16689
|
|
|
16572
|
-
// bazel-out/
|
|
16690
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16573
16691
|
function createVariadicPipes(job) {
|
|
16574
16692
|
for (const unit of job.units) {
|
|
16575
16693
|
for (const op of unit.update) {
|
|
@@ -16586,7 +16704,7 @@ function createVariadicPipes(job) {
|
|
|
16586
16704
|
}
|
|
16587
16705
|
}
|
|
16588
16706
|
|
|
16589
|
-
// bazel-out/
|
|
16707
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16590
16708
|
function propagateI18nBlocks(job) {
|
|
16591
16709
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16592
16710
|
}
|
|
@@ -16610,9 +16728,10 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16610
16728
|
subTemplateIndex++;
|
|
16611
16729
|
wrapTemplateWithI18n(templateView, i18nBlock);
|
|
16612
16730
|
}
|
|
16613
|
-
propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
|
|
16731
|
+
subTemplateIndex = propagateI18nBlocksToTemplates(templateView, subTemplateIndex);
|
|
16614
16732
|
}
|
|
16615
16733
|
}
|
|
16734
|
+
return subTemplateIndex;
|
|
16616
16735
|
}
|
|
16617
16736
|
function wrapTemplateWithI18n(unit, parentI18n) {
|
|
16618
16737
|
var _a2;
|
|
@@ -16623,7 +16742,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16623
16742
|
}
|
|
16624
16743
|
}
|
|
16625
16744
|
|
|
16626
|
-
// bazel-out/
|
|
16745
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16627
16746
|
function extractPureFunctions(job) {
|
|
16628
16747
|
for (const view of job.units) {
|
|
16629
16748
|
for (const op of view.ops()) {
|
|
@@ -16665,7 +16784,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16665
16784
|
}
|
|
16666
16785
|
};
|
|
16667
16786
|
|
|
16668
|
-
// bazel-out/
|
|
16787
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16669
16788
|
function generatePureLiteralStructures(job) {
|
|
16670
16789
|
for (const unit of job.units) {
|
|
16671
16790
|
for (const op of unit.update) {
|
|
@@ -16712,7 +16831,7 @@ function transformLiteralMap(expr) {
|
|
|
16712
16831
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16713
16832
|
}
|
|
16714
16833
|
|
|
16715
|
-
// bazel-out/
|
|
16834
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16716
16835
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16717
16836
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16718
16837
|
}
|
|
@@ -16911,8 +17030,8 @@ function repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByF
|
|
|
16911
17030
|
}
|
|
16912
17031
|
return call(Identifiers.repeaterCreate, args, sourceSpan);
|
|
16913
17032
|
}
|
|
16914
|
-
function repeater(
|
|
16915
|
-
return call(Identifiers.repeater, [
|
|
17033
|
+
function repeater(collection, sourceSpan) {
|
|
17034
|
+
return call(Identifiers.repeater, [collection], sourceSpan);
|
|
16916
17035
|
}
|
|
16917
17036
|
function deferWhen(prefetch, expr, sourceSpan) {
|
|
16918
17037
|
return call(prefetch ? Identifiers.deferPrefetchWhen : Identifiers.deferWhen, [expr], sourceSpan);
|
|
@@ -17223,7 +17342,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17223
17342
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17224
17343
|
}
|
|
17225
17344
|
|
|
17226
|
-
// bazel-out/
|
|
17345
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17227
17346
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
17228
17347
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
17229
17348
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -17470,7 +17589,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17470
17589
|
OpList.replace(op, conditional(op.targetSlot.slot, op.processed, op.contextValue, op.sourceSpan));
|
|
17471
17590
|
break;
|
|
17472
17591
|
case OpKind.Repeater:
|
|
17473
|
-
OpList.replace(op, repeater(op.
|
|
17592
|
+
OpList.replace(op, repeater(op.collection, op.sourceSpan));
|
|
17474
17593
|
break;
|
|
17475
17594
|
case OpKind.DeferWhen:
|
|
17476
17595
|
OpList.replace(op, deferWhen(op.prefetch, op.expr, op.sourceSpan));
|
|
@@ -17552,7 +17671,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17552
17671
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17553
17672
|
}
|
|
17554
17673
|
|
|
17555
|
-
// bazel-out/
|
|
17674
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17556
17675
|
function removeEmptyBindings(job) {
|
|
17557
17676
|
for (const unit of job.units) {
|
|
17558
17677
|
for (const op of unit.update) {
|
|
@@ -17573,7 +17692,7 @@ function removeEmptyBindings(job) {
|
|
|
17573
17692
|
}
|
|
17574
17693
|
}
|
|
17575
17694
|
|
|
17576
|
-
// bazel-out/
|
|
17695
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17577
17696
|
function removeI18nContexts(job) {
|
|
17578
17697
|
for (const unit of job.units) {
|
|
17579
17698
|
for (const op of unit.create) {
|
|
@@ -17589,7 +17708,7 @@ function removeI18nContexts(job) {
|
|
|
17589
17708
|
}
|
|
17590
17709
|
}
|
|
17591
17710
|
|
|
17592
|
-
// bazel-out/
|
|
17711
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17593
17712
|
function generateRepeaterDerivedVars(job) {
|
|
17594
17713
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17595
17714
|
for (const unit of job.units) {
|
|
@@ -17621,7 +17740,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17621
17740
|
}
|
|
17622
17741
|
}
|
|
17623
17742
|
|
|
17624
|
-
// bazel-out/
|
|
17743
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17625
17744
|
function resolveContexts(job) {
|
|
17626
17745
|
for (const unit of job.units) {
|
|
17627
17746
|
processLexicalScope(unit, unit.create);
|
|
@@ -17662,7 +17781,7 @@ function processLexicalScope(view, ops) {
|
|
|
17662
17781
|
}
|
|
17663
17782
|
}
|
|
17664
17783
|
|
|
17665
|
-
// bazel-out/
|
|
17784
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17666
17785
|
function resolveDollarEvent(job) {
|
|
17667
17786
|
for (const unit of job.units) {
|
|
17668
17787
|
transformDollarEvent(unit, unit.create);
|
|
@@ -17683,7 +17802,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
17683
17802
|
}
|
|
17684
17803
|
}
|
|
17685
17804
|
|
|
17686
|
-
// bazel-out/
|
|
17805
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17687
17806
|
function resolveI18nElementPlaceholders(job) {
|
|
17688
17807
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17689
17808
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -17699,55 +17818,67 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17699
17818
|
}
|
|
17700
17819
|
}
|
|
17701
17820
|
}
|
|
17702
|
-
|
|
17703
|
-
|
|
17704
|
-
|
|
17705
|
-
|
|
17706
|
-
|
|
17707
|
-
|
|
17708
|
-
|
|
17821
|
+
resolvePlaceholdersForView(job, job.root, i18nContexts, elements);
|
|
17822
|
+
}
|
|
17823
|
+
function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
|
|
17824
|
+
let currentOps = null;
|
|
17825
|
+
for (const op of unit.create) {
|
|
17826
|
+
switch (op.kind) {
|
|
17827
|
+
case OpKind.I18nStart:
|
|
17828
|
+
if (!op.context) {
|
|
17829
|
+
throw Error("Could not find i18n context for i18n op");
|
|
17830
|
+
}
|
|
17831
|
+
currentOps = { i18nBlock: op, i18nContext: i18nContexts.get(op.context) };
|
|
17832
|
+
break;
|
|
17833
|
+
case OpKind.I18nEnd:
|
|
17834
|
+
currentOps = null;
|
|
17835
|
+
break;
|
|
17836
|
+
case OpKind.ElementStart:
|
|
17837
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17838
|
+
if (currentOps === null) {
|
|
17839
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17709
17840
|
}
|
|
17710
|
-
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
break;
|
|
17715
|
-
case OpKind.ElementStart:
|
|
17716
|
-
if (op.i18nPlaceholder !== void 0) {
|
|
17717
|
-
if (currentOps === null) {
|
|
17718
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17719
|
-
}
|
|
17720
|
-
const { startName, closeName } = op.i18nPlaceholder;
|
|
17721
|
-
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17722
|
-
if (closeName === "") {
|
|
17723
|
-
flags |= I18nParamValueFlags.CloseTag;
|
|
17724
|
-
}
|
|
17725
|
-
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17841
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
17842
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17843
|
+
if (closeName === "") {
|
|
17844
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
17726
17845
|
}
|
|
17727
|
-
|
|
17728
|
-
|
|
17729
|
-
|
|
17730
|
-
|
|
17731
|
-
|
|
17732
|
-
|
|
17733
|
-
|
|
17734
|
-
|
|
17735
|
-
if (closeName !== "") {
|
|
17736
|
-
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17737
|
-
}
|
|
17846
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, currentOps.i18nBlock.subTemplateIndex, flags);
|
|
17847
|
+
}
|
|
17848
|
+
break;
|
|
17849
|
+
case OpKind.ElementEnd:
|
|
17850
|
+
const startOp = elements.get(op.xref);
|
|
17851
|
+
if (startOp && startOp.i18nPlaceholder !== void 0) {
|
|
17852
|
+
if (currentOps === null) {
|
|
17853
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17738
17854
|
}
|
|
17739
|
-
|
|
17740
|
-
|
|
17741
|
-
|
|
17742
|
-
if (currentOps === null) {
|
|
17743
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17744
|
-
}
|
|
17745
|
-
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17746
|
-
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.startName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag);
|
|
17747
|
-
addParam(currentOps.i18nContext.params, op.i18nPlaceholder.closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17855
|
+
const { closeName } = startOp.i18nPlaceholder;
|
|
17856
|
+
if (closeName !== "") {
|
|
17857
|
+
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17748
17858
|
}
|
|
17749
|
-
|
|
17750
|
-
|
|
17859
|
+
}
|
|
17860
|
+
break;
|
|
17861
|
+
case OpKind.Template:
|
|
17862
|
+
if (op.i18nPlaceholder !== void 0) {
|
|
17863
|
+
if (currentOps === null) {
|
|
17864
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17865
|
+
}
|
|
17866
|
+
let startFlags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
17867
|
+
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18nBlock, op);
|
|
17868
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
17869
|
+
const isSelfClosing = closeName === "";
|
|
17870
|
+
if (isSelfClosing) {
|
|
17871
|
+
startFlags |= I18nParamValueFlags.CloseTag;
|
|
17872
|
+
}
|
|
17873
|
+
addParam(currentOps.i18nContext.params, startName, op.handle.slot, subTemplateIndex, startFlags);
|
|
17874
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17875
|
+
if (!isSelfClosing) {
|
|
17876
|
+
addParam(currentOps.i18nContext.params, closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17877
|
+
}
|
|
17878
|
+
} else {
|
|
17879
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17880
|
+
}
|
|
17881
|
+
break;
|
|
17751
17882
|
}
|
|
17752
17883
|
}
|
|
17753
17884
|
}
|
|
@@ -17766,7 +17897,7 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
17766
17897
|
params.set(placeholder, values);
|
|
17767
17898
|
}
|
|
17768
17899
|
|
|
17769
|
-
// bazel-out/
|
|
17900
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17770
17901
|
function resolveI18nExpressionPlaceholders(job) {
|
|
17771
17902
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
17772
17903
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
@@ -17787,8 +17918,8 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17787
17918
|
for (const op of unit.update) {
|
|
17788
17919
|
if (op.kind === OpKind.I18nExpression) {
|
|
17789
17920
|
const i18nContext = i18nContexts.get(op.context);
|
|
17790
|
-
const index = expressionIndices.get(
|
|
17791
|
-
const subTemplateIndex = subTemplateIndicies.get(
|
|
17921
|
+
const index = expressionIndices.get(op.target) || 0;
|
|
17922
|
+
const subTemplateIndex = subTemplateIndicies.get(op.target);
|
|
17792
17923
|
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
17793
17924
|
const values = params.get(op.i18nPlaceholder) || [];
|
|
17794
17925
|
values.push({
|
|
@@ -17797,36 +17928,20 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17797
17928
|
flags: I18nParamValueFlags.ExpressionIndex
|
|
17798
17929
|
});
|
|
17799
17930
|
params.set(op.i18nPlaceholder, values);
|
|
17800
|
-
expressionIndices.set(
|
|
17931
|
+
expressionIndices.set(op.target, index + 1);
|
|
17801
17932
|
}
|
|
17802
17933
|
}
|
|
17803
17934
|
}
|
|
17804
17935
|
}
|
|
17805
17936
|
|
|
17806
|
-
// bazel-out/
|
|
17937
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
|
|
17807
17938
|
function resolveI18nIcuPlaceholders(job) {
|
|
17808
|
-
const contextOps = /* @__PURE__ */ new Map();
|
|
17809
17939
|
for (const unit of job.units) {
|
|
17810
17940
|
for (const op of unit.create) {
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
}
|
|
17816
|
-
}
|
|
17817
|
-
}
|
|
17818
|
-
for (const unit of job.units) {
|
|
17819
|
-
for (const op of unit.create) {
|
|
17820
|
-
switch (op.kind) {
|
|
17821
|
-
case OpKind.IcuStart:
|
|
17822
|
-
if (op.context === null) {
|
|
17823
|
-
throw Error("Icu should have its i18n context set.");
|
|
17824
|
-
}
|
|
17825
|
-
const i18nContext = contextOps.get(op.context);
|
|
17826
|
-
for (const node of op.message.nodes) {
|
|
17827
|
-
node.visit(new ResolveIcuPlaceholdersVisitor(i18nContext.postprocessingParams));
|
|
17828
|
-
}
|
|
17829
|
-
break;
|
|
17941
|
+
if (op.kind === OpKind.I18nContext && op.contextKind === I18nContextKind.Icu) {
|
|
17942
|
+
for (const node of op.message.nodes) {
|
|
17943
|
+
node.visit(new ResolveIcuPlaceholdersVisitor(op.postprocessingParams));
|
|
17944
|
+
}
|
|
17830
17945
|
}
|
|
17831
17946
|
}
|
|
17832
17947
|
}
|
|
@@ -17836,9 +17951,8 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
17836
17951
|
super();
|
|
17837
17952
|
this.params = params;
|
|
17838
17953
|
}
|
|
17839
|
-
|
|
17954
|
+
visitContainerPlaceholder(placeholder) {
|
|
17840
17955
|
var _a2, _b2;
|
|
17841
|
-
super.visitTagPlaceholder(placeholder);
|
|
17842
17956
|
if (placeholder.startName && placeholder.startSourceSpan && !this.params.has(placeholder.startName)) {
|
|
17843
17957
|
this.params.set(placeholder.startName, [{
|
|
17844
17958
|
value: (_a2 = placeholder.startSourceSpan) == null ? void 0 : _a2.toString(),
|
|
@@ -17854,9 +17968,17 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
17854
17968
|
}]);
|
|
17855
17969
|
}
|
|
17856
17970
|
}
|
|
17971
|
+
visitTagPlaceholder(placeholder) {
|
|
17972
|
+
super.visitTagPlaceholder(placeholder);
|
|
17973
|
+
this.visitContainerPlaceholder(placeholder);
|
|
17974
|
+
}
|
|
17975
|
+
visitBlockPlaceholder(placeholder) {
|
|
17976
|
+
super.visitBlockPlaceholder(placeholder);
|
|
17977
|
+
this.visitContainerPlaceholder(placeholder);
|
|
17978
|
+
}
|
|
17857
17979
|
};
|
|
17858
17980
|
|
|
17859
|
-
// bazel-out/
|
|
17981
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17860
17982
|
function resolveNames(job) {
|
|
17861
17983
|
for (const unit of job.units) {
|
|
17862
17984
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -17920,7 +18042,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
17920
18042
|
}
|
|
17921
18043
|
}
|
|
17922
18044
|
|
|
17923
|
-
// bazel-out/
|
|
18045
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
17924
18046
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
17925
18047
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
17926
18048
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -17957,7 +18079,7 @@ function isIframeElement(op) {
|
|
|
17957
18079
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
17958
18080
|
}
|
|
17959
18081
|
|
|
17960
|
-
// bazel-out/
|
|
18082
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
17961
18083
|
function saveAndRestoreView(job) {
|
|
17962
18084
|
for (const unit of job.units) {
|
|
17963
18085
|
unit.create.prepend([
|
|
@@ -18002,7 +18124,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18002
18124
|
}
|
|
18003
18125
|
}
|
|
18004
18126
|
|
|
18005
|
-
// bazel-out/
|
|
18127
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18006
18128
|
function allocateSlots(job) {
|
|
18007
18129
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18008
18130
|
for (const unit of job.units) {
|
|
@@ -18027,7 +18149,7 @@ function allocateSlots(job) {
|
|
|
18027
18149
|
}
|
|
18028
18150
|
}
|
|
18029
18151
|
|
|
18030
|
-
// bazel-out/
|
|
18152
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18031
18153
|
function specializeStyleBindings(job) {
|
|
18032
18154
|
for (const unit of job.units) {
|
|
18033
18155
|
for (const op of unit.update) {
|
|
@@ -18057,7 +18179,7 @@ function specializeStyleBindings(job) {
|
|
|
18057
18179
|
}
|
|
18058
18180
|
}
|
|
18059
18181
|
|
|
18060
|
-
// bazel-out/
|
|
18182
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18061
18183
|
function generateTemporaryVariables(job) {
|
|
18062
18184
|
for (const unit of job.units) {
|
|
18063
18185
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18115,7 +18237,7 @@ function assignName(names, expr) {
|
|
|
18115
18237
|
expr.name = name;
|
|
18116
18238
|
}
|
|
18117
18239
|
|
|
18118
|
-
// bazel-out/
|
|
18240
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18119
18241
|
function generateTrackFns(job) {
|
|
18120
18242
|
for (const unit of job.units) {
|
|
18121
18243
|
for (const op of unit.create) {
|
|
@@ -18145,7 +18267,7 @@ function generateTrackFns(job) {
|
|
|
18145
18267
|
}
|
|
18146
18268
|
}
|
|
18147
18269
|
|
|
18148
|
-
// bazel-out/
|
|
18270
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18149
18271
|
function optimizeTrackFns(job) {
|
|
18150
18272
|
for (const unit of job.units) {
|
|
18151
18273
|
for (const op of unit.create) {
|
|
@@ -18192,7 +18314,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18192
18314
|
return true;
|
|
18193
18315
|
}
|
|
18194
18316
|
|
|
18195
|
-
// bazel-out/
|
|
18317
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18196
18318
|
function generateTrackVariables(job) {
|
|
18197
18319
|
for (const unit of job.units) {
|
|
18198
18320
|
for (const op of unit.create) {
|
|
@@ -18213,7 +18335,7 @@ function generateTrackVariables(job) {
|
|
|
18213
18335
|
}
|
|
18214
18336
|
}
|
|
18215
18337
|
|
|
18216
|
-
// bazel-out/
|
|
18338
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18217
18339
|
function countVariables(job) {
|
|
18218
18340
|
for (const unit of job.units) {
|
|
18219
18341
|
let varCount = 0;
|
|
@@ -18318,7 +18440,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18318
18440
|
return true;
|
|
18319
18441
|
}
|
|
18320
18442
|
|
|
18321
|
-
// bazel-out/
|
|
18443
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18322
18444
|
function optimizeVariables(job) {
|
|
18323
18445
|
for (const unit of job.units) {
|
|
18324
18446
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18568,7 +18690,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18568
18690
|
}
|
|
18569
18691
|
}
|
|
18570
18692
|
|
|
18571
|
-
// bazel-out/
|
|
18693
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18572
18694
|
function wrapI18nIcus(job) {
|
|
18573
18695
|
for (const unit of job.units) {
|
|
18574
18696
|
let currentI18nOp = null;
|
|
@@ -18598,7 +18720,7 @@ function wrapI18nIcus(job) {
|
|
|
18598
18720
|
}
|
|
18599
18721
|
}
|
|
18600
18722
|
|
|
18601
|
-
// bazel-out/
|
|
18723
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18602
18724
|
var phases = [
|
|
18603
18725
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18604
18726
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
@@ -18641,7 +18763,6 @@ var phases = [
|
|
|
18641
18763
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
18642
18764
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
18643
18765
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nIcuPlaceholders },
|
|
18644
|
-
{ kind: CompilationJobKind.Tmpl, fn: mergeI18nContexts },
|
|
18645
18766
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
18646
18767
|
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
18647
18768
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
@@ -18763,7 +18884,7 @@ function emitHostBindingFunction(job) {
|
|
|
18763
18884
|
);
|
|
18764
18885
|
}
|
|
18765
18886
|
|
|
18766
|
-
// bazel-out/
|
|
18887
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18767
18888
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18768
18889
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
18769
18890
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
@@ -19344,10 +19465,10 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19344
19465
|
return null;
|
|
19345
19466
|
}
|
|
19346
19467
|
|
|
19347
|
-
// bazel-out/
|
|
19468
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19348
19469
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19349
19470
|
|
|
19350
|
-
// bazel-out/
|
|
19471
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19351
19472
|
var IMPORTANT_FLAG = "!important";
|
|
19352
19473
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19353
19474
|
var StylingBuilder = class {
|
|
@@ -19680,7 +19801,7 @@ function isEmptyExpression(ast) {
|
|
|
19680
19801
|
return ast instanceof EmptyExpr;
|
|
19681
19802
|
}
|
|
19682
19803
|
|
|
19683
|
-
// bazel-out/
|
|
19804
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19684
19805
|
var HtmlParser = class extends Parser2 {
|
|
19685
19806
|
constructor() {
|
|
19686
19807
|
super(getHtmlTagDefinition);
|
|
@@ -19690,7 +19811,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19690
19811
|
}
|
|
19691
19812
|
};
|
|
19692
19813
|
|
|
19693
|
-
// bazel-out/
|
|
19814
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19694
19815
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19695
19816
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19696
19817
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19756,7 +19877,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19756
19877
|
return result;
|
|
19757
19878
|
}
|
|
19758
19879
|
|
|
19759
|
-
// bazel-out/
|
|
19880
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19760
19881
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19761
19882
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19762
19883
|
var CLASS_PREFIX = "class";
|
|
@@ -20076,7 +20197,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20076
20197
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20077
20198
|
}
|
|
20078
20199
|
|
|
20079
|
-
// bazel-out/
|
|
20200
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20080
20201
|
function isStyleUrlResolvable(url) {
|
|
20081
20202
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20082
20203
|
return false;
|
|
@@ -20085,7 +20206,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20085
20206
|
}
|
|
20086
20207
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20087
20208
|
|
|
20088
|
-
// bazel-out/
|
|
20209
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20089
20210
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20090
20211
|
var LINK_ELEMENT = "link";
|
|
20091
20212
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20155,7 +20276,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20155
20276
|
return selectAttr;
|
|
20156
20277
|
}
|
|
20157
20278
|
|
|
20158
|
-
// bazel-out/
|
|
20279
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20159
20280
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20160
20281
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20161
20282
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20173,18 +20294,18 @@ function createIfBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20173
20294
|
const branches = [];
|
|
20174
20295
|
const mainBlockParams = parseConditionalBlockParameters(ast, errors, bindingParser);
|
|
20175
20296
|
if (mainBlockParams !== null) {
|
|
20176
|
-
branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll2(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan));
|
|
20297
|
+
branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll2(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan, ast.i18n));
|
|
20177
20298
|
}
|
|
20178
20299
|
for (const block of connectedBlocks) {
|
|
20179
20300
|
if (ELSE_IF_PATTERN.test(block.name)) {
|
|
20180
20301
|
const params = parseConditionalBlockParameters(block, errors, bindingParser);
|
|
20181
20302
|
if (params !== null) {
|
|
20182
20303
|
const children = visitAll2(visitor, block.children, block.children);
|
|
20183
|
-
branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
|
|
20304
|
+
branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));
|
|
20184
20305
|
}
|
|
20185
20306
|
} else if (block.name === "else") {
|
|
20186
20307
|
const children = visitAll2(visitor, block.children, block.children);
|
|
20187
|
-
branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
|
|
20308
|
+
branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n));
|
|
20188
20309
|
}
|
|
20189
20310
|
}
|
|
20190
20311
|
const ifBlockStartSourceSpan = branches.length > 0 ? branches[0].startSourceSpan : ast.startSourceSpan;
|
|
@@ -20212,7 +20333,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20212
20333
|
} else if (block.parameters.length > 0) {
|
|
20213
20334
|
errors.push(new ParseError(block.sourceSpan, "@empty block cannot have parameters"));
|
|
20214
20335
|
} else {
|
|
20215
|
-
empty = new ForLoopBlockEmpty(visitAll2(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan);
|
|
20336
|
+
empty = new ForLoopBlockEmpty(visitAll2(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan, block.i18n);
|
|
20216
20337
|
}
|
|
20217
20338
|
} else {
|
|
20218
20339
|
errors.push(new ParseError(block.sourceSpan, `Unrecognized @for loop block "${block.name}"`));
|
|
@@ -20224,7 +20345,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20224
20345
|
} else {
|
|
20225
20346
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
20226
20347
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
20227
|
-
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);
|
|
20348
|
+
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);
|
|
20228
20349
|
}
|
|
20229
20350
|
}
|
|
20230
20351
|
return { node, errors };
|
|
@@ -20244,7 +20365,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
20244
20365
|
continue;
|
|
20245
20366
|
}
|
|
20246
20367
|
const expression = node.name === "case" ? parseBlockParameterToBinding(node.parameters[0], bindingParser) : null;
|
|
20247
|
-
const ast2 = new SwitchBlockCase(expression, visitAll2(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan);
|
|
20368
|
+
const ast2 = new SwitchBlockCase(expression, visitAll2(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan, node.i18n);
|
|
20248
20369
|
if (expression === null) {
|
|
20249
20370
|
defaultCase = ast2;
|
|
20250
20371
|
} else {
|
|
@@ -20446,7 +20567,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20446
20567
|
return expression.slice(start, end);
|
|
20447
20568
|
}
|
|
20448
20569
|
|
|
20449
|
-
// bazel-out/
|
|
20570
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20450
20571
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20451
20572
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20452
20573
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -20710,7 +20831,7 @@ function parseDeferredTime(value) {
|
|
|
20710
20831
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20711
20832
|
}
|
|
20712
20833
|
|
|
20713
|
-
// bazel-out/
|
|
20834
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20714
20835
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20715
20836
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20716
20837
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20732,7 +20853,7 @@ function createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20732
20853
|
endOfLastSourceSpan = lastConnectedBlock.sourceSpan.end;
|
|
20733
20854
|
}
|
|
20734
20855
|
const sourceSpanWithConnectedBlocks = new ParseSourceSpan(ast.sourceSpan.start, endOfLastSourceSpan);
|
|
20735
|
-
const node = new DeferredBlock(visitAll2(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan);
|
|
20856
|
+
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);
|
|
20736
20857
|
return { node, errors };
|
|
20737
20858
|
}
|
|
20738
20859
|
function parseConnectedBlocks(connectedBlocks, errors, visitor) {
|
|
@@ -20790,7 +20911,7 @@ function parsePlaceholderBlock(ast, visitor) {
|
|
|
20790
20911
|
throw new Error(`Unrecognized parameter in @placeholder block: "${param.expression}"`);
|
|
20791
20912
|
}
|
|
20792
20913
|
}
|
|
20793
|
-
return new DeferredBlockPlaceholder(visitAll2(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20914
|
+
return new DeferredBlockPlaceholder(visitAll2(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
20794
20915
|
}
|
|
20795
20916
|
function parseLoadingBlock(ast, visitor) {
|
|
20796
20917
|
let afterTime = null;
|
|
@@ -20818,13 +20939,13 @@ function parseLoadingBlock(ast, visitor) {
|
|
|
20818
20939
|
throw new Error(`Unrecognized parameter in @loading block: "${param.expression}"`);
|
|
20819
20940
|
}
|
|
20820
20941
|
}
|
|
20821
|
-
return new DeferredBlockLoading(visitAll2(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20942
|
+
return new DeferredBlockLoading(visitAll2(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
20822
20943
|
}
|
|
20823
20944
|
function parseErrorBlock(ast, visitor) {
|
|
20824
20945
|
if (ast.parameters.length > 0) {
|
|
20825
20946
|
throw new Error(`@error block cannot have parameters`);
|
|
20826
20947
|
}
|
|
20827
|
-
return new DeferredBlockError(visitAll2(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20948
|
+
return new DeferredBlockError(visitAll2(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.i18n);
|
|
20828
20949
|
}
|
|
20829
20950
|
function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
20830
20951
|
const triggers = {};
|
|
@@ -20845,7 +20966,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20845
20966
|
return { triggers, prefetchTriggers };
|
|
20846
20967
|
}
|
|
20847
20968
|
|
|
20848
|
-
// bazel-out/
|
|
20969
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20849
20970
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20850
20971
|
var KW_BIND_IDX = 1;
|
|
20851
20972
|
var KW_LET_IDX = 2;
|
|
@@ -21276,7 +21397,7 @@ function textContents(node) {
|
|
|
21276
21397
|
}
|
|
21277
21398
|
}
|
|
21278
21399
|
|
|
21279
|
-
// bazel-out/
|
|
21400
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21280
21401
|
var TagType;
|
|
21281
21402
|
(function(TagType2) {
|
|
21282
21403
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21308,6 +21429,11 @@ var I18nContext = class {
|
|
|
21308
21429
|
const content = { type, index, ctx: this.id, isVoid: node.isVoid, closed };
|
|
21309
21430
|
updatePlaceholderMap(this.placeholders, ph, content);
|
|
21310
21431
|
}
|
|
21432
|
+
appendBlockPart(node, index, closed) {
|
|
21433
|
+
const ph = closed ? node.closeName : node.startName;
|
|
21434
|
+
const content = { type: TagType.TEMPLATE, index, ctx: this.id, closed };
|
|
21435
|
+
updatePlaceholderMap(this.placeholders, ph, content);
|
|
21436
|
+
}
|
|
21311
21437
|
get icus() {
|
|
21312
21438
|
return this._registry.icus;
|
|
21313
21439
|
}
|
|
@@ -21337,6 +21463,11 @@ var I18nContext = class {
|
|
|
21337
21463
|
this.appendTag(TagType.TEMPLATE, node, index, true);
|
|
21338
21464
|
this._unresolvedCtxCount++;
|
|
21339
21465
|
}
|
|
21466
|
+
appendBlock(node, index) {
|
|
21467
|
+
this.appendBlockPart(node, index, false);
|
|
21468
|
+
this.appendBlockPart(node, index, true);
|
|
21469
|
+
this._unresolvedCtxCount++;
|
|
21470
|
+
}
|
|
21340
21471
|
appendElement(node, index, closed) {
|
|
21341
21472
|
this.appendTag(TagType.ELEMENT, node, index, closed);
|
|
21342
21473
|
}
|
|
@@ -21411,7 +21542,7 @@ function serializePlaceholderValue(value) {
|
|
|
21411
21542
|
}
|
|
21412
21543
|
}
|
|
21413
21544
|
|
|
21414
|
-
// bazel-out/
|
|
21545
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21415
21546
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21416
21547
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21417
21548
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -21532,12 +21663,18 @@ var TemplateDefinitionBuilder = class {
|
|
|
21532
21663
|
this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);
|
|
21533
21664
|
});
|
|
21534
21665
|
}
|
|
21535
|
-
buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n2) {
|
|
21666
|
+
buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n2, variableAliases) {
|
|
21536
21667
|
this._ngContentSelectorsOffset = ngContentSelectorsOffset;
|
|
21537
21668
|
if (this._namespace !== Identifiers.namespaceHTML) {
|
|
21538
21669
|
this.creationInstruction(null, this._namespace);
|
|
21539
21670
|
}
|
|
21540
|
-
variables.forEach((v) =>
|
|
21671
|
+
variables.forEach((v) => {
|
|
21672
|
+
const alias = variableAliases == null ? void 0 : variableAliases[v.name];
|
|
21673
|
+
this.registerContextVariables(v.name, v.value);
|
|
21674
|
+
if (alias) {
|
|
21675
|
+
this.registerContextVariables(alias, v.value);
|
|
21676
|
+
}
|
|
21677
|
+
});
|
|
21541
21678
|
const initI18nContext = this.i18nContext || isI18nRootNode(i18n2) && !isSingleI18nIcu(i18n2) && !(isSingleElementTemplate(nodes) && nodes[0].i18n === i18n2);
|
|
21542
21679
|
const selfClosingI18nInstruction = hasTextChildrenOnly(nodes);
|
|
21543
21680
|
if (initI18nContext) {
|
|
@@ -21592,12 +21729,12 @@ var TemplateDefinitionBuilder = class {
|
|
|
21592
21729
|
this._constants.prepareStatements.push(...statements);
|
|
21593
21730
|
return _ref;
|
|
21594
21731
|
}
|
|
21595
|
-
registerContextVariables(
|
|
21732
|
+
registerContextVariables(name, value) {
|
|
21596
21733
|
const scopedName = this._bindingScope.freshReferenceName();
|
|
21597
21734
|
const retrievalLevel = this.level;
|
|
21598
|
-
const isDirect =
|
|
21599
|
-
const lhs = variable(
|
|
21600
|
-
this._bindingScope.set(retrievalLevel,
|
|
21735
|
+
const isDirect = value === DIRECT_CONTEXT_REFERENCE;
|
|
21736
|
+
const lhs = variable(name + scopedName);
|
|
21737
|
+
this._bindingScope.set(retrievalLevel, name, (scope) => {
|
|
21601
21738
|
return isDirect && scope.bindingLevel === retrievalLevel && !scope.isListenerScope() ? variable(CONTEXT_NAME) : lhs;
|
|
21602
21739
|
}, 1, (scope, relativeLevel) => {
|
|
21603
21740
|
let rhs;
|
|
@@ -21615,7 +21752,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
21615
21752
|
rhs = sharedCtxVar ? sharedCtxVar : generateNextContextExpr(relativeLevel);
|
|
21616
21753
|
}
|
|
21617
21754
|
return [
|
|
21618
|
-
lhs.set(isDirect ? rhs : rhs.prop(
|
|
21755
|
+
lhs.set(isDirect ? rhs : rhs.prop(value || IMPLICIT_REFERENCE)).toConstDecl()
|
|
21619
21756
|
];
|
|
21620
21757
|
});
|
|
21621
21758
|
}
|
|
@@ -21954,16 +22091,20 @@ var TemplateDefinitionBuilder = class {
|
|
|
21954
22091
|
this.creationInstruction(span, isNgContainer2 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);
|
|
21955
22092
|
}
|
|
21956
22093
|
}
|
|
21957
|
-
prepareEmbeddedTemplateFn(children, contextNameSuffix, variables = [],
|
|
22094
|
+
prepareEmbeddedTemplateFn(children, contextNameSuffix, variables = [], i18nMeta, variableAliases) {
|
|
21958
22095
|
const index = this.allocateDataSlot();
|
|
21959
|
-
if (this.i18n &&
|
|
21960
|
-
|
|
22096
|
+
if (this.i18n && i18nMeta) {
|
|
22097
|
+
if (i18nMeta instanceof BlockPlaceholder) {
|
|
22098
|
+
this.i18n.appendBlock(i18nMeta, index);
|
|
22099
|
+
} else {
|
|
22100
|
+
this.i18n.appendTemplate(i18nMeta, index);
|
|
22101
|
+
}
|
|
21961
22102
|
}
|
|
21962
22103
|
const contextName = `${this.contextName}${contextNameSuffix}_${index}`;
|
|
21963
22104
|
const name = `${contextName}_Template`;
|
|
21964
22105
|
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);
|
|
21965
22106
|
this._nestedTemplateFns.push(() => {
|
|
21966
|
-
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset,
|
|
22107
|
+
const templateFunctionExpr = visitor.buildTemplateFunction(children, variables, this._ngContentReservedSlots.length + this._ngContentSelectorsOffset, i18nMeta, variableAliases);
|
|
21967
22108
|
this.constantPool.statements.push(templateFunctionExpr.toDeclStmt(name));
|
|
21968
22109
|
if (visitor._ngContentReservedSlots.length) {
|
|
21969
22110
|
this._ngContentReservedSlots.push(...visitor._ngContentReservedSlots);
|
|
@@ -22073,7 +22214,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22073
22214
|
tagName = inferredData.tagName;
|
|
22074
22215
|
attrsExprs = inferredData.attrsExprs;
|
|
22075
22216
|
}
|
|
22076
|
-
const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs);
|
|
22217
|
+
const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs, void 0, branch.i18n);
|
|
22077
22218
|
const processedExpression = expression === null ? null : expression.visit(this._valueConverter);
|
|
22078
22219
|
return { index: templateIndex, expression: processedExpression, alias: expressionAlias };
|
|
22079
22220
|
});
|
|
@@ -22107,7 +22248,7 @@ var TemplateDefinitionBuilder = class {
|
|
|
22107
22248
|
}
|
|
22108
22249
|
visitSwitchBlock(block) {
|
|
22109
22250
|
const caseData = block.cases.map((currentCase) => {
|
|
22110
|
-
const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan);
|
|
22251
|
+
const index = this.createEmbeddedTemplateFn(null, currentCase.children, "_Case", currentCase.sourceSpan, void 0, void 0, void 0, currentCase.i18n);
|
|
22111
22252
|
const expression = currentCase.expression === null ? null : currentCase.expression.visit(this._valueConverter);
|
|
22112
22253
|
return { index, expression };
|
|
22113
22254
|
});
|
|
@@ -22135,12 +22276,12 @@ var TemplateDefinitionBuilder = class {
|
|
|
22135
22276
|
if (!metadata) {
|
|
22136
22277
|
throw new Error("Could not resolve `defer` block metadata. Block may need to be analyzed.");
|
|
22137
22278
|
}
|
|
22138
|
-
const primaryTemplateIndex = this.createEmbeddedTemplateFn(null, deferred.children, "_Defer", deferred.sourceSpan);
|
|
22139
|
-
const loadingIndex = loading ? this.createEmbeddedTemplateFn(null, loading.children, "_DeferLoading", loading.sourceSpan) : null;
|
|
22279
|
+
const primaryTemplateIndex = this.createEmbeddedTemplateFn(null, deferred.children, "_Defer", deferred.sourceSpan, void 0, void 0, void 0, deferred.i18n);
|
|
22280
|
+
const loadingIndex = loading ? this.createEmbeddedTemplateFn(null, loading.children, "_DeferLoading", loading.sourceSpan, void 0, void 0, void 0, loading.i18n) : null;
|
|
22140
22281
|
const loadingConsts = loading ? trimTrailingNulls([literal(loading.minimumTime), literal(loading.afterTime)]) : null;
|
|
22141
|
-
const placeholderIndex = placeholder ? this.createEmbeddedTemplateFn(null, placeholder.children, "_DeferPlaceholder", placeholder.sourceSpan) : null;
|
|
22282
|
+
const placeholderIndex = placeholder ? this.createEmbeddedTemplateFn(null, placeholder.children, "_DeferPlaceholder", placeholder.sourceSpan, void 0, void 0, void 0, placeholder.i18n) : null;
|
|
22142
22283
|
const placeholderConsts = placeholder && placeholder.minimumTime !== null ? literalArr([literal(placeholder.minimumTime)]) : null;
|
|
22143
|
-
const errorIndex = error2 ? this.createEmbeddedTemplateFn(null, error2.children, "_DeferError", error2.sourceSpan) : null;
|
|
22284
|
+
const errorIndex = error2 ? this.createEmbeddedTemplateFn(null, error2.children, "_DeferError", error2.sourceSpan, void 0, void 0, void 0, error2.i18n) : null;
|
|
22144
22285
|
const deferredIndex = this.allocateDataSlot();
|
|
22145
22286
|
const depsFnName = `${this.contextName}_Defer_${deferredIndex}_DepsFn`;
|
|
22146
22287
|
this.creationInstruction(deferred.sourceSpan, Identifiers.defer, trimTrailingNulls([
|
|
@@ -22249,11 +22390,14 @@ var TemplateDefinitionBuilder = class {
|
|
|
22249
22390
|
visitForLoopBlock(block) {
|
|
22250
22391
|
const blockIndex = this.allocateDataSlot();
|
|
22251
22392
|
const { tagName, attrsExprs } = this.inferProjectionDataFromInsertionPoint(block);
|
|
22252
|
-
const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count]
|
|
22393
|
+
const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count], block.i18n, {
|
|
22394
|
+
[block.contextVariables.$index.name]: this.getLevelSpecificVariableName("$index", this.level + 1),
|
|
22395
|
+
[block.contextVariables.$count.name]: this.getLevelSpecificVariableName("$count", this.level + 1)
|
|
22396
|
+
});
|
|
22253
22397
|
const { expression: trackByExpression, usesComponentInstance: trackByUsesComponentInstance } = this.createTrackByFunction(block);
|
|
22254
22398
|
let emptyData = null;
|
|
22255
22399
|
if (block.empty !== null) {
|
|
22256
|
-
emptyData = this.prepareEmbeddedTemplateFn(block.empty.children, "_ForEmpty");
|
|
22400
|
+
emptyData = this.prepareEmbeddedTemplateFn(block.empty.children, "_ForEmpty", void 0, block.empty.i18n);
|
|
22257
22401
|
this.allocateBindingSlots(null);
|
|
22258
22402
|
}
|
|
22259
22403
|
this.registerComputedLoopVariables(block, primaryData.scope);
|
|
@@ -22275,16 +22419,31 @@ var TemplateDefinitionBuilder = class {
|
|
|
22275
22419
|
return params;
|
|
22276
22420
|
});
|
|
22277
22421
|
const value = block.expression.visit(this._valueConverter);
|
|
22278
|
-
this.
|
|
22422
|
+
this.updateInstructionWithAdvance(blockIndex, block.sourceSpan, Identifiers.repeater, () => [this.convertPropertyBinding(value)]);
|
|
22279
22423
|
}
|
|
22280
22424
|
registerComputedLoopVariables(block, bindingScope) {
|
|
22281
|
-
const indexLocalName = block.contextVariables.$index.name;
|
|
22282
|
-
const countLocalName = block.contextVariables.$count.name;
|
|
22283
22425
|
const level = bindingScope.bindingLevel;
|
|
22284
|
-
bindingScope.set(level, block.contextVariables.$odd.name, (scope) =>
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
bindingScope.set(level, block.contextVariables.$
|
|
22426
|
+
bindingScope.set(level, block.contextVariables.$odd.name, (scope, retrievalLevel) => {
|
|
22427
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").modulo(literal(2)).notIdentical(literal(0));
|
|
22428
|
+
});
|
|
22429
|
+
bindingScope.set(level, block.contextVariables.$even.name, (scope, retrievalLevel) => {
|
|
22430
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").modulo(literal(2)).identical(literal(0));
|
|
22431
|
+
});
|
|
22432
|
+
bindingScope.set(level, block.contextVariables.$first.name, (scope, retrievalLevel) => {
|
|
22433
|
+
return this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index").identical(literal(0));
|
|
22434
|
+
});
|
|
22435
|
+
bindingScope.set(level, block.contextVariables.$last.name, (scope, retrievalLevel) => {
|
|
22436
|
+
const index = this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$index");
|
|
22437
|
+
const count = this.getLevelSpecificForLoopVariable(block, scope, retrievalLevel, "$count");
|
|
22438
|
+
return index.identical(count.minus(literal(1)));
|
|
22439
|
+
});
|
|
22440
|
+
}
|
|
22441
|
+
getLevelSpecificVariableName(name, level) {
|
|
22442
|
+
return `\u0275${name}_${level}`;
|
|
22443
|
+
}
|
|
22444
|
+
getLevelSpecificForLoopVariable(block, scope, retrievalLevel, name) {
|
|
22445
|
+
const scopeName = scope.bindingLevel === retrievalLevel ? block.contextVariables[name].name : this.getLevelSpecificVariableName(name, retrievalLevel);
|
|
22446
|
+
return scope.get(scopeName);
|
|
22288
22447
|
}
|
|
22289
22448
|
optimizeTrackByFunction(block) {
|
|
22290
22449
|
const indexLocalName = block.contextVariables.$index.name;
|
|
@@ -22694,7 +22853,7 @@ var BindingScope = class {
|
|
|
22694
22853
|
if (value.declareLocalCallback && !value.declare) {
|
|
22695
22854
|
value.declare = true;
|
|
22696
22855
|
}
|
|
22697
|
-
return typeof value.lhs === "function" ? value.lhs(this) : value.lhs;
|
|
22856
|
+
return typeof value.lhs === "function" ? value.lhs(this, value.retrievalLevel) : value.lhs;
|
|
22698
22857
|
}
|
|
22699
22858
|
current = current.parent;
|
|
22700
22859
|
}
|
|
@@ -22770,7 +22929,7 @@ var BindingScope = class {
|
|
|
22770
22929
|
const componentValue = this.map.get(SHARED_CONTEXT_KEY + 0);
|
|
22771
22930
|
componentValue.declare = true;
|
|
22772
22931
|
this.maybeRestoreView();
|
|
22773
|
-
const lhs = typeof componentValue.lhs === "function" ? componentValue.lhs(this) : componentValue.lhs;
|
|
22932
|
+
const lhs = typeof componentValue.lhs === "function" ? componentValue.lhs(this, componentValue.retrievalLevel) : componentValue.lhs;
|
|
22774
22933
|
return name === DIRECT_CONTEXT_REFERENCE ? lhs : lhs.prop(name);
|
|
22775
22934
|
}
|
|
22776
22935
|
maybeRestoreView() {
|
|
@@ -22843,21 +23002,6 @@ var TrackByBindingScope = class extends BindingScope {
|
|
|
22843
23002
|
return this.componentAccessCount;
|
|
22844
23003
|
}
|
|
22845
23004
|
};
|
|
22846
|
-
function createCssSelector(elementName, attributes) {
|
|
22847
|
-
const cssSelector = new CssSelector();
|
|
22848
|
-
const elementNameNoNs = splitNsName(elementName)[1];
|
|
22849
|
-
cssSelector.setElement(elementNameNoNs);
|
|
22850
|
-
Object.getOwnPropertyNames(attributes).forEach((name) => {
|
|
22851
|
-
const nameNoNs = splitNsName(name)[1];
|
|
22852
|
-
const value = attributes[name];
|
|
22853
|
-
cssSelector.addAttribute(nameNoNs, value);
|
|
22854
|
-
if (name.toLowerCase() === "class") {
|
|
22855
|
-
const classes = value.trim().split(/\s+/);
|
|
22856
|
-
classes.forEach((className) => cssSelector.addClassName(className));
|
|
22857
|
-
}
|
|
22858
|
-
});
|
|
22859
|
-
return cssSelector;
|
|
22860
|
-
}
|
|
22861
23005
|
function getNgProjectAsLiteral(attribute2) {
|
|
22862
23006
|
const parsedR3Selector = parseSelectorToR3Selector(attribute2.value)[0];
|
|
22863
23007
|
return [literal(5), asLiteral(parsedR3Selector)];
|
|
@@ -23075,7 +23219,7 @@ function createClosureModeGuard2() {
|
|
|
23075
23219
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23076
23220
|
}
|
|
23077
23221
|
|
|
23078
|
-
// bazel-out/
|
|
23222
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23079
23223
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23080
23224
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23081
23225
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23126,6 +23270,9 @@ function addFeatures(definitionMap, meta) {
|
|
|
23126
23270
|
break;
|
|
23127
23271
|
}
|
|
23128
23272
|
}
|
|
23273
|
+
if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
|
|
23274
|
+
features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
|
|
23275
|
+
}
|
|
23129
23276
|
if (meta.usesInheritance) {
|
|
23130
23277
|
features.push(importExpr(Identifiers.InheritDefinitionFeature));
|
|
23131
23278
|
}
|
|
@@ -23138,9 +23285,6 @@ function addFeatures(definitionMap, meta) {
|
|
|
23138
23285
|
if (meta.hasOwnProperty("template") && meta.isStandalone) {
|
|
23139
23286
|
features.push(importExpr(Identifiers.StandaloneFeature));
|
|
23140
23287
|
}
|
|
23141
|
-
if ((_a2 = meta.hostDirectives) == null ? void 0 : _a2.length) {
|
|
23142
|
-
features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
|
|
23143
|
-
}
|
|
23144
23288
|
if (features.length) {
|
|
23145
23289
|
definitionMap.set("features", literalArr(features));
|
|
23146
23290
|
}
|
|
@@ -23677,7 +23821,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
23677
23821
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
23678
23822
|
}
|
|
23679
23823
|
|
|
23680
|
-
// bazel-out/
|
|
23824
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
23681
23825
|
var R3TargetBinder = class {
|
|
23682
23826
|
constructor(directiveMatcher) {
|
|
23683
23827
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -23845,13 +23989,13 @@ var DirectiveBinder = class {
|
|
|
23845
23989
|
template2.forEach((node) => node.visit(this));
|
|
23846
23990
|
}
|
|
23847
23991
|
visitElement(element2) {
|
|
23848
|
-
this.visitElementOrTemplate(element2
|
|
23992
|
+
this.visitElementOrTemplate(element2);
|
|
23849
23993
|
}
|
|
23850
23994
|
visitTemplate(template2) {
|
|
23851
|
-
this.visitElementOrTemplate(
|
|
23995
|
+
this.visitElementOrTemplate(template2);
|
|
23852
23996
|
}
|
|
23853
|
-
visitElementOrTemplate(
|
|
23854
|
-
const cssSelector =
|
|
23997
|
+
visitElementOrTemplate(node) {
|
|
23998
|
+
const cssSelector = createCssSelectorFromNode(node);
|
|
23855
23999
|
const directives = [];
|
|
23856
24000
|
this.matcher.match(cssSelector, (_selector, results) => directives.push(...results));
|
|
23857
24001
|
if (directives.length > 0) {
|
|
@@ -24282,11 +24426,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24282
24426
|
return templateEntities;
|
|
24283
24427
|
}
|
|
24284
24428
|
|
|
24285
|
-
// bazel-out/
|
|
24429
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24286
24430
|
var ResourceLoader = class {
|
|
24287
24431
|
};
|
|
24288
24432
|
|
|
24289
|
-
// bazel-out/
|
|
24433
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24290
24434
|
var CompilerFacadeImpl = class {
|
|
24291
24435
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24292
24436
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24838,17 +24982,17 @@ function publishFacade(global) {
|
|
|
24838
24982
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24839
24983
|
}
|
|
24840
24984
|
|
|
24841
|
-
// bazel-out/
|
|
24842
|
-
var VERSION2 = new Version("17.1.0-next.
|
|
24985
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
24986
|
+
var VERSION2 = new Version("17.1.0-next.2");
|
|
24843
24987
|
|
|
24844
|
-
// bazel-out/
|
|
24988
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
24845
24989
|
var _VisitorMode;
|
|
24846
24990
|
(function(_VisitorMode2) {
|
|
24847
24991
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
24848
24992
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
24849
24993
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
24850
24994
|
|
|
24851
|
-
// bazel-out/
|
|
24995
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
24852
24996
|
var XmlTagDefinition = class {
|
|
24853
24997
|
constructor() {
|
|
24854
24998
|
this.closedByParent = false;
|
|
@@ -24870,7 +25014,7 @@ var XmlTagDefinition = class {
|
|
|
24870
25014
|
};
|
|
24871
25015
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
24872
25016
|
|
|
24873
|
-
// bazel-out/
|
|
25017
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
24874
25018
|
var FactoryTarget2;
|
|
24875
25019
|
(function(FactoryTarget3) {
|
|
24876
25020
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -24880,10 +25024,10 @@ var FactoryTarget2;
|
|
|
24880
25024
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
24881
25025
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
24882
25026
|
|
|
24883
|
-
// bazel-out/
|
|
25027
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
24884
25028
|
publishFacade(_global);
|
|
24885
25029
|
|
|
24886
|
-
// bazel-out/
|
|
25030
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
|
|
24887
25031
|
var import_path2 = require("path");
|
|
24888
25032
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
24889
25033
|
var REPLACEMENTS2 = {
|
|
@@ -24991,7 +25135,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
24991
25135
|
});
|
|
24992
25136
|
}
|
|
24993
25137
|
|
|
24994
|
-
// bazel-out/
|
|
25138
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
24995
25139
|
function block_template_entities_default() {
|
|
24996
25140
|
return (tree) => __async(this, null, function* () {
|
|
24997
25141
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|