@angular/core 17.0.0-rc.1 → 17.0.0-rc.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/primitives/signals/index.mjs +2 -2
- package/esm2022/primitives/signals/src/graph.mjs +22 -1
- package/esm2022/primitives/signals/src/signal.mjs +7 -3
- package/esm2022/rxjs-interop/src/to_signal.mjs +9 -2
- package/esm2022/src/change_detection/change_detector_ref.mjs +1 -1
- package/esm2022/src/defer/instructions.mjs +35 -22
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/image_performance_warning.mjs +9 -3
- package/esm2022/src/metadata/do_bootstrap.mjs +9 -0
- package/esm2022/src/metadata.mjs +1 -1
- package/esm2022/src/render3/assert.mjs +2 -2
- package/esm2022/src/render3/features/standalone_feature.mjs +5 -1
- package/esm2022/src/render3/instructions/change_detection.mjs +68 -8
- package/esm2022/src/render3/instructions/change_detection_flags.mjs +12 -0
- package/esm2022/src/render3/instructions/control_flow.mjs +65 -45
- package/esm2022/src/render3/instructions/shared.mjs +22 -42
- package/esm2022/src/render3/interfaces/view.mjs +2 -2
- package/esm2022/src/render3/node_manipulation.mjs +2 -3
- package/esm2022/src/render3/reactive_lview_consumer.mjs +20 -33
- package/esm2022/src/render3/reactivity/effect.mjs +22 -6
- package/esm2022/src/render3/reactivity/signal.mjs +1 -1
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +32 -25
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +4 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +18287 -18174
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +28 -3
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +9 -2
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +4 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +17 -10
- package/package.json +2 -2
- package/primitives/signals/index.d.ts +14 -1
- package/rxjs-interop/index.d.ts +10 -1
- package/schematics/migrations/block-template-entities/bundle.js +1348 -1013
- 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 +1439 -1077
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/control-flow-migration/schema.json +9 -2
- package/schematics/ng-generate/standalone-migration/bundle.js +2851 -2403
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2022/src/metadata/do_boostrap.mjs +0 -9
|
@@ -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}]`);
|
|
@@ -813,7 +813,7 @@ function wordAt(bytes, index, endian) {
|
|
|
813
813
|
return word;
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
// bazel-out/
|
|
816
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
817
817
|
var TypeModifier;
|
|
818
818
|
(function(TypeModifier2) {
|
|
819
819
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1768,7 +1768,7 @@ function serializeTags(tags) {
|
|
|
1768
1768
|
return out;
|
|
1769
1769
|
}
|
|
1770
1770
|
|
|
1771
|
-
// bazel-out/
|
|
1771
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1772
1772
|
var CONSTANT_PREFIX = "_c";
|
|
1773
1773
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1774
1774
|
var KEY_CONTEXT = {};
|
|
@@ -1951,7 +1951,7 @@ function isLongStringLiteral(expr) {
|
|
|
1951
1951
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1952
1952
|
}
|
|
1953
1953
|
|
|
1954
|
-
// bazel-out/
|
|
1954
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1955
1955
|
var CORE = "@angular/core";
|
|
1956
1956
|
var _Identifiers = class {
|
|
1957
1957
|
};
|
|
@@ -2584,7 +2584,7 @@ var Identifiers = _Identifiers;
|
|
|
2584
2584
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2585
2585
|
})();
|
|
2586
2586
|
|
|
2587
|
-
// bazel-out/
|
|
2587
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2588
2588
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2589
2589
|
function dashCaseToCamelCase(input) {
|
|
2590
2590
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2672,7 +2672,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2672
2672
|
return [truthy, falsy];
|
|
2673
2673
|
}
|
|
2674
2674
|
|
|
2675
|
-
// bazel-out/
|
|
2675
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2676
2676
|
var VERSION = 3;
|
|
2677
2677
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2678
2678
|
var SourceMapGenerator = class {
|
|
@@ -2801,7 +2801,7 @@ function toBase64Digit(value) {
|
|
|
2801
2801
|
return B64_DIGITS[value];
|
|
2802
2802
|
}
|
|
2803
2803
|
|
|
2804
|
-
// bazel-out/
|
|
2804
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2805
2805
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2806
2806
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2807
2807
|
var _INDENT_WITH = " ";
|
|
@@ -3286,7 +3286,7 @@ function _createIndent(count) {
|
|
|
3286
3286
|
return res;
|
|
3287
3287
|
}
|
|
3288
3288
|
|
|
3289
|
-
// bazel-out/
|
|
3289
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3290
3290
|
function typeWithParameters(type, numParams) {
|
|
3291
3291
|
if (numParams === 0) {
|
|
3292
3292
|
return expressionType(type);
|
|
@@ -3351,7 +3351,7 @@ function generateForwardRef(expr) {
|
|
|
3351
3351
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3352
3352
|
}
|
|
3353
3353
|
|
|
3354
|
-
// bazel-out/
|
|
3354
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3355
3355
|
var R3FactoryDelegateType;
|
|
3356
3356
|
(function(R3FactoryDelegateType2) {
|
|
3357
3357
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3496,7 +3496,7 @@ function getInjectFn(target) {
|
|
|
3496
3496
|
}
|
|
3497
3497
|
}
|
|
3498
3498
|
|
|
3499
|
-
// bazel-out/
|
|
3499
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3500
3500
|
var Comment = class {
|
|
3501
3501
|
constructor(value, sourceSpan) {
|
|
3502
3502
|
this.value = value;
|
|
@@ -3601,16 +3601,19 @@ var Element = class {
|
|
|
3601
3601
|
}
|
|
3602
3602
|
};
|
|
3603
3603
|
var DeferredTrigger = class {
|
|
3604
|
-
constructor(sourceSpan) {
|
|
3604
|
+
constructor(nameSpan, sourceSpan, prefetchSpan, whenOrOnSourceSpan) {
|
|
3605
|
+
this.nameSpan = nameSpan;
|
|
3605
3606
|
this.sourceSpan = sourceSpan;
|
|
3607
|
+
this.prefetchSpan = prefetchSpan;
|
|
3608
|
+
this.whenOrOnSourceSpan = whenOrOnSourceSpan;
|
|
3606
3609
|
}
|
|
3607
3610
|
visit(visitor) {
|
|
3608
3611
|
return visitor.visitDeferredTrigger(this);
|
|
3609
3612
|
}
|
|
3610
3613
|
};
|
|
3611
3614
|
var BoundDeferredTrigger = class extends DeferredTrigger {
|
|
3612
|
-
constructor(value, sourceSpan) {
|
|
3613
|
-
super(sourceSpan);
|
|
3615
|
+
constructor(value, sourceSpan, prefetchSpan, whenSourceSpan) {
|
|
3616
|
+
super(null, sourceSpan, prefetchSpan, whenSourceSpan);
|
|
3614
3617
|
this.value = value;
|
|
3615
3618
|
}
|
|
3616
3619
|
};
|
|
@@ -3619,75 +3622,75 @@ var IdleDeferredTrigger = class extends DeferredTrigger {
|
|
|
3619
3622
|
var ImmediateDeferredTrigger = class extends DeferredTrigger {
|
|
3620
3623
|
};
|
|
3621
3624
|
var HoverDeferredTrigger = class extends DeferredTrigger {
|
|
3622
|
-
constructor(reference2, sourceSpan) {
|
|
3623
|
-
super(sourceSpan);
|
|
3625
|
+
constructor(reference2, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
|
|
3626
|
+
super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
3624
3627
|
this.reference = reference2;
|
|
3625
3628
|
}
|
|
3626
3629
|
};
|
|
3627
3630
|
var TimerDeferredTrigger = class extends DeferredTrigger {
|
|
3628
|
-
constructor(delay, sourceSpan) {
|
|
3629
|
-
super(sourceSpan);
|
|
3631
|
+
constructor(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
|
|
3632
|
+
super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
3630
3633
|
this.delay = delay;
|
|
3631
3634
|
}
|
|
3632
3635
|
};
|
|
3633
3636
|
var InteractionDeferredTrigger = class extends DeferredTrigger {
|
|
3634
|
-
constructor(reference2, sourceSpan) {
|
|
3635
|
-
super(sourceSpan);
|
|
3637
|
+
constructor(reference2, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
|
|
3638
|
+
super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
3636
3639
|
this.reference = reference2;
|
|
3637
3640
|
}
|
|
3638
3641
|
};
|
|
3639
3642
|
var ViewportDeferredTrigger = class extends DeferredTrigger {
|
|
3640
|
-
constructor(reference2, sourceSpan) {
|
|
3641
|
-
super(sourceSpan);
|
|
3643
|
+
constructor(reference2, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
|
|
3644
|
+
super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
3642
3645
|
this.reference = reference2;
|
|
3643
3646
|
}
|
|
3644
3647
|
};
|
|
3645
|
-
var
|
|
3646
|
-
constructor(
|
|
3647
|
-
this.
|
|
3648
|
-
this.minimumTime = minimumTime;
|
|
3648
|
+
var BlockNode = class {
|
|
3649
|
+
constructor(nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3650
|
+
this.nameSpan = nameSpan;
|
|
3649
3651
|
this.sourceSpan = sourceSpan;
|
|
3650
3652
|
this.startSourceSpan = startSourceSpan;
|
|
3651
3653
|
this.endSourceSpan = endSourceSpan;
|
|
3652
3654
|
}
|
|
3655
|
+
};
|
|
3656
|
+
var DeferredBlockPlaceholder = class extends BlockNode {
|
|
3657
|
+
constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3658
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3659
|
+
this.children = children;
|
|
3660
|
+
this.minimumTime = minimumTime;
|
|
3661
|
+
}
|
|
3653
3662
|
visit(visitor) {
|
|
3654
3663
|
return visitor.visitDeferredBlockPlaceholder(this);
|
|
3655
3664
|
}
|
|
3656
3665
|
};
|
|
3657
|
-
var DeferredBlockLoading = class {
|
|
3658
|
-
constructor(children, afterTime, minimumTime, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3666
|
+
var DeferredBlockLoading = class extends BlockNode {
|
|
3667
|
+
constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3668
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3659
3669
|
this.children = children;
|
|
3660
3670
|
this.afterTime = afterTime;
|
|
3661
3671
|
this.minimumTime = minimumTime;
|
|
3662
|
-
this.sourceSpan = sourceSpan;
|
|
3663
|
-
this.startSourceSpan = startSourceSpan;
|
|
3664
|
-
this.endSourceSpan = endSourceSpan;
|
|
3665
3672
|
}
|
|
3666
3673
|
visit(visitor) {
|
|
3667
3674
|
return visitor.visitDeferredBlockLoading(this);
|
|
3668
3675
|
}
|
|
3669
3676
|
};
|
|
3670
|
-
var DeferredBlockError = class {
|
|
3671
|
-
constructor(children, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3677
|
+
var DeferredBlockError = class extends BlockNode {
|
|
3678
|
+
constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3679
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3672
3680
|
this.children = children;
|
|
3673
|
-
this.sourceSpan = sourceSpan;
|
|
3674
|
-
this.startSourceSpan = startSourceSpan;
|
|
3675
|
-
this.endSourceSpan = endSourceSpan;
|
|
3676
3681
|
}
|
|
3677
3682
|
visit(visitor) {
|
|
3678
3683
|
return visitor.visitDeferredBlockError(this);
|
|
3679
3684
|
}
|
|
3680
3685
|
};
|
|
3681
|
-
var DeferredBlock = class {
|
|
3682
|
-
constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan) {
|
|
3686
|
+
var DeferredBlock = class extends BlockNode {
|
|
3687
|
+
constructor(children, triggers, prefetchTriggers, placeholder, loading, error2, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan) {
|
|
3688
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3683
3689
|
this.children = children;
|
|
3684
3690
|
this.placeholder = placeholder;
|
|
3685
3691
|
this.loading = loading;
|
|
3686
3692
|
this.error = error2;
|
|
3687
|
-
this.sourceSpan = sourceSpan;
|
|
3688
3693
|
this.mainBlockSpan = mainBlockSpan;
|
|
3689
|
-
this.startSourceSpan = startSourceSpan;
|
|
3690
|
-
this.endSourceSpan = endSourceSpan;
|
|
3691
3694
|
this.triggers = triggers;
|
|
3692
3695
|
this.prefetchTriggers = prefetchTriggers;
|
|
3693
3696
|
this.definedTriggers = Object.keys(triggers);
|
|
@@ -3707,78 +3710,67 @@ var DeferredBlock = class {
|
|
|
3707
3710
|
visitAll(visitor, keys.map((k) => triggers[k]));
|
|
3708
3711
|
}
|
|
3709
3712
|
};
|
|
3710
|
-
var SwitchBlock = class {
|
|
3711
|
-
constructor(expression, cases, unknownBlocks, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3713
|
+
var SwitchBlock = class extends BlockNode {
|
|
3714
|
+
constructor(expression, cases, unknownBlocks, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3715
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3712
3716
|
this.expression = expression;
|
|
3713
3717
|
this.cases = cases;
|
|
3714
3718
|
this.unknownBlocks = unknownBlocks;
|
|
3715
|
-
this.sourceSpan = sourceSpan;
|
|
3716
|
-
this.startSourceSpan = startSourceSpan;
|
|
3717
|
-
this.endSourceSpan = endSourceSpan;
|
|
3718
3719
|
}
|
|
3719
3720
|
visit(visitor) {
|
|
3720
3721
|
return visitor.visitSwitchBlock(this);
|
|
3721
3722
|
}
|
|
3722
3723
|
};
|
|
3723
|
-
var SwitchBlockCase = class {
|
|
3724
|
-
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3724
|
+
var SwitchBlockCase = class extends BlockNode {
|
|
3725
|
+
constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3726
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3725
3727
|
this.expression = expression;
|
|
3726
3728
|
this.children = children;
|
|
3727
|
-
this.sourceSpan = sourceSpan;
|
|
3728
|
-
this.startSourceSpan = startSourceSpan;
|
|
3729
|
-
this.endSourceSpan = endSourceSpan;
|
|
3730
3729
|
}
|
|
3731
3730
|
visit(visitor) {
|
|
3732
3731
|
return visitor.visitSwitchBlockCase(this);
|
|
3733
3732
|
}
|
|
3734
3733
|
};
|
|
3735
|
-
var ForLoopBlock = class {
|
|
3736
|
-
constructor(item, expression, trackBy, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan) {
|
|
3734
|
+
var ForLoopBlock = class extends BlockNode {
|
|
3735
|
+
constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3736
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3737
3737
|
this.item = item;
|
|
3738
3738
|
this.expression = expression;
|
|
3739
3739
|
this.trackBy = trackBy;
|
|
3740
|
+
this.trackKeywordSpan = trackKeywordSpan;
|
|
3740
3741
|
this.contextVariables = contextVariables;
|
|
3741
3742
|
this.children = children;
|
|
3742
3743
|
this.empty = empty;
|
|
3743
|
-
this.sourceSpan = sourceSpan;
|
|
3744
3744
|
this.mainBlockSpan = mainBlockSpan;
|
|
3745
|
-
this.startSourceSpan = startSourceSpan;
|
|
3746
|
-
this.endSourceSpan = endSourceSpan;
|
|
3747
3745
|
}
|
|
3748
3746
|
visit(visitor) {
|
|
3749
3747
|
return visitor.visitForLoopBlock(this);
|
|
3750
3748
|
}
|
|
3751
3749
|
};
|
|
3752
|
-
var ForLoopBlockEmpty = class {
|
|
3753
|
-
constructor(children, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3750
|
+
var ForLoopBlockEmpty = class extends BlockNode {
|
|
3751
|
+
constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3752
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3754
3753
|
this.children = children;
|
|
3755
|
-
this.sourceSpan = sourceSpan;
|
|
3756
|
-
this.startSourceSpan = startSourceSpan;
|
|
3757
|
-
this.endSourceSpan = endSourceSpan;
|
|
3758
3754
|
}
|
|
3759
3755
|
visit(visitor) {
|
|
3760
3756
|
return visitor.visitForLoopBlockEmpty(this);
|
|
3761
3757
|
}
|
|
3762
3758
|
};
|
|
3763
|
-
var IfBlock = class {
|
|
3764
|
-
constructor(branches, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3759
|
+
var IfBlock = class extends BlockNode {
|
|
3760
|
+
constructor(branches, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3761
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3765
3762
|
this.branches = branches;
|
|
3766
|
-
this.sourceSpan = sourceSpan;
|
|
3767
|
-
this.startSourceSpan = startSourceSpan;
|
|
3768
|
-
this.endSourceSpan = endSourceSpan;
|
|
3769
3763
|
}
|
|
3770
3764
|
visit(visitor) {
|
|
3771
3765
|
return visitor.visitIfBlock(this);
|
|
3772
3766
|
}
|
|
3773
3767
|
};
|
|
3774
|
-
var IfBlockBranch = class {
|
|
3775
|
-
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan) {
|
|
3768
|
+
var IfBlockBranch = class extends BlockNode {
|
|
3769
|
+
constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) {
|
|
3770
|
+
super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan);
|
|
3776
3771
|
this.expression = expression;
|
|
3777
3772
|
this.children = children;
|
|
3778
3773
|
this.expressionAlias = expressionAlias;
|
|
3779
|
-
this.sourceSpan = sourceSpan;
|
|
3780
|
-
this.startSourceSpan = startSourceSpan;
|
|
3781
|
-
this.endSourceSpan = endSourceSpan;
|
|
3782
3774
|
}
|
|
3783
3775
|
visit(visitor) {
|
|
3784
3776
|
return visitor.visitIfBlockBranch(this);
|
|
@@ -3877,7 +3869,7 @@ function visitAll(visitor, nodes) {
|
|
|
3877
3869
|
return result;
|
|
3878
3870
|
}
|
|
3879
3871
|
|
|
3880
|
-
// bazel-out/
|
|
3872
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3881
3873
|
var Message = class {
|
|
3882
3874
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3883
3875
|
this.nodes = nodes;
|
|
@@ -3996,7 +3988,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
3996
3988
|
}
|
|
3997
3989
|
};
|
|
3998
3990
|
|
|
3999
|
-
// bazel-out/
|
|
3991
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4000
3992
|
var _Visitor = class {
|
|
4001
3993
|
visitTag(tag) {
|
|
4002
3994
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4024,12 +4016,12 @@ ${doctype.dtd}
|
|
|
4024
4016
|
};
|
|
4025
4017
|
var _visitor = new _Visitor();
|
|
4026
4018
|
|
|
4027
|
-
// bazel-out/
|
|
4019
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4028
4020
|
function toPublicName(internalName) {
|
|
4029
4021
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4030
4022
|
}
|
|
4031
4023
|
|
|
4032
|
-
// bazel-out/
|
|
4024
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4033
4025
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4034
4026
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4035
4027
|
var I18N_ATTR = "i18n";
|
|
@@ -4131,7 +4123,7 @@ function declareI18nVariable(variable2) {
|
|
|
4131
4123
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4132
4124
|
}
|
|
4133
4125
|
|
|
4134
|
-
// bazel-out/
|
|
4126
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4135
4127
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4136
4128
|
var TEMPORARY_NAME = "_t";
|
|
4137
4129
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4354,7 +4346,7 @@ function getInstructionStatements(instructions) {
|
|
|
4354
4346
|
return statements;
|
|
4355
4347
|
}
|
|
4356
4348
|
|
|
4357
|
-
// bazel-out/
|
|
4349
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4358
4350
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4359
4351
|
let result = null;
|
|
4360
4352
|
const factoryMeta = {
|
|
@@ -4439,7 +4431,7 @@ function createFactoryFunction(type) {
|
|
|
4439
4431
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4440
4432
|
}
|
|
4441
4433
|
|
|
4442
|
-
// bazel-out/
|
|
4434
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4443
4435
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4444
4436
|
/^\s*$/,
|
|
4445
4437
|
/[<>]/,
|
|
@@ -4461,7 +4453,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4461
4453
|
}
|
|
4462
4454
|
}
|
|
4463
4455
|
|
|
4464
|
-
// bazel-out/
|
|
4456
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/interpolation_config.mjs
|
|
4465
4457
|
var InterpolationConfig = class {
|
|
4466
4458
|
static fromArray(markers) {
|
|
4467
4459
|
if (!markers) {
|
|
@@ -4477,7 +4469,7 @@ var InterpolationConfig = class {
|
|
|
4477
4469
|
};
|
|
4478
4470
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4479
4471
|
|
|
4480
|
-
// bazel-out/
|
|
4472
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4481
4473
|
var $EOF = 0;
|
|
4482
4474
|
var $BSPACE = 8;
|
|
4483
4475
|
var $TAB = 9;
|
|
@@ -4559,7 +4551,7 @@ function isQuote(code) {
|
|
|
4559
4551
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4560
4552
|
}
|
|
4561
4553
|
|
|
4562
|
-
// bazel-out/
|
|
4554
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4563
4555
|
var ParseLocation = class {
|
|
4564
4556
|
constructor(file, offset, line, col) {
|
|
4565
4557
|
this.file = file;
|
|
@@ -4706,7 +4698,7 @@ function sanitizeIdentifier(name) {
|
|
|
4706
4698
|
return name.replace(/\W/g, "_");
|
|
4707
4699
|
}
|
|
4708
4700
|
|
|
4709
|
-
// bazel-out/
|
|
4701
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4710
4702
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4711
4703
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4712
4704
|
constructor() {
|
|
@@ -4799,7 +4791,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4799
4791
|
}
|
|
4800
4792
|
};
|
|
4801
4793
|
|
|
4802
|
-
// bazel-out/
|
|
4794
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4803
4795
|
var policy;
|
|
4804
4796
|
function getPolicy() {
|
|
4805
4797
|
if (policy === void 0) {
|
|
@@ -4837,7 +4829,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4837
4829
|
return fn2.bind(_global);
|
|
4838
4830
|
}
|
|
4839
4831
|
|
|
4840
|
-
// bazel-out/
|
|
4832
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4841
4833
|
var JitEvaluator = class {
|
|
4842
4834
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4843
4835
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4928,7 +4920,7 @@ function isUseStrictStatement(statement) {
|
|
|
4928
4920
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4929
4921
|
}
|
|
4930
4922
|
|
|
4931
|
-
// bazel-out/
|
|
4923
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4932
4924
|
function compileInjector(meta) {
|
|
4933
4925
|
const definitionMap = new DefinitionMap();
|
|
4934
4926
|
if (meta.providers !== null) {
|
|
@@ -4945,7 +4937,7 @@ function createInjectorType(meta) {
|
|
|
4945
4937
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4946
4938
|
}
|
|
4947
4939
|
|
|
4948
|
-
// bazel-out/
|
|
4940
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4949
4941
|
var R3JitReflector = class {
|
|
4950
4942
|
constructor(context) {
|
|
4951
4943
|
this.context = context;
|
|
@@ -4961,7 +4953,7 @@ var R3JitReflector = class {
|
|
|
4961
4953
|
}
|
|
4962
4954
|
};
|
|
4963
4955
|
|
|
4964
|
-
// bazel-out/
|
|
4956
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
4965
4957
|
var R3SelectorScopeMode;
|
|
4966
4958
|
(function(R3SelectorScopeMode2) {
|
|
4967
4959
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5102,7 +5094,7 @@ function tupleOfTypes(types) {
|
|
|
5102
5094
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5103
5095
|
}
|
|
5104
5096
|
|
|
5105
|
-
// bazel-out/
|
|
5097
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5106
5098
|
function compilePipeFromMetadata(metadata) {
|
|
5107
5099
|
const definitionMapValues = [];
|
|
5108
5100
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5123,7 +5115,7 @@ function createPipeType(metadata) {
|
|
|
5123
5115
|
]));
|
|
5124
5116
|
}
|
|
5125
5117
|
|
|
5126
|
-
// bazel-out/
|
|
5118
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5127
5119
|
var R3TemplateDependencyKind;
|
|
5128
5120
|
(function(R3TemplateDependencyKind2) {
|
|
5129
5121
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5131,7 +5123,7 @@ var R3TemplateDependencyKind;
|
|
|
5131
5123
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5132
5124
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5133
5125
|
|
|
5134
|
-
// bazel-out/
|
|
5126
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5135
5127
|
var ParserError = class {
|
|
5136
5128
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5137
5129
|
this.input = input;
|
|
@@ -5797,7 +5789,7 @@ var BoundElementProperty = class {
|
|
|
5797
5789
|
}
|
|
5798
5790
|
};
|
|
5799
5791
|
|
|
5800
|
-
// bazel-out/
|
|
5792
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5801
5793
|
var _EventHandlerVars = class {
|
|
5802
5794
|
};
|
|
5803
5795
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6438,7 +6430,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6438
6430
|
}
|
|
6439
6431
|
};
|
|
6440
6432
|
|
|
6441
|
-
// bazel-out/
|
|
6433
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6442
6434
|
var _SECURITY_SCHEMA;
|
|
6443
6435
|
function SECURITY_SCHEMA() {
|
|
6444
6436
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6496,7 +6488,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6496
6488
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6497
6489
|
}
|
|
6498
6490
|
|
|
6499
|
-
// bazel-out/
|
|
6491
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6500
6492
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6501
6493
|
"inherit",
|
|
6502
6494
|
"initial",
|
|
@@ -6967,7 +6959,7 @@ function repeatGroups(groups, multiples) {
|
|
|
6967
6959
|
}
|
|
6968
6960
|
}
|
|
6969
6961
|
|
|
6970
|
-
// bazel-out/
|
|
6962
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
6971
6963
|
var OpKind;
|
|
6972
6964
|
(function(OpKind2) {
|
|
6973
6965
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -6997,22 +6989,21 @@ var OpKind;
|
|
|
6997
6989
|
OpKind2[OpKind2["Attribute"] = 24] = "Attribute";
|
|
6998
6990
|
OpKind2[OpKind2["ExtractedAttribute"] = 25] = "ExtractedAttribute";
|
|
6999
6991
|
OpKind2[OpKind2["Defer"] = 26] = "Defer";
|
|
7000
|
-
OpKind2[OpKind2["
|
|
7001
|
-
OpKind2[OpKind2["
|
|
7002
|
-
OpKind2[OpKind2["
|
|
7003
|
-
OpKind2[OpKind2["
|
|
7004
|
-
OpKind2[OpKind2["
|
|
7005
|
-
OpKind2[OpKind2["
|
|
7006
|
-
OpKind2[OpKind2["
|
|
7007
|
-
OpKind2[OpKind2["
|
|
7008
|
-
OpKind2[OpKind2["
|
|
7009
|
-
OpKind2[OpKind2["
|
|
7010
|
-
OpKind2[OpKind2["
|
|
7011
|
-
OpKind2[OpKind2["
|
|
7012
|
-
OpKind2[OpKind2["
|
|
7013
|
-
OpKind2[OpKind2["
|
|
7014
|
-
OpKind2[OpKind2["
|
|
7015
|
-
OpKind2[OpKind2["IcuUpdate"] = 42] = "IcuUpdate";
|
|
6992
|
+
OpKind2[OpKind2["DeferOn"] = 27] = "DeferOn";
|
|
6993
|
+
OpKind2[OpKind2["ExtractedMessage"] = 28] = "ExtractedMessage";
|
|
6994
|
+
OpKind2[OpKind2["HostProperty"] = 29] = "HostProperty";
|
|
6995
|
+
OpKind2[OpKind2["Namespace"] = 30] = "Namespace";
|
|
6996
|
+
OpKind2[OpKind2["ProjectionDef"] = 31] = "ProjectionDef";
|
|
6997
|
+
OpKind2[OpKind2["Projection"] = 32] = "Projection";
|
|
6998
|
+
OpKind2[OpKind2["RepeaterCreate"] = 33] = "RepeaterCreate";
|
|
6999
|
+
OpKind2[OpKind2["Repeater"] = 34] = "Repeater";
|
|
7000
|
+
OpKind2[OpKind2["I18nStart"] = 35] = "I18nStart";
|
|
7001
|
+
OpKind2[OpKind2["I18n"] = 36] = "I18n";
|
|
7002
|
+
OpKind2[OpKind2["I18nEnd"] = 37] = "I18nEnd";
|
|
7003
|
+
OpKind2[OpKind2["I18nExpression"] = 38] = "I18nExpression";
|
|
7004
|
+
OpKind2[OpKind2["I18nApply"] = 39] = "I18nApply";
|
|
7005
|
+
OpKind2[OpKind2["Icu"] = 40] = "Icu";
|
|
7006
|
+
OpKind2[OpKind2["IcuUpdate"] = 41] = "IcuUpdate";
|
|
7016
7007
|
})(OpKind || (OpKind = {}));
|
|
7017
7008
|
var ExpressionKind;
|
|
7018
7009
|
(function(ExpressionKind2) {
|
|
@@ -7040,6 +7031,7 @@ var ExpressionKind;
|
|
|
7040
7031
|
ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 21] = "SlotLiteralExpr";
|
|
7041
7032
|
ExpressionKind2[ExpressionKind2["ConditionalCase"] = 22] = "ConditionalCase";
|
|
7042
7033
|
ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 23] = "DerivedRepeaterVar";
|
|
7034
|
+
ExpressionKind2[ExpressionKind2["ConstCollected"] = 24] = "ConstCollected";
|
|
7043
7035
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
7044
7036
|
var VariableFlags;
|
|
7045
7037
|
(function(VariableFlags2) {
|
|
@@ -7088,23 +7080,46 @@ var I18nParamResolutionTime;
|
|
|
7088
7080
|
I18nParamResolutionTime2[I18nParamResolutionTime2["Creation"] = 0] = "Creation";
|
|
7089
7081
|
I18nParamResolutionTime2[I18nParamResolutionTime2["Postproccessing"] = 1] = "Postproccessing";
|
|
7090
7082
|
})(I18nParamResolutionTime || (I18nParamResolutionTime = {}));
|
|
7083
|
+
var I18nParamValueFlags;
|
|
7084
|
+
(function(I18nParamValueFlags2) {
|
|
7085
|
+
I18nParamValueFlags2[I18nParamValueFlags2["None"] = 0] = "None";
|
|
7086
|
+
I18nParamValueFlags2[I18nParamValueFlags2["ElementTag"] = 1] = "ElementTag";
|
|
7087
|
+
I18nParamValueFlags2[I18nParamValueFlags2["TemplateTag"] = 2] = "TemplateTag";
|
|
7088
|
+
I18nParamValueFlags2[I18nParamValueFlags2["OpenTag"] = 4] = "OpenTag";
|
|
7089
|
+
I18nParamValueFlags2[I18nParamValueFlags2["CloseTag"] = 8] = "CloseTag";
|
|
7090
|
+
})(I18nParamValueFlags || (I18nParamValueFlags = {}));
|
|
7091
|
+
var Namespace;
|
|
7092
|
+
(function(Namespace2) {
|
|
7093
|
+
Namespace2[Namespace2["HTML"] = 0] = "HTML";
|
|
7094
|
+
Namespace2[Namespace2["SVG"] = 1] = "SVG";
|
|
7095
|
+
Namespace2[Namespace2["Math"] = 2] = "Math";
|
|
7096
|
+
})(Namespace || (Namespace = {}));
|
|
7097
|
+
var DeferTriggerKind;
|
|
7098
|
+
(function(DeferTriggerKind2) {
|
|
7099
|
+
DeferTriggerKind2[DeferTriggerKind2["Idle"] = 0] = "Idle";
|
|
7100
|
+
DeferTriggerKind2[DeferTriggerKind2["Immediate"] = 1] = "Immediate";
|
|
7101
|
+
DeferTriggerKind2[DeferTriggerKind2["Timer"] = 2] = "Timer";
|
|
7102
|
+
DeferTriggerKind2[DeferTriggerKind2["Hover"] = 3] = "Hover";
|
|
7103
|
+
DeferTriggerKind2[DeferTriggerKind2["Interaction"] = 4] = "Interaction";
|
|
7104
|
+
DeferTriggerKind2[DeferTriggerKind2["Viewport"] = 5] = "Viewport";
|
|
7105
|
+
})(DeferTriggerKind || (DeferTriggerKind = {}));
|
|
7106
|
+
var DerivedRepeaterVarIdentity;
|
|
7107
|
+
(function(DerivedRepeaterVarIdentity2) {
|
|
7108
|
+
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["First"] = 0] = "First";
|
|
7109
|
+
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Last"] = 1] = "Last";
|
|
7110
|
+
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
|
|
7111
|
+
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
7112
|
+
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
7091
7113
|
|
|
7092
|
-
// bazel-out/
|
|
7114
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7093
7115
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7094
7116
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7095
|
-
var UsesSlotIndex = Symbol("UsesSlotIndex");
|
|
7096
7117
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
7097
7118
|
var UsesVarOffset = Symbol("UsesVarOffset");
|
|
7098
|
-
var HasConst = Symbol("HasConst");
|
|
7099
7119
|
var TRAIT_CONSUMES_SLOT = {
|
|
7100
7120
|
[ConsumesSlot]: true,
|
|
7101
|
-
slot: null,
|
|
7102
7121
|
numSlotsUsed: 1
|
|
7103
7122
|
};
|
|
7104
|
-
var TRAIT_USES_SLOT_INDEX = {
|
|
7105
|
-
[UsesSlotIndex]: true,
|
|
7106
|
-
targetSlot: null
|
|
7107
|
-
};
|
|
7108
7123
|
var TRAIT_DEPENDS_ON_SLOT_CONTEXT = {
|
|
7109
7124
|
[DependsOnSlotContext]: true
|
|
7110
7125
|
};
|
|
@@ -7115,10 +7130,6 @@ var TRAIT_USES_VAR_OFFSET = {
|
|
|
7115
7130
|
[UsesVarOffset]: true,
|
|
7116
7131
|
varOffset: null
|
|
7117
7132
|
};
|
|
7118
|
-
var TRAIT_HAS_CONST = {
|
|
7119
|
-
[HasConst]: true,
|
|
7120
|
-
constIndex: null
|
|
7121
|
-
};
|
|
7122
7133
|
function hasConsumesSlotTrait(op) {
|
|
7123
7134
|
return op[ConsumesSlot] === true;
|
|
7124
7135
|
}
|
|
@@ -7131,14 +7142,8 @@ function hasConsumesVarsTrait(value) {
|
|
|
7131
7142
|
function hasUsesVarOffsetTrait(expr) {
|
|
7132
7143
|
return expr[UsesVarOffset] === true;
|
|
7133
7144
|
}
|
|
7134
|
-
function hasUsesSlotIndexTrait(value) {
|
|
7135
|
-
return value[UsesSlotIndex] === true;
|
|
7136
|
-
}
|
|
7137
|
-
function hasConstTrait(value) {
|
|
7138
|
-
return value[HasConst] === true;
|
|
7139
|
-
}
|
|
7140
7145
|
|
|
7141
|
-
// bazel-out/
|
|
7146
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7142
7147
|
function createStatementOp(statement) {
|
|
7143
7148
|
return __spreadValues({
|
|
7144
7149
|
kind: OpKind.Statement,
|
|
@@ -7160,7 +7165,7 @@ var NEW_OP = {
|
|
|
7160
7165
|
next: null
|
|
7161
7166
|
};
|
|
7162
7167
|
|
|
7163
|
-
// bazel-out/
|
|
7168
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7164
7169
|
function createInterpolateTextOp(xref, interpolation, i18nPlaceholders, sourceSpan) {
|
|
7165
7170
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7166
7171
|
kind: OpKind.InterpolateText,
|
|
@@ -7258,29 +7263,32 @@ function createAdvanceOp(delta, sourceSpan) {
|
|
|
7258
7263
|
sourceSpan
|
|
7259
7264
|
}, NEW_OP);
|
|
7260
7265
|
}
|
|
7261
|
-
function createConditionalOp(target, test, conditions, sourceSpan) {
|
|
7262
|
-
return __spreadValues(__spreadValues(__spreadValues(
|
|
7266
|
+
function createConditionalOp(target, targetSlot, test, conditions, sourceSpan) {
|
|
7267
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
7263
7268
|
kind: OpKind.Conditional,
|
|
7264
7269
|
target,
|
|
7270
|
+
targetSlot,
|
|
7265
7271
|
test,
|
|
7266
7272
|
conditions,
|
|
7267
7273
|
processed: null,
|
|
7268
7274
|
sourceSpan,
|
|
7269
7275
|
contextValue: null
|
|
7270
|
-
}, NEW_OP),
|
|
7276
|
+
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS);
|
|
7271
7277
|
}
|
|
7272
|
-
function createRepeaterOp(repeaterCreate2, collection, sourceSpan) {
|
|
7273
|
-
return __spreadValues(
|
|
7278
|
+
function createRepeaterOp(repeaterCreate2, targetSlot, collection, sourceSpan) {
|
|
7279
|
+
return __spreadValues({
|
|
7274
7280
|
kind: OpKind.Repeater,
|
|
7275
7281
|
target: repeaterCreate2,
|
|
7282
|
+
targetSlot,
|
|
7276
7283
|
collection,
|
|
7277
7284
|
sourceSpan
|
|
7278
|
-
}, NEW_OP)
|
|
7285
|
+
}, NEW_OP);
|
|
7279
7286
|
}
|
|
7280
|
-
function createI18nExpressionOp(owner, expression, i18nPlaceholder, resolutionTime, sourceSpan) {
|
|
7287
|
+
function createI18nExpressionOp(owner, ownerSlot, expression, i18nPlaceholder, resolutionTime, sourceSpan) {
|
|
7281
7288
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7282
7289
|
kind: OpKind.I18nExpression,
|
|
7283
7290
|
owner,
|
|
7291
|
+
ownerSlot,
|
|
7284
7292
|
target: owner,
|
|
7285
7293
|
expression,
|
|
7286
7294
|
i18nPlaceholder,
|
|
@@ -7288,12 +7296,13 @@ function createI18nExpressionOp(owner, expression, i18nPlaceholder, resolutionTi
|
|
|
7288
7296
|
sourceSpan
|
|
7289
7297
|
}, NEW_OP), TRAIT_CONSUMES_VARS), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7290
7298
|
}
|
|
7291
|
-
function createI18nApplyOp(target, sourceSpan) {
|
|
7292
|
-
return __spreadValues(
|
|
7299
|
+
function createI18nApplyOp(target, targetSlot, sourceSpan) {
|
|
7300
|
+
return __spreadValues({
|
|
7293
7301
|
kind: OpKind.I18nApply,
|
|
7294
7302
|
target,
|
|
7303
|
+
targetSlot,
|
|
7295
7304
|
sourceSpan
|
|
7296
|
-
}, NEW_OP)
|
|
7305
|
+
}, NEW_OP);
|
|
7297
7306
|
}
|
|
7298
7307
|
function createIcuUpdateOp(xref, sourceSpan) {
|
|
7299
7308
|
return __spreadValues({
|
|
@@ -7303,17 +7312,13 @@ function createIcuUpdateOp(xref, sourceSpan) {
|
|
|
7303
7312
|
}, NEW_OP);
|
|
7304
7313
|
}
|
|
7305
7314
|
|
|
7306
|
-
// bazel-out/
|
|
7315
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7307
7316
|
var _a;
|
|
7308
7317
|
var _b;
|
|
7309
7318
|
var _c;
|
|
7310
7319
|
var _d;
|
|
7311
7320
|
var _e;
|
|
7312
7321
|
var _f;
|
|
7313
|
-
var _g;
|
|
7314
|
-
var _h;
|
|
7315
|
-
var _j;
|
|
7316
|
-
var _k;
|
|
7317
7322
|
function isIrExpression(expr) {
|
|
7318
7323
|
return expr instanceof ExpressionBase;
|
|
7319
7324
|
}
|
|
@@ -7342,19 +7347,18 @@ var LexicalReadExpr = class extends ExpressionBase {
|
|
|
7342
7347
|
return new LexicalReadExpr(this.name);
|
|
7343
7348
|
}
|
|
7344
7349
|
};
|
|
7345
|
-
var
|
|
7346
|
-
constructor(target, offset) {
|
|
7350
|
+
var ReferenceExpr = class extends ExpressionBase {
|
|
7351
|
+
constructor(target, targetSlot, offset) {
|
|
7347
7352
|
super();
|
|
7348
7353
|
this.target = target;
|
|
7354
|
+
this.targetSlot = targetSlot;
|
|
7349
7355
|
this.offset = offset;
|
|
7350
7356
|
this.kind = ExpressionKind.Reference;
|
|
7351
|
-
this[_a] = true;
|
|
7352
|
-
this.targetSlot = null;
|
|
7353
7357
|
}
|
|
7354
7358
|
visitExpression() {
|
|
7355
7359
|
}
|
|
7356
7360
|
isEquivalent(e) {
|
|
7357
|
-
return e instanceof
|
|
7361
|
+
return e instanceof ReferenceExpr && e.target === this.target;
|
|
7358
7362
|
}
|
|
7359
7363
|
isConstant() {
|
|
7360
7364
|
return false;
|
|
@@ -7362,15 +7366,9 @@ var _ReferenceExpr = class extends ExpressionBase {
|
|
|
7362
7366
|
transformInternalExpressions() {
|
|
7363
7367
|
}
|
|
7364
7368
|
clone() {
|
|
7365
|
-
|
|
7366
|
-
expr.targetSlot = this.targetSlot;
|
|
7367
|
-
return expr;
|
|
7369
|
+
return new ReferenceExpr(this.target, this.targetSlot, this.offset);
|
|
7368
7370
|
}
|
|
7369
7371
|
};
|
|
7370
|
-
var ReferenceExpr = _ReferenceExpr;
|
|
7371
|
-
(() => {
|
|
7372
|
-
_a = UsesSlotIndex;
|
|
7373
|
-
})();
|
|
7374
7372
|
var ContextExpr = class extends ExpressionBase {
|
|
7375
7373
|
constructor(view) {
|
|
7376
7374
|
super();
|
|
@@ -7534,8 +7532,8 @@ var _PureFunctionExpr = class extends ExpressionBase {
|
|
|
7534
7532
|
constructor(expression, args) {
|
|
7535
7533
|
super();
|
|
7536
7534
|
this.kind = ExpressionKind.PureFunctionExpr;
|
|
7535
|
+
this[_a] = true;
|
|
7537
7536
|
this[_b] = true;
|
|
7538
|
-
this[_c] = true;
|
|
7539
7537
|
this.varOffset = null;
|
|
7540
7538
|
this.fn = null;
|
|
7541
7539
|
this.body = expression;
|
|
@@ -7577,7 +7575,7 @@ var _PureFunctionExpr = class extends ExpressionBase {
|
|
|
7577
7575
|
};
|
|
7578
7576
|
var PureFunctionExpr = _PureFunctionExpr;
|
|
7579
7577
|
(() => {
|
|
7580
|
-
|
|
7578
|
+
_a = ConsumesVarsTrait, _b = UsesVarOffset;
|
|
7581
7579
|
})();
|
|
7582
7580
|
var PureFunctionParameterExpr = class extends ExpressionBase {
|
|
7583
7581
|
constructor(index) {
|
|
@@ -7600,16 +7598,15 @@ var PureFunctionParameterExpr = class extends ExpressionBase {
|
|
|
7600
7598
|
}
|
|
7601
7599
|
};
|
|
7602
7600
|
var _PipeBindingExpr = class extends ExpressionBase {
|
|
7603
|
-
constructor(target, name, args) {
|
|
7601
|
+
constructor(target, targetSlot, name, args) {
|
|
7604
7602
|
super();
|
|
7605
7603
|
this.target = target;
|
|
7604
|
+
this.targetSlot = targetSlot;
|
|
7606
7605
|
this.name = name;
|
|
7607
7606
|
this.args = args;
|
|
7608
7607
|
this.kind = ExpressionKind.PipeBinding;
|
|
7608
|
+
this[_c] = true;
|
|
7609
7609
|
this[_d] = true;
|
|
7610
|
-
this[_e] = true;
|
|
7611
|
-
this[_f] = true;
|
|
7612
|
-
this.targetSlot = null;
|
|
7613
7610
|
this.varOffset = null;
|
|
7614
7611
|
}
|
|
7615
7612
|
visitExpression(visitor, context) {
|
|
@@ -7629,28 +7626,26 @@ var _PipeBindingExpr = class extends ExpressionBase {
|
|
|
7629
7626
|
}
|
|
7630
7627
|
}
|
|
7631
7628
|
clone() {
|
|
7632
|
-
const r = new _PipeBindingExpr(this.target, this.name, this.args.map((a) => a.clone()));
|
|
7633
|
-
r.targetSlot = this.targetSlot;
|
|
7629
|
+
const r = new _PipeBindingExpr(this.target, this.targetSlot, this.name, this.args.map((a) => a.clone()));
|
|
7634
7630
|
r.varOffset = this.varOffset;
|
|
7635
7631
|
return r;
|
|
7636
7632
|
}
|
|
7637
7633
|
};
|
|
7638
7634
|
var PipeBindingExpr = _PipeBindingExpr;
|
|
7639
7635
|
(() => {
|
|
7640
|
-
|
|
7636
|
+
_c = ConsumesVarsTrait, _d = UsesVarOffset;
|
|
7641
7637
|
})();
|
|
7642
7638
|
var _PipeBindingVariadicExpr = class extends ExpressionBase {
|
|
7643
|
-
constructor(target, name, args, numArgs) {
|
|
7639
|
+
constructor(target, targetSlot, name, args, numArgs) {
|
|
7644
7640
|
super();
|
|
7645
7641
|
this.target = target;
|
|
7642
|
+
this.targetSlot = targetSlot;
|
|
7646
7643
|
this.name = name;
|
|
7647
7644
|
this.args = args;
|
|
7648
7645
|
this.numArgs = numArgs;
|
|
7649
7646
|
this.kind = ExpressionKind.PipeBindingVariadic;
|
|
7650
|
-
this[
|
|
7651
|
-
this[
|
|
7652
|
-
this[_j] = true;
|
|
7653
|
-
this.targetSlot = null;
|
|
7647
|
+
this[_e] = true;
|
|
7648
|
+
this[_f] = true;
|
|
7654
7649
|
this.varOffset = null;
|
|
7655
7650
|
}
|
|
7656
7651
|
visitExpression(visitor, context) {
|
|
@@ -7666,15 +7661,14 @@ var _PipeBindingVariadicExpr = class extends ExpressionBase {
|
|
|
7666
7661
|
this.args = transformExpressionsInExpression(this.args, transform2, flags);
|
|
7667
7662
|
}
|
|
7668
7663
|
clone() {
|
|
7669
|
-
const r = new _PipeBindingVariadicExpr(this.target, this.name, this.args.clone(), this.numArgs);
|
|
7670
|
-
r.targetSlot = this.targetSlot;
|
|
7664
|
+
const r = new _PipeBindingVariadicExpr(this.target, this.targetSlot, this.name, this.args.clone(), this.numArgs);
|
|
7671
7665
|
r.varOffset = this.varOffset;
|
|
7672
7666
|
return r;
|
|
7673
7667
|
}
|
|
7674
7668
|
};
|
|
7675
7669
|
var PipeBindingVariadicExpr = _PipeBindingVariadicExpr;
|
|
7676
7670
|
(() => {
|
|
7677
|
-
|
|
7671
|
+
_e = ConsumesVarsTrait, _f = UsesVarOffset;
|
|
7678
7672
|
})();
|
|
7679
7673
|
var SafePropertyReadExpr = class extends ExpressionBase {
|
|
7680
7674
|
constructor(receiver, name) {
|
|
@@ -7869,39 +7863,32 @@ var SanitizerExpr = class extends ExpressionBase {
|
|
|
7869
7863
|
transformInternalExpressions() {
|
|
7870
7864
|
}
|
|
7871
7865
|
};
|
|
7872
|
-
var
|
|
7873
|
-
constructor(
|
|
7866
|
+
var SlotLiteralExpr = class extends ExpressionBase {
|
|
7867
|
+
constructor(slot) {
|
|
7874
7868
|
super();
|
|
7875
|
-
this.
|
|
7869
|
+
this.slot = slot;
|
|
7876
7870
|
this.kind = ExpressionKind.SlotLiteralExpr;
|
|
7877
|
-
this[_k] = true;
|
|
7878
|
-
this.targetSlot = null;
|
|
7879
7871
|
}
|
|
7880
7872
|
visitExpression(visitor, context) {
|
|
7881
7873
|
}
|
|
7882
7874
|
isEquivalent(e) {
|
|
7883
|
-
return e instanceof
|
|
7875
|
+
return e instanceof SlotLiteralExpr && e.slot === this.slot;
|
|
7884
7876
|
}
|
|
7885
7877
|
isConstant() {
|
|
7886
7878
|
return true;
|
|
7887
7879
|
}
|
|
7888
7880
|
clone() {
|
|
7889
|
-
|
|
7890
|
-
copy.targetSlot = this.targetSlot;
|
|
7891
|
-
return copy;
|
|
7881
|
+
return new SlotLiteralExpr(this.slot);
|
|
7892
7882
|
}
|
|
7893
7883
|
transformInternalExpressions() {
|
|
7894
7884
|
}
|
|
7895
7885
|
};
|
|
7896
|
-
var SlotLiteralExpr = _SlotLiteralExpr;
|
|
7897
|
-
(() => {
|
|
7898
|
-
_k = UsesSlotIndex;
|
|
7899
|
-
})();
|
|
7900
7886
|
var ConditionalCaseExpr = class extends ExpressionBase {
|
|
7901
|
-
constructor(expr, target, alias = null) {
|
|
7887
|
+
constructor(expr, target, targetSlot, alias = null) {
|
|
7902
7888
|
super();
|
|
7903
7889
|
this.expr = expr;
|
|
7904
7890
|
this.target = target;
|
|
7891
|
+
this.targetSlot = targetSlot;
|
|
7905
7892
|
this.alias = alias;
|
|
7906
7893
|
this.kind = ExpressionKind.ConditionalCase;
|
|
7907
7894
|
}
|
|
@@ -7917,7 +7904,7 @@ var ConditionalCaseExpr = class extends ExpressionBase {
|
|
|
7917
7904
|
return true;
|
|
7918
7905
|
}
|
|
7919
7906
|
clone() {
|
|
7920
|
-
return new ConditionalCaseExpr(this.expr, this.target);
|
|
7907
|
+
return new ConditionalCaseExpr(this.expr, this.target, this.targetSlot);
|
|
7921
7908
|
}
|
|
7922
7909
|
transformInternalExpressions(transform2, flags) {
|
|
7923
7910
|
if (this.expr !== null) {
|
|
@@ -7925,13 +7912,6 @@ var ConditionalCaseExpr = class extends ExpressionBase {
|
|
|
7925
7912
|
}
|
|
7926
7913
|
}
|
|
7927
7914
|
};
|
|
7928
|
-
var DerivedRepeaterVarIdentity;
|
|
7929
|
-
(function(DerivedRepeaterVarIdentity2) {
|
|
7930
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["First"] = 0] = "First";
|
|
7931
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Last"] = 1] = "Last";
|
|
7932
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Even"] = 2] = "Even";
|
|
7933
|
-
DerivedRepeaterVarIdentity2[DerivedRepeaterVarIdentity2["Odd"] = 3] = "Odd";
|
|
7934
|
-
})(DerivedRepeaterVarIdentity || (DerivedRepeaterVarIdentity = {}));
|
|
7935
7915
|
var DerivedRepeaterVarExpr = class extends ExpressionBase {
|
|
7936
7916
|
constructor(xref, identity) {
|
|
7937
7917
|
super();
|
|
@@ -7953,6 +7933,31 @@ var DerivedRepeaterVarExpr = class extends ExpressionBase {
|
|
|
7953
7933
|
return new DerivedRepeaterVarExpr(this.xref, this.identity);
|
|
7954
7934
|
}
|
|
7955
7935
|
};
|
|
7936
|
+
var ConstCollectedExpr = class extends ExpressionBase {
|
|
7937
|
+
constructor(expr) {
|
|
7938
|
+
super();
|
|
7939
|
+
this.expr = expr;
|
|
7940
|
+
this.kind = ExpressionKind.ConstCollected;
|
|
7941
|
+
}
|
|
7942
|
+
transformInternalExpressions(transform2, flags) {
|
|
7943
|
+
this.expr = transform2(this.expr, flags);
|
|
7944
|
+
}
|
|
7945
|
+
visitExpression(visitor, context) {
|
|
7946
|
+
this.expr.visitExpression(visitor, context);
|
|
7947
|
+
}
|
|
7948
|
+
isEquivalent(e) {
|
|
7949
|
+
if (!(e instanceof ConstCollectedExpr)) {
|
|
7950
|
+
return false;
|
|
7951
|
+
}
|
|
7952
|
+
return this.expr.isEquivalent(e.expr);
|
|
7953
|
+
}
|
|
7954
|
+
isConstant() {
|
|
7955
|
+
return this.expr.isConstant();
|
|
7956
|
+
}
|
|
7957
|
+
clone() {
|
|
7958
|
+
return new ConstCollectedExpr(this.expr);
|
|
7959
|
+
}
|
|
7960
|
+
};
|
|
7956
7961
|
function visitExpressionsInOp(op, visitor) {
|
|
7957
7962
|
transformExpressionsInOp(op, (expr, flags) => {
|
|
7958
7963
|
visitor(expr, flags);
|
|
@@ -8026,12 +8031,6 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8026
8031
|
case OpKind.ExtractedAttribute:
|
|
8027
8032
|
op.expression = op.expression && transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8028
8033
|
break;
|
|
8029
|
-
case OpKind.ExtractedMessage:
|
|
8030
|
-
op.expression = transformExpressionsInExpression(op.expression, transform2, flags);
|
|
8031
|
-
for (const statement of op.statements) {
|
|
8032
|
-
transformExpressionsInStatement(statement, transform2, flags);
|
|
8033
|
-
}
|
|
8034
|
-
break;
|
|
8035
8034
|
case OpKind.RepeaterCreate:
|
|
8036
8035
|
op.track = transformExpressionsInExpression(op.track, transform2, flags);
|
|
8037
8036
|
if (op.trackByFn !== null) {
|
|
@@ -8041,34 +8040,37 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8041
8040
|
case OpKind.Repeater:
|
|
8042
8041
|
op.collection = transformExpressionsInExpression(op.collection, transform2, flags);
|
|
8043
8042
|
break;
|
|
8044
|
-
case OpKind.
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8043
|
+
case OpKind.Defer:
|
|
8044
|
+
if (op.loadingConfig !== null) {
|
|
8045
|
+
op.loadingConfig = transformExpressionsInExpression(op.loadingConfig, transform2, flags);
|
|
8046
|
+
}
|
|
8047
|
+
if (op.placeholderConfig !== null) {
|
|
8048
|
+
op.placeholderConfig = transformExpressionsInExpression(op.placeholderConfig, transform2, flags);
|
|
8048
8049
|
}
|
|
8049
8050
|
break;
|
|
8050
|
-
case OpKind.
|
|
8051
|
-
case OpKind.DeferSecondaryBlock:
|
|
8052
|
-
case OpKind.DeferOn:
|
|
8053
|
-
case OpKind.Projection:
|
|
8054
|
-
case OpKind.ProjectionDef:
|
|
8055
|
-
case OpKind.Element:
|
|
8056
|
-
case OpKind.ElementStart:
|
|
8057
|
-
case OpKind.ElementEnd:
|
|
8058
|
-
case OpKind.I18nEnd:
|
|
8051
|
+
case OpKind.Advance:
|
|
8059
8052
|
case OpKind.Container:
|
|
8060
|
-
case OpKind.ContainerStart:
|
|
8061
8053
|
case OpKind.ContainerEnd:
|
|
8062
|
-
case OpKind.
|
|
8054
|
+
case OpKind.ContainerStart:
|
|
8055
|
+
case OpKind.DeferOn:
|
|
8063
8056
|
case OpKind.DisableBindings:
|
|
8057
|
+
case OpKind.Element:
|
|
8058
|
+
case OpKind.ElementEnd:
|
|
8059
|
+
case OpKind.ElementStart:
|
|
8064
8060
|
case OpKind.EnableBindings:
|
|
8065
|
-
case OpKind.
|
|
8066
|
-
case OpKind.
|
|
8067
|
-
case OpKind.Advance:
|
|
8068
|
-
case OpKind.Namespace:
|
|
8061
|
+
case OpKind.ExtractedMessage:
|
|
8062
|
+
case OpKind.I18n:
|
|
8069
8063
|
case OpKind.I18nApply:
|
|
8064
|
+
case OpKind.I18nEnd:
|
|
8065
|
+
case OpKind.I18nStart:
|
|
8070
8066
|
case OpKind.Icu:
|
|
8071
8067
|
case OpKind.IcuUpdate:
|
|
8068
|
+
case OpKind.Namespace:
|
|
8069
|
+
case OpKind.Pipe:
|
|
8070
|
+
case OpKind.Projection:
|
|
8071
|
+
case OpKind.ProjectionDef:
|
|
8072
|
+
case OpKind.Template:
|
|
8073
|
+
case OpKind.Text:
|
|
8072
8074
|
break;
|
|
8073
8075
|
default:
|
|
8074
8076
|
throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);
|
|
@@ -8150,7 +8152,7 @@ function isStringLiteral(expr) {
|
|
|
8150
8152
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8151
8153
|
}
|
|
8152
8154
|
|
|
8153
|
-
// bazel-out/
|
|
8155
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8154
8156
|
var _OpList = class {
|
|
8155
8157
|
constructor() {
|
|
8156
8158
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8341,7 +8343,14 @@ var OpList = _OpList;
|
|
|
8341
8343
|
_OpList.nextListId = 0;
|
|
8342
8344
|
})();
|
|
8343
8345
|
|
|
8344
|
-
// bazel-out/
|
|
8346
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8347
|
+
var SlotHandle = class {
|
|
8348
|
+
constructor() {
|
|
8349
|
+
this.slot = null;
|
|
8350
|
+
}
|
|
8351
|
+
};
|
|
8352
|
+
|
|
8353
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8345
8354
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8346
8355
|
OpKind.Element,
|
|
8347
8356
|
OpKind.ElementStart,
|
|
@@ -8358,6 +8367,7 @@ function createElementStartOp(tag, xref, namespace, i18nPlaceholder, sourceSpan)
|
|
|
8358
8367
|
kind: OpKind.ElementStart,
|
|
8359
8368
|
xref,
|
|
8360
8369
|
tag,
|
|
8370
|
+
handle: new SlotHandle(),
|
|
8361
8371
|
attributes: null,
|
|
8362
8372
|
localRefs: [],
|
|
8363
8373
|
nonBindable: false,
|
|
@@ -8366,13 +8376,14 @@ function createElementStartOp(tag, xref, namespace, i18nPlaceholder, sourceSpan)
|
|
|
8366
8376
|
sourceSpan
|
|
8367
8377
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8368
8378
|
}
|
|
8369
|
-
function createTemplateOp(xref, tag,
|
|
8379
|
+
function createTemplateOp(xref, tag, functionNameSuffix, namespace, i18nPlaceholder, sourceSpan) {
|
|
8370
8380
|
return __spreadValues(__spreadValues({
|
|
8371
8381
|
kind: OpKind.Template,
|
|
8372
8382
|
xref,
|
|
8373
8383
|
attributes: null,
|
|
8374
8384
|
tag,
|
|
8375
|
-
|
|
8385
|
+
handle: new SlotHandle(),
|
|
8386
|
+
functionNameSuffix,
|
|
8376
8387
|
decls: null,
|
|
8377
8388
|
vars: null,
|
|
8378
8389
|
localRefs: [],
|
|
@@ -8382,15 +8393,17 @@ function createTemplateOp(xref, tag, namespace, generatedInBlock, i18nPlaceholde
|
|
|
8382
8393
|
sourceSpan
|
|
8383
8394
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8384
8395
|
}
|
|
8385
|
-
function createRepeaterCreateOp(primaryView, emptyView, track, varNames, sourceSpan) {
|
|
8396
|
+
function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, sourceSpan) {
|
|
8386
8397
|
return __spreadProps(__spreadValues(__spreadValues({
|
|
8387
8398
|
kind: OpKind.RepeaterCreate,
|
|
8388
8399
|
attributes: null,
|
|
8389
8400
|
xref: primaryView,
|
|
8401
|
+
handle: new SlotHandle(),
|
|
8390
8402
|
emptyView,
|
|
8391
8403
|
track,
|
|
8392
8404
|
trackByFn: null,
|
|
8393
|
-
tag
|
|
8405
|
+
tag,
|
|
8406
|
+
functionNameSuffix: "For",
|
|
8394
8407
|
namespace: Namespace.HTML,
|
|
8395
8408
|
nonBindable: false,
|
|
8396
8409
|
localRefs: [],
|
|
@@ -8426,14 +8439,16 @@ function createTextOp(xref, initialValue, sourceSpan) {
|
|
|
8426
8439
|
return __spreadValues(__spreadValues({
|
|
8427
8440
|
kind: OpKind.Text,
|
|
8428
8441
|
xref,
|
|
8442
|
+
handle: new SlotHandle(),
|
|
8429
8443
|
initialValue,
|
|
8430
8444
|
sourceSpan
|
|
8431
8445
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8432
8446
|
}
|
|
8433
|
-
function createListenerOp(target, name, tag, animationPhase, hostListener, sourceSpan) {
|
|
8434
|
-
return __spreadValues(
|
|
8447
|
+
function createListenerOp(target, targetSlot, name, tag, animationPhase, hostListener, sourceSpan) {
|
|
8448
|
+
return __spreadValues({
|
|
8435
8449
|
kind: OpKind.Listener,
|
|
8436
8450
|
target,
|
|
8451
|
+
targetSlot,
|
|
8437
8452
|
tag,
|
|
8438
8453
|
hostListener,
|
|
8439
8454
|
name,
|
|
@@ -8443,21 +8458,16 @@ function createListenerOp(target, name, tag, animationPhase, hostListener, sourc
|
|
|
8443
8458
|
isAnimationListener: animationPhase !== null,
|
|
8444
8459
|
animationPhase,
|
|
8445
8460
|
sourceSpan
|
|
8446
|
-
}, NEW_OP)
|
|
8461
|
+
}, NEW_OP);
|
|
8447
8462
|
}
|
|
8448
|
-
function createPipeOp(xref, name) {
|
|
8463
|
+
function createPipeOp(xref, slot, name) {
|
|
8449
8464
|
return __spreadValues(__spreadValues({
|
|
8450
8465
|
kind: OpKind.Pipe,
|
|
8451
8466
|
xref,
|
|
8467
|
+
handle: slot,
|
|
8452
8468
|
name
|
|
8453
8469
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8454
8470
|
}
|
|
8455
|
-
var Namespace;
|
|
8456
|
-
(function(Namespace2) {
|
|
8457
|
-
Namespace2[Namespace2["HTML"] = 0] = "HTML";
|
|
8458
|
-
Namespace2[Namespace2["SVG"] = 1] = "SVG";
|
|
8459
|
-
Namespace2[Namespace2["Math"] = 2] = "Math";
|
|
8460
|
-
})(Namespace || (Namespace = {}));
|
|
8461
8471
|
function createNamespaceOp(namespace) {
|
|
8462
8472
|
return __spreadValues({
|
|
8463
8473
|
kind: OpKind.Namespace,
|
|
@@ -8474,6 +8484,7 @@ function createProjectionOp(xref, selector, sourceSpan) {
|
|
|
8474
8484
|
return __spreadValues(__spreadValues({
|
|
8475
8485
|
kind: OpKind.Projection,
|
|
8476
8486
|
xref,
|
|
8487
|
+
handle: new SlotHandle(),
|
|
8477
8488
|
selector,
|
|
8478
8489
|
projectionSlotIndex: 0,
|
|
8479
8490
|
attributes: [],
|
|
@@ -8490,53 +8501,60 @@ function createExtractedAttributeOp(target, bindingKind, name, expression) {
|
|
|
8490
8501
|
expression
|
|
8491
8502
|
}, NEW_OP);
|
|
8492
8503
|
}
|
|
8493
|
-
function createDeferOp(xref, main, sourceSpan) {
|
|
8494
|
-
return
|
|
8504
|
+
function createDeferOp(xref, main, mainSlot, sourceSpan) {
|
|
8505
|
+
return __spreadProps(__spreadValues(__spreadValues({
|
|
8495
8506
|
kind: OpKind.Defer,
|
|
8496
8507
|
xref,
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8508
|
+
handle: new SlotHandle(),
|
|
8509
|
+
mainView: main,
|
|
8510
|
+
mainSlot,
|
|
8511
|
+
loadingView: null,
|
|
8512
|
+
loadingSlot: null,
|
|
8513
|
+
loadingConfig: null,
|
|
8514
|
+
loadingMinimumTime: null,
|
|
8515
|
+
loadingAfterTime: null,
|
|
8516
|
+
placeholderView: null,
|
|
8517
|
+
placeholderSlot: null,
|
|
8518
|
+
placeholderConfig: null,
|
|
8519
|
+
placeholderMinimumTime: null,
|
|
8520
|
+
errorView: null,
|
|
8521
|
+
errorSlot: null,
|
|
8501
8522
|
sourceSpan
|
|
8502
|
-
}, NEW_OP), TRAIT_CONSUMES_SLOT),
|
|
8523
|
+
}, NEW_OP), TRAIT_CONSUMES_SLOT), {
|
|
8524
|
+
numSlotsUsed: 2
|
|
8525
|
+
});
|
|
8503
8526
|
}
|
|
8504
|
-
function
|
|
8505
|
-
return __spreadValues(
|
|
8506
|
-
kind: OpKind.DeferSecondaryBlock,
|
|
8507
|
-
deferOp,
|
|
8508
|
-
target: secondaryView,
|
|
8509
|
-
secondaryBlockKind,
|
|
8510
|
-
constValue: null,
|
|
8511
|
-
makeExpression: literalOrArrayLiteral
|
|
8512
|
-
}, NEW_OP), TRAIT_USES_SLOT_INDEX), TRAIT_HAS_CONST);
|
|
8513
|
-
}
|
|
8514
|
-
function createDeferOnOp(xref, sourceSpan) {
|
|
8515
|
-
return __spreadValues(__spreadValues({
|
|
8527
|
+
function createDeferOnOp(defer2, trigger, prefetch, sourceSpan) {
|
|
8528
|
+
return __spreadValues({
|
|
8516
8529
|
kind: OpKind.DeferOn,
|
|
8517
|
-
|
|
8530
|
+
defer: defer2,
|
|
8531
|
+
trigger,
|
|
8532
|
+
prefetch,
|
|
8518
8533
|
sourceSpan
|
|
8519
|
-
}, NEW_OP)
|
|
8534
|
+
}, NEW_OP);
|
|
8520
8535
|
}
|
|
8521
|
-
function createExtractedMessageOp(owner,
|
|
8536
|
+
function createExtractedMessageOp(owner, message, isRoot) {
|
|
8522
8537
|
return __spreadValues({
|
|
8523
8538
|
kind: OpKind.ExtractedMessage,
|
|
8524
8539
|
owner,
|
|
8525
|
-
|
|
8526
|
-
|
|
8540
|
+
message,
|
|
8541
|
+
isRoot,
|
|
8542
|
+
params: /* @__PURE__ */ new Map(),
|
|
8543
|
+
postprocessingParams: /* @__PURE__ */ new Map(),
|
|
8544
|
+
needsPostprocessing: false,
|
|
8545
|
+
formattedParams: null,
|
|
8546
|
+
formattedPostprocessingParams: null
|
|
8527
8547
|
}, NEW_OP);
|
|
8528
8548
|
}
|
|
8529
8549
|
function createI18nStartOp(xref, message, root) {
|
|
8530
8550
|
return __spreadValues(__spreadValues({
|
|
8531
8551
|
kind: OpKind.I18nStart,
|
|
8532
8552
|
xref,
|
|
8553
|
+
handle: new SlotHandle(),
|
|
8533
8554
|
root: root != null ? root : xref,
|
|
8534
8555
|
message,
|
|
8535
|
-
params: /* @__PURE__ */ new Map(),
|
|
8536
|
-
postprocessingParams: /* @__PURE__ */ new Map(),
|
|
8537
8556
|
messageIndex: null,
|
|
8538
|
-
subTemplateIndex: null
|
|
8539
|
-
needsPostprocessing: false
|
|
8557
|
+
subTemplateIndex: null
|
|
8540
8558
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8541
8559
|
}
|
|
8542
8560
|
function createI18nEndOp(xref) {
|
|
@@ -8553,14 +8571,8 @@ function createIcuOp(xref, message, sourceSpan) {
|
|
|
8553
8571
|
sourceSpan
|
|
8554
8572
|
}, NEW_OP);
|
|
8555
8573
|
}
|
|
8556
|
-
function literalOrArrayLiteral(value) {
|
|
8557
|
-
if (Array.isArray(value)) {
|
|
8558
|
-
return literalArr(value.map(literalOrArrayLiteral));
|
|
8559
|
-
}
|
|
8560
|
-
return literal(value, INFERRED_TYPE);
|
|
8561
|
-
}
|
|
8562
8574
|
|
|
8563
|
-
// bazel-out/
|
|
8575
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8564
8576
|
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8565
8577
|
return __spreadValues(__spreadValues({
|
|
8566
8578
|
kind: OpKind.HostProperty,
|
|
@@ -8571,10 +8583,10 @@ function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan)
|
|
|
8571
8583
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8572
8584
|
}
|
|
8573
8585
|
|
|
8574
|
-
// bazel-out/
|
|
8586
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8575
8587
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8576
8588
|
|
|
8577
|
-
// bazel-out/
|
|
8589
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8578
8590
|
var CompilationJobKind;
|
|
8579
8591
|
(function(CompilationJobKind2) {
|
|
8580
8592
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8680,8 +8692,8 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8680
8692
|
}
|
|
8681
8693
|
};
|
|
8682
8694
|
|
|
8683
|
-
// bazel-out/
|
|
8684
|
-
function
|
|
8695
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8696
|
+
function deleteAnyCasts(job) {
|
|
8685
8697
|
for (const unit of job.units) {
|
|
8686
8698
|
for (const op of unit.ops()) {
|
|
8687
8699
|
transformExpressionsInOp(op, removeAnys, VisitorContextFlag.None);
|
|
@@ -8698,12 +8710,12 @@ function removeAnys(e) {
|
|
|
8698
8710
|
return e;
|
|
8699
8711
|
}
|
|
8700
8712
|
|
|
8701
|
-
// bazel-out/
|
|
8702
|
-
function
|
|
8713
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8714
|
+
function applyI18nExpressions(job) {
|
|
8703
8715
|
for (const unit of job.units) {
|
|
8704
8716
|
for (const op of unit.update) {
|
|
8705
8717
|
if (op.kind === OpKind.I18nExpression && needsApplication(op)) {
|
|
8706
|
-
OpList.insertAfter(createI18nApplyOp(op.owner, null), op);
|
|
8718
|
+
OpList.insertAfter(createI18nApplyOp(op.owner, op.ownerSlot, null), op);
|
|
8707
8719
|
}
|
|
8708
8720
|
}
|
|
8709
8721
|
}
|
|
@@ -8719,8 +8731,8 @@ function needsApplication(op) {
|
|
|
8719
8731
|
return false;
|
|
8720
8732
|
}
|
|
8721
8733
|
|
|
8722
|
-
// bazel-out/
|
|
8723
|
-
function
|
|
8734
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8735
|
+
function assignI18nSlotDependencies(job) {
|
|
8724
8736
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8725
8737
|
let lastSlotConsumer = null;
|
|
8726
8738
|
for (const unit of job.units) {
|
|
@@ -8740,19 +8752,7 @@ function phaseAssignI18nSlotDependencies(job) {
|
|
|
8740
8752
|
}
|
|
8741
8753
|
}
|
|
8742
8754
|
|
|
8743
|
-
// bazel-out/
|
|
8744
|
-
function phaseCollapseSingletonInterpolations(job) {
|
|
8745
|
-
for (const unit of job.units) {
|
|
8746
|
-
for (const op of unit.update) {
|
|
8747
|
-
const eligibleOpKind = op.kind === OpKind.Attribute;
|
|
8748
|
-
if (eligibleOpKind && op.expression instanceof Interpolation2 && op.expression.strings.length === 2 && op.expression.strings.every((s) => s === "")) {
|
|
8749
|
-
op.expression = op.expression.expressions[0];
|
|
8750
|
-
}
|
|
8751
|
-
}
|
|
8752
|
-
}
|
|
8753
|
-
}
|
|
8754
|
-
|
|
8755
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8755
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8756
8756
|
function createOpXrefMap(unit) {
|
|
8757
8757
|
const map = /* @__PURE__ */ new Map();
|
|
8758
8758
|
for (const op of unit.create) {
|
|
@@ -8764,8 +8764,8 @@ function createOpXrefMap(unit) {
|
|
|
8764
8764
|
return map;
|
|
8765
8765
|
}
|
|
8766
8766
|
|
|
8767
|
-
// bazel-out/
|
|
8768
|
-
function
|
|
8767
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8768
|
+
function extractAttributes(job) {
|
|
8769
8769
|
for (const unit of job.units) {
|
|
8770
8770
|
const elements = createOpXrefMap(unit);
|
|
8771
8771
|
for (const op of unit.ops()) {
|
|
@@ -8831,7 +8831,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8831
8831
|
}
|
|
8832
8832
|
}
|
|
8833
8833
|
|
|
8834
|
-
// bazel-out/
|
|
8834
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8835
8835
|
function lookupElement2(elements, xref) {
|
|
8836
8836
|
const el = elements.get(xref);
|
|
8837
8837
|
if (el === void 0) {
|
|
@@ -8839,7 +8839,7 @@ function lookupElement2(elements, xref) {
|
|
|
8839
8839
|
}
|
|
8840
8840
|
return el;
|
|
8841
8841
|
}
|
|
8842
|
-
function
|
|
8842
|
+
function specializeBindings(job) {
|
|
8843
8843
|
const elements = /* @__PURE__ */ new Map();
|
|
8844
8844
|
for (const unit of job.units) {
|
|
8845
8845
|
for (const op of unit.create) {
|
|
@@ -8881,7 +8881,7 @@ function phaseBindingSpecialization(job) {
|
|
|
8881
8881
|
}
|
|
8882
8882
|
}
|
|
8883
8883
|
|
|
8884
|
-
// bazel-out/
|
|
8884
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
8885
8885
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8886
8886
|
Identifiers.attribute,
|
|
8887
8887
|
Identifiers.classProp,
|
|
@@ -8910,35 +8910,35 @@ var CHAINABLE = /* @__PURE__ */ new Set([
|
|
|
8910
8910
|
Identifiers.syntheticHostProperty,
|
|
8911
8911
|
Identifiers.templateCreate
|
|
8912
8912
|
]);
|
|
8913
|
-
function
|
|
8913
|
+
function chain(job) {
|
|
8914
8914
|
for (const unit of job.units) {
|
|
8915
8915
|
chainOperationsInList(unit.create);
|
|
8916
8916
|
chainOperationsInList(unit.update);
|
|
8917
8917
|
}
|
|
8918
8918
|
}
|
|
8919
8919
|
function chainOperationsInList(opList) {
|
|
8920
|
-
let
|
|
8920
|
+
let chain2 = null;
|
|
8921
8921
|
for (const op of opList) {
|
|
8922
8922
|
if (op.kind !== OpKind.Statement || !(op.statement instanceof ExpressionStatement)) {
|
|
8923
|
-
|
|
8923
|
+
chain2 = null;
|
|
8924
8924
|
continue;
|
|
8925
8925
|
}
|
|
8926
8926
|
if (!(op.statement.expr instanceof InvokeFunctionExpr) || !(op.statement.expr.fn instanceof ExternalExpr)) {
|
|
8927
|
-
|
|
8927
|
+
chain2 = null;
|
|
8928
8928
|
continue;
|
|
8929
8929
|
}
|
|
8930
8930
|
const instruction = op.statement.expr.fn.value;
|
|
8931
8931
|
if (!CHAINABLE.has(instruction)) {
|
|
8932
|
-
|
|
8932
|
+
chain2 = null;
|
|
8933
8933
|
continue;
|
|
8934
8934
|
}
|
|
8935
|
-
if (
|
|
8936
|
-
const expression =
|
|
8937
|
-
|
|
8938
|
-
|
|
8935
|
+
if (chain2 !== null && chain2.instruction === instruction) {
|
|
8936
|
+
const expression = chain2.expression.callFn(op.statement.expr.args, op.statement.expr.sourceSpan, op.statement.expr.pure);
|
|
8937
|
+
chain2.expression = expression;
|
|
8938
|
+
chain2.op.statement = expression.toStmt();
|
|
8939
8939
|
OpList.remove(op);
|
|
8940
8940
|
} else {
|
|
8941
|
-
|
|
8941
|
+
chain2 = {
|
|
8942
8942
|
op,
|
|
8943
8943
|
instruction,
|
|
8944
8944
|
expression: op.statement.expr
|
|
@@ -8947,8 +8947,20 @@ function chainOperationsInList(opList) {
|
|
|
8947
8947
|
}
|
|
8948
8948
|
}
|
|
8949
8949
|
|
|
8950
|
-
// bazel-out/
|
|
8951
|
-
function
|
|
8950
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
8951
|
+
function collapseSingletonInterpolations(job) {
|
|
8952
|
+
for (const unit of job.units) {
|
|
8953
|
+
for (const op of unit.update) {
|
|
8954
|
+
const eligibleOpKind = op.kind === OpKind.Attribute;
|
|
8955
|
+
if (eligibleOpKind && op.expression instanceof Interpolation2 && op.expression.strings.length === 2 && op.expression.strings.every((s) => s === "")) {
|
|
8956
|
+
op.expression = op.expression.expressions[0];
|
|
8957
|
+
}
|
|
8958
|
+
}
|
|
8959
|
+
}
|
|
8960
|
+
}
|
|
8961
|
+
|
|
8962
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
8963
|
+
function generateConditionalExpressions(job) {
|
|
8952
8964
|
for (const unit of job.units) {
|
|
8953
8965
|
for (const op of unit.ops()) {
|
|
8954
8966
|
if (op.kind !== OpKind.Conditional) {
|
|
@@ -8957,8 +8969,8 @@ function phaseConditionals(job) {
|
|
|
8957
8969
|
let test;
|
|
8958
8970
|
const defaultCase = op.conditions.findIndex((cond) => cond.expr === null);
|
|
8959
8971
|
if (defaultCase >= 0) {
|
|
8960
|
-
const
|
|
8961
|
-
test = new SlotLiteralExpr(
|
|
8972
|
+
const slot = op.conditions.splice(defaultCase, 1)[0].targetSlot;
|
|
8973
|
+
test = new SlotLiteralExpr(slot);
|
|
8962
8974
|
} else {
|
|
8963
8975
|
test = literal(-1);
|
|
8964
8976
|
}
|
|
@@ -8976,7 +8988,7 @@ function phaseConditionals(job) {
|
|
|
8976
8988
|
conditionalCase.expr = new AssignTemporaryExpr(conditionalCase.expr, caseExpressionTemporaryXref);
|
|
8977
8989
|
op.contextValue = new ReadTemporaryExpr(caseExpressionTemporaryXref);
|
|
8978
8990
|
}
|
|
8979
|
-
test = new ConditionalExpr(conditionalCase.expr, new SlotLiteralExpr(conditionalCase.
|
|
8991
|
+
test = new ConditionalExpr(conditionalCase.expr, new SlotLiteralExpr(conditionalCase.targetSlot), test);
|
|
8980
8992
|
}
|
|
8981
8993
|
op.processed = test;
|
|
8982
8994
|
op.conditions = [];
|
|
@@ -8984,7 +8996,7 @@ function phaseConditionals(job) {
|
|
|
8984
8996
|
}
|
|
8985
8997
|
}
|
|
8986
8998
|
|
|
8987
|
-
// bazel-out/
|
|
8999
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
8988
9000
|
var TagContentType;
|
|
8989
9001
|
(function(TagContentType2) {
|
|
8990
9002
|
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
@@ -9017,7 +9029,7 @@ function mergeNsAndName(prefix, localName) {
|
|
|
9017
9029
|
return prefix ? `:${prefix}:${localName}` : localName;
|
|
9018
9030
|
}
|
|
9019
9031
|
|
|
9020
|
-
// bazel-out/
|
|
9032
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9021
9033
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9022
9034
|
["&&", BinaryOperator.And],
|
|
9023
9035
|
[">", BinaryOperator.Bigger],
|
|
@@ -9060,15 +9072,15 @@ function prefixWithNamespace(strippedTag, namespace) {
|
|
|
9060
9072
|
}
|
|
9061
9073
|
return `:${keyForNamespace(namespace)}:${strippedTag}`;
|
|
9062
9074
|
}
|
|
9063
|
-
function
|
|
9075
|
+
function literalOrArrayLiteral(value) {
|
|
9064
9076
|
if (Array.isArray(value)) {
|
|
9065
|
-
return literalArr(value.map(
|
|
9077
|
+
return literalArr(value.map(literalOrArrayLiteral));
|
|
9066
9078
|
}
|
|
9067
|
-
return literal(value
|
|
9079
|
+
return literal(value);
|
|
9068
9080
|
}
|
|
9069
9081
|
|
|
9070
|
-
// bazel-out/
|
|
9071
|
-
function
|
|
9082
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9083
|
+
function collectElementConsts(job) {
|
|
9072
9084
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9073
9085
|
for (const unit of job.units) {
|
|
9074
9086
|
for (const op of unit.create) {
|
|
@@ -9181,7 +9193,7 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9181
9193
|
const attrArray = [...attributes];
|
|
9182
9194
|
if (projectAs !== null) {
|
|
9183
9195
|
const parsedR3Selector = parseSelectorToR3Selector(projectAs)[0];
|
|
9184
|
-
attrArray.push(literal(5),
|
|
9196
|
+
attrArray.push(literal(5), literalOrArrayLiteral(parsedR3Selector));
|
|
9185
9197
|
}
|
|
9186
9198
|
if (classes.length > 0) {
|
|
9187
9199
|
attrArray.push(literal(1), ...classes);
|
|
@@ -9201,14 +9213,109 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9201
9213
|
return literalArr(attrArray);
|
|
9202
9214
|
}
|
|
9203
9215
|
|
|
9204
|
-
// bazel-out/
|
|
9216
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9217
|
+
function configureDeferInstructions(job) {
|
|
9218
|
+
for (const unit of job.units) {
|
|
9219
|
+
for (const op of unit.create) {
|
|
9220
|
+
if (op.kind !== OpKind.Defer) {
|
|
9221
|
+
continue;
|
|
9222
|
+
}
|
|
9223
|
+
if (op.placeholderMinimumTime !== null) {
|
|
9224
|
+
op.placeholderConfig = new ConstCollectedExpr(literalOrArrayLiteral([op.placeholderMinimumTime]));
|
|
9225
|
+
}
|
|
9226
|
+
if (op.loadingMinimumTime !== null || op.loadingAfterTime !== null) {
|
|
9227
|
+
op.loadingConfig = new ConstCollectedExpr(literalOrArrayLiteral([op.loadingMinimumTime, op.loadingAfterTime]));
|
|
9228
|
+
}
|
|
9229
|
+
}
|
|
9230
|
+
}
|
|
9231
|
+
}
|
|
9232
|
+
|
|
9233
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9234
|
+
function resolveDeferTargetNames(job) {
|
|
9235
|
+
const scopes = /* @__PURE__ */ new Map();
|
|
9236
|
+
function getScopeForView2(view) {
|
|
9237
|
+
if (scopes.has(view.xref)) {
|
|
9238
|
+
return scopes.get(view.xref);
|
|
9239
|
+
}
|
|
9240
|
+
const scope = new Scope();
|
|
9241
|
+
for (const op of view.create) {
|
|
9242
|
+
if (!isElementOrContainerOp(op) || op.localRefs === null) {
|
|
9243
|
+
continue;
|
|
9244
|
+
}
|
|
9245
|
+
if (!Array.isArray(op.localRefs)) {
|
|
9246
|
+
throw new Error("LocalRefs were already processed, but were needed to resolve defer targets.");
|
|
9247
|
+
}
|
|
9248
|
+
for (const ref of op.localRefs) {
|
|
9249
|
+
if (ref.target !== "") {
|
|
9250
|
+
continue;
|
|
9251
|
+
}
|
|
9252
|
+
scope.targets.set(ref.name, { xref: op.xref, slot: op.handle });
|
|
9253
|
+
}
|
|
9254
|
+
}
|
|
9255
|
+
scopes.set(view.xref, scope);
|
|
9256
|
+
return scope;
|
|
9257
|
+
}
|
|
9258
|
+
function resolveTrigger(deferOwnerView, op, placeholderView) {
|
|
9259
|
+
switch (op.trigger.kind) {
|
|
9260
|
+
case DeferTriggerKind.Idle:
|
|
9261
|
+
case DeferTriggerKind.Immediate:
|
|
9262
|
+
case DeferTriggerKind.Timer:
|
|
9263
|
+
return;
|
|
9264
|
+
case DeferTriggerKind.Hover:
|
|
9265
|
+
case DeferTriggerKind.Interaction:
|
|
9266
|
+
case DeferTriggerKind.Viewport:
|
|
9267
|
+
if (op.trigger.targetName === null) {
|
|
9268
|
+
return;
|
|
9269
|
+
}
|
|
9270
|
+
let view = placeholderView !== null ? job.views.get(placeholderView) : deferOwnerView;
|
|
9271
|
+
let step = placeholderView !== null ? -1 : 0;
|
|
9272
|
+
while (view !== null) {
|
|
9273
|
+
const scope = getScopeForView2(view);
|
|
9274
|
+
if (scope.targets.has(op.trigger.targetName)) {
|
|
9275
|
+
const { xref, slot } = scope.targets.get(op.trigger.targetName);
|
|
9276
|
+
op.trigger.targetXref = xref;
|
|
9277
|
+
op.trigger.targetView = view.xref;
|
|
9278
|
+
op.trigger.targetSlotViewSteps = step;
|
|
9279
|
+
op.trigger.targetSlot = slot;
|
|
9280
|
+
return;
|
|
9281
|
+
}
|
|
9282
|
+
view = view.parent !== null ? job.views.get(view.parent) : null;
|
|
9283
|
+
step++;
|
|
9284
|
+
}
|
|
9285
|
+
break;
|
|
9286
|
+
default:
|
|
9287
|
+
throw new Error(`Trigger kind ${op.trigger.kind} not handled`);
|
|
9288
|
+
}
|
|
9289
|
+
}
|
|
9290
|
+
for (const unit of job.units) {
|
|
9291
|
+
const defers = /* @__PURE__ */ new Map();
|
|
9292
|
+
for (const op of unit.create) {
|
|
9293
|
+
switch (op.kind) {
|
|
9294
|
+
case OpKind.Defer:
|
|
9295
|
+
defers.set(op.xref, op);
|
|
9296
|
+
break;
|
|
9297
|
+
case OpKind.DeferOn:
|
|
9298
|
+
const deferOp = defers.get(op.defer);
|
|
9299
|
+
resolveTrigger(unit, op, deferOp.placeholderView);
|
|
9300
|
+
break;
|
|
9301
|
+
}
|
|
9302
|
+
}
|
|
9303
|
+
}
|
|
9304
|
+
}
|
|
9305
|
+
var Scope = class {
|
|
9306
|
+
constructor() {
|
|
9307
|
+
this.targets = /* @__PURE__ */ new Map();
|
|
9308
|
+
}
|
|
9309
|
+
};
|
|
9310
|
+
|
|
9311
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9205
9312
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9206
9313
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9207
9314
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
9208
9315
|
[OpKind.I18nEnd, [OpKind.I18nStart, OpKind.I18n]]
|
|
9209
9316
|
]);
|
|
9210
9317
|
var IGNORED_OP_KINDS = /* @__PURE__ */ new Set([OpKind.Pipe]);
|
|
9211
|
-
function
|
|
9318
|
+
function collapseEmptyInstructions(job) {
|
|
9212
9319
|
for (const unit of job.units) {
|
|
9213
9320
|
for (const op of unit.create) {
|
|
9214
9321
|
const opReplacements = REPLACEMENTS.get(op.kind);
|
|
@@ -9228,8 +9335,8 @@ function phaseEmptyElements(job) {
|
|
|
9228
9335
|
}
|
|
9229
9336
|
}
|
|
9230
9337
|
|
|
9231
|
-
// bazel-out/
|
|
9232
|
-
function
|
|
9338
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9339
|
+
function expandSafeReads(job) {
|
|
9233
9340
|
for (const unit of job.units) {
|
|
9234
9341
|
for (const op of unit.ops()) {
|
|
9235
9342
|
transformExpressionsInOp(op, (e) => safeTransform(e, { job }), VisitorContextFlag.None);
|
|
@@ -9364,49 +9471,79 @@ function ternaryTransform(e) {
|
|
|
9364
9471
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9365
9472
|
}
|
|
9366
9473
|
|
|
9367
|
-
// bazel-out/
|
|
9368
|
-
|
|
9369
|
-
|
|
9474
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/format_i18n_params.mjs
|
|
9475
|
+
var ESCAPE = "\uFFFD";
|
|
9476
|
+
var ELEMENT_MARKER = "#";
|
|
9477
|
+
var TEMPLATE_MARKER = "*";
|
|
9478
|
+
var TAG_CLOSE_MARKER = "/";
|
|
9479
|
+
var CONTEXT_MARKER = ":";
|
|
9480
|
+
var LIST_START_MARKER = "[";
|
|
9481
|
+
var LIST_END_MARKER = "]";
|
|
9482
|
+
var LIST_DELIMITER = "|";
|
|
9483
|
+
function formatI18nParams(job) {
|
|
9370
9484
|
for (const unit of job.units) {
|
|
9371
|
-
for (const op of unit.
|
|
9372
|
-
if (op.kind === OpKind.
|
|
9373
|
-
|
|
9485
|
+
for (const op of unit.create) {
|
|
9486
|
+
if (op.kind === OpKind.ExtractedMessage) {
|
|
9487
|
+
if (op.isRoot) {
|
|
9488
|
+
op.formattedParams = formatParams(op.params);
|
|
9489
|
+
op.formattedPostprocessingParams = formatParams(op.postprocessingParams);
|
|
9490
|
+
op.needsPostprocessing = op.postprocessingParams.size > 0;
|
|
9491
|
+
for (const [param, values] of op.params) {
|
|
9492
|
+
if (values.length > 1) {
|
|
9493
|
+
op.needsPostprocessing = true;
|
|
9494
|
+
}
|
|
9495
|
+
}
|
|
9496
|
+
}
|
|
9374
9497
|
}
|
|
9375
9498
|
}
|
|
9376
9499
|
}
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
switch (expr.identity) {
|
|
9385
|
-
case DerivedRepeaterVarIdentity.First:
|
|
9386
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), literal(0));
|
|
9387
|
-
case DerivedRepeaterVarIdentity.Last:
|
|
9388
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), new BinaryOperatorExpr(BinaryOperator.Minus, new LexicalReadExpr(repeaterOp.varNames.$count), literal(1)));
|
|
9389
|
-
case DerivedRepeaterVarIdentity.Even:
|
|
9390
|
-
return new BinaryOperatorExpr(BinaryOperator.Identical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
|
|
9391
|
-
case DerivedRepeaterVarIdentity.Odd:
|
|
9392
|
-
return new BinaryOperatorExpr(BinaryOperator.NotIdentical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
|
|
9393
|
-
}
|
|
9394
|
-
}, VisitorContextFlag.None);
|
|
9500
|
+
}
|
|
9501
|
+
function formatParams(params) {
|
|
9502
|
+
const result = /* @__PURE__ */ new Map();
|
|
9503
|
+
for (const [placeholder, placeholderValues] of [...params].sort()) {
|
|
9504
|
+
const serializedValues = formatParamValues(placeholderValues);
|
|
9505
|
+
if (serializedValues !== null) {
|
|
9506
|
+
result.set(placeholder, literal(formatParamValues(placeholderValues)));
|
|
9395
9507
|
}
|
|
9396
9508
|
}
|
|
9509
|
+
return result;
|
|
9510
|
+
}
|
|
9511
|
+
function formatParamValues(values) {
|
|
9512
|
+
if (values.length === 0) {
|
|
9513
|
+
return null;
|
|
9514
|
+
}
|
|
9515
|
+
const serializedValues = values.map((value) => formatValue(value));
|
|
9516
|
+
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;
|
|
9517
|
+
}
|
|
9518
|
+
function formatValue(value) {
|
|
9519
|
+
let tagMarker = "";
|
|
9520
|
+
let closeMarker = "";
|
|
9521
|
+
if (value.flags & I18nParamValueFlags.ElementTag) {
|
|
9522
|
+
tagMarker = ELEMENT_MARKER;
|
|
9523
|
+
} else if (value.flags & I18nParamValueFlags.TemplateTag) {
|
|
9524
|
+
tagMarker = TEMPLATE_MARKER;
|
|
9525
|
+
}
|
|
9526
|
+
if (tagMarker !== "") {
|
|
9527
|
+
closeMarker = value.flags & I18nParamValueFlags.CloseTag ? TAG_CLOSE_MARKER : "";
|
|
9528
|
+
}
|
|
9529
|
+
const context = value.subTemplateIndex === null ? "" : `${CONTEXT_MARKER}${value.subTemplateIndex}`;
|
|
9530
|
+
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
9531
|
+
return `${ESCAPE}${tagMarker}${value.value}${context}${ESCAPE}${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9532
|
+
}
|
|
9533
|
+
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9397
9534
|
}
|
|
9398
9535
|
|
|
9399
|
-
// bazel-out/
|
|
9400
|
-
function
|
|
9536
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9537
|
+
function generateAdvance(job) {
|
|
9401
9538
|
for (const unit of job.units) {
|
|
9402
9539
|
const slotMap = /* @__PURE__ */ new Map();
|
|
9403
9540
|
for (const op of unit.create) {
|
|
9404
9541
|
if (!hasConsumesSlotTrait(op)) {
|
|
9405
9542
|
continue;
|
|
9406
|
-
} else if (op.slot === null) {
|
|
9543
|
+
} else if (op.handle.slot === null) {
|
|
9407
9544
|
throw new Error(`AssertionError: expected slots to have been allocated before generating advance() calls`);
|
|
9408
9545
|
}
|
|
9409
|
-
slotMap.set(op.xref, op.slot);
|
|
9546
|
+
slotMap.set(op.xref, op.handle.slot);
|
|
9410
9547
|
}
|
|
9411
9548
|
let slotContext = 0;
|
|
9412
9549
|
for (const op of unit.update) {
|
|
@@ -9428,8 +9565,8 @@ function phaseGenerateAdvance(job) {
|
|
|
9428
9565
|
}
|
|
9429
9566
|
}
|
|
9430
9567
|
|
|
9431
|
-
// bazel-out/
|
|
9432
|
-
function
|
|
9568
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9569
|
+
function generateProjectionDefs(job) {
|
|
9433
9570
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9434
9571
|
const selectors = [];
|
|
9435
9572
|
let projectionSlotIndex = 0;
|
|
@@ -9445,15 +9582,15 @@ function phaseGenerateProjectionDef(job) {
|
|
|
9445
9582
|
let defExpr = null;
|
|
9446
9583
|
if (selectors.length > 1 || selectors[0] !== "*") {
|
|
9447
9584
|
const def = selectors.map((s) => s === "*" ? s : parseSelectorToR3Selector(s));
|
|
9448
|
-
defExpr = job.pool.getConstLiteral(
|
|
9585
|
+
defExpr = job.pool.getConstLiteral(literalOrArrayLiteral(def), share);
|
|
9449
9586
|
}
|
|
9450
|
-
job.contentSelectors = job.pool.getConstLiteral(
|
|
9587
|
+
job.contentSelectors = job.pool.getConstLiteral(literalOrArrayLiteral(selectors), share);
|
|
9451
9588
|
job.root.create.prepend([createProjectionDefOp(defExpr)]);
|
|
9452
9589
|
}
|
|
9453
9590
|
}
|
|
9454
9591
|
|
|
9455
|
-
// bazel-out/
|
|
9456
|
-
function
|
|
9592
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9593
|
+
function generateVariables(job) {
|
|
9457
9594
|
recursivelyProcessView(job.root, null);
|
|
9458
9595
|
}
|
|
9459
9596
|
function recursivelyProcessView(view, parentScope) {
|
|
@@ -9503,6 +9640,7 @@ function getScopeForView(view, parent) {
|
|
|
9503
9640
|
scope.references.push({
|
|
9504
9641
|
name: op.localRefs[offset].name,
|
|
9505
9642
|
targetId: op.xref,
|
|
9643
|
+
targetSlot: op.handle,
|
|
9506
9644
|
offset,
|
|
9507
9645
|
variable: {
|
|
9508
9646
|
kind: SemanticVariableKind.Identifier,
|
|
@@ -9531,7 +9669,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9531
9669
|
newOps.push(createVariableOp(view.job.allocateXrefId(), alias, alias.expression.clone(), VariableFlags.AlwaysInline));
|
|
9532
9670
|
}
|
|
9533
9671
|
for (const ref of scope.references) {
|
|
9534
|
-
newOps.push(createVariableOp(view.job.allocateXrefId(), ref.variable, new ReferenceExpr(ref.targetId, ref.offset), VariableFlags.None));
|
|
9672
|
+
newOps.push(createVariableOp(view.job.allocateXrefId(), ref.variable, new ReferenceExpr(ref.targetId, ref.targetSlot, ref.offset), VariableFlags.None));
|
|
9535
9673
|
}
|
|
9536
9674
|
if (scope.parent !== null) {
|
|
9537
9675
|
newOps.push(...generateVariablesInScopeForView(view, scope.parent));
|
|
@@ -9539,34 +9677,27 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9539
9677
|
return newOps;
|
|
9540
9678
|
}
|
|
9541
9679
|
|
|
9542
|
-
// bazel-out/
|
|
9543
|
-
function
|
|
9544
|
-
const collectGlobalConsts = (e) => {
|
|
9545
|
-
if (e instanceof ExpressionBase && hasConstTrait(e)) {
|
|
9546
|
-
const ea = e;
|
|
9547
|
-
if (ea.constValue !== null) {
|
|
9548
|
-
ea.constIndex = job.addConst(ea.constValue);
|
|
9549
|
-
}
|
|
9550
|
-
}
|
|
9551
|
-
return e;
|
|
9552
|
-
};
|
|
9680
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9681
|
+
function collectConstExpressions(job) {
|
|
9553
9682
|
for (const unit of job.units) {
|
|
9554
9683
|
for (const op of unit.ops()) {
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9684
|
+
transformExpressionsInOp(op, (expr) => {
|
|
9685
|
+
if (!(expr instanceof ConstCollectedExpr)) {
|
|
9686
|
+
return expr;
|
|
9687
|
+
}
|
|
9688
|
+
return literal(job.addConst(expr.expr));
|
|
9689
|
+
}, VisitorContextFlag.None);
|
|
9559
9690
|
}
|
|
9560
9691
|
}
|
|
9561
9692
|
}
|
|
9562
9693
|
|
|
9563
|
-
// bazel-out/
|
|
9694
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9564
9695
|
var STYLE_DOT = "style.";
|
|
9565
9696
|
var CLASS_DOT = "class.";
|
|
9566
9697
|
var STYLE_BANG = "style!";
|
|
9567
9698
|
var CLASS_BANG = "class!";
|
|
9568
9699
|
var BANG_IMPORTANT = "!important";
|
|
9569
|
-
function
|
|
9700
|
+
function parseHostStyleProperties(job) {
|
|
9570
9701
|
for (const op of job.root.update) {
|
|
9571
9702
|
if (op.kind !== OpKind.Binding) {
|
|
9572
9703
|
continue;
|
|
@@ -9618,27 +9749,7 @@ function parseProperty(name) {
|
|
|
9618
9749
|
return { property: property2, suffix };
|
|
9619
9750
|
}
|
|
9620
9751
|
|
|
9621
|
-
// bazel-out/
|
|
9622
|
-
function phaseI18nConstCollection(job) {
|
|
9623
|
-
const messageConstIndices = {};
|
|
9624
|
-
for (const unit of job.units) {
|
|
9625
|
-
for (const op of unit.create) {
|
|
9626
|
-
if (op.kind === OpKind.ExtractedMessage) {
|
|
9627
|
-
messageConstIndices[op.owner] = job.addConst(op.expression, op.statements);
|
|
9628
|
-
OpList.remove(op);
|
|
9629
|
-
}
|
|
9630
|
-
}
|
|
9631
|
-
}
|
|
9632
|
-
for (const unit of job.units) {
|
|
9633
|
-
for (const op of unit.create) {
|
|
9634
|
-
if (op.kind === OpKind.I18nStart) {
|
|
9635
|
-
op.messageIndex = messageConstIndices[op.root];
|
|
9636
|
-
}
|
|
9637
|
-
}
|
|
9638
|
-
}
|
|
9639
|
-
}
|
|
9640
|
-
|
|
9641
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9752
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
9642
9753
|
function mapLiteral(obj, quoted = false) {
|
|
9643
9754
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
9644
9755
|
key,
|
|
@@ -9647,7 +9758,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
9647
9758
|
})));
|
|
9648
9759
|
}
|
|
9649
9760
|
|
|
9650
|
-
// bazel-out/
|
|
9761
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
9651
9762
|
var IcuSerializerVisitor = class {
|
|
9652
9763
|
visitText(text2) {
|
|
9653
9764
|
return text2.value;
|
|
@@ -9678,7 +9789,7 @@ function serializeIcuNode(icu) {
|
|
|
9678
9789
|
return icu.visit(serializer);
|
|
9679
9790
|
}
|
|
9680
9791
|
|
|
9681
|
-
// bazel-out/
|
|
9792
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
9682
9793
|
var TokenType;
|
|
9683
9794
|
(function(TokenType2) {
|
|
9684
9795
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10039,7 +10150,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10039
10150
|
return result;
|
|
10040
10151
|
}
|
|
10041
10152
|
|
|
10042
|
-
// bazel-out/
|
|
10153
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10043
10154
|
var SplitInterpolation = class {
|
|
10044
10155
|
constructor(strings, expressions, offsets) {
|
|
10045
10156
|
this.strings = strings;
|
|
@@ -10933,7 +11044,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
10933
11044
|
return offsetMap;
|
|
10934
11045
|
}
|
|
10935
11046
|
|
|
10936
|
-
// bazel-out/
|
|
11047
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
10937
11048
|
var NodeWithI18n = class {
|
|
10938
11049
|
constructor(sourceSpan, i18n2) {
|
|
10939
11050
|
this.sourceSpan = sourceSpan;
|
|
@@ -11085,11 +11196,11 @@ var RecursiveVisitor = class {
|
|
|
11085
11196
|
}
|
|
11086
11197
|
};
|
|
11087
11198
|
|
|
11088
|
-
// bazel-out/
|
|
11199
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11089
11200
|
var ElementSchemaRegistry = class {
|
|
11090
11201
|
};
|
|
11091
11202
|
|
|
11092
|
-
// bazel-out/
|
|
11203
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11093
11204
|
var BOOLEAN = "boolean";
|
|
11094
11205
|
var NUMBER = "number";
|
|
11095
11206
|
var STRING = "string";
|
|
@@ -11442,7 +11553,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11442
11553
|
}
|
|
11443
11554
|
}
|
|
11444
11555
|
|
|
11445
|
-
// bazel-out/
|
|
11556
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11446
11557
|
var HtmlTagDefinition = class {
|
|
11447
11558
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11448
11559
|
this.closedByChildren = {};
|
|
@@ -11560,7 +11671,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11560
11671
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11561
11672
|
}
|
|
11562
11673
|
|
|
11563
|
-
// bazel-out/
|
|
11674
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11564
11675
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11565
11676
|
"A": "LINK",
|
|
11566
11677
|
"B": "BOLD_TEXT",
|
|
@@ -11654,7 +11765,7 @@ var PlaceholderRegistry = class {
|
|
|
11654
11765
|
}
|
|
11655
11766
|
};
|
|
11656
11767
|
|
|
11657
|
-
// bazel-out/
|
|
11768
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
11658
11769
|
var _expParser = new Parser(new Lexer());
|
|
11659
11770
|
function createI18nMessageFactory(interpolationConfig) {
|
|
11660
11771
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig);
|
|
@@ -11816,14 +11927,14 @@ function extractPlaceholderName(input) {
|
|
|
11816
11927
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
11817
11928
|
}
|
|
11818
11929
|
|
|
11819
|
-
// bazel-out/
|
|
11930
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
11820
11931
|
var I18nError = class extends ParseError {
|
|
11821
11932
|
constructor(span, msg) {
|
|
11822
11933
|
super(span, msg);
|
|
11823
11934
|
}
|
|
11824
11935
|
};
|
|
11825
11936
|
|
|
11826
|
-
// bazel-out/
|
|
11937
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
11827
11938
|
var NAMED_ENTITIES = {
|
|
11828
11939
|
"AElig": "\xC6",
|
|
11829
11940
|
"AMP": "&",
|
|
@@ -13954,7 +14065,7 @@ var NAMED_ENTITIES = {
|
|
|
13954
14065
|
var NGSP_UNICODE = "\uE500";
|
|
13955
14066
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
13956
14067
|
|
|
13957
|
-
// bazel-out/
|
|
14068
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
13958
14069
|
var TokenError = class extends ParseError {
|
|
13959
14070
|
constructor(errorMsg, tokenType, span) {
|
|
13960
14071
|
super(span, errorMsg);
|
|
@@ -14875,7 +14986,7 @@ var CursorError = class {
|
|
|
14875
14986
|
}
|
|
14876
14987
|
};
|
|
14877
14988
|
|
|
14878
|
-
// bazel-out/
|
|
14989
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
14879
14990
|
var TreeError = class extends ParseError {
|
|
14880
14991
|
static create(elementName, span, msg) {
|
|
14881
14992
|
return new TreeError(elementName, span, msg);
|
|
@@ -15259,7 +15370,7 @@ function decodeEntity(match, entity) {
|
|
|
15259
15370
|
return match;
|
|
15260
15371
|
}
|
|
15261
15372
|
|
|
15262
|
-
// bazel-out/
|
|
15373
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15263
15374
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15264
15375
|
"iframe|srcdoc",
|
|
15265
15376
|
"*|innerhtml",
|
|
@@ -15274,7 +15385,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15274
15385
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15275
15386
|
}
|
|
15276
15387
|
|
|
15277
|
-
// bazel-out/
|
|
15388
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15278
15389
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15279
15390
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15280
15391
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15430,7 +15541,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15430
15541
|
return jsDocComment(tags);
|
|
15431
15542
|
}
|
|
15432
15543
|
|
|
15433
|
-
// bazel-out/
|
|
15544
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15434
15545
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15435
15546
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15436
15547
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15478,7 +15589,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15478
15589
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15479
15590
|
}
|
|
15480
15591
|
|
|
15481
|
-
// bazel-out/
|
|
15592
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15482
15593
|
function createLocalizeStatements(variable2, message, params) {
|
|
15483
15594
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15484
15595
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -15561,29 +15672,38 @@ function createEmptyMessagePart(location) {
|
|
|
15561
15672
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
15562
15673
|
}
|
|
15563
15674
|
|
|
15564
|
-
// bazel-out/
|
|
15675
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
15565
15676
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
15566
15677
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
15567
|
-
function
|
|
15678
|
+
function collectI18nConsts(job) {
|
|
15568
15679
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
15680
|
+
const messageConstIndices = /* @__PURE__ */ new Map();
|
|
15569
15681
|
for (const unit of job.units) {
|
|
15570
15682
|
for (const op of unit.create) {
|
|
15571
|
-
if (op.kind === OpKind.
|
|
15572
|
-
if (op.
|
|
15573
|
-
|
|
15683
|
+
if (op.kind === OpKind.ExtractedMessage) {
|
|
15684
|
+
if (op.isRoot) {
|
|
15685
|
+
assertAllParamsResolved(op);
|
|
15574
15686
|
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
|
|
15575
15687
|
const closureVar = i18nGenerateClosureVar(job.pool, op.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
15576
15688
|
let transformFn = void 0;
|
|
15577
15689
|
if (op.needsPostprocessing) {
|
|
15578
15690
|
const extraTransformFnParams = [];
|
|
15579
|
-
if (op.
|
|
15580
|
-
extraTransformFnParams.push(literalMap([...op.
|
|
15691
|
+
if (op.formattedPostprocessingParams.size > 0) {
|
|
15692
|
+
extraTransformFnParams.push(literalMap([...op.formattedPostprocessingParams].map(([key, value]) => ({ key, value, quoted: true }))));
|
|
15581
15693
|
}
|
|
15582
15694
|
transformFn = (expr) => importExpr(Identifiers.i18nPostprocess).callFn([expr, ...extraTransformFnParams]);
|
|
15583
15695
|
}
|
|
15584
|
-
const statements = getTranslationDeclStmts(op.message, mainVar, closureVar,
|
|
15585
|
-
|
|
15696
|
+
const statements = getTranslationDeclStmts(op.message, mainVar, closureVar, op.formattedParams, transformFn);
|
|
15697
|
+
messageConstIndices.set(op.owner, job.addConst(mainVar, statements));
|
|
15586
15698
|
}
|
|
15699
|
+
OpList.remove(op);
|
|
15700
|
+
}
|
|
15701
|
+
}
|
|
15702
|
+
}
|
|
15703
|
+
for (const unit of job.units) {
|
|
15704
|
+
for (const op of unit.create) {
|
|
15705
|
+
if (op.kind === OpKind.I18nStart) {
|
|
15706
|
+
op.messageIndex = messageConstIndices.get(op.root);
|
|
15587
15707
|
}
|
|
15588
15708
|
}
|
|
15589
15709
|
}
|
|
@@ -15615,24 +15735,53 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
15615
15735
|
}
|
|
15616
15736
|
return variable(name);
|
|
15617
15737
|
}
|
|
15738
|
+
function assertAllParamsResolved(op) {
|
|
15739
|
+
if (op.formattedParams === null || op.formattedPostprocessingParams === null) {
|
|
15740
|
+
throw Error("Params should have been formatted.");
|
|
15741
|
+
}
|
|
15742
|
+
for (const placeholder in op.message.placeholders) {
|
|
15743
|
+
if (!op.formattedParams.has(placeholder) && !op.formattedPostprocessingParams.has(placeholder)) {
|
|
15744
|
+
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
15745
|
+
}
|
|
15746
|
+
}
|
|
15747
|
+
for (const placeholder in op.message.placeholderToMessage) {
|
|
15748
|
+
if (!op.formattedParams.has(placeholder) && !op.formattedPostprocessingParams.has(placeholder)) {
|
|
15749
|
+
throw Error(`Failed to resolve i18n message placeholder: ${placeholder}`);
|
|
15750
|
+
}
|
|
15751
|
+
}
|
|
15752
|
+
}
|
|
15618
15753
|
|
|
15619
|
-
// bazel-out/
|
|
15620
|
-
function
|
|
15754
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_message_extraction.mjs
|
|
15755
|
+
function extractI18nMessages(job) {
|
|
15756
|
+
for (const unit of job.units) {
|
|
15757
|
+
for (const op of unit.create) {
|
|
15758
|
+
if (op.kind === OpKind.I18nStart) {
|
|
15759
|
+
unit.create.push(createExtractedMessageOp(op.xref, op.message, op.xref === op.root));
|
|
15760
|
+
}
|
|
15761
|
+
}
|
|
15762
|
+
}
|
|
15763
|
+
}
|
|
15764
|
+
|
|
15765
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
15766
|
+
function extractI18nText(job) {
|
|
15621
15767
|
var _a2;
|
|
15622
15768
|
for (const unit of job.units) {
|
|
15623
15769
|
let currentI18nId = null;
|
|
15770
|
+
let currentI18nSlot = null;
|
|
15624
15771
|
const textNodes = /* @__PURE__ */ new Map();
|
|
15625
15772
|
for (const op of unit.create) {
|
|
15626
15773
|
switch (op.kind) {
|
|
15627
15774
|
case OpKind.I18nStart:
|
|
15628
15775
|
currentI18nId = op.xref;
|
|
15776
|
+
currentI18nSlot = op.handle;
|
|
15629
15777
|
break;
|
|
15630
15778
|
case OpKind.I18nEnd:
|
|
15631
15779
|
currentI18nId = null;
|
|
15780
|
+
currentI18nSlot = null;
|
|
15632
15781
|
break;
|
|
15633
15782
|
case OpKind.Text:
|
|
15634
|
-
if (currentI18nId !== null) {
|
|
15635
|
-
textNodes.set(op.xref, currentI18nId);
|
|
15783
|
+
if (currentI18nId !== null && currentI18nSlot !== null) {
|
|
15784
|
+
textNodes.set(op.xref, { xref: currentI18nId, slot: currentI18nSlot });
|
|
15636
15785
|
OpList.remove(op);
|
|
15637
15786
|
}
|
|
15638
15787
|
break;
|
|
@@ -15644,12 +15793,12 @@ function phaseI18nTextExtraction(job) {
|
|
|
15644
15793
|
if (!textNodes.has(op.target)) {
|
|
15645
15794
|
continue;
|
|
15646
15795
|
}
|
|
15647
|
-
const
|
|
15796
|
+
const i18nBlock = textNodes.get(op.target);
|
|
15648
15797
|
const ops = [];
|
|
15649
15798
|
for (let i = 0; i < op.interpolation.expressions.length; i++) {
|
|
15650
15799
|
const expr = op.interpolation.expressions[i];
|
|
15651
15800
|
const placeholder = op.i18nPlaceholders[i];
|
|
15652
|
-
ops.push(createI18nExpressionOp(
|
|
15801
|
+
ops.push(createI18nExpressionOp(i18nBlock.xref, i18nBlock.slot, expr, placeholder.name, I18nParamResolutionTime.Creation, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
15653
15802
|
}
|
|
15654
15803
|
if (ops.length > 0) {
|
|
15655
15804
|
}
|
|
@@ -15660,24 +15809,27 @@ function phaseI18nTextExtraction(job) {
|
|
|
15660
15809
|
}
|
|
15661
15810
|
}
|
|
15662
15811
|
|
|
15663
|
-
// bazel-out/
|
|
15664
|
-
function
|
|
15812
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/icu_extraction.mjs
|
|
15813
|
+
function extractI18nICUs(job) {
|
|
15665
15814
|
for (const unit of job.units) {
|
|
15666
15815
|
const icus = /* @__PURE__ */ new Map();
|
|
15667
15816
|
let currentI18nId = null;
|
|
15817
|
+
let currentI18nSlot = null;
|
|
15668
15818
|
for (const op of unit.create) {
|
|
15669
15819
|
switch (op.kind) {
|
|
15670
15820
|
case OpKind.I18nStart:
|
|
15671
15821
|
currentI18nId = op.xref;
|
|
15822
|
+
currentI18nSlot = op.handle;
|
|
15672
15823
|
break;
|
|
15673
15824
|
case OpKind.I18nEnd:
|
|
15674
15825
|
currentI18nId = null;
|
|
15826
|
+
currentI18nSlot = null;
|
|
15675
15827
|
break;
|
|
15676
15828
|
case OpKind.Icu:
|
|
15677
15829
|
if (currentI18nId === null) {
|
|
15678
15830
|
throw Error("Unexpected ICU outside of an i18n block.");
|
|
15679
15831
|
}
|
|
15680
|
-
icus.set(op.xref, { message: op.message, i18nBlockId: currentI18nId });
|
|
15832
|
+
icus.set(op.xref, { message: op.message, i18nBlockId: currentI18nId, i18nBlockSlot: currentI18nSlot });
|
|
15681
15833
|
OpList.remove(op);
|
|
15682
15834
|
break;
|
|
15683
15835
|
}
|
|
@@ -15685,7 +15837,7 @@ function phaseIcuExtraction(job) {
|
|
|
15685
15837
|
for (const op of unit.update) {
|
|
15686
15838
|
switch (op.kind) {
|
|
15687
15839
|
case OpKind.IcuUpdate:
|
|
15688
|
-
const { message, i18nBlockId } = icus.get(op.xref);
|
|
15840
|
+
const { message, i18nBlockId, i18nBlockSlot } = icus.get(op.xref);
|
|
15689
15841
|
const icuNode = message.nodes.find((n) => n instanceof Icu2);
|
|
15690
15842
|
if (icuNode === void 0) {
|
|
15691
15843
|
throw Error("Could not find ICU in i18n AST");
|
|
@@ -15693,15 +15845,15 @@ function phaseIcuExtraction(job) {
|
|
|
15693
15845
|
if (icuNode.expressionPlaceholder === void 0) {
|
|
15694
15846
|
throw Error("ICU is missing an i18n placeholder");
|
|
15695
15847
|
}
|
|
15696
|
-
OpList.replace(op, createI18nExpressionOp(i18nBlockId, new LexicalReadExpr(icuNode.expression), icuNode.expressionPlaceholder, I18nParamResolutionTime.Postproccessing, null));
|
|
15848
|
+
OpList.replace(op, createI18nExpressionOp(i18nBlockId, i18nBlockSlot, new LexicalReadExpr(icuNode.expression), icuNode.expressionPlaceholder, I18nParamResolutionTime.Postproccessing, null));
|
|
15697
15849
|
break;
|
|
15698
15850
|
}
|
|
15699
15851
|
}
|
|
15700
15852
|
}
|
|
15701
15853
|
}
|
|
15702
15854
|
|
|
15703
|
-
// bazel-out/
|
|
15704
|
-
function
|
|
15855
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
15856
|
+
function liftLocalRefs(job) {
|
|
15705
15857
|
for (const unit of job.units) {
|
|
15706
15858
|
for (const op of unit.create) {
|
|
15707
15859
|
switch (op.kind) {
|
|
@@ -15730,8 +15882,8 @@ function serializeLocalRefs(refs) {
|
|
|
15730
15882
|
return literalArr(constRefs);
|
|
15731
15883
|
}
|
|
15732
15884
|
|
|
15733
|
-
// bazel-out/
|
|
15734
|
-
function
|
|
15885
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
15886
|
+
function emitNamespaceChanges(job) {
|
|
15735
15887
|
for (const unit of job.units) {
|
|
15736
15888
|
let activeNamespace = Namespace.HTML;
|
|
15737
15889
|
for (const op of unit.create) {
|
|
@@ -15746,7 +15898,7 @@ function phaseNamespace(job) {
|
|
|
15746
15898
|
}
|
|
15747
15899
|
}
|
|
15748
15900
|
|
|
15749
|
-
// bazel-out/
|
|
15901
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
15750
15902
|
function parse(value) {
|
|
15751
15903
|
const styles = [];
|
|
15752
15904
|
let i = 0;
|
|
@@ -15807,9 +15959,9 @@ function hyphenate2(value) {
|
|
|
15807
15959
|
}).toLowerCase();
|
|
15808
15960
|
}
|
|
15809
15961
|
|
|
15810
|
-
// bazel-out/
|
|
15811
|
-
function
|
|
15812
|
-
addNamesToView(
|
|
15962
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
15963
|
+
function nameFunctionsAndVariables(job) {
|
|
15964
|
+
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
15813
15965
|
}
|
|
15814
15966
|
function addNamesToView(unit, baseName, state, compatibility) {
|
|
15815
15967
|
if (unit.fnName === null) {
|
|
@@ -15828,7 +15980,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
15828
15980
|
if (op.handlerFnName !== null) {
|
|
15829
15981
|
break;
|
|
15830
15982
|
}
|
|
15831
|
-
if (!op.hostListener && op.targetSlot === null) {
|
|
15983
|
+
if (!op.hostListener && op.targetSlot.slot === null) {
|
|
15832
15984
|
throw new Error(`Expected a slot to be assigned`);
|
|
15833
15985
|
}
|
|
15834
15986
|
let animation = "";
|
|
@@ -15839,7 +15991,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
15839
15991
|
if (op.hostListener) {
|
|
15840
15992
|
op.handlerFnName = `${baseName}_${animation}${op.name}_HostBindingHandler`;
|
|
15841
15993
|
} else {
|
|
15842
|
-
op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animation}${op.name}_${op.targetSlot}_listener`;
|
|
15994
|
+
op.handlerFnName = `${unit.fnName}_${op.tag.replace("-", "_")}_${animation}${op.name}_${op.targetSlot.slot}_listener`;
|
|
15843
15995
|
}
|
|
15844
15996
|
op.handlerFnName = sanitizeIdentifier(op.handlerFnName);
|
|
15845
15997
|
break;
|
|
@@ -15850,26 +16002,25 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
15850
16002
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
15851
16003
|
throw new Error(`AssertionError: must be compiling a component`);
|
|
15852
16004
|
}
|
|
15853
|
-
if (op.slot === null) {
|
|
16005
|
+
if (op.handle.slot === null) {
|
|
15854
16006
|
throw new Error(`Expected slot to be assigned`);
|
|
15855
16007
|
}
|
|
15856
16008
|
if (op.emptyView !== null) {
|
|
15857
16009
|
const emptyView = unit.job.views.get(op.emptyView);
|
|
15858
|
-
addNamesToView(emptyView, `${baseName}_${
|
|
16010
|
+
addNamesToView(emptyView, `${baseName}_${`${op.functionNameSuffix}Empty`}_${op.handle.slot + 2}`, state, compatibility);
|
|
15859
16011
|
}
|
|
15860
|
-
|
|
15861
|
-
addNamesToView(unit.job.views.get(op.xref), `${baseName}${repeaterToken}_${op.slot + 1}`, state, compatibility);
|
|
16012
|
+
addNamesToView(unit.job.views.get(op.xref), `${baseName}_${op.functionNameSuffix}_${op.handle.slot + 1}`, state, compatibility);
|
|
15862
16013
|
break;
|
|
15863
16014
|
case OpKind.Template:
|
|
15864
16015
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
15865
16016
|
throw new Error(`AssertionError: must be compiling a component`);
|
|
15866
16017
|
}
|
|
15867
16018
|
const childView = unit.job.views.get(op.xref);
|
|
15868
|
-
if (op.slot === null) {
|
|
16019
|
+
if (op.handle.slot === null) {
|
|
15869
16020
|
throw new Error(`Expected slot to be assigned`);
|
|
15870
16021
|
}
|
|
15871
|
-
const
|
|
15872
|
-
addNamesToView(childView, `${baseName}${
|
|
16022
|
+
const suffix = op.functionNameSuffix.length === 0 ? "" : `_${op.functionNameSuffix}`;
|
|
16023
|
+
addNamesToView(childView, `${baseName}${suffix}_${op.handle.slot}`, state, compatibility);
|
|
15873
16024
|
break;
|
|
15874
16025
|
case OpKind.StyleProp:
|
|
15875
16026
|
op.name = normalizeStylePropName(op.name);
|
|
@@ -15923,8 +16074,8 @@ function stripImportant(name) {
|
|
|
15923
16074
|
return name;
|
|
15924
16075
|
}
|
|
15925
16076
|
|
|
15926
|
-
// bazel-out/
|
|
15927
|
-
function
|
|
16077
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16078
|
+
function mergeNextContextExpressions(job) {
|
|
15928
16079
|
for (const unit of job.units) {
|
|
15929
16080
|
for (const op of unit.create) {
|
|
15930
16081
|
if (op.kind === OpKind.Listener) {
|
|
@@ -15969,9 +16120,9 @@ function mergeNextContextsInOps(ops) {
|
|
|
15969
16120
|
}
|
|
15970
16121
|
}
|
|
15971
16122
|
|
|
15972
|
-
// bazel-out/
|
|
16123
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
15973
16124
|
var CONTAINER_TAG = "ng-container";
|
|
15974
|
-
function
|
|
16125
|
+
function generateNgContainerOps(job) {
|
|
15975
16126
|
for (const unit of job.units) {
|
|
15976
16127
|
const updatedElementXrefs = /* @__PURE__ */ new Set();
|
|
15977
16128
|
for (const op of unit.create) {
|
|
@@ -15986,7 +16137,7 @@ function phaseNgContainer(job) {
|
|
|
15986
16137
|
}
|
|
15987
16138
|
}
|
|
15988
16139
|
|
|
15989
|
-
// bazel-out/
|
|
16140
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
15990
16141
|
function lookupElement3(elements, xref) {
|
|
15991
16142
|
const el = elements.get(xref);
|
|
15992
16143
|
if (el === void 0) {
|
|
@@ -15994,7 +16145,7 @@ function lookupElement3(elements, xref) {
|
|
|
15994
16145
|
}
|
|
15995
16146
|
return el;
|
|
15996
16147
|
}
|
|
15997
|
-
function
|
|
16148
|
+
function disableBindings(job) {
|
|
15998
16149
|
const elements = /* @__PURE__ */ new Map();
|
|
15999
16150
|
for (const view of job.units) {
|
|
16000
16151
|
for (const op of view.create) {
|
|
@@ -16016,8 +16167,8 @@ function phaseNonbindable(job) {
|
|
|
16016
16167
|
}
|
|
16017
16168
|
}
|
|
16018
16169
|
|
|
16019
|
-
// bazel-out/
|
|
16020
|
-
function
|
|
16170
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16171
|
+
function generateNullishCoalesceExpressions(job) {
|
|
16021
16172
|
for (const unit of job.units) {
|
|
16022
16173
|
for (const op of unit.ops()) {
|
|
16023
16174
|
transformExpressionsInOp(op, (expr) => {
|
|
@@ -16032,7 +16183,7 @@ function phaseNullishCoalescing(job) {
|
|
|
16032
16183
|
}
|
|
16033
16184
|
}
|
|
16034
16185
|
|
|
16035
|
-
// bazel-out/
|
|
16186
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16036
16187
|
function kindTest(kind) {
|
|
16037
16188
|
return (op) => op.kind === kind;
|
|
16038
16189
|
}
|
|
@@ -16067,7 +16218,7 @@ var handledOpKinds = /* @__PURE__ */ new Set([
|
|
|
16067
16218
|
OpKind.HostProperty,
|
|
16068
16219
|
OpKind.Attribute
|
|
16069
16220
|
]);
|
|
16070
|
-
function
|
|
16221
|
+
function orderOps(job) {
|
|
16071
16222
|
for (const unit of job.units) {
|
|
16072
16223
|
orderWithin(unit.create, CREATE_ORDERING);
|
|
16073
16224
|
orderWithin(unit.update, UPDATE_ORDERING);
|
|
@@ -16106,9 +16257,9 @@ function keepLast(ops) {
|
|
|
16106
16257
|
return ops.slice(ops.length - 1);
|
|
16107
16258
|
}
|
|
16108
16259
|
|
|
16109
|
-
// bazel-out/
|
|
16110
|
-
function
|
|
16111
|
-
for (const unit of
|
|
16260
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16261
|
+
function parseExtractedStyles(job) {
|
|
16262
|
+
for (const unit of job.units) {
|
|
16112
16263
|
for (const op of unit.create) {
|
|
16113
16264
|
if (op.kind === OpKind.ExtractedAttribute && op.bindingKind === BindingKind.Attribute && isStringLiteral(op.expression)) {
|
|
16114
16265
|
if (op.name === "style") {
|
|
@@ -16129,8 +16280,8 @@ function phaseParseExtractedStyles(cpl) {
|
|
|
16129
16280
|
}
|
|
16130
16281
|
}
|
|
16131
16282
|
|
|
16132
|
-
// bazel-out/
|
|
16133
|
-
function
|
|
16283
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16284
|
+
function removeContentSelectors(job) {
|
|
16134
16285
|
for (const unit of job.units) {
|
|
16135
16286
|
const elements = createOpXrefMap(unit);
|
|
16136
16287
|
for (const op of unit.update) {
|
|
@@ -16153,8 +16304,8 @@ function lookupInXrefMap(map, xref) {
|
|
|
16153
16304
|
return el;
|
|
16154
16305
|
}
|
|
16155
16306
|
|
|
16156
|
-
// bazel-out/
|
|
16157
|
-
function
|
|
16307
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16308
|
+
function createPipes(job) {
|
|
16158
16309
|
for (const unit of job.units) {
|
|
16159
16310
|
processPipeBindingsInView(unit);
|
|
16160
16311
|
}
|
|
@@ -16171,13 +16322,14 @@ function processPipeBindingsInView(unit) {
|
|
|
16171
16322
|
if (flags & VisitorContextFlag.InChildOperation) {
|
|
16172
16323
|
throw new Error(`AssertionError: pipe bindings should not appear in child expressions`);
|
|
16173
16324
|
}
|
|
16174
|
-
if (!hasDependsOnSlotContextTrait(updateOp) && !hasUsesSlotIndexTrait(updateOp)) {
|
|
16175
|
-
throw new Error(`AssertionError: pipe binding associated with non-slot operation ${OpKind[updateOp.kind]}`);
|
|
16176
|
-
}
|
|
16177
16325
|
if (unit.job.compatibility) {
|
|
16326
|
+
const slotHandle = updateOp.target;
|
|
16327
|
+
if (slotHandle == void 0) {
|
|
16328
|
+
throw new Error(`AssertionError: expected slot handle to be assigned for pipe creation`);
|
|
16329
|
+
}
|
|
16178
16330
|
addPipeToCreationBlock(unit, updateOp.target, expr);
|
|
16179
16331
|
} else {
|
|
16180
|
-
unit.create.push(createPipeOp(expr.target, expr.name));
|
|
16332
|
+
unit.create.push(createPipeOp(expr.target, expr.targetSlot, expr.name));
|
|
16181
16333
|
}
|
|
16182
16334
|
});
|
|
16183
16335
|
}
|
|
@@ -16193,15 +16345,15 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16193
16345
|
while (op.next.kind === OpKind.Pipe) {
|
|
16194
16346
|
op = op.next;
|
|
16195
16347
|
}
|
|
16196
|
-
const pipe2 = createPipeOp(binding.target, binding.name);
|
|
16348
|
+
const pipe2 = createPipeOp(binding.target, binding.targetSlot, binding.name);
|
|
16197
16349
|
OpList.insertBefore(pipe2, op.next);
|
|
16198
16350
|
return;
|
|
16199
16351
|
}
|
|
16200
16352
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16201
16353
|
}
|
|
16202
16354
|
|
|
16203
|
-
// bazel-out/
|
|
16204
|
-
function
|
|
16355
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16356
|
+
function createVariadicPipes(job) {
|
|
16205
16357
|
for (const unit of job.units) {
|
|
16206
16358
|
for (const op of unit.update) {
|
|
16207
16359
|
transformExpressionsInOp(op, (expr) => {
|
|
@@ -16211,14 +16363,14 @@ function phasePipeVariadic(job) {
|
|
|
16211
16363
|
if (expr.args.length <= 4) {
|
|
16212
16364
|
return expr;
|
|
16213
16365
|
}
|
|
16214
|
-
return new PipeBindingVariadicExpr(expr.target, expr.name, literalArr(expr.args), expr.args.length);
|
|
16366
|
+
return new PipeBindingVariadicExpr(expr.target, expr.targetSlot, expr.name, literalArr(expr.args), expr.args.length);
|
|
16215
16367
|
}, VisitorContextFlag.None);
|
|
16216
16368
|
}
|
|
16217
16369
|
}
|
|
16218
16370
|
}
|
|
16219
16371
|
|
|
16220
|
-
// bazel-out/
|
|
16221
|
-
function
|
|
16372
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16373
|
+
function propagateI18nBlocks(job) {
|
|
16222
16374
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16223
16375
|
}
|
|
16224
16376
|
function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
@@ -16254,8 +16406,51 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16254
16406
|
}
|
|
16255
16407
|
}
|
|
16256
16408
|
|
|
16257
|
-
// bazel-out/
|
|
16258
|
-
function
|
|
16409
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_placeholders.mjs
|
|
16410
|
+
function propogateI18nPlaceholders(job) {
|
|
16411
|
+
const i18nOps = /* @__PURE__ */ new Map();
|
|
16412
|
+
const extractedMessageOps = /* @__PURE__ */ new Map();
|
|
16413
|
+
for (const unit of job.units) {
|
|
16414
|
+
for (const op of unit.create) {
|
|
16415
|
+
switch (op.kind) {
|
|
16416
|
+
case OpKind.I18nStart:
|
|
16417
|
+
i18nOps.set(op.xref, op);
|
|
16418
|
+
break;
|
|
16419
|
+
case OpKind.ExtractedMessage:
|
|
16420
|
+
extractedMessageOps.set(op.owner, op);
|
|
16421
|
+
break;
|
|
16422
|
+
}
|
|
16423
|
+
}
|
|
16424
|
+
}
|
|
16425
|
+
for (const [xref, childExtractedMessageOp] of extractedMessageOps) {
|
|
16426
|
+
if (!childExtractedMessageOp.isRoot) {
|
|
16427
|
+
const i18nOp = i18nOps.get(xref);
|
|
16428
|
+
if (i18nOp === void 0) {
|
|
16429
|
+
throw Error("Could not find owner i18n block for extracted message.");
|
|
16430
|
+
}
|
|
16431
|
+
const rootExtractedMessageOp = extractedMessageOps.get(i18nOp.root);
|
|
16432
|
+
if (rootExtractedMessageOp === void 0) {
|
|
16433
|
+
throw Error("Could not find extracted message op for root i18n block.");
|
|
16434
|
+
}
|
|
16435
|
+
mergeParams(rootExtractedMessageOp.params, childExtractedMessageOp.params);
|
|
16436
|
+
mergeParams(rootExtractedMessageOp.postprocessingParams, childExtractedMessageOp.postprocessingParams);
|
|
16437
|
+
}
|
|
16438
|
+
}
|
|
16439
|
+
}
|
|
16440
|
+
function mergeParams(to, from) {
|
|
16441
|
+
for (const [placeholder, fromValues] of from) {
|
|
16442
|
+
const toValues = to.get(placeholder) || [];
|
|
16443
|
+
const flags = fromValues[0].flags;
|
|
16444
|
+
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
16445
|
+
to.set(placeholder, [...fromValues, ...toValues]);
|
|
16446
|
+
} else {
|
|
16447
|
+
to.set(placeholder, [...toValues, ...fromValues]);
|
|
16448
|
+
}
|
|
16449
|
+
}
|
|
16450
|
+
}
|
|
16451
|
+
|
|
16452
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16453
|
+
function extractPureFunctions(job) {
|
|
16259
16454
|
for (const view of job.units) {
|
|
16260
16455
|
for (const op of view.ops()) {
|
|
16261
16456
|
visitExpressionsInOp(op, (expr) => {
|
|
@@ -16296,10 +16491,10 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16296
16491
|
}
|
|
16297
16492
|
};
|
|
16298
16493
|
|
|
16299
|
-
// bazel-out/
|
|
16300
|
-
function
|
|
16301
|
-
for (const
|
|
16302
|
-
for (const op of
|
|
16494
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16495
|
+
function generatePureLiteralStructures(job) {
|
|
16496
|
+
for (const unit of job.units) {
|
|
16497
|
+
for (const op of unit.update) {
|
|
16303
16498
|
transformExpressionsInOp(op, (expr, flags) => {
|
|
16304
16499
|
if (flags & VisitorContextFlag.InChildOperation) {
|
|
16305
16500
|
return expr;
|
|
@@ -16343,7 +16538,7 @@ function transformLiteralMap(expr) {
|
|
|
16343
16538
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16344
16539
|
}
|
|
16345
16540
|
|
|
16346
|
-
// bazel-out/
|
|
16541
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16347
16542
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16348
16543
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16349
16544
|
}
|
|
@@ -16387,7 +16582,7 @@ function template(slot, templateFnRef, decls, vars, tag, constIndex, sourceSpan)
|
|
|
16387
16582
|
}
|
|
16388
16583
|
return call(Identifiers.templateCreate, args, sourceSpan);
|
|
16389
16584
|
}
|
|
16390
|
-
function
|
|
16585
|
+
function disableBindings2() {
|
|
16391
16586
|
return call(Identifiers.disableBindings, [], null);
|
|
16392
16587
|
}
|
|
16393
16588
|
function enableBindings() {
|
|
@@ -16453,7 +16648,7 @@ function text(slot, initialValue, sourceSpan) {
|
|
|
16453
16648
|
}
|
|
16454
16649
|
return call(Identifiers.text, args, sourceSpan);
|
|
16455
16650
|
}
|
|
16456
|
-
function defer(selfSlot, primarySlot, dependencyResolverFn, loadingSlot, placeholderSlot, errorSlot,
|
|
16651
|
+
function defer(selfSlot, primarySlot, dependencyResolverFn, loadingSlot, placeholderSlot, errorSlot, loadingConfig, placeholderConfig, enableTimerScheduling, sourceSpan) {
|
|
16457
16652
|
const args = [
|
|
16458
16653
|
literal(selfSlot),
|
|
16459
16654
|
literal(primarySlot),
|
|
@@ -16461,16 +16656,40 @@ function defer(selfSlot, primarySlot, dependencyResolverFn, loadingSlot, placeho
|
|
|
16461
16656
|
literal(loadingSlot),
|
|
16462
16657
|
literal(placeholderSlot),
|
|
16463
16658
|
literal(errorSlot),
|
|
16464
|
-
literal(
|
|
16465
|
-
literal(
|
|
16659
|
+
loadingConfig != null ? loadingConfig : literal(null),
|
|
16660
|
+
placeholderConfig != null ? placeholderConfig : literal(null),
|
|
16661
|
+
enableTimerScheduling ? importExpr(Identifiers.deferEnableTimerScheduling) : literal(null)
|
|
16466
16662
|
];
|
|
16467
|
-
|
|
16663
|
+
let expr;
|
|
16664
|
+
while ((expr = args[args.length - 1]) !== null && expr instanceof LiteralExpr && expr.value === null) {
|
|
16468
16665
|
args.pop();
|
|
16469
16666
|
}
|
|
16470
16667
|
return call(Identifiers.defer, args, sourceSpan);
|
|
16471
16668
|
}
|
|
16472
|
-
|
|
16473
|
-
|
|
16669
|
+
var deferTriggerToR3TriggerInstructionsMap = /* @__PURE__ */ new Map([
|
|
16670
|
+
[DeferTriggerKind.Idle, [Identifiers.deferOnIdle, Identifiers.deferPrefetchOnIdle]],
|
|
16671
|
+
[
|
|
16672
|
+
DeferTriggerKind.Immediate,
|
|
16673
|
+
[Identifiers.deferOnImmediate, Identifiers.deferPrefetchOnImmediate]
|
|
16674
|
+
],
|
|
16675
|
+
[DeferTriggerKind.Timer, [Identifiers.deferOnTimer, Identifiers.deferPrefetchOnTimer]],
|
|
16676
|
+
[DeferTriggerKind.Hover, [Identifiers.deferOnHover, Identifiers.deferPrefetchOnHover]],
|
|
16677
|
+
[
|
|
16678
|
+
DeferTriggerKind.Interaction,
|
|
16679
|
+
[Identifiers.deferOnInteraction, Identifiers.deferPrefetchOnInteraction]
|
|
16680
|
+
],
|
|
16681
|
+
[
|
|
16682
|
+
DeferTriggerKind.Viewport,
|
|
16683
|
+
[Identifiers.deferOnViewport, Identifiers.deferPrefetchOnViewport]
|
|
16684
|
+
]
|
|
16685
|
+
]);
|
|
16686
|
+
function deferOn(trigger, args, prefetch, sourceSpan) {
|
|
16687
|
+
const instructions = deferTriggerToR3TriggerInstructionsMap.get(trigger);
|
|
16688
|
+
if (instructions === void 0) {
|
|
16689
|
+
throw new Error(`Unable to determine instruction for trigger ${trigger}`);
|
|
16690
|
+
}
|
|
16691
|
+
const instructionToCall = prefetch ? instructions[1] : instructions[0];
|
|
16692
|
+
return call(instructionToCall, args.map((a) => literal(a)), sourceSpan);
|
|
16474
16693
|
}
|
|
16475
16694
|
function projectionDef(def) {
|
|
16476
16695
|
return call(Identifiers.projectionDef, def ? [def] : [], null);
|
|
@@ -16492,20 +16711,20 @@ function i18nStart(slot, constIndex, subTemplateIndex) {
|
|
|
16492
16711
|
}
|
|
16493
16712
|
return call(Identifiers.i18nStart, args, null);
|
|
16494
16713
|
}
|
|
16495
|
-
function repeaterCreate(slot, viewFnName, decls, vars, trackByFn, trackByUsesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, sourceSpan) {
|
|
16496
|
-
|
|
16714
|
+
function repeaterCreate(slot, viewFnName, decls, vars, tag, constIndex, trackByFn, trackByUsesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, sourceSpan) {
|
|
16715
|
+
const args = [
|
|
16497
16716
|
literal(slot),
|
|
16498
16717
|
variable(viewFnName),
|
|
16499
16718
|
literal(decls),
|
|
16500
16719
|
literal(vars),
|
|
16720
|
+
literal(tag),
|
|
16721
|
+
literal(constIndex),
|
|
16501
16722
|
trackByFn
|
|
16502
16723
|
];
|
|
16503
16724
|
if (trackByUsesComponentInstance || emptyViewFnName !== null) {
|
|
16504
16725
|
args.push(literal(trackByUsesComponentInstance));
|
|
16505
16726
|
if (emptyViewFnName !== null) {
|
|
16506
|
-
args.push(variable(emptyViewFnName));
|
|
16507
|
-
args.push(literal(emptyDecls));
|
|
16508
|
-
args.push(literal(emptyVars));
|
|
16727
|
+
args.push(variable(emptyViewFnName), literal(emptyDecls), literal(emptyVars));
|
|
16509
16728
|
}
|
|
16510
16729
|
}
|
|
16511
16730
|
return call(Identifiers.repeaterCreate, args, sourceSpan);
|
|
@@ -16819,7 +17038,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
16819
17038
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
16820
17039
|
}
|
|
16821
17040
|
|
|
16822
|
-
// bazel-out/
|
|
17041
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
16823
17042
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
16824
17043
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
16825
17044
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -16828,62 +17047,62 @@ var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
|
16828
17047
|
[SanitizerFn.Style, Identifiers.sanitizeStyle],
|
|
16829
17048
|
[SanitizerFn.Url, Identifiers.sanitizeUrl]
|
|
16830
17049
|
]);
|
|
16831
|
-
function
|
|
16832
|
-
for (const unit of
|
|
17050
|
+
function reify(job) {
|
|
17051
|
+
for (const unit of job.units) {
|
|
16833
17052
|
reifyCreateOperations(unit, unit.create);
|
|
16834
17053
|
reifyUpdateOperations(unit, unit.update);
|
|
16835
17054
|
}
|
|
16836
17055
|
}
|
|
16837
17056
|
function reifyCreateOperations(unit, ops) {
|
|
16838
|
-
var _a2, _b2, _c2, _d2;
|
|
17057
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g;
|
|
16839
17058
|
for (const op of ops) {
|
|
16840
17059
|
transformExpressionsInOp(op, reifyIrExpression, VisitorContextFlag.None);
|
|
16841
17060
|
switch (op.kind) {
|
|
16842
17061
|
case OpKind.Text:
|
|
16843
|
-
OpList.replace(op, text(op.slot, op.initialValue, op.sourceSpan));
|
|
17062
|
+
OpList.replace(op, text(op.handle.slot, op.initialValue, op.sourceSpan));
|
|
16844
17063
|
break;
|
|
16845
17064
|
case OpKind.ElementStart:
|
|
16846
|
-
OpList.replace(op, elementStart(op.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));
|
|
17065
|
+
OpList.replace(op, elementStart(op.handle.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));
|
|
16847
17066
|
break;
|
|
16848
17067
|
case OpKind.Element:
|
|
16849
|
-
OpList.replace(op, element(op.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));
|
|
17068
|
+
OpList.replace(op, element(op.handle.slot, op.tag, op.attributes, op.localRefs, op.sourceSpan));
|
|
16850
17069
|
break;
|
|
16851
17070
|
case OpKind.ElementEnd:
|
|
16852
17071
|
OpList.replace(op, elementEnd(op.sourceSpan));
|
|
16853
17072
|
break;
|
|
16854
17073
|
case OpKind.ContainerStart:
|
|
16855
|
-
OpList.replace(op, elementContainerStart(op.slot, op.attributes, op.localRefs, op.sourceSpan));
|
|
17074
|
+
OpList.replace(op, elementContainerStart(op.handle.slot, op.attributes, op.localRefs, op.sourceSpan));
|
|
16856
17075
|
break;
|
|
16857
17076
|
case OpKind.Container:
|
|
16858
|
-
OpList.replace(op, elementContainer(op.slot, op.attributes, op.localRefs, op.sourceSpan));
|
|
17077
|
+
OpList.replace(op, elementContainer(op.handle.slot, op.attributes, op.localRefs, op.sourceSpan));
|
|
16859
17078
|
break;
|
|
16860
17079
|
case OpKind.ContainerEnd:
|
|
16861
17080
|
OpList.replace(op, elementContainerEnd());
|
|
16862
17081
|
break;
|
|
16863
17082
|
case OpKind.I18nStart:
|
|
16864
|
-
OpList.replace(op, i18nStart(op.slot, op.messageIndex, op.subTemplateIndex));
|
|
17083
|
+
OpList.replace(op, i18nStart(op.handle.slot, op.messageIndex, op.subTemplateIndex));
|
|
16865
17084
|
break;
|
|
16866
17085
|
case OpKind.I18nEnd:
|
|
16867
17086
|
OpList.replace(op, i18nEnd());
|
|
16868
17087
|
break;
|
|
16869
17088
|
case OpKind.I18n:
|
|
16870
|
-
OpList.replace(op, i18n(op.slot, op.messageIndex, op.subTemplateIndex));
|
|
17089
|
+
OpList.replace(op, i18n(op.handle.slot, op.messageIndex, op.subTemplateIndex));
|
|
16871
17090
|
break;
|
|
16872
17091
|
case OpKind.Template:
|
|
16873
17092
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
16874
17093
|
throw new Error(`AssertionError: must be compiling a component`);
|
|
16875
17094
|
}
|
|
16876
17095
|
const childView = unit.job.views.get(op.xref);
|
|
16877
|
-
OpList.replace(op, template(op.slot, variable(childView.fnName), childView.decls, childView.vars, op.
|
|
17096
|
+
OpList.replace(op, template(op.handle.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes, op.sourceSpan));
|
|
16878
17097
|
break;
|
|
16879
17098
|
case OpKind.DisableBindings:
|
|
16880
|
-
OpList.replace(op,
|
|
17099
|
+
OpList.replace(op, disableBindings2());
|
|
16881
17100
|
break;
|
|
16882
17101
|
case OpKind.EnableBindings:
|
|
16883
17102
|
OpList.replace(op, enableBindings());
|
|
16884
17103
|
break;
|
|
16885
17104
|
case OpKind.Pipe:
|
|
16886
|
-
OpList.replace(op, pipe(op.slot, op.name));
|
|
17105
|
+
OpList.replace(op, pipe(op.handle.slot, op.name));
|
|
16887
17106
|
break;
|
|
16888
17107
|
case OpKind.Listener:
|
|
16889
17108
|
const listenerFn = reifyListenerHandler(unit, op.handlerFnName, op.handlerOps, op.consumesDollarEvent);
|
|
@@ -16910,25 +17129,45 @@ function reifyCreateOperations(unit, ops) {
|
|
|
16910
17129
|
}
|
|
16911
17130
|
break;
|
|
16912
17131
|
case OpKind.Defer:
|
|
16913
|
-
|
|
16914
|
-
|
|
16915
|
-
case OpKind.DeferSecondaryBlock:
|
|
16916
|
-
OpList.remove(op);
|
|
17132
|
+
const timerScheduling = !!op.loadingMinimumTime || !!op.loadingAfterTime || !!op.placeholderMinimumTime;
|
|
17133
|
+
OpList.replace(op, defer(op.handle.slot, op.mainSlot.slot, null, (_b2 = (_a2 = op.loadingSlot) == null ? void 0 : _a2.slot) != null ? _b2 : null, (_d2 = (_c2 = op.placeholderSlot) == null ? void 0 : _c2.slot) != null ? _d2 : null, (_f2 = (_e2 = op.errorSlot) == null ? void 0 : _e2.slot) != null ? _f2 : null, op.loadingConfig, op.placeholderConfig, timerScheduling, op.sourceSpan));
|
|
16917
17134
|
break;
|
|
16918
17135
|
case OpKind.DeferOn:
|
|
16919
|
-
|
|
17136
|
+
let args = [];
|
|
17137
|
+
switch (op.trigger.kind) {
|
|
17138
|
+
case DeferTriggerKind.Idle:
|
|
17139
|
+
case DeferTriggerKind.Immediate:
|
|
17140
|
+
break;
|
|
17141
|
+
case DeferTriggerKind.Timer:
|
|
17142
|
+
args = [op.trigger.delay];
|
|
17143
|
+
break;
|
|
17144
|
+
case DeferTriggerKind.Interaction:
|
|
17145
|
+
case DeferTriggerKind.Hover:
|
|
17146
|
+
case DeferTriggerKind.Viewport:
|
|
17147
|
+
if (((_g = op.trigger.targetSlot) == null ? void 0 : _g.slot) == null || op.trigger.targetSlotViewSteps === null) {
|
|
17148
|
+
throw new Error(`Slot or view steps not set in trigger reification for trigger kind ${op.trigger.kind}`);
|
|
17149
|
+
}
|
|
17150
|
+
args = [op.trigger.targetSlot.slot];
|
|
17151
|
+
if (op.trigger.targetSlotViewSteps !== 0) {
|
|
17152
|
+
args.push(op.trigger.targetSlotViewSteps);
|
|
17153
|
+
}
|
|
17154
|
+
break;
|
|
17155
|
+
default:
|
|
17156
|
+
throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${op.trigger.kind}`);
|
|
17157
|
+
}
|
|
17158
|
+
OpList.replace(op, deferOn(op.trigger.kind, args, op.prefetch, op.sourceSpan));
|
|
16920
17159
|
break;
|
|
16921
17160
|
case OpKind.ProjectionDef:
|
|
16922
17161
|
OpList.replace(op, projectionDef(op.def));
|
|
16923
17162
|
break;
|
|
16924
17163
|
case OpKind.Projection:
|
|
16925
|
-
if (op.slot === null) {
|
|
17164
|
+
if (op.handle.slot === null) {
|
|
16926
17165
|
throw new Error("No slot was assigned for project instruction");
|
|
16927
17166
|
}
|
|
16928
|
-
OpList.replace(op, projection(op.slot, op.projectionSlotIndex, op.attributes, op.sourceSpan));
|
|
17167
|
+
OpList.replace(op, projection(op.handle.slot, op.projectionSlotIndex, op.attributes, op.sourceSpan));
|
|
16929
17168
|
break;
|
|
16930
17169
|
case OpKind.RepeaterCreate:
|
|
16931
|
-
if (op.slot === null) {
|
|
17170
|
+
if (op.handle.slot === null) {
|
|
16932
17171
|
throw new Error("No slot was assigned for repeater instruction");
|
|
16933
17172
|
}
|
|
16934
17173
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
@@ -16953,7 +17192,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
16953
17192
|
emptyDecls = emptyView.decls;
|
|
16954
17193
|
emptyVars = emptyView.vars;
|
|
16955
17194
|
}
|
|
16956
|
-
OpList.replace(op, repeaterCreate(op.slot, repeaterView.fnName, op.decls, op.vars, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.sourceSpan));
|
|
17195
|
+
OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.sourceSpan));
|
|
16957
17196
|
break;
|
|
16958
17197
|
case OpKind.Statement:
|
|
16959
17198
|
break;
|
|
@@ -17004,7 +17243,7 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17004
17243
|
OpList.replace(op, i18nExp(op.expression, op.sourceSpan));
|
|
17005
17244
|
break;
|
|
17006
17245
|
case OpKind.I18nApply:
|
|
17007
|
-
OpList.replace(op, i18nApply(op.targetSlot, op.sourceSpan));
|
|
17246
|
+
OpList.replace(op, i18nApply(op.targetSlot.slot, op.sourceSpan));
|
|
17008
17247
|
break;
|
|
17009
17248
|
case OpKind.InterpolateText:
|
|
17010
17249
|
OpList.replace(op, textInterpolate(op.interpolation.strings, op.interpolation.expressions, op.sourceSpan));
|
|
@@ -17037,13 +17276,13 @@ function reifyUpdateOperations(_unit, ops) {
|
|
|
17037
17276
|
if (op.processed === null) {
|
|
17038
17277
|
throw new Error(`Conditional test was not set.`);
|
|
17039
17278
|
}
|
|
17040
|
-
if (op.targetSlot === null) {
|
|
17279
|
+
if (op.targetSlot.slot === null) {
|
|
17041
17280
|
throw new Error(`Conditional slot was not set.`);
|
|
17042
17281
|
}
|
|
17043
|
-
OpList.replace(op, conditional(op.targetSlot, op.processed, op.contextValue, op.sourceSpan));
|
|
17282
|
+
OpList.replace(op, conditional(op.targetSlot.slot, op.processed, op.contextValue, op.sourceSpan));
|
|
17044
17283
|
break;
|
|
17045
17284
|
case OpKind.Repeater:
|
|
17046
|
-
OpList.replace(op, repeater(op.targetSlot, op.collection, op.sourceSpan));
|
|
17285
|
+
OpList.replace(op, repeater(op.targetSlot.slot, op.collection, op.sourceSpan));
|
|
17047
17286
|
break;
|
|
17048
17287
|
case OpKind.Statement:
|
|
17049
17288
|
break;
|
|
@@ -17060,7 +17299,7 @@ function reifyIrExpression(expr) {
|
|
|
17060
17299
|
case ExpressionKind.NextContext:
|
|
17061
17300
|
return nextContext(expr.steps);
|
|
17062
17301
|
case ExpressionKind.Reference:
|
|
17063
|
-
return reference(expr.targetSlot + 1 + expr.offset);
|
|
17302
|
+
return reference(expr.targetSlot.slot + 1 + expr.offset);
|
|
17064
17303
|
case ExpressionKind.LexicalRead:
|
|
17065
17304
|
throw new Error(`AssertionError: unresolved LexicalRead of ${expr.name}`);
|
|
17066
17305
|
case ExpressionKind.RestoreView:
|
|
@@ -17095,13 +17334,13 @@ function reifyIrExpression(expr) {
|
|
|
17095
17334
|
case ExpressionKind.PureFunctionParameterExpr:
|
|
17096
17335
|
throw new Error(`AssertionError: expected PureFunctionParameterExpr to have been extracted`);
|
|
17097
17336
|
case ExpressionKind.PipeBinding:
|
|
17098
|
-
return pipeBind(expr.targetSlot, expr.varOffset, expr.args);
|
|
17337
|
+
return pipeBind(expr.targetSlot.slot, expr.varOffset, expr.args);
|
|
17099
17338
|
case ExpressionKind.PipeBindingVariadic:
|
|
17100
|
-
return pipeBindV(expr.targetSlot, expr.varOffset, expr.args);
|
|
17339
|
+
return pipeBindV(expr.targetSlot.slot, expr.varOffset, expr.args);
|
|
17101
17340
|
case ExpressionKind.SanitizerExpr:
|
|
17102
17341
|
return importExpr(sanitizerIdentifierMap.get(expr.fn));
|
|
17103
17342
|
case ExpressionKind.SlotLiteralExpr:
|
|
17104
|
-
return literal(expr.
|
|
17343
|
+
return literal(expr.slot.slot);
|
|
17105
17344
|
default:
|
|
17106
17345
|
throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${ExpressionKind[expr.kind]}`);
|
|
17107
17346
|
}
|
|
@@ -17122,8 +17361,8 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17122
17361
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17123
17362
|
}
|
|
17124
17363
|
|
|
17125
|
-
// bazel-out/
|
|
17126
|
-
function
|
|
17364
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17365
|
+
function removeEmptyBindings(job) {
|
|
17127
17366
|
for (const unit of job.units) {
|
|
17128
17367
|
for (const op of unit.update) {
|
|
17129
17368
|
switch (op.kind) {
|
|
@@ -17143,9 +17382,41 @@ function phaseRemoveEmptyBindings(job) {
|
|
|
17143
17382
|
}
|
|
17144
17383
|
}
|
|
17145
17384
|
|
|
17146
|
-
// bazel-out/
|
|
17147
|
-
function
|
|
17148
|
-
|
|
17385
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17386
|
+
function generateRepeaterDerivedVars(job) {
|
|
17387
|
+
const repeaters = /* @__PURE__ */ new Map();
|
|
17388
|
+
for (const unit of job.units) {
|
|
17389
|
+
for (const op of unit.ops()) {
|
|
17390
|
+
if (op.kind === OpKind.RepeaterCreate) {
|
|
17391
|
+
repeaters.set(op.xref, op);
|
|
17392
|
+
}
|
|
17393
|
+
}
|
|
17394
|
+
}
|
|
17395
|
+
for (const unit of job.units) {
|
|
17396
|
+
for (const op of unit.ops()) {
|
|
17397
|
+
transformExpressionsInOp(op, (expr) => {
|
|
17398
|
+
if (!(expr instanceof DerivedRepeaterVarExpr)) {
|
|
17399
|
+
return expr;
|
|
17400
|
+
}
|
|
17401
|
+
const repeaterOp = repeaters.get(expr.xref);
|
|
17402
|
+
switch (expr.identity) {
|
|
17403
|
+
case DerivedRepeaterVarIdentity.First:
|
|
17404
|
+
return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), literal(0));
|
|
17405
|
+
case DerivedRepeaterVarIdentity.Last:
|
|
17406
|
+
return new BinaryOperatorExpr(BinaryOperator.Identical, new LexicalReadExpr(repeaterOp.varNames.$index), new BinaryOperatorExpr(BinaryOperator.Minus, new LexicalReadExpr(repeaterOp.varNames.$count), literal(1)));
|
|
17407
|
+
case DerivedRepeaterVarIdentity.Even:
|
|
17408
|
+
return new BinaryOperatorExpr(BinaryOperator.Identical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
|
|
17409
|
+
case DerivedRepeaterVarIdentity.Odd:
|
|
17410
|
+
return new BinaryOperatorExpr(BinaryOperator.NotIdentical, new BinaryOperatorExpr(BinaryOperator.Modulo, new LexicalReadExpr(repeaterOp.varNames.$index), literal(2)), literal(0));
|
|
17411
|
+
}
|
|
17412
|
+
}, VisitorContextFlag.None);
|
|
17413
|
+
}
|
|
17414
|
+
}
|
|
17415
|
+
}
|
|
17416
|
+
|
|
17417
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17418
|
+
function resolveContexts(job) {
|
|
17419
|
+
for (const unit of job.units) {
|
|
17149
17420
|
processLexicalScope(unit, unit.create);
|
|
17150
17421
|
processLexicalScope(unit, unit.update);
|
|
17151
17422
|
}
|
|
@@ -17184,14 +17455,14 @@ function processLexicalScope(view, ops) {
|
|
|
17184
17455
|
}
|
|
17185
17456
|
}
|
|
17186
17457
|
|
|
17187
|
-
// bazel-out/
|
|
17188
|
-
function
|
|
17458
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17459
|
+
function resolveDollarEvent(job) {
|
|
17189
17460
|
for (const unit of job.units) {
|
|
17190
|
-
|
|
17191
|
-
|
|
17461
|
+
transformDollarEvent(unit, unit.create);
|
|
17462
|
+
transformDollarEvent(unit, unit.update);
|
|
17192
17463
|
}
|
|
17193
17464
|
}
|
|
17194
|
-
function
|
|
17465
|
+
function transformDollarEvent(unit, ops) {
|
|
17195
17466
|
for (const op of ops) {
|
|
17196
17467
|
if (op.kind === OpKind.Listener) {
|
|
17197
17468
|
transformExpressionsInOp(op, (expr) => {
|
|
@@ -17205,195 +17476,135 @@ function resolveDollarEvent(unit, ops) {
|
|
|
17205
17476
|
}
|
|
17206
17477
|
}
|
|
17207
17478
|
|
|
17208
|
-
// bazel-out/
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
|
|
17212
|
-
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
|
|
17216
|
-
|
|
17217
|
-
|
|
17218
|
-
|
|
17219
|
-
|
|
17220
|
-
|
|
17221
|
-
I18nParamValueFlags2[I18nParamValueFlags2["TemplateTag"] = 2] = "TemplateTag";
|
|
17222
|
-
I18nParamValueFlags2[I18nParamValueFlags2["OpenTag"] = 4] = "OpenTag";
|
|
17223
|
-
I18nParamValueFlags2[I18nParamValueFlags2["CloseTag"] = 8] = "CloseTag";
|
|
17224
|
-
})(I18nParamValueFlags || (I18nParamValueFlags = {}));
|
|
17225
|
-
var I18nPlaceholderParams = class {
|
|
17226
|
-
constructor() {
|
|
17227
|
-
this.values = /* @__PURE__ */ new Map();
|
|
17228
|
-
}
|
|
17229
|
-
addValue(placeholder, value, subTemplateIndex, resolutionTime, flags) {
|
|
17230
|
-
var _a2;
|
|
17231
|
-
const placeholderValues = (_a2 = this.values.get(placeholder)) != null ? _a2 : [];
|
|
17232
|
-
placeholderValues.push({ value, subTemplateIndex, resolutionTime, flags });
|
|
17233
|
-
this.values.set(placeholder, placeholderValues);
|
|
17234
|
-
}
|
|
17235
|
-
saveToOp(op) {
|
|
17236
|
-
for (const [placeholder, placeholderValues] of this.values) {
|
|
17237
|
-
const creationValues = placeholderValues.filter(({ resolutionTime }) => resolutionTime === I18nParamResolutionTime.Creation);
|
|
17238
|
-
if (creationValues.length > 1) {
|
|
17239
|
-
op.needsPostprocessing = true;
|
|
17240
|
-
}
|
|
17241
|
-
const serializedCreationValues = this.serializeValues(creationValues);
|
|
17242
|
-
if (serializedCreationValues !== null) {
|
|
17243
|
-
op.params.set(placeholder, literal(serializedCreationValues));
|
|
17244
|
-
}
|
|
17245
|
-
const serializedPostprocessingValues = this.serializeValues(placeholderValues.filter(({ resolutionTime }) => resolutionTime === I18nParamResolutionTime.Postproccessing));
|
|
17246
|
-
if (serializedPostprocessingValues !== null) {
|
|
17247
|
-
op.needsPostprocessing = true;
|
|
17248
|
-
op.postprocessingParams.set(placeholder, literal(serializedPostprocessingValues));
|
|
17249
|
-
}
|
|
17250
|
-
}
|
|
17251
|
-
}
|
|
17252
|
-
merge(other) {
|
|
17253
|
-
for (const [placeholder, otherValues] of other.values) {
|
|
17254
|
-
const currentValues = this.values.get(placeholder) || [];
|
|
17255
|
-
const flags = otherValues[0].flags;
|
|
17256
|
-
if (flags & I18nParamValueFlags.CloseTag && !(flags & I18nParamValueFlags.OpenTag)) {
|
|
17257
|
-
this.values.set(placeholder, [...otherValues, ...currentValues]);
|
|
17258
|
-
} else {
|
|
17259
|
-
this.values.set(placeholder, [...currentValues, ...otherValues]);
|
|
17260
|
-
}
|
|
17261
|
-
}
|
|
17262
|
-
}
|
|
17263
|
-
serializeValues(values) {
|
|
17264
|
-
if (values.length === 0) {
|
|
17265
|
-
return null;
|
|
17266
|
-
}
|
|
17267
|
-
const serializedValues = values.map((value) => this.serializeValue(value));
|
|
17268
|
-
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;
|
|
17269
|
-
}
|
|
17270
|
-
serializeValue(value) {
|
|
17271
|
-
let tagMarker = "";
|
|
17272
|
-
let closeMarker = "";
|
|
17273
|
-
if (value.flags & I18nParamValueFlags.ElementTag) {
|
|
17274
|
-
tagMarker = ELEMENT_MARKER;
|
|
17275
|
-
} else if (value.flags & I18nParamValueFlags.TemplateTag) {
|
|
17276
|
-
tagMarker = TEMPLATE_MARKER;
|
|
17277
|
-
}
|
|
17278
|
-
if (tagMarker !== "") {
|
|
17279
|
-
closeMarker = value.flags & I18nParamValueFlags.CloseTag ? TAG_CLOSE_MARKER : "";
|
|
17280
|
-
}
|
|
17281
|
-
const context = value.subTemplateIndex === null ? "" : `${CONTEXT_MARKER}${value.subTemplateIndex}`;
|
|
17282
|
-
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
17283
|
-
return `${ESCAPE}${tagMarker}${value.value}${context}${ESCAPE}${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
17284
|
-
}
|
|
17285
|
-
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
17286
|
-
}
|
|
17287
|
-
};
|
|
17288
|
-
function phaseResolveI18nPlaceholders(job) {
|
|
17289
|
-
const params = /* @__PURE__ */ new Map();
|
|
17290
|
-
const i18nOps = /* @__PURE__ */ new Map();
|
|
17291
|
-
resolvePlaceholders(job, params, i18nOps);
|
|
17292
|
-
propagatePlaceholders(params, i18nOps);
|
|
17293
|
-
for (const [xref, i18nOpParams] of params) {
|
|
17294
|
-
i18nOpParams.saveToOp(i18nOps.get(xref));
|
|
17295
|
-
}
|
|
17296
|
-
for (const op of i18nOps.values()) {
|
|
17297
|
-
if (op.xref === op.root) {
|
|
17298
|
-
for (const placeholder in op.message.placeholders) {
|
|
17299
|
-
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
17300
|
-
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
17301
|
-
}
|
|
17479
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17480
|
+
function resolveI18nElementPlaceholders(job) {
|
|
17481
|
+
const extractedMessageOps = /* @__PURE__ */ new Map();
|
|
17482
|
+
const elements = /* @__PURE__ */ new Map();
|
|
17483
|
+
for (const unit of job.units) {
|
|
17484
|
+
for (const op of unit.create) {
|
|
17485
|
+
switch (op.kind) {
|
|
17486
|
+
case OpKind.ExtractedMessage:
|
|
17487
|
+
extractedMessageOps.set(op.owner, op);
|
|
17488
|
+
break;
|
|
17489
|
+
case OpKind.ElementStart:
|
|
17490
|
+
elements.set(op.xref, op);
|
|
17491
|
+
break;
|
|
17302
17492
|
}
|
|
17303
17493
|
}
|
|
17304
17494
|
}
|
|
17305
|
-
}
|
|
17306
|
-
function resolvePlaceholders(job, params, i18nOps) {
|
|
17307
17495
|
for (const unit of job.units) {
|
|
17308
|
-
|
|
17309
|
-
let currentI18nOp = null;
|
|
17496
|
+
let currentOps = null;
|
|
17310
17497
|
for (const op of unit.create) {
|
|
17311
17498
|
switch (op.kind) {
|
|
17312
17499
|
case OpKind.I18nStart:
|
|
17313
|
-
|
|
17314
|
-
|
|
17500
|
+
if (!extractedMessageOps.has(op.xref)) {
|
|
17501
|
+
throw Error("Could not find extracted message for i18n op");
|
|
17502
|
+
}
|
|
17503
|
+
currentOps = { i18n: op, extractedMessage: extractedMessageOps.get(op.xref) };
|
|
17315
17504
|
break;
|
|
17316
17505
|
case OpKind.I18nEnd:
|
|
17317
|
-
|
|
17506
|
+
currentOps = null;
|
|
17318
17507
|
break;
|
|
17319
17508
|
case OpKind.ElementStart:
|
|
17320
17509
|
if (op.i18nPlaceholder !== void 0) {
|
|
17321
|
-
if (
|
|
17510
|
+
if (currentOps === null) {
|
|
17322
17511
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17323
17512
|
}
|
|
17324
|
-
elements.set(op.xref, op);
|
|
17325
17513
|
const { startName, closeName } = op.i18nPlaceholder;
|
|
17326
17514
|
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
17327
17515
|
if (closeName === "") {
|
|
17328
17516
|
flags |= I18nParamValueFlags.CloseTag;
|
|
17329
17517
|
}
|
|
17330
|
-
addParam(params,
|
|
17518
|
+
addParam(currentOps.extractedMessage.params, startName, op.handle.slot, currentOps.i18n.subTemplateIndex, flags);
|
|
17331
17519
|
}
|
|
17332
17520
|
break;
|
|
17333
17521
|
case OpKind.ElementEnd:
|
|
17334
17522
|
const startOp = elements.get(op.xref);
|
|
17335
17523
|
if (startOp && startOp.i18nPlaceholder !== void 0) {
|
|
17336
|
-
if (
|
|
17524
|
+
if (currentOps === null) {
|
|
17337
17525
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17338
17526
|
}
|
|
17339
17527
|
const { closeName } = startOp.i18nPlaceholder;
|
|
17340
17528
|
if (closeName !== "") {
|
|
17341
|
-
addParam(params,
|
|
17529
|
+
addParam(currentOps.extractedMessage.params, closeName, startOp.handle.slot, currentOps.i18n.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
17342
17530
|
}
|
|
17343
17531
|
}
|
|
17344
17532
|
break;
|
|
17345
17533
|
case OpKind.Template:
|
|
17346
17534
|
if (op.i18nPlaceholder !== void 0) {
|
|
17347
|
-
if (
|
|
17535
|
+
if (currentOps === null) {
|
|
17348
17536
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17349
17537
|
}
|
|
17350
|
-
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job,
|
|
17351
|
-
addParam(params,
|
|
17352
|
-
addParam(params,
|
|
17538
|
+
const subTemplateIndex = getSubTemplateIndexForTemplateTag(job, currentOps.i18n, op);
|
|
17539
|
+
addParam(currentOps.extractedMessage.params, op.i18nPlaceholder.startName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag);
|
|
17540
|
+
addParam(currentOps.extractedMessage.params, op.i18nPlaceholder.closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17353
17541
|
}
|
|
17354
17542
|
break;
|
|
17355
17543
|
}
|
|
17356
17544
|
}
|
|
17357
|
-
|
|
17545
|
+
}
|
|
17546
|
+
}
|
|
17547
|
+
function getSubTemplateIndexForTemplateTag(job, i18nOp, op) {
|
|
17548
|
+
for (const childOp of job.views.get(op.xref).create) {
|
|
17549
|
+
if (childOp.kind === OpKind.I18nStart) {
|
|
17550
|
+
return childOp.subTemplateIndex;
|
|
17551
|
+
}
|
|
17552
|
+
}
|
|
17553
|
+
return i18nOp.subTemplateIndex;
|
|
17554
|
+
}
|
|
17555
|
+
function addParam(params, placeholder, value, subTemplateIndex, flags = I18nParamValueFlags.None) {
|
|
17556
|
+
var _a2;
|
|
17557
|
+
const values = (_a2 = params.get(placeholder)) != null ? _a2 : [];
|
|
17558
|
+
values.push({ value, subTemplateIndex, flags });
|
|
17559
|
+
params.set(placeholder, values);
|
|
17560
|
+
}
|
|
17561
|
+
|
|
17562
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17563
|
+
function resolveI18nExpressionPlaceholders(job) {
|
|
17564
|
+
const i18nOps = /* @__PURE__ */ new Map();
|
|
17565
|
+
const extractedMessageOps = /* @__PURE__ */ new Map();
|
|
17566
|
+
for (const unit of job.units) {
|
|
17567
|
+
for (const op of unit.create) {
|
|
17568
|
+
switch (op.kind) {
|
|
17569
|
+
case OpKind.I18nStart:
|
|
17570
|
+
i18nOps.set(op.xref, op);
|
|
17571
|
+
break;
|
|
17572
|
+
case OpKind.ExtractedMessage:
|
|
17573
|
+
extractedMessageOps.set(op.owner, op);
|
|
17574
|
+
break;
|
|
17575
|
+
}
|
|
17576
|
+
}
|
|
17577
|
+
}
|
|
17578
|
+
const expressionIndices = /* @__PURE__ */ new Map();
|
|
17579
|
+
for (const unit of job.units) {
|
|
17358
17580
|
for (const op of unit.update) {
|
|
17359
17581
|
if (op.kind === OpKind.I18nExpression) {
|
|
17360
17582
|
const i18nOp = i18nOps.get(op.owner);
|
|
17361
|
-
let index =
|
|
17583
|
+
let index = expressionIndices.get(op.owner) || 0;
|
|
17362
17584
|
if (!i18nOp) {
|
|
17363
|
-
throw Error("Cannot find corresponding
|
|
17585
|
+
throw Error("Cannot find corresponding i18n block for i18nExpr");
|
|
17586
|
+
}
|
|
17587
|
+
const extractedMessageOp = extractedMessageOps.get(i18nOp.xref);
|
|
17588
|
+
if (!extractedMessageOp) {
|
|
17589
|
+
throw Error("Cannot find extracted message for i18n block");
|
|
17364
17590
|
}
|
|
17365
|
-
|
|
17366
|
-
|
|
17591
|
+
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? extractedMessageOp.params : extractedMessageOp.postprocessingParams;
|
|
17592
|
+
const values = params.get(op.i18nPlaceholder) || [];
|
|
17593
|
+
values.push({
|
|
17594
|
+
value: index,
|
|
17595
|
+
subTemplateIndex: i18nOp.subTemplateIndex,
|
|
17596
|
+
flags: I18nParamValueFlags.None
|
|
17597
|
+
});
|
|
17598
|
+
params.set(op.i18nPlaceholder, values);
|
|
17599
|
+
expressionIndices.set(op.owner, index + 1);
|
|
17367
17600
|
}
|
|
17368
17601
|
}
|
|
17369
17602
|
}
|
|
17370
17603
|
}
|
|
17371
|
-
function addParam(params, i18nOp, placeholder, value, subTemplateIndex, resolutionTime, flags = I18nParamValueFlags.None) {
|
|
17372
|
-
const i18nOpParams = params.get(i18nOp.xref) || new I18nPlaceholderParams();
|
|
17373
|
-
i18nOpParams.addValue(placeholder, value, subTemplateIndex, resolutionTime, flags);
|
|
17374
|
-
params.set(i18nOp.xref, i18nOpParams);
|
|
17375
|
-
}
|
|
17376
|
-
function getSubTemplateIndexForTemplateTag(job, i18nOp, op) {
|
|
17377
|
-
for (const childOp of job.views.get(op.xref).create) {
|
|
17378
|
-
if (childOp.kind === OpKind.I18nStart) {
|
|
17379
|
-
return childOp.subTemplateIndex;
|
|
17380
|
-
}
|
|
17381
|
-
}
|
|
17382
|
-
return i18nOp.subTemplateIndex;
|
|
17383
|
-
}
|
|
17384
|
-
function propagatePlaceholders(params, i18nOps) {
|
|
17385
|
-
for (const [xref, opParams] of params) {
|
|
17386
|
-
const op = i18nOps.get(xref);
|
|
17387
|
-
if (op.xref !== op.root) {
|
|
17388
|
-
const rootParams = params.get(op.root) || new I18nPlaceholderParams();
|
|
17389
|
-
rootParams.merge(opParams);
|
|
17390
|
-
}
|
|
17391
|
-
}
|
|
17392
|
-
}
|
|
17393
17604
|
|
|
17394
|
-
// bazel-out/
|
|
17395
|
-
function
|
|
17396
|
-
for (const unit of
|
|
17605
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17606
|
+
function resolveNames(job) {
|
|
17607
|
+
for (const unit of job.units) {
|
|
17397
17608
|
processLexicalScope2(unit, unit.create, null);
|
|
17398
17609
|
processLexicalScope2(unit, unit.update, null);
|
|
17399
17610
|
}
|
|
@@ -17455,7 +17666,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
17455
17666
|
}
|
|
17456
17667
|
}
|
|
17457
17668
|
|
|
17458
|
-
// bazel-out/
|
|
17669
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
17459
17670
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
17460
17671
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
17461
17672
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -17463,7 +17674,7 @@ var sanitizers = /* @__PURE__ */ new Map([
|
|
|
17463
17674
|
[SecurityContext.URL, SanitizerFn.Url],
|
|
17464
17675
|
[SecurityContext.RESOURCE_URL, SanitizerFn.ResourceUrl]
|
|
17465
17676
|
]);
|
|
17466
|
-
function
|
|
17677
|
+
function resolveSanitizers(job) {
|
|
17467
17678
|
for (const unit of job.units) {
|
|
17468
17679
|
const elements = createOpXrefMap(unit);
|
|
17469
17680
|
let sanitizerFn;
|
|
@@ -17492,21 +17703,21 @@ function isIframeElement(op) {
|
|
|
17492
17703
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
17493
17704
|
}
|
|
17494
17705
|
|
|
17495
|
-
// bazel-out/
|
|
17496
|
-
function
|
|
17497
|
-
for (const
|
|
17498
|
-
|
|
17499
|
-
createVariableOp(
|
|
17706
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
17707
|
+
function saveAndRestoreView(job) {
|
|
17708
|
+
for (const unit of job.units) {
|
|
17709
|
+
unit.create.prepend([
|
|
17710
|
+
createVariableOp(unit.job.allocateXrefId(), {
|
|
17500
17711
|
kind: SemanticVariableKind.SavedView,
|
|
17501
17712
|
name: null,
|
|
17502
|
-
view:
|
|
17713
|
+
view: unit.xref
|
|
17503
17714
|
}, new GetCurrentViewExpr(), VariableFlags.None)
|
|
17504
17715
|
]);
|
|
17505
|
-
for (const op of
|
|
17716
|
+
for (const op of unit.create) {
|
|
17506
17717
|
if (op.kind !== OpKind.Listener) {
|
|
17507
17718
|
continue;
|
|
17508
17719
|
}
|
|
17509
|
-
let needsRestoreView =
|
|
17720
|
+
let needsRestoreView = unit !== job.root;
|
|
17510
17721
|
if (!needsRestoreView) {
|
|
17511
17722
|
for (const handlerOp of op.handlerOps) {
|
|
17512
17723
|
visitExpressionsInOp(handlerOp, (expr) => {
|
|
@@ -17517,7 +17728,7 @@ function phaseSaveRestoreView(job) {
|
|
|
17517
17728
|
}
|
|
17518
17729
|
}
|
|
17519
17730
|
if (needsRestoreView) {
|
|
17520
|
-
addSaveRestoreViewOperationToListener(
|
|
17731
|
+
addSaveRestoreViewOperationToListener(unit, op);
|
|
17521
17732
|
}
|
|
17522
17733
|
}
|
|
17523
17734
|
}
|
|
@@ -17537,8 +17748,8 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
17537
17748
|
}
|
|
17538
17749
|
}
|
|
17539
17750
|
|
|
17540
|
-
// bazel-out/
|
|
17541
|
-
function
|
|
17751
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
17752
|
+
function allocateSlots(job) {
|
|
17542
17753
|
const slotMap = /* @__PURE__ */ new Map();
|
|
17543
17754
|
for (const unit of job.units) {
|
|
17544
17755
|
let slotCount = 0;
|
|
@@ -17546,8 +17757,8 @@ function phaseSlotAllocation(job) {
|
|
|
17546
17757
|
if (!hasConsumesSlotTrait(op)) {
|
|
17547
17758
|
continue;
|
|
17548
17759
|
}
|
|
17549
|
-
op.slot = slotCount;
|
|
17550
|
-
slotMap.set(op.xref, op.slot);
|
|
17760
|
+
op.handle.slot = slotCount;
|
|
17761
|
+
slotMap.set(op.xref, op.handle.slot);
|
|
17551
17762
|
slotCount += op.numSlotsUsed;
|
|
17552
17763
|
}
|
|
17553
17764
|
unit.decls = slotCount;
|
|
@@ -17558,31 +17769,13 @@ function phaseSlotAllocation(job) {
|
|
|
17558
17769
|
const childView = job.views.get(op.xref);
|
|
17559
17770
|
op.decls = childView.decls;
|
|
17560
17771
|
}
|
|
17561
|
-
if (hasUsesSlotIndexTrait(op) && op.target !== null && op.targetSlot === null) {
|
|
17562
|
-
if (!slotMap.has(op.target)) {
|
|
17563
|
-
throw new Error(`AssertionError: no slot allocated for ${OpKind[op.kind]} target ${op.target}`);
|
|
17564
|
-
}
|
|
17565
|
-
op.targetSlot = slotMap.get(op.target);
|
|
17566
|
-
}
|
|
17567
|
-
visitExpressionsInOp(op, (expr) => {
|
|
17568
|
-
if (!isIrExpression(expr)) {
|
|
17569
|
-
return;
|
|
17570
|
-
}
|
|
17571
|
-
if (!hasUsesSlotIndexTrait(expr) || expr.targetSlot !== null) {
|
|
17572
|
-
return;
|
|
17573
|
-
}
|
|
17574
|
-
if (!slotMap.has(expr.target)) {
|
|
17575
|
-
throw new Error(`AssertionError: no slot allocated for ${expr.constructor.name} target ${expr.target}`);
|
|
17576
|
-
}
|
|
17577
|
-
expr.targetSlot = slotMap.get(expr.target);
|
|
17578
|
-
});
|
|
17579
17772
|
}
|
|
17580
17773
|
}
|
|
17581
17774
|
}
|
|
17582
17775
|
|
|
17583
|
-
// bazel-out/
|
|
17584
|
-
function
|
|
17585
|
-
for (const unit of
|
|
17776
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
17777
|
+
function specializeStyleBindings(job) {
|
|
17778
|
+
for (const unit of job.units) {
|
|
17586
17779
|
for (const op of unit.update) {
|
|
17587
17780
|
if (op.kind !== OpKind.Binding) {
|
|
17588
17781
|
continue;
|
|
@@ -17610,9 +17803,9 @@ function phaseStyleBindingSpecialization(cpl) {
|
|
|
17610
17803
|
}
|
|
17611
17804
|
}
|
|
17612
17805
|
|
|
17613
|
-
// bazel-out/
|
|
17614
|
-
function
|
|
17615
|
-
for (const unit of
|
|
17806
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
17807
|
+
function generateTemporaryVariables(job) {
|
|
17808
|
+
for (const unit of job.units) {
|
|
17616
17809
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
17617
17810
|
unit.update.prepend(generateTemporaries(unit.update));
|
|
17618
17811
|
}
|
|
@@ -17668,8 +17861,106 @@ function assignName(names, expr) {
|
|
|
17668
17861
|
expr.name = name;
|
|
17669
17862
|
}
|
|
17670
17863
|
|
|
17671
|
-
// bazel-out/
|
|
17672
|
-
function
|
|
17864
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
17865
|
+
function generateTrackFns(job) {
|
|
17866
|
+
for (const unit of job.units) {
|
|
17867
|
+
for (const op of unit.create) {
|
|
17868
|
+
if (op.kind !== OpKind.RepeaterCreate) {
|
|
17869
|
+
continue;
|
|
17870
|
+
}
|
|
17871
|
+
if (op.trackByFn !== null) {
|
|
17872
|
+
continue;
|
|
17873
|
+
}
|
|
17874
|
+
let usesComponentContext = false;
|
|
17875
|
+
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
17876
|
+
if (expr instanceof TrackContextExpr) {
|
|
17877
|
+
usesComponentContext = true;
|
|
17878
|
+
return variable("this");
|
|
17879
|
+
}
|
|
17880
|
+
return expr;
|
|
17881
|
+
}, VisitorContextFlag.None);
|
|
17882
|
+
let fn2;
|
|
17883
|
+
const fnParams = [new FnParam("$index"), new FnParam("$item")];
|
|
17884
|
+
if (usesComponentContext) {
|
|
17885
|
+
fn2 = new FunctionExpr(fnParams, [new ReturnStatement(op.track)]);
|
|
17886
|
+
} else {
|
|
17887
|
+
fn2 = arrowFn(fnParams, op.track);
|
|
17888
|
+
}
|
|
17889
|
+
op.trackByFn = job.pool.getSharedFunctionReference(fn2, "_forTrack");
|
|
17890
|
+
}
|
|
17891
|
+
}
|
|
17892
|
+
}
|
|
17893
|
+
|
|
17894
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
17895
|
+
function optimizeTrackFns(job) {
|
|
17896
|
+
for (const unit of job.units) {
|
|
17897
|
+
for (const op of unit.create) {
|
|
17898
|
+
if (op.kind !== OpKind.RepeaterCreate) {
|
|
17899
|
+
continue;
|
|
17900
|
+
}
|
|
17901
|
+
if (op.track instanceof ReadVarExpr && op.track.name === "$index") {
|
|
17902
|
+
op.trackByFn = importExpr(Identifiers.repeaterTrackByIndex);
|
|
17903
|
+
} else if (op.track instanceof ReadVarExpr && op.track.name === "$item") {
|
|
17904
|
+
op.trackByFn = importExpr(Identifiers.repeaterTrackByIdentity);
|
|
17905
|
+
} else if (isTrackByFunctionCall(job.root.xref, op.track)) {
|
|
17906
|
+
if (op.track.receiver.receiver.view === unit.xref) {
|
|
17907
|
+
op.trackByFn = op.track.receiver;
|
|
17908
|
+
} else {
|
|
17909
|
+
op.trackByFn = importExpr(Identifiers.componentInstance).callFn([]).prop(op.track.receiver.name);
|
|
17910
|
+
op.track = op.trackByFn;
|
|
17911
|
+
}
|
|
17912
|
+
} else {
|
|
17913
|
+
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
17914
|
+
if (expr instanceof ContextExpr) {
|
|
17915
|
+
op.usesComponentInstance = true;
|
|
17916
|
+
return new TrackContextExpr(expr.view);
|
|
17917
|
+
}
|
|
17918
|
+
return expr;
|
|
17919
|
+
}, VisitorContextFlag.None);
|
|
17920
|
+
}
|
|
17921
|
+
}
|
|
17922
|
+
}
|
|
17923
|
+
}
|
|
17924
|
+
function isTrackByFunctionCall(rootView, expr) {
|
|
17925
|
+
if (!(expr instanceof InvokeFunctionExpr) || expr.args.length !== 2) {
|
|
17926
|
+
return false;
|
|
17927
|
+
}
|
|
17928
|
+
if (!(expr.receiver instanceof ReadPropExpr && expr.receiver.receiver instanceof ContextExpr) || expr.receiver.receiver.view !== rootView) {
|
|
17929
|
+
return false;
|
|
17930
|
+
}
|
|
17931
|
+
const [arg0, arg1] = expr.args;
|
|
17932
|
+
if (!(arg0 instanceof ReadVarExpr) || arg0.name !== "$index") {
|
|
17933
|
+
return false;
|
|
17934
|
+
}
|
|
17935
|
+
if (!(arg1 instanceof ReadVarExpr) || arg1.name !== "$item") {
|
|
17936
|
+
return false;
|
|
17937
|
+
}
|
|
17938
|
+
return true;
|
|
17939
|
+
}
|
|
17940
|
+
|
|
17941
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
17942
|
+
function generateTrackVariables(job) {
|
|
17943
|
+
for (const unit of job.units) {
|
|
17944
|
+
for (const op of unit.create) {
|
|
17945
|
+
if (op.kind !== OpKind.RepeaterCreate) {
|
|
17946
|
+
continue;
|
|
17947
|
+
}
|
|
17948
|
+
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
17949
|
+
if (expr instanceof LexicalReadExpr) {
|
|
17950
|
+
if (expr.name === op.varNames.$index) {
|
|
17951
|
+
return variable("$index");
|
|
17952
|
+
} else if (expr.name === op.varNames.$implicit) {
|
|
17953
|
+
return variable("$item");
|
|
17954
|
+
}
|
|
17955
|
+
}
|
|
17956
|
+
return expr;
|
|
17957
|
+
}, VisitorContextFlag.None);
|
|
17958
|
+
}
|
|
17959
|
+
}
|
|
17960
|
+
}
|
|
17961
|
+
|
|
17962
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
17963
|
+
function countVariables(job) {
|
|
17673
17964
|
for (const unit of job.units) {
|
|
17674
17965
|
let varCount = 0;
|
|
17675
17966
|
for (const op of unit.ops()) {
|
|
@@ -17773,8 +18064,8 @@ function isSingletonInterpolation(expr) {
|
|
|
17773
18064
|
return true;
|
|
17774
18065
|
}
|
|
17775
18066
|
|
|
17776
|
-
// bazel-out/
|
|
17777
|
-
function
|
|
18067
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18068
|
+
function optimizeVariables(job) {
|
|
17778
18069
|
for (const unit of job.units) {
|
|
17779
18070
|
inlineAlwaysInlineVariables(unit.create);
|
|
17780
18071
|
inlineAlwaysInlineVariables(unit.update);
|
|
@@ -17796,7 +18087,7 @@ var Fence;
|
|
|
17796
18087
|
(function(Fence2) {
|
|
17797
18088
|
Fence2[Fence2["None"] = 0] = "None";
|
|
17798
18089
|
Fence2[Fence2["ViewContextRead"] = 1] = "ViewContextRead";
|
|
17799
|
-
Fence2[Fence2["ViewContextWrite"] =
|
|
18090
|
+
Fence2[Fence2["ViewContextWrite"] = 2] = "ViewContextWrite";
|
|
17800
18091
|
Fence2[Fence2["SideEffectful"] = 4] = "SideEffectful";
|
|
17801
18092
|
})(Fence || (Fence = {}));
|
|
17802
18093
|
function inlineAlwaysInlineVariables(ops) {
|
|
@@ -17908,9 +18199,9 @@ function optimizeVariablesInOpList(ops, compatibility) {
|
|
|
17908
18199
|
function fencesForIrExpression(expr) {
|
|
17909
18200
|
switch (expr.kind) {
|
|
17910
18201
|
case ExpressionKind.NextContext:
|
|
17911
|
-
return Fence.ViewContextWrite;
|
|
18202
|
+
return Fence.ViewContextRead | Fence.ViewContextWrite;
|
|
17912
18203
|
case ExpressionKind.RestoreView:
|
|
17913
|
-
return Fence.ViewContextWrite | Fence.SideEffectful;
|
|
18204
|
+
return Fence.ViewContextRead | Fence.ViewContextWrite | Fence.SideEffectful;
|
|
17914
18205
|
case ExpressionKind.Reference:
|
|
17915
18206
|
return Fence.ViewContextRead;
|
|
17916
18207
|
default:
|
|
@@ -18023,8 +18314,8 @@ function allowConservativeInlining(decl, target) {
|
|
|
18023
18314
|
}
|
|
18024
18315
|
}
|
|
18025
18316
|
|
|
18026
|
-
// bazel-out/
|
|
18027
|
-
function
|
|
18317
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18318
|
+
function wrapI18nIcus(job) {
|
|
18028
18319
|
for (const unit of job.units) {
|
|
18029
18320
|
let currentI18nOp = null;
|
|
18030
18321
|
for (const op of unit.create) {
|
|
@@ -18047,159 +18338,66 @@ function phaseWrapIcus(job) {
|
|
|
18047
18338
|
}
|
|
18048
18339
|
}
|
|
18049
18340
|
|
|
18050
|
-
// bazel-out/
|
|
18051
|
-
function phaseTrackVariables(job) {
|
|
18052
|
-
for (const unit of job.units) {
|
|
18053
|
-
for (const op of unit.create) {
|
|
18054
|
-
if (op.kind !== OpKind.RepeaterCreate) {
|
|
18055
|
-
continue;
|
|
18056
|
-
}
|
|
18057
|
-
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
18058
|
-
if (expr instanceof LexicalReadExpr) {
|
|
18059
|
-
if (expr.name === op.varNames.$index) {
|
|
18060
|
-
return variable("$index");
|
|
18061
|
-
} else if (expr.name === op.varNames.$implicit) {
|
|
18062
|
-
return variable("$item");
|
|
18063
|
-
}
|
|
18064
|
-
}
|
|
18065
|
-
return expr;
|
|
18066
|
-
}, VisitorContextFlag.None);
|
|
18067
|
-
}
|
|
18068
|
-
}
|
|
18069
|
-
}
|
|
18070
|
-
|
|
18071
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18072
|
-
function phaseTrackFnGeneration(job) {
|
|
18073
|
-
for (const unit of job.units) {
|
|
18074
|
-
for (const op of unit.create) {
|
|
18075
|
-
if (op.kind !== OpKind.RepeaterCreate) {
|
|
18076
|
-
continue;
|
|
18077
|
-
}
|
|
18078
|
-
if (op.trackByFn !== null) {
|
|
18079
|
-
continue;
|
|
18080
|
-
}
|
|
18081
|
-
let usesComponentContext = false;
|
|
18082
|
-
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
18083
|
-
if (expr instanceof TrackContextExpr) {
|
|
18084
|
-
usesComponentContext = true;
|
|
18085
|
-
return variable("this");
|
|
18086
|
-
}
|
|
18087
|
-
return expr;
|
|
18088
|
-
}, VisitorContextFlag.None);
|
|
18089
|
-
let fn2;
|
|
18090
|
-
const fnParams = [new FnParam("$index"), new FnParam("$item")];
|
|
18091
|
-
if (usesComponentContext) {
|
|
18092
|
-
fn2 = new FunctionExpr(fnParams, [new ReturnStatement(op.track)]);
|
|
18093
|
-
} else {
|
|
18094
|
-
fn2 = arrowFn(fnParams, op.track);
|
|
18095
|
-
}
|
|
18096
|
-
op.trackByFn = job.pool.getSharedFunctionReference(fn2, "_forTrack");
|
|
18097
|
-
}
|
|
18098
|
-
}
|
|
18099
|
-
}
|
|
18100
|
-
|
|
18101
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18102
|
-
function phaseTrackFnOptimization(job) {
|
|
18103
|
-
for (const unit of job.units) {
|
|
18104
|
-
for (const op of unit.create) {
|
|
18105
|
-
if (op.kind !== OpKind.RepeaterCreate) {
|
|
18106
|
-
continue;
|
|
18107
|
-
}
|
|
18108
|
-
if (op.track instanceof ReadVarExpr && op.track.name === "$index") {
|
|
18109
|
-
op.trackByFn = importExpr(Identifiers.repeaterTrackByIndex);
|
|
18110
|
-
} else if (op.track instanceof ReadVarExpr && op.track.name === "$item") {
|
|
18111
|
-
op.trackByFn = importExpr(Identifiers.repeaterTrackByIdentity);
|
|
18112
|
-
} else if (isTrackByFunctionCall(job.root.xref, op.track)) {
|
|
18113
|
-
if (op.track.receiver.receiver.view === unit.xref) {
|
|
18114
|
-
op.trackByFn = op.track.receiver;
|
|
18115
|
-
} else {
|
|
18116
|
-
op.trackByFn = importExpr(Identifiers.componentInstance).callFn([]).prop(op.track.receiver.name);
|
|
18117
|
-
op.track = op.trackByFn;
|
|
18118
|
-
}
|
|
18119
|
-
} else {
|
|
18120
|
-
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
18121
|
-
if (expr instanceof ContextExpr) {
|
|
18122
|
-
op.usesComponentInstance = true;
|
|
18123
|
-
return new TrackContextExpr(expr.view);
|
|
18124
|
-
}
|
|
18125
|
-
return expr;
|
|
18126
|
-
}, VisitorContextFlag.None);
|
|
18127
|
-
}
|
|
18128
|
-
}
|
|
18129
|
-
}
|
|
18130
|
-
}
|
|
18131
|
-
function isTrackByFunctionCall(rootView, expr) {
|
|
18132
|
-
if (!(expr instanceof InvokeFunctionExpr) || expr.args.length !== 2) {
|
|
18133
|
-
return false;
|
|
18134
|
-
}
|
|
18135
|
-
if (!(expr.receiver instanceof ReadPropExpr && expr.receiver.receiver instanceof ContextExpr) || expr.receiver.receiver.view !== rootView) {
|
|
18136
|
-
return false;
|
|
18137
|
-
}
|
|
18138
|
-
const [arg0, arg1] = expr.args;
|
|
18139
|
-
if (!(arg0 instanceof ReadVarExpr) || arg0.name !== "$index") {
|
|
18140
|
-
return false;
|
|
18141
|
-
}
|
|
18142
|
-
if (!(arg1 instanceof ReadVarExpr) || arg1.name !== "$item") {
|
|
18143
|
-
return false;
|
|
18144
|
-
}
|
|
18145
|
-
return true;
|
|
18146
|
-
}
|
|
18147
|
-
|
|
18148
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18341
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18149
18342
|
var phases = [
|
|
18150
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18151
|
-
{ kind: CompilationJobKind.Host, fn:
|
|
18152
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18153
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18154
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18155
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18156
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18157
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18158
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18159
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18160
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18161
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18162
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18163
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18164
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18165
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18166
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18167
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18168
|
-
{ kind: CompilationJobKind.
|
|
18169
|
-
{ kind: CompilationJobKind.
|
|
18170
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18171
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18172
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18173
|
-
{ kind: CompilationJobKind.
|
|
18174
|
-
{ kind: CompilationJobKind.
|
|
18175
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18176
|
-
{ kind: CompilationJobKind.
|
|
18177
|
-
{ kind: CompilationJobKind.
|
|
18178
|
-
{ kind: CompilationJobKind.
|
|
18179
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18180
|
-
{ kind: CompilationJobKind.
|
|
18181
|
-
{ kind: CompilationJobKind.
|
|
18182
|
-
{ kind: CompilationJobKind.
|
|
18183
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18184
|
-
{ kind: CompilationJobKind.
|
|
18185
|
-
{ kind: CompilationJobKind.
|
|
18186
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18187
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18188
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18189
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18190
|
-
{ kind: CompilationJobKind.
|
|
18191
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18192
|
-
{ kind: CompilationJobKind.
|
|
18193
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18194
|
-
{ kind: CompilationJobKind.
|
|
18195
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18196
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18197
|
-
{ kind: CompilationJobKind.
|
|
18198
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
18199
|
-
{ kind: CompilationJobKind.
|
|
18200
|
-
{ kind: CompilationJobKind.Both, fn:
|
|
18201
|
-
{ kind: CompilationJobKind.
|
|
18202
|
-
{ kind: CompilationJobKind.
|
|
18343
|
+
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18344
|
+
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
18345
|
+
{ kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
|
|
18346
|
+
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
18347
|
+
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
18348
|
+
{ kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
|
|
18349
|
+
{ kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
|
|
18350
|
+
{ kind: CompilationJobKind.Both, fn: extractAttributes },
|
|
18351
|
+
{ kind: CompilationJobKind.Both, fn: parseExtractedStyles },
|
|
18352
|
+
{ kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },
|
|
18353
|
+
{ kind: CompilationJobKind.Both, fn: collapseSingletonInterpolations },
|
|
18354
|
+
{ kind: CompilationJobKind.Both, fn: orderOps },
|
|
18355
|
+
{ kind: CompilationJobKind.Tmpl, fn: generateConditionalExpressions },
|
|
18356
|
+
{ kind: CompilationJobKind.Tmpl, fn: createPipes },
|
|
18357
|
+
{ kind: CompilationJobKind.Tmpl, fn: configureDeferInstructions },
|
|
18358
|
+
{ kind: CompilationJobKind.Tmpl, fn: extractI18nText },
|
|
18359
|
+
{ kind: CompilationJobKind.Tmpl, fn: extractI18nICUs },
|
|
18360
|
+
{ kind: CompilationJobKind.Tmpl, fn: applyI18nExpressions },
|
|
18361
|
+
{ kind: CompilationJobKind.Tmpl, fn: createVariadicPipes },
|
|
18362
|
+
{ kind: CompilationJobKind.Both, fn: generatePureLiteralStructures },
|
|
18363
|
+
{ kind: CompilationJobKind.Tmpl, fn: generateProjectionDefs },
|
|
18364
|
+
{ kind: CompilationJobKind.Tmpl, fn: generateVariables },
|
|
18365
|
+
{ kind: CompilationJobKind.Tmpl, fn: saveAndRestoreView },
|
|
18366
|
+
{ kind: CompilationJobKind.Tmpl, fn: deleteAnyCasts },
|
|
18367
|
+
{ kind: CompilationJobKind.Both, fn: resolveDollarEvent },
|
|
18368
|
+
{ kind: CompilationJobKind.Tmpl, fn: generateRepeaterDerivedVars },
|
|
18369
|
+
{ kind: CompilationJobKind.Tmpl, fn: generateTrackVariables },
|
|
18370
|
+
{ kind: CompilationJobKind.Both, fn: resolveNames },
|
|
18371
|
+
{ kind: CompilationJobKind.Tmpl, fn: resolveDeferTargetNames },
|
|
18372
|
+
{ kind: CompilationJobKind.Tmpl, fn: optimizeTrackFns },
|
|
18373
|
+
{ kind: CompilationJobKind.Both, fn: resolveContexts },
|
|
18374
|
+
{ kind: CompilationJobKind.Tmpl, fn: resolveSanitizers },
|
|
18375
|
+
{ kind: CompilationJobKind.Tmpl, fn: liftLocalRefs },
|
|
18376
|
+
{ kind: CompilationJobKind.Both, fn: generateNullishCoalesceExpressions },
|
|
18377
|
+
{ kind: CompilationJobKind.Both, fn: expandSafeReads },
|
|
18378
|
+
{ kind: CompilationJobKind.Both, fn: generateTemporaryVariables },
|
|
18379
|
+
{ kind: CompilationJobKind.Tmpl, fn: allocateSlots },
|
|
18380
|
+
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
18381
|
+
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
18382
|
+
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
18383
|
+
{ kind: CompilationJobKind.Tmpl, fn: propogateI18nPlaceholders },
|
|
18384
|
+
{ kind: CompilationJobKind.Tmpl, fn: formatI18nParams },
|
|
18385
|
+
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
18386
|
+
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
18387
|
+
{ kind: CompilationJobKind.Tmpl, fn: collectConstExpressions },
|
|
18388
|
+
{ kind: CompilationJobKind.Both, fn: collectElementConsts },
|
|
18389
|
+
{ kind: CompilationJobKind.Tmpl, fn: assignI18nSlotDependencies },
|
|
18390
|
+
{ kind: CompilationJobKind.Both, fn: countVariables },
|
|
18391
|
+
{ kind: CompilationJobKind.Tmpl, fn: generateAdvance },
|
|
18392
|
+
{ kind: CompilationJobKind.Both, fn: optimizeVariables },
|
|
18393
|
+
{ kind: CompilationJobKind.Both, fn: nameFunctionsAndVariables },
|
|
18394
|
+
{ kind: CompilationJobKind.Tmpl, fn: mergeNextContextExpressions },
|
|
18395
|
+
{ kind: CompilationJobKind.Tmpl, fn: generateNgContainerOps },
|
|
18396
|
+
{ kind: CompilationJobKind.Tmpl, fn: collapseEmptyInstructions },
|
|
18397
|
+
{ kind: CompilationJobKind.Tmpl, fn: disableBindings },
|
|
18398
|
+
{ kind: CompilationJobKind.Both, fn: extractPureFunctions },
|
|
18399
|
+
{ kind: CompilationJobKind.Both, fn: reify },
|
|
18400
|
+
{ kind: CompilationJobKind.Both, fn: chain }
|
|
18203
18401
|
];
|
|
18204
18402
|
function transform(job, kind) {
|
|
18205
18403
|
for (const phase of phases) {
|
|
@@ -18303,12 +18501,12 @@ function emitHostBindingFunction(job) {
|
|
|
18303
18501
|
);
|
|
18304
18502
|
}
|
|
18305
18503
|
|
|
18306
|
-
// bazel-out/
|
|
18504
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18307
18505
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18308
18506
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds) {
|
|
18309
|
-
const
|
|
18310
|
-
ingestNodes(
|
|
18311
|
-
return
|
|
18507
|
+
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds);
|
|
18508
|
+
ingestNodes(job.root, template2);
|
|
18509
|
+
return job;
|
|
18312
18510
|
}
|
|
18313
18511
|
function ingestHostBinding(input, bindingParser, constantPool) {
|
|
18314
18512
|
var _a2, _b2, _c2;
|
|
@@ -18357,7 +18555,7 @@ function ingestHostAttribute(job, name, value) {
|
|
|
18357
18555
|
job.root.update.push(attrBinding);
|
|
18358
18556
|
}
|
|
18359
18557
|
function ingestHostEvent(job, event) {
|
|
18360
|
-
const eventBinding = createListenerOp(job.root.xref, event.name, null, event.targetOrPhase, true, event.sourceSpan);
|
|
18558
|
+
const eventBinding = createListenerOp(job.root.xref, new SlotHandle(), event.name, null, event.targetOrPhase, true, event.sourceSpan);
|
|
18361
18559
|
eventBinding.handlerOps.push(createStatementOp(new ReturnStatement(convertAst(event.handler.ast, job, event.sourceSpan), event.handlerSpan)));
|
|
18362
18560
|
job.root.create.push(eventBinding);
|
|
18363
18561
|
}
|
|
@@ -18392,10 +18590,6 @@ function ingestElement(unit, element2) {
|
|
|
18392
18590
|
if (element2.i18n !== void 0 && !(element2.i18n instanceof Message || element2.i18n instanceof TagPlaceholder)) {
|
|
18393
18591
|
throw Error(`Unhandled i18n metadata type for element: ${element2.i18n.constructor.name}`);
|
|
18394
18592
|
}
|
|
18395
|
-
const staticAttributes = {};
|
|
18396
|
-
for (const attr of element2.attributes) {
|
|
18397
|
-
staticAttributes[attr.name] = attr.value;
|
|
18398
|
-
}
|
|
18399
18593
|
const id = unit.job.allocateXrefId();
|
|
18400
18594
|
const [namespaceKey, elementName] = splitNsName(element2.name);
|
|
18401
18595
|
const startOp = createElementStartOp(elementName, id, namespaceForKey(namespaceKey), element2.i18n instanceof TagPlaceholder ? element2.i18n : void 0, element2.startSourceSpan);
|
|
@@ -18422,7 +18616,9 @@ function ingestTemplate(unit, tmpl) {
|
|
|
18422
18616
|
[namespacePrefix, tagNameWithoutNamespace] = splitNsName(tmpl.tagName);
|
|
18423
18617
|
}
|
|
18424
18618
|
const i18nPlaceholder = tmpl.i18n instanceof TagPlaceholder ? tmpl.i18n : void 0;
|
|
18425
|
-
const
|
|
18619
|
+
const namespace = namespaceForKey(namespacePrefix);
|
|
18620
|
+
const functionNameSuffix = tagNameWithoutNamespace === null ? "" : prefixWithNamespace(tagNameWithoutNamespace, namespace);
|
|
18621
|
+
const tplOp = createTemplateOp(childView.xref, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan);
|
|
18426
18622
|
unit.create.push(tplOp);
|
|
18427
18623
|
ingestBindings(unit, tplOp, tmpl);
|
|
18428
18624
|
ingestReferences(tplOp, tmpl);
|
|
@@ -18466,39 +18662,50 @@ function ingestBoundText(unit, text2) {
|
|
|
18466
18662
|
}
|
|
18467
18663
|
function ingestIfBlock(unit, ifBlock) {
|
|
18468
18664
|
let firstXref = null;
|
|
18665
|
+
let firstSlotHandle = null;
|
|
18469
18666
|
let conditions = [];
|
|
18470
|
-
for (
|
|
18667
|
+
for (let i = 0; i < ifBlock.branches.length; i++) {
|
|
18668
|
+
const ifCase = ifBlock.branches[i];
|
|
18471
18669
|
const cView = unit.job.allocateView(unit.xref);
|
|
18670
|
+
let tagName = null;
|
|
18671
|
+
if (i === 0) {
|
|
18672
|
+
tagName = ingestControlFlowInsertionPoint(unit, cView.xref, ifCase);
|
|
18673
|
+
}
|
|
18472
18674
|
if (ifCase.expressionAlias !== null) {
|
|
18473
18675
|
cView.contextVariables.set(ifCase.expressionAlias.name, CTX_REF);
|
|
18474
18676
|
}
|
|
18677
|
+
const tmplOp = createTemplateOp(cView.xref, tagName, "Conditional", Namespace.HTML, void 0, ifCase.sourceSpan);
|
|
18678
|
+
unit.create.push(tmplOp);
|
|
18475
18679
|
if (firstXref === null) {
|
|
18476
18680
|
firstXref = cView.xref;
|
|
18681
|
+
firstSlotHandle = tmplOp.handle;
|
|
18477
18682
|
}
|
|
18478
|
-
unit.create.push(createTemplateOp(cView.xref, "Conditional", Namespace.HTML, true, void 0, ifCase.sourceSpan));
|
|
18479
18683
|
const caseExpr = ifCase.expression ? convertAst(ifCase.expression, unit.job, null) : null;
|
|
18480
|
-
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr,
|
|
18684
|
+
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, tmplOp.xref, tmplOp.handle, ifCase.expressionAlias);
|
|
18481
18685
|
conditions.push(conditionalCaseExpr);
|
|
18482
18686
|
ingestNodes(cView, ifCase.children);
|
|
18483
18687
|
}
|
|
18484
|
-
const conditional2 = createConditionalOp(firstXref, null, conditions, ifBlock.sourceSpan);
|
|
18688
|
+
const conditional2 = createConditionalOp(firstXref, firstSlotHandle, null, conditions, ifBlock.sourceSpan);
|
|
18485
18689
|
unit.update.push(conditional2);
|
|
18486
18690
|
}
|
|
18487
18691
|
function ingestSwitchBlock(unit, switchBlock) {
|
|
18488
18692
|
let firstXref = null;
|
|
18693
|
+
let firstSlotHandle = null;
|
|
18489
18694
|
let conditions = [];
|
|
18490
18695
|
for (const switchCase of switchBlock.cases) {
|
|
18491
18696
|
const cView = unit.job.allocateView(unit.xref);
|
|
18697
|
+
const tmplOp = createTemplateOp(cView.xref, null, "Case", Namespace.HTML, void 0, switchCase.sourceSpan);
|
|
18698
|
+
unit.create.push(tmplOp);
|
|
18492
18699
|
if (firstXref === null) {
|
|
18493
18700
|
firstXref = cView.xref;
|
|
18701
|
+
firstSlotHandle = tmplOp.handle;
|
|
18494
18702
|
}
|
|
18495
|
-
unit.create.push(createTemplateOp(cView.xref, "Case", Namespace.HTML, true, void 0, switchCase.sourceSpan));
|
|
18496
18703
|
const caseExpr = switchCase.expression ? convertAst(switchCase.expression, unit.job, switchBlock.startSourceSpan) : null;
|
|
18497
|
-
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr,
|
|
18704
|
+
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, tmplOp.xref, tmplOp.handle);
|
|
18498
18705
|
conditions.push(conditionalCaseExpr);
|
|
18499
18706
|
ingestNodes(cView, switchCase.children);
|
|
18500
18707
|
}
|
|
18501
|
-
const conditional2 = createConditionalOp(firstXref, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan);
|
|
18708
|
+
const conditional2 = createConditionalOp(firstXref, firstSlotHandle, convertAst(switchBlock.expression, unit.job, null), conditions, switchBlock.sourceSpan);
|
|
18502
18709
|
unit.update.push(conditional2);
|
|
18503
18710
|
}
|
|
18504
18711
|
function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
@@ -18507,38 +18714,80 @@ function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
|
18507
18714
|
}
|
|
18508
18715
|
const secondaryView = unit.job.allocateView(unit.xref);
|
|
18509
18716
|
ingestNodes(secondaryView, children);
|
|
18510
|
-
const templateOp = createTemplateOp(secondaryView.xref, `Defer${suffix}`, Namespace.HTML,
|
|
18717
|
+
const templateOp = createTemplateOp(secondaryView.xref, null, `Defer${suffix}`, Namespace.HTML, void 0, sourceSpan);
|
|
18511
18718
|
unit.create.push(templateOp);
|
|
18512
18719
|
return templateOp;
|
|
18513
18720
|
}
|
|
18514
18721
|
function ingestDeferBlock(unit, deferBlock) {
|
|
18515
|
-
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
18722
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
18516
18723
|
const main = ingestDeferView(unit, "", deferBlock.children, deferBlock.sourceSpan);
|
|
18517
18724
|
const loading = ingestDeferView(unit, "Loading", (_a2 = deferBlock.loading) == null ? void 0 : _a2.children, (_b2 = deferBlock.loading) == null ? void 0 : _b2.sourceSpan);
|
|
18518
18725
|
const placeholder = ingestDeferView(unit, "Placeholder", (_c2 = deferBlock.placeholder) == null ? void 0 : _c2.children, (_d2 = deferBlock.placeholder) == null ? void 0 : _d2.sourceSpan);
|
|
18519
18726
|
const error2 = ingestDeferView(unit, "Error", (_e2 = deferBlock.error) == null ? void 0 : _e2.children, (_f2 = deferBlock.error) == null ? void 0 : _f2.sourceSpan);
|
|
18520
|
-
const
|
|
18727
|
+
const deferXref = unit.job.allocateXrefId();
|
|
18728
|
+
const deferOp = createDeferOp(deferXref, main.xref, main.handle, deferBlock.sourceSpan);
|
|
18729
|
+
deferOp.placeholderView = (_g = placeholder == null ? void 0 : placeholder.xref) != null ? _g : null;
|
|
18730
|
+
deferOp.placeholderSlot = (_h = placeholder == null ? void 0 : placeholder.handle) != null ? _h : null;
|
|
18731
|
+
deferOp.loadingSlot = (_i = loading == null ? void 0 : loading.handle) != null ? _i : null;
|
|
18732
|
+
deferOp.errorSlot = (_j = error2 == null ? void 0 : error2.handle) != null ? _j : null;
|
|
18733
|
+
deferOp.placeholderMinimumTime = (_l = (_k = deferBlock.placeholder) == null ? void 0 : _k.minimumTime) != null ? _l : null;
|
|
18734
|
+
deferOp.loadingMinimumTime = (_n = (_m = deferBlock.loading) == null ? void 0 : _m.minimumTime) != null ? _n : null;
|
|
18735
|
+
deferOp.loadingAfterTime = (_p = (_o = deferBlock.loading) == null ? void 0 : _o.afterTime) != null ? _p : null;
|
|
18521
18736
|
unit.create.push(deferOp);
|
|
18522
|
-
|
|
18523
|
-
|
|
18524
|
-
|
|
18525
|
-
|
|
18526
|
-
|
|
18527
|
-
|
|
18528
|
-
|
|
18529
|
-
|
|
18530
|
-
|
|
18531
|
-
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
|
|
18535
|
-
|
|
18536
|
-
|
|
18537
|
-
|
|
18538
|
-
|
|
18539
|
-
|
|
18540
|
-
|
|
18541
|
-
|
|
18737
|
+
let prefetch = false;
|
|
18738
|
+
let deferOnOps = [];
|
|
18739
|
+
for (const triggers of [deferBlock.triggers, deferBlock.prefetchTriggers]) {
|
|
18740
|
+
if (triggers.idle !== void 0) {
|
|
18741
|
+
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, prefetch, null);
|
|
18742
|
+
deferOnOps.push(deferOnOp);
|
|
18743
|
+
}
|
|
18744
|
+
if (triggers.immediate !== void 0) {
|
|
18745
|
+
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Immediate }, prefetch, null);
|
|
18746
|
+
deferOnOps.push(deferOnOp);
|
|
18747
|
+
}
|
|
18748
|
+
if (triggers.timer !== void 0) {
|
|
18749
|
+
const deferOnOp = createDeferOnOp(deferXref, { kind: DeferTriggerKind.Timer, delay: triggers.timer.delay }, prefetch, null);
|
|
18750
|
+
deferOnOps.push(deferOnOp);
|
|
18751
|
+
}
|
|
18752
|
+
if (triggers.hover !== void 0) {
|
|
18753
|
+
const deferOnOp = createDeferOnOp(deferXref, {
|
|
18754
|
+
kind: DeferTriggerKind.Hover,
|
|
18755
|
+
targetName: triggers.hover.reference,
|
|
18756
|
+
targetXref: null,
|
|
18757
|
+
targetSlot: null,
|
|
18758
|
+
targetView: null,
|
|
18759
|
+
targetSlotViewSteps: null
|
|
18760
|
+
}, prefetch, null);
|
|
18761
|
+
deferOnOps.push(deferOnOp);
|
|
18762
|
+
}
|
|
18763
|
+
if (triggers.interaction !== void 0) {
|
|
18764
|
+
const deferOnOp = createDeferOnOp(deferXref, {
|
|
18765
|
+
kind: DeferTriggerKind.Interaction,
|
|
18766
|
+
targetName: triggers.interaction.reference,
|
|
18767
|
+
targetXref: null,
|
|
18768
|
+
targetSlot: null,
|
|
18769
|
+
targetView: null,
|
|
18770
|
+
targetSlotViewSteps: null
|
|
18771
|
+
}, prefetch, null);
|
|
18772
|
+
deferOnOps.push(deferOnOp);
|
|
18773
|
+
}
|
|
18774
|
+
if (triggers.viewport !== void 0) {
|
|
18775
|
+
const deferOnOp = createDeferOnOp(deferXref, {
|
|
18776
|
+
kind: DeferTriggerKind.Viewport,
|
|
18777
|
+
targetName: triggers.viewport.reference,
|
|
18778
|
+
targetXref: null,
|
|
18779
|
+
targetSlot: null,
|
|
18780
|
+
targetView: null,
|
|
18781
|
+
targetSlotViewSteps: null
|
|
18782
|
+
}, prefetch, null);
|
|
18783
|
+
deferOnOps.push(deferOnOp);
|
|
18784
|
+
}
|
|
18785
|
+
if (deferOnOps.length === 0) {
|
|
18786
|
+
deferOnOps.push(createDeferOnOp(deferXref, { kind: DeferTriggerKind.Idle }, false, null));
|
|
18787
|
+
}
|
|
18788
|
+
prefetch = true;
|
|
18789
|
+
}
|
|
18790
|
+
unit.create.push(deferOnOps);
|
|
18542
18791
|
}
|
|
18543
18792
|
function ingestIcu(unit, icu) {
|
|
18544
18793
|
var _a2;
|
|
@@ -18585,10 +18834,11 @@ function ingestForBlock(unit, forBlock) {
|
|
|
18585
18834
|
$odd: forBlock.contextVariables.$odd.name,
|
|
18586
18835
|
$implicit: forBlock.item.name
|
|
18587
18836
|
};
|
|
18588
|
-
const
|
|
18837
|
+
const tagName = ingestControlFlowInsertionPoint(unit, repeaterView.xref, forBlock);
|
|
18838
|
+
const repeaterCreate2 = createRepeaterCreateOp(repeaterView.xref, (_a2 = emptyView == null ? void 0 : emptyView.xref) != null ? _a2 : null, tagName, track, varNames, forBlock.sourceSpan);
|
|
18589
18839
|
unit.create.push(repeaterCreate2);
|
|
18590
18840
|
const expression = convertAst(forBlock.expression, unit.job, convertSourceSpan(forBlock.expression.span, forBlock.sourceSpan));
|
|
18591
|
-
const repeater2 = createRepeaterOp(repeaterCreate2.xref, expression, forBlock.sourceSpan);
|
|
18841
|
+
const repeater2 = createRepeaterOp(repeaterCreate2.xref, repeaterCreate2.handle, expression, forBlock.sourceSpan);
|
|
18592
18842
|
unit.update.push(repeater2);
|
|
18593
18843
|
}
|
|
18594
18844
|
function convertAst(ast, job, baseSourceSpan) {
|
|
@@ -18637,7 +18887,7 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
18637
18887
|
} else if (ast instanceof NonNullAssert) {
|
|
18638
18888
|
return convertAst(ast.expression, job, baseSourceSpan);
|
|
18639
18889
|
} else if (ast instanceof BindingPipe) {
|
|
18640
|
-
return new PipeBindingExpr(job.allocateXrefId(), ast.name, [
|
|
18890
|
+
return new PipeBindingExpr(job.allocateXrefId(), new SlotHandle(), ast.name, [
|
|
18641
18891
|
convertAst(ast.exp, job, baseSourceSpan),
|
|
18642
18892
|
...ast.args.map((arg) => convertAst(arg, job, baseSourceSpan))
|
|
18643
18893
|
]);
|
|
@@ -18690,7 +18940,7 @@ function ingestBindings(unit, op, element2) {
|
|
|
18690
18940
|
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null));
|
|
18691
18941
|
continue;
|
|
18692
18942
|
}
|
|
18693
|
-
listenerOp = createListenerOp(op.xref, output.name, op.tag, output.phase, false, output.sourceSpan);
|
|
18943
|
+
listenerOp = createListenerOp(op.xref, op.handle, output.name, op.tag, output.phase, false, output.sourceSpan);
|
|
18694
18944
|
let handlerExprs;
|
|
18695
18945
|
let handler = output.handler;
|
|
18696
18946
|
if (handler instanceof ASTWithSource) {
|
|
@@ -18771,11 +19021,32 @@ function convertSourceSpan(span, baseSourceSpan) {
|
|
|
18771
19021
|
const fullStart = baseSourceSpan.fullStart.moveBy(span.start);
|
|
18772
19022
|
return new ParseSourceSpan(start, end, fullStart);
|
|
18773
19023
|
}
|
|
19024
|
+
function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
19025
|
+
let root = null;
|
|
19026
|
+
for (const child of node.children) {
|
|
19027
|
+
if (child instanceof Comment) {
|
|
19028
|
+
continue;
|
|
19029
|
+
}
|
|
19030
|
+
if (root !== null) {
|
|
19031
|
+
return null;
|
|
19032
|
+
}
|
|
19033
|
+
if (child instanceof Element || child instanceof Template && child.tagName !== null) {
|
|
19034
|
+
root = child;
|
|
19035
|
+
}
|
|
19036
|
+
}
|
|
19037
|
+
if (root !== null) {
|
|
19038
|
+
for (const attr of root.attributes) {
|
|
19039
|
+
ingestBinding(unit, xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue);
|
|
19040
|
+
}
|
|
19041
|
+
return root instanceof Element ? root.name : root.tagName;
|
|
19042
|
+
}
|
|
19043
|
+
return null;
|
|
19044
|
+
}
|
|
18774
19045
|
|
|
18775
|
-
// bazel-out/
|
|
19046
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
18776
19047
|
var USE_TEMPLATE_PIPELINE = false;
|
|
18777
19048
|
|
|
18778
|
-
// bazel-out/
|
|
19049
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
18779
19050
|
var IMPORTANT_FLAG = "!important";
|
|
18780
19051
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
18781
19052
|
var StylingBuilder = class {
|
|
@@ -19108,7 +19379,7 @@ function isEmptyExpression(ast) {
|
|
|
19108
19379
|
return ast instanceof EmptyExpr;
|
|
19109
19380
|
}
|
|
19110
19381
|
|
|
19111
|
-
// bazel-out/
|
|
19382
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19112
19383
|
var HtmlParser = class extends Parser2 {
|
|
19113
19384
|
constructor() {
|
|
19114
19385
|
super(getHtmlTagDefinition);
|
|
@@ -19118,7 +19389,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19118
19389
|
}
|
|
19119
19390
|
};
|
|
19120
19391
|
|
|
19121
|
-
// bazel-out/
|
|
19392
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19122
19393
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19123
19394
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19124
19395
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19184,7 +19455,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19184
19455
|
return result;
|
|
19185
19456
|
}
|
|
19186
19457
|
|
|
19187
|
-
// bazel-out/
|
|
19458
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19188
19459
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19189
19460
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19190
19461
|
var CLASS_PREFIX = "class";
|
|
@@ -19504,7 +19775,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
19504
19775
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
19505
19776
|
}
|
|
19506
19777
|
|
|
19507
|
-
// bazel-out/
|
|
19778
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
19508
19779
|
function isStyleUrlResolvable(url) {
|
|
19509
19780
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
19510
19781
|
return false;
|
|
@@ -19513,7 +19784,7 @@ function isStyleUrlResolvable(url) {
|
|
|
19513
19784
|
}
|
|
19514
19785
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
19515
19786
|
|
|
19516
|
-
// bazel-out/
|
|
19787
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
19517
19788
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
19518
19789
|
var LINK_ELEMENT = "link";
|
|
19519
19790
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -19583,8 +19854,8 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
19583
19854
|
return selectAttr;
|
|
19584
19855
|
}
|
|
19585
19856
|
|
|
19586
|
-
// bazel-out/
|
|
19587
|
-
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+(
|
|
19857
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
19858
|
+
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
19588
19859
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
19589
19860
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
19590
19861
|
var ELSE_IF_PATTERN = /^else[^\S\r\n]+if/;
|
|
@@ -19601,18 +19872,18 @@ function createIfBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
19601
19872
|
const branches = [];
|
|
19602
19873
|
const mainBlockParams = parseConditionalBlockParameters(ast, errors, bindingParser);
|
|
19603
19874
|
if (mainBlockParams !== null) {
|
|
19604
|
-
branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll2(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan));
|
|
19875
|
+
branches.push(new IfBlockBranch(mainBlockParams.expression, visitAll2(visitor, ast.children, ast.children), mainBlockParams.expressionAlias, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan));
|
|
19605
19876
|
}
|
|
19606
19877
|
for (const block of connectedBlocks) {
|
|
19607
19878
|
if (ELSE_IF_PATTERN.test(block.name)) {
|
|
19608
19879
|
const params = parseConditionalBlockParameters(block, errors, bindingParser);
|
|
19609
19880
|
if (params !== null) {
|
|
19610
19881
|
const children = visitAll2(visitor, block.children, block.children);
|
|
19611
|
-
branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan));
|
|
19882
|
+
branches.push(new IfBlockBranch(params.expression, children, params.expressionAlias, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
|
|
19612
19883
|
}
|
|
19613
19884
|
} else if (block.name === "else") {
|
|
19614
19885
|
const children = visitAll2(visitor, block.children, block.children);
|
|
19615
|
-
branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan));
|
|
19886
|
+
branches.push(new IfBlockBranch(null, children, null, block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan));
|
|
19616
19887
|
}
|
|
19617
19888
|
}
|
|
19618
19889
|
const ifBlockStartSourceSpan = branches.length > 0 ? branches[0].startSourceSpan : ast.startSourceSpan;
|
|
@@ -19623,7 +19894,7 @@ function createIfBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
19623
19894
|
wholeSourceSpan = new ParseSourceSpan(ifBlockStartSourceSpan.start, lastBranch.sourceSpan.end);
|
|
19624
19895
|
}
|
|
19625
19896
|
return {
|
|
19626
|
-
node: new IfBlock(branches, wholeSourceSpan, ast.startSourceSpan, ifBlockEndSourceSpan),
|
|
19897
|
+
node: new IfBlock(branches, wholeSourceSpan, ast.startSourceSpan, ifBlockEndSourceSpan, ast.nameSpan),
|
|
19627
19898
|
errors
|
|
19628
19899
|
};
|
|
19629
19900
|
}
|
|
@@ -19640,7 +19911,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
19640
19911
|
} else if (block.parameters.length > 0) {
|
|
19641
19912
|
errors.push(new ParseError(block.sourceSpan, "@empty block cannot have parameters"));
|
|
19642
19913
|
} else {
|
|
19643
|
-
empty = new ForLoopBlockEmpty(visitAll2(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan);
|
|
19914
|
+
empty = new ForLoopBlockEmpty(visitAll2(visitor, block.children, block.children), block.sourceSpan, block.startSourceSpan, block.endSourceSpan, block.nameSpan);
|
|
19644
19915
|
}
|
|
19645
19916
|
} else {
|
|
19646
19917
|
errors.push(new ParseError(block.sourceSpan, `Unrecognized @for loop block "${block.name}"`));
|
|
@@ -19652,7 +19923,7 @@ function createForLoop(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
19652
19923
|
} else {
|
|
19653
19924
|
const endSpan = (_a2 = empty == null ? void 0 : empty.endSourceSpan) != null ? _a2 : ast.endSourceSpan;
|
|
19654
19925
|
const sourceSpan = new ParseSourceSpan(ast.sourceSpan.start, (_b2 = endSpan == null ? void 0 : endSpan.end) != null ? _b2 : ast.sourceSpan.end);
|
|
19655
|
-
node = new ForLoopBlock(params.itemName, params.expression, params.trackBy, params.context, visitAll2(visitor, ast.children, ast.children), empty, sourceSpan, ast.sourceSpan, ast.startSourceSpan, endSpan);
|
|
19926
|
+
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);
|
|
19656
19927
|
}
|
|
19657
19928
|
}
|
|
19658
19929
|
return { node, errors };
|
|
@@ -19672,7 +19943,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
19672
19943
|
continue;
|
|
19673
19944
|
}
|
|
19674
19945
|
const expression = node.name === "case" ? parseBlockParameterToBinding(node.parameters[0], bindingParser) : null;
|
|
19675
|
-
const ast2 = new SwitchBlockCase(expression, visitAll2(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan);
|
|
19946
|
+
const ast2 = new SwitchBlockCase(expression, visitAll2(visitor, node.children, node.children), node.sourceSpan, node.startSourceSpan, node.endSourceSpan, node.nameSpan);
|
|
19676
19947
|
if (expression === null) {
|
|
19677
19948
|
defaultCase = ast2;
|
|
19678
19949
|
} else {
|
|
@@ -19683,7 +19954,7 @@ function createSwitchBlock(ast, visitor, bindingParser) {
|
|
|
19683
19954
|
cases.push(defaultCase);
|
|
19684
19955
|
}
|
|
19685
19956
|
return {
|
|
19686
|
-
node: new SwitchBlock(primaryExpression, cases, unknownBlocks, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan),
|
|
19957
|
+
node: new SwitchBlock(primaryExpression, cases, unknownBlocks, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan, ast.nameSpan),
|
|
19687
19958
|
errors
|
|
19688
19959
|
};
|
|
19689
19960
|
}
|
|
@@ -19717,7 +19988,9 @@ function parseForLoopParameters(block, errors, bindingParser) {
|
|
|
19717
19988
|
if (result.trackBy !== null) {
|
|
19718
19989
|
errors.push(new ParseError(param.sourceSpan, '@for loop can only have one "track" expression'));
|
|
19719
19990
|
} else {
|
|
19720
|
-
|
|
19991
|
+
const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);
|
|
19992
|
+
const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy("track".length));
|
|
19993
|
+
result.trackBy = { expression, keywordSpan };
|
|
19721
19994
|
}
|
|
19722
19995
|
continue;
|
|
19723
19996
|
}
|
|
@@ -19776,7 +20049,7 @@ function validateSwitchBlock(ast) {
|
|
|
19776
20049
|
return errors;
|
|
19777
20050
|
}
|
|
19778
20051
|
for (const node of ast.children) {
|
|
19779
|
-
if (node instanceof Text4 && node.value.trim().length === 0) {
|
|
20052
|
+
if (node instanceof Comment2 || node instanceof Text4 && node.value.trim().length === 0) {
|
|
19780
20053
|
continue;
|
|
19781
20054
|
}
|
|
19782
20055
|
if (!(node instanceof Block) || node.name !== "case" && node.name !== "default") {
|
|
@@ -19872,8 +20145,8 @@ function stripOptionalParentheses(param, errors) {
|
|
|
19872
20145
|
return expression.slice(start, end);
|
|
19873
20146
|
}
|
|
19874
20147
|
|
|
19875
|
-
// bazel-out/
|
|
19876
|
-
var TIME_PATTERN = /^\d
|
|
20148
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20149
|
+
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
19877
20150
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
19878
20151
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
19879
20152
|
[$LBRACE, $RBRACE],
|
|
@@ -19891,32 +20164,44 @@ var OnTriggerType;
|
|
|
19891
20164
|
})(OnTriggerType || (OnTriggerType = {}));
|
|
19892
20165
|
function parseWhenTrigger({ expression, sourceSpan }, bindingParser, triggers, errors) {
|
|
19893
20166
|
const whenIndex = expression.indexOf("when");
|
|
20167
|
+
const whenSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(whenIndex), sourceSpan.start.moveBy(whenIndex + "when".length));
|
|
20168
|
+
const prefetchSpan = getPrefetchSpan(expression, sourceSpan);
|
|
19894
20169
|
if (whenIndex === -1) {
|
|
19895
20170
|
errors.push(new ParseError(sourceSpan, `Could not find "when" keyword in expression`));
|
|
19896
20171
|
} else {
|
|
19897
20172
|
const start = getTriggerParametersStart(expression, whenIndex + 1);
|
|
19898
20173
|
const parsed = bindingParser.parseBinding(expression.slice(start), false, sourceSpan, sourceSpan.start.offset + start);
|
|
19899
|
-
trackTrigger("when", triggers, errors, new BoundDeferredTrigger(parsed, sourceSpan));
|
|
20174
|
+
trackTrigger("when", triggers, errors, new BoundDeferredTrigger(parsed, sourceSpan, prefetchSpan, whenSourceSpan));
|
|
19900
20175
|
}
|
|
19901
20176
|
}
|
|
19902
20177
|
function parseOnTrigger({ expression, sourceSpan }, triggers, errors, placeholder) {
|
|
19903
20178
|
const onIndex = expression.indexOf("on");
|
|
20179
|
+
const onSourceSpan = new ParseSourceSpan(sourceSpan.start.moveBy(onIndex), sourceSpan.start.moveBy(onIndex + "on".length));
|
|
20180
|
+
const prefetchSpan = getPrefetchSpan(expression, sourceSpan);
|
|
19904
20181
|
if (onIndex === -1) {
|
|
19905
20182
|
errors.push(new ParseError(sourceSpan, `Could not find "on" keyword in expression`));
|
|
19906
20183
|
} else {
|
|
19907
20184
|
const start = getTriggerParametersStart(expression, onIndex + 1);
|
|
19908
|
-
const parser = new OnTriggerParser(expression, start, sourceSpan, triggers, errors, placeholder);
|
|
20185
|
+
const parser = new OnTriggerParser(expression, start, sourceSpan, triggers, errors, placeholder, prefetchSpan, onSourceSpan);
|
|
19909
20186
|
parser.parse();
|
|
19910
20187
|
}
|
|
19911
20188
|
}
|
|
20189
|
+
function getPrefetchSpan(expression, sourceSpan) {
|
|
20190
|
+
if (!expression.startsWith("prefetch")) {
|
|
20191
|
+
return null;
|
|
20192
|
+
}
|
|
20193
|
+
return new ParseSourceSpan(sourceSpan.start, sourceSpan.start.moveBy("prefetch".length));
|
|
20194
|
+
}
|
|
19912
20195
|
var OnTriggerParser = class {
|
|
19913
|
-
constructor(expression, start, span, triggers, errors, placeholder) {
|
|
20196
|
+
constructor(expression, start, span, triggers, errors, placeholder, prefetchSpan, onSourceSpan) {
|
|
19914
20197
|
this.expression = expression;
|
|
19915
20198
|
this.start = start;
|
|
19916
20199
|
this.span = span;
|
|
19917
20200
|
this.triggers = triggers;
|
|
19918
20201
|
this.errors = errors;
|
|
19919
20202
|
this.placeholder = placeholder;
|
|
20203
|
+
this.prefetchSpan = prefetchSpan;
|
|
20204
|
+
this.onSourceSpan = onSourceSpan;
|
|
19920
20205
|
this.index = 0;
|
|
19921
20206
|
this.tokens = new Lexer().tokenize(expression.slice(start));
|
|
19922
20207
|
}
|
|
@@ -19958,28 +20243,32 @@ var OnTriggerParser = class {
|
|
|
19958
20243
|
return this.tokens[Math.min(this.index, this.tokens.length - 1)];
|
|
19959
20244
|
}
|
|
19960
20245
|
consumeTrigger(identifier, parameters) {
|
|
19961
|
-
const
|
|
19962
|
-
const
|
|
19963
|
-
const
|
|
20246
|
+
const triggerNameStartSpan = this.span.start.moveBy(this.start + identifier.index - this.tokens[0].index);
|
|
20247
|
+
const nameSpan = new ParseSourceSpan(triggerNameStartSpan, triggerNameStartSpan.moveBy(identifier.strValue.length));
|
|
20248
|
+
const endSpan = triggerNameStartSpan.moveBy(this.token().end - identifier.index);
|
|
20249
|
+
const isFirstTrigger = identifier.index === 0;
|
|
20250
|
+
const onSourceSpan = isFirstTrigger ? this.onSourceSpan : null;
|
|
20251
|
+
const prefetchSourceSpan = isFirstTrigger ? this.prefetchSpan : null;
|
|
20252
|
+
const sourceSpan = new ParseSourceSpan(isFirstTrigger ? this.span.start : triggerNameStartSpan, endSpan);
|
|
19964
20253
|
try {
|
|
19965
20254
|
switch (identifier.toString()) {
|
|
19966
20255
|
case OnTriggerType.IDLE:
|
|
19967
|
-
this.trackTrigger("idle", createIdleTrigger(parameters, sourceSpan));
|
|
20256
|
+
this.trackTrigger("idle", createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSourceSpan, onSourceSpan));
|
|
19968
20257
|
break;
|
|
19969
20258
|
case OnTriggerType.TIMER:
|
|
19970
|
-
this.trackTrigger("timer", createTimerTrigger(parameters, sourceSpan));
|
|
20259
|
+
this.trackTrigger("timer", createTimerTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan));
|
|
19971
20260
|
break;
|
|
19972
20261
|
case OnTriggerType.INTERACTION:
|
|
19973
|
-
this.trackTrigger("interaction", createInteractionTrigger(parameters, sourceSpan, this.placeholder));
|
|
20262
|
+
this.trackTrigger("interaction", createInteractionTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));
|
|
19974
20263
|
break;
|
|
19975
20264
|
case OnTriggerType.IMMEDIATE:
|
|
19976
|
-
this.trackTrigger("immediate", createImmediateTrigger(parameters, sourceSpan));
|
|
20265
|
+
this.trackTrigger("immediate", createImmediateTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan));
|
|
19977
20266
|
break;
|
|
19978
20267
|
case OnTriggerType.HOVER:
|
|
19979
|
-
this.trackTrigger("hover", createHoverTrigger(parameters, sourceSpan, this.placeholder));
|
|
20268
|
+
this.trackTrigger("hover", createHoverTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));
|
|
19980
20269
|
break;
|
|
19981
20270
|
case OnTriggerType.VIEWPORT:
|
|
19982
|
-
this.trackTrigger("viewport", createViewportTrigger(parameters, sourceSpan, this.placeholder));
|
|
20271
|
+
this.trackTrigger("viewport", createViewportTrigger(parameters, nameSpan, sourceSpan, this.prefetchSpan, this.onSourceSpan, this.placeholder));
|
|
19983
20272
|
break;
|
|
19984
20273
|
default:
|
|
19985
20274
|
throw new Error(`Unrecognized trigger type "${identifier}"`);
|
|
@@ -20050,13 +20339,13 @@ function trackTrigger(name, allTriggers, errors, trigger) {
|
|
|
20050
20339
|
allTriggers[name] = trigger;
|
|
20051
20340
|
}
|
|
20052
20341
|
}
|
|
20053
|
-
function createIdleTrigger(parameters, sourceSpan) {
|
|
20342
|
+
function createIdleTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
|
|
20054
20343
|
if (parameters.length > 0) {
|
|
20055
20344
|
throw new Error(`"${OnTriggerType.IDLE}" trigger cannot have parameters`);
|
|
20056
20345
|
}
|
|
20057
|
-
return new IdleDeferredTrigger(sourceSpan);
|
|
20346
|
+
return new IdleDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
20058
20347
|
}
|
|
20059
|
-
function createTimerTrigger(parameters, sourceSpan) {
|
|
20348
|
+
function createTimerTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
|
|
20060
20349
|
if (parameters.length !== 1) {
|
|
20061
20350
|
throw new Error(`"${OnTriggerType.TIMER}" trigger must have exactly one parameter`);
|
|
20062
20351
|
}
|
|
@@ -20064,28 +20353,28 @@ function createTimerTrigger(parameters, sourceSpan) {
|
|
|
20064
20353
|
if (delay === null) {
|
|
20065
20354
|
throw new Error(`Could not parse time value of trigger "${OnTriggerType.TIMER}"`);
|
|
20066
20355
|
}
|
|
20067
|
-
return new TimerDeferredTrigger(delay, sourceSpan);
|
|
20356
|
+
return new TimerDeferredTrigger(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
20068
20357
|
}
|
|
20069
|
-
function createImmediateTrigger(parameters, sourceSpan) {
|
|
20358
|
+
function createImmediateTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) {
|
|
20070
20359
|
if (parameters.length > 0) {
|
|
20071
20360
|
throw new Error(`"${OnTriggerType.IMMEDIATE}" trigger cannot have parameters`);
|
|
20072
20361
|
}
|
|
20073
|
-
return new ImmediateDeferredTrigger(sourceSpan);
|
|
20362
|
+
return new ImmediateDeferredTrigger(nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
20074
20363
|
}
|
|
20075
|
-
function createHoverTrigger(parameters, sourceSpan, placeholder) {
|
|
20364
|
+
function createHoverTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {
|
|
20076
20365
|
var _a2;
|
|
20077
20366
|
validateReferenceBasedTrigger(OnTriggerType.HOVER, parameters, placeholder);
|
|
20078
|
-
return new HoverDeferredTrigger((_a2 = parameters[0]) != null ? _a2 : null, sourceSpan);
|
|
20367
|
+
return new HoverDeferredTrigger((_a2 = parameters[0]) != null ? _a2 : null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
20079
20368
|
}
|
|
20080
|
-
function createInteractionTrigger(parameters, sourceSpan, placeholder) {
|
|
20369
|
+
function createInteractionTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {
|
|
20081
20370
|
var _a2;
|
|
20082
20371
|
validateReferenceBasedTrigger(OnTriggerType.INTERACTION, parameters, placeholder);
|
|
20083
|
-
return new InteractionDeferredTrigger((_a2 = parameters[0]) != null ? _a2 : null, sourceSpan);
|
|
20372
|
+
return new InteractionDeferredTrigger((_a2 = parameters[0]) != null ? _a2 : null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
20084
20373
|
}
|
|
20085
|
-
function createViewportTrigger(parameters, sourceSpan, placeholder) {
|
|
20374
|
+
function createViewportTrigger(parameters, nameSpan, sourceSpan, prefetchSpan, onSourceSpan, placeholder) {
|
|
20086
20375
|
var _a2;
|
|
20087
20376
|
validateReferenceBasedTrigger(OnTriggerType.VIEWPORT, parameters, placeholder);
|
|
20088
|
-
return new ViewportDeferredTrigger((_a2 = parameters[0]) != null ? _a2 : null, sourceSpan);
|
|
20377
|
+
return new ViewportDeferredTrigger((_a2 = parameters[0]) != null ? _a2 : null, nameSpan, sourceSpan, prefetchSpan, onSourceSpan);
|
|
20089
20378
|
}
|
|
20090
20379
|
function validateReferenceBasedTrigger(type, parameters, placeholder) {
|
|
20091
20380
|
if (parameters.length > 1) {
|
|
@@ -20117,10 +20406,10 @@ function parseDeferredTime(value) {
|
|
|
20117
20406
|
return null;
|
|
20118
20407
|
}
|
|
20119
20408
|
const [time, units] = match;
|
|
20120
|
-
return
|
|
20409
|
+
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20121
20410
|
}
|
|
20122
20411
|
|
|
20123
|
-
// bazel-out/
|
|
20412
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20124
20413
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20125
20414
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20126
20415
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20141,8 +20430,8 @@ function createDeferredBlock(ast, connectedBlocks, visitor, bindingParser) {
|
|
|
20141
20430
|
lastEndSourceSpan = lastConnectedBlock.endSourceSpan;
|
|
20142
20431
|
endOfLastSourceSpan = lastConnectedBlock.sourceSpan.end;
|
|
20143
20432
|
}
|
|
20144
|
-
const
|
|
20145
|
-
const node = new DeferredBlock(visitAll2(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2,
|
|
20433
|
+
const sourceSpanWithConnectedBlocks = new ParseSourceSpan(ast.sourceSpan.start, endOfLastSourceSpan);
|
|
20434
|
+
const node = new DeferredBlock(visitAll2(visitor, ast.children, ast.children), triggers, prefetchTriggers, placeholder, loading, error2, ast.nameSpan, sourceSpanWithConnectedBlocks, ast.sourceSpan, ast.startSourceSpan, lastEndSourceSpan);
|
|
20146
20435
|
return { node, errors };
|
|
20147
20436
|
}
|
|
20148
20437
|
function parseConnectedBlocks(connectedBlocks, errors, visitor) {
|
|
@@ -20200,7 +20489,7 @@ function parsePlaceholderBlock(ast, visitor) {
|
|
|
20200
20489
|
throw new Error(`Unrecognized parameter in @placeholder block: "${param.expression}"`);
|
|
20201
20490
|
}
|
|
20202
20491
|
}
|
|
20203
|
-
return new DeferredBlockPlaceholder(visitAll2(visitor, ast.children, ast.children), minimumTime, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20492
|
+
return new DeferredBlockPlaceholder(visitAll2(visitor, ast.children, ast.children), minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20204
20493
|
}
|
|
20205
20494
|
function parseLoadingBlock(ast, visitor) {
|
|
20206
20495
|
let afterTime = null;
|
|
@@ -20228,13 +20517,13 @@ function parseLoadingBlock(ast, visitor) {
|
|
|
20228
20517
|
throw new Error(`Unrecognized parameter in @loading block: "${param.expression}"`);
|
|
20229
20518
|
}
|
|
20230
20519
|
}
|
|
20231
|
-
return new DeferredBlockLoading(visitAll2(visitor, ast.children, ast.children), afterTime, minimumTime, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20520
|
+
return new DeferredBlockLoading(visitAll2(visitor, ast.children, ast.children), afterTime, minimumTime, ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20232
20521
|
}
|
|
20233
20522
|
function parseErrorBlock(ast, visitor) {
|
|
20234
20523
|
if (ast.parameters.length > 0) {
|
|
20235
20524
|
throw new Error(`@error block cannot have parameters`);
|
|
20236
20525
|
}
|
|
20237
|
-
return new DeferredBlockError(visitAll2(visitor, ast.children, ast.children), ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20526
|
+
return new DeferredBlockError(visitAll2(visitor, ast.children, ast.children), ast.nameSpan, ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);
|
|
20238
20527
|
}
|
|
20239
20528
|
function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
20240
20529
|
const triggers = {};
|
|
@@ -20255,7 +20544,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20255
20544
|
return { triggers, prefetchTriggers };
|
|
20256
20545
|
}
|
|
20257
20546
|
|
|
20258
|
-
// bazel-out/
|
|
20547
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20259
20548
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20260
20549
|
var KW_BIND_IDX = 1;
|
|
20261
20550
|
var KW_LET_IDX = 2;
|
|
@@ -20686,7 +20975,7 @@ function textContents(node) {
|
|
|
20686
20975
|
}
|
|
20687
20976
|
}
|
|
20688
20977
|
|
|
20689
|
-
// bazel-out/
|
|
20978
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
20690
20979
|
var TagType;
|
|
20691
20980
|
(function(TagType2) {
|
|
20692
20981
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -20821,10 +21110,11 @@ function serializePlaceholderValue(value) {
|
|
|
20821
21110
|
}
|
|
20822
21111
|
}
|
|
20823
21112
|
|
|
20824
|
-
// bazel-out/
|
|
21113
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
20825
21114
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
20826
21115
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
20827
21116
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
21117
|
+
var NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
20828
21118
|
var GLOBAL_TARGET_RESOLVERS = /* @__PURE__ */ new Map([["window", Identifiers.resolveWindow], ["document", Identifiers.resolveDocument], ["body", Identifiers.resolveBody]]);
|
|
20829
21119
|
var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
|
|
20830
21120
|
function renderFlagCheckIfStmt(flags, statements) {
|
|
@@ -21403,7 +21693,6 @@ var TemplateDefinitionBuilder = class {
|
|
|
21403
21693
|
var _a2;
|
|
21404
21694
|
const tagNameWithoutNamespace = template2.tagName ? splitNsName(template2.tagName)[1] : template2.tagName;
|
|
21405
21695
|
const contextNameSuffix = template2.tagName ? "_" + sanitizeIdentifier(template2.tagName) : "";
|
|
21406
|
-
const NG_TEMPLATE_TAG_NAME = "ng-template";
|
|
21407
21696
|
const attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, template2.attributes, template2.inputs, template2.outputs, void 0, template2.templateAttrs);
|
|
21408
21697
|
const templateIndex = this.createEmbeddedTemplateFn(tagNameWithoutNamespace, template2.children, contextNameSuffix, template2.sourceSpan, template2.variables, attrsExprs, template2.references, template2.i18n);
|
|
21409
21698
|
this.templatePropertyBindings(templateIndex, template2.templateAttrs);
|
|
@@ -21473,11 +21762,19 @@ var TemplateDefinitionBuilder = class {
|
|
|
21473
21762
|
}
|
|
21474
21763
|
visitIfBlock(block) {
|
|
21475
21764
|
this.allocateBindingSlots(null);
|
|
21476
|
-
const branchData = block.branches.map((
|
|
21765
|
+
const branchData = block.branches.map((branch, branchIndex) => {
|
|
21766
|
+
const { expression, expressionAlias, children, sourceSpan } = branch;
|
|
21477
21767
|
const variables = expressionAlias !== null ? [new Variable(expressionAlias.name, DIRECT_CONTEXT_REFERENCE, expressionAlias.sourceSpan, expressionAlias.keySpan)] : void 0;
|
|
21478
|
-
|
|
21768
|
+
let tagName = null;
|
|
21769
|
+
let attrsExprs;
|
|
21770
|
+
if (branchIndex === 0) {
|
|
21771
|
+
const inferredData = this.inferProjectionDataFromInsertionPoint(branch);
|
|
21772
|
+
tagName = inferredData.tagName;
|
|
21773
|
+
attrsExprs = inferredData.attrsExprs;
|
|
21774
|
+
}
|
|
21775
|
+
const templateIndex = this.createEmbeddedTemplateFn(tagName, children, "_Conditional", sourceSpan, variables, attrsExprs);
|
|
21479
21776
|
const processedExpression = expression === null ? null : expression.visit(this._valueConverter);
|
|
21480
|
-
return { index, expression: processedExpression, alias: expressionAlias };
|
|
21777
|
+
return { index: templateIndex, expression: processedExpression, alias: expressionAlias };
|
|
21481
21778
|
});
|
|
21482
21779
|
const containerIndex = branchData[0].index;
|
|
21483
21780
|
const paramsCallback = () => {
|
|
@@ -21622,11 +21919,34 @@ var TemplateDefinitionBuilder = class {
|
|
|
21622
21919
|
return params;
|
|
21623
21920
|
});
|
|
21624
21921
|
}
|
|
21922
|
+
inferProjectionDataFromInsertionPoint(node) {
|
|
21923
|
+
let root = null;
|
|
21924
|
+
let tagName = null;
|
|
21925
|
+
let attrsExprs;
|
|
21926
|
+
for (const child of node.children) {
|
|
21927
|
+
if (child instanceof Comment) {
|
|
21928
|
+
continue;
|
|
21929
|
+
}
|
|
21930
|
+
if (root !== null) {
|
|
21931
|
+
root = null;
|
|
21932
|
+
break;
|
|
21933
|
+
}
|
|
21934
|
+
if (child instanceof Element || child instanceof Template && child.tagName !== null) {
|
|
21935
|
+
root = child;
|
|
21936
|
+
}
|
|
21937
|
+
}
|
|
21938
|
+
if (root !== null) {
|
|
21939
|
+
tagName = root instanceof Element ? root.name : root.tagName;
|
|
21940
|
+
attrsExprs = this.getAttributeExpressions(NG_TEMPLATE_TAG_NAME, root.attributes, root.inputs, []);
|
|
21941
|
+
}
|
|
21942
|
+
return { tagName, attrsExprs };
|
|
21943
|
+
}
|
|
21625
21944
|
allocateDataSlot() {
|
|
21626
21945
|
return this._dataIndex++;
|
|
21627
21946
|
}
|
|
21628
21947
|
visitForLoopBlock(block) {
|
|
21629
21948
|
const blockIndex = this.allocateDataSlot();
|
|
21949
|
+
const { tagName, attrsExprs } = this.inferProjectionDataFromInsertionPoint(block);
|
|
21630
21950
|
const primaryData = this.prepareEmbeddedTemplateFn(block.children, "_For", [block.item, block.contextVariables.$index, block.contextVariables.$count]);
|
|
21631
21951
|
const { expression: trackByExpression, usesComponentInstance: trackByUsesComponentInstance } = this.createTrackByFunction(block);
|
|
21632
21952
|
let emptyData = null;
|
|
@@ -21641,6 +21961,8 @@ var TemplateDefinitionBuilder = class {
|
|
|
21641
21961
|
variable(primaryData.name),
|
|
21642
21962
|
literal(primaryData.getConstCount()),
|
|
21643
21963
|
literal(primaryData.getVarCount()),
|
|
21964
|
+
literal(tagName),
|
|
21965
|
+
this.addAttrsToConsts(attrsExprs || null),
|
|
21644
21966
|
trackByExpression
|
|
21645
21967
|
];
|
|
21646
21968
|
if (emptyData !== null) {
|
|
@@ -22007,9 +22329,9 @@ function pureFunctionCallInfo(args) {
|
|
|
22007
22329
|
function generateNextContextExpr(relativeLevelDiff) {
|
|
22008
22330
|
return importExpr(Identifiers.nextContext).callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);
|
|
22009
22331
|
}
|
|
22010
|
-
function getLiteralFactory(constantPool, literal2,
|
|
22332
|
+
function getLiteralFactory(constantPool, literal2, allocateSlots2) {
|
|
22011
22333
|
const { literalFactory, literalFactoryArguments } = constantPool.getLiteralFactory(literal2);
|
|
22012
|
-
const startSlot =
|
|
22334
|
+
const startSlot = allocateSlots2(1 + literalFactoryArguments.length);
|
|
22013
22335
|
const { identifier, isVarLength } = pureFunctionCallInfo(literalFactoryArguments);
|
|
22014
22336
|
const args = [literal(startSlot), literalFactory];
|
|
22015
22337
|
if (isVarLength) {
|
|
@@ -22451,7 +22773,7 @@ function createClosureModeGuard2() {
|
|
|
22451
22773
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
22452
22774
|
}
|
|
22453
22775
|
|
|
22454
|
-
// bazel-out/
|
|
22776
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
22455
22777
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
22456
22778
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
22457
22779
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23053,7 +23375,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
23053
23375
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
23054
23376
|
}
|
|
23055
23377
|
|
|
23056
|
-
// bazel-out/
|
|
23378
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
23057
23379
|
var R3TargetBinder = class {
|
|
23058
23380
|
constructor(directiveMatcher) {
|
|
23059
23381
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -23062,14 +23384,14 @@ var R3TargetBinder = class {
|
|
|
23062
23384
|
if (!target.template) {
|
|
23063
23385
|
throw new Error("Binding without a template not yet supported");
|
|
23064
23386
|
}
|
|
23065
|
-
const scope =
|
|
23387
|
+
const scope = Scope2.apply(target.template);
|
|
23066
23388
|
const scopedNodeEntities = extractScopedNodeEntities(scope);
|
|
23067
23389
|
const { directives, eagerDirectives, bindings, references } = DirectiveBinder.apply(target.template, this.directiveMatcher);
|
|
23068
23390
|
const { expressions, symbols, nestingLevel, usedPipes, eagerPipes, deferBlocks } = TemplateBinder.applyWithScope(target.template, scope);
|
|
23069
23391
|
return new R3BoundTarget(target, directives, eagerDirectives, bindings, references, expressions, symbols, nestingLevel, scopedNodeEntities, usedPipes, eagerPipes, deferBlocks);
|
|
23070
23392
|
}
|
|
23071
23393
|
};
|
|
23072
|
-
var
|
|
23394
|
+
var Scope2 = class {
|
|
23073
23395
|
constructor(parentScope, rootNode) {
|
|
23074
23396
|
this.parentScope = parentScope;
|
|
23075
23397
|
this.rootNode = rootNode;
|
|
@@ -23078,10 +23400,10 @@ var Scope = class {
|
|
|
23078
23400
|
this.isDeferred = parentScope !== null && parentScope.isDeferred ? true : rootNode instanceof DeferredBlock;
|
|
23079
23401
|
}
|
|
23080
23402
|
static newRootScope() {
|
|
23081
|
-
return new
|
|
23403
|
+
return new Scope2(null, null);
|
|
23082
23404
|
}
|
|
23083
23405
|
static apply(template2) {
|
|
23084
|
-
const scope =
|
|
23406
|
+
const scope = Scope2.newRootScope();
|
|
23085
23407
|
scope.ingest(template2);
|
|
23086
23408
|
return scope;
|
|
23087
23409
|
}
|
|
@@ -23194,7 +23516,7 @@ var Scope = class {
|
|
|
23194
23516
|
return res;
|
|
23195
23517
|
}
|
|
23196
23518
|
ingestScopedNode(node) {
|
|
23197
|
-
const scope = new
|
|
23519
|
+
const scope = new Scope2(this, node);
|
|
23198
23520
|
scope.ingest(node);
|
|
23199
23521
|
this.childScopes.set(node, scope);
|
|
23200
23522
|
}
|
|
@@ -23576,8 +23898,21 @@ var R3BoundTarget = class {
|
|
|
23576
23898
|
}
|
|
23577
23899
|
const name = trigger.reference;
|
|
23578
23900
|
if (name === null) {
|
|
23579
|
-
|
|
23580
|
-
|
|
23901
|
+
let trigger2 = null;
|
|
23902
|
+
if (block.placeholder !== null) {
|
|
23903
|
+
for (const child of block.placeholder.children) {
|
|
23904
|
+
if (child instanceof Comment) {
|
|
23905
|
+
continue;
|
|
23906
|
+
}
|
|
23907
|
+
if (trigger2 !== null) {
|
|
23908
|
+
return null;
|
|
23909
|
+
}
|
|
23910
|
+
if (child instanceof Element) {
|
|
23911
|
+
trigger2 = child;
|
|
23912
|
+
}
|
|
23913
|
+
}
|
|
23914
|
+
}
|
|
23915
|
+
return trigger2;
|
|
23581
23916
|
}
|
|
23582
23917
|
const outsideRef = this.findEntityInScope(block, name);
|
|
23583
23918
|
if (outsideRef instanceof Reference && this.getDefinitionNodeOfSymbol(outsideRef) !== block) {
|
|
@@ -23645,11 +23980,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
23645
23980
|
return templateEntities;
|
|
23646
23981
|
}
|
|
23647
23982
|
|
|
23648
|
-
// bazel-out/
|
|
23983
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
23649
23984
|
var ResourceLoader = class {
|
|
23650
23985
|
};
|
|
23651
23986
|
|
|
23652
|
-
// bazel-out/
|
|
23987
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
23653
23988
|
var CompilerFacadeImpl = class {
|
|
23654
23989
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
23655
23990
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -23889,7 +24224,7 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
23889
24224
|
});
|
|
23890
24225
|
}
|
|
23891
24226
|
function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
23892
|
-
var _a2, _b2, _c2, _d2, _e2, _f2,
|
|
24227
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i;
|
|
23893
24228
|
return {
|
|
23894
24229
|
name: declaration.type.name,
|
|
23895
24230
|
type: wrapReference(declaration.type),
|
|
@@ -23903,11 +24238,11 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
|
23903
24238
|
providers: declaration.providers !== void 0 ? new WrappedNodeExpr(declaration.providers) : null,
|
|
23904
24239
|
exportAs: (_e2 = declaration.exportAs) != null ? _e2 : null,
|
|
23905
24240
|
usesInheritance: (_f2 = declaration.usesInheritance) != null ? _f2 : false,
|
|
23906
|
-
lifecycle: { usesOnChanges: (
|
|
24241
|
+
lifecycle: { usesOnChanges: (_g = declaration.usesOnChanges) != null ? _g : false },
|
|
23907
24242
|
deps: null,
|
|
23908
24243
|
typeArgumentCount: 0,
|
|
23909
24244
|
fullInheritance: false,
|
|
23910
|
-
isStandalone: (
|
|
24245
|
+
isStandalone: (_h = declaration.isStandalone) != null ? _h : false,
|
|
23911
24246
|
isSignal: (_i = declaration.isSignal) != null ? _i : false,
|
|
23912
24247
|
hostDirectives: convertHostDirectivesToMetadata(declaration)
|
|
23913
24248
|
};
|
|
@@ -24201,17 +24536,17 @@ function publishFacade(global) {
|
|
|
24201
24536
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24202
24537
|
}
|
|
24203
24538
|
|
|
24204
|
-
// bazel-out/
|
|
24205
|
-
var VERSION2 = new Version("17.0.0-rc.
|
|
24539
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
24540
|
+
var VERSION2 = new Version("17.0.0-rc.2");
|
|
24206
24541
|
|
|
24207
|
-
// bazel-out/
|
|
24542
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
24208
24543
|
var _VisitorMode;
|
|
24209
24544
|
(function(_VisitorMode2) {
|
|
24210
24545
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
24211
24546
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
24212
24547
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
24213
24548
|
|
|
24214
|
-
// bazel-out/
|
|
24549
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
24215
24550
|
var XmlTagDefinition = class {
|
|
24216
24551
|
constructor() {
|
|
24217
24552
|
this.closedByParent = false;
|
|
@@ -24233,7 +24568,7 @@ var XmlTagDefinition = class {
|
|
|
24233
24568
|
};
|
|
24234
24569
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
24235
24570
|
|
|
24236
|
-
// bazel-out/
|
|
24571
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
24237
24572
|
var FactoryTarget2;
|
|
24238
24573
|
(function(FactoryTarget3) {
|
|
24239
24574
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -24243,10 +24578,10 @@ var FactoryTarget2;
|
|
|
24243
24578
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
24244
24579
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
24245
24580
|
|
|
24246
|
-
// bazel-out/
|
|
24581
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
24247
24582
|
publishFacade(_global);
|
|
24248
24583
|
|
|
24249
|
-
// bazel-out/
|
|
24584
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
|
|
24250
24585
|
var import_path2 = require("path");
|
|
24251
24586
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
24252
24587
|
var REPLACEMENTS2 = {
|
|
@@ -24354,7 +24689,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
24354
24689
|
});
|
|
24355
24690
|
}
|
|
24356
24691
|
|
|
24357
|
-
// bazel-out/
|
|
24692
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
24358
24693
|
function block_template_entities_default() {
|
|
24359
24694
|
return (tree) => __async(this, null, function* () {
|
|
24360
24695
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|