diff --git a/README.md b/README.md
index 93b9917..8645844 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# angular2-features
+# angular2-features - production
Blog post
Angular CRUD ops, Modals, Animations, Pagination, DateTimePicker, Directives and much more..
| Title | +Creator | +Description | ++ | Time Start | +Time End | ++ | + | + |
|---|---|---|---|---|---|---|---|---|
| {{schedule.title}} | +{{schedule.creator}} | +{{schedule.description}} | +{{schedule.location}} | +{{schedule.timeStart | dateFormat | date:'medium'}} | +{{schedule.timeEnd | dateFormat | date:'medium'}} | ++ | +Edit | ++ + | +
+ {{edittedUser.profession}} +
++ +
++ +
+{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
+ * - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.
+ * - `minFractionDigits` is the minimum number of digits after fraction. Defaults to `0`.
+ * - `maxFractionDigits` is the maximum number of digits after fraction. Defaults to `3`.
+ *
+ * For more information on the acceptable range for each of these numbers and other
+ * details see your native internationalization library.
+ *
+ * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
+ * and may require a polyfill. See {@linkDocs guide/browser-support} for details.
+ *
+ * ### Example
+ *
+ * {@example common/pipes/ts/number_pipe.ts region='NumberPipe'}
+ *
+ * @stable
+ */
+ var DecimalPipe = (function () {
+ function DecimalPipe(_locale) {
+ this._locale = _locale;
+ }
+ DecimalPipe.prototype.transform = function (value, digits) {
+ if (digits === void 0) { digits = null; }
+ return formatNumber(DecimalPipe, this._locale, value, NumberFormatStyle.Decimal, digits);
+ };
+ DecimalPipe.decorators = [
+ { type: _angular_core.Pipe, args: [{ name: 'number' },] },
+ ];
+ /** @nocollapse */
+ DecimalPipe.ctorParameters = [
+ { type: undefined, decorators: [{ type: _angular_core.Inject, args: [_angular_core.LOCALE_ID,] },] },
+ ];
+ return DecimalPipe;
+ }());
+ /**
+ * @ngModule CommonModule
+ * @whatItDoes Formats a number as a percentage according to locale rules.
+ * @howToUse `number_expression | percent[:digitInfo]`
+ *
+ * @description
+ *
+ * Formats a number as percentage.
+ *
+ * - `digitInfo` See {@link DecimalPipe} for detailed description.
+ *
+ * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
+ * and may require a polyfill. See {@linkDocs guide/browser-support} for details.
+ *
+ * ### Example
+ *
+ * {@example common/pipes/ts/number_pipe.ts region='PercentPipe'}
+ *
+ * @stable
+ */
+ var PercentPipe = (function () {
+ function PercentPipe(_locale) {
+ this._locale = _locale;
+ }
+ PercentPipe.prototype.transform = function (value, digits) {
+ if (digits === void 0) { digits = null; }
+ return formatNumber(PercentPipe, this._locale, value, NumberFormatStyle.Percent, digits);
+ };
+ PercentPipe.decorators = [
+ { type: _angular_core.Pipe, args: [{ name: 'percent' },] },
+ ];
+ /** @nocollapse */
+ PercentPipe.ctorParameters = [
+ { type: undefined, decorators: [{ type: _angular_core.Inject, args: [_angular_core.LOCALE_ID,] },] },
+ ];
+ return PercentPipe;
+ }());
+ /**
+ * @ngModule CommonModule
+ * @whatItDoes Formats a number as currency using locale rules.
+ * @howToUse `number_expression | currency[:currencyCode[:symbolDisplay[:digitInfo]]]`
+ * @description
+ *
+ * Use `currency` to format a number as currency.
+ *
+ * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such
+ * as `USD` for the US dollar and `EUR` for the euro.
+ * - `symbolDisplay` is a boolean indicating whether to use the currency symbol or code.
+ * - `true`: use symbol (e.g. `$`).
+ * - `false`(default): use code (e.g. `USD`).
+ * - `digitInfo` See {@link DecimalPipe} for detailed description.
+ *
+ * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
+ * and may require a polyfill. See {@linkDocs guide/browser-support} for details.
+ *
+ * ### Example
+ *
+ * {@example common/pipes/ts/number_pipe.ts region='CurrencyPipe'}
+ *
+ * @stable
+ */
+ var CurrencyPipe = (function () {
+ function CurrencyPipe(_locale) {
+ this._locale = _locale;
+ }
+ CurrencyPipe.prototype.transform = function (value, currencyCode, symbolDisplay, digits) {
+ if (currencyCode === void 0) { currencyCode = 'USD'; }
+ if (symbolDisplay === void 0) { symbolDisplay = false; }
+ if (digits === void 0) { digits = null; }
+ return formatNumber(CurrencyPipe, this._locale, value, NumberFormatStyle.Currency, digits, currencyCode, symbolDisplay);
+ };
+ CurrencyPipe.decorators = [
+ { type: _angular_core.Pipe, args: [{ name: 'currency' },] },
+ ];
+ /** @nocollapse */
+ CurrencyPipe.ctorParameters = [
+ { type: undefined, decorators: [{ type: _angular_core.Inject, args: [_angular_core.LOCALE_ID,] },] },
+ ];
+ return CurrencyPipe;
+ }());
+
+ /**
+ * @ngModule CommonModule
+ * @whatItDoes Creates a new List or String containing a subset (slice) of the elements.
+ * @howToUse `array_or_string_expression | slice:start[:end]`
+ * @description
+ *
+ * Where the input expression is a `List` or `String`, and:
+ * - `start`: The starting index of the subset to return.
+ * - **a positive integer**: return the item at `start` index and all items after
+ * in the list or string expression.
+ * - **a negative integer**: return the item at `start` index from the end and all items after
+ * in the list or string expression.
+ * - **if positive and greater than the size of the expression**: return an empty list or string.
+ * - **if negative and greater than the size of the expression**: return entire list or string.
+ * - `end`: The ending index of the subset to return.
+ * - **omitted**: return all items until the end.
+ * - **if positive**: return all items before `end` index of the list or string.
+ * - **if negative**: return all items before `end` index from the end of the list or string.
+ *
+ * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`
+ * and `String.prototype.slice()`.
+ *
+ * When operating on a [List], the returned list is always a copy even when all
+ * the elements are being returned.
+ *
+ * When operating on a blank value, the pipe returns the blank value.
+ *
+ * ## List Example
+ *
+ * This `ngFor` example:
+ *
+ * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}
+ *
+ * produces the following:
+ *
+ * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
+ * - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.
+ * - `minFractionDigits` is the minimum number of digits after fraction. Defaults to `0`.
+ * - `maxFractionDigits` is the maximum number of digits after fraction. Defaults to `3`.
+ *
+ * For more information on the acceptable range for each of these numbers and other
+ * details see your native internationalization library.
+ *
+ * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
+ * and may require a polyfill. See {@linkDocs guide/browser-support} for details.
+ *
+ * ### Example
+ *
+ * {@example common/pipes/ts/number_pipe.ts region='NumberPipe'}
+ *
+ * @stable
+ */
+export var DecimalPipe = (function () {
+ function DecimalPipe(_locale) {
+ this._locale = _locale;
+ }
+ DecimalPipe.prototype.transform = function (value, digits) {
+ if (digits === void 0) { digits = null; }
+ return formatNumber(DecimalPipe, this._locale, value, NumberFormatStyle.Decimal, digits);
+ };
+ DecimalPipe.decorators = [
+ { type: Pipe, args: [{ name: 'number' },] },
+ ];
+ /** @nocollapse */
+ DecimalPipe.ctorParameters = [
+ { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },
+ ];
+ return DecimalPipe;
+}());
+/**
+ * @ngModule CommonModule
+ * @whatItDoes Formats a number as a percentage according to locale rules.
+ * @howToUse `number_expression | percent[:digitInfo]`
+ *
+ * @description
+ *
+ * Formats a number as percentage.
+ *
+ * - `digitInfo` See {@link DecimalPipe} for detailed description.
+ *
+ * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
+ * and may require a polyfill. See {@linkDocs guide/browser-support} for details.
+ *
+ * ### Example
+ *
+ * {@example common/pipes/ts/number_pipe.ts region='PercentPipe'}
+ *
+ * @stable
+ */
+export var PercentPipe = (function () {
+ function PercentPipe(_locale) {
+ this._locale = _locale;
+ }
+ PercentPipe.prototype.transform = function (value, digits) {
+ if (digits === void 0) { digits = null; }
+ return formatNumber(PercentPipe, this._locale, value, NumberFormatStyle.Percent, digits);
+ };
+ PercentPipe.decorators = [
+ { type: Pipe, args: [{ name: 'percent' },] },
+ ];
+ /** @nocollapse */
+ PercentPipe.ctorParameters = [
+ { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },
+ ];
+ return PercentPipe;
+}());
+/**
+ * @ngModule CommonModule
+ * @whatItDoes Formats a number as currency using locale rules.
+ * @howToUse `number_expression | currency[:currencyCode[:symbolDisplay[:digitInfo]]]`
+ * @description
+ *
+ * Use `currency` to format a number as currency.
+ *
+ * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such
+ * as `USD` for the US dollar and `EUR` for the euro.
+ * - `symbolDisplay` is a boolean indicating whether to use the currency symbol or code.
+ * - `true`: use symbol (e.g. `$`).
+ * - `false`(default): use code (e.g. `USD`).
+ * - `digitInfo` See {@link DecimalPipe} for detailed description.
+ *
+ * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers
+ * and may require a polyfill. See {@linkDocs guide/browser-support} for details.
+ *
+ * ### Example
+ *
+ * {@example common/pipes/ts/number_pipe.ts region='CurrencyPipe'}
+ *
+ * @stable
+ */
+export var CurrencyPipe = (function () {
+ function CurrencyPipe(_locale) {
+ this._locale = _locale;
+ }
+ CurrencyPipe.prototype.transform = function (value, currencyCode, symbolDisplay, digits) {
+ if (currencyCode === void 0) { currencyCode = 'USD'; }
+ if (symbolDisplay === void 0) { symbolDisplay = false; }
+ if (digits === void 0) { digits = null; }
+ return formatNumber(CurrencyPipe, this._locale, value, NumberFormatStyle.Currency, digits, currencyCode, symbolDisplay);
+ };
+ CurrencyPipe.decorators = [
+ { type: Pipe, args: [{ name: 'currency' },] },
+ ];
+ /** @nocollapse */
+ CurrencyPipe.ctorParameters = [
+ { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },
+ ];
+ return CurrencyPipe;
+}());
+//# sourceMappingURL=number_pipe.js.map
\ No newline at end of file
diff --git a/build/lib/@angular/common/src/pipes/slice_pipe.js b/build/lib/@angular/common/src/pipes/slice_pipe.js
new file mode 100644
index 0000000..b7867af
--- /dev/null
+++ b/build/lib/@angular/common/src/pipes/slice_pipe.js
@@ -0,0 +1,74 @@
+/**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+import { Pipe } from '@angular/core';
+import { isBlank } from '../facade/lang';
+import { InvalidPipeArgumentError } from './invalid_pipe_argument_error';
+/**
+ * @ngModule CommonModule
+ * @whatItDoes Creates a new List or String containing a subset (slice) of the elements.
+ * @howToUse `array_or_string_expression | slice:start[:end]`
+ * @description
+ *
+ * Where the input expression is a `List` or `String`, and:
+ * - `start`: The starting index of the subset to return.
+ * - **a positive integer**: return the item at `start` index and all items after
+ * in the list or string expression.
+ * - **a negative integer**: return the item at `start` index from the end and all items after
+ * in the list or string expression.
+ * - **if positive and greater than the size of the expression**: return an empty list or string.
+ * - **if negative and greater than the size of the expression**: return entire list or string.
+ * - `end`: The ending index of the subset to return.
+ * - **omitted**: return all items until the end.
+ * - **if positive**: return all items before `end` index of the list or string.
+ * - **if negative**: return all items before `end` index from the end of the list or string.
+ *
+ * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`
+ * and `String.prototype.slice()`.
+ *
+ * When operating on a [List], the returned list is always a copy even when all
+ * the elements are being returned.
+ *
+ * When operating on a blank value, the pipe returns the blank value.
+ *
+ * ## List Example
+ *
+ * This `ngFor` example:
+ *
+ * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}
+ *
+ * produces the following:
+ *
+ * {ICU message}
` would produce two messages: + * - one for the content with meaning and description,
+ * - another one for the ICU message.
+ *
+ * In this case the last message is discarded as it contains less information (the AST is
+ * otherwise identical).
+ *
+ * Note that we should still keep messages extracted from attributes inside the section (ie in the
+ * ICU message here)
+ */
+ _Visitor.prototype._closeTranslatableSection = function (node, directChildren) {
+ if (!this._isInTranslatableSection) {
+ this._reportError(node, 'Unexpected section end');
+ return;
+ }
+ var startIndex = this._msgCountAtSectionStart;
+ var significantChildren = directChildren.reduce(function (count, node) { return count + (node instanceof Comment ? 0 : 1); }, 0);
+ if (significantChildren == 1) {
+ for (var i = this._messages.length - 1; i >= startIndex; i--) {
+ var ast = this._messages[i].nodes;
+ if (!(ast.length == 1 && ast[0] instanceof Text$1)) {
+ this._messages.splice(i, 1);
+ break;
+ }
+ }
+ }
+ this._msgCountAtSectionStart = void 0;
+ };
+ _Visitor.prototype._reportError = function (node, msg) {
+ this._errors.push(new I18nError(node.sourceSpan, msg));
+ };
+ return _Visitor;
+ }());
+ function _isOpeningComment(n) {
+ return n instanceof Comment && n.value && n.value.startsWith('i18n');
+ }
+ function _isClosingComment(n) {
+ return n instanceof Comment && n.value && n.value === '/i18n';
+ }
+ function _getI18nAttr(p) {
+ return p.attrs.find(function (attr) { return attr.name === _I18N_ATTR; }) || null;
+ }
+ function _splitMeaningAndDesc(i18n) {
+ if (!i18n)
+ return ['', ''];
+ var pipeIndex = i18n.indexOf('|');
+ return pipeIndex == -1 ? ['', i18n] : [i18n.slice(0, pipeIndex), i18n.slice(pipeIndex + 1)];
+ }
+
+ /**
+ * A container for message extracted from the templates.
+ */
+ var MessageBundle = (function () {
+ function MessageBundle(_htmlParser, _implicitTags, _implicitAttrs) {
+ this._htmlParser = _htmlParser;
+ this._implicitTags = _implicitTags;
+ this._implicitAttrs = _implicitAttrs;
+ this._messageMap = {};
+ }
+ MessageBundle.prototype.updateFromTemplate = function (html, url, interpolationConfig) {
+ var _this = this;
+ var htmlParserResult = this._htmlParser.parse(html, url, true, interpolationConfig);
+ if (htmlParserResult.errors.length) {
+ return htmlParserResult.errors;
+ }
+ var i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);
+ if (i18nParserResult.errors.length) {
+ return i18nParserResult.errors;
+ }
+ i18nParserResult.messages.forEach(function (message) { _this._messageMap[digestMessage(message)] = message; });
+ };
+ MessageBundle.prototype.getMessageMap = function () { return this._messageMap; };
+ MessageBundle.prototype.write = function (serializer) { return serializer.write(this._messageMap); };
+ return MessageBundle;
+ }());
+
+ var XmlTagDefinition = (function () {
+ function XmlTagDefinition() {
+ this.closedByParent = false;
+ this.contentType = TagContentType.PARSABLE_DATA;
+ this.isVoid = false;
+ this.ignoreFirstLf = false;
+ this.canSelfClose = true;
+ }
+ XmlTagDefinition.prototype.requireExtraParent = function (currentParent) { return false; };
+ XmlTagDefinition.prototype.isClosedByChild = function (name) { return false; };
+ return XmlTagDefinition;
+ }());
+ var _TAG_DEFINITION = new XmlTagDefinition();
+ function getXmlTagDefinition(tagName) {
+ return _TAG_DEFINITION;
+ }
+
+ /**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ var __extends$6 = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ var XmlParser = (function (_super) {
+ __extends$6(XmlParser, _super);
+ function XmlParser() {
+ _super.call(this, getXmlTagDefinition);
+ }
+ XmlParser.prototype.parse = function (source, url, parseExpansionForms) {
+ if (parseExpansionForms === void 0) { parseExpansionForms = false; }
+ return _super.prototype.parse.call(this, source, url, parseExpansionForms, null);
+ };
+ return XmlParser;
+ }(Parser$1));
+
+ /**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ // Generate a map of placeholder to content indexed by message ids
+ function extractPlaceholders(messageBundle) {
+ var messageMap = messageBundle.getMessageMap();
+ var placeholders = {};
+ Object.keys(messageMap).forEach(function (msgId) {
+ placeholders[msgId] = messageMap[msgId].placeholders;
+ });
+ return placeholders;
+ }
+ // Generate a map of placeholder to message ids indexed by message ids
+ function extractPlaceholderToIds(messageBundle) {
+ var messageMap = messageBundle.getMessageMap();
+ var placeholderToIds = {};
+ Object.keys(messageMap).forEach(function (msgId) {
+ placeholderToIds[msgId] = messageMap[msgId].placeholderToMsgIds;
+ });
+ return placeholderToIds;
+ }
+
+ /**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ var __extends$7 = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ var _Visitor$1 = (function () {
+ function _Visitor() {
+ }
+ _Visitor.prototype.visitTag = function (tag) {
+ var _this = this;
+ var strAttrs = this._serializeAttributes(tag.attrs);
+ if (tag.children.length == 0) {
+ return "<" + tag.name + strAttrs + "/>";
+ }
+ var strChildren = tag.children.map(function (node) { return node.visit(_this); });
+ return "<" + tag.name + strAttrs + ">" + strChildren.join('') + "" + tag.name + ">";
+ };
+ _Visitor.prototype.visitText = function (text) { return text.value; };
+ _Visitor.prototype.visitDeclaration = function (decl) {
+ return "";
+ };
+ _Visitor.prototype._serializeAttributes = function (attrs) {
+ var strAttrs = Object.keys(attrs).map(function (name) { return (name + "=\"" + attrs[name] + "\""); }).join(' ');
+ return strAttrs.length > 0 ? ' ' + strAttrs : '';
+ };
+ _Visitor.prototype.visitDoctype = function (doctype) {
+ return "";
+ };
+ return _Visitor;
+ }());
+ var _visitor = new _Visitor$1();
+ function serialize(nodes) {
+ return nodes.map(function (node) { return node.visit(_visitor); }).join('');
+ }
+ var Declaration = (function () {
+ function Declaration(unescapedAttrs) {
+ var _this = this;
+ this.attrs = {};
+ Object.keys(unescapedAttrs).forEach(function (k) {
+ _this.attrs[k] = _escapeXml(unescapedAttrs[k]);
+ });
+ }
+ Declaration.prototype.visit = function (visitor) { return visitor.visitDeclaration(this); };
+ return Declaration;
+ }());
+ var Doctype = (function () {
+ function Doctype(rootTag, dtd) {
+ this.rootTag = rootTag;
+ this.dtd = dtd;
+ }
+ ;
+ Doctype.prototype.visit = function (visitor) { return visitor.visitDoctype(this); };
+ return Doctype;
+ }());
+ var Tag = (function () {
+ function Tag(name, unescapedAttrs, children) {
+ var _this = this;
+ if (unescapedAttrs === void 0) { unescapedAttrs = {}; }
+ if (children === void 0) { children = []; }
+ this.name = name;
+ this.children = children;
+ this.attrs = {};
+ Object.keys(unescapedAttrs).forEach(function (k) {
+ _this.attrs[k] = _escapeXml(unescapedAttrs[k]);
+ });
+ }
+ Tag.prototype.visit = function (visitor) { return visitor.visitTag(this); };
+ return Tag;
+ }());
+ var Text$2 = (function () {
+ function Text(unescapedValue) {
+ this.value = _escapeXml(unescapedValue);
+ }
+ ;
+ Text.prototype.visit = function (visitor) { return visitor.visitText(this); };
+ return Text;
+ }());
+ var CR = (function (_super) {
+ __extends$7(CR, _super);
+ function CR(ws) {
+ if (ws === void 0) { ws = 0; }
+ _super.call(this, "\n" + new Array(ws + 1).join(' '));
+ }
+ return CR;
+ }(Text$2));
+ var _ESCAPED_CHARS = [
+ [/&/g, '&'],
+ [/"/g, '"'],
+ [/'/g, '''],
+ [//g, '>'],
+ ];
+ function _escapeXml(text) {
+ return _ESCAPED_CHARS.reduce(function (text, entry) { return text.replace(entry[0], entry[1]); }, text);
+ }
+
+ var _VERSION = '1.2';
+ var _XMLNS = 'urn:oasis:names:tc:xliff:document:1.2';
+ // TODO(vicb): make this a param (s/_/-/)
+ var _SOURCE_LANG = 'en';
+ var _PLACEHOLDER_TAG = 'x';
+ var _SOURCE_TAG = 'source';
+ var _TARGET_TAG = 'target';
+ var _UNIT_TAG = 'trans-unit';
+ // http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html
+ // http://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html
+ var Xliff = (function () {
+ function Xliff(_htmlParser, _interpolationConfig) {
+ this._htmlParser = _htmlParser;
+ this._interpolationConfig = _interpolationConfig;
+ }
+ Xliff.prototype.write = function (messageMap) {
+ var visitor = new _WriteVisitor();
+ var transUnits = [];
+ Object.keys(messageMap).forEach(function (id) {
+ var message = messageMap[id];
+ var transUnit = new Tag(_UNIT_TAG, { id: id, datatype: 'html' });
+ transUnit.children.push(new CR(8), new Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes)), new CR(8), new Tag(_TARGET_TAG));
+ if (message.description) {
+ transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'description' }, [new Text$2(message.description)]));
+ }
+ if (message.meaning) {
+ transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'meaning' }, [new Text$2(message.meaning)]));
+ }
+ transUnit.children.push(new CR(6));
+ transUnits.push(new CR(6), transUnit);
+ });
+ var body = new Tag('body', {}, transUnits.concat([new CR(4)]));
+ var file = new Tag('file', { 'source-language': _SOURCE_LANG, datatype: 'plaintext', original: 'ng2.template' }, [new CR(4), body, new CR(2)]);
+ var xliff = new Tag('xliff', { version: _VERSION, xmlns: _XMLNS }, [new CR(2), file, new CR()]);
+ return serialize([
+ new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()
+ ]);
+ };
+ Xliff.prototype.load = function (content, url, messageBundle) {
+ var _this = this;
+ // Parse the xtb file into xml nodes
+ var result = new XmlParser().parse(content, url);
+ if (result.errors.length) {
+ throw new Error("xtb parse errors:\n" + result.errors.join('\n'));
+ }
+ // Replace the placeholders, messages are now string
+ var _a = new _LoadVisitor().parse(result.rootNodes, messageBundle), messages = _a.messages, errors = _a.errors;
+ if (errors.length) {
+ throw new Error("xtb parse errors:\n" + errors.join('\n'));
+ }
+ // Convert the string messages to html ast
+ // TODO(vicb): map error message back to the original message in xtb
+ var messageMap = {};
+ var parseErrors = [];
+ Object.keys(messages).forEach(function (id) {
+ var res = _this._htmlParser.parse(messages[id], url, true, _this._interpolationConfig);
+ parseErrors.push.apply(parseErrors, res.errors);
+ messageMap[id] = res.rootNodes;
+ });
+ if (parseErrors.length) {
+ throw new Error("xtb parse errors:\n" + parseErrors.join('\n'));
+ }
+ return messageMap;
+ };
+ return Xliff;
+ }());
+ var _WriteVisitor = (function () {
+ function _WriteVisitor() {
+ }
+ _WriteVisitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };
+ _WriteVisitor.prototype.visitContainer = function (container, context) {
+ var _this = this;
+ var nodes = [];
+ container.children.forEach(function (node) { return nodes.push.apply(nodes, node.visit(_this)); });
+ return nodes;
+ };
+ _WriteVisitor.prototype.visitIcu = function (icu, context) {
+ if (this._isInIcu) {
+ // nested ICU is not supported
+ throw new Error('xliff does not support nested ICU messages');
+ }
+ this._isInIcu = true;
+ // TODO(vicb): support ICU messages
+ // https://lists.oasis-open.org/archives/xliff/201201/msg00028.html
+ // http://docs.oasis-open.org/xliff/v1.2/xliff-profile-po/xliff-profile-po-1.2-cd02.html
+ var nodes = [];
+ this._isInIcu = false;
+ return nodes;
+ };
+ _WriteVisitor.prototype.visitTagPlaceholder = function (ph, context) {
+ var ctype = getCtypeForTag(ph.tag);
+ var startTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype });
+ if (ph.isVoid) {
+ // void tags have no children nor closing tags
+ return [startTagPh];
+ }
+ var closeTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.closeName, ctype: ctype });
+ return [startTagPh].concat(this.serialize(ph.children), [closeTagPh]);
+ };
+ _WriteVisitor.prototype.visitPlaceholder = function (ph, context) {
+ return [new Tag(_PLACEHOLDER_TAG, { id: ph.name })];
+ };
+ _WriteVisitor.prototype.visitIcuPlaceholder = function (ph, context) {
+ return [new Tag(_PLACEHOLDER_TAG, { id: ph.name })];
+ };
+ _WriteVisitor.prototype.serialize = function (nodes) {
+ var _this = this;
+ this._isInIcu = false;
+ return ListWrapper.flatten(nodes.map(function (node) { return node.visit(_this); }));
+ };
+ return _WriteVisitor;
+ }());
+ // TODO(vicb): add error management (structure)
+ // TODO(vicb): factorize (xtb) ?
+ var _LoadVisitor = (function () {
+ function _LoadVisitor() {
+ }
+ _LoadVisitor.prototype.parse = function (nodes, messageBundle) {
+ var _this = this;
+ this._messageNodes = [];
+ this._translatedMessages = {};
+ this._msgId = '';
+ this._target = [];
+ this._errors = [];
+ // Find all messages
+ visitAll(this, nodes, null);
+ var messageMap = messageBundle.getMessageMap();
+ var placeholders = extractPlaceholders(messageBundle);
+ var placeholderToIds = extractPlaceholderToIds(messageBundle);
+ this._messageNodes
+ .filter(function (message) {
+ // Remove any messages that is not present in the source message bundle.
+ return messageMap.hasOwnProperty(message[0]);
+ })
+ .sort(function (a, b) {
+ // Because there could be no ICU placeholders inside an ICU message,
+ // we do not need to take into account the `placeholderToMsgIds` of the referenced
+ // messages, those would always be empty
+ // TODO(vicb): overkill - create 2 buckets and [...woDeps, ...wDeps].process()
+ if (Object.keys(messageMap[a[0]].placeholderToMsgIds).length == 0) {
+ return -1;
+ }
+ if (Object.keys(messageMap[b[0]].placeholderToMsgIds).length == 0) {
+ return 1;
+ }
+ return 0;
+ })
+ .forEach(function (message) {
+ var id = message[0];
+ _this._placeholders = placeholders[id] || {};
+ _this._placeholderToIds = placeholderToIds[id] || {};
+ // TODO(vicb): make sure there is no `_TRANSLATIONS_TAG` nor `_TRANSLATION_TAG`
+ _this._translatedMessages[id] = visitAll(_this, message[1]).join('');
+ });
+ return { messages: this._translatedMessages, errors: this._errors };
+ };
+ _LoadVisitor.prototype.visitElement = function (element, context) {
+ switch (element.name) {
+ case _UNIT_TAG:
+ this._target = null;
+ var msgId = element.attrs.find(function (attr) { return attr.name === 'id'; });
+ if (!msgId) {
+ this._addError(element, "<" + _UNIT_TAG + "> misses the \"id\" attribute");
+ }
+ else {
+ this._msgId = msgId.value;
+ }
+ visitAll(this, element.children, null);
+ if (this._msgId !== null) {
+ this._messageNodes.push([this._msgId, this._target]);
+ }
+ break;
+ case _SOURCE_TAG:
+ // ignore source message
+ break;
+ case _TARGET_TAG:
+ this._target = element.children;
+ break;
+ case _PLACEHOLDER_TAG:
+ var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });
+ if (!idAttr) {
+ this._addError(element, "<" + _PLACEHOLDER_TAG + "> misses the \"id\" attribute");
+ }
+ else {
+ var id = idAttr.value;
+ if (this._placeholders.hasOwnProperty(id)) {
+ return this._placeholders[id];
+ }
+ if (this._placeholderToIds.hasOwnProperty(id) &&
+ this._translatedMessages.hasOwnProperty(this._placeholderToIds[id])) {
+ return this._translatedMessages[this._placeholderToIds[id]];
+ }
+ // TODO(vicb): better error message for when
+ // !this._translatedMessages.hasOwnProperty(this._placeholderToIds[id])
+ this._addError(element, "The placeholder \"" + id + "\" does not exists in the source message");
+ }
+ break;
+ default:
+ visitAll(this, element.children, null);
+ }
+ };
+ _LoadVisitor.prototype.visitAttribute = function (attribute, context) {
+ throw new Error('unreachable code');
+ };
+ _LoadVisitor.prototype.visitText = function (text, context) { return text.value; };
+ _LoadVisitor.prototype.visitComment = function (comment, context) { return ''; };
+ _LoadVisitor.prototype.visitExpansion = function (expansion, context) {
+ throw new Error('unreachable code');
+ };
+ _LoadVisitor.prototype.visitExpansionCase = function (expansionCase, context) {
+ throw new Error('unreachable code');
+ };
+ _LoadVisitor.prototype._addError = function (node, message) {
+ this._errors.push(new I18nError(node.sourceSpan, message));
+ };
+ return _LoadVisitor;
+ }());
+ function getCtypeForTag(tag) {
+ switch (tag.toLowerCase()) {
+ case 'br':
+ return 'lb';
+ case 'img':
+ return 'image';
+ default:
+ return "x-" + tag;
+ }
+ }
+
+ var _MESSAGES_TAG = 'messagebundle';
+ var _MESSAGE_TAG = 'msg';
+ var _PLACEHOLDER_TAG$1 = 'ph';
+ var _EXEMPLE_TAG = 'ex';
+ var _DOCTYPE = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
+ var Xmb = (function () {
+ function Xmb() {
+ }
+ Xmb.prototype.write = function (messageMap) {
+ var visitor = new _Visitor$2();
+ var rootNode = new Tag(_MESSAGES_TAG);
+ Object.keys(messageMap).forEach(function (id) {
+ var message = messageMap[id];
+ var attrs = { id: id };
+ if (message.description) {
+ attrs['desc'] = message.description;
+ }
+ if (message.meaning) {
+ attrs['meaning'] = message.meaning;
+ }
+ rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, visitor.serialize(message.nodes)));
+ });
+ rootNode.children.push(new CR());
+ return serialize([
+ new Declaration({ version: '1.0', encoding: 'UTF-8' }),
+ new CR(),
+ new Doctype(_MESSAGES_TAG, _DOCTYPE),
+ new CR(),
+ rootNode,
+ new CR(),
+ ]);
+ };
+ Xmb.prototype.load = function (content, url, messageBundle) {
+ throw new Error('Unsupported');
+ };
+ return Xmb;
+ }());
+ var _Visitor$2 = (function () {
+ function _Visitor() {
+ }
+ _Visitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };
+ _Visitor.prototype.visitContainer = function (container, context) {
+ var _this = this;
+ var nodes = [];
+ container.children.forEach(function (node) { return nodes.push.apply(nodes, node.visit(_this)); });
+ return nodes;
+ };
+ _Visitor.prototype.visitIcu = function (icu, context) {
+ var _this = this;
+ var nodes = [new Text$2("{" + icu.expression + ", " + icu.type + ", ")];
+ Object.keys(icu.cases).forEach(function (c) {
+ nodes.push.apply(nodes, [new Text$2(c + " {")].concat(icu.cases[c].visit(_this), [new Text$2("} ")]));
+ });
+ nodes.push(new Text$2("}"));
+ return nodes;
+ };
+ _Visitor.prototype.visitTagPlaceholder = function (ph, context) {
+ var startEx = new Tag(_EXEMPLE_TAG, {}, [new Text$2("<" + ph.tag + ">")]);
+ var startTagPh = new Tag(_PLACEHOLDER_TAG$1, { name: ph.startName }, [startEx]);
+ if (ph.isVoid) {
+ // void tags have no children nor closing tags
+ return [startTagPh];
+ }
+ var closeEx = new Tag(_EXEMPLE_TAG, {}, [new Text$2("" + ph.tag + ">")]);
+ var closeTagPh = new Tag(_PLACEHOLDER_TAG$1, { name: ph.closeName }, [closeEx]);
+ return [startTagPh].concat(this.serialize(ph.children), [closeTagPh]);
+ };
+ _Visitor.prototype.visitPlaceholder = function (ph, context) {
+ return [new Tag(_PLACEHOLDER_TAG$1, { name: ph.name })];
+ };
+ _Visitor.prototype.visitIcuPlaceholder = function (ph, context) {
+ return [new Tag(_PLACEHOLDER_TAG$1, { name: ph.name })];
+ };
+ _Visitor.prototype.serialize = function (nodes) {
+ var _this = this;
+ return ListWrapper.flatten(nodes.map(function (node) { return node.visit(_this); }));
+ };
+ return _Visitor;
+ }());
+
+ var _TRANSLATIONS_TAG = 'translationbundle';
+ var _TRANSLATION_TAG = 'translation';
+ var _PLACEHOLDER_TAG$2 = 'ph';
+ var Xtb = (function () {
+ function Xtb(_htmlParser, _interpolationConfig) {
+ this._htmlParser = _htmlParser;
+ this._interpolationConfig = _interpolationConfig;
+ }
+ Xtb.prototype.write = function (messageMap) { throw new Error('Unsupported'); };
+ Xtb.prototype.load = function (content, url, messageBundle) {
+ var _this = this;
+ // Parse the xtb file into xml nodes
+ var result = new XmlParser().parse(content, url);
+ if (result.errors.length) {
+ throw new Error("xtb parse errors:\n" + result.errors.join('\n'));
+ }
+ // Replace the placeholders, messages are now string
+ var _a = new _Visitor$3().parse(result.rootNodes, messageBundle), messages = _a.messages, errors = _a.errors;
+ if (errors.length) {
+ throw new Error("xtb parse errors:\n" + errors.join('\n'));
+ }
+ // Convert the string messages to html ast
+ // TODO(vicb): map error message back to the original message in xtb
+ var messageMap = {};
+ var parseErrors = [];
+ Object.keys(messages).forEach(function (id) {
+ var res = _this._htmlParser.parse(messages[id], url, true, _this._interpolationConfig);
+ parseErrors.push.apply(parseErrors, res.errors);
+ messageMap[id] = res.rootNodes;
+ });
+ if (parseErrors.length) {
+ throw new Error("xtb parse errors:\n" + parseErrors.join('\n'));
+ }
+ return messageMap;
+ };
+ return Xtb;
+ }());
+ var _Visitor$3 = (function () {
+ function _Visitor() {
+ }
+ _Visitor.prototype.parse = function (nodes, messageBundle) {
+ var _this = this;
+ this._messageNodes = [];
+ this._translatedMessages = {};
+ this._bundleDepth = 0;
+ this._translationDepth = 0;
+ this._errors = [];
+ // Find all messages
+ visitAll(this, nodes, null);
+ var messageMap = messageBundle.getMessageMap();
+ var placeholders = extractPlaceholders(messageBundle);
+ var placeholderToIds = extractPlaceholderToIds(messageBundle);
+ this._messageNodes
+ .filter(function (message) {
+ // Remove any messages that is not present in the source message bundle.
+ return messageMap.hasOwnProperty(message[0]);
+ })
+ .sort(function (a, b) {
+ // Because there could be no ICU placeholders inside an ICU message,
+ // we do not need to take into account the `placeholderToMsgIds` of the referenced
+ // messages, those would always be empty
+ // TODO(vicb): overkill - create 2 buckets and [...woDeps, ...wDeps].process()
+ if (Object.keys(messageMap[a[0]].placeholderToMsgIds).length == 0) {
+ return -1;
+ }
+ if (Object.keys(messageMap[b[0]].placeholderToMsgIds).length == 0) {
+ return 1;
+ }
+ return 0;
+ })
+ .forEach(function (message) {
+ var id = message[0];
+ _this._placeholders = placeholders[id] || {};
+ _this._placeholderToIds = placeholderToIds[id] || {};
+ // TODO(vicb): make sure there is no `_TRANSLATIONS_TAG` nor `_TRANSLATION_TAG`
+ _this._translatedMessages[id] = visitAll(_this, message[1]).join('');
+ });
+ return { messages: this._translatedMessages, errors: this._errors };
+ };
+ _Visitor.prototype.visitElement = function (element, context) {
+ switch (element.name) {
+ case _TRANSLATIONS_TAG:
+ this._bundleDepth++;
+ if (this._bundleDepth > 1) {
+ this._addError(element, "<" + _TRANSLATIONS_TAG + "> elements can not be nested");
+ }
+ visitAll(this, element.children, null);
+ this._bundleDepth--;
+ break;
+ case _TRANSLATION_TAG:
+ this._translationDepth++;
+ if (this._translationDepth > 1) {
+ this._addError(element, "<" + _TRANSLATION_TAG + "> elements can not be nested");
+ }
+ var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });
+ if (!idAttr) {
+ this._addError(element, "<" + _TRANSLATION_TAG + "> misses the \"id\" attribute");
+ }
+ else {
+ // ICU placeholders are reference to other messages.
+ // The referenced message might not have been decoded yet.
+ // We need to have all messages available to make sure deps are decoded first.
+ // TODO(vicb): report an error on duplicate id
+ this._messageNodes.push([idAttr.value, element.children]);
+ }
+ this._translationDepth--;
+ break;
+ case _PLACEHOLDER_TAG$2:
+ var nameAttr = element.attrs.find(function (attr) { return attr.name === 'name'; });
+ if (!nameAttr) {
+ this._addError(element, "<" + _PLACEHOLDER_TAG$2 + "> misses the \"name\" attribute");
+ }
+ else {
+ var name_1 = nameAttr.value;
+ if (this._placeholders.hasOwnProperty(name_1)) {
+ return this._placeholders[name_1];
+ }
+ if (this._placeholderToIds.hasOwnProperty(name_1) &&
+ this._translatedMessages.hasOwnProperty(this._placeholderToIds[name_1])) {
+ return this._translatedMessages[this._placeholderToIds[name_1]];
+ }
+ // TODO(vicb): better error message for when
+ // !this._translatedMessages.hasOwnProperty(this._placeholderToIds[name])
+ this._addError(element, "The placeholder \"" + name_1 + "\" does not exists in the source message");
+ }
+ break;
+ default:
+ this._addError(element, 'Unexpected tag');
+ }
+ };
+ _Visitor.prototype.visitAttribute = function (attribute, context) {
+ throw new Error('unreachable code');
+ };
+ _Visitor.prototype.visitText = function (text, context) { return text.value; };
+ _Visitor.prototype.visitComment = function (comment, context) { return ''; };
+ _Visitor.prototype.visitExpansion = function (expansion, context) {
+ var _this = this;
+ var strCases = expansion.cases.map(function (c) { return c.visit(_this, null); });
+ return "{" + expansion.switchValue + ", " + expansion.type + ", strCases.join(' ')}";
+ };
+ _Visitor.prototype.visitExpansionCase = function (expansionCase, context) {
+ return expansionCase.value + " {" + visitAll(this, expansionCase.expression, null) + "}";
+ };
+ _Visitor.prototype._addError = function (node, message) {
+ this._errors.push(new I18nError(node.sourceSpan, message));
+ };
+ return _Visitor;
+ }());
+
+ /**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * A container for translated messages
+ */
+ var TranslationBundle = (function () {
+ function TranslationBundle(_messageMap) {
+ if (_messageMap === void 0) { _messageMap = {}; }
+ this._messageMap = _messageMap;
+ }
+ TranslationBundle.load = function (content, url, messageBundle, serializer) {
+ return new TranslationBundle(serializer.load(content, url, messageBundle));
+ };
+ TranslationBundle.prototype.get = function (id) { return this._messageMap[id]; };
+ TranslationBundle.prototype.has = function (id) { return id in this._messageMap; };
+ return TranslationBundle;
+ }());
+
+ var I18NHtmlParser = (function () {
+ // TODO(vicb): transB.load() should not need a msgB & add transB.resolve(msgB,
+ // interpolationConfig)
+ // TODO(vicb): remove the interpolationConfig from the Xtb serializer
+ function I18NHtmlParser(_htmlParser, _translations, _translationsFormat) {
+ this._htmlParser = _htmlParser;
+ this._translations = _translations;
+ this._translationsFormat = _translationsFormat;
+ }
+ I18NHtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
+ if (parseExpansionForms === void 0) { parseExpansionForms = false; }
+ if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
+ var parseResult = this._htmlParser.parse(source, url, parseExpansionForms, interpolationConfig);
+ if (!this._translations || this._translations === '') {
+ // Do not enable i18n when no translation bundle is provided
+ return parseResult;
+ }
+ // TODO(vicb): add support for implicit tags / attributes
+ var messageBundle = new MessageBundle(this._htmlParser, [], {});
+ var errors = messageBundle.updateFromTemplate(source, url, interpolationConfig);
+ if (errors && errors.length) {
+ return new ParseTreeResult(parseResult.rootNodes, parseResult.errors.concat(errors));
+ }
+ var serializer = this._createSerializer(interpolationConfig);
+ var translationBundle = TranslationBundle.load(this._translations, url, messageBundle, serializer);
+ return mergeTranslations(parseResult.rootNodes, translationBundle, interpolationConfig, [], {});
+ };
+ I18NHtmlParser.prototype._createSerializer = function (interpolationConfig) {
+ var format = (this._translationsFormat || 'xlf').toLowerCase();
+ switch (format) {
+ case 'xmb':
+ return new Xmb();
+ case 'xtb':
+ return new Xtb(this._htmlParser, interpolationConfig);
+ case 'xliff':
+ case 'xlf':
+ default:
+ return new Xliff(this._htmlParser, interpolationConfig);
+ }
+ };
+ return I18NHtmlParser;
+ }());
+
+ var isDefaultChangeDetectionStrategy = _angular_core.__core_private__.isDefaultChangeDetectionStrategy;
+ var ChangeDetectorStatus = _angular_core.__core_private__.ChangeDetectorStatus;
+ var LifecycleHooks = _angular_core.__core_private__.LifecycleHooks;
+ var LIFECYCLE_HOOKS_VALUES = _angular_core.__core_private__.LIFECYCLE_HOOKS_VALUES;
+ var ReflectorReader = _angular_core.__core_private__.ReflectorReader;
+ var AppElement = _angular_core.__core_private__.AppElement;
+ var CodegenComponentFactoryResolver = _angular_core.__core_private__.CodegenComponentFactoryResolver;
+ var AppView = _angular_core.__core_private__.AppView;
+ var DebugAppView = _angular_core.__core_private__.DebugAppView;
+ var NgModuleInjector = _angular_core.__core_private__.NgModuleInjector;
+ var registerModuleFactory = _angular_core.__core_private__.registerModuleFactory;
+ var ViewType = _angular_core.__core_private__.ViewType;
+ var view_utils = _angular_core.__core_private__.view_utils;
+ var DebugContext = _angular_core.__core_private__.DebugContext;
+ var StaticNodeDebugInfo = _angular_core.__core_private__.StaticNodeDebugInfo;
+ var devModeEqual = _angular_core.__core_private__.devModeEqual;
+ var UNINITIALIZED = _angular_core.__core_private__.UNINITIALIZED;
+ var ValueUnwrapper = _angular_core.__core_private__.ValueUnwrapper;
+ var TemplateRef_ = _angular_core.__core_private__.TemplateRef_;
+ var Console = _angular_core.__core_private__.Console;
+ var reflector = _angular_core.__core_private__.reflector;
+ var Reflector = _angular_core.__core_private__.Reflector;
+ var ReflectionCapabilities = _angular_core.__core_private__.ReflectionCapabilities;
+ var NoOpAnimationPlayer = _angular_core.__core_private__.NoOpAnimationPlayer;
+ var AnimationSequencePlayer = _angular_core.__core_private__.AnimationSequencePlayer;
+ var AnimationGroupPlayer = _angular_core.__core_private__.AnimationGroupPlayer;
+ var AnimationKeyframe = _angular_core.__core_private__.AnimationKeyframe;
+ var AnimationStyles = _angular_core.__core_private__.AnimationStyles;
+ var ANY_STATE = _angular_core.__core_private__.ANY_STATE;
+ var DEFAULT_STATE = _angular_core.__core_private__.DEFAULT_STATE;
+ var EMPTY_ANIMATION_STATE = _angular_core.__core_private__.EMPTY_STATE;
+ var FILL_STYLE_FLAG = _angular_core.__core_private__.FILL_STYLE_FLAG;
+ var prepareFinalAnimationStyles = _angular_core.__core_private__.prepareFinalAnimationStyles;
+ var balanceAnimationKeyframes = _angular_core.__core_private__.balanceAnimationKeyframes;
+ var clearStyles = _angular_core.__core_private__.clearStyles;
+ var collectAndResolveStyles = _angular_core.__core_private__.collectAndResolveStyles;
+ var renderStyles = _angular_core.__core_private__.renderStyles;
+ var ComponentStillLoadingError = _angular_core.__core_private__.ComponentStillLoadingError;
+ var AnimationTransition = _angular_core.__core_private__.AnimationTransition;
+
+ var APP_VIEW_MODULE_URL = assetUrl('core', 'linker/view');
+ var VIEW_UTILS_MODULE_URL = assetUrl('core', 'linker/view_utils');
+ var CD_MODULE_URL = assetUrl('core', 'change_detection/change_detection');
+ var ANIMATION_STYLE_UTIL_ASSET_URL = assetUrl('core', 'animation/animation_style_util');
+ var Identifiers = (function () {
+ function Identifiers() {
+ }
+ Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {
+ name: 'ANALYZE_FOR_ENTRY_COMPONENTS',
+ moduleUrl: assetUrl('core', 'metadata/di'),
+ runtime: _angular_core.ANALYZE_FOR_ENTRY_COMPONENTS
+ };
+ Identifiers.ViewUtils = {
+ name: 'ViewUtils',
+ moduleUrl: assetUrl('core', 'linker/view_utils'),
+ runtime: view_utils.ViewUtils
+ };
+ Identifiers.AppView = { name: 'AppView', moduleUrl: APP_VIEW_MODULE_URL, runtime: AppView };
+ Identifiers.DebugAppView = {
+ name: 'DebugAppView',
+ moduleUrl: APP_VIEW_MODULE_URL,
+ runtime: DebugAppView
+ };
+ Identifiers.AppElement = {
+ name: 'AppElement',
+ moduleUrl: assetUrl('core', 'linker/element'),
+ runtime: AppElement
+ };
+ Identifiers.ElementRef = {
+ name: 'ElementRef',
+ moduleUrl: assetUrl('core', 'linker/element_ref'),
+ runtime: _angular_core.ElementRef
+ };
+ Identifiers.ViewContainerRef = {
+ name: 'ViewContainerRef',
+ moduleUrl: assetUrl('core', 'linker/view_container_ref'),
+ runtime: _angular_core.ViewContainerRef
+ };
+ Identifiers.ChangeDetectorRef = {
+ name: 'ChangeDetectorRef',
+ moduleUrl: assetUrl('core', 'change_detection/change_detector_ref'),
+ runtime: _angular_core.ChangeDetectorRef
+ };
+ Identifiers.RenderComponentType = {
+ name: 'RenderComponentType',
+ moduleUrl: assetUrl('core', 'render/api'),
+ runtime: _angular_core.RenderComponentType
+ };
+ Identifiers.QueryList = {
+ name: 'QueryList',
+ moduleUrl: assetUrl('core', 'linker/query_list'),
+ runtime: _angular_core.QueryList
+ };
+ Identifiers.TemplateRef = {
+ name: 'TemplateRef',
+ moduleUrl: assetUrl('core', 'linker/template_ref'),
+ runtime: _angular_core.TemplateRef
+ };
+ Identifiers.TemplateRef_ = {
+ name: 'TemplateRef_',
+ moduleUrl: assetUrl('core', 'linker/template_ref'),
+ runtime: TemplateRef_
+ };
+ Identifiers.CodegenComponentFactoryResolver = {
+ name: 'CodegenComponentFactoryResolver',
+ moduleUrl: assetUrl('core', 'linker/component_factory_resolver'),
+ runtime: CodegenComponentFactoryResolver
+ };
+ Identifiers.ComponentFactoryResolver = {
+ name: 'ComponentFactoryResolver',
+ moduleUrl: assetUrl('core', 'linker/component_factory_resolver'),
+ runtime: _angular_core.ComponentFactoryResolver
+ };
+ Identifiers.ComponentFactory = {
+ name: 'ComponentFactory',
+ runtime: _angular_core.ComponentFactory,
+ moduleUrl: assetUrl('core', 'linker/component_factory')
+ };
+ Identifiers.NgModuleFactory = {
+ name: 'NgModuleFactory',
+ runtime: _angular_core.NgModuleFactory,
+ moduleUrl: assetUrl('core', 'linker/ng_module_factory')
+ };
+ Identifiers.NgModuleInjector = {
+ name: 'NgModuleInjector',
+ runtime: NgModuleInjector,
+ moduleUrl: assetUrl('core', 'linker/ng_module_factory')
+ };
+ Identifiers.RegisterModuleFactoryFn = {
+ name: 'registerModuleFactory',
+ runtime: registerModuleFactory,
+ moduleUrl: assetUrl('core', 'linker/ng_module_factory_loader')
+ };
+ Identifiers.ValueUnwrapper = { name: 'ValueUnwrapper', moduleUrl: CD_MODULE_URL, runtime: ValueUnwrapper };
+ Identifiers.Injector = {
+ name: 'Injector',
+ moduleUrl: assetUrl('core', 'di/injector'),
+ runtime: _angular_core.Injector
+ };
+ Identifiers.ViewEncapsulation = {
+ name: 'ViewEncapsulation',
+ moduleUrl: assetUrl('core', 'metadata/view'),
+ runtime: _angular_core.ViewEncapsulation
+ };
+ Identifiers.ViewType = {
+ name: 'ViewType',
+ moduleUrl: assetUrl('core', 'linker/view_type'),
+ runtime: ViewType
+ };
+ Identifiers.ChangeDetectionStrategy = {
+ name: 'ChangeDetectionStrategy',
+ moduleUrl: CD_MODULE_URL,
+ runtime: _angular_core.ChangeDetectionStrategy
+ };
+ Identifiers.StaticNodeDebugInfo = {
+ name: 'StaticNodeDebugInfo',
+ moduleUrl: assetUrl('core', 'linker/debug_context'),
+ runtime: StaticNodeDebugInfo
+ };
+ Identifiers.DebugContext = {
+ name: 'DebugContext',
+ moduleUrl: assetUrl('core', 'linker/debug_context'),
+ runtime: DebugContext
+ };
+ Identifiers.Renderer = {
+ name: 'Renderer',
+ moduleUrl: assetUrl('core', 'render/api'),
+ runtime: _angular_core.Renderer
+ };
+ Identifiers.SimpleChange = { name: 'SimpleChange', moduleUrl: CD_MODULE_URL, runtime: _angular_core.SimpleChange };
+ Identifiers.UNINITIALIZED = { name: 'UNINITIALIZED', moduleUrl: CD_MODULE_URL, runtime: UNINITIALIZED };
+ Identifiers.ChangeDetectorStatus = {
+ name: 'ChangeDetectorStatus',
+ moduleUrl: CD_MODULE_URL,
+ runtime: ChangeDetectorStatus
+ };
+ Identifiers.checkBinding = {
+ name: 'checkBinding',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.checkBinding
+ };
+ Identifiers.flattenNestedViewRenderNodes = {
+ name: 'flattenNestedViewRenderNodes',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.flattenNestedViewRenderNodes
+ };
+ Identifiers.devModeEqual = { name: 'devModeEqual', moduleUrl: CD_MODULE_URL, runtime: devModeEqual };
+ Identifiers.interpolate = {
+ name: 'interpolate',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.interpolate
+ };
+ Identifiers.castByValue = {
+ name: 'castByValue',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.castByValue
+ };
+ Identifiers.EMPTY_ARRAY = {
+ name: 'EMPTY_ARRAY',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.EMPTY_ARRAY
+ };
+ Identifiers.EMPTY_MAP = {
+ name: 'EMPTY_MAP',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.EMPTY_MAP
+ };
+ Identifiers.createRenderElement = {
+ name: 'createRenderElement',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.createRenderElement
+ };
+ Identifiers.selectOrCreateRenderHostElement = {
+ name: 'selectOrCreateRenderHostElement',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.selectOrCreateRenderHostElement
+ };
+ Identifiers.pureProxies = [
+ null,
+ { name: 'pureProxy1', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy1 },
+ { name: 'pureProxy2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy2 },
+ { name: 'pureProxy3', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy3 },
+ { name: 'pureProxy4', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy4 },
+ { name: 'pureProxy5', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy5 },
+ { name: 'pureProxy6', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy6 },
+ { name: 'pureProxy7', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy7 },
+ { name: 'pureProxy8', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy8 },
+ { name: 'pureProxy9', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy9 },
+ { name: 'pureProxy10', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.pureProxy10 },
+ ];
+ Identifiers.SecurityContext = {
+ name: 'SecurityContext',
+ moduleUrl: assetUrl('core', 'security'),
+ runtime: _angular_core.SecurityContext,
+ };
+ Identifiers.AnimationKeyframe = {
+ name: 'AnimationKeyframe',
+ moduleUrl: assetUrl('core', 'animation/animation_keyframe'),
+ runtime: AnimationKeyframe
+ };
+ Identifiers.AnimationStyles = {
+ name: 'AnimationStyles',
+ moduleUrl: assetUrl('core', 'animation/animation_styles'),
+ runtime: AnimationStyles
+ };
+ Identifiers.NoOpAnimationPlayer = {
+ name: 'NoOpAnimationPlayer',
+ moduleUrl: assetUrl('core', 'animation/animation_player'),
+ runtime: NoOpAnimationPlayer
+ };
+ Identifiers.AnimationGroupPlayer = {
+ name: 'AnimationGroupPlayer',
+ moduleUrl: assetUrl('core', 'animation/animation_group_player'),
+ runtime: AnimationGroupPlayer
+ };
+ Identifiers.AnimationSequencePlayer = {
+ name: 'AnimationSequencePlayer',
+ moduleUrl: assetUrl('core', 'animation/animation_sequence_player'),
+ runtime: AnimationSequencePlayer
+ };
+ Identifiers.prepareFinalAnimationStyles = {
+ name: 'prepareFinalAnimationStyles',
+ moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
+ runtime: prepareFinalAnimationStyles
+ };
+ Identifiers.balanceAnimationKeyframes = {
+ name: 'balanceAnimationKeyframes',
+ moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
+ runtime: balanceAnimationKeyframes
+ };
+ Identifiers.clearStyles = {
+ name: 'clearStyles',
+ moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
+ runtime: clearStyles
+ };
+ Identifiers.renderStyles = {
+ name: 'renderStyles',
+ moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
+ runtime: renderStyles
+ };
+ Identifiers.collectAndResolveStyles = {
+ name: 'collectAndResolveStyles',
+ moduleUrl: ANIMATION_STYLE_UTIL_ASSET_URL,
+ runtime: collectAndResolveStyles
+ };
+ Identifiers.LOCALE_ID = {
+ name: 'LOCALE_ID',
+ moduleUrl: assetUrl('core', 'i18n/tokens'),
+ runtime: _angular_core.LOCALE_ID
+ };
+ Identifiers.TRANSLATIONS_FORMAT = {
+ name: 'TRANSLATIONS_FORMAT',
+ moduleUrl: assetUrl('core', 'i18n/tokens'),
+ runtime: _angular_core.TRANSLATIONS_FORMAT
+ };
+ Identifiers.setBindingDebugInfo = {
+ name: 'setBindingDebugInfo',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.setBindingDebugInfo
+ };
+ Identifiers.setBindingDebugInfoForChanges = {
+ name: 'setBindingDebugInfoForChanges',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.setBindingDebugInfoForChanges
+ };
+ Identifiers.AnimationTransition = {
+ name: 'AnimationTransition',
+ moduleUrl: assetUrl('core', 'animation/animation_transition'),
+ runtime: AnimationTransition
+ };
+ // This is just the interface!
+ Identifiers.InlineArray = { name: 'InlineArray', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: null };
+ Identifiers.inlineArrays = [
+ { name: 'InlineArray2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.InlineArray2 },
+ { name: 'InlineArray2', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.InlineArray2 },
+ { name: 'InlineArray4', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.InlineArray4 },
+ { name: 'InlineArray8', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.InlineArray8 },
+ { name: 'InlineArray16', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: view_utils.InlineArray16 },
+ ];
+ Identifiers.EMPTY_INLINE_ARRAY = {
+ name: 'EMPTY_INLINE_ARRAY',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.EMPTY_INLINE_ARRAY
+ };
+ Identifiers.InlineArrayDynamic = {
+ name: 'InlineArrayDynamic',
+ moduleUrl: VIEW_UTILS_MODULE_URL,
+ runtime: view_utils.InlineArrayDynamic
+ };
+ return Identifiers;
+ }());
+ function assetUrl(pkg, path, type) {
+ if (path === void 0) { path = null; }
+ if (type === void 0) { type = 'src'; }
+ if (path == null) {
+ return "asset:@angular/lib/" + pkg + "/index";
+ }
+ else {
+ return "asset:@angular/lib/" + pkg + "/src/" + path;
+ }
+ }
+ function resolveIdentifier(identifier) {
+ return new CompileIdentifierMetadata({
+ name: identifier.name,
+ moduleUrl: identifier.moduleUrl,
+ reference: reflector.resolveIdentifier(identifier.name, identifier.moduleUrl, identifier.runtime)
+ });
+ }
+ function identifierToken(identifier) {
+ return new CompileTokenMetadata({ identifier: identifier });
+ }
+ function resolveIdentifierToken(identifier) {
+ return identifierToken(resolveIdentifier(identifier));
+ }
+ function resolveEnumIdentifier(enumType, name) {
+ var resolvedEnum = reflector.resolveEnum(enumType.reference, name);
+ return new CompileIdentifierMetadata({ name: enumType.name + "." + name, moduleUrl: enumType.moduleUrl, reference: resolvedEnum });
+ }
+
+ /**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ var __extends$8 = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ var HtmlParser = (function (_super) {
+ __extends$8(HtmlParser, _super);
+ function HtmlParser() {
+ _super.call(this, getHtmlTagDefinition);
+ }
+ HtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {
+ if (parseExpansionForms === void 0) { parseExpansionForms = false; }
+ if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }
+ return _super.prototype.parse.call(this, source, url, parseExpansionForms, interpolationConfig);
+ };
+ HtmlParser.decorators = [
+ { type: _angular_core.Injectable },
+ ];
+ /** @nocollapse */
+ HtmlParser.ctorParameters = [];
+ return HtmlParser;
+ }(Parser$1));
+
+ /**
+ * @license
+ * Copyright Google Inc. All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ var __extends$9 = (this && this.__extends) || function (d, b) {
+ for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+ // http://cldr.unicode.org/index/cldr-spec/plural-rules
+ var PLURAL_CASES = ['zero', 'one', 'two', 'few', 'many', 'other'];
+ /**
+ * Expands special forms into elements.
+ *
+ * For example,
+ *
+ * ```
+ * { messages.length, plural,
+ * =0 {zero}
+ * =1 {one}
+ * other {more than one}
+ * }
+ * ```
+ *
+ * will be expanded into
+ *
+ * ```
+ *