@angular/core 17.0.5 → 17.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/src/hydration/annotate.mjs +30 -20
- package/esm2022/src/hydration/interfaces.mjs +1 -1
- package/esm2022/src/hydration/node_lookup_utils.mjs +23 -2
- package/esm2022/src/render3/node_manipulation.mjs +2 -2
- package/esm2022/src/render3/view_manipulation.mjs +13 -5
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +64 -25
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +6 -1
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +746 -396
- 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 +876 -435
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +1133 -673
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
|
@@ -63,7 +63,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
// bazel-out/
|
|
66
|
+
// bazel-out/darwin-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-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-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-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-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-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-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-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}]`);
|
|
@@ -816,7 +816,7 @@ function wordAt(bytes, index, endian) {
|
|
|
816
816
|
return word;
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
-
// bazel-out/
|
|
819
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
820
820
|
var TypeModifier;
|
|
821
821
|
(function(TypeModifier2) {
|
|
822
822
|
TypeModifier2[TypeModifier2["None"] = 0] = "None";
|
|
@@ -1771,7 +1771,7 @@ function serializeTags(tags) {
|
|
|
1771
1771
|
return out;
|
|
1772
1772
|
}
|
|
1773
1773
|
|
|
1774
|
-
// bazel-out/
|
|
1774
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/constant_pool.mjs
|
|
1775
1775
|
var CONSTANT_PREFIX = "_c";
|
|
1776
1776
|
var UNKNOWN_VALUE_KEY = variable("<unknown>");
|
|
1777
1777
|
var KEY_CONTEXT = {};
|
|
@@ -1954,7 +1954,7 @@ function isLongStringLiteral(expr) {
|
|
|
1954
1954
|
return expr instanceof LiteralExpr && typeof expr.value === "string" && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS;
|
|
1955
1955
|
}
|
|
1956
1956
|
|
|
1957
|
-
// bazel-out/
|
|
1957
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_identifiers.mjs
|
|
1958
1958
|
var CORE = "@angular/core";
|
|
1959
1959
|
var _Identifiers = class {
|
|
1960
1960
|
};
|
|
@@ -2587,7 +2587,7 @@ var Identifiers = _Identifiers;
|
|
|
2587
2587
|
_Identifiers.validateIframeAttribute = { name: "\u0275\u0275validateIframeAttribute", moduleName: CORE };
|
|
2588
2588
|
})();
|
|
2589
2589
|
|
|
2590
|
-
// bazel-out/
|
|
2590
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/util.mjs
|
|
2591
2591
|
var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
|
|
2592
2592
|
function dashCaseToCamelCase(input) {
|
|
2593
2593
|
return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());
|
|
@@ -2675,7 +2675,7 @@ function partitionArray(arr, conditionFn) {
|
|
|
2675
2675
|
return [truthy, falsy];
|
|
2676
2676
|
}
|
|
2677
2677
|
|
|
2678
|
-
// bazel-out/
|
|
2678
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/source_map.mjs
|
|
2679
2679
|
var VERSION = 3;
|
|
2680
2680
|
var JS_B64_PREFIX = "# sourceMappingURL=data:application/json;base64,";
|
|
2681
2681
|
var SourceMapGenerator = class {
|
|
@@ -2804,7 +2804,7 @@ function toBase64Digit(value) {
|
|
|
2804
2804
|
return B64_DIGITS[value];
|
|
2805
2805
|
}
|
|
2806
2806
|
|
|
2807
|
-
// bazel-out/
|
|
2807
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/abstract_emitter.mjs
|
|
2808
2808
|
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
|
2809
2809
|
var _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;
|
|
2810
2810
|
var _INDENT_WITH = " ";
|
|
@@ -3289,7 +3289,7 @@ function _createIndent(count) {
|
|
|
3289
3289
|
return res;
|
|
3290
3290
|
}
|
|
3291
3291
|
|
|
3292
|
-
// bazel-out/
|
|
3292
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/util.mjs
|
|
3293
3293
|
function typeWithParameters(type, numParams) {
|
|
3294
3294
|
if (numParams === 0) {
|
|
3295
3295
|
return expressionType(type);
|
|
@@ -3354,7 +3354,7 @@ function generateForwardRef(expr) {
|
|
|
3354
3354
|
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
3355
3355
|
}
|
|
3356
3356
|
|
|
3357
|
-
// bazel-out/
|
|
3357
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_factory.mjs
|
|
3358
3358
|
var R3FactoryDelegateType;
|
|
3359
3359
|
(function(R3FactoryDelegateType2) {
|
|
3360
3360
|
R3FactoryDelegateType2[R3FactoryDelegateType2["Class"] = 0] = "Class";
|
|
@@ -3499,7 +3499,40 @@ function getInjectFn(target) {
|
|
|
3499
3499
|
}
|
|
3500
3500
|
}
|
|
3501
3501
|
|
|
3502
|
-
// bazel-out/
|
|
3502
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/tags.mjs
|
|
3503
|
+
var TagContentType;
|
|
3504
|
+
(function(TagContentType2) {
|
|
3505
|
+
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
3506
|
+
TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
|
|
3507
|
+
TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
|
|
3508
|
+
})(TagContentType || (TagContentType = {}));
|
|
3509
|
+
function splitNsName(elementName) {
|
|
3510
|
+
if (elementName[0] != ":") {
|
|
3511
|
+
return [null, elementName];
|
|
3512
|
+
}
|
|
3513
|
+
const colonIndex = elementName.indexOf(":", 1);
|
|
3514
|
+
if (colonIndex === -1) {
|
|
3515
|
+
throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
|
|
3516
|
+
}
|
|
3517
|
+
return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
|
|
3518
|
+
}
|
|
3519
|
+
function isNgContainer(tagName) {
|
|
3520
|
+
return splitNsName(tagName)[1] === "ng-container";
|
|
3521
|
+
}
|
|
3522
|
+
function isNgContent(tagName) {
|
|
3523
|
+
return splitNsName(tagName)[1] === "ng-content";
|
|
3524
|
+
}
|
|
3525
|
+
function isNgTemplate(tagName) {
|
|
3526
|
+
return splitNsName(tagName)[1] === "ng-template";
|
|
3527
|
+
}
|
|
3528
|
+
function getNsPrefix(fullName) {
|
|
3529
|
+
return fullName === null ? null : splitNsName(fullName)[0];
|
|
3530
|
+
}
|
|
3531
|
+
function mergeNsAndName(prefix, localName) {
|
|
3532
|
+
return prefix ? `:${prefix}:${localName}` : localName;
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3535
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_ast.mjs
|
|
3503
3536
|
var Comment = class {
|
|
3504
3537
|
constructor(value, sourceSpan) {
|
|
3505
3538
|
this.value = value;
|
|
@@ -3880,7 +3913,7 @@ function visitAll(visitor, nodes) {
|
|
|
3880
3913
|
return result;
|
|
3881
3914
|
}
|
|
3882
3915
|
|
|
3883
|
-
// bazel-out/
|
|
3916
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/i18n_ast.mjs
|
|
3884
3917
|
var Message = class {
|
|
3885
3918
|
constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) {
|
|
3886
3919
|
this.nodes = nodes;
|
|
@@ -4040,7 +4073,7 @@ var LocalizeMessageStringVisitor = class {
|
|
|
4040
4073
|
}
|
|
4041
4074
|
};
|
|
4042
4075
|
|
|
4043
|
-
// bazel-out/
|
|
4076
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/serializers/xml_helper.mjs
|
|
4044
4077
|
var _Visitor = class {
|
|
4045
4078
|
visitTag(tag) {
|
|
4046
4079
|
const strAttrs = this._serializeAttributes(tag.attrs);
|
|
@@ -4068,12 +4101,12 @@ ${doctype.dtd}
|
|
|
4068
4101
|
};
|
|
4069
4102
|
var _visitor = new _Visitor();
|
|
4070
4103
|
|
|
4071
|
-
// bazel-out/
|
|
4104
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/serializers/xmb.mjs
|
|
4072
4105
|
function toPublicName(internalName) {
|
|
4073
4106
|
return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
|
|
4074
4107
|
}
|
|
4075
4108
|
|
|
4076
|
-
// bazel-out/
|
|
4109
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/util.mjs
|
|
4077
4110
|
var CLOSURE_TRANSLATION_VAR_PREFIX = "MSG_";
|
|
4078
4111
|
var TRANSLATION_VAR_PREFIX = "i18n_";
|
|
4079
4112
|
var I18N_ATTR = "i18n";
|
|
@@ -4175,7 +4208,7 @@ function declareI18nVariable(variable2) {
|
|
|
4175
4208
|
return new DeclareVarStmt(variable2.name, void 0, INFERRED_TYPE, void 0, variable2.sourceSpan);
|
|
4176
4209
|
}
|
|
4177
4210
|
|
|
4178
|
-
// bazel-out/
|
|
4211
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/util.mjs
|
|
4179
4212
|
var UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
|
|
4180
4213
|
var TEMPORARY_NAME = "_t";
|
|
4181
4214
|
var CONTEXT_NAME = "ctx";
|
|
@@ -4342,6 +4375,23 @@ var DefinitionMap = class {
|
|
|
4342
4375
|
return literalMap(this.values);
|
|
4343
4376
|
}
|
|
4344
4377
|
};
|
|
4378
|
+
function createCssSelectorFromNode(node) {
|
|
4379
|
+
const elementName = node instanceof Element ? node.name : "ng-template";
|
|
4380
|
+
const attributes = getAttrsForDirectiveMatching(node);
|
|
4381
|
+
const cssSelector = new CssSelector();
|
|
4382
|
+
const elementNameNoNs = splitNsName(elementName)[1];
|
|
4383
|
+
cssSelector.setElement(elementNameNoNs);
|
|
4384
|
+
Object.getOwnPropertyNames(attributes).forEach((name) => {
|
|
4385
|
+
const nameNoNs = splitNsName(name)[1];
|
|
4386
|
+
const value = attributes[name];
|
|
4387
|
+
cssSelector.addAttribute(nameNoNs, value);
|
|
4388
|
+
if (name.toLowerCase() === "class") {
|
|
4389
|
+
const classes = value.trim().split(/\s+/);
|
|
4390
|
+
classes.forEach((className) => cssSelector.addClassName(className));
|
|
4391
|
+
}
|
|
4392
|
+
});
|
|
4393
|
+
return cssSelector;
|
|
4394
|
+
}
|
|
4345
4395
|
function getAttrsForDirectiveMatching(elOrTpl) {
|
|
4346
4396
|
const attributesMap = {};
|
|
4347
4397
|
if (elOrTpl instanceof Template && elOrTpl.tagName !== "ng-template") {
|
|
@@ -4398,7 +4448,7 @@ function getInstructionStatements(instructions) {
|
|
|
4398
4448
|
return statements;
|
|
4399
4449
|
}
|
|
4400
4450
|
|
|
4401
|
-
// bazel-out/
|
|
4451
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/injectable_compiler_2.mjs
|
|
4402
4452
|
function compileInjectable(meta, resolveForwardRefs) {
|
|
4403
4453
|
let result = null;
|
|
4404
4454
|
const factoryMeta = {
|
|
@@ -4483,7 +4533,7 @@ function createFactoryFunction(type) {
|
|
|
4483
4533
|
return arrowFn([new FnParam("t", DYNAMIC_TYPE)], type.prop("\u0275fac").callFn([variable("t")]));
|
|
4484
4534
|
}
|
|
4485
4535
|
|
|
4486
|
-
// bazel-out/
|
|
4536
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
4487
4537
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
4488
4538
|
/^\s*$/,
|
|
4489
4539
|
/[<>]/,
|
|
@@ -4505,7 +4555,7 @@ function assertInterpolationSymbols(identifier, value) {
|
|
|
4505
4555
|
}
|
|
4506
4556
|
}
|
|
4507
4557
|
|
|
4508
|
-
// bazel-out/
|
|
4558
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/defaults.mjs
|
|
4509
4559
|
var InterpolationConfig = class {
|
|
4510
4560
|
static fromArray(markers) {
|
|
4511
4561
|
if (!markers) {
|
|
@@ -4522,7 +4572,7 @@ var InterpolationConfig = class {
|
|
|
4522
4572
|
var DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig("{{", "}}");
|
|
4523
4573
|
var DEFAULT_CONTAINER_BLOCKS = /* @__PURE__ */ new Set(["switch"]);
|
|
4524
4574
|
|
|
4525
|
-
// bazel-out/
|
|
4575
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/chars.mjs
|
|
4526
4576
|
var $EOF = 0;
|
|
4527
4577
|
var $BSPACE = 8;
|
|
4528
4578
|
var $TAB = 9;
|
|
@@ -4604,7 +4654,7 @@ function isQuote(code) {
|
|
|
4604
4654
|
return code === $SQ || code === $DQ || code === $BT;
|
|
4605
4655
|
}
|
|
4606
4656
|
|
|
4607
|
-
// bazel-out/
|
|
4657
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/parse_util.mjs
|
|
4608
4658
|
var ParseLocation = class {
|
|
4609
4659
|
constructor(file, offset, line, col) {
|
|
4610
4660
|
this.file = file;
|
|
@@ -4751,7 +4801,7 @@ function sanitizeIdentifier(name) {
|
|
|
4751
4801
|
return name.replace(/\W/g, "_");
|
|
4752
4802
|
}
|
|
4753
4803
|
|
|
4754
|
-
// bazel-out/
|
|
4804
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/abstract_js_emitter.mjs
|
|
4755
4805
|
var makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})';
|
|
4756
4806
|
var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
4757
4807
|
constructor() {
|
|
@@ -4844,7 +4894,7 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
4844
4894
|
}
|
|
4845
4895
|
};
|
|
4846
4896
|
|
|
4847
|
-
// bazel-out/
|
|
4897
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/output_jit_trusted_types.mjs
|
|
4848
4898
|
var policy;
|
|
4849
4899
|
function getPolicy() {
|
|
4850
4900
|
if (policy === void 0) {
|
|
@@ -4882,7 +4932,7 @@ function newTrustedFunctionForJIT(...args) {
|
|
|
4882
4932
|
return fn2.bind(_global);
|
|
4883
4933
|
}
|
|
4884
4934
|
|
|
4885
|
-
// bazel-out/
|
|
4935
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/output_jit.mjs
|
|
4886
4936
|
var JitEvaluator = class {
|
|
4887
4937
|
evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) {
|
|
4888
4938
|
const converter = new JitEmitterVisitor(refResolver);
|
|
@@ -4973,7 +5023,7 @@ function isUseStrictStatement(statement) {
|
|
|
4973
5023
|
return statement.isEquivalent(literal("use strict").toStmt());
|
|
4974
5024
|
}
|
|
4975
5025
|
|
|
4976
|
-
// bazel-out/
|
|
5026
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_injector_compiler.mjs
|
|
4977
5027
|
function compileInjector(meta) {
|
|
4978
5028
|
const definitionMap = new DefinitionMap();
|
|
4979
5029
|
if (meta.providers !== null) {
|
|
@@ -4990,7 +5040,7 @@ function createInjectorType(meta) {
|
|
|
4990
5040
|
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
4991
5041
|
}
|
|
4992
5042
|
|
|
4993
|
-
// bazel-out/
|
|
5043
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_jit.mjs
|
|
4994
5044
|
var R3JitReflector = class {
|
|
4995
5045
|
constructor(context) {
|
|
4996
5046
|
this.context = context;
|
|
@@ -5006,7 +5056,7 @@ var R3JitReflector = class {
|
|
|
5006
5056
|
}
|
|
5007
5057
|
};
|
|
5008
5058
|
|
|
5009
|
-
// bazel-out/
|
|
5059
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_module_compiler.mjs
|
|
5010
5060
|
var R3SelectorScopeMode;
|
|
5011
5061
|
(function(R3SelectorScopeMode2) {
|
|
5012
5062
|
R3SelectorScopeMode2[R3SelectorScopeMode2["Inline"] = 0] = "Inline";
|
|
@@ -5147,7 +5197,7 @@ function tupleOfTypes(types) {
|
|
|
5147
5197
|
return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE;
|
|
5148
5198
|
}
|
|
5149
5199
|
|
|
5150
|
-
// bazel-out/
|
|
5200
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_pipe_compiler.mjs
|
|
5151
5201
|
function compilePipeFromMetadata(metadata) {
|
|
5152
5202
|
const definitionMapValues = [];
|
|
5153
5203
|
definitionMapValues.push({ key: "name", value: literal(metadata.pipeName), quoted: false });
|
|
@@ -5168,7 +5218,7 @@ function createPipeType(metadata) {
|
|
|
5168
5218
|
]));
|
|
5169
5219
|
}
|
|
5170
5220
|
|
|
5171
|
-
// bazel-out/
|
|
5221
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/api.mjs
|
|
5172
5222
|
var R3TemplateDependencyKind;
|
|
5173
5223
|
(function(R3TemplateDependencyKind2) {
|
|
5174
5224
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["Directive"] = 0] = "Directive";
|
|
@@ -5176,7 +5226,7 @@ var R3TemplateDependencyKind;
|
|
|
5176
5226
|
R3TemplateDependencyKind2[R3TemplateDependencyKind2["NgModule"] = 2] = "NgModule";
|
|
5177
5227
|
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
5178
5228
|
|
|
5179
|
-
// bazel-out/
|
|
5229
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/expression_parser/ast.mjs
|
|
5180
5230
|
var ParserError = class {
|
|
5181
5231
|
constructor(message, input, errLocation, ctxLocation) {
|
|
5182
5232
|
this.input = input;
|
|
@@ -5842,7 +5892,7 @@ var BoundElementProperty = class {
|
|
|
5842
5892
|
}
|
|
5843
5893
|
};
|
|
5844
5894
|
|
|
5845
|
-
// bazel-out/
|
|
5895
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/compiler_util/expression_converter.mjs
|
|
5846
5896
|
var _EventHandlerVars = class {
|
|
5847
5897
|
};
|
|
5848
5898
|
var EventHandlerVars = _EventHandlerVars;
|
|
@@ -6483,7 +6533,7 @@ var BuiltinFunctionCall = class extends Call {
|
|
|
6483
6533
|
}
|
|
6484
6534
|
};
|
|
6485
6535
|
|
|
6486
|
-
// bazel-out/
|
|
6536
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/dom_security_schema.mjs
|
|
6487
6537
|
var _SECURITY_SCHEMA;
|
|
6488
6538
|
function SECURITY_SCHEMA() {
|
|
6489
6539
|
if (!_SECURITY_SCHEMA) {
|
|
@@ -6541,7 +6591,7 @@ function isIframeSecuritySensitiveAttr(attrName) {
|
|
|
6541
6591
|
return IFRAME_SECURITY_SENSITIVE_ATTRS.has(attrName.toLowerCase());
|
|
6542
6592
|
}
|
|
6543
6593
|
|
|
6544
|
-
// bazel-out/
|
|
6594
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/shadow_css.mjs
|
|
6545
6595
|
var animationKeywords = /* @__PURE__ */ new Set([
|
|
6546
6596
|
"inherit",
|
|
6547
6597
|
"initial",
|
|
@@ -7012,7 +7062,7 @@ function repeatGroups(groups, multiples) {
|
|
|
7012
7062
|
}
|
|
7013
7063
|
}
|
|
7014
7064
|
|
|
7015
|
-
// bazel-out/
|
|
7065
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/enums.mjs
|
|
7016
7066
|
var OpKind;
|
|
7017
7067
|
(function(OpKind2) {
|
|
7018
7068
|
OpKind2[OpKind2["ListEnd"] = 0] = "ListEnd";
|
|
@@ -7059,6 +7109,7 @@ var OpKind;
|
|
|
7059
7109
|
OpKind2[OpKind2["IcuStart"] = 41] = "IcuStart";
|
|
7060
7110
|
OpKind2[OpKind2["IcuEnd"] = 42] = "IcuEnd";
|
|
7061
7111
|
OpKind2[OpKind2["I18nContext"] = 43] = "I18nContext";
|
|
7112
|
+
OpKind2[OpKind2["I18nAttributes"] = 44] = "I18nAttributes";
|
|
7062
7113
|
})(OpKind || (OpKind = {}));
|
|
7063
7114
|
var ExpressionKind;
|
|
7064
7115
|
(function(ExpressionKind2) {
|
|
@@ -7135,6 +7186,11 @@ var I18nParamResolutionTime;
|
|
|
7135
7186
|
I18nParamResolutionTime2[I18nParamResolutionTime2["Creation"] = 0] = "Creation";
|
|
7136
7187
|
I18nParamResolutionTime2[I18nParamResolutionTime2["Postproccessing"] = 1] = "Postproccessing";
|
|
7137
7188
|
})(I18nParamResolutionTime || (I18nParamResolutionTime = {}));
|
|
7189
|
+
var I18nExpressionFor;
|
|
7190
|
+
(function(I18nExpressionFor2) {
|
|
7191
|
+
I18nExpressionFor2[I18nExpressionFor2["I18nText"] = 0] = "I18nText";
|
|
7192
|
+
I18nExpressionFor2[I18nExpressionFor2["I18nAttribute"] = 1] = "I18nAttribute";
|
|
7193
|
+
})(I18nExpressionFor || (I18nExpressionFor = {}));
|
|
7138
7194
|
var I18nParamValueFlags;
|
|
7139
7195
|
(function(I18nParamValueFlags2) {
|
|
7140
7196
|
I18nParamValueFlags2[I18nParamValueFlags2["None"] = 0] = "None";
|
|
@@ -7170,9 +7226,16 @@ var I18nContextKind;
|
|
|
7170
7226
|
(function(I18nContextKind2) {
|
|
7171
7227
|
I18nContextKind2[I18nContextKind2["RootI18n"] = 0] = "RootI18n";
|
|
7172
7228
|
I18nContextKind2[I18nContextKind2["Icu"] = 1] = "Icu";
|
|
7229
|
+
I18nContextKind2[I18nContextKind2["Attr"] = 2] = "Attr";
|
|
7173
7230
|
})(I18nContextKind || (I18nContextKind = {}));
|
|
7231
|
+
var TemplateKind;
|
|
7232
|
+
(function(TemplateKind2) {
|
|
7233
|
+
TemplateKind2[TemplateKind2["NgTemplate"] = 0] = "NgTemplate";
|
|
7234
|
+
TemplateKind2[TemplateKind2["Structural"] = 1] = "Structural";
|
|
7235
|
+
TemplateKind2[TemplateKind2["Block"] = 2] = "Block";
|
|
7236
|
+
})(TemplateKind || (TemplateKind = {}));
|
|
7174
7237
|
|
|
7175
|
-
// bazel-out/
|
|
7238
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/traits.mjs
|
|
7176
7239
|
var ConsumesSlot = Symbol("ConsumesSlot");
|
|
7177
7240
|
var DependsOnSlotContext = Symbol("DependsOnSlotContext");
|
|
7178
7241
|
var ConsumesVarsTrait = Symbol("ConsumesVars");
|
|
@@ -7204,7 +7267,7 @@ function hasUsesVarOffsetTrait(expr) {
|
|
|
7204
7267
|
return expr[UsesVarOffset] === true;
|
|
7205
7268
|
}
|
|
7206
7269
|
|
|
7207
|
-
// bazel-out/
|
|
7270
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/shared.mjs
|
|
7208
7271
|
function createStatementOp(statement) {
|
|
7209
7272
|
return __spreadValues({
|
|
7210
7273
|
kind: OpKind.Statement,
|
|
@@ -7226,23 +7289,26 @@ var NEW_OP = {
|
|
|
7226
7289
|
next: null
|
|
7227
7290
|
};
|
|
7228
7291
|
|
|
7229
|
-
// bazel-out/
|
|
7230
|
-
function createInterpolateTextOp(xref, interpolation,
|
|
7292
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/update.mjs
|
|
7293
|
+
function createInterpolateTextOp(xref, interpolation, sourceSpan) {
|
|
7231
7294
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7232
7295
|
kind: OpKind.InterpolateText,
|
|
7233
7296
|
target: xref,
|
|
7234
7297
|
interpolation,
|
|
7235
|
-
i18nPlaceholders,
|
|
7236
7298
|
sourceSpan
|
|
7237
7299
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7238
7300
|
}
|
|
7239
7301
|
var Interpolation2 = class {
|
|
7240
|
-
constructor(strings, expressions) {
|
|
7302
|
+
constructor(strings, expressions, i18nPlaceholders) {
|
|
7241
7303
|
this.strings = strings;
|
|
7242
7304
|
this.expressions = expressions;
|
|
7305
|
+
this.i18nPlaceholders = i18nPlaceholders;
|
|
7306
|
+
if (i18nPlaceholders.length !== 0 && i18nPlaceholders.length !== expressions.length) {
|
|
7307
|
+
throw new Error(`Expected ${expressions.length} placeholders to match interpolation expression count, but got ${i18nPlaceholders.length}`);
|
|
7308
|
+
}
|
|
7243
7309
|
}
|
|
7244
7310
|
};
|
|
7245
|
-
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute,
|
|
7311
|
+
function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute, isStructuralTemplate, i18nContext, sourceSpan) {
|
|
7246
7312
|
return __spreadValues({
|
|
7247
7313
|
kind: OpKind.Binding,
|
|
7248
7314
|
bindingKind: kind,
|
|
@@ -7252,11 +7318,12 @@ function createBindingOp(target, kind, name, expression, unit, securityContext,
|
|
|
7252
7318
|
unit,
|
|
7253
7319
|
securityContext,
|
|
7254
7320
|
isTextAttribute,
|
|
7255
|
-
|
|
7321
|
+
isStructuralTemplate,
|
|
7322
|
+
i18nContext,
|
|
7256
7323
|
sourceSpan
|
|
7257
7324
|
}, NEW_OP);
|
|
7258
7325
|
}
|
|
7259
|
-
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext,
|
|
7326
|
+
function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplate, i18nContext, sourceSpan) {
|
|
7260
7327
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7261
7328
|
kind: OpKind.Property,
|
|
7262
7329
|
target,
|
|
@@ -7265,7 +7332,8 @@ function createPropertyOp(target, name, expression, isAnimationTrigger, security
|
|
|
7265
7332
|
isAnimationTrigger,
|
|
7266
7333
|
securityContext,
|
|
7267
7334
|
sanitizer: null,
|
|
7268
|
-
|
|
7335
|
+
isStructuralTemplate,
|
|
7336
|
+
i18nContext,
|
|
7269
7337
|
sourceSpan
|
|
7270
7338
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7271
7339
|
}
|
|
@@ -7304,7 +7372,7 @@ function createClassMapOp(xref, expression, sourceSpan) {
|
|
|
7304
7372
|
sourceSpan
|
|
7305
7373
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7306
7374
|
}
|
|
7307
|
-
function createAttributeOp(target, name, expression, securityContext, isTextAttribute,
|
|
7375
|
+
function createAttributeOp(target, name, expression, securityContext, isTextAttribute, isStructuralTemplate, i18nContext, sourceSpan) {
|
|
7308
7376
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7309
7377
|
kind: OpKind.Attribute,
|
|
7310
7378
|
target,
|
|
@@ -7313,7 +7381,8 @@ function createAttributeOp(target, name, expression, securityContext, isTextAttr
|
|
|
7313
7381
|
securityContext,
|
|
7314
7382
|
sanitizer: null,
|
|
7315
7383
|
isTextAttribute,
|
|
7316
|
-
|
|
7384
|
+
isStructuralTemplate,
|
|
7385
|
+
i18nContext,
|
|
7317
7386
|
sourceSpan
|
|
7318
7387
|
}, TRAIT_DEPENDS_ON_SLOT_CONTEXT), TRAIT_CONSUMES_VARS), NEW_OP);
|
|
7319
7388
|
}
|
|
@@ -7354,28 +7423,31 @@ function createDeferWhenOp(target, expr, prefetch, sourceSpan) {
|
|
|
7354
7423
|
sourceSpan
|
|
7355
7424
|
}, NEW_OP), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7356
7425
|
}
|
|
7357
|
-
function createI18nExpressionOp(context, target, handle, expression, i18nPlaceholder, resolutionTime, sourceSpan) {
|
|
7426
|
+
function createI18nExpressionOp(context, target, i18nOwner, handle, expression, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) {
|
|
7358
7427
|
return __spreadValues(__spreadValues(__spreadValues({
|
|
7359
7428
|
kind: OpKind.I18nExpression,
|
|
7360
7429
|
context,
|
|
7361
7430
|
target,
|
|
7431
|
+
i18nOwner,
|
|
7362
7432
|
handle,
|
|
7363
7433
|
expression,
|
|
7364
7434
|
i18nPlaceholder,
|
|
7365
7435
|
resolutionTime,
|
|
7436
|
+
usage,
|
|
7437
|
+
name,
|
|
7366
7438
|
sourceSpan
|
|
7367
7439
|
}, NEW_OP), TRAIT_CONSUMES_VARS), TRAIT_DEPENDS_ON_SLOT_CONTEXT);
|
|
7368
7440
|
}
|
|
7369
|
-
function createI18nApplyOp(
|
|
7441
|
+
function createI18nApplyOp(owner, handle, sourceSpan) {
|
|
7370
7442
|
return __spreadValues({
|
|
7371
7443
|
kind: OpKind.I18nApply,
|
|
7372
|
-
|
|
7444
|
+
owner,
|
|
7373
7445
|
handle,
|
|
7374
7446
|
sourceSpan
|
|
7375
7447
|
}, NEW_OP);
|
|
7376
7448
|
}
|
|
7377
7449
|
|
|
7378
|
-
// bazel-out/
|
|
7450
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/expression.mjs
|
|
7379
7451
|
var _a;
|
|
7380
7452
|
var _b;
|
|
7381
7453
|
var _c;
|
|
@@ -8145,6 +8217,7 @@ function transformExpressionsInOp(op, transform2, flags) {
|
|
|
8145
8217
|
case OpKind.ProjectionDef:
|
|
8146
8218
|
case OpKind.Template:
|
|
8147
8219
|
case OpKind.Text:
|
|
8220
|
+
case OpKind.I18nAttributes:
|
|
8148
8221
|
break;
|
|
8149
8222
|
default:
|
|
8150
8223
|
throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`);
|
|
@@ -8156,6 +8229,8 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
8156
8229
|
} else if (expr instanceof BinaryOperatorExpr) {
|
|
8157
8230
|
expr.lhs = transformExpressionsInExpression(expr.lhs, transform2, flags);
|
|
8158
8231
|
expr.rhs = transformExpressionsInExpression(expr.rhs, transform2, flags);
|
|
8232
|
+
} else if (expr instanceof UnaryOperatorExpr) {
|
|
8233
|
+
expr.expr = transformExpressionsInExpression(expr.expr, transform2, flags);
|
|
8159
8234
|
} else if (expr instanceof ReadPropExpr) {
|
|
8160
8235
|
expr.receiver = transformExpressionsInExpression(expr.receiver, transform2, flags);
|
|
8161
8236
|
} else if (expr instanceof ReadKeyExpr) {
|
|
@@ -8195,6 +8270,8 @@ function transformExpressionsInExpression(expr, transform2, flags) {
|
|
|
8195
8270
|
for (let i = 0; i < expr.expressions.length; i++) {
|
|
8196
8271
|
expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform2, flags);
|
|
8197
8272
|
}
|
|
8273
|
+
} else if (expr instanceof NotExpr) {
|
|
8274
|
+
expr.condition = transformExpressionsInExpression(expr.condition, transform2, flags);
|
|
8198
8275
|
} else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) {
|
|
8199
8276
|
} else {
|
|
8200
8277
|
throw new Error(`Unhandled expression kind: ${expr.constructor.name}`);
|
|
@@ -8226,7 +8303,7 @@ function isStringLiteral(expr) {
|
|
|
8226
8303
|
return expr instanceof LiteralExpr && typeof expr.value === "string";
|
|
8227
8304
|
}
|
|
8228
8305
|
|
|
8229
|
-
// bazel-out/
|
|
8306
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/operations.mjs
|
|
8230
8307
|
var _OpList = class {
|
|
8231
8308
|
constructor() {
|
|
8232
8309
|
this.debugListId = _OpList.nextListId++;
|
|
@@ -8417,14 +8494,14 @@ var OpList = _OpList;
|
|
|
8417
8494
|
_OpList.nextListId = 0;
|
|
8418
8495
|
})();
|
|
8419
8496
|
|
|
8420
|
-
// bazel-out/
|
|
8497
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/handle.mjs
|
|
8421
8498
|
var SlotHandle = class {
|
|
8422
8499
|
constructor() {
|
|
8423
8500
|
this.slot = null;
|
|
8424
8501
|
}
|
|
8425
8502
|
};
|
|
8426
8503
|
|
|
8427
|
-
// bazel-out/
|
|
8504
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/create.mjs
|
|
8428
8505
|
var elementContainerOpKinds = /* @__PURE__ */ new Set([
|
|
8429
8506
|
OpKind.Element,
|
|
8430
8507
|
OpKind.ElementStart,
|
|
@@ -8450,10 +8527,11 @@ function createElementStartOp(tag, xref, namespace, i18nPlaceholder, sourceSpan)
|
|
|
8450
8527
|
sourceSpan
|
|
8451
8528
|
}, TRAIT_CONSUMES_SLOT), NEW_OP);
|
|
8452
8529
|
}
|
|
8453
|
-
function createTemplateOp(xref, tag, functionNameSuffix, namespace, i18nPlaceholder, sourceSpan) {
|
|
8530
|
+
function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder, sourceSpan) {
|
|
8454
8531
|
return __spreadValues(__spreadValues({
|
|
8455
8532
|
kind: OpKind.Template,
|
|
8456
8533
|
xref,
|
|
8534
|
+
templateKind,
|
|
8457
8535
|
attributes: null,
|
|
8458
8536
|
tag,
|
|
8459
8537
|
handle: new SlotHandle(),
|
|
@@ -8554,25 +8632,27 @@ function createProjectionDefOp(def) {
|
|
|
8554
8632
|
def
|
|
8555
8633
|
}, NEW_OP);
|
|
8556
8634
|
}
|
|
8557
|
-
function createProjectionOp(xref, selector, sourceSpan) {
|
|
8635
|
+
function createProjectionOp(xref, selector, i18nPlaceholder, attributes, sourceSpan) {
|
|
8558
8636
|
return __spreadValues(__spreadValues({
|
|
8559
8637
|
kind: OpKind.Projection,
|
|
8560
8638
|
xref,
|
|
8561
8639
|
handle: new SlotHandle(),
|
|
8562
8640
|
selector,
|
|
8641
|
+
i18nPlaceholder,
|
|
8563
8642
|
projectionSlotIndex: 0,
|
|
8564
|
-
attributes
|
|
8643
|
+
attributes,
|
|
8565
8644
|
localRefs: [],
|
|
8566
8645
|
sourceSpan
|
|
8567
8646
|
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8568
8647
|
}
|
|
8569
|
-
function createExtractedAttributeOp(target, bindingKind, name, expression) {
|
|
8648
|
+
function createExtractedAttributeOp(target, bindingKind, name, expression, i18nContext) {
|
|
8570
8649
|
return __spreadValues({
|
|
8571
8650
|
kind: OpKind.ExtractedAttribute,
|
|
8572
8651
|
target,
|
|
8573
8652
|
bindingKind,
|
|
8574
8653
|
name,
|
|
8575
|
-
expression
|
|
8654
|
+
expression,
|
|
8655
|
+
i18nContext
|
|
8576
8656
|
}, NEW_OP);
|
|
8577
8657
|
}
|
|
8578
8658
|
function createDeferOp(xref, main, mainSlot, metadata, sourceSpan) {
|
|
@@ -8609,10 +8689,11 @@ function createDeferOnOp(defer2, trigger, prefetch, sourceSpan) {
|
|
|
8609
8689
|
sourceSpan
|
|
8610
8690
|
}, NEW_OP);
|
|
8611
8691
|
}
|
|
8612
|
-
function createI18nMessageOp(xref, i18nBlock, message, messagePlaceholder, params, postprocessingParams, needsPostprocessing) {
|
|
8692
|
+
function createI18nMessageOp(xref, i18nContext, i18nBlock, message, messagePlaceholder, params, postprocessingParams, needsPostprocessing) {
|
|
8613
8693
|
return __spreadValues({
|
|
8614
8694
|
kind: OpKind.I18nMessage,
|
|
8615
8695
|
xref,
|
|
8696
|
+
i18nContext,
|
|
8616
8697
|
i18nBlock,
|
|
8617
8698
|
message,
|
|
8618
8699
|
messagePlaceholder,
|
|
@@ -8657,6 +8738,9 @@ function createIcuEndOp(xref) {
|
|
|
8657
8738
|
}, NEW_OP);
|
|
8658
8739
|
}
|
|
8659
8740
|
function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) {
|
|
8741
|
+
if (i18nBlock === null && contextKind !== I18nContextKind.Attr) {
|
|
8742
|
+
throw new Error("AssertionError: i18nBlock must be provided for non-attribute contexts.");
|
|
8743
|
+
}
|
|
8660
8744
|
return __spreadValues({
|
|
8661
8745
|
kind: OpKind.I18nContext,
|
|
8662
8746
|
contextKind,
|
|
@@ -8668,22 +8752,32 @@ function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan)
|
|
|
8668
8752
|
postprocessingParams: /* @__PURE__ */ new Map()
|
|
8669
8753
|
}, NEW_OP);
|
|
8670
8754
|
}
|
|
8755
|
+
function createI18nAttributesOp(xref, handle, target) {
|
|
8756
|
+
return __spreadValues(__spreadValues({
|
|
8757
|
+
kind: OpKind.I18nAttributes,
|
|
8758
|
+
xref,
|
|
8759
|
+
handle,
|
|
8760
|
+
target,
|
|
8761
|
+
i18nAttributesConfig: null
|
|
8762
|
+
}, NEW_OP), TRAIT_CONSUMES_SLOT);
|
|
8763
|
+
}
|
|
8671
8764
|
|
|
8672
|
-
// bazel-out/
|
|
8673
|
-
function createHostPropertyOp(name, expression, isAnimationTrigger, sourceSpan) {
|
|
8765
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/ops/host.mjs
|
|
8766
|
+
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, sourceSpan) {
|
|
8674
8767
|
return __spreadValues(__spreadValues({
|
|
8675
8768
|
kind: OpKind.HostProperty,
|
|
8676
8769
|
name,
|
|
8677
8770
|
expression,
|
|
8678
8771
|
isAnimationTrigger,
|
|
8772
|
+
i18nContext,
|
|
8679
8773
|
sourceSpan
|
|
8680
8774
|
}, TRAIT_CONSUMES_VARS), NEW_OP);
|
|
8681
8775
|
}
|
|
8682
8776
|
|
|
8683
|
-
// bazel-out/
|
|
8777
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/ir/src/variable.mjs
|
|
8684
8778
|
var CTX_REF = "CTX_REF_MARKER";
|
|
8685
8779
|
|
|
8686
|
-
// bazel-out/
|
|
8780
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/compilation.mjs
|
|
8687
8781
|
var CompilationJobKind;
|
|
8688
8782
|
(function(CompilationJobKind2) {
|
|
8689
8783
|
CompilationJobKind2[CompilationJobKind2["Tmpl"] = 0] = "Tmpl";
|
|
@@ -8790,7 +8884,7 @@ var HostBindingCompilationUnit = class extends CompilationUnit {
|
|
|
8790
8884
|
}
|
|
8791
8885
|
};
|
|
8792
8886
|
|
|
8793
|
-
// bazel-out/
|
|
8887
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/any_cast.mjs
|
|
8794
8888
|
function deleteAnyCasts(job) {
|
|
8795
8889
|
for (const unit of job.units) {
|
|
8796
8890
|
for (const op of unit.ops()) {
|
|
@@ -8808,7 +8902,7 @@ function removeAnys(e) {
|
|
|
8808
8902
|
return e;
|
|
8809
8903
|
}
|
|
8810
8904
|
|
|
8811
|
-
// bazel-out/
|
|
8905
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/apply_i18n_expressions.mjs
|
|
8812
8906
|
function applyI18nExpressions(job) {
|
|
8813
8907
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
8814
8908
|
for (const unit of job.units) {
|
|
@@ -8821,7 +8915,7 @@ function applyI18nExpressions(job) {
|
|
|
8821
8915
|
for (const unit of job.units) {
|
|
8822
8916
|
for (const op of unit.update) {
|
|
8823
8917
|
if (op.kind === OpKind.I18nExpression && needsApplication(i18nContexts, op)) {
|
|
8824
|
-
OpList.insertAfter(createI18nApplyOp(op.
|
|
8918
|
+
OpList.insertAfter(createI18nApplyOp(op.i18nOwner, op.handle, null), op);
|
|
8825
8919
|
}
|
|
8826
8920
|
}
|
|
8827
8921
|
}
|
|
@@ -8833,13 +8927,25 @@ function needsApplication(i18nContexts, op) {
|
|
|
8833
8927
|
}
|
|
8834
8928
|
const context = i18nContexts.get(op.context);
|
|
8835
8929
|
const nextContext2 = i18nContexts.get(op.next.context);
|
|
8836
|
-
if (context
|
|
8930
|
+
if (context === void 0) {
|
|
8931
|
+
throw new Error("AssertionError: expected an I18nContextOp to exist for the I18nExpressionOp's context");
|
|
8932
|
+
}
|
|
8933
|
+
if (nextContext2 === void 0) {
|
|
8934
|
+
throw new Error("AssertionError: expected an I18nContextOp to exist for the next I18nExpressionOp's context");
|
|
8935
|
+
}
|
|
8936
|
+
if (context.i18nBlock !== null) {
|
|
8937
|
+
if (context.i18nBlock !== nextContext2.i18nBlock) {
|
|
8938
|
+
return true;
|
|
8939
|
+
}
|
|
8940
|
+
return false;
|
|
8941
|
+
}
|
|
8942
|
+
if (op.i18nOwner !== op.next.i18nOwner) {
|
|
8837
8943
|
return true;
|
|
8838
8944
|
}
|
|
8839
8945
|
return false;
|
|
8840
8946
|
}
|
|
8841
8947
|
|
|
8842
|
-
// bazel-out/
|
|
8948
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs
|
|
8843
8949
|
function assignI18nSlotDependencies(job) {
|
|
8844
8950
|
const i18nLastSlotConsumers = /* @__PURE__ */ new Map();
|
|
8845
8951
|
let lastSlotConsumer = null;
|
|
@@ -8854,20 +8960,47 @@ function assignI18nSlotDependencies(job) {
|
|
|
8854
8960
|
currentI18nOp = op;
|
|
8855
8961
|
break;
|
|
8856
8962
|
case OpKind.I18nEnd:
|
|
8963
|
+
if (currentI18nOp === null) {
|
|
8964
|
+
throw new Error("AssertionError: Expected an active I18n block while calculating last slot consumers");
|
|
8965
|
+
}
|
|
8966
|
+
if (lastSlotConsumer === null) {
|
|
8967
|
+
throw new Error("AssertionError: Expected a last slot consumer while calculating last slot consumers");
|
|
8968
|
+
}
|
|
8857
8969
|
i18nLastSlotConsumers.set(currentI18nOp.xref, lastSlotConsumer);
|
|
8858
8970
|
currentI18nOp = null;
|
|
8859
8971
|
break;
|
|
8860
8972
|
}
|
|
8861
8973
|
}
|
|
8974
|
+
let opsToMove = [];
|
|
8975
|
+
let moveAfterTarget = null;
|
|
8976
|
+
let previousTarget = null;
|
|
8862
8977
|
for (const op of unit.update) {
|
|
8863
|
-
if (op
|
|
8864
|
-
op.target
|
|
8978
|
+
if (hasDependsOnSlotContextTrait(op)) {
|
|
8979
|
+
if (moveAfterTarget !== null && previousTarget === moveAfterTarget && op.target !== previousTarget) {
|
|
8980
|
+
OpList.insertBefore(opsToMove, op);
|
|
8981
|
+
moveAfterTarget = null;
|
|
8982
|
+
opsToMove = [];
|
|
8983
|
+
}
|
|
8984
|
+
previousTarget = op.target;
|
|
8985
|
+
}
|
|
8986
|
+
if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nText) {
|
|
8987
|
+
OpList.remove(op);
|
|
8988
|
+
opsToMove.push(op);
|
|
8989
|
+
const target = i18nLastSlotConsumers.get(op.i18nOwner);
|
|
8990
|
+
if (target === void 0) {
|
|
8991
|
+
throw new Error("AssertionError: Expected to find a last slot consumer for an I18nExpressionOp");
|
|
8992
|
+
}
|
|
8993
|
+
op.target = target;
|
|
8994
|
+
moveAfterTarget = op.target;
|
|
8865
8995
|
}
|
|
8866
8996
|
}
|
|
8997
|
+
if (moveAfterTarget !== null) {
|
|
8998
|
+
unit.update.push(opsToMove);
|
|
8999
|
+
}
|
|
8867
9000
|
}
|
|
8868
9001
|
}
|
|
8869
9002
|
|
|
8870
|
-
// bazel-out/
|
|
9003
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/util/elements.mjs
|
|
8871
9004
|
function createOpXrefMap(unit) {
|
|
8872
9005
|
const map = /* @__PURE__ */ new Map();
|
|
8873
9006
|
for (const op of unit.create) {
|
|
@@ -8879,7 +9012,7 @@ function createOpXrefMap(unit) {
|
|
|
8879
9012
|
return map;
|
|
8880
9013
|
}
|
|
8881
9014
|
|
|
8882
|
-
// bazel-out/
|
|
9015
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/attribute_extraction.mjs
|
|
8883
9016
|
function extractAttributes(job) {
|
|
8884
9017
|
for (const unit of job.units) {
|
|
8885
9018
|
const elements = createOpXrefMap(unit);
|
|
@@ -8890,18 +9023,26 @@ function extractAttributes(job) {
|
|
|
8890
9023
|
break;
|
|
8891
9024
|
case OpKind.Property:
|
|
8892
9025
|
if (!op.isAnimationTrigger) {
|
|
8893
|
-
|
|
9026
|
+
let bindingKind;
|
|
9027
|
+
if (op.i18nContext !== null) {
|
|
9028
|
+
bindingKind = BindingKind.I18n;
|
|
9029
|
+
} else if (op.isStructuralTemplate) {
|
|
9030
|
+
bindingKind = BindingKind.Template;
|
|
9031
|
+
} else {
|
|
9032
|
+
bindingKind = BindingKind.Property;
|
|
9033
|
+
}
|
|
9034
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, bindingKind, op.name, null, null), lookupElement(elements, op.target));
|
|
8894
9035
|
}
|
|
8895
9036
|
break;
|
|
8896
9037
|
case OpKind.StyleProp:
|
|
8897
9038
|
case OpKind.ClassProp:
|
|
8898
9039
|
if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr2) {
|
|
8899
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null), lookupElement(elements, op.target));
|
|
9040
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null, null), lookupElement(elements, op.target));
|
|
8900
9041
|
}
|
|
8901
9042
|
break;
|
|
8902
9043
|
case OpKind.Listener:
|
|
8903
9044
|
if (!op.isAnimationListener) {
|
|
8904
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null);
|
|
9045
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, op.name, null, null);
|
|
8905
9046
|
if (job.kind === CompilationJobKind.Host) {
|
|
8906
9047
|
unit.create.push(extractedAttributeOp);
|
|
8907
9048
|
} else {
|
|
@@ -8935,7 +9076,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8935
9076
|
}
|
|
8936
9077
|
}
|
|
8937
9078
|
if (extractable) {
|
|
8938
|
-
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.
|
|
9079
|
+
const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplate ? BindingKind.Template : BindingKind.Attribute, op.name, op.expression, op.i18nContext);
|
|
8939
9080
|
if (unit.job.kind === CompilationJobKind.Host) {
|
|
8940
9081
|
unit.create.push(extractedAttributeOp);
|
|
8941
9082
|
} else {
|
|
@@ -8946,7 +9087,7 @@ function extractAttributeOp(unit, op, elements) {
|
|
|
8946
9087
|
}
|
|
8947
9088
|
}
|
|
8948
9089
|
|
|
8949
|
-
// bazel-out/
|
|
9090
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/binding_specialization.mjs
|
|
8950
9091
|
function lookupElement2(elements, xref) {
|
|
8951
9092
|
const el = elements.get(xref);
|
|
8952
9093
|
if (el === void 0) {
|
|
@@ -8976,15 +9117,15 @@ function specializeBindings(job) {
|
|
|
8976
9117
|
const target = lookupElement2(elements, op.target);
|
|
8977
9118
|
target.nonBindable = true;
|
|
8978
9119
|
} else {
|
|
8979
|
-
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.
|
|
9120
|
+
OpList.replace(op, createAttributeOp(op.target, op.name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplate, op.i18nContext, op.sourceSpan));
|
|
8980
9121
|
}
|
|
8981
9122
|
break;
|
|
8982
9123
|
case BindingKind.Property:
|
|
8983
9124
|
case BindingKind.Animation:
|
|
8984
9125
|
if (job.kind === CompilationJobKind.Host) {
|
|
8985
|
-
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.sourceSpan));
|
|
9126
|
+
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.sourceSpan));
|
|
8986
9127
|
} else {
|
|
8987
|
-
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.
|
|
9128
|
+
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplate, op.i18nContext, op.sourceSpan));
|
|
8988
9129
|
}
|
|
8989
9130
|
break;
|
|
8990
9131
|
case BindingKind.I18n:
|
|
@@ -8996,7 +9137,7 @@ function specializeBindings(job) {
|
|
|
8996
9137
|
}
|
|
8997
9138
|
}
|
|
8998
9139
|
|
|
8999
|
-
// bazel-out/
|
|
9140
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/chaining.mjs
|
|
9000
9141
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
9001
9142
|
Identifiers.attribute,
|
|
9002
9143
|
Identifiers.classProp,
|
|
@@ -9062,7 +9203,7 @@ function chainOperationsInList(opList) {
|
|
|
9062
9203
|
}
|
|
9063
9204
|
}
|
|
9064
9205
|
|
|
9065
|
-
// bazel-out/
|
|
9206
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/collapse_singleton_interpolations.mjs
|
|
9066
9207
|
function collapseSingletonInterpolations(job) {
|
|
9067
9208
|
for (const unit of job.units) {
|
|
9068
9209
|
for (const op of unit.update) {
|
|
@@ -9074,7 +9215,7 @@ function collapseSingletonInterpolations(job) {
|
|
|
9074
9215
|
}
|
|
9075
9216
|
}
|
|
9076
9217
|
|
|
9077
|
-
// bazel-out/
|
|
9218
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/conditionals.mjs
|
|
9078
9219
|
function generateConditionalExpressions(job) {
|
|
9079
9220
|
for (const unit of job.units) {
|
|
9080
9221
|
for (const op of unit.ops()) {
|
|
@@ -9111,40 +9252,7 @@ function generateConditionalExpressions(job) {
|
|
|
9111
9252
|
}
|
|
9112
9253
|
}
|
|
9113
9254
|
|
|
9114
|
-
// bazel-out/
|
|
9115
|
-
var TagContentType;
|
|
9116
|
-
(function(TagContentType2) {
|
|
9117
|
-
TagContentType2[TagContentType2["RAW_TEXT"] = 0] = "RAW_TEXT";
|
|
9118
|
-
TagContentType2[TagContentType2["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT";
|
|
9119
|
-
TagContentType2[TagContentType2["PARSABLE_DATA"] = 2] = "PARSABLE_DATA";
|
|
9120
|
-
})(TagContentType || (TagContentType = {}));
|
|
9121
|
-
function splitNsName(elementName) {
|
|
9122
|
-
if (elementName[0] != ":") {
|
|
9123
|
-
return [null, elementName];
|
|
9124
|
-
}
|
|
9125
|
-
const colonIndex = elementName.indexOf(":", 1);
|
|
9126
|
-
if (colonIndex === -1) {
|
|
9127
|
-
throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`);
|
|
9128
|
-
}
|
|
9129
|
-
return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];
|
|
9130
|
-
}
|
|
9131
|
-
function isNgContainer(tagName) {
|
|
9132
|
-
return splitNsName(tagName)[1] === "ng-container";
|
|
9133
|
-
}
|
|
9134
|
-
function isNgContent(tagName) {
|
|
9135
|
-
return splitNsName(tagName)[1] === "ng-content";
|
|
9136
|
-
}
|
|
9137
|
-
function isNgTemplate(tagName) {
|
|
9138
|
-
return splitNsName(tagName)[1] === "ng-template";
|
|
9139
|
-
}
|
|
9140
|
-
function getNsPrefix(fullName) {
|
|
9141
|
-
return fullName === null ? null : splitNsName(fullName)[0];
|
|
9142
|
-
}
|
|
9143
|
-
function mergeNsAndName(prefix, localName) {
|
|
9144
|
-
return prefix ? `:${prefix}:${localName}` : localName;
|
|
9145
|
-
}
|
|
9146
|
-
|
|
9147
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9255
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9148
9256
|
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9149
9257
|
["&&", BinaryOperator.And],
|
|
9150
9258
|
[">", BinaryOperator.Bigger],
|
|
@@ -9194,7 +9302,7 @@ function literalOrArrayLiteral(value) {
|
|
|
9194
9302
|
return literal(value);
|
|
9195
9303
|
}
|
|
9196
9304
|
|
|
9197
|
-
// bazel-out/
|
|
9305
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/const_collection.mjs
|
|
9198
9306
|
function collectElementConsts(job) {
|
|
9199
9307
|
const allElementAttributes = /* @__PURE__ */ new Map();
|
|
9200
9308
|
for (const unit of job.units) {
|
|
@@ -9280,7 +9388,7 @@ var ElementAttributes = class {
|
|
|
9280
9388
|
array.push(...getAttributeNameLiterals(name));
|
|
9281
9389
|
if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) {
|
|
9282
9390
|
if (value === null) {
|
|
9283
|
-
throw Error("Attribute & style element attributes must have a value");
|
|
9391
|
+
throw Error("Attribute, i18n attribute, & style element attributes must have a value");
|
|
9284
9392
|
}
|
|
9285
9393
|
array.push(value);
|
|
9286
9394
|
}
|
|
@@ -9328,7 +9436,48 @@ function serializeAttributes({ attributes, bindings, classes, i18n: i18n2, proje
|
|
|
9328
9436
|
return literalArr(attrArray);
|
|
9329
9437
|
}
|
|
9330
9438
|
|
|
9331
|
-
// bazel-out/
|
|
9439
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/convert_i18n_bindings.mjs
|
|
9440
|
+
function convertI18nBindings(job) {
|
|
9441
|
+
const i18nAttributesByElem = /* @__PURE__ */ new Map();
|
|
9442
|
+
for (const unit of job.units) {
|
|
9443
|
+
for (const op of unit.create) {
|
|
9444
|
+
if (op.kind === OpKind.I18nAttributes) {
|
|
9445
|
+
i18nAttributesByElem.set(op.target, op);
|
|
9446
|
+
}
|
|
9447
|
+
}
|
|
9448
|
+
for (const op of unit.update) {
|
|
9449
|
+
switch (op.kind) {
|
|
9450
|
+
case OpKind.Property:
|
|
9451
|
+
case OpKind.Attribute:
|
|
9452
|
+
if (op.i18nContext === null) {
|
|
9453
|
+
continue;
|
|
9454
|
+
}
|
|
9455
|
+
if (!(op.expression instanceof Interpolation2)) {
|
|
9456
|
+
continue;
|
|
9457
|
+
}
|
|
9458
|
+
const i18nAttributesForElem = i18nAttributesByElem.get(op.target);
|
|
9459
|
+
if (i18nAttributesForElem === void 0) {
|
|
9460
|
+
throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");
|
|
9461
|
+
}
|
|
9462
|
+
if (i18nAttributesForElem.target !== op.target) {
|
|
9463
|
+
throw new Error("AssertionError: Expected i18nAttributes target element to match binding target element");
|
|
9464
|
+
}
|
|
9465
|
+
const ops = [];
|
|
9466
|
+
for (let i = 0; i < op.expression.expressions.length; i++) {
|
|
9467
|
+
const expr = op.expression.expressions[i];
|
|
9468
|
+
if (op.expression.i18nPlaceholders.length !== op.expression.expressions.length) {
|
|
9469
|
+
throw new Error(`AssertionError: An i18n attribute binding instruction requires the same number of expressions and placeholders, but found ${op.expression.i18nPlaceholders.length} placeholders and ${op.expression.expressions.length} expressions`);
|
|
9470
|
+
}
|
|
9471
|
+
ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan));
|
|
9472
|
+
}
|
|
9473
|
+
OpList.replaceWithMany(op, ops);
|
|
9474
|
+
break;
|
|
9475
|
+
}
|
|
9476
|
+
}
|
|
9477
|
+
}
|
|
9478
|
+
}
|
|
9479
|
+
|
|
9480
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_defer_deps_fns.mjs
|
|
9332
9481
|
function createDeferDepsFns(job) {
|
|
9333
9482
|
for (const unit of job.units) {
|
|
9334
9483
|
for (const op of unit.create) {
|
|
@@ -9356,7 +9505,7 @@ function createDeferDepsFns(job) {
|
|
|
9356
9505
|
}
|
|
9357
9506
|
}
|
|
9358
9507
|
|
|
9359
|
-
// bazel-out/
|
|
9508
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/create_i18n_contexts.mjs
|
|
9360
9509
|
function createI18nContexts(job) {
|
|
9361
9510
|
const rootContexts = /* @__PURE__ */ new Map();
|
|
9362
9511
|
let currentI18nOp = null;
|
|
@@ -9400,7 +9549,7 @@ function createI18nContexts(job) {
|
|
|
9400
9549
|
}
|
|
9401
9550
|
}
|
|
9402
9551
|
|
|
9403
|
-
// bazel-out/
|
|
9552
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_configs.mjs
|
|
9404
9553
|
function configureDeferInstructions(job) {
|
|
9405
9554
|
for (const unit of job.units) {
|
|
9406
9555
|
for (const op of unit.create) {
|
|
@@ -9417,7 +9566,7 @@ function configureDeferInstructions(job) {
|
|
|
9417
9566
|
}
|
|
9418
9567
|
}
|
|
9419
9568
|
|
|
9420
|
-
// bazel-out/
|
|
9569
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/defer_resolve_targets.mjs
|
|
9421
9570
|
function resolveDeferTargetNames(job) {
|
|
9422
9571
|
const scopes = /* @__PURE__ */ new Map();
|
|
9423
9572
|
function getScopeForView2(view) {
|
|
@@ -9511,7 +9660,7 @@ var Scope = class {
|
|
|
9511
9660
|
}
|
|
9512
9661
|
};
|
|
9513
9662
|
|
|
9514
|
-
// bazel-out/
|
|
9663
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
9515
9664
|
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
9516
9665
|
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
9517
9666
|
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]],
|
|
@@ -9538,7 +9687,7 @@ function collapseEmptyInstructions(job) {
|
|
|
9538
9687
|
}
|
|
9539
9688
|
}
|
|
9540
9689
|
|
|
9541
|
-
// bazel-out/
|
|
9690
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/expand_safe_reads.mjs
|
|
9542
9691
|
function expandSafeReads(job) {
|
|
9543
9692
|
for (const unit of job.units) {
|
|
9544
9693
|
for (const op of unit.ops()) {
|
|
@@ -9674,7 +9823,7 @@ function ternaryTransform(e) {
|
|
|
9674
9823
|
return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr);
|
|
9675
9824
|
}
|
|
9676
9825
|
|
|
9677
|
-
// bazel-out/
|
|
9826
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/extract_i18n_messages.mjs
|
|
9678
9827
|
var ESCAPE = "\uFFFD";
|
|
9679
9828
|
var ELEMENT_MARKER = "#";
|
|
9680
9829
|
var TEMPLATE_MARKER = "*";
|
|
@@ -9698,6 +9847,15 @@ function extractI18nMessages(job) {
|
|
|
9698
9847
|
}
|
|
9699
9848
|
}
|
|
9700
9849
|
}
|
|
9850
|
+
for (const unit of job.units) {
|
|
9851
|
+
for (const op of unit.create) {
|
|
9852
|
+
if (op.kind !== OpKind.I18nContext || op.contextKind !== I18nContextKind.Attr) {
|
|
9853
|
+
continue;
|
|
9854
|
+
}
|
|
9855
|
+
const i18nMessageOp = createI18nMessage(job, op);
|
|
9856
|
+
unit.create.push(i18nMessageOp);
|
|
9857
|
+
}
|
|
9858
|
+
}
|
|
9701
9859
|
const i18nBlockMessages = /* @__PURE__ */ new Map();
|
|
9702
9860
|
for (const unit of job.units) {
|
|
9703
9861
|
for (const op of unit.create) {
|
|
@@ -9720,6 +9878,9 @@ function extractI18nMessages(job) {
|
|
|
9720
9878
|
}
|
|
9721
9879
|
const i18nContext = i18nContexts.get(op.context);
|
|
9722
9880
|
if (i18nContext.contextKind === I18nContextKind.Icu) {
|
|
9881
|
+
if (i18nContext.i18nBlock === null) {
|
|
9882
|
+
throw Error("ICU context should have its i18n block set.");
|
|
9883
|
+
}
|
|
9723
9884
|
const subMessage = createI18nMessage(job, i18nContext, op.messagePlaceholder);
|
|
9724
9885
|
unit.create.push(subMessage);
|
|
9725
9886
|
const rootI18nId = i18nBlocks.get(i18nContext.i18nBlock).root;
|
|
@@ -9736,69 +9897,54 @@ function extractI18nMessages(job) {
|
|
|
9736
9897
|
}
|
|
9737
9898
|
}
|
|
9738
9899
|
function createI18nMessage(job, context, messagePlaceholder) {
|
|
9739
|
-
let
|
|
9740
|
-
const
|
|
9741
|
-
|
|
9742
|
-
|
|
9900
|
+
let formattedParams = formatParams(context.params);
|
|
9901
|
+
const formattedPostprocessingParams = formatParams(context.postprocessingParams);
|
|
9902
|
+
let needsPostprocessing = formattedPostprocessingParams.size > 0;
|
|
9903
|
+
for (const values of context.params.values()) {
|
|
9904
|
+
if (values.length > 1) {
|
|
9905
|
+
needsPostprocessing = true;
|
|
9906
|
+
}
|
|
9907
|
+
}
|
|
9908
|
+
return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message, messagePlaceholder != null ? messagePlaceholder : null, formattedParams, formattedPostprocessingParams, needsPostprocessing);
|
|
9743
9909
|
}
|
|
9744
9910
|
function formatParams(params) {
|
|
9745
9911
|
const formattedParams = /* @__PURE__ */ new Map();
|
|
9746
|
-
let needsPostprocessing = false;
|
|
9747
9912
|
for (const [placeholder, placeholderValues] of params) {
|
|
9748
|
-
const
|
|
9749
|
-
needsPostprocessing || (needsPostprocessing = paramNeedsPostprocessing);
|
|
9913
|
+
const serializedValues = formatParamValues(placeholderValues);
|
|
9750
9914
|
if (serializedValues !== null) {
|
|
9751
9915
|
formattedParams.set(placeholder, literal(serializedValues));
|
|
9752
9916
|
}
|
|
9753
9917
|
}
|
|
9754
|
-
return
|
|
9918
|
+
return formattedParams;
|
|
9755
9919
|
}
|
|
9756
9920
|
function formatParamValues(values) {
|
|
9757
9921
|
if (values.length === 0) {
|
|
9758
|
-
return
|
|
9922
|
+
return null;
|
|
9759
9923
|
}
|
|
9760
|
-
collapseElementTemplatePairs(values);
|
|
9761
9924
|
const serializedValues = values.map((value) => formatValue(value));
|
|
9762
|
-
return serializedValues.length === 1 ?
|
|
9925
|
+
return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`;
|
|
9763
9926
|
}
|
|
9764
|
-
function
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
const value = values[i];
|
|
9769
|
-
if (value.subTemplateIndex !== null && value.flags & (I18nParamValueFlags.ElementTag | I18nParamValueFlags.TemplateTag)) {
|
|
9770
|
-
const valueIndicies = (_a2 = valueIndiciesBySubTemplateIndex.get(value.subTemplateIndex)) != null ? _a2 : [];
|
|
9771
|
-
valueIndicies.push(i);
|
|
9772
|
-
valueIndiciesBySubTemplateIndex.set(value.subTemplateIndex, valueIndicies);
|
|
9773
|
-
}
|
|
9774
|
-
}
|
|
9775
|
-
for (const [subTemplateIndex, valueIndicies] of valueIndiciesBySubTemplateIndex) {
|
|
9776
|
-
if (valueIndicies.length > 1) {
|
|
9777
|
-
const elementIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.ElementTag);
|
|
9778
|
-
const templateIndex = valueIndicies.find((index) => values[index].flags & I18nParamValueFlags.TemplateTag);
|
|
9779
|
-
if (elementIndex !== void 0 && templateIndex !== void 0) {
|
|
9780
|
-
const elementValue = values[elementIndex];
|
|
9781
|
-
const templateValue = values[templateIndex];
|
|
9782
|
-
let compundValue;
|
|
9783
|
-
if (elementValue.flags & I18nParamValueFlags.OpenTag && elementValue.flags & I18nParamValueFlags.CloseTag) {
|
|
9784
|
-
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9785
|
-
} else if (elementValue.flags & I18nParamValueFlags.OpenTag) {
|
|
9786
|
-
compundValue = `${formatValue(templateValue)}${formatValue(elementValue)}`;
|
|
9787
|
-
} else {
|
|
9788
|
-
compundValue = `${formatValue(elementValue)}${formatValue(templateValue)}`;
|
|
9789
|
-
}
|
|
9790
|
-
values.splice(elementIndex, 1, { value: compundValue, subTemplateIndex, flags: I18nParamValueFlags.None });
|
|
9791
|
-
values.splice(templateIndex, 1, null);
|
|
9792
|
-
}
|
|
9927
|
+
function formatValue(value) {
|
|
9928
|
+
if (value.flags & I18nParamValueFlags.ElementTag && value.flags & I18nParamValueFlags.TemplateTag) {
|
|
9929
|
+
if (typeof value.value !== "object") {
|
|
9930
|
+
throw Error("AssertionError: Expected i18n param value to have an element and template slot");
|
|
9793
9931
|
}
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9932
|
+
const elementValue = formatValue(__spreadProps(__spreadValues({}, value), {
|
|
9933
|
+
value: value.value.element,
|
|
9934
|
+
flags: value.flags & ~I18nParamValueFlags.TemplateTag
|
|
9935
|
+
}));
|
|
9936
|
+
const templateValue = formatValue(__spreadProps(__spreadValues({}, value), {
|
|
9937
|
+
value: value.value.template,
|
|
9938
|
+
flags: value.flags & ~I18nParamValueFlags.ElementTag
|
|
9939
|
+
}));
|
|
9940
|
+
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
9941
|
+
return `${templateValue}${elementValue}${templateValue}`;
|
|
9798
9942
|
}
|
|
9943
|
+
return value.flags & I18nParamValueFlags.CloseTag ? `${elementValue}${templateValue}` : `${templateValue}${elementValue}`;
|
|
9944
|
+
}
|
|
9945
|
+
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
9946
|
+
return `${formatValue(__spreadProps(__spreadValues({}, value), { flags: value.flags & ~I18nParamValueFlags.CloseTag }))}${formatValue(__spreadProps(__spreadValues({}, value), { flags: value.flags & ~I18nParamValueFlags.OpenTag }))}`;
|
|
9799
9947
|
}
|
|
9800
|
-
}
|
|
9801
|
-
function formatValue(value) {
|
|
9802
9948
|
if (value.flags === I18nParamValueFlags.None) {
|
|
9803
9949
|
return `${value.value}`;
|
|
9804
9950
|
}
|
|
@@ -9813,13 +9959,10 @@ function formatValue(value) {
|
|
|
9813
9959
|
closeMarker = value.flags & I18nParamValueFlags.CloseTag ? TAG_CLOSE_MARKER : "";
|
|
9814
9960
|
}
|
|
9815
9961
|
const context = value.subTemplateIndex === null ? "" : `${CONTEXT_MARKER}${value.subTemplateIndex}`;
|
|
9816
|
-
if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) {
|
|
9817
|
-
return `${ESCAPE}${tagMarker}${value.value}${context}${ESCAPE}${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9818
|
-
}
|
|
9819
9962
|
return `${ESCAPE}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE}`;
|
|
9820
9963
|
}
|
|
9821
9964
|
|
|
9822
|
-
// bazel-out/
|
|
9965
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_advance.mjs
|
|
9823
9966
|
function generateAdvance(job) {
|
|
9824
9967
|
for (const unit of job.units) {
|
|
9825
9968
|
const slotMap = /* @__PURE__ */ new Map();
|
|
@@ -9836,7 +9979,7 @@ function generateAdvance(job) {
|
|
|
9836
9979
|
if (!hasDependsOnSlotContextTrait(op)) {
|
|
9837
9980
|
continue;
|
|
9838
9981
|
} else if (!slotMap.has(op.target)) {
|
|
9839
|
-
throw new Error(`AssertionError: reference to unknown slot for
|
|
9982
|
+
throw new Error(`AssertionError: reference to unknown slot for target ${op.target}`);
|
|
9840
9983
|
}
|
|
9841
9984
|
const slot = slotMap.get(op.target);
|
|
9842
9985
|
if (slotContext !== slot) {
|
|
@@ -9851,7 +9994,7 @@ function generateAdvance(job) {
|
|
|
9851
9994
|
}
|
|
9852
9995
|
}
|
|
9853
9996
|
|
|
9854
|
-
// bazel-out/
|
|
9997
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_projection_def.mjs
|
|
9855
9998
|
function generateProjectionDefs(job) {
|
|
9856
9999
|
const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder;
|
|
9857
10000
|
const selectors = [];
|
|
@@ -9875,7 +10018,7 @@ function generateProjectionDefs(job) {
|
|
|
9875
10018
|
}
|
|
9876
10019
|
}
|
|
9877
10020
|
|
|
9878
|
-
// bazel-out/
|
|
10021
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/generate_variables.mjs
|
|
9879
10022
|
function generateVariables(job) {
|
|
9880
10023
|
recursivelyProcessView(job.root, null);
|
|
9881
10024
|
}
|
|
@@ -9963,7 +10106,7 @@ function generateVariablesInScopeForView(view, scope) {
|
|
|
9963
10106
|
return newOps;
|
|
9964
10107
|
}
|
|
9965
10108
|
|
|
9966
|
-
// bazel-out/
|
|
10109
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/has_const_expression_collection.mjs
|
|
9967
10110
|
function collectConstExpressions(job) {
|
|
9968
10111
|
for (const unit of job.units) {
|
|
9969
10112
|
for (const op of unit.ops()) {
|
|
@@ -9977,7 +10120,7 @@ function collectConstExpressions(job) {
|
|
|
9977
10120
|
}
|
|
9978
10121
|
}
|
|
9979
10122
|
|
|
9980
|
-
// bazel-out/
|
|
10123
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/host_style_property_parsing.mjs
|
|
9981
10124
|
var STYLE_DOT = "style.";
|
|
9982
10125
|
var CLASS_DOT = "class.";
|
|
9983
10126
|
var STYLE_BANG = "style!";
|
|
@@ -10035,7 +10178,7 @@ function parseProperty(name) {
|
|
|
10035
10178
|
return { property: property2, suffix };
|
|
10036
10179
|
}
|
|
10037
10180
|
|
|
10038
|
-
// bazel-out/
|
|
10181
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/output/map_util.mjs
|
|
10039
10182
|
function mapLiteral(obj, quoted = false) {
|
|
10040
10183
|
return literalMap(Object.keys(obj).map((key) => ({
|
|
10041
10184
|
key,
|
|
@@ -10044,7 +10187,7 @@ function mapLiteral(obj, quoted = false) {
|
|
|
10044
10187
|
})));
|
|
10045
10188
|
}
|
|
10046
10189
|
|
|
10047
|
-
// bazel-out/
|
|
10190
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/icu_serializer.mjs
|
|
10048
10191
|
var IcuSerializerVisitor = class {
|
|
10049
10192
|
visitText(text2) {
|
|
10050
10193
|
return text2.value;
|
|
@@ -10078,7 +10221,7 @@ function serializeIcuNode(icu) {
|
|
|
10078
10221
|
return icu.visit(serializer);
|
|
10079
10222
|
}
|
|
10080
10223
|
|
|
10081
|
-
// bazel-out/
|
|
10224
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/expression_parser/lexer.mjs
|
|
10082
10225
|
var TokenType;
|
|
10083
10226
|
(function(TokenType2) {
|
|
10084
10227
|
TokenType2[TokenType2["Character"] = 0] = "Character";
|
|
@@ -10439,7 +10582,7 @@ function parseIntAutoRadix(text2) {
|
|
|
10439
10582
|
return result;
|
|
10440
10583
|
}
|
|
10441
10584
|
|
|
10442
|
-
// bazel-out/
|
|
10585
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/expression_parser/parser.mjs
|
|
10443
10586
|
var SplitInterpolation = class {
|
|
10444
10587
|
constructor(strings, expressions, offsets) {
|
|
10445
10588
|
this.strings = strings;
|
|
@@ -11333,7 +11476,7 @@ function getIndexMapForOriginalTemplate(interpolatedTokens) {
|
|
|
11333
11476
|
return offsetMap;
|
|
11334
11477
|
}
|
|
11335
11478
|
|
|
11336
|
-
// bazel-out/
|
|
11479
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/ast.mjs
|
|
11337
11480
|
var NodeWithI18n = class {
|
|
11338
11481
|
constructor(sourceSpan, i18n2) {
|
|
11339
11482
|
this.sourceSpan = sourceSpan;
|
|
@@ -11485,11 +11628,11 @@ var RecursiveVisitor = class {
|
|
|
11485
11628
|
}
|
|
11486
11629
|
};
|
|
11487
11630
|
|
|
11488
|
-
// bazel-out/
|
|
11631
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/element_schema_registry.mjs
|
|
11489
11632
|
var ElementSchemaRegistry = class {
|
|
11490
11633
|
};
|
|
11491
11634
|
|
|
11492
|
-
// bazel-out/
|
|
11635
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/dom_element_schema_registry.mjs
|
|
11493
11636
|
var BOOLEAN = "boolean";
|
|
11494
11637
|
var NUMBER = "number";
|
|
11495
11638
|
var STRING = "string";
|
|
@@ -11842,7 +11985,7 @@ function _isPixelDimensionStyle(prop) {
|
|
|
11842
11985
|
}
|
|
11843
11986
|
}
|
|
11844
11987
|
|
|
11845
|
-
// bazel-out/
|
|
11988
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_tags.mjs
|
|
11846
11989
|
var HtmlTagDefinition = class {
|
|
11847
11990
|
constructor({ closedByChildren, implicitNamespacePrefix, contentType = TagContentType.PARSABLE_DATA, closedByParent = false, isVoid = false, ignoreFirstLf = false, preventNamespaceInheritance = false, canSelfClose = false } = {}) {
|
|
11848
11991
|
this.closedByChildren = {};
|
|
@@ -11960,7 +12103,7 @@ function getHtmlTagDefinition(tagName) {
|
|
|
11960
12103
|
return (_b2 = (_a2 = TAG_DEFINITIONS[tagName]) != null ? _a2 : TAG_DEFINITIONS[tagName.toLowerCase()]) != null ? _b2 : DEFAULT_TAG_DEFINITION;
|
|
11961
12104
|
}
|
|
11962
12105
|
|
|
11963
|
-
// bazel-out/
|
|
12106
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/serializers/placeholder.mjs
|
|
11964
12107
|
var TAG_TO_PLACEHOLDER_NAMES = {
|
|
11965
12108
|
"A": "LINK",
|
|
11966
12109
|
"B": "BOLD_TEXT",
|
|
@@ -12082,7 +12225,7 @@ var PlaceholderRegistry = class {
|
|
|
12082
12225
|
}
|
|
12083
12226
|
};
|
|
12084
12227
|
|
|
12085
|
-
// bazel-out/
|
|
12228
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/i18n_parser.mjs
|
|
12086
12229
|
var _expParser = new Parser(new Lexer());
|
|
12087
12230
|
function createI18nMessageFactory(interpolationConfig, containerBlocks) {
|
|
12088
12231
|
const visitor = new _I18nVisitor(_expParser, interpolationConfig, containerBlocks);
|
|
@@ -12261,14 +12404,14 @@ function extractPlaceholderName(input) {
|
|
|
12261
12404
|
return input.split(_CUSTOM_PH_EXP)[2];
|
|
12262
12405
|
}
|
|
12263
12406
|
|
|
12264
|
-
// bazel-out/
|
|
12407
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/parse_util.mjs
|
|
12265
12408
|
var I18nError = class extends ParseError {
|
|
12266
12409
|
constructor(span, msg) {
|
|
12267
12410
|
super(span, msg);
|
|
12268
12411
|
}
|
|
12269
12412
|
};
|
|
12270
12413
|
|
|
12271
|
-
// bazel-out/
|
|
12414
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/entities.mjs
|
|
12272
12415
|
var NAMED_ENTITIES = {
|
|
12273
12416
|
"AElig": "\xC6",
|
|
12274
12417
|
"AMP": "&",
|
|
@@ -14399,7 +14542,7 @@ var NAMED_ENTITIES = {
|
|
|
14399
14542
|
var NGSP_UNICODE = "\uE500";
|
|
14400
14543
|
NAMED_ENTITIES["ngsp"] = NGSP_UNICODE;
|
|
14401
14544
|
|
|
14402
|
-
// bazel-out/
|
|
14545
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/lexer.mjs
|
|
14403
14546
|
var TokenError = class extends ParseError {
|
|
14404
14547
|
constructor(errorMsg, tokenType, span) {
|
|
14405
14548
|
super(span, errorMsg);
|
|
@@ -15320,7 +15463,7 @@ var CursorError = class {
|
|
|
15320
15463
|
}
|
|
15321
15464
|
};
|
|
15322
15465
|
|
|
15323
|
-
// bazel-out/
|
|
15466
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/parser.mjs
|
|
15324
15467
|
var TreeError = class extends ParseError {
|
|
15325
15468
|
static create(elementName, span, msg) {
|
|
15326
15469
|
return new TreeError(elementName, span, msg);
|
|
@@ -15704,7 +15847,7 @@ function decodeEntity(match, entity) {
|
|
|
15704
15847
|
return match;
|
|
15705
15848
|
}
|
|
15706
15849
|
|
|
15707
|
-
// bazel-out/
|
|
15850
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/schema/trusted_types_sinks.mjs
|
|
15708
15851
|
var TRUSTED_TYPES_SINKS = /* @__PURE__ */ new Set([
|
|
15709
15852
|
"iframe|srcdoc",
|
|
15710
15853
|
"*|innerhtml",
|
|
@@ -15719,7 +15862,7 @@ function isTrustedTypesSink(tagName, propName) {
|
|
|
15719
15862
|
return TRUSTED_TYPES_SINKS.has(tagName + "|" + propName) || TRUSTED_TYPES_SINKS.has("*|" + propName);
|
|
15720
15863
|
}
|
|
15721
15864
|
|
|
15722
|
-
// bazel-out/
|
|
15865
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/meta.mjs
|
|
15723
15866
|
var setI18nRefs = (htmlNode, i18nNode) => {
|
|
15724
15867
|
if (htmlNode instanceof NodeWithI18n) {
|
|
15725
15868
|
if (i18nNode instanceof IcuPlaceholder && htmlNode.i18n instanceof Message) {
|
|
@@ -15876,7 +16019,7 @@ function i18nMetaToJSDoc(meta) {
|
|
|
15876
16019
|
return jsDocComment(tags);
|
|
15877
16020
|
}
|
|
15878
16021
|
|
|
15879
|
-
// bazel-out/
|
|
16022
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/get_msg_utils.mjs
|
|
15880
16023
|
var GOOG_GET_MSG = "goog.getMsg";
|
|
15881
16024
|
function createGoogleGetMsgStatements(variable2, message, closureVar, placeholderValues) {
|
|
15882
16025
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
@@ -15927,7 +16070,7 @@ function serializeI18nMessageForGetMsg(message) {
|
|
|
15927
16070
|
return message.nodes.map((node) => node.visit(serializerVisitor2, null)).join("");
|
|
15928
16071
|
}
|
|
15929
16072
|
|
|
15930
|
-
// bazel-out/
|
|
16073
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/localize_utils.mjs
|
|
15931
16074
|
function createLocalizeStatements(variable2, message, params) {
|
|
15932
16075
|
const { messageParts, placeHolders } = serializeI18nMessageForLocalize(message);
|
|
15933
16076
|
const sourceSpan = getSourceSpan(message);
|
|
@@ -16016,59 +16159,136 @@ function createEmptyMessagePart(location) {
|
|
|
16016
16159
|
return new LiteralPiece("", new ParseSourceSpan(location, location));
|
|
16017
16160
|
}
|
|
16018
16161
|
|
|
16019
|
-
// bazel-out/
|
|
16162
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_const_collection.mjs
|
|
16020
16163
|
var NG_I18N_CLOSURE_MODE = "ngI18nClosureMode";
|
|
16021
16164
|
var TRANSLATION_VAR_PREFIX2 = "i18n_";
|
|
16165
|
+
var I18N_ICU_MAPPING_PREFIX2 = "I18N_EXP_";
|
|
16166
|
+
var ESCAPE2 = "\uFFFD";
|
|
16022
16167
|
function collectI18nConsts(job) {
|
|
16168
|
+
var _a2;
|
|
16023
16169
|
const fileBasedI18nSuffix = job.relativeContextFilePath.replace(/[^A-Za-z0-9]/g, "_").toUpperCase() + "_";
|
|
16024
|
-
const
|
|
16170
|
+
const extractedAttributesByI18nContext = /* @__PURE__ */ new Map();
|
|
16171
|
+
const i18nAttributesByElement = /* @__PURE__ */ new Map();
|
|
16172
|
+
const i18nExpressionsByElement = /* @__PURE__ */ new Map();
|
|
16025
16173
|
const messages = /* @__PURE__ */ new Map();
|
|
16174
|
+
for (const unit of job.units) {
|
|
16175
|
+
for (const op of unit.ops()) {
|
|
16176
|
+
if (op.kind === OpKind.ExtractedAttribute && op.i18nContext !== null) {
|
|
16177
|
+
extractedAttributesByI18nContext.set(op.i18nContext, op);
|
|
16178
|
+
} else if (op.kind === OpKind.I18nAttributes) {
|
|
16179
|
+
i18nAttributesByElement.set(op.target, op);
|
|
16180
|
+
} else if (op.kind === OpKind.I18nExpression && op.usage === I18nExpressionFor.I18nAttribute) {
|
|
16181
|
+
const expressions = (_a2 = i18nExpressionsByElement.get(op.target)) != null ? _a2 : [];
|
|
16182
|
+
expressions.push(op);
|
|
16183
|
+
i18nExpressionsByElement.set(op.target, expressions);
|
|
16184
|
+
} else if (op.kind === OpKind.I18nMessage) {
|
|
16185
|
+
messages.set(op.xref, op);
|
|
16186
|
+
}
|
|
16187
|
+
}
|
|
16188
|
+
}
|
|
16189
|
+
const i18nValuesByContext = /* @__PURE__ */ new Map();
|
|
16190
|
+
const messageConstIndices = /* @__PURE__ */ new Map();
|
|
16026
16191
|
for (const unit of job.units) {
|
|
16027
16192
|
for (const op of unit.create) {
|
|
16028
16193
|
if (op.kind === OpKind.I18nMessage) {
|
|
16029
|
-
|
|
16194
|
+
if (op.messagePlaceholder === null) {
|
|
16195
|
+
const { mainVar, statements } = collectMessage(job, fileBasedI18nSuffix, messages, op);
|
|
16196
|
+
if (op.i18nBlock !== null) {
|
|
16197
|
+
const i18nConst = job.addConst(mainVar, statements);
|
|
16198
|
+
messageConstIndices.set(op.i18nBlock, i18nConst);
|
|
16199
|
+
} else {
|
|
16200
|
+
job.constsInitializers.push(...statements);
|
|
16201
|
+
i18nValuesByContext.set(op.i18nContext, mainVar);
|
|
16202
|
+
const attributeForMessage = extractedAttributesByI18nContext.get(op.i18nContext);
|
|
16203
|
+
if (attributeForMessage !== void 0) {
|
|
16204
|
+
attributeForMessage.expression = mainVar;
|
|
16205
|
+
}
|
|
16206
|
+
}
|
|
16207
|
+
}
|
|
16030
16208
|
OpList.remove(op);
|
|
16031
16209
|
}
|
|
16032
16210
|
}
|
|
16033
16211
|
}
|
|
16034
|
-
for (const
|
|
16035
|
-
|
|
16036
|
-
|
|
16037
|
-
|
|
16212
|
+
for (const unit of job.units) {
|
|
16213
|
+
for (const elem of unit.create) {
|
|
16214
|
+
if (isElementOrContainerOp(elem)) {
|
|
16215
|
+
const i18nAttributes2 = i18nAttributesByElement.get(elem.xref);
|
|
16216
|
+
if (i18nAttributes2 === void 0) {
|
|
16217
|
+
continue;
|
|
16218
|
+
}
|
|
16219
|
+
let i18nExpressions = i18nExpressionsByElement.get(elem.xref);
|
|
16220
|
+
if (i18nExpressions === void 0) {
|
|
16221
|
+
throw new Error("AssertionError: Could not find any i18n expressions associated with an I18nAttributes instruction");
|
|
16222
|
+
}
|
|
16223
|
+
const seenPropertyNames = /* @__PURE__ */ new Set();
|
|
16224
|
+
i18nExpressions = i18nExpressions.filter((i18nExpr) => {
|
|
16225
|
+
const seen = seenPropertyNames.has(i18nExpr.name);
|
|
16226
|
+
seenPropertyNames.add(i18nExpr.name);
|
|
16227
|
+
return !seen;
|
|
16228
|
+
});
|
|
16229
|
+
const i18nAttributeConfig = i18nExpressions.flatMap((i18nExpr) => {
|
|
16230
|
+
const i18nExprValue = i18nValuesByContext.get(i18nExpr.context);
|
|
16231
|
+
if (i18nExprValue === void 0) {
|
|
16232
|
+
throw new Error("AssertionError: Could not find i18n expression's value");
|
|
16233
|
+
}
|
|
16234
|
+
return [literal(i18nExpr.name), i18nExprValue];
|
|
16235
|
+
});
|
|
16236
|
+
i18nAttributes2.i18nAttributesConfig = job.addConst(new LiteralArrayExpr(i18nAttributeConfig));
|
|
16237
|
+
}
|
|
16038
16238
|
}
|
|
16039
16239
|
}
|
|
16040
16240
|
for (const unit of job.units) {
|
|
16041
16241
|
for (const op of unit.create) {
|
|
16042
16242
|
if (op.kind === OpKind.I18nStart) {
|
|
16043
|
-
|
|
16243
|
+
const msgIndex = messageConstIndices.get(op.root);
|
|
16244
|
+
if (msgIndex === void 0) {
|
|
16245
|
+
throw new Error("AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?");
|
|
16246
|
+
}
|
|
16247
|
+
op.messageIndex = msgIndex;
|
|
16044
16248
|
}
|
|
16045
16249
|
}
|
|
16046
16250
|
}
|
|
16047
16251
|
}
|
|
16048
16252
|
function collectMessage(job, fileBasedI18nSuffix, messages, messageOp) {
|
|
16253
|
+
var _a2;
|
|
16049
16254
|
const statements = [];
|
|
16255
|
+
const subMessagePlaceholders = /* @__PURE__ */ new Map();
|
|
16050
16256
|
for (const subMessageId of messageOp.subMessages) {
|
|
16051
16257
|
const subMessage = messages.get(subMessageId);
|
|
16052
16258
|
const { mainVar: subMessageVar, statements: subMessageStatements } = collectMessage(job, fileBasedI18nSuffix, messages, subMessage);
|
|
16053
16259
|
statements.push(...subMessageStatements);
|
|
16054
|
-
|
|
16260
|
+
const subMessages = (_a2 = subMessagePlaceholders.get(subMessage.messagePlaceholder)) != null ? _a2 : [];
|
|
16261
|
+
subMessages.push(subMessageVar);
|
|
16262
|
+
subMessagePlaceholders.set(subMessage.messagePlaceholder, subMessages);
|
|
16055
16263
|
}
|
|
16264
|
+
addSubMessageParams(messageOp, subMessagePlaceholders);
|
|
16056
16265
|
messageOp.params = new Map([...messageOp.params.entries()].sort());
|
|
16057
|
-
assertAllParamsResolved(messageOp);
|
|
16058
16266
|
const mainVar = variable(job.pool.uniqueName(TRANSLATION_VAR_PREFIX2));
|
|
16059
16267
|
const closureVar = i18nGenerateClosureVar(job.pool, messageOp.message.id, fileBasedI18nSuffix, job.i18nUseExternalIds);
|
|
16060
16268
|
let transformFn = void 0;
|
|
16061
16269
|
if (messageOp.needsPostprocessing) {
|
|
16062
|
-
|
|
16270
|
+
const postprocessingParams = Object.fromEntries([...messageOp.postprocessingParams.entries()].sort());
|
|
16271
|
+
const formattedPostprocessingParams = formatI18nPlaceholderNamesInMap(postprocessingParams, false);
|
|
16063
16272
|
const extraTransformFnParams = [];
|
|
16064
16273
|
if (messageOp.postprocessingParams.size > 0) {
|
|
16065
|
-
extraTransformFnParams.push(
|
|
16274
|
+
extraTransformFnParams.push(mapLiteral(formattedPostprocessingParams, true));
|
|
16066
16275
|
}
|
|
16067
16276
|
transformFn = (expr) => importExpr(Identifiers.i18nPostprocess).callFn([expr, ...extraTransformFnParams]);
|
|
16068
16277
|
}
|
|
16069
16278
|
statements.push(...getTranslationDeclStmts(messageOp.message, mainVar, closureVar, messageOp.params, transformFn));
|
|
16070
16279
|
return { mainVar, statements };
|
|
16071
16280
|
}
|
|
16281
|
+
function addSubMessageParams(messageOp, subMessagePlaceholders) {
|
|
16282
|
+
for (const [placeholder, subMessages] of subMessagePlaceholders) {
|
|
16283
|
+
if (subMessages.length === 1) {
|
|
16284
|
+
messageOp.params.set(placeholder, subMessages[0]);
|
|
16285
|
+
} else {
|
|
16286
|
+
messageOp.params.set(placeholder, literal(`${ESCAPE2}${I18N_ICU_MAPPING_PREFIX2}${placeholder}${ESCAPE2}`));
|
|
16287
|
+
messageOp.postprocessingParams.set(placeholder, literalArr(subMessages));
|
|
16288
|
+
messageOp.needsPostprocessing = true;
|
|
16289
|
+
}
|
|
16290
|
+
}
|
|
16291
|
+
}
|
|
16072
16292
|
function getTranslationDeclStmts(message, variable2, closureVar, params, transformFn) {
|
|
16073
16293
|
const paramsObject = Object.fromEntries(params);
|
|
16074
16294
|
const statements = [
|
|
@@ -16096,23 +16316,9 @@ function i18nGenerateClosureVar(pool, messageId, fileBasedI18nSuffix, useExterna
|
|
|
16096
16316
|
}
|
|
16097
16317
|
return variable(name);
|
|
16098
16318
|
}
|
|
16099
|
-
function assertAllParamsResolved(op) {
|
|
16100
|
-
for (let placeholder in op.message.placeholders) {
|
|
16101
|
-
placeholder = placeholder.trimEnd();
|
|
16102
|
-
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
16103
|
-
throw Error(`Failed to resolve i18n placeholder: ${placeholder}`);
|
|
16104
|
-
}
|
|
16105
|
-
}
|
|
16106
|
-
for (let placeholder in op.message.placeholderToMessage) {
|
|
16107
|
-
placeholder = placeholder.trimEnd();
|
|
16108
|
-
if (!op.params.has(placeholder) && !op.postprocessingParams.has(placeholder)) {
|
|
16109
|
-
throw Error(`Failed to resolve i18n message placeholder: ${placeholder}`);
|
|
16110
|
-
}
|
|
16111
|
-
}
|
|
16112
|
-
}
|
|
16113
16319
|
|
|
16114
|
-
// bazel-out/
|
|
16115
|
-
function
|
|
16320
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/i18n_text_extraction.mjs
|
|
16321
|
+
function convertI18nText(job) {
|
|
16116
16322
|
var _a2;
|
|
16117
16323
|
for (const unit of job.units) {
|
|
16118
16324
|
let currentI18n = null;
|
|
@@ -16161,7 +16367,7 @@ function extractI18nText(job) {
|
|
|
16161
16367
|
const ops = [];
|
|
16162
16368
|
for (let i = 0; i < op.interpolation.expressions.length; i++) {
|
|
16163
16369
|
const expr = op.interpolation.expressions[i];
|
|
16164
|
-
ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.handle, expr, op.i18nPlaceholders[i], resolutionTime, (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
16370
|
+
ops.push(createI18nExpressionOp(contextId, i18nOp.xref, i18nOp.xref, i18nOp.handle, expr, op.interpolation.i18nPlaceholders[i], resolutionTime, I18nExpressionFor.I18nText, "", (_a2 = expr.sourceSpan) != null ? _a2 : op.sourceSpan));
|
|
16165
16371
|
}
|
|
16166
16372
|
OpList.replaceWithMany(op, ops);
|
|
16167
16373
|
break;
|
|
@@ -16170,7 +16376,7 @@ function extractI18nText(job) {
|
|
|
16170
16376
|
}
|
|
16171
16377
|
}
|
|
16172
16378
|
|
|
16173
|
-
// bazel-out/
|
|
16379
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/local_refs.mjs
|
|
16174
16380
|
function liftLocalRefs(job) {
|
|
16175
16381
|
for (const unit of job.units) {
|
|
16176
16382
|
for (const op of unit.create) {
|
|
@@ -16200,7 +16406,7 @@ function serializeLocalRefs(refs) {
|
|
|
16200
16406
|
return literalArr(constRefs);
|
|
16201
16407
|
}
|
|
16202
16408
|
|
|
16203
|
-
// bazel-out/
|
|
16409
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/namespace.mjs
|
|
16204
16410
|
function emitNamespaceChanges(job) {
|
|
16205
16411
|
for (const unit of job.units) {
|
|
16206
16412
|
let activeNamespace = Namespace.HTML;
|
|
@@ -16216,7 +16422,7 @@ function emitNamespaceChanges(job) {
|
|
|
16216
16422
|
}
|
|
16217
16423
|
}
|
|
16218
16424
|
|
|
16219
|
-
// bazel-out/
|
|
16425
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/style_parser.mjs
|
|
16220
16426
|
function parse(value) {
|
|
16221
16427
|
const styles = [];
|
|
16222
16428
|
let i = 0;
|
|
@@ -16277,7 +16483,7 @@ function hyphenate2(value) {
|
|
|
16277
16483
|
}).toLowerCase();
|
|
16278
16484
|
}
|
|
16279
16485
|
|
|
16280
|
-
// bazel-out/
|
|
16486
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/naming.mjs
|
|
16281
16487
|
function nameFunctionsAndVariables(job) {
|
|
16282
16488
|
addNamesToView(job.root, job.componentName, { index: 0 }, job.compatibility === CompatibilityMode.TemplateDefinitionBuilder);
|
|
16283
16489
|
}
|
|
@@ -16392,7 +16598,7 @@ function stripImportant(name) {
|
|
|
16392
16598
|
return name;
|
|
16393
16599
|
}
|
|
16394
16600
|
|
|
16395
|
-
// bazel-out/
|
|
16601
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/next_context_merging.mjs
|
|
16396
16602
|
function mergeNextContextExpressions(job) {
|
|
16397
16603
|
for (const unit of job.units) {
|
|
16398
16604
|
for (const op of unit.create) {
|
|
@@ -16438,7 +16644,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16438
16644
|
}
|
|
16439
16645
|
}
|
|
16440
16646
|
|
|
16441
|
-
// bazel-out/
|
|
16647
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
16442
16648
|
var CONTAINER_TAG = "ng-container";
|
|
16443
16649
|
function generateNgContainerOps(job) {
|
|
16444
16650
|
for (const unit of job.units) {
|
|
@@ -16455,7 +16661,7 @@ function generateNgContainerOps(job) {
|
|
|
16455
16661
|
}
|
|
16456
16662
|
}
|
|
16457
16663
|
|
|
16458
|
-
// bazel-out/
|
|
16664
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nonbindable.mjs
|
|
16459
16665
|
function lookupElement3(elements, xref) {
|
|
16460
16666
|
const el = elements.get(xref);
|
|
16461
16667
|
if (el === void 0) {
|
|
@@ -16485,7 +16691,7 @@ function disableBindings(job) {
|
|
|
16485
16691
|
}
|
|
16486
16692
|
}
|
|
16487
16693
|
|
|
16488
|
-
// bazel-out/
|
|
16694
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/nullish_coalescing.mjs
|
|
16489
16695
|
function generateNullishCoalesceExpressions(job) {
|
|
16490
16696
|
for (const unit of job.units) {
|
|
16491
16697
|
for (const op of unit.ops()) {
|
|
@@ -16501,7 +16707,7 @@ function generateNullishCoalesceExpressions(job) {
|
|
|
16501
16707
|
}
|
|
16502
16708
|
}
|
|
16503
16709
|
|
|
16504
|
-
// bazel-out/
|
|
16710
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ordering.mjs
|
|
16505
16711
|
function kindTest(kind) {
|
|
16506
16712
|
return (op) => op.kind === kind;
|
|
16507
16713
|
}
|
|
@@ -16575,7 +16781,7 @@ function keepLast(ops) {
|
|
|
16575
16781
|
return ops.slice(ops.length - 1);
|
|
16576
16782
|
}
|
|
16577
16783
|
|
|
16578
|
-
// bazel-out/
|
|
16784
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/parse_extracted_styles.mjs
|
|
16579
16785
|
function parseExtractedStyles(job) {
|
|
16580
16786
|
for (const unit of job.units) {
|
|
16581
16787
|
for (const op of unit.create) {
|
|
@@ -16583,13 +16789,13 @@ function parseExtractedStyles(job) {
|
|
|
16583
16789
|
if (op.name === "style") {
|
|
16584
16790
|
const parsedStyles = parse(op.expression.value);
|
|
16585
16791
|
for (let i = 0; i < parsedStyles.length - 1; i += 2) {
|
|
16586
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1])), op);
|
|
16792
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.StyleProperty, parsedStyles[i], literal(parsedStyles[i + 1]), null), op);
|
|
16587
16793
|
}
|
|
16588
16794
|
OpList.remove(op);
|
|
16589
16795
|
} else if (op.name === "class") {
|
|
16590
16796
|
const parsedClasses = op.expression.value.trim().split(/\s+/g);
|
|
16591
16797
|
for (const parsedClass of parsedClasses) {
|
|
16592
|
-
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null), op);
|
|
16798
|
+
OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.ClassName, parsedClass, null, null), op);
|
|
16593
16799
|
}
|
|
16594
16800
|
OpList.remove(op);
|
|
16595
16801
|
}
|
|
@@ -16598,22 +16804,32 @@ function parseExtractedStyles(job) {
|
|
|
16598
16804
|
}
|
|
16599
16805
|
}
|
|
16600
16806
|
|
|
16601
|
-
// bazel-out/
|
|
16807
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs
|
|
16602
16808
|
function removeContentSelectors(job) {
|
|
16603
16809
|
for (const unit of job.units) {
|
|
16604
16810
|
const elements = createOpXrefMap(unit);
|
|
16605
|
-
for (const op of unit.
|
|
16811
|
+
for (const op of unit.ops()) {
|
|
16606
16812
|
switch (op.kind) {
|
|
16607
16813
|
case OpKind.Binding:
|
|
16608
16814
|
const target = lookupInXrefMap(elements, op.target);
|
|
16609
|
-
if (op.name
|
|
16815
|
+
if (isSelectAttribute(op.name) && target.kind === OpKind.Projection) {
|
|
16610
16816
|
OpList.remove(op);
|
|
16611
16817
|
}
|
|
16612
16818
|
break;
|
|
16819
|
+
case OpKind.Projection:
|
|
16820
|
+
for (let i = op.attributes.length - 2; i >= 0; i -= 2) {
|
|
16821
|
+
if (isSelectAttribute(op.attributes[i])) {
|
|
16822
|
+
op.attributes.splice(i, 2);
|
|
16823
|
+
}
|
|
16824
|
+
}
|
|
16825
|
+
break;
|
|
16613
16826
|
}
|
|
16614
16827
|
}
|
|
16615
16828
|
}
|
|
16616
16829
|
}
|
|
16830
|
+
function isSelectAttribute(name) {
|
|
16831
|
+
return name.toLowerCase() === "select";
|
|
16832
|
+
}
|
|
16617
16833
|
function lookupInXrefMap(map, xref) {
|
|
16618
16834
|
const el = map.get(xref);
|
|
16619
16835
|
if (el === void 0) {
|
|
@@ -16622,7 +16838,7 @@ function lookupInXrefMap(map, xref) {
|
|
|
16622
16838
|
return el;
|
|
16623
16839
|
}
|
|
16624
16840
|
|
|
16625
|
-
// bazel-out/
|
|
16841
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_creation.mjs
|
|
16626
16842
|
function createPipes(job) {
|
|
16627
16843
|
for (const unit of job.units) {
|
|
16628
16844
|
processPipeBindingsInView(unit);
|
|
@@ -16670,7 +16886,7 @@ function addPipeToCreationBlock(unit, afterTargetXref, binding) {
|
|
|
16670
16886
|
throw new Error(`AssertionError: unable to find insertion point for pipe ${binding.name}`);
|
|
16671
16887
|
}
|
|
16672
16888
|
|
|
16673
|
-
// bazel-out/
|
|
16889
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pipe_variadic.mjs
|
|
16674
16890
|
function createVariadicPipes(job) {
|
|
16675
16891
|
for (const unit of job.units) {
|
|
16676
16892
|
for (const op of unit.update) {
|
|
@@ -16687,7 +16903,7 @@ function createVariadicPipes(job) {
|
|
|
16687
16903
|
}
|
|
16688
16904
|
}
|
|
16689
16905
|
|
|
16690
|
-
// bazel-out/
|
|
16906
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs
|
|
16691
16907
|
function propagateI18nBlocks(job) {
|
|
16692
16908
|
propagateI18nBlocksToTemplates(job.root, 0);
|
|
16693
16909
|
}
|
|
@@ -16700,6 +16916,9 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
16700
16916
|
i18nBlock = op;
|
|
16701
16917
|
break;
|
|
16702
16918
|
case OpKind.I18nEnd:
|
|
16919
|
+
if (i18nBlock.subTemplateIndex === null) {
|
|
16920
|
+
subTemplateIndex = 0;
|
|
16921
|
+
}
|
|
16703
16922
|
i18nBlock = null;
|
|
16704
16923
|
break;
|
|
16705
16924
|
case OpKind.Template:
|
|
@@ -16725,7 +16944,7 @@ function wrapTemplateWithI18n(unit, parentI18n) {
|
|
|
16725
16944
|
}
|
|
16726
16945
|
}
|
|
16727
16946
|
|
|
16728
|
-
// bazel-out/
|
|
16947
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_function_extraction.mjs
|
|
16729
16948
|
function extractPureFunctions(job) {
|
|
16730
16949
|
for (const view of job.units) {
|
|
16731
16950
|
for (const op of view.ops()) {
|
|
@@ -16767,7 +16986,7 @@ var PureFunctionConstant = class extends GenericKeyFn {
|
|
|
16767
16986
|
}
|
|
16768
16987
|
};
|
|
16769
16988
|
|
|
16770
|
-
// bazel-out/
|
|
16989
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/pure_literal_structures.mjs
|
|
16771
16990
|
function generatePureLiteralStructures(job) {
|
|
16772
16991
|
for (const unit of job.units) {
|
|
16773
16992
|
for (const op of unit.update) {
|
|
@@ -16814,7 +17033,7 @@ function transformLiteralMap(expr) {
|
|
|
16814
17033
|
return new PureFunctionExpr(literalMap(derivedEntries), nonConstantArgs);
|
|
16815
17034
|
}
|
|
16816
17035
|
|
|
16817
|
-
// bazel-out/
|
|
17036
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
16818
17037
|
function element(slot, tag, constIndex, localRefIndex, sourceSpan) {
|
|
16819
17038
|
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex, sourceSpan);
|
|
16820
17039
|
}
|
|
@@ -17029,6 +17248,10 @@ function i18n(slot, constIndex, subTemplateIndex) {
|
|
|
17029
17248
|
function i18nEnd() {
|
|
17030
17249
|
return call(Identifiers.i18nEnd, [], null);
|
|
17031
17250
|
}
|
|
17251
|
+
function i18nAttributes(slot, i18nAttributesConfig) {
|
|
17252
|
+
const args = [literal(slot), literal(i18nAttributesConfig)];
|
|
17253
|
+
return call(Identifiers.i18nAttributes, args, null);
|
|
17254
|
+
}
|
|
17032
17255
|
function property(name, expression, sanitizer, sourceSpan) {
|
|
17033
17256
|
const args = [literal(name), expression];
|
|
17034
17257
|
if (sanitizer !== null) {
|
|
@@ -17325,7 +17548,7 @@ function callVariadicInstruction(config, baseArgs, interpolationArgs, extraArgs,
|
|
|
17325
17548
|
return createStatementOp(callVariadicInstructionExpr(config, baseArgs, interpolationArgs, extraArgs, sourceSpan).toStmt());
|
|
17326
17549
|
}
|
|
17327
17550
|
|
|
17328
|
-
// bazel-out/
|
|
17551
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/reify.mjs
|
|
17329
17552
|
var sanitizerIdentifierMap = /* @__PURE__ */ new Map([
|
|
17330
17553
|
[SanitizerFn.Html, Identifiers.sanitizeHtml],
|
|
17331
17554
|
[SanitizerFn.IframeAttribute, Identifiers.validateIframeAttribute],
|
|
@@ -17375,6 +17598,12 @@ function reifyCreateOperations(unit, ops) {
|
|
|
17375
17598
|
case OpKind.I18n:
|
|
17376
17599
|
OpList.replace(op, i18n(op.handle.slot, op.messageIndex, op.subTemplateIndex));
|
|
17377
17600
|
break;
|
|
17601
|
+
case OpKind.I18nAttributes:
|
|
17602
|
+
if (op.i18nAttributesConfig === null) {
|
|
17603
|
+
throw new Error(`AssertionError: i18nAttributesConfig was not set`);
|
|
17604
|
+
}
|
|
17605
|
+
OpList.replace(op, i18nAttributes(op.handle.slot, op.i18nAttributesConfig));
|
|
17606
|
+
break;
|
|
17378
17607
|
case OpKind.Template:
|
|
17379
17608
|
if (!(unit instanceof ViewCompilationUnit)) {
|
|
17380
17609
|
throw new Error(`AssertionError: must be compiling a component`);
|
|
@@ -17654,7 +17883,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
17654
17883
|
return fn(params, handlerStmts, void 0, void 0, name);
|
|
17655
17884
|
}
|
|
17656
17885
|
|
|
17657
|
-
// bazel-out/
|
|
17886
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_empty_bindings.mjs
|
|
17658
17887
|
function removeEmptyBindings(job) {
|
|
17659
17888
|
for (const unit of job.units) {
|
|
17660
17889
|
for (const op of unit.update) {
|
|
@@ -17675,7 +17904,7 @@ function removeEmptyBindings(job) {
|
|
|
17675
17904
|
}
|
|
17676
17905
|
}
|
|
17677
17906
|
|
|
17678
|
-
// bazel-out/
|
|
17907
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_i18n_contexts.mjs
|
|
17679
17908
|
function removeI18nContexts(job) {
|
|
17680
17909
|
for (const unit of job.units) {
|
|
17681
17910
|
for (const op of unit.create) {
|
|
@@ -17691,7 +17920,29 @@ function removeI18nContexts(job) {
|
|
|
17691
17920
|
}
|
|
17692
17921
|
}
|
|
17693
17922
|
|
|
17694
|
-
// bazel-out/
|
|
17923
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs
|
|
17924
|
+
function removeUnusedI18nAttributesOps(job) {
|
|
17925
|
+
for (const unit of job.units) {
|
|
17926
|
+
const ownersWithI18nExpressions = /* @__PURE__ */ new Set();
|
|
17927
|
+
for (const op of unit.update) {
|
|
17928
|
+
switch (op.kind) {
|
|
17929
|
+
case OpKind.I18nExpression:
|
|
17930
|
+
ownersWithI18nExpressions.add(op.i18nOwner);
|
|
17931
|
+
}
|
|
17932
|
+
}
|
|
17933
|
+
for (const op of unit.create) {
|
|
17934
|
+
switch (op.kind) {
|
|
17935
|
+
case OpKind.I18nAttributes:
|
|
17936
|
+
if (ownersWithI18nExpressions.has(op.xref)) {
|
|
17937
|
+
continue;
|
|
17938
|
+
}
|
|
17939
|
+
OpList.remove(op);
|
|
17940
|
+
}
|
|
17941
|
+
}
|
|
17942
|
+
}
|
|
17943
|
+
}
|
|
17944
|
+
|
|
17945
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/repeater_derived_vars.mjs
|
|
17695
17946
|
function generateRepeaterDerivedVars(job) {
|
|
17696
17947
|
const repeaters = /* @__PURE__ */ new Map();
|
|
17697
17948
|
for (const unit of job.units) {
|
|
@@ -17723,7 +17974,7 @@ function generateRepeaterDerivedVars(job) {
|
|
|
17723
17974
|
}
|
|
17724
17975
|
}
|
|
17725
17976
|
|
|
17726
|
-
// bazel-out/
|
|
17977
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_contexts.mjs
|
|
17727
17978
|
function resolveContexts(job) {
|
|
17728
17979
|
for (const unit of job.units) {
|
|
17729
17980
|
processLexicalScope(unit, unit.create);
|
|
@@ -17764,7 +18015,7 @@ function processLexicalScope(view, ops) {
|
|
|
17764
18015
|
}
|
|
17765
18016
|
}
|
|
17766
18017
|
|
|
17767
|
-
// bazel-out/
|
|
18018
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
17768
18019
|
function resolveDollarEvent(job) {
|
|
17769
18020
|
for (const unit of job.units) {
|
|
17770
18021
|
transformDollarEvent(unit, unit.create);
|
|
@@ -17785,7 +18036,7 @@ function transformDollarEvent(unit, ops) {
|
|
|
17785
18036
|
}
|
|
17786
18037
|
}
|
|
17787
18038
|
|
|
17788
|
-
// bazel-out/
|
|
18039
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs
|
|
17789
18040
|
function resolveI18nElementPlaceholders(job) {
|
|
17790
18041
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17791
18042
|
const elements = /* @__PURE__ */ new Map();
|
|
@@ -17803,8 +18054,9 @@ function resolveI18nElementPlaceholders(job) {
|
|
|
17803
18054
|
}
|
|
17804
18055
|
resolvePlaceholdersForView(job, job.root, i18nContexts, elements);
|
|
17805
18056
|
}
|
|
17806
|
-
function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
|
|
18057
|
+
function resolvePlaceholdersForView(job, unit, i18nContexts, elements, pendingStructuralDirective) {
|
|
17807
18058
|
let currentOps = null;
|
|
18059
|
+
let pendingStructuralDirectiveCloses = /* @__PURE__ */ new Map();
|
|
17808
18060
|
for (const op of unit.create) {
|
|
17809
18061
|
switch (op.kind) {
|
|
17810
18062
|
case OpKind.I18nStart:
|
|
@@ -17821,50 +18073,99 @@ function resolvePlaceholdersForView(job, unit, i18nContexts, elements) {
|
|
|
17821
18073
|
if (currentOps === null) {
|
|
17822
18074
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17823
18075
|
}
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
flags |= I18nParamValueFlags.CloseTag;
|
|
18076
|
+
recordElementStart(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18077
|
+
if (pendingStructuralDirective && op.i18nPlaceholder.closeName) {
|
|
18078
|
+
pendingStructuralDirectiveCloses.set(op.xref, pendingStructuralDirective);
|
|
17828
18079
|
}
|
|
17829
|
-
|
|
18080
|
+
pendingStructuralDirective = void 0;
|
|
17830
18081
|
}
|
|
17831
18082
|
break;
|
|
17832
18083
|
case OpKind.ElementEnd:
|
|
17833
18084
|
const startOp = elements.get(op.xref);
|
|
17834
18085
|
if (startOp && startOp.i18nPlaceholder !== void 0) {
|
|
17835
18086
|
if (currentOps === null) {
|
|
17836
|
-
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17837
|
-
}
|
|
17838
|
-
const { closeName } = startOp.i18nPlaceholder;
|
|
17839
|
-
if (closeName !== "") {
|
|
17840
|
-
addParam(currentOps.i18nContext.params, closeName, startOp.handle.slot, currentOps.i18nBlock.subTemplateIndex, I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag);
|
|
18087
|
+
throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");
|
|
17841
18088
|
}
|
|
18089
|
+
recordElementClose(startOp, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirectiveCloses.get(op.xref));
|
|
18090
|
+
pendingStructuralDirectiveCloses.delete(op.xref);
|
|
17842
18091
|
}
|
|
17843
18092
|
break;
|
|
17844
|
-
case OpKind.
|
|
18093
|
+
case OpKind.Projection:
|
|
17845
18094
|
if (op.i18nPlaceholder !== void 0) {
|
|
17846
18095
|
if (currentOps === null) {
|
|
17847
18096
|
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
17848
18097
|
}
|
|
17849
|
-
|
|
17850
|
-
|
|
17851
|
-
|
|
17852
|
-
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
addParam(currentOps.i18nContext.params, startName, op.handle.slot, subTemplateIndex, startFlags);
|
|
18098
|
+
recordElementStart(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18099
|
+
recordElementClose(op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18100
|
+
pendingStructuralDirective = void 0;
|
|
18101
|
+
}
|
|
18102
|
+
break;
|
|
18103
|
+
case OpKind.Template:
|
|
18104
|
+
if (op.i18nPlaceholder === void 0) {
|
|
17857
18105
|
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
17858
|
-
if (!isSelfClosing) {
|
|
17859
|
-
addParam(currentOps.i18nContext.params, closeName, op.handle.slot, subTemplateIndex, I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag);
|
|
17860
|
-
}
|
|
17861
18106
|
} else {
|
|
17862
|
-
|
|
18107
|
+
if (currentOps === null) {
|
|
18108
|
+
throw Error("i18n tag placeholder should only occur inside an i18n block");
|
|
18109
|
+
}
|
|
18110
|
+
if (op.templateKind === TemplateKind.Structural) {
|
|
18111
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements, op);
|
|
18112
|
+
} else {
|
|
18113
|
+
recordTemplateStart(job, op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18114
|
+
resolvePlaceholdersForView(job, job.views.get(op.xref), i18nContexts, elements);
|
|
18115
|
+
recordTemplateClose(job, op, currentOps.i18nContext, currentOps.i18nBlock, pendingStructuralDirective);
|
|
18116
|
+
pendingStructuralDirective = void 0;
|
|
18117
|
+
}
|
|
17863
18118
|
}
|
|
17864
18119
|
break;
|
|
17865
18120
|
}
|
|
17866
18121
|
}
|
|
17867
18122
|
}
|
|
18123
|
+
function recordElementStart(op, i18nContext, i18nBlock, structuralDirective) {
|
|
18124
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
18125
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.OpenTag;
|
|
18126
|
+
let value = op.handle.slot;
|
|
18127
|
+
if (structuralDirective !== void 0) {
|
|
18128
|
+
flags |= I18nParamValueFlags.TemplateTag;
|
|
18129
|
+
value = { element: value, template: structuralDirective.handle.slot };
|
|
18130
|
+
}
|
|
18131
|
+
if (!closeName) {
|
|
18132
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
18133
|
+
}
|
|
18134
|
+
addParam(i18nContext.params, startName, value, i18nBlock.subTemplateIndex, flags);
|
|
18135
|
+
}
|
|
18136
|
+
function recordElementClose(op, i18nContext, i18nBlock, structuralDirective) {
|
|
18137
|
+
const { closeName } = op.i18nPlaceholder;
|
|
18138
|
+
if (closeName) {
|
|
18139
|
+
let flags = I18nParamValueFlags.ElementTag | I18nParamValueFlags.CloseTag;
|
|
18140
|
+
let value = op.handle.slot;
|
|
18141
|
+
if (structuralDirective !== void 0) {
|
|
18142
|
+
flags |= I18nParamValueFlags.TemplateTag;
|
|
18143
|
+
value = { element: value, template: structuralDirective.handle.slot };
|
|
18144
|
+
}
|
|
18145
|
+
addParam(i18nContext.params, closeName, value, i18nBlock.subTemplateIndex, flags);
|
|
18146
|
+
}
|
|
18147
|
+
}
|
|
18148
|
+
function recordTemplateStart(job, op, i18nContext, i18nBlock, structuralDirective) {
|
|
18149
|
+
let { startName, closeName } = op.i18nPlaceholder;
|
|
18150
|
+
let flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.OpenTag;
|
|
18151
|
+
if (!closeName) {
|
|
18152
|
+
flags |= I18nParamValueFlags.CloseTag;
|
|
18153
|
+
}
|
|
18154
|
+
if (structuralDirective !== void 0) {
|
|
18155
|
+
addParam(i18nContext.params, startName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18156
|
+
}
|
|
18157
|
+
addParam(i18nContext.params, startName, op.handle.slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, op), flags);
|
|
18158
|
+
}
|
|
18159
|
+
function recordTemplateClose(job, op, i18nContext, i18nBlock, structuralDirective) {
|
|
18160
|
+
const { startName, closeName } = op.i18nPlaceholder;
|
|
18161
|
+
const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
|
|
18162
|
+
if (closeName) {
|
|
18163
|
+
addParam(i18nContext.params, closeName, op.handle.slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, op), flags);
|
|
18164
|
+
if (structuralDirective !== void 0) {
|
|
18165
|
+
addParam(i18nContext.params, closeName, structuralDirective.handle.slot, i18nBlock.subTemplateIndex, flags);
|
|
18166
|
+
}
|
|
18167
|
+
}
|
|
18168
|
+
}
|
|
17868
18169
|
function getSubTemplateIndexForTemplateTag(job, i18nOp, op) {
|
|
17869
18170
|
for (const childOp of job.views.get(op.xref).create) {
|
|
17870
18171
|
if (childOp.kind === OpKind.I18nStart) {
|
|
@@ -17880,8 +18181,9 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
17880
18181
|
params.set(placeholder, values);
|
|
17881
18182
|
}
|
|
17882
18183
|
|
|
17883
|
-
// bazel-out/
|
|
18184
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
17884
18185
|
function resolveI18nExpressionPlaceholders(job) {
|
|
18186
|
+
var _a2;
|
|
17885
18187
|
const subTemplateIndicies = /* @__PURE__ */ new Map();
|
|
17886
18188
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
17887
18189
|
for (const unit of job.units) {
|
|
@@ -17897,12 +18199,13 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17897
18199
|
}
|
|
17898
18200
|
}
|
|
17899
18201
|
const expressionIndices = /* @__PURE__ */ new Map();
|
|
18202
|
+
const referenceIndex = (op) => op.usage === I18nExpressionFor.I18nText ? op.i18nOwner : op.context;
|
|
17900
18203
|
for (const unit of job.units) {
|
|
17901
18204
|
for (const op of unit.update) {
|
|
17902
18205
|
if (op.kind === OpKind.I18nExpression) {
|
|
17903
18206
|
const i18nContext = i18nContexts.get(op.context);
|
|
17904
|
-
const index = expressionIndices.get(op
|
|
17905
|
-
const subTemplateIndex = subTemplateIndicies.get(op.
|
|
18207
|
+
const index = expressionIndices.get(referenceIndex(op)) || 0;
|
|
18208
|
+
const subTemplateIndex = (_a2 = subTemplateIndicies.get(op.i18nOwner)) != null ? _a2 : null;
|
|
17906
18209
|
const params = op.resolutionTime === I18nParamResolutionTime.Creation ? i18nContext.params : i18nContext.postprocessingParams;
|
|
17907
18210
|
const values = params.get(op.i18nPlaceholder) || [];
|
|
17908
18211
|
values.push({
|
|
@@ -17911,13 +18214,13 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
17911
18214
|
flags: I18nParamValueFlags.ExpressionIndex
|
|
17912
18215
|
});
|
|
17913
18216
|
params.set(op.i18nPlaceholder, values);
|
|
17914
|
-
expressionIndices.set(op
|
|
18217
|
+
expressionIndices.set(referenceIndex(op), index + 1);
|
|
17915
18218
|
}
|
|
17916
18219
|
}
|
|
17917
18220
|
}
|
|
17918
18221
|
}
|
|
17919
18222
|
|
|
17920
|
-
// bazel-out/
|
|
18223
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs
|
|
17921
18224
|
function resolveI18nIcuPlaceholders(job) {
|
|
17922
18225
|
for (const unit of job.units) {
|
|
17923
18226
|
for (const op of unit.create) {
|
|
@@ -17961,7 +18264,7 @@ var ResolveIcuPlaceholdersVisitor = class extends RecurseVisitor {
|
|
|
17961
18264
|
}
|
|
17962
18265
|
};
|
|
17963
18266
|
|
|
17964
|
-
// bazel-out/
|
|
18267
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_names.mjs
|
|
17965
18268
|
function resolveNames(job) {
|
|
17966
18269
|
for (const unit of job.units) {
|
|
17967
18270
|
processLexicalScope2(unit, unit.create, null);
|
|
@@ -18025,7 +18328,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
18025
18328
|
}
|
|
18026
18329
|
}
|
|
18027
18330
|
|
|
18028
|
-
// bazel-out/
|
|
18331
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_sanitizers.mjs
|
|
18029
18332
|
var sanitizers = /* @__PURE__ */ new Map([
|
|
18030
18333
|
[SecurityContext.HTML, SanitizerFn.Html],
|
|
18031
18334
|
[SecurityContext.SCRIPT, SanitizerFn.Script],
|
|
@@ -18062,7 +18365,7 @@ function isIframeElement(op) {
|
|
|
18062
18365
|
return op.kind === OpKind.ElementStart && ((_a2 = op.tag) == null ? void 0 : _a2.toLowerCase()) === "iframe";
|
|
18063
18366
|
}
|
|
18064
18367
|
|
|
18065
|
-
// bazel-out/
|
|
18368
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
18066
18369
|
function saveAndRestoreView(job) {
|
|
18067
18370
|
for (const unit of job.units) {
|
|
18068
18371
|
unit.create.prepend([
|
|
@@ -18107,7 +18410,7 @@ function addSaveRestoreViewOperationToListener(unit, op) {
|
|
|
18107
18410
|
}
|
|
18108
18411
|
}
|
|
18109
18412
|
|
|
18110
|
-
// bazel-out/
|
|
18413
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/slot_allocation.mjs
|
|
18111
18414
|
function allocateSlots(job) {
|
|
18112
18415
|
const slotMap = /* @__PURE__ */ new Map();
|
|
18113
18416
|
for (const unit of job.units) {
|
|
@@ -18132,7 +18435,7 @@ function allocateSlots(job) {
|
|
|
18132
18435
|
}
|
|
18133
18436
|
}
|
|
18134
18437
|
|
|
18135
|
-
// bazel-out/
|
|
18438
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/style_binding_specialization.mjs
|
|
18136
18439
|
function specializeStyleBindings(job) {
|
|
18137
18440
|
for (const unit of job.units) {
|
|
18138
18441
|
for (const op of unit.update) {
|
|
@@ -18162,7 +18465,7 @@ function specializeStyleBindings(job) {
|
|
|
18162
18465
|
}
|
|
18163
18466
|
}
|
|
18164
18467
|
|
|
18165
|
-
// bazel-out/
|
|
18468
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/temporary_variables.mjs
|
|
18166
18469
|
function generateTemporaryVariables(job) {
|
|
18167
18470
|
for (const unit of job.units) {
|
|
18168
18471
|
unit.create.prepend(generateTemporaries(unit.create));
|
|
@@ -18220,7 +18523,7 @@ function assignName(names, expr) {
|
|
|
18220
18523
|
expr.name = name;
|
|
18221
18524
|
}
|
|
18222
18525
|
|
|
18223
|
-
// bazel-out/
|
|
18526
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_generation.mjs
|
|
18224
18527
|
function generateTrackFns(job) {
|
|
18225
18528
|
for (const unit of job.units) {
|
|
18226
18529
|
for (const op of unit.create) {
|
|
@@ -18250,7 +18553,7 @@ function generateTrackFns(job) {
|
|
|
18250
18553
|
}
|
|
18251
18554
|
}
|
|
18252
18555
|
|
|
18253
|
-
// bazel-out/
|
|
18556
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_fn_optimization.mjs
|
|
18254
18557
|
function optimizeTrackFns(job) {
|
|
18255
18558
|
for (const unit of job.units) {
|
|
18256
18559
|
for (const op of unit.create) {
|
|
@@ -18297,7 +18600,7 @@ function isTrackByFunctionCall(rootView, expr) {
|
|
|
18297
18600
|
return true;
|
|
18298
18601
|
}
|
|
18299
18602
|
|
|
18300
|
-
// bazel-out/
|
|
18603
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/track_variables.mjs
|
|
18301
18604
|
function generateTrackVariables(job) {
|
|
18302
18605
|
for (const unit of job.units) {
|
|
18303
18606
|
for (const op of unit.create) {
|
|
@@ -18318,7 +18621,7 @@ function generateTrackVariables(job) {
|
|
|
18318
18621
|
}
|
|
18319
18622
|
}
|
|
18320
18623
|
|
|
18321
|
-
// bazel-out/
|
|
18624
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/var_counting.mjs
|
|
18322
18625
|
function countVariables(job) {
|
|
18323
18626
|
for (const unit of job.units) {
|
|
18324
18627
|
let varCount = 0;
|
|
@@ -18423,7 +18726,7 @@ function isSingletonInterpolation(expr) {
|
|
|
18423
18726
|
return true;
|
|
18424
18727
|
}
|
|
18425
18728
|
|
|
18426
|
-
// bazel-out/
|
|
18729
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/variable_optimization.mjs
|
|
18427
18730
|
function optimizeVariables(job) {
|
|
18428
18731
|
for (const unit of job.units) {
|
|
18429
18732
|
inlineAlwaysInlineVariables(unit.create);
|
|
@@ -18673,7 +18976,7 @@ function allowConservativeInlining(decl, target) {
|
|
|
18673
18976
|
}
|
|
18674
18977
|
}
|
|
18675
18978
|
|
|
18676
|
-
// bazel-out/
|
|
18979
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/wrap_icus.mjs
|
|
18677
18980
|
function wrapI18nIcus(job) {
|
|
18678
18981
|
for (const unit of job.units) {
|
|
18679
18982
|
let currentI18nOp = null;
|
|
@@ -18703,16 +19006,16 @@ function wrapI18nIcus(job) {
|
|
|
18703
19006
|
}
|
|
18704
19007
|
}
|
|
18705
19008
|
|
|
18706
|
-
// bazel-out/
|
|
19009
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
18707
19010
|
var phases = [
|
|
18708
19011
|
{ kind: CompilationJobKind.Tmpl, fn: removeContentSelectors },
|
|
18709
19012
|
{ kind: CompilationJobKind.Host, fn: parseHostStyleProperties },
|
|
18710
19013
|
{ kind: CompilationJobKind.Tmpl, fn: emitNamespaceChanges },
|
|
18711
|
-
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
18712
|
-
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
18713
19014
|
{ kind: CompilationJobKind.Tmpl, fn: propagateI18nBlocks },
|
|
18714
19015
|
{ kind: CompilationJobKind.Tmpl, fn: wrapI18nIcus },
|
|
18715
19016
|
{ kind: CompilationJobKind.Tmpl, fn: createI18nContexts },
|
|
19017
|
+
{ kind: CompilationJobKind.Both, fn: specializeStyleBindings },
|
|
19018
|
+
{ kind: CompilationJobKind.Both, fn: specializeBindings },
|
|
18716
19019
|
{ kind: CompilationJobKind.Both, fn: extractAttributes },
|
|
18717
19020
|
{ kind: CompilationJobKind.Both, fn: parseExtractedStyles },
|
|
18718
19021
|
{ kind: CompilationJobKind.Tmpl, fn: removeEmptyBindings },
|
|
@@ -18721,7 +19024,10 @@ var phases = [
|
|
|
18721
19024
|
{ kind: CompilationJobKind.Tmpl, fn: generateConditionalExpressions },
|
|
18722
19025
|
{ kind: CompilationJobKind.Tmpl, fn: createPipes },
|
|
18723
19026
|
{ kind: CompilationJobKind.Tmpl, fn: configureDeferInstructions },
|
|
18724
|
-
{ kind: CompilationJobKind.Tmpl, fn:
|
|
19027
|
+
{ kind: CompilationJobKind.Tmpl, fn: convertI18nText },
|
|
19028
|
+
{ kind: CompilationJobKind.Tmpl, fn: convertI18nBindings },
|
|
19029
|
+
{ kind: CompilationJobKind.Tmpl, fn: removeUnusedI18nAttributesOps },
|
|
19030
|
+
{ kind: CompilationJobKind.Tmpl, fn: assignI18nSlotDependencies },
|
|
18725
19031
|
{ kind: CompilationJobKind.Tmpl, fn: applyI18nExpressions },
|
|
18726
19032
|
{ kind: CompilationJobKind.Tmpl, fn: createVariadicPipes },
|
|
18727
19033
|
{ kind: CompilationJobKind.Both, fn: generatePureLiteralStructures },
|
|
@@ -18751,7 +19057,6 @@ var phases = [
|
|
|
18751
19057
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
18752
19058
|
{ kind: CompilationJobKind.Tmpl, fn: collectConstExpressions },
|
|
18753
19059
|
{ kind: CompilationJobKind.Both, fn: collectElementConsts },
|
|
18754
|
-
{ kind: CompilationJobKind.Tmpl, fn: assignI18nSlotDependencies },
|
|
18755
19060
|
{ kind: CompilationJobKind.Tmpl, fn: removeI18nContexts },
|
|
18756
19061
|
{ kind: CompilationJobKind.Both, fn: countVariables },
|
|
18757
19062
|
{ kind: CompilationJobKind.Tmpl, fn: generateAdvance },
|
|
@@ -18867,7 +19172,7 @@ function emitHostBindingFunction(job) {
|
|
|
18867
19172
|
);
|
|
18868
19173
|
}
|
|
18869
19174
|
|
|
18870
|
-
// bazel-out/
|
|
19175
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
18871
19176
|
var compatibilityMode = CompatibilityMode.TemplateDefinitionBuilder;
|
|
18872
19177
|
function ingestComponent(componentName, template2, constantPool, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta) {
|
|
18873
19178
|
const job = new ComponentCompilationJob(componentName, constantPool, compatibilityMode, relativeContextFilePath, i18nUseExternalIds, deferBlocksMeta);
|
|
@@ -18892,7 +19197,7 @@ function ingestHostProperty(job, property2, isTextAttribute) {
|
|
|
18892
19197
|
let expression;
|
|
18893
19198
|
const ast = property2.expression.ast;
|
|
18894
19199
|
if (ast instanceof Interpolation) {
|
|
18895
|
-
expression = new Interpolation2(ast.strings, ast.expressions.map((expr) => convertAst(expr, job, property2.sourceSpan)));
|
|
19200
|
+
expression = new Interpolation2(ast.strings, ast.expressions.map((expr) => convertAst(expr, job, property2.sourceSpan)), []);
|
|
18896
19201
|
} else {
|
|
18897
19202
|
expression = convertAst(ast, job, property2.sourceSpan);
|
|
18898
19203
|
}
|
|
@@ -18904,7 +19209,7 @@ function ingestHostProperty(job, property2, isTextAttribute) {
|
|
|
18904
19209
|
if (property2.isAnimation) {
|
|
18905
19210
|
bindingKind = BindingKind.Animation;
|
|
18906
19211
|
}
|
|
18907
|
-
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, SecurityContext.NONE, isTextAttribute, false, property2.sourceSpan));
|
|
19212
|
+
job.root.update.push(createBindingOp(job.root.xref, bindingKind, property2.name, expression, null, SecurityContext.NONE, isTextAttribute, false, null, property2.sourceSpan));
|
|
18908
19213
|
}
|
|
18909
19214
|
function ingestHostAttribute(job, name, value) {
|
|
18910
19215
|
const attrBinding = createBindingOp(
|
|
@@ -18916,6 +19221,7 @@ function ingestHostAttribute(job, name, value) {
|
|
|
18916
19221
|
SecurityContext.NONE,
|
|
18917
19222
|
true,
|
|
18918
19223
|
false,
|
|
19224
|
+
null,
|
|
18919
19225
|
null
|
|
18920
19226
|
);
|
|
18921
19227
|
job.root.update.push(attrBinding);
|
|
@@ -18985,24 +19291,29 @@ function ingestTemplate(unit, tmpl) {
|
|
|
18985
19291
|
const i18nPlaceholder = tmpl.i18n instanceof TagPlaceholder ? tmpl.i18n : void 0;
|
|
18986
19292
|
const namespace = namespaceForKey(namespacePrefix);
|
|
18987
19293
|
const functionNameSuffix = tagNameWithoutNamespace === null ? "" : prefixWithNamespace(tagNameWithoutNamespace, namespace);
|
|
18988
|
-
const
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
19294
|
+
const templateKind = isPlainTemplate(tmpl) ? TemplateKind.NgTemplate : TemplateKind.Structural;
|
|
19295
|
+
const templateOp = createTemplateOp(childView.xref, templateKind, tagNameWithoutNamespace, functionNameSuffix, namespace, i18nPlaceholder, tmpl.startSourceSpan);
|
|
19296
|
+
unit.create.push(templateOp);
|
|
19297
|
+
ingestBindings(unit, templateOp, tmpl);
|
|
19298
|
+
ingestReferences(templateOp, tmpl);
|
|
18992
19299
|
ingestNodes(childView, tmpl.children);
|
|
18993
19300
|
for (const { name, value } of tmpl.variables) {
|
|
18994
19301
|
childView.contextVariables.set(name, value !== "" ? value : "$implicit");
|
|
18995
19302
|
}
|
|
18996
|
-
if (
|
|
19303
|
+
if (templateKind === TemplateKind.NgTemplate && tmpl.i18n instanceof Message) {
|
|
18997
19304
|
const id = unit.job.allocateXrefId();
|
|
18998
19305
|
OpList.insertAfter(createI18nStartOp(id, tmpl.i18n), childView.create.head);
|
|
18999
19306
|
OpList.insertBefore(createI18nEndOp(id), childView.create.tail);
|
|
19000
19307
|
}
|
|
19001
19308
|
}
|
|
19002
19309
|
function ingestContent(unit, content) {
|
|
19003
|
-
|
|
19310
|
+
if (content.i18n !== void 0 && !(content.i18n instanceof TagPlaceholder)) {
|
|
19311
|
+
throw Error(`Unhandled i18n metadata type for element: ${content.i18n.constructor.name}`);
|
|
19312
|
+
}
|
|
19313
|
+
const attrs = content.attributes.flatMap((a) => [a.name, a.value]);
|
|
19314
|
+
const op = createProjectionOp(unit.job.allocateXrefId(), content.selector, content.i18n, attrs, content.sourceSpan);
|
|
19004
19315
|
for (const attr of content.attributes) {
|
|
19005
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue);
|
|
19316
|
+
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue, attr.i18n);
|
|
19006
19317
|
}
|
|
19007
19318
|
unit.create.push(op);
|
|
19008
19319
|
}
|
|
@@ -19030,9 +19341,10 @@ function ingestBoundText(unit, text2, i18nPlaceholders) {
|
|
|
19030
19341
|
const textXref = unit.job.allocateXrefId();
|
|
19031
19342
|
unit.create.push(createTextOp(textXref, "", text2.sourceSpan));
|
|
19032
19343
|
const baseSourceSpan = unit.job.compatibility ? null : text2.sourceSpan;
|
|
19033
|
-
unit.update.push(createInterpolateTextOp(textXref, new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan))
|
|
19344
|
+
unit.update.push(createInterpolateTextOp(textXref, new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, unit.job, baseSourceSpan)), i18nPlaceholders), text2.sourceSpan));
|
|
19034
19345
|
}
|
|
19035
19346
|
function ingestIfBlock(unit, ifBlock) {
|
|
19347
|
+
var _a2;
|
|
19036
19348
|
let firstXref = null;
|
|
19037
19349
|
let firstSlotHandle = null;
|
|
19038
19350
|
let conditions = [];
|
|
@@ -19046,14 +19358,21 @@ function ingestIfBlock(unit, ifBlock) {
|
|
|
19046
19358
|
if (ifCase.expressionAlias !== null) {
|
|
19047
19359
|
cView.contextVariables.set(ifCase.expressionAlias.name, CTX_REF);
|
|
19048
19360
|
}
|
|
19049
|
-
|
|
19050
|
-
|
|
19361
|
+
let ifCaseI18nMeta = void 0;
|
|
19362
|
+
if (ifCase.i18n !== void 0) {
|
|
19363
|
+
if (!(ifCase.i18n instanceof BlockPlaceholder)) {
|
|
19364
|
+
throw Error(`Unhandled i18n metadata type for if block: ${(_a2 = ifCase.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
19365
|
+
}
|
|
19366
|
+
ifCaseI18nMeta = ifCase.i18n;
|
|
19367
|
+
}
|
|
19368
|
+
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, tagName, "Conditional", Namespace.HTML, ifCaseI18nMeta, ifCase.sourceSpan);
|
|
19369
|
+
unit.create.push(templateOp);
|
|
19051
19370
|
if (firstXref === null) {
|
|
19052
19371
|
firstXref = cView.xref;
|
|
19053
|
-
firstSlotHandle =
|
|
19372
|
+
firstSlotHandle = templateOp.handle;
|
|
19054
19373
|
}
|
|
19055
19374
|
const caseExpr = ifCase.expression ? convertAst(ifCase.expression, unit.job, null) : null;
|
|
19056
|
-
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr,
|
|
19375
|
+
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, templateOp.xref, templateOp.handle, ifCase.expressionAlias);
|
|
19057
19376
|
conditions.push(conditionalCaseExpr);
|
|
19058
19377
|
ingestNodes(cView, ifCase.children);
|
|
19059
19378
|
}
|
|
@@ -19061,19 +19380,27 @@ function ingestIfBlock(unit, ifBlock) {
|
|
|
19061
19380
|
unit.update.push(conditional2);
|
|
19062
19381
|
}
|
|
19063
19382
|
function ingestSwitchBlock(unit, switchBlock) {
|
|
19383
|
+
var _a2;
|
|
19064
19384
|
let firstXref = null;
|
|
19065
19385
|
let firstSlotHandle = null;
|
|
19066
19386
|
let conditions = [];
|
|
19067
19387
|
for (const switchCase of switchBlock.cases) {
|
|
19068
19388
|
const cView = unit.job.allocateView(unit.xref);
|
|
19069
|
-
|
|
19070
|
-
|
|
19389
|
+
let switchCaseI18nMeta = void 0;
|
|
19390
|
+
if (switchCase.i18n !== void 0) {
|
|
19391
|
+
if (!(switchCase.i18n instanceof BlockPlaceholder)) {
|
|
19392
|
+
throw Error(`Unhandled i18n metadata type for switch block: ${(_a2 = switchCase.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
19393
|
+
}
|
|
19394
|
+
switchCaseI18nMeta = switchCase.i18n;
|
|
19395
|
+
}
|
|
19396
|
+
const templateOp = createTemplateOp(cView.xref, TemplateKind.Block, null, "Case", Namespace.HTML, switchCaseI18nMeta, switchCase.sourceSpan);
|
|
19397
|
+
unit.create.push(templateOp);
|
|
19071
19398
|
if (firstXref === null) {
|
|
19072
19399
|
firstXref = cView.xref;
|
|
19073
|
-
firstSlotHandle =
|
|
19400
|
+
firstSlotHandle = templateOp.handle;
|
|
19074
19401
|
}
|
|
19075
19402
|
const caseExpr = switchCase.expression ? convertAst(switchCase.expression, unit.job, switchBlock.startSourceSpan) : null;
|
|
19076
|
-
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr,
|
|
19403
|
+
const conditionalCaseExpr = new ConditionalCaseExpr(caseExpr, templateOp.xref, templateOp.handle);
|
|
19077
19404
|
conditions.push(conditionalCaseExpr);
|
|
19078
19405
|
ingestNodes(cView, switchCase.children);
|
|
19079
19406
|
}
|
|
@@ -19086,7 +19413,7 @@ function ingestDeferView(unit, suffix, children, sourceSpan) {
|
|
|
19086
19413
|
}
|
|
19087
19414
|
const secondaryView = unit.job.allocateView(unit.xref);
|
|
19088
19415
|
ingestNodes(secondaryView, children);
|
|
19089
|
-
const templateOp = createTemplateOp(secondaryView.xref, null, `Defer${suffix}`, Namespace.HTML, void 0, sourceSpan);
|
|
19416
|
+
const templateOp = createTemplateOp(secondaryView.xref, TemplateKind.Block, null, `Defer${suffix}`, Namespace.HTML, void 0, sourceSpan);
|
|
19090
19417
|
unit.create.push(templateOp);
|
|
19091
19418
|
return templateOp;
|
|
19092
19419
|
}
|
|
@@ -19172,17 +19499,12 @@ function ingestDeferBlock(unit, deferBlock) {
|
|
|
19172
19499
|
unit.update.push(deferWhenOps);
|
|
19173
19500
|
}
|
|
19174
19501
|
function ingestIcu(unit, icu) {
|
|
19175
|
-
var _a2
|
|
19502
|
+
var _a2;
|
|
19176
19503
|
if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
|
|
19177
19504
|
const xref = unit.job.allocateXrefId();
|
|
19178
19505
|
const icuNode = icu.i18n.nodes[0];
|
|
19179
19506
|
unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
|
|
19180
|
-
const
|
|
19181
|
-
if (expressionPlaceholder === void 0 || icu.vars[expressionPlaceholder] === void 0) {
|
|
19182
|
-
throw Error("ICU should have a text binding");
|
|
19183
|
-
}
|
|
19184
|
-
ingestBoundText(unit, icu.vars[expressionPlaceholder], [expressionPlaceholder]);
|
|
19185
|
-
for (const [placeholder, text2] of Object.entries(icu.placeholders)) {
|
|
19507
|
+
for (const [placeholder, text2] of Object.entries(__spreadValues(__spreadValues({}, icu.vars), icu.placeholders))) {
|
|
19186
19508
|
if (text2 instanceof BoundText) {
|
|
19187
19509
|
ingestBoundText(unit, text2, [placeholder]);
|
|
19188
19510
|
} else {
|
|
@@ -19191,7 +19513,7 @@ function ingestIcu(unit, icu) {
|
|
|
19191
19513
|
}
|
|
19192
19514
|
unit.create.push(createIcuEndOp(xref));
|
|
19193
19515
|
} else {
|
|
19194
|
-
throw Error(`Unhandled i18n metadata type for ICU: ${(
|
|
19516
|
+
throw Error(`Unhandled i18n metadata type for ICU: ${(_a2 = icu.i18n) == null ? void 0 : _a2.constructor.name}`);
|
|
19195
19517
|
}
|
|
19196
19518
|
}
|
|
19197
19519
|
function ingestForBlock(unit, forBlock) {
|
|
@@ -19266,6 +19588,15 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
19266
19588
|
}
|
|
19267
19589
|
} else if (ast instanceof LiteralPrimitive) {
|
|
19268
19590
|
return literal(ast.value, void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
19591
|
+
} else if (ast instanceof Unary) {
|
|
19592
|
+
switch (ast.operator) {
|
|
19593
|
+
case "+":
|
|
19594
|
+
return new UnaryOperatorExpr(UnaryOperator.Plus, convertAst(ast.expr, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
19595
|
+
case "-":
|
|
19596
|
+
return new UnaryOperatorExpr(UnaryOperator.Minus, convertAst(ast.expr, job, baseSourceSpan), void 0, convertSourceSpan(ast.span, baseSourceSpan));
|
|
19597
|
+
default:
|
|
19598
|
+
throw new Error(`AssertionError: unknown unary operator ${ast.operator}`);
|
|
19599
|
+
}
|
|
19269
19600
|
} else if (ast instanceof Binary) {
|
|
19270
19601
|
const operator = BINARY_OPERATORS.get(ast.operation);
|
|
19271
19602
|
if (operator === void 0) {
|
|
@@ -19303,6 +19634,8 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
19303
19634
|
return new SafeInvokeFunctionExpr(convertAst(ast.receiver, job, baseSourceSpan), ast.args.map((a) => convertAst(a, job, baseSourceSpan)));
|
|
19304
19635
|
} else if (ast instanceof EmptyExpr) {
|
|
19305
19636
|
return new EmptyExpr2(convertSourceSpan(ast.span, baseSourceSpan));
|
|
19637
|
+
} else if (ast instanceof PrefixNot) {
|
|
19638
|
+
return not(convertAst(ast.expression, job, baseSourceSpan), convertSourceSpan(ast.span, baseSourceSpan));
|
|
19306
19639
|
} else {
|
|
19307
19640
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan == null ? void 0 : baseSourceSpan.start.file.url}"`);
|
|
19308
19641
|
}
|
|
@@ -19313,6 +19646,7 @@ function isPlainTemplate(tmpl) {
|
|
|
19313
19646
|
}
|
|
19314
19647
|
function ingestBindings(unit, op, element2) {
|
|
19315
19648
|
let flags = BindingFlags.None;
|
|
19649
|
+
let hasI18nAttributes = false;
|
|
19316
19650
|
if (element2 instanceof Template) {
|
|
19317
19651
|
flags |= BindingFlags.OnNgTemplateElement;
|
|
19318
19652
|
if (element2 instanceof Template && isPlainTemplate(element2)) {
|
|
@@ -19321,17 +19655,21 @@ function ingestBindings(unit, op, element2) {
|
|
|
19321
19655
|
const templateAttrFlags = flags | BindingFlags.BindingTargetsTemplate | BindingFlags.IsStructuralTemplateAttribute;
|
|
19322
19656
|
for (const attr of element2.templateAttrs) {
|
|
19323
19657
|
if (attr instanceof TextAttribute) {
|
|
19324
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, templateAttrFlags | BindingFlags.TextValue);
|
|
19658
|
+
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, templateAttrFlags | BindingFlags.TextValue, attr.i18n);
|
|
19659
|
+
hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
|
|
19325
19660
|
} else {
|
|
19326
|
-
ingestBinding(unit, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, templateAttrFlags);
|
|
19661
|
+
ingestBinding(unit, op.xref, attr.name, attr.value, attr.type, attr.unit, attr.securityContext, attr.sourceSpan, templateAttrFlags, attr.i18n);
|
|
19662
|
+
hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
|
|
19327
19663
|
}
|
|
19328
19664
|
}
|
|
19329
19665
|
}
|
|
19330
19666
|
for (const attr of element2.attributes) {
|
|
19331
|
-
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, flags | BindingFlags.TextValue);
|
|
19667
|
+
ingestBinding(unit, op.xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, flags | BindingFlags.TextValue, attr.i18n);
|
|
19668
|
+
hasI18nAttributes || (hasI18nAttributes = attr.i18n !== void 0);
|
|
19332
19669
|
}
|
|
19333
19670
|
for (const input of element2.inputs) {
|
|
19334
|
-
ingestBinding(unit, op.xref, input.name, input.value, input.type, input.unit, input.securityContext, input.sourceSpan, flags);
|
|
19671
|
+
ingestBinding(unit, op.xref, input.name, input.value, input.type, input.unit, input.securityContext, input.sourceSpan, flags, input.i18n);
|
|
19672
|
+
hasI18nAttributes || (hasI18nAttributes = input.i18n !== void 0);
|
|
19335
19673
|
}
|
|
19336
19674
|
for (const output of element2.outputs) {
|
|
19337
19675
|
let listenerOp;
|
|
@@ -19341,7 +19679,7 @@ function ingestBindings(unit, op, element2) {
|
|
|
19341
19679
|
}
|
|
19342
19680
|
}
|
|
19343
19681
|
if (element2 instanceof Template && !isPlainTemplate(element2)) {
|
|
19344
|
-
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null));
|
|
19682
|
+
unit.create.push(createExtractedAttributeOp(op.xref, BindingKind.Property, output.name, null, null));
|
|
19345
19683
|
continue;
|
|
19346
19684
|
}
|
|
19347
19685
|
listenerOp = createListenerOp(op.xref, op.handle, output.name, op.tag, output.phase, false, output.sourceSpan);
|
|
@@ -19367,6 +19705,9 @@ function ingestBindings(unit, op, element2) {
|
|
|
19367
19705
|
listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr, returnExpr.sourceSpan)));
|
|
19368
19706
|
unit.create.push(listenerOp);
|
|
19369
19707
|
}
|
|
19708
|
+
if (hasI18nAttributes) {
|
|
19709
|
+
unit.create.push(createI18nAttributesOp(unit.job.allocateXrefId(), new SlotHandle(), op.xref));
|
|
19710
|
+
}
|
|
19370
19711
|
}
|
|
19371
19712
|
var BINDING_KINDS = /* @__PURE__ */ new Map([
|
|
19372
19713
|
[0, BindingKind.Property],
|
|
@@ -19383,24 +19724,36 @@ var BindingFlags;
|
|
|
19383
19724
|
BindingFlags2[BindingFlags2["IsStructuralTemplateAttribute"] = 4] = "IsStructuralTemplateAttribute";
|
|
19384
19725
|
BindingFlags2[BindingFlags2["OnNgTemplateElement"] = 8] = "OnNgTemplateElement";
|
|
19385
19726
|
})(BindingFlags || (BindingFlags = {}));
|
|
19386
|
-
function ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, flags) {
|
|
19727
|
+
function ingestBinding(view, xref, name, value, type, unit, securityContext, sourceSpan, flags, i18nMeta) {
|
|
19387
19728
|
if (value instanceof ASTWithSource) {
|
|
19388
19729
|
value = value.ast;
|
|
19389
19730
|
}
|
|
19731
|
+
let i18nContext = null;
|
|
19732
|
+
if (i18nMeta !== void 0) {
|
|
19733
|
+
if (!(i18nMeta instanceof Message)) {
|
|
19734
|
+
throw Error(`Unhandled i18n metadata type for binding: ${i18nMeta.constructor.name}`);
|
|
19735
|
+
}
|
|
19736
|
+
i18nContext = view.job.allocateXrefId();
|
|
19737
|
+
view.create.push(createI18nContextOp(I18nContextKind.Attr, i18nContext, null, i18nMeta, null));
|
|
19738
|
+
}
|
|
19390
19739
|
if (flags & BindingFlags.OnNgTemplateElement && !(flags & BindingFlags.BindingTargetsTemplate) && type === 0) {
|
|
19391
|
-
view.create.push(createExtractedAttributeOp(xref, BindingKind.Property, name, null));
|
|
19740
|
+
view.create.push(createExtractedAttributeOp(xref, BindingKind.Property, name, null, i18nContext));
|
|
19392
19741
|
return;
|
|
19393
19742
|
}
|
|
19394
19743
|
let expression;
|
|
19395
19744
|
if (value instanceof Interpolation) {
|
|
19396
|
-
|
|
19745
|
+
let i18nPlaceholders = [];
|
|
19746
|
+
if (i18nMeta !== void 0) {
|
|
19747
|
+
i18nPlaceholders = Object.keys(i18nMeta.placeholders);
|
|
19748
|
+
}
|
|
19749
|
+
expression = new Interpolation2(value.strings, value.expressions.map((expr) => convertAst(expr, view.job, null)), i18nPlaceholders);
|
|
19397
19750
|
} else if (value instanceof AST) {
|
|
19398
19751
|
expression = convertAst(value, view.job, null);
|
|
19399
19752
|
} else {
|
|
19400
19753
|
expression = value;
|
|
19401
19754
|
}
|
|
19402
19755
|
const kind = BINDING_KINDS.get(type);
|
|
19403
|
-
view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext, !!(flags & BindingFlags.TextValue), !!(flags & BindingFlags.IsStructuralTemplateAttribute), sourceSpan));
|
|
19756
|
+
view.update.push(createBindingOp(xref, kind, name, expression, unit, securityContext, !!(flags & BindingFlags.TextValue), !!(flags & BindingFlags.IsStructuralTemplateAttribute), i18nContext, sourceSpan));
|
|
19404
19757
|
}
|
|
19405
19758
|
function ingestReferences(op, element2) {
|
|
19406
19759
|
assertIsArray(op.localRefs);
|
|
@@ -19440,7 +19793,7 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19440
19793
|
}
|
|
19441
19794
|
if (root !== null) {
|
|
19442
19795
|
for (const attr of root.attributes) {
|
|
19443
|
-
ingestBinding(unit, xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue);
|
|
19796
|
+
ingestBinding(unit, xref, attr.name, literal(attr.value), 1, null, SecurityContext.NONE, attr.sourceSpan, BindingFlags.TextValue, attr.i18n);
|
|
19444
19797
|
}
|
|
19445
19798
|
const tagName = root instanceof Element ? root.name : root.tagName;
|
|
19446
19799
|
return tagName === "ng-template" ? null : tagName;
|
|
@@ -19448,10 +19801,10 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
|
|
|
19448
19801
|
return null;
|
|
19449
19802
|
}
|
|
19450
19803
|
|
|
19451
|
-
// bazel-out/
|
|
19804
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template/pipeline/switch/index.mjs
|
|
19452
19805
|
var USE_TEMPLATE_PIPELINE = false;
|
|
19453
19806
|
|
|
19454
|
-
// bazel-out/
|
|
19807
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/styling_builder.mjs
|
|
19455
19808
|
var IMPORTANT_FLAG = "!important";
|
|
19456
19809
|
var MIN_STYLING_BINDING_SLOTS_REQUIRED = 2;
|
|
19457
19810
|
var StylingBuilder = class {
|
|
@@ -19784,7 +20137,7 @@ function isEmptyExpression(ast) {
|
|
|
19784
20137
|
return ast instanceof EmptyExpr;
|
|
19785
20138
|
}
|
|
19786
20139
|
|
|
19787
|
-
// bazel-out/
|
|
20140
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_parser.mjs
|
|
19788
20141
|
var HtmlParser = class extends Parser2 {
|
|
19789
20142
|
constructor() {
|
|
19790
20143
|
super(getHtmlTagDefinition);
|
|
@@ -19794,7 +20147,7 @@ var HtmlParser = class extends Parser2 {
|
|
|
19794
20147
|
}
|
|
19795
20148
|
};
|
|
19796
20149
|
|
|
19797
|
-
// bazel-out/
|
|
20150
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/html_whitespaces.mjs
|
|
19798
20151
|
var PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
|
|
19799
20152
|
var SKIP_WS_TRIM_TAGS = /* @__PURE__ */ new Set(["pre", "template", "textarea", "script", "style"]);
|
|
19800
20153
|
var WS_CHARS = " \f\n\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
@@ -19860,7 +20213,7 @@ function visitAllWithSiblings(visitor, nodes) {
|
|
|
19860
20213
|
return result;
|
|
19861
20214
|
}
|
|
19862
20215
|
|
|
19863
|
-
// bazel-out/
|
|
20216
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template_parser/binding_parser.mjs
|
|
19864
20217
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
19865
20218
|
var ATTRIBUTE_PREFIX = "attr";
|
|
19866
20219
|
var CLASS_PREFIX = "class";
|
|
@@ -20180,7 +20533,7 @@ function moveParseSourceSpan(sourceSpan, absoluteSpan) {
|
|
|
20180
20533
|
return new ParseSourceSpan(sourceSpan.start.moveBy(startDiff), sourceSpan.end.moveBy(endDiff), sourceSpan.fullStart.moveBy(startDiff), sourceSpan.details);
|
|
20181
20534
|
}
|
|
20182
20535
|
|
|
20183
|
-
// bazel-out/
|
|
20536
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/style_url_resolver.mjs
|
|
20184
20537
|
function isStyleUrlResolvable(url) {
|
|
20185
20538
|
if (url == null || url.length === 0 || url[0] == "/")
|
|
20186
20539
|
return false;
|
|
@@ -20189,7 +20542,7 @@ function isStyleUrlResolvable(url) {
|
|
|
20189
20542
|
}
|
|
20190
20543
|
var URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;
|
|
20191
20544
|
|
|
20192
|
-
// bazel-out/
|
|
20545
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/template_parser/template_preparser.mjs
|
|
20193
20546
|
var NG_CONTENT_SELECT_ATTR = "select";
|
|
20194
20547
|
var LINK_ELEMENT = "link";
|
|
20195
20548
|
var LINK_STYLE_REL_ATTR = "rel";
|
|
@@ -20259,7 +20612,7 @@ function normalizeNgContentSelect(selectAttr) {
|
|
|
20259
20612
|
return selectAttr;
|
|
20260
20613
|
}
|
|
20261
20614
|
|
|
20262
|
-
// bazel-out/
|
|
20615
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_control_flow.mjs
|
|
20263
20616
|
var FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
20264
20617
|
var FOR_LOOP_TRACK_PATTERN = /^track\s+([\S\s]*)/;
|
|
20265
20618
|
var CONDITIONAL_ALIAS_PATTERN = /^as\s+(.*)/;
|
|
@@ -20550,7 +20903,7 @@ function stripOptionalParentheses(param, errors) {
|
|
|
20550
20903
|
return expression.slice(start, end);
|
|
20551
20904
|
}
|
|
20552
20905
|
|
|
20553
|
-
// bazel-out/
|
|
20906
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_deferred_triggers.mjs
|
|
20554
20907
|
var TIME_PATTERN = /^\d+\.?\d*(ms|s)?$/;
|
|
20555
20908
|
var SEPARATOR_PATTERN = /^\s$/;
|
|
20556
20909
|
var COMMA_DELIMITED_SYNTAX = /* @__PURE__ */ new Map([
|
|
@@ -20814,7 +21167,7 @@ function parseDeferredTime(value) {
|
|
|
20814
21167
|
return parseFloat(time) * (units === "s" ? 1e3 : 1);
|
|
20815
21168
|
}
|
|
20816
21169
|
|
|
20817
|
-
// bazel-out/
|
|
21170
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_deferred_blocks.mjs
|
|
20818
21171
|
var PREFETCH_WHEN_PATTERN = /^prefetch\s+when\s/;
|
|
20819
21172
|
var PREFETCH_ON_PATTERN = /^prefetch\s+on\s/;
|
|
20820
21173
|
var MINIMUM_PARAMETER_PATTERN = /^minimum\s/;
|
|
@@ -20949,7 +21302,7 @@ function parsePrimaryTriggers(params, bindingParser, errors, placeholder) {
|
|
|
20949
21302
|
return { triggers, prefetchTriggers };
|
|
20950
21303
|
}
|
|
20951
21304
|
|
|
20952
|
-
// bazel-out/
|
|
21305
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/r3_template_transform.mjs
|
|
20953
21306
|
var BIND_NAME_REGEXP = /^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/;
|
|
20954
21307
|
var KW_BIND_IDX = 1;
|
|
20955
21308
|
var KW_LET_IDX = 2;
|
|
@@ -21380,7 +21733,7 @@ function textContents(node) {
|
|
|
21380
21733
|
}
|
|
21381
21734
|
}
|
|
21382
21735
|
|
|
21383
|
-
// bazel-out/
|
|
21736
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/i18n/context.mjs
|
|
21384
21737
|
var TagType;
|
|
21385
21738
|
(function(TagType2) {
|
|
21386
21739
|
TagType2[TagType2["ELEMENT"] = 0] = "ELEMENT";
|
|
@@ -21525,7 +21878,7 @@ function serializePlaceholderValue(value) {
|
|
|
21525
21878
|
}
|
|
21526
21879
|
}
|
|
21527
21880
|
|
|
21528
|
-
// bazel-out/
|
|
21881
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
|
|
21529
21882
|
var NG_CONTENT_SELECT_ATTR2 = "select";
|
|
21530
21883
|
var NG_PROJECT_AS_ATTR_NAME = "ngProjectAs";
|
|
21531
21884
|
var EVENT_BINDING_SCOPE_GLOBALS = /* @__PURE__ */ new Set(["$event"]);
|
|
@@ -22985,21 +23338,6 @@ var TrackByBindingScope = class extends BindingScope {
|
|
|
22985
23338
|
return this.componentAccessCount;
|
|
22986
23339
|
}
|
|
22987
23340
|
};
|
|
22988
|
-
function createCssSelector(elementName, attributes) {
|
|
22989
|
-
const cssSelector = new CssSelector();
|
|
22990
|
-
const elementNameNoNs = splitNsName(elementName)[1];
|
|
22991
|
-
cssSelector.setElement(elementNameNoNs);
|
|
22992
|
-
Object.getOwnPropertyNames(attributes).forEach((name) => {
|
|
22993
|
-
const nameNoNs = splitNsName(name)[1];
|
|
22994
|
-
const value = attributes[name];
|
|
22995
|
-
cssSelector.addAttribute(nameNoNs, value);
|
|
22996
|
-
if (name.toLowerCase() === "class") {
|
|
22997
|
-
const classes = value.trim().split(/\s+/);
|
|
22998
|
-
classes.forEach((className) => cssSelector.addClassName(className));
|
|
22999
|
-
}
|
|
23000
|
-
});
|
|
23001
|
-
return cssSelector;
|
|
23002
|
-
}
|
|
23003
23341
|
function getNgProjectAsLiteral(attribute2) {
|
|
23004
23342
|
const parsedR3Selector = parseSelectorToR3Selector(attribute2.value)[0];
|
|
23005
23343
|
return [literal(5), asLiteral(parsedR3Selector)];
|
|
@@ -23217,7 +23555,7 @@ function createClosureModeGuard2() {
|
|
|
23217
23555
|
return typeofExpr(variable(NG_I18N_CLOSURE_MODE2)).notIdentical(literal("undefined", STRING_TYPE)).and(variable(NG_I18N_CLOSURE_MODE2));
|
|
23218
23556
|
}
|
|
23219
23557
|
|
|
23220
|
-
// bazel-out/
|
|
23558
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/compiler.mjs
|
|
23221
23559
|
var ATTR_REGEX = /attr\.([^\]]+)/;
|
|
23222
23560
|
var COMPONENT_VARIABLE = "%COMP%";
|
|
23223
23561
|
var HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
|
|
@@ -23550,6 +23888,8 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23550
23888
|
}
|
|
23551
23889
|
return emitHostBindingFunction(hostJob);
|
|
23552
23890
|
}
|
|
23891
|
+
let bindingId = 0;
|
|
23892
|
+
const getNextBindingId = () => `${bindingId++}`;
|
|
23553
23893
|
const bindingContext = variable(CONTEXT_NAME);
|
|
23554
23894
|
const styleBuilder = new StylingBuilder(bindingContext);
|
|
23555
23895
|
const { styleAttr, classAttr } = hostBindingsMetadata.specialAttributes;
|
|
@@ -23599,7 +23939,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23599
23939
|
const syntheticHostBindings = [];
|
|
23600
23940
|
for (const binding of allOtherBindings) {
|
|
23601
23941
|
const value = binding.expression.visit(getValueConverter());
|
|
23602
|
-
const bindingExpr = bindingFn(bindingContext, value);
|
|
23942
|
+
const bindingExpr = bindingFn(bindingContext, value, getNextBindingId);
|
|
23603
23943
|
const { bindingName, instruction, isAttribute } = getBindingNameAndInstruction(binding);
|
|
23604
23944
|
const securityContexts = bindingParser.calcPossibleSecurityContexts(selector, bindingName, isAttribute).filter((context) => context !== SecurityContext.NONE);
|
|
23605
23945
|
let sanitizerFn = null;
|
|
@@ -23644,9 +23984,11 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23644
23984
|
styleBuilder.buildUpdateLevelInstructions(getValueConverter()).forEach((instruction) => {
|
|
23645
23985
|
for (const call2 of instruction.calls) {
|
|
23646
23986
|
totalHostVarsCount += Math.max(call2.allocateBindingSlots - MIN_STYLING_BINDING_SLOTS_REQUIRED, 0);
|
|
23987
|
+
const { params, stmts } = convertStylingCall(call2, bindingContext, bindingFn, getNextBindingId);
|
|
23988
|
+
updateVariables.push(...stmts);
|
|
23647
23989
|
updateInstructions.push({
|
|
23648
23990
|
reference: instruction.reference,
|
|
23649
|
-
paramsOrFn:
|
|
23991
|
+
paramsOrFn: params,
|
|
23650
23992
|
span: null
|
|
23651
23993
|
});
|
|
23652
23994
|
}
|
|
@@ -23668,11 +24010,19 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
23668
24010
|
}
|
|
23669
24011
|
return null;
|
|
23670
24012
|
}
|
|
23671
|
-
function bindingFn(implicit, value) {
|
|
23672
|
-
return convertPropertyBinding(null, implicit, value,
|
|
24013
|
+
function bindingFn(implicit, value, getNextBindingIdFn) {
|
|
24014
|
+
return convertPropertyBinding(null, implicit, value, getNextBindingIdFn());
|
|
23673
24015
|
}
|
|
23674
|
-
function convertStylingCall(call2, bindingContext, bindingFn2) {
|
|
23675
|
-
|
|
24016
|
+
function convertStylingCall(call2, bindingContext, bindingFn2, getNextBindingIdFn) {
|
|
24017
|
+
const stmts = [];
|
|
24018
|
+
const params = call2.params((value) => {
|
|
24019
|
+
const result = bindingFn2(bindingContext, value, getNextBindingIdFn);
|
|
24020
|
+
if (Array.isArray(result.stmts) && result.stmts.length > 0) {
|
|
24021
|
+
stmts.push(...result.stmts);
|
|
24022
|
+
}
|
|
24023
|
+
return result.currValExpr;
|
|
24024
|
+
});
|
|
24025
|
+
return { params, stmts };
|
|
23676
24026
|
}
|
|
23677
24027
|
function getBindingNameAndInstruction(binding) {
|
|
23678
24028
|
let bindingName = binding.name;
|
|
@@ -23819,7 +24169,7 @@ function createHostDirectivesMappingArray(mapping) {
|
|
|
23819
24169
|
return elements.length > 0 ? literalArr(elements) : null;
|
|
23820
24170
|
}
|
|
23821
24171
|
|
|
23822
|
-
// bazel-out/
|
|
24172
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/view/t2_binder.mjs
|
|
23823
24173
|
var R3TargetBinder = class {
|
|
23824
24174
|
constructor(directiveMatcher) {
|
|
23825
24175
|
this.directiveMatcher = directiveMatcher;
|
|
@@ -23987,13 +24337,13 @@ var DirectiveBinder = class {
|
|
|
23987
24337
|
template2.forEach((node) => node.visit(this));
|
|
23988
24338
|
}
|
|
23989
24339
|
visitElement(element2) {
|
|
23990
|
-
this.visitElementOrTemplate(element2
|
|
24340
|
+
this.visitElementOrTemplate(element2);
|
|
23991
24341
|
}
|
|
23992
24342
|
visitTemplate(template2) {
|
|
23993
|
-
this.visitElementOrTemplate(
|
|
24343
|
+
this.visitElementOrTemplate(template2);
|
|
23994
24344
|
}
|
|
23995
|
-
visitElementOrTemplate(
|
|
23996
|
-
const cssSelector =
|
|
24345
|
+
visitElementOrTemplate(node) {
|
|
24346
|
+
const cssSelector = createCssSelectorFromNode(node);
|
|
23997
24347
|
const directives = [];
|
|
23998
24348
|
this.matcher.match(cssSelector, (_selector, results) => directives.push(...results));
|
|
23999
24349
|
if (directives.length > 0) {
|
|
@@ -24424,11 +24774,11 @@ function extractScopedNodeEntities(rootScope) {
|
|
|
24424
24774
|
return templateEntities;
|
|
24425
24775
|
}
|
|
24426
24776
|
|
|
24427
|
-
// bazel-out/
|
|
24777
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/resource_loader.mjs
|
|
24428
24778
|
var ResourceLoader = class {
|
|
24429
24779
|
};
|
|
24430
24780
|
|
|
24431
|
-
// bazel-out/
|
|
24781
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/jit_compiler_facade.mjs
|
|
24432
24782
|
var CompilerFacadeImpl = class {
|
|
24433
24783
|
constructor(jitEvaluator = new JitEvaluator()) {
|
|
24434
24784
|
this.jitEvaluator = jitEvaluator;
|
|
@@ -24980,17 +25330,17 @@ function publishFacade(global) {
|
|
|
24980
25330
|
ng.\u0275compilerFacade = new CompilerFacadeImpl();
|
|
24981
25331
|
}
|
|
24982
25332
|
|
|
24983
|
-
// bazel-out/
|
|
24984
|
-
var VERSION2 = new Version("17.0.
|
|
25333
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/version.mjs
|
|
25334
|
+
var VERSION2 = new Version("17.0.6");
|
|
24985
25335
|
|
|
24986
|
-
// bazel-out/
|
|
25336
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
24987
25337
|
var _VisitorMode;
|
|
24988
25338
|
(function(_VisitorMode2) {
|
|
24989
25339
|
_VisitorMode2[_VisitorMode2["Extract"] = 0] = "Extract";
|
|
24990
25340
|
_VisitorMode2[_VisitorMode2["Merge"] = 1] = "Merge";
|
|
24991
25341
|
})(_VisitorMode || (_VisitorMode = {}));
|
|
24992
25342
|
|
|
24993
|
-
// bazel-out/
|
|
25343
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/ml_parser/xml_tags.mjs
|
|
24994
25344
|
var XmlTagDefinition = class {
|
|
24995
25345
|
constructor() {
|
|
24996
25346
|
this.closedByParent = false;
|
|
@@ -25012,7 +25362,7 @@ var XmlTagDefinition = class {
|
|
|
25012
25362
|
};
|
|
25013
25363
|
var _TAG_DEFINITION = new XmlTagDefinition();
|
|
25014
25364
|
|
|
25015
|
-
// bazel-out/
|
|
25365
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/render3/partial/api.mjs
|
|
25016
25366
|
var FactoryTarget2;
|
|
25017
25367
|
(function(FactoryTarget3) {
|
|
25018
25368
|
FactoryTarget3[FactoryTarget3["Directive"] = 0] = "Directive";
|
|
@@ -25022,10 +25372,10 @@ var FactoryTarget2;
|
|
|
25022
25372
|
FactoryTarget3[FactoryTarget3["NgModule"] = 4] = "NgModule";
|
|
25023
25373
|
})(FactoryTarget2 || (FactoryTarget2 = {}));
|
|
25024
25374
|
|
|
25025
|
-
// bazel-out/
|
|
25375
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler/src/compiler.mjs
|
|
25026
25376
|
publishFacade(_global);
|
|
25027
25377
|
|
|
25028
|
-
// bazel-out/
|
|
25378
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/util.mjs
|
|
25029
25379
|
var import_path2 = require("path");
|
|
25030
25380
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
25031
25381
|
var REPLACEMENTS2 = {
|
|
@@ -25133,7 +25483,7 @@ function forEachClass(sourceFile, callback) {
|
|
|
25133
25483
|
});
|
|
25134
25484
|
}
|
|
25135
25485
|
|
|
25136
|
-
// bazel-out/
|
|
25486
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/block-template-entities/index.mjs
|
|
25137
25487
|
function block_template_entities_default() {
|
|
25138
25488
|
return (tree) => __async(this, null, function* () {
|
|
25139
25489
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|